Home | History | Annotate | Download | only in bluetooth
      1 /****************************************************************************
      2  ****************************************************************************
      3  ***
      4  ***   This header was automatically generated from a Bluez header
      5  ***   of the same name, to make information necessary for userspace to
      6  ***   call into the kernel available to Android. It contains only constants,
      7  ***   structures, and macros generated from the original header, and thus,
      8  ***   contains no copyrightable information.
      9  ***
     10  ***   To edit the content of this header, modify the corresponding
     11  ***   source file (e.g. under external/kernel-headers/original/) then
     12  ***   run bionic/libc/kernel/tools/update_all.py
     13  ***
     14  ***   Any manual change here will be lost the next time this script will
     15  ***   be run. You've been warned!
     16  ***
     17  ****************************************************************************
     18  ****************************************************************************/
     19 #ifndef __HCI_H
     20 #define __HCI_H
     21 #ifdef __cplusplus
     22 #endif
     23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     24 #include <sys/socket.h>
     25 #define HCI_MAX_DEV 16
     26 #define HCI_MAX_ACL_SIZE 1024
     27 #define HCI_MAX_SCO_SIZE 255
     28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     29 #define HCI_MAX_EVENT_SIZE 260
     30 #define HCI_MAX_FRAME_SIZE (HCI_MAX_ACL_SIZE + 4)
     31 #define HCI_DEV_REG 1
     32 #define HCI_DEV_UNREG 2
     33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     34 #define HCI_DEV_UP 3
     35 #define HCI_DEV_DOWN 4
     36 #define HCI_DEV_SUSPEND 5
     37 #define HCI_DEV_RESUME 6
     38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     39 #define HCI_VIRTUAL 0
     40 #define HCI_USB 1
     41 #define HCI_PCCARD 2
     42 #define HCI_UART 3
     43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     44 #define HCI_RS232 4
     45 #define HCI_PCI 5
     46 #define HCI_SDIO 6
     47 #define HCI_BREDR 0x00
     48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     49 #define HCI_AMP 0x01
     50 enum {
     51  HCI_UP,
     52  HCI_INIT,
     53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     54  HCI_RUNNING,
     55  HCI_PSCAN,
     56  HCI_ISCAN,
     57  HCI_AUTH,
     58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     59  HCI_ENCRYPT,
     60  HCI_INQUIRY,
     61  HCI_RAW,
     62 };
     63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     64 #define HCIDEVUP _IOW('H', 201, int)
     65 #define HCIDEVDOWN _IOW('H', 202, int)
     66 #define HCIDEVRESET _IOW('H', 203, int)
     67 #define HCIDEVRESTAT _IOW('H', 204, int)
     68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     69 #define HCIGETDEVLIST _IOR('H', 210, int)
     70 #define HCIGETDEVINFO _IOR('H', 211, int)
     71 #define HCIGETCONNLIST _IOR('H', 212, int)
     72 #define HCIGETCONNINFO _IOR('H', 213, int)
     73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     74 #define HCIGETAUTHINFO _IOR('H', 215, int)
     75 #define HCISETRAW _IOW('H', 220, int)
     76 #define HCISETSCAN _IOW('H', 221, int)
     77 #define HCISETAUTH _IOW('H', 222, int)
     78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     79 #define HCISETENCRYPT _IOW('H', 223, int)
     80 #define HCISETPTYPE _IOW('H', 224, int)
     81 #define HCISETLINKPOL _IOW('H', 225, int)
     82 #define HCISETLINKMODE _IOW('H', 226, int)
     83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     84 #define HCISETACLMTU _IOW('H', 227, int)
     85 #define HCISETSCOMTU _IOW('H', 228, int)
     86 #define HCIBLOCKADDR _IOW('H', 230, int)
     87 #define HCIUNBLOCKADDR _IOW('H', 231, int)
     88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     89 #define HCIINQUIRY _IOR('H', 240, int)
     90 #ifndef __NO_HCI_DEFS
     91 #define HCI_COMMAND_PKT 0x01
     92 #define HCI_ACLDATA_PKT 0x02
     93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     94 #define HCI_SCODATA_PKT 0x03
     95 #define HCI_EVENT_PKT 0x04
     96 #define HCI_VENDOR_PKT 0xff
     97 #define HCI_2DH1 0x0002
     98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     99 #define HCI_3DH1 0x0004
    100 #define HCI_DM1 0x0008
    101 #define HCI_DH1 0x0010
    102 #define HCI_2DH3 0x0100
    103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    104 #define HCI_3DH3 0x0200
    105 #define HCI_DM3 0x0400
    106 #define HCI_DH3 0x0800
    107 #define HCI_2DH5 0x1000
    108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    109 #define HCI_3DH5 0x2000
    110 #define HCI_DM5 0x4000
    111 #define HCI_DH5 0x8000
    112 #define HCI_HV1 0x0020
    113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    114 #define HCI_HV2 0x0040
    115 #define HCI_HV3 0x0080
    116 #define HCI_EV3 0x0008
    117 #define HCI_EV4 0x0010
    118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    119 #define HCI_EV5 0x0020
    120 #define HCI_2EV3 0x0040
    121 #define HCI_3EV3 0x0080
    122 #define HCI_2EV5 0x0100
    123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    124 #define HCI_3EV5 0x0200
    125 #define SCO_PTYPE_MASK (HCI_HV1 | HCI_HV2 | HCI_HV3)
    126 #define ACL_PTYPE_MASK (HCI_DM1 | HCI_DH1 | HCI_DM3 | HCI_DH3 | HCI_DM5 | HCI_DH5)
    127 #define ESCO_HV1 0x0001
    128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    129 #define ESCO_HV2 0x0002
    130 #define ESCO_HV3 0x0004
    131 #define ESCO_EV3 0x0008
    132 #define ESCO_EV4 0x0010
    133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    134 #define ESCO_EV5 0x0020
    135 #define ESCO_2EV3 0x0040
    136 #define ESCO_3EV3 0x0080
    137 #define ESCO_2EV5 0x0100
    138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    139 #define ESCO_3EV5 0x0200
    140 #define SCO_ESCO_MASK (ESCO_HV1 | ESCO_HV2 | ESCO_HV3)
    141 #define EDR_ESCO_MASK (ESCO_2EV3 | ESCO_3EV3 | ESCO_2EV5 | ESCO_3EV5)
    142 #define ALL_ESCO_MASK (SCO_ESCO_MASK | ESCO_EV3 | ESCO_EV4 | ESCO_EV5 |   EDR_ESCO_MASK)
    143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    144 #define HCI_UNKNOWN_COMMAND 0x01
    145 #define HCI_NO_CONNECTION 0x02
    146 #define HCI_HARDWARE_FAILURE 0x03
    147 #define HCI_PAGE_TIMEOUT 0x04
    148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    149 #define HCI_AUTHENTICATION_FAILURE 0x05
    150 #define HCI_PIN_OR_KEY_MISSING 0x06
    151 #define HCI_MEMORY_FULL 0x07
    152 #define HCI_CONNECTION_TIMEOUT 0x08
    153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    154 #define HCI_MAX_NUMBER_OF_CONNECTIONS 0x09
    155 #define HCI_MAX_NUMBER_OF_SCO_CONNECTIONS 0x0a
    156 #define HCI_ACL_CONNECTION_EXISTS 0x0b
    157 #define HCI_COMMAND_DISALLOWED 0x0c
    158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    159 #define HCI_REJECTED_LIMITED_RESOURCES 0x0d
    160 #define HCI_REJECTED_SECURITY 0x0e
    161 #define HCI_REJECTED_PERSONAL 0x0f
    162 #define HCI_HOST_TIMEOUT 0x10
    163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    164 #define HCI_UNSUPPORTED_FEATURE 0x11
    165 #define HCI_INVALID_PARAMETERS 0x12
    166 #define HCI_OE_USER_ENDED_CONNECTION 0x13
    167 #define HCI_OE_LOW_RESOURCES 0x14
    168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    169 #define HCI_OE_POWER_OFF 0x15
    170 #define HCI_CONNECTION_TERMINATED 0x16
    171 #define HCI_REPEATED_ATTEMPTS 0x17
    172 #define HCI_PAIRING_NOT_ALLOWED 0x18
    173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    174 #define HCI_UNKNOWN_LMP_PDU 0x19
    175 #define HCI_UNSUPPORTED_REMOTE_FEATURE 0x1a
    176 #define HCI_SCO_OFFSET_REJECTED 0x1b
    177 #define HCI_SCO_INTERVAL_REJECTED 0x1c
    178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    179 #define HCI_AIR_MODE_REJECTED 0x1d
    180 #define HCI_INVALID_LMP_PARAMETERS 0x1e
    181 #define HCI_UNSPECIFIED_ERROR 0x1f
    182 #define HCI_UNSUPPORTED_LMP_PARAMETER_VALUE 0x20
    183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    184 #define HCI_ROLE_CHANGE_NOT_ALLOWED 0x21
    185 #define HCI_LMP_RESPONSE_TIMEOUT 0x22
    186 #define HCI_LMP_ERROR_TRANSACTION_COLLISION 0x23
    187 #define HCI_LMP_PDU_NOT_ALLOWED 0x24
    188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    189 #define HCI_ENCRYPTION_MODE_NOT_ACCEPTED 0x25
    190 #define HCI_UNIT_LINK_KEY_USED 0x26
    191 #define HCI_QOS_NOT_SUPPORTED 0x27
    192 #define HCI_INSTANT_PASSED 0x28
    193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    194 #define HCI_PAIRING_NOT_SUPPORTED 0x29
    195 #define HCI_TRANSACTION_COLLISION 0x2a
    196 #define HCI_QOS_UNACCEPTABLE_PARAMETER 0x2c
    197 #define HCI_QOS_REJECTED 0x2d
    198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    199 #define HCI_CLASSIFICATION_NOT_SUPPORTED 0x2e
    200 #define HCI_INSUFFICIENT_SECURITY 0x2f
    201 #define HCI_PARAMETER_OUT_OF_RANGE 0x30
    202 #define HCI_ROLE_SWITCH_PENDING 0x32
    203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    204 #define HCI_SLOT_VIOLATION 0x34
    205 #define HCI_ROLE_SWITCH_FAILED 0x35
    206 #define HCI_EIR_TOO_LARGE 0x36
    207 #define HCI_SIMPLE_PAIRING_NOT_SUPPORTED 0x37
    208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    209 #define HCI_HOST_BUSY_PAIRING 0x38
    210 #define ACL_START_NO_FLUSH 0x00
    211 #define ACL_CONT 0x01
    212 #define ACL_START 0x02
    213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    214 #define ACL_ACTIVE_BCAST 0x04
    215 #define ACL_PICO_BCAST 0x08
    216 #define SCO_LINK 0x00
    217 #define ACL_LINK 0x01
    218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    219 #define ESCO_LINK 0x02
    220 #define LMP_3SLOT 0x01
    221 #define LMP_5SLOT 0x02
    222 #define LMP_ENCRYPT 0x04
    223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    224 #define LMP_SOFFSET 0x08
    225 #define LMP_TACCURACY 0x10
    226 #define LMP_RSWITCH 0x20
    227 #define LMP_HOLD 0x40
    228 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    229 #define LMP_SNIFF 0x80
    230 #define LMP_PARK 0x01
    231 #define LMP_RSSI 0x02
    232 #define LMP_QUALITY 0x04
    233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    234 #define LMP_SCO 0x08
    235 #define LMP_HV2 0x10
    236 #define LMP_HV3 0x20
    237 #define LMP_ULAW 0x40
    238 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    239 #define LMP_ALAW 0x80
    240 #define LMP_CVSD 0x01
    241 #define LMP_PSCHEME 0x02
    242 #define LMP_PCONTROL 0x04
    243 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    244 #define LMP_TRSP_SCO 0x08
    245 #define LMP_BCAST_ENC 0x80
    246 #define LMP_EDR_ACL_2M 0x02
    247 #define LMP_EDR_ACL_3M 0x04
    248 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    249 #define LMP_ENH_ISCAN 0x08
    250 #define LMP_ILACE_ISCAN 0x10
    251 #define LMP_ILACE_PSCAN 0x20
    252 #define LMP_RSSI_INQ 0x40
    253 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    254 #define LMP_ESCO 0x80
    255 #define LMP_EV4 0x01
    256 #define LMP_EV5 0x02
    257 #define LMP_AFH_CAP_SLV 0x08
    258 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    259 #define LMP_AFH_CLS_SLV 0x10
    260 #define LMP_NO_BREDR 0x20
    261 #define LMP_LE 0x40
    262 #define LMP_EDR_3SLOT 0x80
    263 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    264 #define LMP_EDR_5SLOT 0x01
    265 #define LMP_SNIFF_SUBR 0x02
    266 #define LMP_PAUSE_ENC 0x04
    267 #define LMP_AFH_CAP_MST 0x08
    268 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    269 #define LMP_AFH_CLS_MST 0x10
    270 #define LMP_EDR_ESCO_2M 0x20
    271 #define LMP_EDR_ESCO_3M 0x40
    272 #define LMP_EDR_3S_ESCO 0x80
    273 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    274 #define LMP_EXT_INQ 0x01
    275 #define LMP_LE_BREDR 0x02
    276 #define LMP_SIMPLE_PAIR 0x08
    277 #define LMP_ENCAPS_PDU 0x10
    278 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    279 #define LMP_ERR_DAT_REP 0x20
    280 #define LMP_NFLUSH_PKTS 0x40
    281 #define LMP_LSTO 0x01
    282 #define LMP_INQ_TX_PWR 0x02
    283 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    284 #define LMP_EPC 0x04
    285 #define LMP_EXT_FEAT 0x80
    286 #define LMP_HOST_LE 0x02
    287 #define HCI_LP_RSWITCH 0x0001
    288 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    289 #define HCI_LP_HOLD 0x0002
    290 #define HCI_LP_SNIFF 0x0004
    291 #define HCI_LP_PARK 0x0008
    292 #define HCI_LM_ACCEPT 0x8000
    293 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    294 #define HCI_LM_MASTER 0x0001
    295 #define HCI_LM_AUTH 0x0002
    296 #define HCI_LM_ENCRYPT 0x0004
    297 #define HCI_LM_TRUSTED 0x0008
    298 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    299 #define HCI_LM_RELIABLE 0x0010
    300 #define HCI_LM_SECURE 0x0020
    301 #define OGF_LINK_CTL 0x01
    302 #define OCF_INQUIRY 0x0001
    303 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    304 typedef struct {
    305  uint8_t lap[3];
    306  uint8_t length;
    307  uint8_t num_rsp;
    308 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    309 } __attribute__ ((packed)) inquiry_cp;
    310 #define INQUIRY_CP_SIZE 5
    311 typedef struct {
    312  uint8_t status;
    313 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    314  bdaddr_t bdaddr;
    315 } __attribute__ ((packed)) status_bdaddr_rp;
    316 #define STATUS_BDADDR_RP_SIZE 7
    317 #define OCF_INQUIRY_CANCEL 0x0002
    318 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    319 #define OCF_PERIODIC_INQUIRY 0x0003
    320 typedef struct {
    321  uint16_t max_period;
    322  uint16_t min_period;
    323 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    324  uint8_t lap[3];
    325  uint8_t length;
    326  uint8_t num_rsp;
    327 } __attribute__ ((packed)) periodic_inquiry_cp;
    328 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    329 #define PERIODIC_INQUIRY_CP_SIZE 9
    330 #define OCF_EXIT_PERIODIC_INQUIRY 0x0004
    331 #define OCF_CREATE_CONN 0x0005
    332 typedef struct {
    333 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    334  bdaddr_t bdaddr;
    335  uint16_t pkt_type;
    336  uint8_t pscan_rep_mode;
    337  uint8_t pscan_mode;
    338 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    339  uint16_t clock_offset;
    340  uint8_t role_switch;
    341 } __attribute__ ((packed)) create_conn_cp;
    342 #define CREATE_CONN_CP_SIZE 13
    343 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    344 #define OCF_DISCONNECT 0x0006
    345 typedef struct {
    346  uint16_t handle;
    347  uint8_t reason;
    348 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    349 } __attribute__ ((packed)) disconnect_cp;
    350 #define DISCONNECT_CP_SIZE 3
    351 #define OCF_ADD_SCO 0x0007
    352 typedef struct {
    353 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    354  uint16_t handle;
    355  uint16_t pkt_type;
    356 } __attribute__ ((packed)) add_sco_cp;
    357 #define ADD_SCO_CP_SIZE 4
    358 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    359 #define OCF_CREATE_CONN_CANCEL 0x0008
    360 typedef struct {
    361  bdaddr_t bdaddr;
    362 } __attribute__ ((packed)) create_conn_cancel_cp;
    363 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    364 #define CREATE_CONN_CANCEL_CP_SIZE 6
    365 #define OCF_ACCEPT_CONN_REQ 0x0009
    366 typedef struct {
    367  bdaddr_t bdaddr;
    368 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    369  uint8_t role;
    370 } __attribute__ ((packed)) accept_conn_req_cp;
    371 #define ACCEPT_CONN_REQ_CP_SIZE 7
    372 #define OCF_REJECT_CONN_REQ 0x000A
    373 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    374 typedef struct {
    375  bdaddr_t bdaddr;
    376  uint8_t reason;
    377 } __attribute__ ((packed)) reject_conn_req_cp;
    378 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    379 #define REJECT_CONN_REQ_CP_SIZE 7
    380 #define OCF_LINK_KEY_REPLY 0x000B
    381 typedef struct {
    382  bdaddr_t bdaddr;
    383 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    384  uint8_t link_key[16];
    385 } __attribute__ ((packed)) link_key_reply_cp;
    386 #define LINK_KEY_REPLY_CP_SIZE 22
    387 #define OCF_LINK_KEY_NEG_REPLY 0x000C
    388 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    389 #define OCF_PIN_CODE_REPLY 0x000D
    390 typedef struct {
    391  bdaddr_t bdaddr;
    392  uint8_t pin_len;
    393 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    394  uint8_t pin_code[16];
    395 } __attribute__ ((packed)) pin_code_reply_cp;
    396 #define PIN_CODE_REPLY_CP_SIZE 23
    397 #define OCF_PIN_CODE_NEG_REPLY 0x000E
    398 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    399 #define OCF_SET_CONN_PTYPE 0x000F
    400 typedef struct {
    401  uint16_t handle;
    402  uint16_t pkt_type;
    403 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    404 } __attribute__ ((packed)) set_conn_ptype_cp;
    405 #define SET_CONN_PTYPE_CP_SIZE 4
    406 #define OCF_AUTH_REQUESTED 0x0011
    407 typedef struct {
    408 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    409  uint16_t handle;
    410 } __attribute__ ((packed)) auth_requested_cp;
    411 #define AUTH_REQUESTED_CP_SIZE 2
    412 #define OCF_SET_CONN_ENCRYPT 0x0013
    413 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    414 typedef struct {
    415  uint16_t handle;
    416  uint8_t encrypt;
    417 } __attribute__ ((packed)) set_conn_encrypt_cp;
    418 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    419 #define SET_CONN_ENCRYPT_CP_SIZE 3
    420 #define OCF_CHANGE_CONN_LINK_KEY 0x0015
    421 typedef struct {
    422  uint16_t handle;
    423 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    424 } __attribute__ ((packed)) change_conn_link_key_cp;
    425 #define CHANGE_CONN_LINK_KEY_CP_SIZE 2
    426 #define OCF_MASTER_LINK_KEY 0x0017
    427 typedef struct {
    428 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    429  uint8_t key_flag;
    430 } __attribute__ ((packed)) master_link_key_cp;
    431 #define MASTER_LINK_KEY_CP_SIZE 1
    432 #define OCF_REMOTE_NAME_REQ 0x0019
    433 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    434 typedef struct {
    435  bdaddr_t bdaddr;
    436  uint8_t pscan_rep_mode;
    437  uint8_t pscan_mode;
    438 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    439  uint16_t clock_offset;
    440 } __attribute__ ((packed)) remote_name_req_cp;
    441 #define REMOTE_NAME_REQ_CP_SIZE 10
    442 #define OCF_REMOTE_NAME_REQ_CANCEL 0x001A
    443 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    444 typedef struct {
    445  bdaddr_t bdaddr;
    446 } __attribute__ ((packed)) remote_name_req_cancel_cp;
    447 #define REMOTE_NAME_REQ_CANCEL_CP_SIZE 6
    448 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    449 #define OCF_READ_REMOTE_FEATURES 0x001B
    450 typedef struct {
    451  uint16_t handle;
    452 } __attribute__ ((packed)) read_remote_features_cp;
    453 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    454 #define READ_REMOTE_FEATURES_CP_SIZE 2
    455 #define OCF_READ_REMOTE_EXT_FEATURES 0x001C
    456 typedef struct {
    457  uint16_t handle;
    458 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    459  uint8_t page_num;
    460 } __attribute__ ((packed)) read_remote_ext_features_cp;
    461 #define READ_REMOTE_EXT_FEATURES_CP_SIZE 3
    462 #define OCF_READ_REMOTE_VERSION 0x001D
    463 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    464 typedef struct {
    465  uint16_t handle;
    466 } __attribute__ ((packed)) read_remote_version_cp;
    467 #define READ_REMOTE_VERSION_CP_SIZE 2
    468 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    469 #define OCF_READ_CLOCK_OFFSET 0x001F
    470 typedef struct {
    471  uint16_t handle;
    472 } __attribute__ ((packed)) read_clock_offset_cp;
    473 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    474 #define READ_CLOCK_OFFSET_CP_SIZE 2
    475 #define OCF_READ_LMP_HANDLE 0x0020
    476 #define OCF_SETUP_SYNC_CONN 0x0028
    477 typedef struct {
    478 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    479  uint16_t handle;
    480  uint32_t tx_bandwith;
    481  uint32_t rx_bandwith;
    482  uint16_t max_latency;
    483 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    484  uint16_t voice_setting;
    485  uint8_t retrans_effort;
    486  uint16_t pkt_type;
    487 } __attribute__ ((packed)) setup_sync_conn_cp;
    488 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    489 #define SETUP_SYNC_CONN_CP_SIZE 17
    490 #define OCF_ACCEPT_SYNC_CONN_REQ 0x0029
    491 typedef struct {
    492  bdaddr_t bdaddr;
    493 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    494  uint32_t tx_bandwith;
    495  uint32_t rx_bandwith;
    496  uint16_t max_latency;
    497  uint16_t voice_setting;
    498 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    499  uint8_t retrans_effort;
    500  uint16_t pkt_type;
    501 } __attribute__ ((packed)) accept_sync_conn_req_cp;
    502 #define ACCEPT_SYNC_CONN_REQ_CP_SIZE 21
    503 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    504 #define OCF_REJECT_SYNC_CONN_REQ 0x002A
    505 typedef struct {
    506  bdaddr_t bdaddr;
    507  uint8_t reason;
    508 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    509 } __attribute__ ((packed)) reject_sync_conn_req_cp;
    510 #define REJECT_SYNC_CONN_REQ_CP_SIZE 7
    511 #define OCF_IO_CAPABILITY_REPLY 0x002B
    512 typedef struct {
    513 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    514  bdaddr_t bdaddr;
    515  uint8_t capability;
    516  uint8_t oob_data;
    517  uint8_t authentication;
    518 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    519 } __attribute__ ((packed)) io_capability_reply_cp;
    520 #define IO_CAPABILITY_REPLY_CP_SIZE 9
    521 #define OCF_USER_CONFIRM_REPLY 0x002C
    522 typedef struct {
    523 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    524  bdaddr_t bdaddr;
    525 } __attribute__ ((packed)) user_confirm_reply_cp;
    526 #define USER_CONFIRM_REPLY_CP_SIZE 6
    527 #define OCF_USER_CONFIRM_NEG_REPLY 0x002D
    528 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    529 #define OCF_USER_PASSKEY_REPLY 0x002E
    530 typedef struct {
    531  bdaddr_t bdaddr;
    532  uint32_t passkey;
    533 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    534 } __attribute__ ((packed)) user_passkey_reply_cp;
    535 #define USER_PASSKEY_REPLY_CP_SIZE 10
    536 #define OCF_USER_PASSKEY_NEG_REPLY 0x002F
    537 #define OCF_REMOTE_OOB_DATA_REPLY 0x0030
    538 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    539 typedef struct {
    540  bdaddr_t bdaddr;
    541  uint8_t hash[16];
    542  uint8_t randomizer[16];
    543 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    544 } __attribute__ ((packed)) remote_oob_data_reply_cp;
    545 #define REMOTE_OOB_DATA_REPLY_CP_SIZE 38
    546 #define OCF_REMOTE_OOB_DATA_NEG_REPLY 0x0033
    547 #define OCF_IO_CAPABILITY_NEG_REPLY 0x0034
    548 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    549 typedef struct {
    550  bdaddr_t bdaddr;
    551  uint8_t reason;
    552 } __attribute__ ((packed)) io_capability_neg_reply_cp;
    553 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    554 #define IO_CAPABILITY_NEG_REPLY_CP_SIZE 7
    555 #define OCF_CREATE_PHYSICAL_LINK 0x0035
    556 typedef struct {
    557  uint8_t handle;
    558 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    559  uint8_t key_length;
    560  uint8_t key_type;
    561  uint8_t key[32];
    562 } __attribute__ ((packed)) create_physical_link_cp;
    563 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    564 #define CREATE_PHYSICAL_LINK_CP_SIZE 35
    565 #define OCF_ACCEPT_PHYSICAL_LINK 0x0036
    566 #define OCF_DISCONNECT_PHYSICAL_LINK 0x0037
    567 typedef struct {
    568 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    569  uint8_t handle;
    570  uint8_t reason;
    571 } __attribute__ ((packed)) disconnect_physical_link_cp;
    572 #define DISCONNECT_PHYSICAL_LINK_CP_SIZE 2
    573 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    574 #define OCF_CREATE_LOGICAL_LINK 0x0038
    575 typedef struct {
    576  uint8_t handle;
    577  uint8_t tx_flow[16];
    578 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    579  uint8_t rx_flow[16];
    580 } __attribute__ ((packed)) create_logical_link_cp;
    581 #define CREATE_LOGICAL_LINK_CP_SIZE 33
    582 #define OCF_ACCEPT_LOGICAL_LINK 0x0039
    583 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    584 #define OCF_DISCONNECT_LOGICAL_LINK 0x003A
    585 typedef struct {
    586  uint16_t handle;
    587 } __attribute__ ((packed)) disconnect_logical_link_cp;
    588 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    589 #define DISCONNECT_LOGICAL_LINK_CP_SIZE 2
    590 #define OCF_LOGICAL_LINK_CANCEL 0x003B
    591 typedef struct {
    592  uint8_t handle;
    593 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    594  uint8_t tx_flow_id;
    595 } __attribute__ ((packed)) cancel_logical_link_cp;
    596 #define LOGICAL_LINK_CANCEL_CP_SIZE 2
    597 typedef struct {
    598 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    599  uint8_t status;
    600  uint8_t handle;
    601  uint8_t tx_flow_id;
    602 } __attribute__ ((packed)) cancel_logical_link_rp;
    603 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    604 #define LOGICAL_LINK_CANCEL_RP_SIZE 3
    605 #define OCF_FLOW_SPEC_MODIFY 0x003C
    606 #define OGF_LINK_POLICY 0x02
    607 #define OCF_HOLD_MODE 0x0001
    608 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    609 typedef struct {
    610  uint16_t handle;
    611  uint16_t max_interval;
    612  uint16_t min_interval;
    613 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    614 } __attribute__ ((packed)) hold_mode_cp;
    615 #define HOLD_MODE_CP_SIZE 6
    616 #define OCF_SNIFF_MODE 0x0003
    617 typedef struct {
    618 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    619  uint16_t handle;
    620  uint16_t max_interval;
    621  uint16_t min_interval;
    622  uint16_t attempt;
    623 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    624  uint16_t timeout;
    625 } __attribute__ ((packed)) sniff_mode_cp;
    626 #define SNIFF_MODE_CP_SIZE 10
    627 #define OCF_EXIT_SNIFF_MODE 0x0004
    628 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    629 typedef struct {
    630  uint16_t handle;
    631 } __attribute__ ((packed)) exit_sniff_mode_cp;
    632 #define EXIT_SNIFF_MODE_CP_SIZE 2
    633 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    634 #define OCF_PARK_MODE 0x0005
    635 typedef struct {
    636  uint16_t handle;
    637  uint16_t max_interval;
    638 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    639  uint16_t min_interval;
    640 } __attribute__ ((packed)) park_mode_cp;
    641 #define PARK_MODE_CP_SIZE 6
    642 #define OCF_EXIT_PARK_MODE 0x0006
    643 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    644 typedef struct {
    645  uint16_t handle;
    646 } __attribute__ ((packed)) exit_park_mode_cp;
    647 #define EXIT_PARK_MODE_CP_SIZE 2
    648 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    649 #define OCF_QOS_SETUP 0x0007
    650 typedef struct {
    651  uint8_t service_type;
    652  uint32_t token_rate;
    653 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    654  uint32_t peak_bandwidth;
    655  uint32_t latency;
    656  uint32_t delay_variation;
    657 } __attribute__ ((packed)) hci_qos;
    658 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    659 #define HCI_QOS_CP_SIZE 17
    660 typedef struct {
    661  uint16_t handle;
    662  uint8_t flags;
    663 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    664  hci_qos qos;
    665 } __attribute__ ((packed)) qos_setup_cp;
    666 #define QOS_SETUP_CP_SIZE (3 + HCI_QOS_CP_SIZE)
    667 #define OCF_ROLE_DISCOVERY 0x0009
    668 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    669 typedef struct {
    670  uint16_t handle;
    671 } __attribute__ ((packed)) role_discovery_cp;
    672 #define ROLE_DISCOVERY_CP_SIZE 2
    673 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    674 typedef struct {
    675  uint8_t status;
    676  uint16_t handle;
    677  uint8_t role;
    678 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    679 } __attribute__ ((packed)) role_discovery_rp;
    680 #define ROLE_DISCOVERY_RP_SIZE 4
    681 #define OCF_SWITCH_ROLE 0x000B
    682 typedef struct {
    683 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    684  bdaddr_t bdaddr;
    685  uint8_t role;
    686 } __attribute__ ((packed)) switch_role_cp;
    687 #define SWITCH_ROLE_CP_SIZE 7
    688 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    689 #define OCF_READ_LINK_POLICY 0x000C
    690 typedef struct {
    691  uint16_t handle;
    692 } __attribute__ ((packed)) read_link_policy_cp;
    693 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    694 #define READ_LINK_POLICY_CP_SIZE 2
    695 typedef struct {
    696  uint8_t status;
    697  uint16_t handle;
    698 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    699  uint16_t policy;
    700 } __attribute__ ((packed)) read_link_policy_rp;
    701 #define READ_LINK_POLICY_RP_SIZE 5
    702 #define OCF_WRITE_LINK_POLICY 0x000D
    703 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    704 typedef struct {
    705  uint16_t handle;
    706  uint16_t policy;
    707 } __attribute__ ((packed)) write_link_policy_cp;
    708 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    709 #define WRITE_LINK_POLICY_CP_SIZE 4
    710 typedef struct {
    711  uint8_t status;
    712  uint16_t handle;
    713 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    714 } __attribute__ ((packed)) write_link_policy_rp;
    715 #define WRITE_LINK_POLICY_RP_SIZE 3
    716 #define OCF_READ_DEFAULT_LINK_POLICY 0x000E
    717 #define OCF_WRITE_DEFAULT_LINK_POLICY 0x000F
    718 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    719 #define OCF_FLOW_SPECIFICATION 0x0010
    720 #define OCF_SNIFF_SUBRATING 0x0011
    721 typedef struct {
    722  uint16_t handle;
    723 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    724  uint16_t max_latency;
    725  uint16_t min_remote_timeout;
    726  uint16_t min_local_timeout;
    727 } __attribute__ ((packed)) sniff_subrating_cp;
    728 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    729 #define SNIFF_SUBRATING_CP_SIZE 8
    730 #define OGF_HOST_CTL 0x03
    731 #define OCF_SET_EVENT_MASK 0x0001
    732 typedef struct {
    733 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    734  uint8_t mask[8];
    735 } __attribute__ ((packed)) set_event_mask_cp;
    736 #define SET_EVENT_MASK_CP_SIZE 8
    737 #define OCF_RESET 0x0003
    738 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    739 #define OCF_SET_EVENT_FLT 0x0005
    740 typedef struct {
    741  uint8_t flt_type;
    742  uint8_t cond_type;
    743 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    744  uint8_t condition[0];
    745 } __attribute__ ((packed)) set_event_flt_cp;
    746 #define SET_EVENT_FLT_CP_SIZE 2
    747 #define FLT_CLEAR_ALL 0x00
    748 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    749 #define FLT_INQ_RESULT 0x01
    750 #define FLT_CONN_SETUP 0x02
    751 #define INQ_RESULT_RETURN_ALL 0x00
    752 #define INQ_RESULT_RETURN_CLASS 0x01
    753 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    754 #define INQ_RESULT_RETURN_BDADDR 0x02
    755 #define CONN_SETUP_ALLOW_ALL 0x00
    756 #define CONN_SETUP_ALLOW_CLASS 0x01
    757 #define CONN_SETUP_ALLOW_BDADDR 0x02
    758 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    759 #define CONN_SETUP_AUTO_OFF 0x01
    760 #define CONN_SETUP_AUTO_ON 0x02
    761 #define OCF_FLUSH 0x0008
    762 #define OCF_READ_PIN_TYPE 0x0009
    763 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    764 typedef struct {
    765  uint8_t status;
    766  uint8_t pin_type;
    767 } __attribute__ ((packed)) read_pin_type_rp;
    768 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    769 #define READ_PIN_TYPE_RP_SIZE 2
    770 #define OCF_WRITE_PIN_TYPE 0x000A
    771 typedef struct {
    772  uint8_t pin_type;
    773 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    774 } __attribute__ ((packed)) write_pin_type_cp;
    775 #define WRITE_PIN_TYPE_CP_SIZE 1
    776 #define OCF_CREATE_NEW_UNIT_KEY 0x000B
    777 #define OCF_READ_STORED_LINK_KEY 0x000D
    778 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    779 typedef struct {
    780  bdaddr_t bdaddr;
    781  uint8_t read_all;
    782 } __attribute__ ((packed)) read_stored_link_key_cp;
    783 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    784 #define READ_STORED_LINK_KEY_CP_SIZE 7
    785 typedef struct {
    786  uint8_t status;
    787  uint16_t max_keys;
    788 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    789  uint16_t num_keys;
    790 } __attribute__ ((packed)) read_stored_link_key_rp;
    791 #define READ_STORED_LINK_KEY_RP_SIZE 5
    792 #define OCF_WRITE_STORED_LINK_KEY 0x0011
    793 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    794 typedef struct {
    795  uint8_t num_keys;
    796 } __attribute__ ((packed)) write_stored_link_key_cp;
    797 #define WRITE_STORED_LINK_KEY_CP_SIZE 1
    798 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    799 typedef struct {
    800  uint8_t status;
    801  uint8_t num_keys;
    802 } __attribute__ ((packed)) write_stored_link_key_rp;
    803 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    804 #define READ_WRITE_LINK_KEY_RP_SIZE 2
    805 #define OCF_DELETE_STORED_LINK_KEY 0x0012
    806 typedef struct {
    807  bdaddr_t bdaddr;
    808 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    809  uint8_t delete_all;
    810 } __attribute__ ((packed)) delete_stored_link_key_cp;
    811 #define DELETE_STORED_LINK_KEY_CP_SIZE 7
    812 typedef struct {
    813 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    814  uint8_t status;
    815  uint16_t num_keys;
    816 } __attribute__ ((packed)) delete_stored_link_key_rp;
    817 #define DELETE_STORED_LINK_KEY_RP_SIZE 3
    818 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    819 #define OCF_CHANGE_LOCAL_NAME 0x0013
    820 typedef struct {
    821  uint8_t name[248];
    822 } __attribute__ ((packed)) change_local_name_cp;
    823 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    824 #define CHANGE_LOCAL_NAME_CP_SIZE 248
    825 #define OCF_READ_LOCAL_NAME 0x0014
    826 typedef struct {
    827  uint8_t status;
    828 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    829  uint8_t name[248];
    830 } __attribute__ ((packed)) read_local_name_rp;
    831 #define READ_LOCAL_NAME_RP_SIZE 249
    832 #define OCF_READ_CONN_ACCEPT_TIMEOUT 0x0015
    833 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    834 typedef struct {
    835  uint8_t status;
    836  uint16_t timeout;
    837 } __attribute__ ((packed)) read_conn_accept_timeout_rp;
    838 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    839 #define READ_CONN_ACCEPT_TIMEOUT_RP_SIZE 3
    840 #define OCF_WRITE_CONN_ACCEPT_TIMEOUT 0x0016
    841 typedef struct {
    842  uint16_t timeout;
    843 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    844 } __attribute__ ((packed)) write_conn_accept_timeout_cp;
    845 #define WRITE_CONN_ACCEPT_TIMEOUT_CP_SIZE 2
    846 #define OCF_READ_PAGE_TIMEOUT 0x0017
    847 typedef struct {
    848 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    849  uint8_t status;
    850  uint16_t timeout;
    851 } __attribute__ ((packed)) read_page_timeout_rp;
    852 #define READ_PAGE_TIMEOUT_RP_SIZE 3
    853 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    854 #define OCF_WRITE_PAGE_TIMEOUT 0x0018
    855 typedef struct {
    856  uint16_t timeout;
    857 } __attribute__ ((packed)) write_page_timeout_cp;
    858 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    859 #define WRITE_PAGE_TIMEOUT_CP_SIZE 2
    860 #define OCF_READ_SCAN_ENABLE 0x0019
    861 typedef struct {
    862  uint8_t status;
    863 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    864  uint8_t enable;
    865 } __attribute__ ((packed)) read_scan_enable_rp;
    866 #define READ_SCAN_ENABLE_RP_SIZE 2
    867 #define OCF_WRITE_SCAN_ENABLE 0x001A
    868 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    869 #define SCAN_DISABLED 0x00
    870 #define SCAN_INQUIRY 0x01
    871 #define SCAN_PAGE 0x02
    872 #define OCF_READ_PAGE_ACTIVITY 0x001B
    873 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    874 typedef struct {
    875  uint8_t status;
    876  uint16_t interval;
    877  uint16_t window;
    878 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    879 } __attribute__ ((packed)) read_page_activity_rp;
    880 #define READ_PAGE_ACTIVITY_RP_SIZE 5
    881 #define OCF_WRITE_PAGE_ACTIVITY 0x001C
    882 typedef struct {
    883 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    884  uint16_t interval;
    885  uint16_t window;
    886 } __attribute__ ((packed)) write_page_activity_cp;
    887 #define WRITE_PAGE_ACTIVITY_CP_SIZE 4
    888 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    889 #define OCF_READ_INQ_ACTIVITY 0x001D
    890 typedef struct {
    891  uint8_t status;
    892  uint16_t interval;
    893 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    894  uint16_t window;
    895 } __attribute__ ((packed)) read_inq_activity_rp;
    896 #define READ_INQ_ACTIVITY_RP_SIZE 5
    897 #define OCF_WRITE_INQ_ACTIVITY 0x001E
    898 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    899 typedef struct {
    900  uint16_t interval;
    901  uint16_t window;
    902 } __attribute__ ((packed)) write_inq_activity_cp;
    903 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    904 #define WRITE_INQ_ACTIVITY_CP_SIZE 4
    905 #define OCF_READ_AUTH_ENABLE 0x001F
    906 #define OCF_WRITE_AUTH_ENABLE 0x0020
    907 #define AUTH_DISABLED 0x00
    908 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    909 #define AUTH_ENABLED 0x01
    910 #define OCF_READ_ENCRYPT_MODE 0x0021
    911 #define OCF_WRITE_ENCRYPT_MODE 0x0022
    912 #define ENCRYPT_DISABLED 0x00
    913 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    914 #define ENCRYPT_P2P 0x01
    915 #define ENCRYPT_BOTH 0x02
    916 #define OCF_READ_CLASS_OF_DEV 0x0023
    917 typedef struct {
    918 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    919  uint8_t status;
    920  uint8_t dev_class[3];
    921 } __attribute__ ((packed)) read_class_of_dev_rp;
    922 #define READ_CLASS_OF_DEV_RP_SIZE 4
    923 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    924 #define OCF_WRITE_CLASS_OF_DEV 0x0024
    925 typedef struct {
    926  uint8_t dev_class[3];
    927 } __attribute__ ((packed)) write_class_of_dev_cp;
    928 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    929 #define WRITE_CLASS_OF_DEV_CP_SIZE 3
    930 #define OCF_READ_VOICE_SETTING 0x0025
    931 typedef struct {
    932  uint8_t status;
    933 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    934  uint16_t voice_setting;
    935 } __attribute__ ((packed)) read_voice_setting_rp;
    936 #define READ_VOICE_SETTING_RP_SIZE 3
    937 #define OCF_WRITE_VOICE_SETTING 0x0026
    938 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    939 typedef struct {
    940  uint16_t voice_setting;
    941 } __attribute__ ((packed)) write_voice_setting_cp;
    942 #define WRITE_VOICE_SETTING_CP_SIZE 2
    943 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    944 #define OCF_READ_AUTOMATIC_FLUSH_TIMEOUT 0x0027
    945 #define OCF_WRITE_AUTOMATIC_FLUSH_TIMEOUT 0x0028
    946 #define OCF_READ_NUM_BROADCAST_RETRANS 0x0029
    947 #define OCF_WRITE_NUM_BROADCAST_RETRANS 0x002A
    948 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    949 #define OCF_READ_HOLD_MODE_ACTIVITY 0x002B
    950 #define OCF_WRITE_HOLD_MODE_ACTIVITY 0x002C
    951 #define OCF_READ_TRANSMIT_POWER_LEVEL 0x002D
    952 typedef struct {
    953 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    954  uint16_t handle;
    955  uint8_t type;
    956 } __attribute__ ((packed)) read_transmit_power_level_cp;
    957 #define READ_TRANSMIT_POWER_LEVEL_CP_SIZE 3
    958 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    959 typedef struct {
    960  uint8_t status;
    961  uint16_t handle;
    962  int8_t level;
    963 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    964 } __attribute__ ((packed)) read_transmit_power_level_rp;
    965 #define READ_TRANSMIT_POWER_LEVEL_RP_SIZE 4
    966 #define OCF_READ_SYNC_FLOW_ENABLE 0x002E
    967 #define OCF_WRITE_SYNC_FLOW_ENABLE 0x002F
    968 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    969 #define OCF_SET_CONTROLLER_TO_HOST_FC 0x0031
    970 #define OCF_HOST_BUFFER_SIZE 0x0033
    971 typedef struct {
    972  uint16_t acl_mtu;
    973 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    974  uint8_t sco_mtu;
    975  uint16_t acl_max_pkt;
    976  uint16_t sco_max_pkt;
    977 } __attribute__ ((packed)) host_buffer_size_cp;
    978 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    979 #define HOST_BUFFER_SIZE_CP_SIZE 7
    980 #define OCF_HOST_NUM_COMP_PKTS 0x0035
    981 typedef struct {
    982  uint8_t num_hndl;
    983 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    984 } __attribute__ ((packed)) host_num_comp_pkts_cp;
    985 #define HOST_NUM_COMP_PKTS_CP_SIZE 1
    986 #define OCF_READ_LINK_SUPERVISION_TIMEOUT 0x0036
    987 typedef struct {
    988 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    989  uint8_t status;
    990  uint16_t handle;
    991  uint16_t timeout;
    992 } __attribute__ ((packed)) read_link_supervision_timeout_rp;
    993 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    994 #define READ_LINK_SUPERVISION_TIMEOUT_RP_SIZE 5
    995 #define OCF_WRITE_LINK_SUPERVISION_TIMEOUT 0x0037
    996 typedef struct {
    997  uint16_t handle;
    998 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    999  uint16_t timeout;
   1000 } __attribute__ ((packed)) write_link_supervision_timeout_cp;
   1001 #define WRITE_LINK_SUPERVISION_TIMEOUT_CP_SIZE 4
   1002 typedef struct {
   1003 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1004  uint8_t status;
   1005  uint16_t handle;
   1006 } __attribute__ ((packed)) write_link_supervision_timeout_rp;
   1007 #define WRITE_LINK_SUPERVISION_TIMEOUT_RP_SIZE 3
   1008 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1009 #define OCF_READ_NUM_SUPPORTED_IAC 0x0038
   1010 #define MAX_IAC_LAP 0x40
   1011 #define OCF_READ_CURRENT_IAC_LAP 0x0039
   1012 typedef struct {
   1013 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1014  uint8_t status;
   1015  uint8_t num_current_iac;
   1016  uint8_t lap[MAX_IAC_LAP][3];
   1017 } __attribute__ ((packed)) read_current_iac_lap_rp;
   1018 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1019 #define READ_CURRENT_IAC_LAP_RP_SIZE 2+3*MAX_IAC_LAP
   1020 #define OCF_WRITE_CURRENT_IAC_LAP 0x003A
   1021 typedef struct {
   1022  uint8_t num_current_iac;
   1023 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1024  uint8_t lap[MAX_IAC_LAP][3];
   1025 } __attribute__ ((packed)) write_current_iac_lap_cp;
   1026 #define WRITE_CURRENT_IAC_LAP_CP_SIZE 1+3*MAX_IAC_LAP
   1027 #define OCF_READ_PAGE_SCAN_PERIOD_MODE 0x003B
   1028 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1029 #define OCF_WRITE_PAGE_SCAN_PERIOD_MODE 0x003C
   1030 #define OCF_READ_PAGE_SCAN_MODE 0x003D
   1031 #define OCF_WRITE_PAGE_SCAN_MODE 0x003E
   1032 #define OCF_SET_AFH_CLASSIFICATION 0x003F
   1033 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1034 typedef struct {
   1035  uint8_t map[10];
   1036 } __attribute__ ((packed)) set_afh_classification_cp;
   1037 #define SET_AFH_CLASSIFICATION_CP_SIZE 10
   1038 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1039 typedef struct {
   1040  uint8_t status;
   1041 } __attribute__ ((packed)) set_afh_classification_rp;
   1042 #define SET_AFH_CLASSIFICATION_RP_SIZE 1
   1043 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1044 #define OCF_READ_INQUIRY_SCAN_TYPE 0x0042
   1045 typedef struct {
   1046  uint8_t status;
   1047  uint8_t type;
   1048 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1049 } __attribute__ ((packed)) read_inquiry_scan_type_rp;
   1050 #define READ_INQUIRY_SCAN_TYPE_RP_SIZE 2
   1051 #define OCF_WRITE_INQUIRY_SCAN_TYPE 0x0043
   1052 typedef struct {
   1053 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1054  uint8_t type;
   1055 } __attribute__ ((packed)) write_inquiry_scan_type_cp;
   1056 #define WRITE_INQUIRY_SCAN_TYPE_CP_SIZE 1
   1057 typedef struct {
   1058 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1059  uint8_t status;
   1060 } __attribute__ ((packed)) write_inquiry_scan_type_rp;
   1061 #define WRITE_INQUIRY_SCAN_TYPE_RP_SIZE 1
   1062 #define OCF_READ_INQUIRY_MODE 0x0044
   1063 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1064 typedef struct {
   1065  uint8_t status;
   1066  uint8_t mode;
   1067 } __attribute__ ((packed)) read_inquiry_mode_rp;
   1068 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1069 #define READ_INQUIRY_MODE_RP_SIZE 2
   1070 #define OCF_WRITE_INQUIRY_MODE 0x0045
   1071 typedef struct {
   1072  uint8_t mode;
   1073 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1074 } __attribute__ ((packed)) write_inquiry_mode_cp;
   1075 #define WRITE_INQUIRY_MODE_CP_SIZE 1
   1076 typedef struct {
   1077  uint8_t status;
   1078 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1079 } __attribute__ ((packed)) write_inquiry_mode_rp;
   1080 #define WRITE_INQUIRY_MODE_RP_SIZE 1
   1081 #define OCF_READ_PAGE_SCAN_TYPE 0x0046
   1082 #define OCF_WRITE_PAGE_SCAN_TYPE 0x0047
   1083 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1084 #define PAGE_SCAN_TYPE_STANDARD 0x00
   1085 #define PAGE_SCAN_TYPE_INTERLACED 0x01
   1086 #define OCF_READ_AFH_MODE 0x0048
   1087 typedef struct {
   1088 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1089  uint8_t status;
   1090  uint8_t mode;
   1091 } __attribute__ ((packed)) read_afh_mode_rp;
   1092 #define READ_AFH_MODE_RP_SIZE 2
   1093 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1094 #define OCF_WRITE_AFH_MODE 0x0049
   1095 typedef struct {
   1096  uint8_t mode;
   1097 } __attribute__ ((packed)) write_afh_mode_cp;
   1098 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1099 #define WRITE_AFH_MODE_CP_SIZE 1
   1100 typedef struct {
   1101  uint8_t status;
   1102 } __attribute__ ((packed)) write_afh_mode_rp;
   1103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1104 #define WRITE_AFH_MODE_RP_SIZE 1
   1105 #define OCF_READ_EXT_INQUIRY_RESPONSE 0x0051
   1106 typedef struct {
   1107  uint8_t status;
   1108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1109  uint8_t fec;
   1110  uint8_t data[240];
   1111 } __attribute__ ((packed)) read_ext_inquiry_response_rp;
   1112 #define READ_EXT_INQUIRY_RESPONSE_RP_SIZE 242
   1113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1114 #define OCF_WRITE_EXT_INQUIRY_RESPONSE 0x0052
   1115 typedef struct {
   1116  uint8_t fec;
   1117  uint8_t data[240];
   1118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1119 } __attribute__ ((packed)) write_ext_inquiry_response_cp;
   1120 #define WRITE_EXT_INQUIRY_RESPONSE_CP_SIZE 241
   1121 typedef struct {
   1122  uint8_t status;
   1123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1124 } __attribute__ ((packed)) write_ext_inquiry_response_rp;
   1125 #define WRITE_EXT_INQUIRY_RESPONSE_RP_SIZE 1
   1126 #define OCF_REFRESH_ENCRYPTION_KEY 0x0053
   1127 typedef struct {
   1128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1129  uint16_t handle;
   1130 } __attribute__ ((packed)) refresh_encryption_key_cp;
   1131 #define REFRESH_ENCRYPTION_KEY_CP_SIZE 2
   1132 typedef struct {
   1133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1134  uint8_t status;
   1135 } __attribute__ ((packed)) refresh_encryption_key_rp;
   1136 #define REFRESH_ENCRYPTION_KEY_RP_SIZE 1
   1137 #define OCF_READ_SIMPLE_PAIRING_MODE 0x0055
   1138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1139 typedef struct {
   1140  uint8_t status;
   1141  uint8_t mode;
   1142 } __attribute__ ((packed)) read_simple_pairing_mode_rp;
   1143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1144 #define READ_SIMPLE_PAIRING_MODE_RP_SIZE 2
   1145 #define OCF_WRITE_SIMPLE_PAIRING_MODE 0x0056
   1146 typedef struct {
   1147  uint8_t mode;
   1148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1149 } __attribute__ ((packed)) write_simple_pairing_mode_cp;
   1150 #define WRITE_SIMPLE_PAIRING_MODE_CP_SIZE 1
   1151 typedef struct {
   1152  uint8_t status;
   1153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1154 } __attribute__ ((packed)) write_simple_pairing_mode_rp;
   1155 #define WRITE_SIMPLE_PAIRING_MODE_RP_SIZE 1
   1156 #define OCF_READ_LOCAL_OOB_DATA 0x0057
   1157 typedef struct {
   1158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1159  uint8_t status;
   1160  uint8_t hash[16];
   1161  uint8_t randomizer[16];
   1162 } __attribute__ ((packed)) read_local_oob_data_rp;
   1163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1164 #define READ_LOCAL_OOB_DATA_RP_SIZE 33
   1165 #define OCF_READ_INQ_RESPONSE_TX_POWER_LEVEL 0x0058
   1166 typedef struct {
   1167  uint8_t status;
   1168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1169  int8_t level;
   1170 } __attribute__ ((packed)) read_inq_response_tx_power_level_rp;
   1171 #define READ_INQ_RESPONSE_TX_POWER_LEVEL_RP_SIZE 2
   1172 #define OCF_READ_INQUIRY_TRANSMIT_POWER_LEVEL 0x0058
   1173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1174 typedef struct {
   1175  uint8_t status;
   1176  int8_t level;
   1177 } __attribute__ ((packed)) read_inquiry_transmit_power_level_rp;
   1178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1179 #define READ_INQUIRY_TRANSMIT_POWER_LEVEL_RP_SIZE 2
   1180 #define OCF_WRITE_INQUIRY_TRANSMIT_POWER_LEVEL 0x0059
   1181 typedef struct {
   1182  int8_t level;
   1183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1184 } __attribute__ ((packed)) write_inquiry_transmit_power_level_cp;
   1185 #define WRITE_INQUIRY_TRANSMIT_POWER_LEVEL_CP_SIZE 1
   1186 typedef struct {
   1187  uint8_t status;
   1188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1189 } __attribute__ ((packed)) write_inquiry_transmit_power_level_rp;
   1190 #define WRITE_INQUIRY_TRANSMIT_POWER_LEVEL_RP_SIZE 1
   1191 #define OCF_READ_DEFAULT_ERROR_DATA_REPORTING 0x005A
   1192 typedef struct {
   1193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1194  uint8_t status;
   1195  uint8_t reporting;
   1196 } __attribute__ ((packed)) read_default_error_data_reporting_rp;
   1197 #define READ_DEFAULT_ERROR_DATA_REPORTING_RP_SIZE 2
   1198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1199 #define OCF_WRITE_DEFAULT_ERROR_DATA_REPORTING 0x005B
   1200 typedef struct {
   1201  uint8_t reporting;
   1202 } __attribute__ ((packed)) write_default_error_data_reporting_cp;
   1203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1204 #define WRITE_DEFAULT_ERROR_DATA_REPORTING_CP_SIZE 1
   1205 typedef struct {
   1206  uint8_t status;
   1207 } __attribute__ ((packed)) write_default_error_data_reporting_rp;
   1208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1209 #define WRITE_DEFAULT_ERROR_DATA_REPORTING_RP_SIZE 1
   1210 #define OCF_ENHANCED_FLUSH 0x005F
   1211 typedef struct {
   1212  uint16_t handle;
   1213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1214  uint8_t type;
   1215 } __attribute__ ((packed)) enhanced_flush_cp;
   1216 #define ENHANCED_FLUSH_CP_SIZE 3
   1217 #define OCF_SEND_KEYPRESS_NOTIFY 0x0060
   1218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1219 typedef struct {
   1220  bdaddr_t bdaddr;
   1221  uint8_t type;
   1222 } __attribute__ ((packed)) send_keypress_notify_cp;
   1223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1224 #define SEND_KEYPRESS_NOTIFY_CP_SIZE 7
   1225 typedef struct {
   1226  uint8_t status;
   1227 } __attribute__ ((packed)) send_keypress_notify_rp;
   1228 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1229 #define SEND_KEYPRESS_NOTIFY_RP_SIZE 1
   1230 #define OCF_READ_LOGICAL_LINK_ACCEPT_TIMEOUT 0x0061
   1231 typedef struct {
   1232  uint8_t status;
   1233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1234  uint16_t timeout;
   1235 } __attribute__ ((packed)) read_log_link_accept_timeout_rp;
   1236 #define READ_LOGICAL_LINK_ACCEPT_TIMEOUT_RP_SIZE 3
   1237 #define OCF_WRITE_LOGICAL_LINK_ACCEPT_TIMEOUT 0x0062
   1238 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1239 typedef struct {
   1240  uint16_t timeout;
   1241 } __attribute__ ((packed)) write_log_link_accept_timeout_cp;
   1242 #define WRITE_LOGICAL_LINK_ACCEPT_TIMEOUT_CP_SIZE 2
   1243 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1244 #define OCF_SET_EVENT_MASK_PAGE_2 0x0063
   1245 #define OCF_READ_LOCATION_DATA 0x0064
   1246 #define OCF_WRITE_LOCATION_DATA 0x0065
   1247 #define OCF_READ_FLOW_CONTROL_MODE 0x0066
   1248 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1249 #define OCF_WRITE_FLOW_CONTROL_MODE 0x0067
   1250 #define OCF_READ_ENHANCED_TRANSMIT_POWER_LEVEL 0x0068
   1251 typedef struct {
   1252  uint8_t status;
   1253 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1254  uint16_t handle;
   1255  int8_t level_gfsk;
   1256  int8_t level_dqpsk;
   1257  int8_t level_8dpsk;
   1258 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1259 } __attribute__ ((packed)) read_enhanced_transmit_power_level_rp;
   1260 #define READ_ENHANCED_TRANSMIT_POWER_LEVEL_RP_SIZE 6
   1261 #define OCF_READ_BEST_EFFORT_FLUSH_TIMEOUT 0x0069
   1262 typedef struct {
   1263 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1264  uint8_t status;
   1265  uint32_t timeout;
   1266 } __attribute__ ((packed)) read_best_effort_flush_timeout_rp;
   1267 #define READ_BEST_EFFORT_FLUSH_TIMEOUT_RP_SIZE 5
   1268 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1269 #define OCF_WRITE_BEST_EFFORT_FLUSH_TIMEOUT 0x006A
   1270 typedef struct {
   1271  uint16_t handle;
   1272  uint32_t timeout;
   1273 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1274 } __attribute__ ((packed)) write_best_effort_flush_timeout_cp;
   1275 #define WRITE_BEST_EFFORT_FLUSH_TIMEOUT_CP_SIZE 6
   1276 typedef struct {
   1277  uint8_t status;
   1278 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1279 } __attribute__ ((packed)) write_best_effort_flush_timeout_rp;
   1280 #define WRITE_BEST_EFFORT_FLUSH_TIMEOUT_RP_SIZE 1
   1281 #define OCF_WRITE_LE_HOST_SUPPORTED 0x006D
   1282 typedef struct {
   1283 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1284  uint8_t le;
   1285  uint8_t simul;
   1286 } __attribute__ ((packed)) write_le_host_supported_cp;
   1287 #define WRITE_LE_HOST_SUPPORTED_CP_SIZE 2
   1288 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1289 #define OGF_INFO_PARAM 0x04
   1290 #define OCF_READ_LOCAL_VERSION 0x0001
   1291 typedef struct {
   1292  uint8_t status;
   1293 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1294  uint8_t hci_ver;
   1295  uint16_t hci_rev;
   1296  uint8_t lmp_ver;
   1297  uint16_t manufacturer;
   1298 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1299  uint16_t lmp_subver;
   1300 } __attribute__ ((packed)) read_local_version_rp;
   1301 #define READ_LOCAL_VERSION_RP_SIZE 9
   1302 #define OCF_READ_LOCAL_COMMANDS 0x0002
   1303 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1304 typedef struct {
   1305  uint8_t status;
   1306  uint8_t commands[64];
   1307 } __attribute__ ((packed)) read_local_commands_rp;
   1308 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1309 #define READ_LOCAL_COMMANDS_RP_SIZE 65
   1310 #define OCF_READ_LOCAL_FEATURES 0x0003
   1311 typedef struct {
   1312  uint8_t status;
   1313 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1314  uint8_t features[8];
   1315 } __attribute__ ((packed)) read_local_features_rp;
   1316 #define READ_LOCAL_FEATURES_RP_SIZE 9
   1317 #define OCF_READ_LOCAL_EXT_FEATURES 0x0004
   1318 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1319 typedef struct {
   1320  uint8_t page_num;
   1321 } __attribute__ ((packed)) read_local_ext_features_cp;
   1322 #define READ_LOCAL_EXT_FEATURES_CP_SIZE 1
   1323 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1324 typedef struct {
   1325  uint8_t status;
   1326  uint8_t page_num;
   1327  uint8_t max_page_num;
   1328 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1329  uint8_t features[8];
   1330 } __attribute__ ((packed)) read_local_ext_features_rp;
   1331 #define READ_LOCAL_EXT_FEATURES_RP_SIZE 11
   1332 #define OCF_READ_BUFFER_SIZE 0x0005
   1333 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1334 typedef struct {
   1335  uint8_t status;
   1336  uint16_t acl_mtu;
   1337  uint8_t sco_mtu;
   1338 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1339  uint16_t acl_max_pkt;
   1340  uint16_t sco_max_pkt;
   1341 } __attribute__ ((packed)) read_buffer_size_rp;
   1342 #define READ_BUFFER_SIZE_RP_SIZE 8
   1343 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1344 #define OCF_READ_COUNTRY_CODE 0x0007
   1345 #define OCF_READ_BD_ADDR 0x0009
   1346 typedef struct {
   1347  uint8_t status;
   1348 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1349  bdaddr_t bdaddr;
   1350 } __attribute__ ((packed)) read_bd_addr_rp;
   1351 #define READ_BD_ADDR_RP_SIZE 7
   1352 #define OGF_STATUS_PARAM 0x05
   1353 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1354 #define OCF_READ_FAILED_CONTACT_COUNTER 0x0001
   1355 typedef struct {
   1356  uint8_t status;
   1357  uint16_t handle;
   1358 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1359  uint8_t counter;
   1360 } __attribute__ ((packed)) read_failed_contact_counter_rp;
   1361 #define READ_FAILED_CONTACT_COUNTER_RP_SIZE 4
   1362 #define OCF_RESET_FAILED_CONTACT_COUNTER 0x0002
   1363 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1364 typedef struct {
   1365  uint8_t status;
   1366  uint16_t handle;
   1367 } __attribute__ ((packed)) reset_failed_contact_counter_rp;
   1368 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1369 #define RESET_FAILED_CONTACT_COUNTER_RP_SIZE 4
   1370 #define OCF_READ_LINK_QUALITY 0x0003
   1371 typedef struct {
   1372  uint8_t status;
   1373 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1374  uint16_t handle;
   1375  uint8_t link_quality;
   1376 } __attribute__ ((packed)) read_link_quality_rp;
   1377 #define READ_LINK_QUALITY_RP_SIZE 4
   1378 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1379 #define OCF_READ_RSSI 0x0005
   1380 typedef struct {
   1381  uint8_t status;
   1382  uint16_t handle;
   1383 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1384  int8_t rssi;
   1385 } __attribute__ ((packed)) read_rssi_rp;
   1386 #define READ_RSSI_RP_SIZE 4
   1387 #define OCF_READ_AFH_MAP 0x0006
   1388 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1389 typedef struct {
   1390  uint8_t status;
   1391  uint16_t handle;
   1392  uint8_t mode;
   1393 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1394  uint8_t map[10];
   1395 } __attribute__ ((packed)) read_afh_map_rp;
   1396 #define READ_AFH_MAP_RP_SIZE 14
   1397 #define OCF_READ_CLOCK 0x0007
   1398 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1399 typedef struct {
   1400  uint16_t handle;
   1401  uint8_t which_clock;
   1402 } __attribute__ ((packed)) read_clock_cp;
   1403 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1404 #define READ_CLOCK_CP_SIZE 3
   1405 typedef struct {
   1406  uint8_t status;
   1407  uint16_t handle;
   1408 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1409  uint32_t clock;
   1410  uint16_t accuracy;
   1411 } __attribute__ ((packed)) read_clock_rp;
   1412 #define READ_CLOCK_RP_SIZE 9
   1413 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1414 #define OCF_READ_LOCAL_AMP_INFO 0x0009
   1415 typedef struct {
   1416  uint8_t status;
   1417  uint8_t amp_status;
   1418 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1419  uint32_t total_bandwidth;
   1420  uint32_t max_guaranteed_bandwidth;
   1421  uint32_t min_latency;
   1422  uint32_t max_pdu_size;
   1423 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1424  uint8_t controller_type;
   1425  uint16_t pal_caps;
   1426  uint16_t max_amp_assoc_length;
   1427  uint32_t max_flush_timeout;
   1428 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1429  uint32_t best_effort_flush_timeout;
   1430 } __attribute__ ((packed)) read_local_amp_info_rp;
   1431 #define READ_LOCAL_AMP_INFO_RP_SIZE 31
   1432 #define OCF_READ_LOCAL_AMP_ASSOC 0x000A
   1433 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1434 typedef struct {
   1435  uint8_t handle;
   1436  uint16_t length_so_far;
   1437  uint16_t assoc_length;
   1438 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1439 } __attribute__ ((packed)) read_local_amp_assoc_cp;
   1440 #define READ_LOCAL_AMP_ASSOC_CP_SIZE 5
   1441 typedef struct {
   1442  uint8_t status;
   1443 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1444  uint8_t handle;
   1445  uint16_t length;
   1446  uint8_t fragment[248];
   1447 } __attribute__ ((packed)) read_local_amp_assoc_rp;
   1448 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1449 #define READ_LOCAL_AMP_ASSOC_RP_SIZE 252
   1450 #define OCF_WRITE_REMOTE_AMP_ASSOC 0x000B
   1451 typedef struct {
   1452  uint8_t handle;
   1453 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1454  uint16_t length_so_far;
   1455  uint16_t assoc_length;
   1456  uint8_t fragment[248];
   1457 } __attribute__ ((packed)) write_remote_amp_assoc_cp;
   1458 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1459 #define WRITE_REMOTE_AMP_ASSOC_CP_SIZE 253
   1460 typedef struct {
   1461  uint8_t status;
   1462  uint8_t handle;
   1463 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1464 } __attribute__ ((packed)) write_remote_amp_assoc_rp;
   1465 #define WRITE_REMOTE_AMP_ASSOC_RP_SIZE 2
   1466 #define OGF_TESTING_CMD 0x3e
   1467 #define OCF_READ_LOOPBACK_MODE 0x0001
   1468 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1469 #define OCF_WRITE_LOOPBACK_MODE 0x0002
   1470 #define OCF_ENABLE_DEVICE_UNDER_TEST_MODE 0x0003
   1471 #define OCF_WRITE_SIMPLE_PAIRING_DEBUG_MODE 0x0004
   1472 typedef struct {
   1473 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1474  uint8_t mode;
   1475 } __attribute__ ((packed)) write_simple_pairing_debug_mode_cp;
   1476 #define WRITE_SIMPLE_PAIRING_DEBUG_MODE_CP_SIZE 1
   1477 typedef struct {
   1478 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1479  uint8_t status;
   1480 } __attribute__ ((packed)) write_simple_pairing_debug_mode_rp;
   1481 #define WRITE_SIMPLE_PAIRING_DEBUG_MODE_RP_SIZE 1
   1482 #define OGF_LE_CTL 0x08
   1483 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1484 #define OCF_LE_SET_EVENT_MASK 0x0001
   1485 typedef struct {
   1486  uint8_t mask[8];
   1487 } __attribute__ ((packed)) le_set_event_mask_cp;
   1488 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1489 #define LE_SET_EVENT_MASK_CP_SIZE 8
   1490 #define OCF_LE_READ_BUFFER_SIZE 0x0002
   1491 typedef struct {
   1492  uint8_t status;
   1493 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1494  uint16_t pkt_len;
   1495  uint8_t max_pkt;
   1496 } __attribute__ ((packed)) le_read_buffer_size_rp;
   1497 #define LE_READ_BUFFER_SIZE_RP_SIZE 4
   1498 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1499 #define OCF_LE_READ_LOCAL_SUPPORTED_FEATURES 0x0003
   1500 typedef struct {
   1501  uint8_t status;
   1502  uint8_t features[8];
   1503 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1504 } __attribute__ ((packed)) le_read_local_supported_features_rp;
   1505 #define LE_READ_LOCAL_SUPPORTED_FEATURES_RP_SIZE 9
   1506 #define OCF_LE_SET_RANDOM_ADDRESS 0x0005
   1507 typedef struct {
   1508 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1509  bdaddr_t bdaddr;
   1510 } __attribute__ ((packed)) le_set_random_address_cp;
   1511 #define LE_SET_RANDOM_ADDRESS_CP_SIZE 6
   1512 #define OCF_LE_SET_ADVERTISING_PARAMETERS 0x0006
   1513 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1514 typedef struct {
   1515  uint16_t min_interval;
   1516  uint16_t max_interval;
   1517  uint8_t advtype;
   1518 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1519  uint8_t own_bdaddr_type;
   1520  uint8_t direct_bdaddr_type;
   1521  bdaddr_t direct_bdaddr;
   1522  uint8_t chan_map;
   1523 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1524  uint8_t filter;
   1525 } __attribute__ ((packed)) le_set_advertising_parameters_cp;
   1526 #define LE_SET_ADVERTISING_PARAMETERS_CP_SIZE 15
   1527 #define OCF_LE_READ_ADVERTISING_CHANNEL_TX_POWER 0x0007
   1528 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1529 typedef struct {
   1530  uint8_t status;
   1531  uint8_t level;
   1532 } __attribute__ ((packed)) le_read_advertising_channel_tx_power_rp;
   1533 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1534 #define LE_READ_ADVERTISING_CHANNEL_TX_POWER_RP_SIZE 2
   1535 #define OCF_LE_SET_ADVERTISING_DATA 0x0008
   1536 typedef struct {
   1537  uint8_t length;
   1538 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1539  uint8_t data[31];
   1540 } __attribute__ ((packed)) le_set_advertising_data_cp;
   1541 #define LE_SET_ADVERTISING_DATA_CP_SIZE 32
   1542 #define OCF_LE_SET_SCAN_RESPONSE_DATA 0x0009
   1543 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1544 typedef struct {
   1545  uint8_t length;
   1546  uint8_t data[31];
   1547 } __attribute__ ((packed)) le_set_scan_response_data_cp;
   1548 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1549 #define LE_SET_SCAN_RESPONSE_DATA_CP_SIZE 32
   1550 #define OCF_LE_SET_ADVERTISE_ENABLE 0x000A
   1551 typedef struct {
   1552  uint8_t enable;
   1553 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1554 } __attribute__ ((packed)) le_set_advertise_enable_cp;
   1555 #define LE_SET_ADVERTISE_ENABLE_CP_SIZE 1
   1556 #define OCF_LE_SET_SCAN_PARAMETERS 0x000B
   1557 typedef struct {
   1558 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1559  uint8_t type;
   1560  uint16_t interval;
   1561  uint16_t window;
   1562  uint8_t own_bdaddr_type;
   1563 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1564  uint8_t filter;
   1565 } __attribute__ ((packed)) le_set_scan_parameters_cp;
   1566 #define LE_SET_SCAN_PARAMETERS_CP_SIZE 7
   1567 #define OCF_LE_SET_SCAN_ENABLE 0x000C
   1568 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1569 typedef struct {
   1570  uint8_t enable;
   1571  uint8_t filter_dup;
   1572 } __attribute__ ((packed)) le_set_scan_enable_cp;
   1573 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1574 #define LE_SET_SCAN_ENABLE_CP_SIZE 2
   1575 #define OCF_LE_CREATE_CONN 0x000D
   1576 typedef struct {
   1577  uint16_t interval;
   1578 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1579  uint16_t window;
   1580  uint8_t initiator_filter;
   1581  uint8_t peer_bdaddr_type;
   1582  bdaddr_t peer_bdaddr;
   1583 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1584  uint8_t own_bdaddr_type;
   1585  uint16_t min_interval;
   1586  uint16_t max_interval;
   1587  uint16_t latency;
   1588 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1589  uint16_t supervision_timeout;
   1590  uint16_t min_ce_length;
   1591  uint16_t max_ce_length;
   1592 } __attribute__ ((packed)) le_create_connection_cp;
   1593 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1594 #define LE_CREATE_CONN_CP_SIZE 25
   1595 #define OCF_LE_CREATE_CONN_CANCEL 0x000E
   1596 #define OCF_LE_READ_WHITE_LIST_SIZE 0x000F
   1597 typedef struct {
   1598 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1599  uint8_t status;
   1600  uint8_t size;
   1601 } __attribute__ ((packed)) le_read_white_list_size_rp;
   1602 #define LE_READ_WHITE_LIST_SIZE_RP_SIZE 2
   1603 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1604 #define OCF_LE_CLEAR_WHITE_LIST 0x0010
   1605 #define OCF_LE_ADD_DEVICE_TO_WHITE_LIST 0x0011
   1606 typedef struct {
   1607  uint8_t bdaddr_type;
   1608 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1609  bdaddr_t bdaddr;
   1610 } __attribute__ ((packed)) le_add_device_to_white_list_cp;
   1611 #define LE_ADD_DEVICE_TO_WHITE_LIST_CP_SIZE 7
   1612 #define OCF_LE_REMOVE_DEVICE_FROM_WHITE_LIST 0x0012
   1613 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1614 typedef struct {
   1615  uint8_t bdaddr_type;
   1616  bdaddr_t bdaddr;
   1617 } __attribute__ ((packed)) le_remove_device_from_white_list_cp;
   1618 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1619 #define LE_REMOVE_DEVICE_FROM_WHITE_LIST_CP_SIZE 7
   1620 #define OCF_LE_CONN_UPDATE 0x0013
   1621 typedef struct {
   1622  uint16_t handle;
   1623 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1624  uint16_t min_interval;
   1625  uint16_t max_interval;
   1626  uint16_t latency;
   1627  uint16_t supervision_timeout;
   1628 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1629  uint16_t min_ce_length;
   1630  uint16_t max_ce_length;
   1631 } __attribute__ ((packed)) le_connection_update_cp;
   1632 #define LE_CONN_UPDATE_CP_SIZE 14
   1633 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1634 #define OCF_LE_SET_HOST_CHANNEL_CLASSIFICATION 0x0014
   1635 typedef struct {
   1636  uint8_t map[5];
   1637 } __attribute__ ((packed)) le_set_host_channel_classification_cp;
   1638 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1639 #define LE_SET_HOST_CHANNEL_CLASSIFICATION_CP_SIZE 5
   1640 #define OCF_LE_READ_CHANNEL_MAP 0x0015
   1641 typedef struct {
   1642  uint16_t handle;
   1643 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1644 } __attribute__ ((packed)) le_read_channel_map_cp;
   1645 #define LE_READ_CHANNEL_MAP_CP_SIZE 2
   1646 typedef struct {
   1647  uint8_t status;
   1648 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1649  uint16_t handle;
   1650  uint8_t map[5];
   1651 } __attribute__ ((packed)) le_read_channel_map_rp;
   1652 #define LE_READ_CHANNEL_MAP_RP_SIZE 8
   1653 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1654 #define OCF_LE_READ_REMOTE_USED_FEATURES 0x0016
   1655 typedef struct {
   1656  uint16_t handle;
   1657 } __attribute__ ((packed)) le_read_remote_used_features_cp;
   1658 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1659 #define LE_READ_REMOTE_USED_FEATURES_CP_SIZE 2
   1660 #define OCF_LE_ENCRYPT 0x0017
   1661 typedef struct {
   1662  uint8_t key[16];
   1663 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1664  uint8_t plaintext[16];
   1665 } __attribute__ ((packed)) le_encrypt_cp;
   1666 #define LE_ENCRYPT_CP_SIZE 32
   1667 typedef struct {
   1668 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1669  uint8_t status;
   1670  uint8_t data[16];
   1671 } __attribute__ ((packed)) le_encrypt_rp;
   1672 #define LE_ENCRYPT_RP_SIZE 17
   1673 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1674 #define OCF_LE_RAND 0x0018
   1675 typedef struct {
   1676  uint8_t status;
   1677  uint64_t random;
   1678 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1679 } __attribute__ ((packed)) le_rand_rp;
   1680 #define LE_RAND_RP_SIZE 9
   1681 #define OCF_LE_START_ENCRYPTION 0x0019
   1682 typedef struct {
   1683 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1684  uint16_t handle;
   1685  uint64_t random;
   1686  uint16_t diversifier;
   1687  uint8_t key[16];
   1688 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1689 } __attribute__ ((packed)) le_start_encryption_cp;
   1690 #define LE_START_ENCRYPTION_CP_SIZE 28
   1691 #define OCF_LE_LTK_REPLY 0x001A
   1692 typedef struct {
   1693 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1694  uint16_t handle;
   1695  uint8_t key[16];
   1696 } __attribute__ ((packed)) le_ltk_reply_cp;
   1697 #define LE_LTK_REPLY_CP_SIZE 18
   1698 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1699 typedef struct {
   1700  uint8_t status;
   1701  uint16_t handle;
   1702 } __attribute__ ((packed)) le_ltk_reply_rp;
   1703 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1704 #define LE_LTK_REPLY_RP_SIZE 3
   1705 #define OCF_LE_LTK_NEG_REPLY 0x001B
   1706 typedef struct {
   1707  uint16_t handle;
   1708 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1709 } __attribute__ ((packed)) le_ltk_neg_reply_cp;
   1710 #define LE_LTK_NEG_REPLY_CP_SIZE 2
   1711 typedef struct {
   1712  uint8_t status;
   1713 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1714  uint16_t handle;
   1715 } __attribute__ ((packed)) le_ltk_neg_reply_rp;
   1716 #define LE_LTK_NEG_REPLY_RP_SIZE 3
   1717 #define OCF_LE_READ_SUPPORTED_STATES 0x001C
   1718 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1719 typedef struct {
   1720  uint8_t status;
   1721  uint64_t states;
   1722 } __attribute__ ((packed)) le_read_supported_states_rp;
   1723 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1724 #define LE_READ_SUPPORTED_STATES_RP_SIZE 9
   1725 #define OCF_LE_RECEIVER_TEST 0x001D
   1726 typedef struct {
   1727  uint8_t frequency;
   1728 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1729 } __attribute__ ((packed)) le_receiver_test_cp;
   1730 #define LE_RECEIVER_TEST_CP_SIZE 1
   1731 #define OCF_LE_TRANSMITTER_TEST 0x001E
   1732 typedef struct {
   1733 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1734  uint8_t frequency;
   1735  uint8_t length;
   1736  uint8_t payload;
   1737 } __attribute__ ((packed)) le_transmitter_test_cp;
   1738 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1739 #define LE_TRANSMITTER_TEST_CP_SIZE 3
   1740 #define OCF_LE_TEST_END 0x001F
   1741 typedef struct {
   1742  uint8_t status;
   1743 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1744  uint16_t num_pkts;
   1745 } __attribute__ ((packed)) le_test_end_rp;
   1746 #define LE_TEST_END_RP_SIZE 3
   1747 #define OGF_VENDOR_CMD 0x3f
   1748 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1749 #define EVT_INQUIRY_COMPLETE 0x01
   1750 #define EVT_INQUIRY_RESULT 0x02
   1751 typedef struct {
   1752  bdaddr_t bdaddr;
   1753 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1754  uint8_t pscan_rep_mode;
   1755  uint8_t pscan_period_mode;
   1756  uint8_t pscan_mode;
   1757  uint8_t dev_class[3];
   1758 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1759  uint16_t clock_offset;
   1760 } __attribute__ ((packed)) inquiry_info;
   1761 #define INQUIRY_INFO_SIZE 14
   1762 #define EVT_CONN_COMPLETE 0x03
   1763 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1764 typedef struct {
   1765  uint8_t status;
   1766  uint16_t handle;
   1767  bdaddr_t bdaddr;
   1768 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1769  uint8_t link_type;
   1770  uint8_t encr_mode;
   1771 } __attribute__ ((packed)) evt_conn_complete;
   1772 #define EVT_CONN_COMPLETE_SIZE 13
   1773 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1774 #define EVT_CONN_REQUEST 0x04
   1775 typedef struct {
   1776  bdaddr_t bdaddr;
   1777  uint8_t dev_class[3];
   1778 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1779  uint8_t link_type;
   1780 } __attribute__ ((packed)) evt_conn_request;
   1781 #define EVT_CONN_REQUEST_SIZE 10
   1782 #define EVT_DISCONN_COMPLETE 0x05
   1783 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1784 typedef struct {
   1785  uint8_t status;
   1786  uint16_t handle;
   1787  uint8_t reason;
   1788 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1789 } __attribute__ ((packed)) evt_disconn_complete;
   1790 #define EVT_DISCONN_COMPLETE_SIZE 4
   1791 #define EVT_AUTH_COMPLETE 0x06
   1792 typedef struct {
   1793 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1794  uint8_t status;
   1795  uint16_t handle;
   1796 } __attribute__ ((packed)) evt_auth_complete;
   1797 #define EVT_AUTH_COMPLETE_SIZE 3
   1798 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1799 #define EVT_REMOTE_NAME_REQ_COMPLETE 0x07
   1800 typedef struct {
   1801  uint8_t status;
   1802  bdaddr_t bdaddr;
   1803 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1804  uint8_t name[248];
   1805 } __attribute__ ((packed)) evt_remote_name_req_complete;
   1806 #define EVT_REMOTE_NAME_REQ_COMPLETE_SIZE 255
   1807 #define EVT_ENCRYPT_CHANGE 0x08
   1808 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1809 typedef struct {
   1810  uint8_t status;
   1811  uint16_t handle;
   1812  uint8_t encrypt;
   1813 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1814 } __attribute__ ((packed)) evt_encrypt_change;
   1815 #define EVT_ENCRYPT_CHANGE_SIZE 5
   1816 #define EVT_CHANGE_CONN_LINK_KEY_COMPLETE 0x09
   1817 typedef struct {
   1818 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1819  uint8_t status;
   1820  uint16_t handle;
   1821 } __attribute__ ((packed)) evt_change_conn_link_key_complete;
   1822 #define EVT_CHANGE_CONN_LINK_KEY_COMPLETE_SIZE 3
   1823 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1824 #define EVT_MASTER_LINK_KEY_COMPLETE 0x0A
   1825 typedef struct {
   1826  uint8_t status;
   1827  uint16_t handle;
   1828 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1829  uint8_t key_flag;
   1830 } __attribute__ ((packed)) evt_master_link_key_complete;
   1831 #define EVT_MASTER_LINK_KEY_COMPLETE_SIZE 4
   1832 #define EVT_READ_REMOTE_FEATURES_COMPLETE 0x0B
   1833 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1834 typedef struct {
   1835  uint8_t status;
   1836  uint16_t handle;
   1837  uint8_t features[8];
   1838 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1839 } __attribute__ ((packed)) evt_read_remote_features_complete;
   1840 #define EVT_READ_REMOTE_FEATURES_COMPLETE_SIZE 11
   1841 #define EVT_READ_REMOTE_VERSION_COMPLETE 0x0C
   1842 typedef struct {
   1843 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1844  uint8_t status;
   1845  uint16_t handle;
   1846  uint8_t lmp_ver;
   1847  uint16_t manufacturer;
   1848 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1849  uint16_t lmp_subver;
   1850 } __attribute__ ((packed)) evt_read_remote_version_complete;
   1851 #define EVT_READ_REMOTE_VERSION_COMPLETE_SIZE 8
   1852 #define EVT_QOS_SETUP_COMPLETE 0x0D
   1853 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1854 typedef struct {
   1855  uint8_t status;
   1856  uint16_t handle;
   1857  uint8_t flags;
   1858 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1859  hci_qos qos;
   1860 } __attribute__ ((packed)) evt_qos_setup_complete;
   1861 #define EVT_QOS_SETUP_COMPLETE_SIZE (4 + HCI_QOS_CP_SIZE)
   1862 #define EVT_CMD_COMPLETE 0x0E
   1863 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1864 typedef struct {
   1865  uint8_t ncmd;
   1866  uint16_t opcode;
   1867 } __attribute__ ((packed)) evt_cmd_complete;
   1868 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1869 #define EVT_CMD_COMPLETE_SIZE 3
   1870 #define EVT_CMD_STATUS 0x0F
   1871 typedef struct {
   1872  uint8_t status;
   1873 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1874  uint8_t ncmd;
   1875  uint16_t opcode;
   1876 } __attribute__ ((packed)) evt_cmd_status;
   1877 #define EVT_CMD_STATUS_SIZE 4
   1878 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1879 #define EVT_HARDWARE_ERROR 0x10
   1880 typedef struct {
   1881  uint8_t code;
   1882 } __attribute__ ((packed)) evt_hardware_error;
   1883 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1884 #define EVT_HARDWARE_ERROR_SIZE 1
   1885 #define EVT_FLUSH_OCCURRED 0x11
   1886 typedef struct {
   1887  uint16_t handle;
   1888 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1889 } __attribute__ ((packed)) evt_flush_occured;
   1890 #define EVT_FLUSH_OCCURRED_SIZE 2
   1891 #define EVT_ROLE_CHANGE 0x12
   1892 typedef struct {
   1893 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1894  uint8_t status;
   1895  bdaddr_t bdaddr;
   1896  uint8_t role;
   1897 } __attribute__ ((packed)) evt_role_change;
   1898 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1899 #define EVT_ROLE_CHANGE_SIZE 8
   1900 #define EVT_NUM_COMP_PKTS 0x13
   1901 typedef struct {
   1902  uint8_t num_hndl;
   1903 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1904 } __attribute__ ((packed)) evt_num_comp_pkts;
   1905 #define EVT_NUM_COMP_PKTS_SIZE 1
   1906 #define EVT_MODE_CHANGE 0x14
   1907 typedef struct {
   1908 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1909  uint8_t status;
   1910  uint16_t handle;
   1911  uint8_t mode;
   1912  uint16_t interval;
   1913 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1914 } __attribute__ ((packed)) evt_mode_change;
   1915 #define EVT_MODE_CHANGE_SIZE 6
   1916 #define EVT_RETURN_LINK_KEYS 0x15
   1917 typedef struct {
   1918 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1919  uint8_t num_keys;
   1920 } __attribute__ ((packed)) evt_return_link_keys;
   1921 #define EVT_RETURN_LINK_KEYS_SIZE 1
   1922 #define EVT_PIN_CODE_REQ 0x16
   1923 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1924 typedef struct {
   1925  bdaddr_t bdaddr;
   1926 } __attribute__ ((packed)) evt_pin_code_req;
   1927 #define EVT_PIN_CODE_REQ_SIZE 6
   1928 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1929 #define EVT_LINK_KEY_REQ 0x17
   1930 typedef struct {
   1931  bdaddr_t bdaddr;
   1932 } __attribute__ ((packed)) evt_link_key_req;
   1933 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1934 #define EVT_LINK_KEY_REQ_SIZE 6
   1935 #define EVT_LINK_KEY_NOTIFY 0x18
   1936 typedef struct {
   1937  bdaddr_t bdaddr;
   1938 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1939  uint8_t link_key[16];
   1940  uint8_t key_type;
   1941 } __attribute__ ((packed)) evt_link_key_notify;
   1942 #define EVT_LINK_KEY_NOTIFY_SIZE 23
   1943 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1944 #define EVT_LOOPBACK_COMMAND 0x19
   1945 #define EVT_DATA_BUFFER_OVERFLOW 0x1A
   1946 typedef struct {
   1947  uint8_t link_type;
   1948 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1949 } __attribute__ ((packed)) evt_data_buffer_overflow;
   1950 #define EVT_DATA_BUFFER_OVERFLOW_SIZE 1
   1951 #define EVT_MAX_SLOTS_CHANGE 0x1B
   1952 typedef struct {
   1953 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1954  uint16_t handle;
   1955  uint8_t max_slots;
   1956 } __attribute__ ((packed)) evt_max_slots_change;
   1957 #define EVT_MAX_SLOTS_CHANGE_SIZE 3
   1958 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1959 #define EVT_READ_CLOCK_OFFSET_COMPLETE 0x1C
   1960 typedef struct {
   1961  uint8_t status;
   1962  uint16_t handle;
   1963 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1964  uint16_t clock_offset;
   1965 } __attribute__ ((packed)) evt_read_clock_offset_complete;
   1966 #define EVT_READ_CLOCK_OFFSET_COMPLETE_SIZE 5
   1967 #define EVT_CONN_PTYPE_CHANGED 0x1D
   1968 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1969 typedef struct {
   1970  uint8_t status;
   1971  uint16_t handle;
   1972  uint16_t ptype;
   1973 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1974 } __attribute__ ((packed)) evt_conn_ptype_changed;
   1975 #define EVT_CONN_PTYPE_CHANGED_SIZE 5
   1976 #define EVT_QOS_VIOLATION 0x1E
   1977 typedef struct {
   1978 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1979  uint16_t handle;
   1980 } __attribute__ ((packed)) evt_qos_violation;
   1981 #define EVT_QOS_VIOLATION_SIZE 2
   1982 #define EVT_PSCAN_REP_MODE_CHANGE 0x20
   1983 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1984 typedef struct {
   1985  bdaddr_t bdaddr;
   1986  uint8_t pscan_rep_mode;
   1987 } __attribute__ ((packed)) evt_pscan_rep_mode_change;
   1988 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1989 #define EVT_PSCAN_REP_MODE_CHANGE_SIZE 7
   1990 #define EVT_FLOW_SPEC_COMPLETE 0x21
   1991 typedef struct {
   1992  uint8_t status;
   1993 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1994  uint16_t handle;
   1995  uint8_t flags;
   1996  uint8_t direction;
   1997  hci_qos qos;
   1998 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   1999 } __attribute__ ((packed)) evt_flow_spec_complete;
   2000 #define EVT_FLOW_SPEC_COMPLETE_SIZE (5 + HCI_QOS_CP_SIZE)
   2001 #define EVT_INQUIRY_RESULT_WITH_RSSI 0x22
   2002 typedef struct {
   2003 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2004  bdaddr_t bdaddr;
   2005  uint8_t pscan_rep_mode;
   2006  uint8_t pscan_period_mode;
   2007  uint8_t dev_class[3];
   2008 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2009  uint16_t clock_offset;
   2010  int8_t rssi;
   2011 } __attribute__ ((packed)) inquiry_info_with_rssi;
   2012 #define INQUIRY_INFO_WITH_RSSI_SIZE 14
   2013 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2014 typedef struct {
   2015  bdaddr_t bdaddr;
   2016  uint8_t pscan_rep_mode;
   2017  uint8_t pscan_period_mode;
   2018 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2019  uint8_t pscan_mode;
   2020  uint8_t dev_class[3];
   2021  uint16_t clock_offset;
   2022  int8_t rssi;
   2023 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2024 } __attribute__ ((packed)) inquiry_info_with_rssi_and_pscan_mode;
   2025 #define INQUIRY_INFO_WITH_RSSI_AND_PSCAN_MODE_SIZE 15
   2026 #define EVT_READ_REMOTE_EXT_FEATURES_COMPLETE 0x23
   2027 typedef struct {
   2028 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2029  uint8_t status;
   2030  uint16_t handle;
   2031  uint8_t page_num;
   2032  uint8_t max_page_num;
   2033 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2034  uint8_t features[8];
   2035 } __attribute__ ((packed)) evt_read_remote_ext_features_complete;
   2036 #define EVT_READ_REMOTE_EXT_FEATURES_COMPLETE_SIZE 13
   2037 #define EVT_SYNC_CONN_COMPLETE 0x2C
   2038 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2039 typedef struct {
   2040  uint8_t status;
   2041  uint16_t handle;
   2042  bdaddr_t bdaddr;
   2043 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2044  uint8_t link_type;
   2045  uint8_t trans_interval;
   2046  uint8_t retrans_window;
   2047  uint16_t rx_pkt_len;
   2048 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2049  uint16_t tx_pkt_len;
   2050  uint8_t air_mode;
   2051 } __attribute__ ((packed)) evt_sync_conn_complete;
   2052 #define EVT_SYNC_CONN_COMPLETE_SIZE 17
   2053 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2054 #define EVT_SYNC_CONN_CHANGED 0x2D
   2055 typedef struct {
   2056  uint8_t status;
   2057  uint16_t handle;
   2058 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2059  uint8_t trans_interval;
   2060  uint8_t retrans_window;
   2061  uint16_t rx_pkt_len;
   2062  uint16_t tx_pkt_len;
   2063 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2064 } __attribute__ ((packed)) evt_sync_conn_changed;
   2065 #define EVT_SYNC_CONN_CHANGED_SIZE 9
   2066 #define EVT_SNIFF_SUBRATING 0x2E
   2067 typedef struct {
   2068 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2069  uint8_t status;
   2070  uint16_t handle;
   2071  uint16_t max_tx_latency;
   2072  uint16_t max_rx_latency;
   2073 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2074  uint16_t min_remote_timeout;
   2075  uint16_t min_local_timeout;
   2076 } __attribute__ ((packed)) evt_sniff_subrating;
   2077 #define EVT_SNIFF_SUBRATING_SIZE 11
   2078 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2079 #define EVT_EXTENDED_INQUIRY_RESULT 0x2F
   2080 typedef struct {
   2081  bdaddr_t bdaddr;
   2082  uint8_t pscan_rep_mode;
   2083 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2084  uint8_t pscan_period_mode;
   2085  uint8_t dev_class[3];
   2086  uint16_t clock_offset;
   2087  int8_t rssi;
   2088 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2089  uint8_t data[240];
   2090 } __attribute__ ((packed)) extended_inquiry_info;
   2091 #define EXTENDED_INQUIRY_INFO_SIZE 254
   2092 #define EVT_ENCRYPTION_KEY_REFRESH_COMPLETE 0x30
   2093 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2094 typedef struct {
   2095  uint8_t status;
   2096  uint16_t handle;
   2097 } __attribute__ ((packed)) evt_encryption_key_refresh_complete;
   2098 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2099 #define EVT_ENCRYPTION_KEY_REFRESH_COMPLETE_SIZE 3
   2100 #define EVT_IO_CAPABILITY_REQUEST 0x31
   2101 typedef struct {
   2102  bdaddr_t bdaddr;
   2103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2104 } __attribute__ ((packed)) evt_io_capability_request;
   2105 #define EVT_IO_CAPABILITY_REQUEST_SIZE 6
   2106 #define EVT_IO_CAPABILITY_RESPONSE 0x32
   2107 typedef struct {
   2108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2109  bdaddr_t bdaddr;
   2110  uint8_t capability;
   2111  uint8_t oob_data;
   2112  uint8_t authentication;
   2113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2114 } __attribute__ ((packed)) evt_io_capability_response;
   2115 #define EVT_IO_CAPABILITY_RESPONSE_SIZE 9
   2116 #define EVT_USER_CONFIRM_REQUEST 0x33
   2117 typedef struct {
   2118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2119  bdaddr_t bdaddr;
   2120  uint32_t passkey;
   2121 } __attribute__ ((packed)) evt_user_confirm_request;
   2122 #define EVT_USER_CONFIRM_REQUEST_SIZE 10
   2123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2124 #define EVT_USER_PASSKEY_REQUEST 0x34
   2125 typedef struct {
   2126  bdaddr_t bdaddr;
   2127 } __attribute__ ((packed)) evt_user_passkey_request;
   2128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2129 #define EVT_USER_PASSKEY_REQUEST_SIZE 6
   2130 #define EVT_REMOTE_OOB_DATA_REQUEST 0x35
   2131 typedef struct {
   2132  bdaddr_t bdaddr;
   2133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2134 } __attribute__ ((packed)) evt_remote_oob_data_request;
   2135 #define EVT_REMOTE_OOB_DATA_REQUEST_SIZE 6
   2136 #define EVT_SIMPLE_PAIRING_COMPLETE 0x36
   2137 typedef struct {
   2138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2139  uint8_t status;
   2140  bdaddr_t bdaddr;
   2141 } __attribute__ ((packed)) evt_simple_pairing_complete;
   2142 #define EVT_SIMPLE_PAIRING_COMPLETE_SIZE 7
   2143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2144 #define EVT_LINK_SUPERVISION_TIMEOUT_CHANGED 0x38
   2145 typedef struct {
   2146  uint16_t handle;
   2147  uint16_t timeout;
   2148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2149 } __attribute__ ((packed)) evt_link_supervision_timeout_changed;
   2150 #define EVT_LINK_SUPERVISION_TIMEOUT_CHANGED_SIZE 4
   2151 #define EVT_ENHANCED_FLUSH_COMPLETE 0x39
   2152 typedef struct {
   2153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2154  uint16_t handle;
   2155 } __attribute__ ((packed)) evt_enhanced_flush_complete;
   2156 #define EVT_ENHANCED_FLUSH_COMPLETE_SIZE 2
   2157 #define EVT_USER_PASSKEY_NOTIFY 0x3B
   2158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2159 typedef struct {
   2160  bdaddr_t bdaddr;
   2161  uint32_t passkey;
   2162 } __attribute__ ((packed)) evt_user_passkey_notify;
   2163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2164 #define EVT_USER_PASSKEY_NOTIFY_SIZE 10
   2165 #define EVT_KEYPRESS_NOTIFY 0x3C
   2166 typedef struct {
   2167  bdaddr_t bdaddr;
   2168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2169  uint8_t type;
   2170 } __attribute__ ((packed)) evt_keypress_notify;
   2171 #define EVT_KEYPRESS_NOTIFY_SIZE 7
   2172 #define EVT_REMOTE_HOST_FEATURES_NOTIFY 0x3D
   2173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2174 typedef struct {
   2175  bdaddr_t bdaddr;
   2176  uint8_t features[8];
   2177 } __attribute__ ((packed)) evt_remote_host_features_notify;
   2178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2179 #define EVT_REMOTE_HOST_FEATURES_NOTIFY_SIZE 14
   2180 #define EVT_LE_META_EVENT 0x3E
   2181 typedef struct {
   2182  uint8_t subevent;
   2183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2184  uint8_t data[0];
   2185 } __attribute__ ((packed)) evt_le_meta_event;
   2186 #define EVT_LE_META_EVENT_SIZE 1
   2187 #define EVT_LE_CONN_COMPLETE 0x01
   2188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2189 typedef struct {
   2190  uint8_t status;
   2191  uint16_t handle;
   2192  uint8_t role;
   2193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2194  uint8_t peer_bdaddr_type;
   2195  bdaddr_t peer_bdaddr;
   2196  uint16_t interval;
   2197  uint16_t latency;
   2198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2199  uint16_t supervision_timeout;
   2200  uint8_t master_clock_accuracy;
   2201 } __attribute__ ((packed)) evt_le_connection_complete;
   2202 #define EVT_LE_CONN_COMPLETE_SIZE 18
   2203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2204 #define EVT_LE_ADVERTISING_REPORT 0x02
   2205 typedef struct {
   2206  uint8_t evt_type;
   2207  uint8_t bdaddr_type;
   2208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2209  bdaddr_t bdaddr;
   2210  uint8_t length;
   2211  uint8_t data[0];
   2212 } __attribute__ ((packed)) le_advertising_info;
   2213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2214 #define LE_ADVERTISING_INFO_SIZE 9
   2215 #define EVT_LE_CONN_UPDATE_COMPLETE 0x03
   2216 typedef struct {
   2217  uint8_t status;
   2218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2219  uint16_t handle;
   2220  uint16_t interval;
   2221  uint16_t latency;
   2222  uint16_t supervision_timeout;
   2223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2224 } __attribute__ ((packed)) evt_le_connection_update_complete;
   2225 #define EVT_LE_CONN_UPDATE_COMPLETE_SIZE 9
   2226 #define EVT_LE_READ_REMOTE_USED_FEATURES_COMPLETE 0x04
   2227 typedef struct {
   2228 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2229  uint8_t status;
   2230  uint16_t handle;
   2231  uint8_t features[8];
   2232 } __attribute__ ((packed)) evt_le_read_remote_used_features_complete;
   2233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2234 #define EVT_LE_READ_REMOTE_USED_FEATURES_COMPLETE_SIZE 11
   2235 #define EVT_LE_LTK_REQUEST 0x05
   2236 typedef struct {
   2237  uint16_t handle;
   2238 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2239  uint64_t random;
   2240  uint16_t diversifier;
   2241 } __attribute__ ((packed)) evt_le_long_term_key_request;
   2242 #define EVT_LE_LTK_REQUEST_SIZE 12
   2243 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2244 #define EVT_PHYSICAL_LINK_COMPLETE 0x40
   2245 typedef struct {
   2246  uint8_t status;
   2247  uint8_t handle;
   2248 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2249 } __attribute__ ((packed)) evt_physical_link_complete;
   2250 #define EVT_PHYSICAL_LINK_COMPLETE_SIZE 2
   2251 #define EVT_CHANNEL_SELECTED 0x41
   2252 #define EVT_DISCONNECT_PHYSICAL_LINK_COMPLETE 0x42
   2253 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2254 typedef struct {
   2255  uint8_t status;
   2256  uint8_t handle;
   2257  uint8_t reason;
   2258 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2259 } __attribute__ ((packed)) evt_disconn_physical_link_complete;
   2260 #define EVT_DISCONNECT_PHYSICAL_LINK_COMPLETE_SIZE 3
   2261 #define EVT_PHYSICAL_LINK_LOSS_EARLY_WARNING 0x43
   2262 typedef struct {
   2263 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2264  uint8_t handle;
   2265  uint8_t reason;
   2266 } __attribute__ ((packed)) evt_physical_link_loss_warning;
   2267 #define EVT_PHYSICAL_LINK_LOSS_WARNING_SIZE 2
   2268 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2269 #define EVT_PHYSICAL_LINK_RECOVERY 0x44
   2270 typedef struct {
   2271  uint8_t handle;
   2272 } __attribute__ ((packed)) evt_physical_link_recovery;
   2273 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2274 #define EVT_PHYSICAL_LINK_RECOVERY_SIZE 1
   2275 #define EVT_LOGICAL_LINK_COMPLETE 0x45
   2276 typedef struct {
   2277  uint8_t status;
   2278 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2279  uint16_t log_handle;
   2280  uint8_t handle;
   2281  uint8_t tx_flow_id;
   2282 } __attribute__ ((packed)) evt_logical_link_complete;
   2283 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2284 #define EVT_LOGICAL_LINK_COMPLETE_SIZE 5
   2285 #define EVT_DISCONNECT_LOGICAL_LINK_COMPLETE 0x46
   2286 #define EVT_FLOW_SPEC_MODIFY_COMPLETE 0x47
   2287 typedef struct {
   2288 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2289  uint8_t status;
   2290  uint16_t handle;
   2291 } __attribute__ ((packed)) evt_flow_spec_modify_complete;
   2292 #define EVT_FLOW_SPEC_MODIFY_COMPLETE_SIZE 3
   2293 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2294 #define EVT_NUMBER_COMPLETED_BLOCKS 0x48
   2295 #define EVT_AMP_STATUS_CHANGE 0x4D
   2296 typedef struct {
   2297  uint8_t status;
   2298 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2299  uint8_t amp_status;
   2300 } __attribute__ ((packed)) evt_amp_status_change;
   2301 #define EVT_AMP_STATUS_CHANGE_SIZE 2
   2302 #define EVT_TESTING 0xFE
   2303 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2304 #define EVT_VENDOR 0xFF
   2305 #define EVT_STACK_INTERNAL 0xFD
   2306 typedef struct {
   2307  uint16_t type;
   2308 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2309  uint8_t data[0];
   2310 } __attribute__ ((packed)) evt_stack_internal;
   2311 #define EVT_STACK_INTERNAL_SIZE 2
   2312 #define EVT_SI_DEVICE 0x01
   2313 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2314 typedef struct {
   2315  uint16_t event;
   2316  uint16_t dev_id;
   2317 } __attribute__ ((packed)) evt_si_device;
   2318 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2319 #define EVT_SI_DEVICE_SIZE 4
   2320 #define HCI_TYPE_LEN 1
   2321 typedef struct {
   2322  uint16_t opcode;
   2323 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2324  uint8_t plen;
   2325 } __attribute__ ((packed)) hci_command_hdr;
   2326 #define HCI_COMMAND_HDR_SIZE 3
   2327 typedef struct {
   2328 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2329  uint8_t evt;
   2330  uint8_t plen;
   2331 } __attribute__ ((packed)) hci_event_hdr;
   2332 #define HCI_EVENT_HDR_SIZE 2
   2333 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2334 typedef struct {
   2335  uint16_t handle;
   2336  uint16_t dlen;
   2337 } __attribute__ ((packed)) hci_acl_hdr;
   2338 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2339 #define HCI_ACL_HDR_SIZE 4
   2340 typedef struct {
   2341  uint16_t handle;
   2342  uint8_t dlen;
   2343 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2344 } __attribute__ ((packed)) hci_sco_hdr;
   2345 #define HCI_SCO_HDR_SIZE 3
   2346 typedef struct {
   2347  uint16_t device;
   2348 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2349  uint16_t type;
   2350  uint16_t plen;
   2351 } __attribute__ ((packed)) hci_msg_hdr;
   2352 #define HCI_MSG_HDR_SIZE 6
   2353 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2354 #define cmd_opcode_pack(ogf, ocf) (uint16_t)((ocf & 0x03ff)|(ogf << 10))
   2355 #define cmd_opcode_ogf(op) (op >> 10)
   2356 #define cmd_opcode_ocf(op) (op & 0x03ff)
   2357 #define acl_handle_pack(h, f) (uint16_t)((h & 0x0fff)|(f << 12))
   2358 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2359 #define acl_handle(h) (h & 0x0fff)
   2360 #define acl_flags(h) (h >> 12)
   2361 #endif
   2362 #define HCI_DATA_DIR 1
   2363 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2364 #define HCI_FILTER 2
   2365 #define HCI_TIME_STAMP 3
   2366 #define HCI_CMSG_DIR 0x0001
   2367 #define HCI_CMSG_TSTAMP 0x0002
   2368 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2369 struct sockaddr_hci {
   2370  sa_family_t hci_family;
   2371  unsigned short hci_dev;
   2372  unsigned short hci_channel;
   2373 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2374 };
   2375 #define HCI_DEV_NONE 0xffff
   2376 #define HCI_CHANNEL_RAW 0
   2377 #define HCI_CHANNEL_CONTROL 1
   2378 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2379 struct hci_filter {
   2380  uint32_t type_mask;
   2381  uint32_t event_mask[2];
   2382  uint16_t opcode;
   2383 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2384 };
   2385 #define HCI_FLT_TYPE_BITS 31
   2386 #define HCI_FLT_EVENT_BITS 63
   2387 #define HCI_FLT_OGF_BITS 63
   2388 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2389 #define HCI_FLT_OCF_BITS 127
   2390 struct hci_dev_stats {
   2391  uint32_t err_rx;
   2392  uint32_t err_tx;
   2393 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2394  uint32_t cmd_tx;
   2395  uint32_t evt_rx;
   2396  uint32_t acl_tx;
   2397  uint32_t acl_rx;
   2398 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2399  uint32_t sco_tx;
   2400  uint32_t sco_rx;
   2401  uint32_t byte_rx;
   2402  uint32_t byte_tx;
   2403 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2404 };
   2405 struct hci_dev_info {
   2406  uint16_t dev_id;
   2407  char name[8];
   2408 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2409  bdaddr_t bdaddr;
   2410  uint32_t flags;
   2411  uint8_t type;
   2412  uint8_t features[8];
   2413 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2414  uint32_t pkt_type;
   2415  uint32_t link_policy;
   2416  uint32_t link_mode;
   2417  uint16_t acl_mtu;
   2418 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2419  uint16_t acl_pkts;
   2420  uint16_t sco_mtu;
   2421  uint16_t sco_pkts;
   2422  struct hci_dev_stats stat;
   2423 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2424 };
   2425 struct hci_conn_info {
   2426  uint16_t handle;
   2427  bdaddr_t bdaddr;
   2428 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2429  uint8_t type;
   2430  uint8_t out;
   2431  uint16_t state;
   2432  uint32_t link_mode;
   2433 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2434  uint32_t mtu;
   2435  uint32_t cnt;
   2436  uint32_t pkts;
   2437 };
   2438 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2439 struct hci_dev_req {
   2440  uint16_t dev_id;
   2441  uint32_t dev_opt;
   2442 };
   2443 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2444 struct hci_dev_list_req {
   2445  uint16_t dev_num;
   2446  struct hci_dev_req dev_req[0];
   2447 };
   2448 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2449 struct hci_conn_list_req {
   2450  uint16_t dev_id;
   2451  uint16_t conn_num;
   2452  struct hci_conn_info conn_info[0];
   2453 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2454 };
   2455 struct hci_conn_info_req {
   2456  bdaddr_t bdaddr;
   2457  uint8_t type;
   2458 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2459  struct hci_conn_info conn_info[0];
   2460 };
   2461 struct hci_auth_info_req {
   2462  bdaddr_t bdaddr;
   2463 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2464  uint8_t type;
   2465 };
   2466 struct hci_inquiry_req {
   2467  uint16_t dev_id;
   2468 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2469  uint16_t flags;
   2470  uint8_t lap[3];
   2471  uint8_t length;
   2472  uint8_t num_rsp;
   2473 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2474 };
   2475 #define IREQ_CACHE_FLUSH 0x0001
   2476 #ifdef __cplusplus
   2477 #endif
   2478 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
   2479 #endif
   2480 
   2481