Johan Hedberg | c02178d | 2010-12-08 00:21:05 +0200 | [diff] [blame] | 1 | /* |
| 2 | BlueZ - Bluetooth protocol stack for Linux |
| 3 | |
| 4 | Copyright (C) 2010 Nokia Corporation |
| 5 | |
| 6 | This program is free software; you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License version 2 as |
| 8 | published by the Free Software Foundation; |
| 9 | |
| 10 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 11 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 12 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. |
| 13 | IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY |
| 14 | CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES |
| 15 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 16 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 17 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 18 | |
| 19 | ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, |
| 20 | COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS |
| 21 | SOFTWARE IS DISCLAIMED. |
| 22 | */ |
| 23 | |
Szymon Janc | 4e51eae | 2011-02-25 19:05:48 +0100 | [diff] [blame] | 24 | #define MGMT_INDEX_NONE 0xFFFF |
| 25 | |
Johan Hedberg | c02178d | 2010-12-08 00:21:05 +0200 | [diff] [blame] | 26 | struct mgmt_hdr { |
| 27 | __le16 opcode; |
Szymon Janc | 4e51eae | 2011-02-25 19:05:48 +0100 | [diff] [blame] | 28 | __le16 index; |
Johan Hedberg | c02178d | 2010-12-08 00:21:05 +0200 | [diff] [blame] | 29 | __le16 len; |
| 30 | } __packed; |
Johan Hedberg | c02178d | 2010-12-08 00:21:05 +0200 | [diff] [blame] | 31 | |
Johan Hedberg | 02d9812 | 2010-12-13 21:07:04 +0200 | [diff] [blame] | 32 | #define MGMT_OP_READ_VERSION 0x0001 |
| 33 | struct mgmt_rp_read_version { |
| 34 | __u8 version; |
| 35 | __le16 revision; |
| 36 | } __packed; |
| 37 | |
Johan Hedberg | faba42e | 2010-12-13 21:07:05 +0200 | [diff] [blame] | 38 | #define MGMT_OP_READ_INDEX_LIST 0x0003 |
| 39 | struct mgmt_rp_read_index_list { |
| 40 | __le16 num_controllers; |
| 41 | __le16 index[0]; |
| 42 | } __packed; |
| 43 | |
Johan Hedberg | dc4fe30 | 2011-03-16 14:29:36 +0200 | [diff] [blame] | 44 | /* Reserve one extra byte for names in management messages so that they |
| 45 | * are always guaranteed to be nul-terminated */ |
| 46 | #define MGMT_MAX_NAME_LENGTH (HCI_MAX_NAME_LENGTH + 1) |
| 47 | |
Johan Hedberg | f7b64e6 | 2010-12-13 21:07:06 +0200 | [diff] [blame] | 48 | #define MGMT_OP_READ_INFO 0x0004 |
Johan Hedberg | f7b64e6 | 2010-12-13 21:07:06 +0200 | [diff] [blame] | 49 | struct mgmt_rp_read_info { |
Johan Hedberg | f7b64e6 | 2010-12-13 21:07:06 +0200 | [diff] [blame] | 50 | __u8 type; |
| 51 | __u8 powered; |
Johan Hedberg | 9fbcbb4 | 2010-12-30 00:18:33 +0200 | [diff] [blame] | 52 | __u8 connectable; |
Johan Hedberg | f7b64e6 | 2010-12-13 21:07:06 +0200 | [diff] [blame] | 53 | __u8 discoverable; |
| 54 | __u8 pairable; |
| 55 | __u8 sec_mode; |
| 56 | bdaddr_t bdaddr; |
| 57 | __u8 dev_class[3]; |
| 58 | __u8 features[8]; |
| 59 | __u16 manufacturer; |
| 60 | __u8 hci_ver; |
| 61 | __u16 hci_rev; |
Johan Hedberg | dc4fe30 | 2011-03-16 14:29:36 +0200 | [diff] [blame] | 62 | __u8 name[MGMT_MAX_NAME_LENGTH]; |
Sunny Kapdi | 93bef89 | 2012-07-30 14:52:56 -0700 | [diff] [blame] | 63 | __u8 le_white_list_size; |
Johan Hedberg | f7b64e6 | 2010-12-13 21:07:06 +0200 | [diff] [blame] | 64 | } __packed; |
| 65 | |
Johan Hedberg | 72a734e | 2010-12-30 00:38:22 +0200 | [diff] [blame] | 66 | struct mgmt_mode { |
Johan Hedberg | 72a734e | 2010-12-30 00:38:22 +0200 | [diff] [blame] | 67 | __u8 val; |
| 68 | } __packed; |
| 69 | |
Johan Hedberg | eec8d2b | 2010-12-16 10:17:38 +0200 | [diff] [blame] | 70 | #define MGMT_OP_SET_POWERED 0x0005 |
Johan Hedberg | eec8d2b | 2010-12-16 10:17:38 +0200 | [diff] [blame] | 71 | |
Johan Hedberg | 73f22f6 | 2010-12-29 16:00:25 +0200 | [diff] [blame] | 72 | #define MGMT_OP_SET_DISCOVERABLE 0x0006 |
Johan Hedberg | 73f22f6 | 2010-12-29 16:00:25 +0200 | [diff] [blame] | 73 | |
Johan Hedberg | 9fbcbb4 | 2010-12-30 00:18:33 +0200 | [diff] [blame] | 74 | #define MGMT_OP_SET_CONNECTABLE 0x0007 |
Johan Hedberg | 9fbcbb4 | 2010-12-30 00:18:33 +0200 | [diff] [blame] | 75 | |
Johan Hedberg | c542a06 | 2011-01-26 13:11:03 +0200 | [diff] [blame] | 76 | #define MGMT_OP_SET_PAIRABLE 0x0008 |
| 77 | |
Johan Hedberg | 2aeb9a1 | 2011-01-04 12:08:51 +0200 | [diff] [blame] | 78 | #define MGMT_OP_ADD_UUID 0x0009 |
| 79 | struct mgmt_cp_add_uuid { |
Johan Hedberg | 2aeb9a1 | 2011-01-04 12:08:51 +0200 | [diff] [blame] | 80 | __u8 uuid[16]; |
Johan Hedberg | 1aff6f0 | 2011-01-13 21:56:52 +0200 | [diff] [blame] | 81 | __u8 svc_hint; |
Johan Hedberg | 2aeb9a1 | 2011-01-04 12:08:51 +0200 | [diff] [blame] | 82 | } __packed; |
| 83 | |
| 84 | #define MGMT_OP_REMOVE_UUID 0x000A |
| 85 | struct mgmt_cp_remove_uuid { |
Johan Hedberg | 2aeb9a1 | 2011-01-04 12:08:51 +0200 | [diff] [blame] | 86 | __u8 uuid[16]; |
| 87 | } __packed; |
| 88 | |
Johan Hedberg | 1aff6f0 | 2011-01-13 21:56:52 +0200 | [diff] [blame] | 89 | #define MGMT_OP_SET_DEV_CLASS 0x000B |
| 90 | struct mgmt_cp_set_dev_class { |
Johan Hedberg | 1aff6f0 | 2011-01-13 21:56:52 +0200 | [diff] [blame] | 91 | __u8 major; |
| 92 | __u8 minor; |
| 93 | } __packed; |
Brian Gix | 8a7f164 | 2011-10-17 17:39:46 -0700 | [diff] [blame] | 94 | #define MGMT_MAJOR_CLASS_MASK 0x1F |
| 95 | #define MGMT_MAJOR_CLASS_LIMITED 0x20 |
Johan Hedberg | 1aff6f0 | 2011-01-13 21:56:52 +0200 | [diff] [blame] | 96 | |
| 97 | #define MGMT_OP_SET_SERVICE_CACHE 0x000C |
| 98 | struct mgmt_cp_set_service_cache { |
Johan Hedberg | 1aff6f0 | 2011-01-13 21:56:52 +0200 | [diff] [blame] | 99 | __u8 enable; |
| 100 | } __packed; |
| 101 | |
Johan Hedberg | 55ed8ca | 2011-01-17 14:41:05 +0200 | [diff] [blame] | 102 | struct mgmt_key_info { |
| 103 | bdaddr_t bdaddr; |
Brian Gix | cf95677 | 2011-10-20 15:18:51 -0700 | [diff] [blame] | 104 | u8 addr_type; |
| 105 | u8 key_type; |
Johan Hedberg | 55ed8ca | 2011-01-17 14:41:05 +0200 | [diff] [blame] | 106 | u8 val[16]; |
| 107 | u8 pin_len; |
Brian Gix | a68668b | 2011-08-11 15:49:36 -0700 | [diff] [blame] | 108 | u8 auth; |
Vinicius Costa Gomes | a7481be | 2011-07-07 18:59:35 -0300 | [diff] [blame] | 109 | u8 dlen; |
Brian Gix | a68668b | 2011-08-11 15:49:36 -0700 | [diff] [blame] | 110 | u8 data[10]; |
Johan Hedberg | 55ed8ca | 2011-01-17 14:41:05 +0200 | [diff] [blame] | 111 | } __packed; |
| 112 | |
| 113 | #define MGMT_OP_LOAD_KEYS 0x000D |
| 114 | struct mgmt_cp_load_keys { |
Johan Hedberg | 55ed8ca | 2011-01-17 14:41:05 +0200 | [diff] [blame] | 115 | __u8 debug_keys; |
| 116 | __le16 key_count; |
| 117 | struct mgmt_key_info keys[0]; |
| 118 | } __packed; |
| 119 | |
| 120 | #define MGMT_OP_REMOVE_KEY 0x000E |
| 121 | struct mgmt_cp_remove_key { |
Johan Hedberg | 55ed8ca | 2011-01-17 14:41:05 +0200 | [diff] [blame] | 122 | bdaddr_t bdaddr; |
| 123 | __u8 disconnect; |
| 124 | } __packed; |
| 125 | |
Johan Hedberg | 8962ee7 | 2011-01-20 12:40:27 +0200 | [diff] [blame] | 126 | #define MGMT_OP_DISCONNECT 0x000F |
| 127 | struct mgmt_cp_disconnect { |
Johan Hedberg | 8962ee7 | 2011-01-20 12:40:27 +0200 | [diff] [blame] | 128 | bdaddr_t bdaddr; |
| 129 | } __packed; |
| 130 | struct mgmt_rp_disconnect { |
Johan Hedberg | 8962ee7 | 2011-01-20 12:40:27 +0200 | [diff] [blame] | 131 | bdaddr_t bdaddr; |
| 132 | } __packed; |
| 133 | |
Johan Hedberg | 2784eb4 | 2011-01-21 13:56:35 +0200 | [diff] [blame] | 134 | #define MGMT_OP_GET_CONNECTIONS 0x0010 |
Johan Hedberg | 2784eb4 | 2011-01-21 13:56:35 +0200 | [diff] [blame] | 135 | struct mgmt_rp_get_connections { |
Johan Hedberg | 2784eb4 | 2011-01-21 13:56:35 +0200 | [diff] [blame] | 136 | __le16 conn_count; |
| 137 | bdaddr_t conn[0]; |
| 138 | } __packed; |
| 139 | |
Johan Hedberg | 980e1a5 | 2011-01-22 06:10:07 +0200 | [diff] [blame] | 140 | #define MGMT_OP_PIN_CODE_REPLY 0x0011 |
| 141 | struct mgmt_cp_pin_code_reply { |
Johan Hedberg | 980e1a5 | 2011-01-22 06:10:07 +0200 | [diff] [blame] | 142 | bdaddr_t bdaddr; |
| 143 | __u8 pin_len; |
| 144 | __u8 pin_code[16]; |
| 145 | } __packed; |
Johan Hedberg | ac56fb1 | 2011-02-19 12:05:59 -0300 | [diff] [blame] | 146 | struct mgmt_rp_pin_code_reply { |
Johan Hedberg | ac56fb1 | 2011-02-19 12:05:59 -0300 | [diff] [blame] | 147 | bdaddr_t bdaddr; |
| 148 | uint8_t status; |
| 149 | } __packed; |
Johan Hedberg | 980e1a5 | 2011-01-22 06:10:07 +0200 | [diff] [blame] | 150 | |
| 151 | #define MGMT_OP_PIN_CODE_NEG_REPLY 0x0012 |
| 152 | struct mgmt_cp_pin_code_neg_reply { |
Johan Hedberg | 980e1a5 | 2011-01-22 06:10:07 +0200 | [diff] [blame] | 153 | bdaddr_t bdaddr; |
| 154 | } __packed; |
| 155 | |
Johan Hedberg | 17fa4b9 | 2011-01-25 13:28:33 +0200 | [diff] [blame] | 156 | #define MGMT_OP_SET_IO_CAPABILITY 0x0013 |
| 157 | struct mgmt_cp_set_io_capability { |
Johan Hedberg | 17fa4b9 | 2011-01-25 13:28:33 +0200 | [diff] [blame] | 158 | __u8 io_capability; |
| 159 | } __packed; |
| 160 | |
Johan Hedberg | e9a416b | 2011-02-19 12:05:56 -0300 | [diff] [blame] | 161 | #define MGMT_OP_PAIR_DEVICE 0x0014 |
| 162 | struct mgmt_cp_pair_device { |
Johan Hedberg | e9a416b | 2011-02-19 12:05:56 -0300 | [diff] [blame] | 163 | bdaddr_t bdaddr; |
| 164 | __u8 io_cap; |
| 165 | } __packed; |
| 166 | struct mgmt_rp_pair_device { |
Johan Hedberg | e9a416b | 2011-02-19 12:05:56 -0300 | [diff] [blame] | 167 | bdaddr_t bdaddr; |
| 168 | __u8 status; |
| 169 | } __packed; |
| 170 | |
Johan Hedberg | a5c2968 | 2011-02-19 12:05:57 -0300 | [diff] [blame] | 171 | #define MGMT_OP_USER_CONFIRM_REPLY 0x0015 |
| 172 | struct mgmt_cp_user_confirm_reply { |
Johan Hedberg | a5c2968 | 2011-02-19 12:05:57 -0300 | [diff] [blame] | 173 | bdaddr_t bdaddr; |
| 174 | } __packed; |
| 175 | struct mgmt_rp_user_confirm_reply { |
Johan Hedberg | a5c2968 | 2011-02-19 12:05:57 -0300 | [diff] [blame] | 176 | bdaddr_t bdaddr; |
| 177 | __u8 status; |
| 178 | } __packed; |
| 179 | |
| 180 | #define MGMT_OP_USER_CONFIRM_NEG_REPLY 0x0016 |
| 181 | |
Johan Hedberg | b312b161 | 2011-03-16 14:29:37 +0200 | [diff] [blame] | 182 | #define MGMT_OP_SET_LOCAL_NAME 0x0017 |
| 183 | struct mgmt_cp_set_local_name { |
| 184 | __u8 name[MGMT_MAX_NAME_LENGTH]; |
| 185 | } __packed; |
| 186 | |
Szymon Janc | c35938b | 2011-03-22 13:12:21 +0100 | [diff] [blame] | 187 | #define MGMT_OP_READ_LOCAL_OOB_DATA 0x0018 |
| 188 | struct mgmt_rp_read_local_oob_data { |
| 189 | __u8 hash[16]; |
| 190 | __u8 randomizer[16]; |
| 191 | } __packed; |
| 192 | |
Szymon Janc | 2763eda | 2011-03-22 13:12:22 +0100 | [diff] [blame] | 193 | #define MGMT_OP_ADD_REMOTE_OOB_DATA 0x0019 |
| 194 | struct mgmt_cp_add_remote_oob_data { |
| 195 | bdaddr_t bdaddr; |
| 196 | __u8 hash[16]; |
| 197 | __u8 randomizer[16]; |
| 198 | } __packed; |
| 199 | |
| 200 | #define MGMT_OP_REMOVE_REMOTE_OOB_DATA 0x001A |
| 201 | struct mgmt_cp_remove_remote_oob_data { |
| 202 | bdaddr_t bdaddr; |
| 203 | } __packed; |
| 204 | |
Brian Gix | a68668b | 2011-08-11 15:49:36 -0700 | [diff] [blame] | 205 | #define MGMT_OP_START_DISCOVERY 0x001B |
| 206 | |
| 207 | #define MGMT_OP_STOP_DISCOVERY 0x001C |
| 208 | |
| 209 | #define MGMT_OP_USER_PASSKEY_REPLY 0x001D |
| 210 | struct mgmt_cp_user_passkey_reply { |
| 211 | bdaddr_t bdaddr; |
| 212 | __le32 passkey; |
| 213 | } __packed; |
| 214 | |
| 215 | #define MGMT_OP_RESOLVE_NAME 0x001E |
| 216 | struct mgmt_cp_resolve_name { |
| 217 | bdaddr_t bdaddr; |
| 218 | } __packed; |
| 219 | |
Brian Gix | 8a7f164 | 2011-10-17 17:39:46 -0700 | [diff] [blame] | 220 | #define MGMT_OP_SET_LIMIT_DISCOVERABLE 0x001F |
| 221 | |
Brian Gix | 7f7e16c | 2011-11-01 16:27:25 -0700 | [diff] [blame] | 222 | #define MGMT_OP_SET_CONNECTION_PARAMS 0x0020 |
| 223 | struct mgmt_cp_set_connection_params { |
| 224 | bdaddr_t bdaddr; |
| 225 | __le16 interval_min; |
| 226 | __le16 interval_max; |
| 227 | __le16 slave_latency; |
| 228 | __le16 timeout_multiplier; |
| 229 | } __packed; |
| 230 | |
Prabhakaran Mc | 46230fa | 2011-11-30 18:11:21 +0530 | [diff] [blame] | 231 | #define MGMT_OP_ENCRYPT_LINK 0x0021 |
| 232 | struct mgmt_cp_encrypt_link { |
| 233 | bdaddr_t bdaddr; |
| 234 | __u8 enable; |
| 235 | } __packed; |
| 236 | |
Archana Ramachandran | 26a752b | 2011-12-20 11:27:40 -0800 | [diff] [blame] | 237 | #define MGMT_OP_SET_RSSI_REPORTER 0x0022 |
| 238 | struct mgmt_cp_set_rssi_reporter { |
| 239 | bdaddr_t bdaddr; |
| 240 | __s8 rssi_threshold; |
| 241 | __le16 interval; |
| 242 | __u8 updateOnThreshExceed; |
| 243 | } __packed; |
| 244 | |
| 245 | #define MGMT_OP_UNSET_RSSI_REPORTER 0x0023 |
| 246 | struct mgmt_cp_unset_rssi_reporter { |
| 247 | bdaddr_t bdaddr; |
| 248 | } __packed; |
| 249 | |
Ram Mohan Korukonda | 1272761 | 2012-11-27 16:13:54 +0530 | [diff] [blame] | 250 | #define MGMT_OP_CANCEL_RESOLVE_NAME 0x0024 |
| 251 | struct mgmt_cp_cancel_resolve_name { |
| 252 | bdaddr_t bdaddr; |
| 253 | } __packed; |
| 254 | |
Sunny Kapdi | 93bef89 | 2012-07-30 14:52:56 -0700 | [diff] [blame] | 255 | #define MGMT_OP_LE_READ_WHITE_LIST_SIZE 0xE000 |
| 256 | |
| 257 | #define MGMT_OP_LE_CLEAR_WHITE_LIST 0xE001 |
| 258 | |
| 259 | #define MGMT_OP_LE_ADD_DEV_WHITE_LIST 0xE002 |
| 260 | struct mgmt_cp_le_add_dev_white_list { |
| 261 | __u8 addr_type; |
| 262 | bdaddr_t bdaddr; |
| 263 | } __packed; |
| 264 | |
| 265 | #define MGMT_OP_LE_REMOVE_DEV_WHITE_LIST 0xE003 |
| 266 | struct mgmt_cp_le_remove_dev_white_list { |
| 267 | __u8 addr_type; |
| 268 | bdaddr_t bdaddr; |
| 269 | } __packed; |
| 270 | |
| 271 | #define MGMT_OP_LE_CREATE_CONN_WHITE_LIST 0xE004 |
| 272 | |
| 273 | #define MGMT_OP_LE_CANCEL_CREATE_CONN_WHITE_LIST 0xE005 |
| 274 | |
Archana Ramachandran | 907d523 | 2012-10-02 17:55:55 -0700 | [diff] [blame] | 275 | #define MGMT_OP_LE_CANCEL_CREATE_CONN 0xE006 |
| 276 | struct mgmt_cp_le_cancel_create_conn { |
| 277 | bdaddr_t bdaddr; |
| 278 | } __packed; |
| 279 | |
Johan Hedberg | c02178d | 2010-12-08 00:21:05 +0200 | [diff] [blame] | 280 | #define MGMT_EV_CMD_COMPLETE 0x0001 |
| 281 | struct mgmt_ev_cmd_complete { |
| 282 | __le16 opcode; |
| 283 | __u8 data[0]; |
| 284 | } __packed; |
| 285 | |
| 286 | #define MGMT_EV_CMD_STATUS 0x0002 |
| 287 | struct mgmt_ev_cmd_status { |
| 288 | __u8 status; |
| 289 | __le16 opcode; |
| 290 | } __packed; |
| 291 | |
| 292 | #define MGMT_EV_CONTROLLER_ERROR 0x0003 |
| 293 | struct mgmt_ev_controller_error { |
Johan Hedberg | c02178d | 2010-12-08 00:21:05 +0200 | [diff] [blame] | 294 | __u8 error_code; |
| 295 | } __packed; |
Johan Hedberg | c71e97b | 2010-12-13 21:07:07 +0200 | [diff] [blame] | 296 | |
| 297 | #define MGMT_EV_INDEX_ADDED 0x0004 |
Johan Hedberg | c71e97b | 2010-12-13 21:07:07 +0200 | [diff] [blame] | 298 | |
| 299 | #define MGMT_EV_INDEX_REMOVED 0x0005 |
Johan Hedberg | 5add6af | 2010-12-16 10:00:37 +0200 | [diff] [blame] | 300 | |
| 301 | #define MGMT_EV_POWERED 0x0006 |
Johan Hedberg | 73f22f6 | 2010-12-29 16:00:25 +0200 | [diff] [blame] | 302 | |
| 303 | #define MGMT_EV_DISCOVERABLE 0x0007 |
Johan Hedberg | 9fbcbb4 | 2010-12-30 00:18:33 +0200 | [diff] [blame] | 304 | |
| 305 | #define MGMT_EV_CONNECTABLE 0x0008 |
Johan Hedberg | c542a06 | 2011-01-26 13:11:03 +0200 | [diff] [blame] | 306 | |
| 307 | #define MGMT_EV_PAIRABLE 0x0009 |
Johan Hedberg | 55ed8ca | 2011-01-17 14:41:05 +0200 | [diff] [blame] | 308 | |
| 309 | #define MGMT_EV_NEW_KEY 0x000A |
| 310 | struct mgmt_ev_new_key { |
Brian Gix | a68668b | 2011-08-11 15:49:36 -0700 | [diff] [blame] | 311 | __u8 store_hint; |
Johan Hedberg | 55ed8ca | 2011-01-17 14:41:05 +0200 | [diff] [blame] | 312 | struct mgmt_key_info key; |
Johan Hedberg | 55ed8ca | 2011-01-17 14:41:05 +0200 | [diff] [blame] | 313 | } __packed; |
Johan Hedberg | f752054 | 2011-01-20 12:34:39 +0200 | [diff] [blame] | 314 | |
| 315 | #define MGMT_EV_CONNECTED 0x000B |
| 316 | struct mgmt_ev_connected { |
Johan Hedberg | f752054 | 2011-01-20 12:34:39 +0200 | [diff] [blame] | 317 | bdaddr_t bdaddr; |
Brian Gix | 2e2f50d | 2011-09-13 12:36:04 -0700 | [diff] [blame] | 318 | __u8 le; |
Johan Hedberg | f752054 | 2011-01-20 12:34:39 +0200 | [diff] [blame] | 319 | } __packed; |
| 320 | |
| 321 | #define MGMT_EV_DISCONNECTED 0x000C |
| 322 | struct mgmt_ev_disconnected { |
Johan Hedberg | f752054 | 2011-01-20 12:34:39 +0200 | [diff] [blame] | 323 | bdaddr_t bdaddr; |
Archana Ramachandran | da09d26 | 2012-08-14 12:03:01 -0700 | [diff] [blame] | 324 | __u8 reason; |
Johan Hedberg | f752054 | 2011-01-20 12:34:39 +0200 | [diff] [blame] | 325 | } __packed; |
Johan Hedberg | 17d5c04 | 2011-01-22 06:09:08 +0200 | [diff] [blame] | 326 | |
| 327 | #define MGMT_EV_CONNECT_FAILED 0x000D |
| 328 | struct mgmt_ev_connect_failed { |
Johan Hedberg | 17d5c04 | 2011-01-22 06:09:08 +0200 | [diff] [blame] | 329 | bdaddr_t bdaddr; |
| 330 | __u8 status; |
| 331 | } __packed; |
Johan Hedberg | 980e1a5 | 2011-01-22 06:10:07 +0200 | [diff] [blame] | 332 | |
| 333 | #define MGMT_EV_PIN_CODE_REQUEST 0x000E |
| 334 | struct mgmt_ev_pin_code_request { |
Johan Hedberg | 980e1a5 | 2011-01-22 06:10:07 +0200 | [diff] [blame] | 335 | bdaddr_t bdaddr; |
Brian Gix | a68668b | 2011-08-11 15:49:36 -0700 | [diff] [blame] | 336 | __u8 secure; |
Johan Hedberg | 980e1a5 | 2011-01-22 06:10:07 +0200 | [diff] [blame] | 337 | } __packed; |
Johan Hedberg | a5c2968 | 2011-02-19 12:05:57 -0300 | [diff] [blame] | 338 | |
| 339 | #define MGMT_EV_USER_CONFIRM_REQUEST 0x000F |
| 340 | struct mgmt_ev_user_confirm_request { |
Johan Hedberg | a5c2968 | 2011-02-19 12:05:57 -0300 | [diff] [blame] | 341 | bdaddr_t bdaddr; |
Brian Gix | a68668b | 2011-08-11 15:49:36 -0700 | [diff] [blame] | 342 | __u8 auto_confirm; |
| 343 | __u8 event; |
Johan Hedberg | a5c2968 | 2011-02-19 12:05:57 -0300 | [diff] [blame] | 344 | __le32 value; |
| 345 | } __packed; |
Johan Hedberg | 2a61169 | 2011-02-19 12:06:00 -0300 | [diff] [blame] | 346 | |
| 347 | #define MGMT_EV_AUTH_FAILED 0x0010 |
| 348 | struct mgmt_ev_auth_failed { |
Johan Hedberg | 2a61169 | 2011-02-19 12:06:00 -0300 | [diff] [blame] | 349 | bdaddr_t bdaddr; |
| 350 | __u8 status; |
| 351 | } __packed; |
Johan Hedberg | b312b161 | 2011-03-16 14:29:37 +0200 | [diff] [blame] | 352 | |
| 353 | #define MGMT_EV_LOCAL_NAME_CHANGED 0x0011 |
| 354 | struct mgmt_ev_local_name_changed { |
| 355 | __u8 name[MGMT_MAX_NAME_LENGTH]; |
| 356 | } __packed; |
Johan Hedberg | e17acd4 | 2011-03-30 23:57:16 +0300 | [diff] [blame] | 357 | |
| 358 | #define MGMT_EV_DEVICE_FOUND 0x0012 |
| 359 | struct mgmt_ev_device_found { |
| 360 | bdaddr_t bdaddr; |
| 361 | __u8 dev_class[3]; |
| 362 | __s8 rssi; |
Brian Gix | a68668b | 2011-08-11 15:49:36 -0700 | [diff] [blame] | 363 | __u8 le; |
| 364 | __u8 type; |
Johan Hedberg | e17acd4 | 2011-03-30 23:57:16 +0300 | [diff] [blame] | 365 | __u8 eir[HCI_MAX_EIR_LENGTH]; |
| 366 | } __packed; |
Johan Hedberg | a88a965 | 2011-03-30 13:18:12 +0300 | [diff] [blame] | 367 | |
| 368 | #define MGMT_EV_REMOTE_NAME 0x0013 |
| 369 | struct mgmt_ev_remote_name { |
| 370 | bdaddr_t bdaddr; |
Brian Gix | a68668b | 2011-08-11 15:49:36 -0700 | [diff] [blame] | 371 | __u8 status; |
Johan Hedberg | a88a965 | 2011-03-30 13:18:12 +0300 | [diff] [blame] | 372 | __u8 name[MGMT_MAX_NAME_LENGTH]; |
| 373 | } __packed; |
Brian Gix | a68668b | 2011-08-11 15:49:36 -0700 | [diff] [blame] | 374 | |
| 375 | #define MGMT_EV_DISCOVERING 0x0014 |
| 376 | |
| 377 | #define MGMT_EV_USER_PASSKEY_REQUEST 0x0015 |
| 378 | struct mgmt_ev_user_passkey_request { |
| 379 | bdaddr_t bdaddr; |
| 380 | } __packed; |
| 381 | |
Prabhakaran Mc | 46230fa | 2011-11-30 18:11:21 +0530 | [diff] [blame] | 382 | #define MGMT_EV_ENCRYPT_CHANGE 0x0016 |
| 383 | struct mgmt_ev_encrypt_change { |
| 384 | bdaddr_t bdaddr; |
| 385 | __u8 status; |
| 386 | } __packed; |
| 387 | |
| 388 | |
Srinivas Krovvidi | 0916aed | 2011-12-20 12:06:34 +0530 | [diff] [blame] | 389 | #define MGMT_EV_REMOTE_CLASS 0x0017 |
| 390 | struct mgmt_ev_remote_class { |
| 391 | bdaddr_t bdaddr; |
| 392 | __u8 dev_class[3]; |
| 393 | } __packed; |
Srinivas Krovvidi | d352b26 | 2012-01-12 19:46:26 +0530 | [diff] [blame] | 394 | |
| 395 | #define MGMT_EV_REMOTE_VERSION 0x0018 |
| 396 | struct mgmt_ev_remote_version { |
| 397 | bdaddr_t bdaddr; |
| 398 | __u8 lmp_ver; |
| 399 | __u16 manufacturer; |
| 400 | __u16 lmp_subver; |
| 401 | } __packed; |
Sunny Kapdi | f3caf88 | 2012-02-25 19:27:09 -0800 | [diff] [blame] | 402 | |
| 403 | #define MGMT_EV_REMOTE_FEATURES 0x0019 |
| 404 | struct mgmt_ev_remote_features { |
| 405 | bdaddr_t bdaddr; |
| 406 | uint8_t features[8]; |
| 407 | } __packed; |
Archana Ramachandran | 26a752b | 2011-12-20 11:27:40 -0800 | [diff] [blame] | 408 | |
| 409 | #define MGMT_EV_RSSI_UPDATE 0x0020 |
| 410 | struct mgmt_ev_rssi_update { |
| 411 | bdaddr_t bdaddr; |
| 412 | __s8 rssi; |
| 413 | } __packed; |
Sunny Kapdi | a42b502 | 2012-07-05 22:48:31 -0700 | [diff] [blame] | 414 | |
| 415 | #define MGMT_EV_LE_CONN_PARAMS 0xF000 |
| 416 | struct mgmt_ev_le_conn_params { |
| 417 | bdaddr_t bdaddr; |
| 418 | __u16 interval; |
| 419 | __u16 latency; |
| 420 | __u16 timeout; |
| 421 | } __packed; |