Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/next/external/cache/sources/hcitools/lib/a2mp.h
Views: 3959
/*1*2* BlueZ - Bluetooth protocol stack for Linux3*4* Copyright (C) 2012 Intel Corporation. All rights reserved.5* Copyright (c) 2012 Code Aurora Forum. All rights reserved.6*7* This program is free software; you can redistribute it and/or modify8* it under the terms of the GNU General Public License as published by9* the Free Software Foundation; either version 2 of the License, or10* (at your option) any later version.11*12* This program is distributed in the hope that it will be useful,13* but WITHOUT ANY WARRANTY; without even the implied warranty of14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15* GNU General Public License for more details.16*17* You should have received a copy of the GNU General Public License18* along with this program; if not, write to the Free Software19* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA20*21*/2223#ifndef __A2MP_H24#define __A2MP_H2526#ifdef __cplusplus27extern "C" {28#endif2930/* A2MP Protocol */3132/* A2MP command codes */3334#define A2MP_COMMAND_REJ 0x0135#define A2MP_DISCOVER_REQ 0x0236#define A2MP_DISCOVER_RSP 0x0337#define A2MP_CHANGE_NOTIFY 0x0438#define A2MP_CHANGE_RSP 0x0539#define A2MP_INFO_REQ 0x0640#define A2MP_INFO_RSP 0x0741#define A2MP_ASSOC_REQ 0x0842#define A2MP_ASSOC_RSP 0x0943#define A2MP_CREATE_REQ 0x0a44#define A2MP_CREATE_RSP 0x0b45#define A2MP_DISCONN_REQ 0x0c46#define A2MP_DISCONN_RSP 0x0d4748struct a2mp_hdr {49uint8_t code;50uint8_t ident;51uint16_t len;52} __attribute__ ((packed));53#define A2MP_HDR_SIZE 45455struct a2mp_command_rej {56uint16_t reason;57} __attribute__ ((packed));5859struct a2mp_discover_req {60uint16_t mtu;61uint16_t mask;62} __attribute__ ((packed));6364struct a2mp_ctrl {65uint8_t id;66uint8_t type;67uint8_t status;68} __attribute__ ((packed));6970struct a2mp_discover_rsp {71uint16_t mtu;72uint16_t mask;73struct a2mp_ctrl ctrl_list[0];74} __attribute__ ((packed));7576struct a2mp_info_req {77uint8_t id;78} __attribute__ ((packed));7980struct a2mp_info_rsp {81uint8_t id;82uint8_t status;83uint32_t total_bw;84uint32_t max_bw;85uint32_t min_latency;86uint16_t pal_caps;87uint16_t assoc_size;88} __attribute__ ((packed));8990struct a2mp_assoc_req {91uint8_t id;92} __attribute__ ((packed));9394struct a2mp_assoc_rsp {95uint8_t id;96uint8_t status;97uint8_t assoc_data[0];98} __attribute__ ((packed));99100struct a2mp_create_req {101uint8_t local_id;102uint8_t remote_id;103uint8_t assoc_data[0];104} __attribute__ ((packed));105106struct a2mp_create_rsp {107uint8_t local_id;108uint8_t remote_id;109uint8_t status;110} __attribute__ ((packed));111112struct a2mp_disconn_req {113uint8_t local_id;114uint8_t remote_id;115} __attribute__ ((packed));116117struct a2mp_disconn_rsp {118uint8_t local_id;119uint8_t remote_id;120uint8_t status;121} __attribute__ ((packed));122123#define A2MP_COMMAND_NOT_RECOGNIZED 0x0000124125/* AMP controller status */126#define AMP_CTRL_POWERED_DOWN 0x00127#define AMP_CTRL_BLUETOOTH_ONLY 0x01128#define AMP_CTRL_NO_CAPACITY 0x02129#define AMP_CTRL_LOW_CAPACITY 0x03130#define AMP_CTRL_MEDIUM_CAPACITY 0x04131#define AMP_CTRL_HIGH_CAPACITY 0x05132#define AMP_CTRL_FULL_CAPACITY 0x06133134/* A2MP response status */135#define A2MP_STATUS_SUCCESS 0x00136#define A2MP_STATUS_INVALID_CTRL_ID 0x01137#define A2MP_STATUS_UNABLE_START_LINK_CREATION 0x02138#define A2MP_STATUS_NO_PHYSICAL_LINK_EXISTS 0x02139#define A2MP_STATUS_COLLISION_OCCURED 0x03140#define A2MP_STATUS_DISCONN_REQ_RECVD 0x04141#define A2MP_STATUS_PHYS_LINK_EXISTS 0x05142#define A2MP_STATUS_SECURITY_VIOLATION 0x06143144#ifdef __cplusplus145}146#endif147148#endif /* __A2MP_H */149150151