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/monitor/bt.h
Views: 3959
/*1*2* BlueZ - Bluetooth protocol stack for Linux3*4* Copyright (C) 2011-2012 Intel Corporation5* Copyright (C) 2004-2010 Marcel Holtmann <[email protected]>6*7*8* This library is free software; you can redistribute it and/or9* modify it under the terms of the GNU Lesser General Public10* License as published by the Free Software Foundation; either11* version 2.1 of the License, or (at your option) any later version.12*13* This library is distributed in the hope that it will be useful,14* but WITHOUT ANY WARRANTY; without even the implied warranty of15* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU16* Lesser General Public License for more details.17*18* You should have received a copy of the GNU Lesser General Public19* License along with this library; if not, write to the Free Software20* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA21*22*/2324#include <stdint.h>2526struct bt_ll_hdr {27uint8_t preamble;28uint32_t access_addr;29} __attribute__ ((packed));3031#define BT_LL_CONN_UPDATE_REQ 0x0032struct bt_ll_conn_update_req {33uint8_t win_size;34uint16_t win_offset;35uint16_t interval;36uint16_t latency;37uint16_t timeout;38uint16_t instant;39} __attribute__ ((packed));4041#define BT_LL_CHANNEL_MAP_REQ 0x0142struct bt_ll_channel_map_req {43uint8_t map[5];44uint16_t instant;45} __attribute__ ((packed));4647#define BT_LL_TERMINATE_IND 0x0248struct bt_ll_terminate_ind {49uint8_t error;50} __attribute__ ((packed));5152#define BT_LL_ENC_REQ 0x0353struct bt_ll_enc_req {54uint64_t rand;55uint16_t ediv;56uint64_t skd;57uint32_t iv;58} __attribute__ ((packed));5960#define BT_LL_ENC_RSP 0x0461struct bt_ll_enc_rsp {62uint64_t skd;63uint32_t iv;64} __attribute__ ((packed));6566#define BT_LL_START_ENC_REQ 0x056768#define BT_LL_START_ENC_RSP 0x066970#define BT_LL_UNKNOWN_RSP 0x0771struct bt_ll_unknown_rsp {72uint8_t type;73} __attribute__ ((packed));7475#define BT_LL_FEATURE_REQ 0x0876struct bt_ll_feature_req {77uint8_t features[8];78} __attribute__ ((packed));7980#define BT_LL_FEATURE_RSP 0x0981struct bt_ll_feature_rsp {82uint8_t features[8];83} __attribute__ ((packed));8485#define BT_LL_PAUSE_ENC_REQ 0x0a8687#define BT_LL_PAUSE_ENC_RSP 0x0b8889#define BT_LL_VERSION_IND 0x0c90struct bt_ll_version_ind {91uint8_t version;92uint16_t company;93uint16_t subversion;94} __attribute__ ((packed));9596#define BT_LL_REJECT_IND 0x0d97struct bt_ll_reject_ind {98uint8_t error;99} __attribute__ ((packed));100101#define BT_H4_CMD_PKT 0x01102#define BT_H4_ACL_PKT 0x02103#define BT_H4_SCO_PKT 0x03104#define BT_H4_EVT_PKT 0x04105106struct bt_hci_acl_hdr {107uint16_t handle;108uint16_t dlen;109} __attribute__ ((packed));110111struct bt_hci_cmd_hdr {112uint16_t opcode;113uint8_t plen;114} __attribute__ ((packed));115116struct bt_hci_evt_hdr {117uint8_t evt;118uint8_t plen;119} __attribute__ ((packed));120121#define BT_HCI_CMD_NOP 0x0000122123#define BT_HCI_CMD_INQUIRY 0x0401124struct bt_hci_cmd_inquiry {125uint8_t lap[3];126uint8_t length;127uint8_t num_resp;128} __attribute__ ((packed));129130#define BT_HCI_CMD_INQUIRY_CANCEL 0x0402131132#define BT_HCI_CMD_PERIODIC_INQUIRY 0x0403133struct bt_hci_cmd_periodic_inquiry {134uint16_t max_period;135uint16_t min_period;136uint8_t lap[3];137uint8_t length;138uint8_t num_resp;139} __attribute__ ((packed));140141#define BT_HCI_CMD_EXIT_PERIODIC_INQUIRY 0x0404142143#define BT_HCI_CMD_CREATE_CONN 0x0405144struct bt_hci_cmd_create_conn {145uint8_t bdaddr[6];146uint16_t pkt_type;147uint8_t pscan_rep_mode;148uint8_t pscan_mode;149uint16_t clock_offset;150uint8_t role_switch;151} __attribute__ ((packed));152153#define BT_HCI_CMD_DISCONNECT 0x0406154struct bt_hci_cmd_disconnect {155uint16_t handle;156uint8_t reason;157} __attribute__ ((packed));158159#define BT_HCI_CMD_ADD_SCO_CONN 0x0407160struct bt_hci_cmd_add_sco_conn {161uint16_t handle;162uint16_t pkt_type;163} __attribute__ ((packed));164165#define BT_HCI_CMD_CREATE_CONN_CANCEL 0x0408166struct bt_hci_cmd_create_conn_cancel {167uint8_t bdaddr[6];168} __attribute__ ((packed));169170#define BT_HCI_CMD_ACCEPT_CONN_REQUEST 0x0409171struct bt_hci_cmd_accept_conn_request {172uint8_t bdaddr[6];173uint8_t role;174} __attribute__ ((packed));175176#define BT_HCI_CMD_REJECT_CONN_REQUEST 0x040a177struct bt_hci_cmd_reject_conn_request {178uint8_t bdaddr[6];179uint8_t reason;180} __attribute__ ((packed));181182#define BT_HCI_CMD_LINK_KEY_REQUEST_REPLY 0x040b183struct bt_hci_cmd_link_key_request_reply {184uint8_t bdaddr[6];185uint8_t link_key[16];186} __attribute__ ((packed));187188#define BT_HCI_CMD_LINK_KEY_REQUEST_NEG_REPLY 0x040c189struct bt_hci_cmd_link_key_request_neg_reply {190uint8_t bdaddr[6];191} __attribute__ ((packed));192193#define BT_HCI_CMD_PIN_CODE_REQUEST_REPLY 0x040d194struct bt_hci_cmd_pin_code_request_reply {195uint8_t bdaddr[6];196uint8_t pin_len;197uint8_t pin_code[16];198} __attribute__ ((packed));199200#define BT_HCI_CMD_PIN_CODE_REQUEST_NEG_REPLY 0x040e201struct bt_hci_cmd_pin_code_request_neg_reply {202uint8_t bdaddr[6];203} __attribute__ ((packed));204205#define BT_HCI_CMD_CHANGE_CONN_PKT_TYPE 0x040f206struct bt_hci_cmd_change_conn_pkt_type {207uint16_t handle;208uint16_t pkt_type;209} __attribute__ ((packed));210211#define BT_HCI_CMD_AUTH_REQUESTED 0x0411212struct bt_hci_cmd_auth_requested {213uint16_t handle;214} __attribute__ ((packed));215216#define BT_HCI_CMD_SET_CONN_ENCRYPT 0x0413217struct bt_hci_cmd_set_conn_encrypt {218uint16_t handle;219uint8_t encr_mode;220} __attribute__ ((packed));221222#define BT_HCI_CMD_CHANGE_CONN_LINK_KEY 0x0415223struct bt_hci_cmd_change_conn_link_key {224uint16_t handle;225} __attribute__ ((packed));226227#define BT_HCI_CMD_MASTER_LINK_KEY 0x0417228struct bt_hci_cmd_master_link_key {229uint8_t key_flag;230} __attribute__ ((packed));231232#define BT_HCI_CMD_REMOTE_NAME_REQUEST 0x0419233struct bt_hci_cmd_remote_name_request {234uint8_t bdaddr[6];235uint8_t pscan_rep_mode;236uint8_t pscan_mode;237uint16_t clock_offset;238} __attribute__ ((packed));239240#define BT_HCI_CMD_REMOTE_NAME_REQUEST_CANCEL 0x041a241struct bt_hci_cmd_remote_name_request_cancel {242uint8_t bdaddr[6];243} __attribute__ ((packed));244struct bt_hci_rsp_remote_name_request_cancel {245uint8_t status;246uint8_t bdaddr[6];247} __attribute__ ((packed));248249#define BT_HCI_CMD_READ_REMOTE_FEATURES 0x041b250struct bt_hci_cmd_read_remote_features {251uint16_t handle;252} __attribute__ ((packed));253254#define BT_HCI_CMD_READ_REMOTE_EXT_FEATURES 0x041c255struct bt_hci_cmd_read_remote_ext_features {256uint16_t handle;257uint8_t page;258} __attribute__ ((packed));259260#define BT_HCI_CMD_READ_REMOTE_VERSION 0x041d261struct bt_hci_cmd_read_remote_version {262uint16_t handle;263} __attribute__ ((packed));264265#define BT_HCI_CMD_READ_CLOCK_OFFSET 0x041f266struct bt_hci_cmd_read_clock_offset {267uint16_t handle;268} __attribute__ ((packed));269270#define BT_HCI_CMD_READ_LMP_HANDLE 0x0420271struct bt_hci_cmd_read_lmp_handle {272uint16_t handle;273} __attribute__ ((packed));274struct bt_hci_rsp_read_lmp_handle {275uint8_t status;276uint16_t handle;277uint8_t lmp_handle;278uint32_t reserved;279} __attribute__ ((packed));280281#define BT_HCI_CMD_SETUP_SYNC_CONN 0x0428282struct bt_hci_cmd_setup_sync_conn {283uint16_t handle;284uint32_t tx_bandwidth;285uint32_t rx_bandwidth;286uint16_t max_latency;287uint16_t voice_setting;288uint8_t retrans_effort;289uint16_t pkt_type;290} __attribute__ ((packed));291292#define BT_HCI_CMD_ACCEPT_SYNC_CONN 0x0429293struct bt_hci_cmd_accept_sync_conn {294uint8_t bdaddr[6];295uint32_t tx_bandwidth;296uint32_t rx_bandwidth;297uint16_t max_latency;298uint16_t voice_setting;299uint8_t retrans_effort;300uint16_t pkt_type;301} __attribute__ ((packed));302303#define BT_HCI_CMD_REJECT_SYNC_CONN 0x042a304struct bt_hci_cmd_reject_sync_conn {305uint8_t bdaddr[6];306uint8_t reason;307} __attribute__ ((packed));308309#define BT_HCI_CMD_IO_CAPABILITY_REQUEST_REPLY 0x042b310struct bt_hci_cmd_io_capability_request_reply {311uint8_t bdaddr[6];312uint8_t capability;313uint8_t oob_data;314uint8_t authentication;315} __attribute__ ((packed));316317#define BT_HCI_CMD_USER_CONFIRM_REQUEST_REPLY 0x042c318struct bt_hci_cmd_user_confirm_request_reply {319uint8_t bdaddr[6];320} __attribute__ ((packed));321322#define BT_HCI_CMD_USER_CONFIRM_REQUEST_NEG_REPLY 0x042d323struct bt_hci_cmd_user_confirm_request_neg_reply {324uint8_t bdaddr[6];325} __attribute__ ((packed));326327#define BT_HCI_CMD_USER_PASSKEY_REQUEST_REPLY 0x042e328struct bt_hci_cmd_user_passkey_request_reply {329uint8_t bdaddr[6];330uint32_t passkey;331} __attribute__ ((packed));332333#define BT_HCI_CMD_USER_PASSKEY_REQUEST_NEG_REPLY 0x042f334struct bt_hci_cmd_user_passkey_request_neg_reply {335uint8_t bdaddr[6];336} __attribute__ ((packed));337338#define BT_HCI_CMD_REMOTE_OOB_DATA_REQUEST_REPLY 0x0430339struct bt_hci_cmd_remote_oob_data_request_reply {340uint8_t bdaddr[6];341uint8_t hash[16];342uint8_t randomizer[16];343} __attribute__ ((packed));344345#define BT_HCI_CMD_REMOTE_OOB_DATA_REQUEST_NEG_REPLY 0x0433346struct bt_hci_cmd_remote_oob_data_request_neg_reply {347uint8_t bdaddr[6];348} __attribute__ ((packed));349350#define BT_HCI_CMD_IO_CAPABILITY_REQUEST_NEG_REPLY 0x0434351struct bt_hci_cmd_io_capability_request_neg_reply {352uint8_t bdaddr[6];353uint8_t reason;354} __attribute__ ((packed));355356#define BT_HCI_CMD_CREATE_PHY_LINK 0x0435357struct bt_hci_cmd_create_phy_link {358uint8_t phy_handle;359uint8_t key_len;360uint8_t key_type;361} __attribute__ ((packed));362363#define BT_HCI_CMD_ACCEPT_PHY_LINK 0x0436364struct bt_hci_cmd_accept_phy_link {365uint8_t phy_handle;366uint8_t key_len;367uint8_t key_type;368} __attribute__ ((packed));369370#define BT_HCI_CMD_DISCONN_PHY_LINK 0x0437371struct bt_hci_cmd_disconn_phy_link {372uint8_t phy_handle;373uint8_t reason;374} __attribute__ ((packed));375376#define BT_HCI_CMD_CREATE_LOGIC_LINK 0x0438377struct bt_hci_cmd_create_logic_link {378uint8_t phy_handle;379uint8_t tx_flow_spec[16];380uint8_t rx_flow_spec[16];381} __attribute__ ((packed));382383#define BT_HCI_CMD_ACCEPT_LOGIC_LINK 0x0439384struct bt_hci_cmd_accept_logic_link {385uint8_t phy_handle;386uint8_t tx_flow_spec[16];387uint8_t rx_flow_spec[16];388} __attribute__ ((packed));389390#define BT_HCI_CMD_DISCONN_LOGIC_LINK 0x043a391struct bt_hci_cmd_disconn_logic_link {392uint16_t handle;393} __attribute__ ((packed));394395#define BT_HCI_CMD_LOGIC_LINK_CANCEL 0x043b396struct bt_hci_cmd_logic_link_cancel {397uint8_t phy_handle;398uint8_t flow_spec;399} __attribute__ ((packed));400struct bt_hci_rsp_logic_link_cancel {401uint8_t status;402uint8_t phy_handle;403uint8_t flow_spec;404} __attribute__ ((packed));405406#define BT_HCI_CMD_FLOW_SPEC_MODIFY 0x043c407struct bt_hci_cmd_flow_spec_modify {408uint16_t handle;409uint8_t tx_flow_spec[16];410uint8_t rx_flow_spec[16];411} __attribute__ ((packed));412413#define BT_HCI_CMD_HOLD_MODE 0x0801414struct bt_hci_cmd_hold_mode {415uint16_t handle;416uint16_t max_interval;417uint16_t min_interval;418} __attribute__ ((packed));419420#define BT_HCI_CMD_SNIFF_MODE 0x0803421struct bt_hci_cmd_sniff_mode {422uint16_t handle;423uint16_t max_interval;424uint16_t min_interval;425uint16_t attempt;426uint16_t timeout;427} __attribute__ ((packed));428429#define BT_HCI_CMD_EXIT_SNIFF_MODE 0x0804430struct bt_hci_cmd_exit_sniff_mode {431uint16_t handle;432} __attribute__ ((packed));433434#define BT_HCI_CMD_PARK_STATE 0x0805435struct bt_hci_cmd_park_state {436uint16_t handle;437uint16_t max_interval;438uint16_t min_interval;439} __attribute__ ((packed));440441#define BT_HCI_CMD_EXIT_PARK_STATE 0x0806442struct bt_hci_cmd_exit_park_state {443uint16_t handle;444} __attribute__ ((packed));445446#define BT_HCI_CMD_QOS_SETUP 0x0807447struct bt_hci_cmd_qos_setup {448uint16_t handle;449uint8_t flags;450uint8_t service_type;451uint32_t token_rate;452uint32_t peak_bandwidth;453uint32_t latency;454uint32_t delay_variation;455} __attribute__ ((packed));456457#define BT_HCI_CMD_ROLE_DISCOVERY 0x0809458struct bt_hci_cmd_role_discovery {459uint16_t handle;460} __attribute__ ((packed));461struct bt_hci_rsp_role_discovery {462uint8_t status;463uint16_t handle;464uint8_t role;465} __attribute__ ((packed));466467#define BT_HCI_CMD_SWITCH_ROLE 0x080b468struct bt_hci_cmd_switch_role {469uint8_t bdaddr[6];470uint8_t role;471} __attribute__ ((packed));472473#define BT_HCI_CMD_READ_LINK_POLICY 0x080c474struct bt_hci_cmd_read_link_policy {475uint16_t handle;476} __attribute__ ((packed));477struct bt_hci_rsp_read_link_policy {478uint8_t status;479uint16_t handle;480uint16_t policy;481} __attribute__ ((packed));482483#define BT_HCI_CMD_WRITE_LINK_POLICY 0x080d484struct bt_hci_cmd_write_link_policy {485uint16_t handle;486uint16_t policy;487} __attribute__ ((packed));488struct bt_hci_rsp_write_link_policy {489uint8_t status;490uint16_t handle;491} __attribute__ ((packed));492493#define BT_HCI_CMD_READ_DEFAULT_LINK_POLICY 0x080e494struct bt_hci_rsp_read_default_link_policy {495uint8_t status;496uint16_t policy;497} __attribute__ ((packed));498499#define BT_HCI_CMD_WRITE_DEFAULT_LINK_POLICY 0x080f500struct bt_hci_cmd_write_default_link_policy {501uint16_t policy;502} __attribute__ ((packed));503504#define BT_HCI_CMD_FLOW_SPEC 0x0810505struct bt_hci_cmd_flow_spec {506uint16_t handle;507uint8_t flags;508uint8_t direction;509uint8_t service_type;510uint32_t token_rate;511uint32_t token_bucket_size;512uint32_t peak_bandwidth;513uint32_t access_latency;514} __attribute__ ((packed));515516#define BT_HCI_CMD_SNIFF_SUBRATING 0x0811517struct bt_hci_cmd_sniff_subrating {518uint16_t handle;519uint16_t max_latency;520uint16_t min_remote_timeout;521uint16_t min_local_timeout;522} __attribute__ ((packed));523struct bt_hci_rsp_sniff_subrating {524uint8_t status;525uint16_t handle;526} __attribute__ ((packed));527528#define BT_HCI_CMD_SET_EVENT_MASK 0x0c01529struct bt_hci_cmd_set_event_mask {530uint8_t mask[8];531} __attribute__ ((packed));532533#define BT_HCI_CMD_RESET 0x0c03534535#define BT_HCI_CMD_SET_EVENT_FILTER 0x0c05536struct bt_hci_cmd_set_event_filter {537uint8_t type;538uint8_t cond_type;539uint8_t cond[0];540} __attribute__ ((packed));541542#define BT_HCI_CMD_FLUSH 0x0c08543struct bt_hci_cmd_flush {544uint16_t handle;545} __attribute__ ((packed));546struct bt_hci_rsp_flush {547uint8_t status;548uint16_t handle;549} __attribute__ ((packed));550551#define BT_HCI_CMD_READ_PIN_TYPE 0x0c09552struct bt_hci_rsp_read_pin_type {553uint8_t status;554uint8_t pin_type;555} __attribute__ ((packed));556557#define BT_HCI_CMD_WRITE_PIN_TYPE 0x0c0a558struct bt_hci_cmd_write_pin_type {559uint8_t pin_type;560} __attribute__ ((packed));561562#define BT_HCI_CMD_CREATE_NEW_UNIT_KEY 0x0c0b563564#define BT_HCI_CMD_READ_STORED_LINK_KEY 0x0c0d565struct bt_hci_cmd_read_stored_link_key {566uint8_t bdaddr[6];567uint8_t read_all;568} __attribute__ ((packed));569struct bt_hci_rsp_read_stored_link_key {570uint8_t status;571uint16_t max_num_keys;572uint16_t num_keys;573} __attribute__ ((packed));574575#define BT_HCI_CMD_WRITE_STORED_LINK_KEY 0x0c11576struct bt_hci_cmd_write_stored_link_key {577uint8_t num_keys;578} __attribute__ ((packed));579struct bt_hci_rsp_write_stored_link_key {580uint8_t status;581uint8_t num_keys;582} __attribute__ ((packed));583584#define BT_HCI_CMD_DELETE_STORED_LINK_KEY 0x0c12585struct bt_hci_cmd_delete_stored_link_key {586uint8_t bdaddr[6];587uint8_t delete_all;588} __attribute__ ((packed));589struct bt_hci_rsp_delete_stored_link_key {590uint8_t status;591uint16_t num_keys;592} __attribute__ ((packed));593594#define BT_HCI_CMD_WRITE_LOCAL_NAME 0x0c13595struct bt_hci_cmd_write_local_name {596uint8_t name[248];597} __attribute__ ((packed));598599#define BT_HCI_CMD_READ_LOCAL_NAME 0x0c14600struct bt_hci_rsp_read_local_name {601uint8_t status;602uint8_t name[248];603} __attribute__ ((packed));604605#define BT_HCI_CMD_READ_CONN_ACCEPT_TIMEOUT 0x0c15606struct bt_hci_rsp_read_conn_accept_timeout {607uint8_t status;608uint16_t timeout;609} __attribute__ ((packed));610611#define BT_HCI_CMD_WRITE_CONN_ACCEPT_TIMEOUT 0x0c16612struct bt_hci_cmd_write_conn_accept_timeout {613uint16_t timeout;614} __attribute__ ((packed));615616#define BT_HCI_CMD_READ_PAGE_TIMEOUT 0x0c17617struct bt_hci_rsp_read_page_timeout {618uint8_t status;619uint16_t timeout;620} __attribute__ ((packed));621622#define BT_HCI_CMD_WRITE_PAGE_TIMEOUT 0x0c18623struct bt_hci_cmd_write_page_timeout {624uint16_t timeout;625} __attribute__ ((packed));626627#define BT_HCI_CMD_READ_SCAN_ENABLE 0x0c19628struct bt_hci_rsp_read_scan_enable {629uint8_t status;630uint8_t enable;631} __attribute__ ((packed));632633#define BT_HCI_CMD_WRITE_SCAN_ENABLE 0x0c1a634struct bt_hci_cmd_write_scan_enable {635uint8_t enable;636} __attribute__ ((packed));637638#define BT_HCI_CMD_READ_PAGE_SCAN_ACTIVITY 0x0c1b639struct bt_hci_rsp_read_page_scan_activity {640uint8_t status;641uint16_t interval;642uint16_t window;643} __attribute__ ((packed));644645#define BT_HCI_CMD_WRITE_PAGE_SCAN_ACTIVITY 0x0c1c646struct bt_hci_cmd_write_page_scan_activity {647uint16_t interval;648uint16_t window;649} __attribute__ ((packed));650651#define BT_HCI_CMD_READ_INQUIRY_SCAN_ACTIVITY 0x0c1d652struct bt_hci_rsp_read_inquiry_scan_activity {653uint8_t status;654uint16_t interval;655uint16_t window;656} __attribute__ ((packed));657658#define BT_HCI_CMD_WRITE_INQUIRY_SCAN_ACTIVITY 0x0c1e659struct bt_hci_cmd_write_inquiry_scan_activity {660uint16_t interval;661uint16_t window;662} __attribute__ ((packed));663664#define BT_HCI_CMD_READ_AUTH_ENABLE 0x0c1f665struct bt_hci_rsp_read_auth_enable {666uint8_t status;667uint8_t enable;668} __attribute__ ((packed));669670#define BT_HCI_CMD_WRITE_AUTH_ENABLE 0x0c20671struct bt_hci_cmd_write_auth_enable {672uint8_t enable;673} __attribute__ ((packed));674675#define BT_HCI_CMD_READ_ENCRYPT_MODE 0x0c21676struct bt_hci_rsp_read_encrypt_mode {677uint8_t status;678uint8_t mode;679} __attribute__ ((packed));680681#define BT_HCI_CMD_WRITE_ENCRYPT_MODE 0x0c22682struct bt_hci_cmd_write_encrypt_mode {683uint8_t mode;684} __attribute__ ((packed));685686#define BT_HCI_CMD_READ_CLASS_OF_DEV 0x0c23687struct bt_hci_rsp_read_class_of_dev {688uint8_t status;689uint8_t dev_class[3];690} __attribute__ ((packed));691692#define BT_HCI_CMD_WRITE_CLASS_OF_DEV 0x0c24693struct bt_hci_cmd_write_class_of_dev {694uint8_t dev_class[3];695} __attribute__ ((packed));696697#define BT_HCI_CMD_READ_VOICE_SETTING 0x0c25698struct bt_hci_rsp_read_voice_setting {699uint8_t status;700uint16_t setting;701} __attribute__ ((packed));702703#define BT_HCI_CMD_WRITE_VOICE_SETTING 0x0c26704struct bt_hci_cmd_write_voice_setting {705uint16_t setting;706} __attribute__ ((packed));707708#define BT_HCI_CMD_HOST_BUFFER_SIZE 0x0c33709struct bt_hci_cmd_host_buffer_size {710uint16_t acl_mtu;711uint8_t sco_mtu;712uint16_t acl_max_pkt;713uint16_t sco_max_pkt;714} __attribute__ ((packed));715716#define BT_HCI_CMD_READ_LINK_SUPV_TIMEOUT 0x0c36717struct bt_hci_cmd_read_link_supv_timeout {718uint16_t handle;719} __attribute__ ((packed));720struct bt_hci_rsp_read_link_supv_timeout {721uint8_t status;722uint16_t handle;723uint16_t timeout;724} __attribute__ ((packed));725726#define BT_HCI_CMD_WRITE_LINK_SUPV_TIMEOUT 0x0c37727struct bt_hci_cmd_write_link_supv_timeout {728uint16_t handle;729uint16_t timeout;730} __attribute__ ((packed));731struct bt_hci_rsp_write_link_supv_timeout {732uint8_t status;733uint16_t handle;734} __attribute__ ((packed));735736#define BT_HCI_CMD_READ_NUM_SUPPORTED_IAC 0x0c38737struct bt_hci_rsp_read_num_supported_iac {738uint8_t status;739uint8_t num_iac;740} __attribute__ ((packed));741742#define BT_HCI_CMD_READ_CURRENT_IAC_LAP 0x0c39743struct bt_hci_rsp_read_current_iac_lap {744uint8_t status;745uint8_t num_iac;746uint8_t iac_lap[0];747} __attribute__ ((packed));748749#define BT_HCI_CMD_WRITE_CURRENT_IAC_LAP 0x0c3a750struct bt_hci_cmd_write_current_iac_lap {751uint8_t num_iac;752uint8_t iac_lap[0];753} __attribute__ ((packed));754755#define BT_HCI_CMD_READ_PAGE_SCAN_PERIOD_MODE 0x0c3b756struct bt_hci_rsp_read_page_scan_period_mode {757uint8_t status;758uint8_t mode;759} __attribute__ ((packed));760761#define BT_HCI_CMD_WRITE_PAGE_SCAN_PERIOD_MODE 0x0c3c762struct bt_hci_cmd_write_page_scan_period_mode {763uint8_t mode;764} __attribute__ ((packed));765766#define BT_HCI_CMD_READ_PAGE_SCAN_MODE 0x0c3d767struct bt_hci_rsp_read_page_scan_mode {768uint8_t status;769uint8_t mode;770} __attribute__ ((packed));771772#define BT_HCI_CMD_WRITE_PAGE_SCAN_MODE 0x0c3e773struct bt_hci_cmd_write_page_scan_mode {774uint8_t mode;775} __attribute__ ((packed));776777#define BT_HCI_CMD_SET_AFH_HOST_CLASSIFICATION 0x0c3f778struct bt_hci_cmd_set_afh_host_classification {779uint8_t map[10];780} __attribute__ ((packed));781782#define BT_HCI_CMD_READ_INQUIRY_SCAN_TYPE 0x0c42783struct bt_hci_rsp_read_inquiry_scan_type {784uint8_t status;785uint8_t type;786} __attribute__ ((packed));787788#define BT_HCI_CMD_WRITE_INQUIRY_SCAN_TYPE 0x0c43789struct bt_hci_cmd_write_inquiry_scan_type {790uint8_t type;791} __attribute__ ((packed));792793#define BT_HCI_CMD_READ_INQUIRY_MODE 0x0c44794struct bt_hci_rsp_read_inquiry_mode {795uint8_t status;796uint8_t mode;797} __attribute__ ((packed));798799#define BT_HCI_CMD_WRITE_INQUIRY_MODE 0x0c45800struct bt_hci_cmd_write_inquiry_mode {801uint8_t mode;802} __attribute__ ((packed));803804#define BT_HCI_CMD_READ_PAGE_SCAN_TYPE 0x0c46805struct bt_hci_rsp_read_page_scan_type {806uint8_t status;807uint8_t type;808} __attribute__ ((packed));809810#define BT_HCI_CMD_WRITE_PAGE_SCAN_TYPE 0x0c47811struct bt_hci_cmd_write_page_scan_type {812uint8_t type;813} __attribute__ ((packed));814815#define BT_HCI_CMD_READ_AFH_ASSESSMENT_MODE 0x0c48816struct bt_hci_rsp_read_afh_assessment_mode {817uint8_t status;818uint8_t mode;819} __attribute__ ((packed));820821#define BT_HCI_CMD_WRITE_AFH_ASSESSMENT_MODE 0x0c49822struct bt_hci_cmd_write_afh_assessment_mode {823uint8_t mode;824} __attribute__ ((packed));825826#define BT_HCI_CMD_READ_EXT_INQUIRY_RESPONSE 0x0c51827struct bt_hci_rsp_read_ext_inquiry_response {828uint8_t status;829uint8_t fec;830uint8_t data[240];831} __attribute__ ((packed));832833#define BT_HCI_CMD_WRITE_EXT_INQUIRY_RESPONSE 0x0c52834struct bt_hci_cmd_write_ext_inquiry_response {835uint8_t fec;836uint8_t data[240];837} __attribute__ ((packed));838839#define BT_HCI_CMD_REFRESH_ENCRYPT_KEY 0x0c53840struct bt_hci_cmd_refresh_encrypt_key {841uint16_t handle;842} __attribute__ ((packed));843844#define BT_HCI_CMD_READ_SIMPLE_PAIRING_MODE 0x0c55845struct bt_hci_rsp_read_simple_pairing_mode {846uint8_t status;847uint8_t mode;848} __attribute__ ((packed));849850#define BT_HCI_CMD_WRITE_SIMPLE_PAIRING_MODE 0x0c56851struct bt_hci_cmd_write_simple_pairing_mode {852uint8_t mode;853} __attribute__ ((packed));854855#define BT_HCI_CMD_READ_LOCAL_OOB_DATA 0x0c57856struct bt_hci_rsp_read_local_oob_data {857uint8_t status;858uint8_t hash[16];859uint8_t randomizer[16];860} __attribute__ ((packed));861862#define BT_HCI_CMD_READ_INQUIRY_RESP_TX_POWER 0x0c58863struct bt_hci_rsp_read_inquiry_resp_tx_power {864uint8_t status;865int8_t level;866} __attribute__ ((packed));867868#define BT_HCI_CMD_WRITE_INQUIRY_TX_POWER 0x0c59869struct bt_hci_cmd_write_inquiry_tx_power {870int8_t level;871} __attribute__ ((packed));872873#define BT_HCI_CMD_ENHANCED_FLUSH 0x0c5f874struct bt_hci_cmd_enhanced_flush {875uint16_t handle;876uint8_t type;877} __attribute__ ((packed));878879#define BT_HCI_CMD_SET_EVENT_MASK_PAGE2 0x0c63880struct bt_hci_cmd_set_event_mask_page2 {881uint8_t mask[8];882} __attribute__ ((packed));883884#define BT_HCI_CMD_READ_LOCATION_DATA 0x0c64885struct bt_hci_rsp_read_location_data {886uint8_t status;887uint8_t domain_aware;888uint8_t domain[2];889uint8_t domain_options;890uint8_t options;891} __attribute__ ((packed));892893#define BT_HCI_CMD_WRITE_LOCATION_DATA 0x0c65894struct bt_hci_cmd_write_location_data {895uint8_t domain_aware;896uint8_t domain[2];897uint8_t domain_options;898uint8_t options;899} __attribute__ ((packed));900901#define BT_HCI_CMD_READ_FLOW_CONTROL_MODE 0x0c66902struct bt_hci_rsp_read_flow_control_mode {903uint8_t status;904uint8_t mode;905} __attribute__ ((packed));906907#define BT_HCI_CMD_WRITE_FLOW_CONTROL_MODE 0x0c67908struct bt_hci_cmd_write_flow_control_mode {909uint8_t mode;910} __attribute__ ((packed));911912#define BT_HCI_CMD_READ_LE_HOST_SUPPORTED 0x0c6c913struct bt_hci_rsp_read_le_host_supported {914uint8_t status;915uint8_t supported;916uint8_t simultaneous;917} __attribute__ ((packed));918919#define BT_HCI_CMD_WRITE_LE_HOST_SUPPORTED 0x0c6d920struct bt_hci_cmd_write_le_host_supported {921uint8_t supported;922uint8_t simultaneous;923} __attribute__ ((packed));924925#define BT_HCI_CMD_READ_SYNC_TRAIN_PARAMS 0x0c77926struct bt_hci_rsp_read_sync_train_params {927uint8_t status;928uint16_t interval;929uint32_t timeout;930uint8_t service_data;931} __attribute__ ((packed));932933#define BT_HCI_CMD_READ_LOCAL_VERSION 0x1001934struct bt_hci_rsp_read_local_version {935uint8_t status;936uint8_t hci_ver;937uint16_t hci_rev;938uint8_t lmp_ver;939uint16_t manufacturer;940uint16_t lmp_subver;941} __attribute__ ((packed));942943#define BT_HCI_CMD_READ_LOCAL_COMMANDS 0x1002944struct bt_hci_rsp_read_local_commands {945uint8_t status;946uint8_t commands[64];947} __attribute__ ((packed));948949#define BT_HCI_CMD_READ_LOCAL_FEATURES 0x1003950struct bt_hci_rsp_read_local_features {951uint8_t status;952uint8_t features[8];953} __attribute__ ((packed));954955#define BT_HCI_CMD_READ_LOCAL_EXT_FEATURES 0x1004956struct bt_hci_cmd_read_local_ext_features {957uint8_t page;958} __attribute__ ((packed));959struct bt_hci_rsp_read_local_ext_features {960uint8_t status;961uint8_t page;962uint8_t max_page;963uint8_t features[8];964} __attribute__ ((packed));965966#define BT_HCI_CMD_READ_BUFFER_SIZE 0x1005967struct bt_hci_rsp_read_buffer_size {968uint8_t status;969uint16_t acl_mtu;970uint8_t sco_mtu;971uint16_t acl_max_pkt;972uint16_t sco_max_pkt;973} __attribute__ ((packed));974975#define BT_HCI_CMD_READ_COUNTRY_CODE 0x1007976struct bt_hci_rsp_read_country_code {977uint8_t status;978uint8_t code;979} __attribute__ ((packed));980981#define BT_HCI_CMD_READ_BD_ADDR 0x1009982struct bt_hci_rsp_read_bd_addr {983uint8_t status;984uint8_t bdaddr[6];985} __attribute__ ((packed));986987#define BT_HCI_CMD_READ_DATA_BLOCK_SIZE 0x100a988struct bt_hci_rsp_read_data_block_size {989uint8_t status;990uint16_t max_acl_len;991uint16_t block_len;992uint16_t num_blocks;993} __attribute__ ((packed));994995#define BT_HCI_CMD_READ_FAILED_CONTACT_COUNTER 0x1401996struct bt_hci_cmd_read_failed_contact_counter {997uint16_t handle;998} __attribute__ ((packed));999struct bt_hci_rsp_read_failed_contact_counter {1000uint8_t status;1001uint16_t handle;1002uint16_t counter;1003} __attribute__ ((packed));10041005#define BT_HCI_CMD_RESET_FAILED_CONTACT_COUNTER 0x14021006struct bt_hci_cmd_reset_failed_contact_counter {1007uint16_t handle;1008} __attribute__ ((packed));1009struct bt_hci_rsp_reset_failed_contact_counter {1010uint8_t status;1011uint16_t handle;1012} __attribute__ ((packed));10131014#define BT_HCI_CMD_READ_LINK_QUALITY 0x14031015struct bt_hci_cmd_read_link_quality {1016uint16_t handle;1017} __attribute__ ((packed));1018struct bt_hci_rsp_read_link_quality {1019uint8_t status;1020uint16_t handle;1021uint8_t link_quality;1022} __attribute__ ((packed));10231024#define BT_HCI_CMD_READ_RSSI 0x14051025struct bt_hci_cmd_read_rssi {1026uint16_t handle;1027} __attribute__ ((packed));1028struct bt_hci_rsp_read_rssi {1029uint8_t status;1030uint16_t handle;1031int8_t rssi;1032} __attribute__ ((packed));10331034#define BT_HCI_CMD_READ_AFH_CHANNEL_MAP 0x14061035struct bt_hci_cmd_read_afh_channel_map {1036uint16_t handle;1037} __attribute__ ((packed));1038struct bt_hci_rsp_read_afh_channel_map {1039uint8_t status;1040uint16_t handle;1041uint8_t mode;1042uint8_t map[10];1043} __attribute__ ((packed));10441045#define BT_HCI_CMD_READ_CLOCK 0x14071046struct bt_hci_cmd_read_clock {1047uint16_t handle;1048uint8_t type;1049} __attribute__ ((packed));1050struct bt_hci_rsp_read_clock {1051uint8_t status;1052uint16_t handle;1053uint32_t clock;1054uint16_t accuracy;1055} __attribute__ ((packed));10561057#define BT_HCI_CMD_READ_ENCRYPT_KEY_SIZE 0x14081058struct bt_hci_cmd_read_encrypt_key_size {1059uint16_t handle;1060} __attribute__ ((packed));1061struct bt_hci_rsp_read_encrypt_key_size {1062uint8_t status;1063uint16_t handle;1064uint8_t key_size;1065} __attribute__ ((packed));10661067#define BT_HCI_CMD_READ_LOCAL_AMP_INFO 0x14091068struct bt_hci_rsp_read_local_amp_info {1069uint8_t status;1070uint8_t amp_status;1071uint32_t total_bw;1072uint32_t max_bw;1073uint32_t min_latency;1074uint32_t max_pdu;1075uint8_t amp_type;1076uint16_t pal_cap;1077uint16_t max_assoc_len;1078uint32_t max_flush_to;1079uint32_t be_flush_to;1080} __attribute__ ((packed));10811082#define BT_HCI_CMD_READ_LOCAL_AMP_ASSOC 0x140a1083struct bt_hci_cmd_read_local_amp_assoc {1084uint8_t phy_handle;1085uint16_t len_so_far;1086uint16_t max_assoc_len;1087} __attribute__ ((packed));1088struct bt_hci_rsp_read_local_amp_assoc {1089uint8_t status;1090uint8_t phy_handle;1091uint16_t remain_assoc_len;1092uint8_t assoc_fragment[248];1093} __attribute__ ((packed));10941095#define BT_HCI_CMD_WRITE_REMOTE_AMP_ASSOC 0x140b1096struct bt_hci_cmd_write_remote_amp_assoc {1097uint8_t phy_handle;1098uint16_t len_so_far;1099uint16_t remain_assoc_len;1100uint8_t assoc_fragment[248];1101} __attribute__ ((packed));1102struct bt_hci_rsp_write_remote_amp_assoc {1103uint8_t status;1104uint8_t phy_handle;1105} __attribute__ ((packed));11061107#define BT_HCI_CMD_ENABLE_DUT_MODE 0x180311081109#define BT_HCI_CMD_LE_SET_EVENT_MASK 0x20011110struct bt_hci_cmd_le_set_event_mask {1111uint8_t mask[8];1112} __attribute__ ((packed));11131114#define BT_HCI_CMD_LE_READ_BUFFER_SIZE 0x20021115struct bt_hci_rsp_le_read_buffer_size {1116uint8_t status;1117uint16_t le_mtu;1118uint8_t le_max_pkt;1119} __attribute__ ((packed));11201121#define BT_HCI_CMD_LE_READ_LOCAL_FEATURES 0x20031122struct bt_hci_rsp_le_read_local_features {1123uint8_t status;1124uint8_t features[8];1125} __attribute__ ((packed));11261127#define BT_HCI_CMD_LE_SET_RANDOM_ADDRESS 0x20051128struct bt_hci_cmd_le_set_random_address {1129uint8_t addr[6];1130} __attribute__ ((packed));11311132#define BT_HCI_CMD_LE_SET_ADV_PARAMETERS 0x20061133struct bt_hci_cmd_le_set_adv_parameters {1134uint16_t min_interval;1135uint16_t max_interval;1136uint8_t type;1137uint8_t own_addr_type;1138uint8_t direct_addr_type;1139uint8_t direct_addr[6];1140uint8_t channel_map;1141uint8_t filter_policy;1142} __attribute__ ((packed));11431144#define BT_HCI_CMD_LE_READ_ADV_TX_POWER 0x20071145struct bt_hci_rsp_le_read_adv_tx_power {1146uint8_t status;1147int8_t level;1148} __attribute__ ((packed));11491150#define BT_HCI_CMD_LE_SET_ADV_DATA 0x20081151struct bt_hci_cmd_le_set_adv_data {1152uint8_t len;1153uint8_t data[31];1154} __attribute__ ((packed));11551156#define BT_HCI_CMD_LE_SET_SCAN_RSP_DATA 0x20091157struct bt_hci_cmd_le_set_scan_rsp_data {1158uint8_t len;1159uint8_t data[31];1160} __attribute__ ((packed));11611162#define BT_HCI_CMD_LE_SET_ADV_ENABLE 0x200a1163struct bt_hci_cmd_le_set_adv_enable {1164uint8_t enable;1165} __attribute__ ((packed));11661167#define BT_HCI_CMD_LE_SET_SCAN_PARAMETERS 0x200b1168struct bt_hci_cmd_le_set_scan_parameters {1169uint8_t type;1170uint16_t interval;1171uint16_t window;1172uint8_t own_addr_type;1173uint8_t filter_policy;1174} __attribute__ ((packed));11751176#define BT_HCI_CMD_LE_SET_SCAN_ENABLE 0x200c1177struct bt_hci_cmd_le_set_scan_enable {1178uint8_t enable;1179uint8_t filter_dup;1180} __attribute__ ((packed));11811182#define BT_HCI_CMD_LE_CREATE_CONN 0x200d1183struct bt_hci_cmd_le_create_conn {1184uint16_t scan_interval;1185uint16_t scan_window;1186uint8_t filter_policy;1187uint8_t peer_addr_type;1188uint8_t peer_addr[6];1189uint8_t own_addr_type;1190uint16_t min_interval;1191uint16_t max_interval;1192uint16_t latency;1193uint16_t supv_timeout;1194uint16_t min_length;1195uint16_t max_length;1196} __attribute__ ((packed));11971198#define BT_HCI_CMD_LE_CREATE_CONN_CANCEL 0x200e11991200#define BT_HCI_CMD_LE_READ_WHITE_LIST_SIZE 0x200f1201struct bt_hci_rsp_le_read_white_list_size {1202uint8_t status;1203uint8_t size;1204} __attribute__ ((packed));12051206#define BT_HCI_CMD_LE_CLEAR_WHITE_LIST 0x201012071208#define BT_HCI_CMD_LE_ADD_TO_WHITE_LIST 0x20111209struct bt_hci_cmd_le_add_to_white_list {1210uint8_t addr_type;1211uint8_t addr[6];1212} __attribute__ ((packed));12131214#define BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST 0x20121215struct bt_hci_cmd_le_remove_from_white_list {1216uint8_t addr_type;1217uint8_t addr[6];1218} __attribute__ ((packed));12191220#define BT_HCI_CMD_LE_CONN_UPDATE 0x20131221struct bt_hci_cmd_le_conn_update {1222uint16_t handle;1223uint16_t min_interval;1224uint16_t max_interval;1225uint16_t latency;1226uint16_t supv_timeout;1227uint16_t min_length;1228uint16_t max_length;1229} __attribute__ ((packed));12301231#define BT_HCI_CMD_LE_SET_HOST_CLASSIFICATION 0x20141232struct bt_hci_cmd_le_set_host_classification {1233uint8_t map[5];1234} __attribute__ ((packed));12351236#define BT_HCI_CMD_LE_READ_CHANNEL_MAP 0x20151237struct bt_hci_cmd_le_read_channel_map {1238uint16_t handle;1239} __attribute__ ((packed));1240struct bt_hci_rsp_le_read_channel_map {1241uint8_t status;1242uint16_t handle;1243uint8_t map[5];1244} __attribute__ ((packed));12451246#define BT_HCI_CMD_LE_READ_REMOTE_FEATURES 0x20161247struct bt_hci_cmd_le_read_remote_features {1248uint16_t handle;1249} __attribute__ ((packed));12501251#define BT_HCI_CMD_LE_ENCRYPT 0x20171252struct bt_hci_cmd_le_encrypt {1253uint8_t key[16];1254uint8_t plaintext[16];1255} __attribute__ ((packed));1256struct bt_hci_rsp_le_encrypt {1257uint8_t status;1258uint8_t data[16];1259} __attribute__ ((packed));12601261#define BT_HCI_CMD_LE_RAND 0x20181262struct bt_hci_rsp_le_rand {1263uint8_t status;1264uint8_t number[8];1265} __attribute__ ((packed));12661267#define BT_HCI_CMD_LE_START_ENCRYPT 0x20191268struct bt_hci_cmd_le_start_encrypt {1269uint16_t handle;1270uint8_t number[8];1271uint16_t diversifier;1272uint8_t ltk[16];1273} __attribute__ ((packed));12741275#define BT_HCI_CMD_LE_LTK_REQ_REPLY 0x201a1276struct bt_hci_cmd_le_ltk_req_reply {1277uint16_t handle;1278uint8_t ltk[16];1279} __attribute__ ((packed));1280struct bt_hci_rsp_le_ltk_req_reply {1281uint8_t status;1282uint16_t handle;1283} __attribute__ ((packed));12841285#define BT_HCI_CMD_LE_LTK_REQ_NEG_REPLY 0x201b1286struct bt_hci_cmd_le_ltk_req_neg_reply {1287uint16_t handle;1288} __attribute__ ((packed));1289struct bt_hci_rsp_le_ltk_req_neg_reply {1290uint8_t status;1291uint16_t handle;1292} __attribute__ ((packed));12931294#define BT_HCI_CMD_LE_READ_SUPPORTED_STATES 0x201c1295struct bt_hci_rsp_le_read_supported_states {1296uint8_t status;1297uint8_t states[8];1298} __attribute__ ((packed));12991300#define BT_HCI_CMD_LE_RECEIVER_TEST 0x201d1301struct bt_hci_cmd_le_receiver_test {1302uint8_t frequency;1303} __attribute__ ((packed));13041305#define BT_HCI_CMD_LE_TRANSMITTER_TEST 0x201e1306struct bt_hci_cmd_le_transmitter_test {1307uint8_t frequency;1308uint8_t data_len;1309uint8_t payload;1310} __attribute__ ((packed));13111312#define BT_HCI_CMD_LE_TEST_END 0x201f1313struct bt_hci_rsp_le_test_end {1314uint8_t status;1315uint16_t num_packets;1316} __attribute__ ((packed));13171318#define BT_HCI_EVT_INQUIRY_COMPLETE 0x011319struct bt_hci_evt_inquiry_complete {1320uint8_t status;1321} __attribute__ ((packed));13221323#define BT_HCI_EVT_INQUIRY_RESULT 0x021324struct bt_hci_evt_inquiry_result {1325uint8_t num_resp;1326uint8_t bdaddr[6];1327uint8_t pscan_rep_mode;1328uint8_t pscan_period_mode;1329uint8_t pscan_mode;1330uint8_t dev_class[3];1331uint16_t clock_offset;1332} __attribute__ ((packed));13331334#define BT_HCI_EVT_CONN_COMPLETE 0x031335struct bt_hci_evt_conn_complete {1336uint8_t status;1337uint16_t handle;1338uint8_t bdaddr[6];1339uint8_t link_type;1340uint8_t encr_mode;1341} __attribute__ ((packed));13421343#define BT_HCI_EVT_CONN_REQUEST 0x041344struct bt_hci_evt_conn_request {1345uint8_t bdaddr[6];1346uint8_t dev_class[3];1347uint8_t link_type;1348} __attribute__ ((packed));13491350#define BT_HCI_EVT_DISCONNECT_COMPLETE 0x051351struct bt_hci_evt_disconnect_complete {1352uint8_t status;1353uint16_t handle;1354uint8_t reason;1355} __attribute__ ((packed));13561357#define BT_HCI_EVT_AUTH_COMPLETE 0x061358struct bt_hci_evt_auth_complete {1359uint8_t status;1360uint16_t handle;1361} __attribute__ ((packed));13621363#define BT_HCI_EVT_REMOTE_NAME_REQUEST_COMPLETE 0x071364struct bt_hci_evt_remote_name_request_complete {1365uint8_t status;1366uint8_t bdaddr[6];1367uint8_t name[248];1368} __attribute__ ((packed));13691370#define BT_HCI_EVT_ENCRYPT_CHANGE 0x081371struct bt_hci_evt_encrypt_change {1372uint8_t status;1373uint16_t handle;1374uint8_t encr_mode;1375} __attribute__ ((packed));13761377#define BT_HCI_EVT_CHANGE_CONN_LINK_KEY_COMPLETE 0x091378struct bt_hci_evt_change_conn_link_key_complete {1379uint8_t status;1380uint16_t handle;1381} __attribute__ ((packed));13821383#define BT_HCI_EVT_MASTER_LINK_KEY_COMPLETE 0x0a1384struct bt_hci_evt_master_link_key_complete {1385uint8_t status;1386uint16_t handle;1387uint8_t key_flag;1388} __attribute__ ((packed));13891390#define BT_HCI_EVT_REMOTE_FEATURES_COMPLETE 0x0b1391struct bt_hci_evt_remote_features_complete {1392uint8_t status;1393uint16_t handle;1394uint8_t features[8];1395} __attribute__ ((packed));13961397#define BT_HCI_EVT_REMOTE_VERSION_COMPLETE 0x0c1398struct bt_hci_evt_remote_version_complete {1399uint8_t status;1400uint16_t handle;1401uint8_t lmp_ver;1402uint16_t manufacturer;1403uint16_t lmp_subver;1404} __attribute__ ((packed));14051406#define BT_HCI_EVT_QOS_SETUP_COMPLETE 0x0d1407struct bt_hci_evt_qos_setup_complete {1408uint8_t status;1409uint16_t handle;1410uint8_t flags;1411uint8_t service_type;1412uint32_t token_rate;1413uint32_t peak_bandwidth;1414uint32_t latency;1415uint32_t delay_variation;1416} __attribute__ ((packed));14171418#define BT_HCI_EVT_CMD_COMPLETE 0x0e1419struct bt_hci_evt_cmd_complete {1420uint8_t ncmd;1421uint16_t opcode;1422} __attribute__ ((packed));14231424#define BT_HCI_EVT_CMD_STATUS 0x0f1425struct bt_hci_evt_cmd_status {1426uint8_t status;1427uint8_t ncmd;1428uint16_t opcode;1429} __attribute__ ((packed));14301431#define BT_HCI_EVT_HARDWARE_ERROR 0x101432struct bt_hci_evt_hardware_error {1433uint8_t code;1434} __attribute__ ((packed));14351436#define BT_HCI_EVT_FLUSH_OCCURRED 0x111437struct bt_hci_evt_flush_occurred {1438uint16_t handle;1439} __attribute__ ((packed));14401441#define BT_HCI_EVT_ROLE_CHANGE 0x121442struct bt_hci_evt_role_change {1443uint8_t status;1444uint8_t bdaddr[6];1445uint8_t role;1446} __attribute__ ((packed));14471448#define BT_HCI_EVT_NUM_COMPLETED_PACKETS 0x131449struct bt_hci_evt_num_completed_packets {1450uint8_t num_handles;1451uint16_t handle;1452uint16_t count;1453} __attribute__ ((packed));14541455#define BT_HCI_EVT_MODE_CHANGE 0x141456struct bt_hci_evt_mode_change {1457uint8_t status;1458uint16_t handle;1459uint8_t mode;1460uint16_t interval;1461} __attribute__ ((packed));14621463#define BT_HCI_EVT_RETURN_LINK_KEYS 0x1514641465#define BT_HCI_EVT_PIN_CODE_REQUEST 0x161466struct bt_hci_evt_pin_code_request {1467uint8_t bdaddr[6];1468} __attribute__ ((packed));14691470#define BT_HCI_EVT_LINK_KEY_REQUEST 0x171471struct bt_hci_evt_link_key_request {1472uint8_t bdaddr[6];1473} __attribute__ ((packed));14741475#define BT_HCI_EVT_LINK_KEY_NOTIFY 0x181476struct bt_hci_evt_link_key_notify {1477uint8_t bdaddr[6];1478uint8_t link_key[16];1479uint8_t key_type;1480} __attribute__ ((packed));14811482#define BT_HCI_EVT_LOOPBACK_COMMAND 0x1914831484#define BT_HCI_EVT_DATA_BUFFER_OVERFLOW 0x1a1485struct bt_hci_evt_data_buffer_overflow {1486uint8_t link_type;1487} __attribute__ ((packed));14881489#define BT_HCI_EVT_MAX_SLOTS_CHANGE 0x1b1490struct bt_hci_evt_max_slots_change {1491uint16_t handle;1492uint8_t max_slots;1493} __attribute__ ((packed));14941495#define BT_HCI_EVT_CLOCK_OFFSET_COMPLETE 0x1c1496struct bt_hci_evt_clock_offset_complete {1497uint8_t status;1498uint16_t handle;1499uint16_t clock_offset;1500} __attribute__ ((packed));15011502#define BT_HCI_EVT_CONN_PKT_TYPE_CHANGED 0x1d1503struct bt_hci_evt_conn_pkt_type_changed {1504uint8_t status;1505uint16_t handle;1506uint16_t pkt_type;1507} __attribute__ ((packed));15081509#define BT_HCI_EVT_QOS_VIOLATION 0x1e1510struct bt_hci_evt_qos_violation {1511uint16_t handle;1512} __attribute__ ((packed));15131514#define BT_HCI_EVT_PSCAN_MODE_CHANGE 0x1f1515struct bt_hci_evt_pscan_mode_change {1516uint8_t bdaddr[6];1517uint8_t pscan_mode;1518} __attribute__ ((packed));15191520#define BT_HCI_EVT_PSCAN_REP_MODE_CHANGE 0x201521struct bt_hci_evt_pscan_rep_mode_change {1522uint8_t bdaddr[6];1523uint8_t pscan_rep_mode;1524} __attribute__ ((packed));15251526#define BT_HCI_EVT_FLOW_SPEC_COMPLETE 0x211527struct bt_hci_evt_flow_spec_complete {1528uint8_t status;1529uint16_t handle;1530uint8_t flags;1531uint8_t direction;1532uint8_t service_type;1533uint32_t token_rate;1534uint32_t token_bucket_size;1535uint32_t peak_bandwidth;1536uint32_t access_latency;1537} __attribute__ ((packed));15381539#define BT_HCI_EVT_INQUIRY_RESULT_WITH_RSSI 0x221540struct bt_hci_evt_inquiry_result_with_rssi {1541uint8_t num_resp;1542uint8_t bdaddr[6];1543uint8_t pscan_rep_mode;1544uint8_t pscan_period_mode;1545uint8_t dev_class[3];1546uint16_t clock_offset;1547int8_t rssi;1548} __attribute__ ((packed));15491550#define BT_HCI_EVT_REMOTE_EXT_FEATURES_COMPLETE 0x231551struct bt_hci_evt_remote_ext_features_complete {1552uint8_t status;1553uint16_t handle;1554uint8_t page;1555uint8_t max_page;1556uint8_t features[8];1557} __attribute__ ((packed));15581559#define BT_HCI_EVT_SYNC_CONN_COMPLETE 0x2c1560struct bt_hci_evt_sync_conn_complete {1561uint8_t status;1562uint16_t handle;1563uint8_t bdaddr[6];1564uint8_t link_type;1565uint8_t tx_interval;1566uint8_t retrans_window;1567uint16_t rx_pkt_len;1568uint16_t tx_pkt_len;1569uint8_t air_mode;1570} __attribute__ ((packed));15711572#define BT_HCI_EVT_SYNC_CONN_CHANGED 0x2d1573struct bt_hci_evt_sync_conn_changed {1574uint8_t status;1575uint16_t handle;1576uint8_t tx_interval;1577uint8_t retrans_window;1578uint16_t rx_pkt_len;1579uint16_t tx_pkt_len;1580} __attribute__ ((packed));15811582#define BT_HCI_EVT_SNIFF_SUBRATING 0x2e1583struct bt_hci_evt_sniff_subrating {1584uint8_t status;1585uint16_t handle;1586uint16_t max_tx_latency;1587uint16_t max_rx_latency;1588uint16_t min_remote_timeout;1589uint16_t min_local_timeout;1590} __attribute__ ((packed));15911592#define BT_HCI_EVT_EXT_INQUIRY_RESULT 0x2f1593struct bt_hci_evt_ext_inquiry_result {1594uint8_t num_resp;1595uint8_t bdaddr[6];1596uint8_t pscan_rep_mode;1597uint8_t pscan_period_mode;1598uint8_t dev_class[3];1599uint16_t clock_offset;1600int8_t rssi;1601uint8_t data[240];1602} __attribute__ ((packed));16031604#define BT_HCI_EVT_ENCRYPT_KEY_REFRESH_COMPLETE 0x301605struct bt_hci_evt_encrypt_key_refresh_complete {1606uint8_t status;1607uint16_t handle;1608} __attribute__ ((packed));16091610#define BT_HCI_EVT_IO_CAPABILITY_REQUEST 0x311611struct bt_hci_evt_io_capability_request {1612uint8_t bdaddr[6];1613} __attribute__ ((packed));16141615#define BT_HCI_EVT_IO_CAPABILITY_RESPONSE 0x321616struct bt_hci_evt_io_capability_response {1617uint8_t bdaddr[6];1618uint8_t capability;1619uint8_t oob_data;1620uint8_t authentication;1621} __attribute__ ((packed));16221623#define BT_HCI_EVT_USER_CONFIRM_REQUEST 0x331624struct bt_hci_evt_user_confirm_request {1625uint8_t bdaddr[6];1626uint32_t passkey;1627} __attribute__ ((packed));16281629#define BT_HCI_EVT_USER_PASSKEY_REQUEST 0x341630struct bt_hci_evt_user_passkey_request {1631uint8_t bdaddr[6];1632} __attribute__ ((packed));16331634#define BT_HCI_EVT_REMOTE_OOB_DATA_REQUEST 0x351635struct bt_hci_evt_remote_oob_data_request {1636uint8_t bdaddr[6];1637} __attribute__ ((packed));16381639#define BT_HCI_EVT_SIMPLE_PAIRING_COMPLETE 0x361640struct bt_hci_evt_simple_pairing_complete {1641uint8_t status;1642uint8_t bdaddr[6];1643} __attribute__ ((packed));16441645#define BT_HCI_EVT_LINK_SUPV_TIMEOUT_CHANGED 0x381646struct bt_hci_evt_link_supv_timeout_changed {1647uint16_t handle;1648uint16_t timeout;1649} __attribute__ ((packed));16501651#define BT_HCI_EVT_ENHANCED_FLUSH_COMPLETE 0x391652struct bt_hci_evt_enhanced_flush_complete {1653uint16_t handle;1654} __attribute__ ((packed));16551656#define BT_HCI_EVT_USER_PASSKEY_NOTIFY 0x3b1657struct bt_hci_evt_user_passkey_notify {1658uint8_t bdaddr[6];1659uint32_t passkey;1660} __attribute__ ((packed));16611662#define BT_HCI_EVT_KEYPRESS_NOTIFY 0x3c1663struct bt_hci_evt_keypress_notify {1664uint8_t bdaddr[6];1665uint8_t type;1666} __attribute__ ((packed));16671668#define BT_HCI_EVT_REMOTE_HOST_FEATURES_NOTIFY 0x3d1669struct bt_hci_evt_remote_host_features_notify {1670uint8_t bdaddr[6];1671uint8_t features[8];1672} __attribute__ ((packed));16731674#define BT_HCI_EVT_LE_META_EVENT 0x3e16751676#define BT_HCI_EVT_PHY_LINK_COMPLETE 0x401677struct bt_hci_evt_phy_link_complete {1678uint8_t status;1679uint8_t phy_handle;1680} __attribute__ ((packed));16811682#define BT_HCI_EVT_CHANNEL_SELECTED 0x411683struct bt_hci_evt_channel_selected {1684uint8_t phy_handle;1685} __attribute__ ((packed));16861687#define BT_HCI_EVT_DISCONN_PHY_LINK_COMPLETE 0x421688struct bt_hci_evt_disconn_phy_link_complete {1689uint8_t status;1690uint8_t phy_handle;1691uint8_t reason;1692} __attribute__ ((packed));16931694#define BT_HCI_EVT_PHY_LINK_LOSS_EARLY_WARNING 0x431695struct bt_hci_evt_phy_link_loss_early_warning {1696uint8_t phy_handle;1697uint8_t reason;1698} __attribute__ ((packed));16991700#define BT_HCI_EVT_PHY_LINK_RECOVERY 0x441701struct bt_hci_evt_phy_link_recovery {1702uint8_t phy_handle;1703} __attribute__ ((packed));17041705#define BT_HCI_EVT_LOGIC_LINK_COMPLETE 0x451706struct bt_hci_evt_logic_link_complete {1707uint8_t status;1708uint16_t handle;1709uint8_t phy_handle;1710uint8_t flow_spec;1711} __attribute__ ((packed));17121713#define BT_HCI_EVT_DISCONN_LOGIC_LINK_COMPLETE 0x461714struct bt_hci_evt_disconn_logic_link_complete {1715uint8_t status;1716uint16_t handle;1717uint8_t reason;1718} __attribute__ ((packed));17191720#define BT_HCI_EVT_FLOW_SPEC_MODIFY_COMPLETE 0x471721struct bt_hci_evt_flow_spec_modify_complete {1722uint8_t status;1723uint16_t handle;1724} __attribute__ ((packed));17251726#define BT_HCI_EVT_NUM_COMPLETED_DATA_BLOCKS 0x481727struct bt_hci_evt_num_completed_data_blocks {1728uint16_t total_num_blocks;1729uint8_t num_handles;1730uint16_t handle;1731uint16_t num_packets;1732uint16_t num_blocks;1733} __attribute__ ((packed));17341735#define BT_HCI_EVT_SHORT_RANGE_MODE_CHANGE 0x4c1736struct bt_hci_evt_short_range_mode_change {1737uint8_t status;1738uint8_t phy_handle;1739uint8_t mode;1740} __attribute__ ((packed));17411742#define BT_HCI_EVT_AMP_STATUS_CHANGE 0x4d1743struct bt_hci_evt_amp_status_change {1744uint8_t status;1745uint8_t amp_status;1746} __attribute__ ((packed));17471748#define BT_HCI_EVT_LE_CONN_COMPLETE 0x011749struct bt_hci_evt_le_conn_complete {1750uint8_t status;1751uint16_t handle;1752uint8_t role;1753uint8_t peer_addr_type;1754uint8_t peer_addr[6];1755uint16_t interval;1756uint16_t latency;1757uint16_t supv_timeout;1758uint8_t clock_accuracy;1759} __attribute__ ((packed));17601761#define BT_HCI_EVT_LE_ADV_REPORT 0x021762struct bt_hci_evt_le_adv_report {1763uint8_t num_reports;1764uint8_t event_type;1765uint8_t addr_type;1766uint8_t addr[6];1767uint8_t data_len;1768uint8_t data[0];1769} __attribute__ ((packed));17701771#define BT_HCI_EVT_LE_CONN_UPDATE_COMPLETE 0x031772struct bt_hci_evt_le_conn_update_complete {1773uint8_t status;1774uint16_t handle;1775uint16_t interval;1776uint16_t latency;1777uint16_t supv_timeout;1778} __attribute__ ((packed));17791780#define BT_HCI_EVT_LE_REMOTE_FEATURES_COMPLETE 0x041781struct bt_hci_evt_le_remote_features_complete {1782uint8_t status;1783uint16_t handle;1784uint8_t features[8];1785} __attribute__ ((packed));17861787#define BT_HCI_EVT_LE_LONG_TERM_KEY_REQUEST 0x051788struct bt_hci_evt_le_long_term_key_request {1789uint16_t handle;1790uint8_t number[8];1791uint16_t diversifier;1792} __attribute__ ((packed));17931794#define BT_HCI_ERR_SUCCESS 0x001795#define BT_HCI_ERR_UNKNOWN_COMMAND 0x011796#define BT_HCI_ERR_UNKNOWN_CONN_ID 0x021797#define BT_HCI_ERR_HARDWARE_FAILURE 0x031798#define BT_HCI_ERR_PAGE_TIMEOUT 0x041799#define BT_HCI_ERR_MEM_CAPACITY_EXCEEDED 0x071800#define BT_HCI_ERR_COMMAND_DISALLOWED 0x0c1801#define BT_HCI_ERR_UNSUPPORTED_FEATURE 0x111802#define BT_HCI_ERR_INVALID_PARAMETERS 0x121803#define BT_HCI_ERR_UNSPECIFIED_ERROR 0x1f1804#define BT_HCI_ERR_CONN_FAILED_TO_ESTABLISH 0x3e18051806struct bt_l2cap_hdr {1807uint16_t len;1808uint16_t cid;1809} __attribute__ ((packed));18101811struct bt_l2cap_hdr_sig {1812uint8_t code;1813uint8_t ident;1814uint16_t len;1815} __attribute__ ((packed));18161817#define BT_L2CAP_PDU_CMD_REJECT 0x011818struct bt_l2cap_pdu_cmd_reject {1819uint16_t reason;1820} __attribute__ ((packed));18211822#define BT_L2CAP_PDU_CONN_REQ 0x021823struct bt_l2cap_pdu_conn_req {1824uint16_t psm;1825uint16_t scid;1826} __attribute__ ((packed));18271828#define BT_L2CAP_PDU_CONN_RSP 0x031829struct bt_l2cap_pdu_conn_rsp {1830uint16_t dcid;1831uint16_t scid;1832uint16_t result;1833uint16_t status;1834} __attribute__ ((packed));18351836#define BT_L2CAP_PDU_CONFIG_REQ 0x041837struct bt_l2cap_pdu_config_req {1838uint16_t dcid;1839uint16_t flags;1840} __attribute__ ((packed));18411842#define BT_L2CAP_PDU_CONFIG_RSP 0x051843struct bt_l2cap_pdu_config_rsp {1844uint16_t scid;1845uint16_t flags;1846uint16_t result;1847} __attribute__ ((packed));18481849#define BT_L2CAP_PDU_DISCONN_REQ 0x061850struct bt_l2cap_pdu_disconn_req {1851uint16_t dcid;1852uint16_t scid;1853} __attribute__ ((packed));18541855#define BT_L2CAP_PDU_DISCONN_RSP 0x071856struct bt_l2cap_pdu_disconn_rsp {1857uint16_t dcid;1858uint16_t scid;1859} __attribute__ ((packed));18601861#define BT_L2CAP_PDU_ECHO_REQ 0x0818621863#define BT_L2CAP_PDU_ECHO_RSP 0x0918641865#define BT_L2CAP_PDU_INFO_REQ 0x0a1866struct bt_l2cap_pdu_info_req {1867uint16_t type;1868} __attribute__ ((packed));18691870#define BT_L2CAP_PDU_INFO_RSP 0x0b1871struct bt_l2cap_pdu_info_rsp {1872uint16_t type;1873uint16_t result;1874} __attribute__ ((packed));18751876#define BT_L2CAP_PDU_CREATE_CHAN_REQ 0x0c1877struct bt_l2cap_pdu_create_chan_req {1878uint16_t psm;1879uint16_t scid;1880uint8_t ctrlid;1881} __attribute__ ((packed));18821883#define BT_L2CAP_PDU_CREATE_CHAN_RSP 0x0d1884struct bt_l2cap_pdu_create_chan_rsp {1885uint16_t dcid;1886uint16_t scid;1887uint16_t result;1888uint16_t status;1889} __attribute__ ((packed));18901891#define BT_L2CAP_PDU_MOVE_CHAN_REQ 0x0e1892struct bt_l2cap_pdu_move_chan_req {1893uint16_t icid;1894uint8_t ctrlid;1895} __attribute__ ((packed));18961897#define BT_L2CAP_PDU_MOVE_CHAN_RSP 0x0f1898struct bt_l2cap_pdu_move_chan_rsp {1899uint16_t icid;1900uint16_t result;1901} __attribute__ ((packed));19021903#define BT_L2CAP_PDU_MOVE_CHAN_CFM 0x101904struct bt_l2cap_pdu_move_chan_cfm {1905uint16_t icid;1906uint16_t result;1907} __attribute__ ((packed));19081909#define BT_L2CAP_PDU_MOVE_CHAN_CFM_RSP 0x111910struct bt_l2cap_pdu_move_chan_cfm_rsp {1911uint16_t icid;1912} __attribute__ ((packed));19131914#define BT_L2CAP_PDU_CONN_PARAM_REQ 0x121915struct bt_l2cap_pdu_conn_param_req {1916uint16_t min_interval;1917uint16_t max_interval;1918uint16_t latency;1919uint16_t timeout;1920} __attribute__ ((packed));19211922#define BT_L2CAP_PDU_CONN_PARAM_RSP 0x131923struct bt_l2cap_pdu_conn_param_rsp {1924uint16_t result;1925} __attribute__ ((packed));19261927struct bt_l2cap_hdr_connless {1928uint16_t psm;1929} __attribute__ ((packed));19301931struct bt_l2cap_hdr_amp {1932uint8_t code;1933uint8_t ident;1934uint16_t len;1935} __attribute__ ((packed));19361937#define BT_L2CAP_AMP_CMD_REJECT 0x011938struct bt_l2cap_amp_cmd_reject {1939uint16_t reason;1940} __attribute__ ((packed));19411942#define BT_L2CAP_AMP_DISCOVER_REQ 0x021943struct bt_l2cap_amp_discover_req {1944uint16_t size;1945uint16_t features;1946} __attribute__ ((packed));19471948#define BT_L2CAP_AMP_DISCOVER_RSP 0x031949struct bt_l2cap_amp_discover_rsp {1950uint16_t size;1951uint16_t features;1952} __attribute__ ((packed));19531954#define BT_L2CAP_AMP_CHANGE_NOTIFY 0x0419551956#define BT_L2CAP_AMP_CHANGE_RESPONSE 0x0519571958#define BT_L2CAP_AMP_GET_INFO_REQ 0x061959struct bt_l2cap_amp_get_info_req {1960uint8_t ctrlid;1961} __attribute__ ((packed));19621963#define BT_L2CAP_AMP_GET_INFO_RSP 0x071964struct bt_l2cap_amp_get_info_rsp {1965uint8_t ctrlid;1966uint8_t status;1967uint32_t total_bw;1968uint32_t max_bw;1969uint32_t min_latency;1970uint16_t pal_cap;1971uint16_t max_assoc_len;1972} __attribute__ ((packed));19731974#define BT_L2CAP_AMP_GET_ASSOC_REQ 0x081975struct bt_l2cap_amp_get_assoc_req {1976uint8_t ctrlid;1977} __attribute__ ((packed));19781979#define BT_L2CAP_AMP_GET_ASSOC_RSP 0x091980struct bt_l2cap_amp_get_assoc_rsp {1981uint8_t ctrlid;1982uint8_t status;1983} __attribute__ ((packed));19841985#define BT_L2CAP_AMP_CREATE_PHY_LINK_REQ 0x0a1986struct bt_l2cap_amp_create_phy_link_req {1987uint8_t local_ctrlid;1988uint8_t remote_ctrlid;1989} __attribute__ ((packed));19901991#define BT_L2CAP_AMP_CREATE_PHY_LINK_RSP 0x0b1992struct bt_l2cap_amp_create_phy_link_rsp {1993uint8_t local_ctrlid;1994uint8_t remote_ctrlid;1995uint8_t status;1996} __attribute__ ((packed));19971998#define BT_L2CAP_AMP_DISCONN_PHY_LINK_REQ 0x0c1999struct bt_l2cap_amp_disconn_phy_link_req {2000uint8_t local_ctrlid;2001uint8_t remote_ctrlid;2002} __attribute__ ((packed));20032004#define BT_L2CAP_AMP_DISCONN_PHY_LINK_RSP 0x0d2005struct bt_l2cap_amp_disconn_phy_link_rsp {2006uint8_t local_ctrlid;2007uint8_t remote_ctrlid;2008uint8_t status;2009} __attribute__ ((packed));20102011struct bt_l2cap_hdr_att {2012uint8_t code;2013} __attribute__ ((packed));20142015#define BT_L2CAP_ATT_ERROR_RESPONSE 0x012016struct bt_l2cap_att_error_response {2017uint8_t request;2018uint16_t handle;2019uint8_t error;2020} __attribute__ ((packed));20212022#define BT_L2CAP_ATT_EXCHANGE_MTU_REQ 0x022023struct bt_l2cap_att_exchange_mtu_req {2024uint16_t mtu;2025} __attribute__ ((packed));20262027#define BT_L2CAP_ATT_EXCHANGE_MTU_RSP 0x032028struct bt_l2cap_att_exchange_mtu_rsp {2029uint16_t mtu;2030} __attribute__ ((packed));20312032#define BT_L2CAP_ATT_READ_TYPE_REQ 0x082033struct bt_l2cap_att_read_type_req {2034uint16_t start_handle;2035uint16_t end_handle;2036} __attribute__ ((packed));20372038#define BT_L2CAP_ATT_READ_TYPE_RSP 0x092039struct bt_l2cap_att_read_type_rsp {2040uint8_t length;2041} __attribute__ ((packed));20422043#define BT_L2CAP_ATT_READ_REQ 0x0a2044struct bt_l2cap_att_read_req {2045uint16_t handle;2046} __attribute__ ((packed));20472048#define BT_L2CAP_ATT_READ_RSP 0x0b20492050#define BT_L2CAP_ATT_READ_GROUP_TYPE_REQ 0x102051struct bt_l2cap_att_read_group_type_req {2052uint16_t start_handle;2053uint16_t end_handle;2054} __attribute__ ((packed));20552056#define BT_L2CAP_ATT_READ_GROUP_TYPE_RSP 0x112057struct bt_l2cap_att_read_group_type_rsp {2058uint8_t length;2059} __attribute__ ((packed));20602061#define BT_L2CAP_ATT_HANDLE_VALUE_NOTIFY 0x1b2062struct bt_l2cap_att_handle_value_notify {2063uint16_t handle;2064} __attribute__ ((packed));20652066#define BT_L2CAP_ATT_HANDLE_VALUE_IND 0x1d2067struct bt_l2cap_att_handle_value_ind {2068uint16_t handle;2069} __attribute__ ((packed));20702071#define BT_L2CAP_ATT_HANDLE_VALUE_CONF 0x1e20722073struct bt_l2cap_hdr_smp {2074uint8_t code;2075} __attribute__ ((packed));20762077#define BT_L2CAP_SMP_PAIRING_REQUEST 0x012078struct bt_l2cap_smp_pairing_request {2079uint8_t io_capa;2080uint8_t oob_data;2081uint8_t auth_req;2082uint8_t max_key_size;2083uint8_t init_key_dist;2084uint8_t resp_key_dist;2085} __attribute__ ((packed));20862087#define BT_L2CAP_SMP_PAIRING_RESPONSE 0x022088struct bt_l2cap_smp_pairing_response {2089uint8_t io_capa;2090uint8_t oob_data;2091uint8_t auth_req;2092uint8_t max_key_size;2093uint8_t init_key_dist;2094uint8_t resp_key_dist;2095} __attribute__ ((packed));20962097#define BT_L2CAP_SMP_PAIRING_CONFIRM 0x032098struct bt_l2cap_smp_pairing_confirm {2099uint8_t value[16];2100} __attribute__ ((packed));21012102#define BT_L2CAP_SMP_PAIRING_RANDOM 0x042103struct bt_l2cap_smp_pairing_random {2104uint8_t value[16];2105} __attribute__ ((packed));21062107#define BT_L2CAP_SMP_PAIRING_FAILED 0x052108struct bt_l2cap_smp_pairing_failed {2109uint8_t reason;2110} __attribute__ ((packed));21112112#define BT_L2CAP_SMP_ENCRYPT_INFO 0x062113struct bt_l2cap_smp_encrypt_info {2114uint8_t ltk[16];2115} __attribute__ ((packed));21162117#define BT_L2CAP_SMP_MASTER_IDENT 0x072118struct bt_l2cap_smp_master_ident {2119uint16_t ediv;2120uint64_t rand;2121} __attribute__ ((packed));21222123#define BT_L2CAP_SMP_IDENT_INFO 0x082124struct bt_l2cap_smp_ident_info {2125uint8_t irk[16];2126} __attribute__ ((packed));21272128#define BT_L2CAP_SMP_IDENT_ADDR_INFO 0x092129struct bt_l2cap_smp_ident_addr_info {2130uint8_t addr_type;2131uint8_t addr[6];2132} __attribute__ ((packed));21332134#define BT_L2CAP_SMP_SIGNING_INFO 0x0a2135struct bt_l2cap_smp_signing_info {2136uint8_t csrk[16];2137} __attribute__ ((packed));21382139#define BT_L2CAP_SMP_SECURITY_REQUEST 0x0b2140struct bt_l2cap_smp_security_request {2141uint8_t auth_req;2142} __attribute__ ((packed));21432144struct bt_sdp_hdr {2145uint8_t pdu;2146uint16_t tid;2147uint16_t plen;2148} __attribute__ ((packed));214921502151