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]; |
Johan Hedberg | f7b64e6 | 2010-12-13 21:07:06 +0200 | [diff] [blame] | 63 | } __packed; |
| 64 | |
Johan Hedberg | 72a734e | 2010-12-30 00:38:22 +0200 | [diff] [blame] | 65 | struct mgmt_mode { |
Johan Hedberg | 72a734e | 2010-12-30 00:38:22 +0200 | [diff] [blame] | 66 | __u8 val; |
| 67 | } __packed; |
| 68 | |
Johan Hedberg | eec8d2b | 2010-12-16 10:17:38 +0200 | [diff] [blame] | 69 | #define MGMT_OP_SET_POWERED 0x0005 |
Johan Hedberg | eec8d2b | 2010-12-16 10:17:38 +0200 | [diff] [blame] | 70 | |
Johan Hedberg | 73f22f6 | 2010-12-29 16:00:25 +0200 | [diff] [blame] | 71 | #define MGMT_OP_SET_DISCOVERABLE 0x0006 |
Johan Hedberg | 73f22f6 | 2010-12-29 16:00:25 +0200 | [diff] [blame] | 72 | |
Johan Hedberg | 9fbcbb4 | 2010-12-30 00:18:33 +0200 | [diff] [blame] | 73 | #define MGMT_OP_SET_CONNECTABLE 0x0007 |
Johan Hedberg | 9fbcbb4 | 2010-12-30 00:18:33 +0200 | [diff] [blame] | 74 | |
Johan Hedberg | c542a06 | 2011-01-26 13:11:03 +0200 | [diff] [blame] | 75 | #define MGMT_OP_SET_PAIRABLE 0x0008 |
| 76 | |
Johan Hedberg | 2aeb9a1 | 2011-01-04 12:08:51 +0200 | [diff] [blame] | 77 | #define MGMT_OP_ADD_UUID 0x0009 |
| 78 | struct mgmt_cp_add_uuid { |
Johan Hedberg | 2aeb9a1 | 2011-01-04 12:08:51 +0200 | [diff] [blame] | 79 | __u8 uuid[16]; |
Johan Hedberg | 1aff6f0 | 2011-01-13 21:56:52 +0200 | [diff] [blame] | 80 | __u8 svc_hint; |
Johan Hedberg | 2aeb9a1 | 2011-01-04 12:08:51 +0200 | [diff] [blame] | 81 | } __packed; |
| 82 | |
| 83 | #define MGMT_OP_REMOVE_UUID 0x000A |
| 84 | struct mgmt_cp_remove_uuid { |
Johan Hedberg | 2aeb9a1 | 2011-01-04 12:08:51 +0200 | [diff] [blame] | 85 | __u8 uuid[16]; |
| 86 | } __packed; |
| 87 | |
Johan Hedberg | 1aff6f0 | 2011-01-13 21:56:52 +0200 | [diff] [blame] | 88 | #define MGMT_OP_SET_DEV_CLASS 0x000B |
| 89 | struct mgmt_cp_set_dev_class { |
Johan Hedberg | 1aff6f0 | 2011-01-13 21:56:52 +0200 | [diff] [blame] | 90 | __u8 major; |
| 91 | __u8 minor; |
| 92 | } __packed; |
Brian Gix | 8a7f164 | 2011-10-17 17:39:46 -0700 | [diff] [blame] | 93 | #define MGMT_MAJOR_CLASS_MASK 0x1F |
| 94 | #define MGMT_MAJOR_CLASS_LIMITED 0x20 |
Johan Hedberg | 1aff6f0 | 2011-01-13 21:56:52 +0200 | [diff] [blame] | 95 | |
| 96 | #define MGMT_OP_SET_SERVICE_CACHE 0x000C |
| 97 | struct mgmt_cp_set_service_cache { |
Johan Hedberg | 1aff6f0 | 2011-01-13 21:56:52 +0200 | [diff] [blame] | 98 | __u8 enable; |
| 99 | } __packed; |
| 100 | |
Johan Hedberg | 55ed8ca | 2011-01-17 14:41:05 +0200 | [diff] [blame] | 101 | struct mgmt_key_info { |
| 102 | bdaddr_t bdaddr; |
Brian Gix | cf95677 | 2011-10-20 15:18:51 -0700 | [diff] [blame] | 103 | u8 addr_type; |
| 104 | u8 key_type; |
Johan Hedberg | 55ed8ca | 2011-01-17 14:41:05 +0200 | [diff] [blame] | 105 | u8 val[16]; |
| 106 | u8 pin_len; |
Brian Gix | a68668b | 2011-08-11 15:49:36 -0700 | [diff] [blame] | 107 | u8 auth; |
Vinicius Costa Gomes | a7481be | 2011-07-07 18:59:35 -0300 | [diff] [blame] | 108 | u8 dlen; |
Brian Gix | a68668b | 2011-08-11 15:49:36 -0700 | [diff] [blame] | 109 | u8 data[10]; |
Johan Hedberg | 55ed8ca | 2011-01-17 14:41:05 +0200 | [diff] [blame] | 110 | } __packed; |
| 111 | |
| 112 | #define MGMT_OP_LOAD_KEYS 0x000D |
| 113 | struct mgmt_cp_load_keys { |
Johan Hedberg | 55ed8ca | 2011-01-17 14:41:05 +0200 | [diff] [blame] | 114 | __u8 debug_keys; |
| 115 | __le16 key_count; |
| 116 | struct mgmt_key_info keys[0]; |
| 117 | } __packed; |
| 118 | |
| 119 | #define MGMT_OP_REMOVE_KEY 0x000E |
| 120 | struct mgmt_cp_remove_key { |
Johan Hedberg | 55ed8ca | 2011-01-17 14:41:05 +0200 | [diff] [blame] | 121 | bdaddr_t bdaddr; |
| 122 | __u8 disconnect; |
| 123 | } __packed; |
| 124 | |
Johan Hedberg | 8962ee7 | 2011-01-20 12:40:27 +0200 | [diff] [blame] | 125 | #define MGMT_OP_DISCONNECT 0x000F |
| 126 | struct mgmt_cp_disconnect { |
Johan Hedberg | 8962ee7 | 2011-01-20 12:40:27 +0200 | [diff] [blame] | 127 | bdaddr_t bdaddr; |
| 128 | } __packed; |
| 129 | struct mgmt_rp_disconnect { |
Johan Hedberg | 8962ee7 | 2011-01-20 12:40:27 +0200 | [diff] [blame] | 130 | bdaddr_t bdaddr; |
| 131 | } __packed; |
| 132 | |
Johan Hedberg | 2784eb4 | 2011-01-21 13:56:35 +0200 | [diff] [blame] | 133 | #define MGMT_OP_GET_CONNECTIONS 0x0010 |
Johan Hedberg | 2784eb4 | 2011-01-21 13:56:35 +0200 | [diff] [blame] | 134 | struct mgmt_rp_get_connections { |
Johan Hedberg | 2784eb4 | 2011-01-21 13:56:35 +0200 | [diff] [blame] | 135 | __le16 conn_count; |
| 136 | bdaddr_t conn[0]; |
| 137 | } __packed; |
| 138 | |
Johan Hedberg | 980e1a5 | 2011-01-22 06:10:07 +0200 | [diff] [blame] | 139 | #define MGMT_OP_PIN_CODE_REPLY 0x0011 |
| 140 | struct mgmt_cp_pin_code_reply { |
Johan Hedberg | 980e1a5 | 2011-01-22 06:10:07 +0200 | [diff] [blame] | 141 | bdaddr_t bdaddr; |
| 142 | __u8 pin_len; |
| 143 | __u8 pin_code[16]; |
| 144 | } __packed; |
Johan Hedberg | ac56fb1 | 2011-02-19 12:05:59 -0300 | [diff] [blame] | 145 | struct mgmt_rp_pin_code_reply { |
Johan Hedberg | ac56fb1 | 2011-02-19 12:05:59 -0300 | [diff] [blame] | 146 | bdaddr_t bdaddr; |
| 147 | uint8_t status; |
| 148 | } __packed; |
Johan Hedberg | 980e1a5 | 2011-01-22 06:10:07 +0200 | [diff] [blame] | 149 | |
| 150 | #define MGMT_OP_PIN_CODE_NEG_REPLY 0x0012 |
| 151 | struct mgmt_cp_pin_code_neg_reply { |
Johan Hedberg | 980e1a5 | 2011-01-22 06:10:07 +0200 | [diff] [blame] | 152 | bdaddr_t bdaddr; |
| 153 | } __packed; |
| 154 | |
Johan Hedberg | 17fa4b9 | 2011-01-25 13:28:33 +0200 | [diff] [blame] | 155 | #define MGMT_OP_SET_IO_CAPABILITY 0x0013 |
| 156 | struct mgmt_cp_set_io_capability { |
Johan Hedberg | 17fa4b9 | 2011-01-25 13:28:33 +0200 | [diff] [blame] | 157 | __u8 io_capability; |
| 158 | } __packed; |
| 159 | |
Johan Hedberg | e9a416b | 2011-02-19 12:05:56 -0300 | [diff] [blame] | 160 | #define MGMT_OP_PAIR_DEVICE 0x0014 |
| 161 | struct mgmt_cp_pair_device { |
Johan Hedberg | e9a416b | 2011-02-19 12:05:56 -0300 | [diff] [blame] | 162 | bdaddr_t bdaddr; |
| 163 | __u8 io_cap; |
| 164 | } __packed; |
| 165 | struct mgmt_rp_pair_device { |
Johan Hedberg | e9a416b | 2011-02-19 12:05:56 -0300 | [diff] [blame] | 166 | bdaddr_t bdaddr; |
| 167 | __u8 status; |
| 168 | } __packed; |
| 169 | |
Johan Hedberg | a5c2968 | 2011-02-19 12:05:57 -0300 | [diff] [blame] | 170 | #define MGMT_OP_USER_CONFIRM_REPLY 0x0015 |
| 171 | struct mgmt_cp_user_confirm_reply { |
Johan Hedberg | a5c2968 | 2011-02-19 12:05:57 -0300 | [diff] [blame] | 172 | bdaddr_t bdaddr; |
| 173 | } __packed; |
| 174 | struct mgmt_rp_user_confirm_reply { |
Johan Hedberg | a5c2968 | 2011-02-19 12:05:57 -0300 | [diff] [blame] | 175 | bdaddr_t bdaddr; |
| 176 | __u8 status; |
| 177 | } __packed; |
| 178 | |
| 179 | #define MGMT_OP_USER_CONFIRM_NEG_REPLY 0x0016 |
| 180 | |
Johan Hedberg | b312b161 | 2011-03-16 14:29:37 +0200 | [diff] [blame] | 181 | #define MGMT_OP_SET_LOCAL_NAME 0x0017 |
| 182 | struct mgmt_cp_set_local_name { |
| 183 | __u8 name[MGMT_MAX_NAME_LENGTH]; |
| 184 | } __packed; |
| 185 | |
Szymon Janc | c35938b | 2011-03-22 13:12:21 +0100 | [diff] [blame] | 186 | #define MGMT_OP_READ_LOCAL_OOB_DATA 0x0018 |
| 187 | struct mgmt_rp_read_local_oob_data { |
| 188 | __u8 hash[16]; |
| 189 | __u8 randomizer[16]; |
| 190 | } __packed; |
| 191 | |
Szymon Janc | 2763eda | 2011-03-22 13:12:22 +0100 | [diff] [blame] | 192 | #define MGMT_OP_ADD_REMOTE_OOB_DATA 0x0019 |
| 193 | struct mgmt_cp_add_remote_oob_data { |
| 194 | bdaddr_t bdaddr; |
| 195 | __u8 hash[16]; |
| 196 | __u8 randomizer[16]; |
| 197 | } __packed; |
| 198 | |
| 199 | #define MGMT_OP_REMOVE_REMOTE_OOB_DATA 0x001A |
| 200 | struct mgmt_cp_remove_remote_oob_data { |
| 201 | bdaddr_t bdaddr; |
| 202 | } __packed; |
| 203 | |
Brian Gix | a68668b | 2011-08-11 15:49:36 -0700 | [diff] [blame] | 204 | #define MGMT_OP_START_DISCOVERY 0x001B |
| 205 | |
| 206 | #define MGMT_OP_STOP_DISCOVERY 0x001C |
| 207 | |
| 208 | #define MGMT_OP_USER_PASSKEY_REPLY 0x001D |
| 209 | struct mgmt_cp_user_passkey_reply { |
| 210 | bdaddr_t bdaddr; |
| 211 | __le32 passkey; |
| 212 | } __packed; |
| 213 | |
| 214 | #define MGMT_OP_RESOLVE_NAME 0x001E |
| 215 | struct mgmt_cp_resolve_name { |
| 216 | bdaddr_t bdaddr; |
| 217 | } __packed; |
| 218 | |
Brian Gix | 8a7f164 | 2011-10-17 17:39:46 -0700 | [diff] [blame] | 219 | #define MGMT_OP_SET_LIMIT_DISCOVERABLE 0x001F |
| 220 | |
Brian Gix | 7f7e16c | 2011-11-01 16:27:25 -0700 | [diff] [blame] | 221 | #define MGMT_OP_SET_CONNECTION_PARAMS 0x0020 |
| 222 | struct mgmt_cp_set_connection_params { |
| 223 | bdaddr_t bdaddr; |
| 224 | __le16 interval_min; |
| 225 | __le16 interval_max; |
| 226 | __le16 slave_latency; |
| 227 | __le16 timeout_multiplier; |
| 228 | } __packed; |
| 229 | |
Prabhakaran Mc | 46230fa | 2011-11-30 18:11:21 +0530 | [diff] [blame] | 230 | #define MGMT_OP_ENCRYPT_LINK 0x0021 |
| 231 | struct mgmt_cp_encrypt_link { |
| 232 | bdaddr_t bdaddr; |
| 233 | __u8 enable; |
| 234 | } __packed; |
| 235 | |
Archana Ramachandran | 26a752b | 2011-12-20 11:27:40 -0800 | [diff] [blame] | 236 | #define MGMT_OP_SET_RSSI_REPORTER 0x0022 |
| 237 | struct mgmt_cp_set_rssi_reporter { |
| 238 | bdaddr_t bdaddr; |
| 239 | __s8 rssi_threshold; |
| 240 | __le16 interval; |
| 241 | __u8 updateOnThreshExceed; |
| 242 | } __packed; |
| 243 | |
| 244 | #define MGMT_OP_UNSET_RSSI_REPORTER 0x0023 |
| 245 | struct mgmt_cp_unset_rssi_reporter { |
| 246 | bdaddr_t bdaddr; |
| 247 | } __packed; |
| 248 | |
Johan Hedberg | c02178d | 2010-12-08 00:21:05 +0200 | [diff] [blame] | 249 | #define MGMT_EV_CMD_COMPLETE 0x0001 |
| 250 | struct mgmt_ev_cmd_complete { |
| 251 | __le16 opcode; |
| 252 | __u8 data[0]; |
| 253 | } __packed; |
| 254 | |
| 255 | #define MGMT_EV_CMD_STATUS 0x0002 |
| 256 | struct mgmt_ev_cmd_status { |
| 257 | __u8 status; |
| 258 | __le16 opcode; |
| 259 | } __packed; |
| 260 | |
| 261 | #define MGMT_EV_CONTROLLER_ERROR 0x0003 |
| 262 | struct mgmt_ev_controller_error { |
Johan Hedberg | c02178d | 2010-12-08 00:21:05 +0200 | [diff] [blame] | 263 | __u8 error_code; |
| 264 | } __packed; |
Johan Hedberg | c71e97b | 2010-12-13 21:07:07 +0200 | [diff] [blame] | 265 | |
| 266 | #define MGMT_EV_INDEX_ADDED 0x0004 |
Johan Hedberg | c71e97b | 2010-12-13 21:07:07 +0200 | [diff] [blame] | 267 | |
| 268 | #define MGMT_EV_INDEX_REMOVED 0x0005 |
Johan Hedberg | 5add6af | 2010-12-16 10:00:37 +0200 | [diff] [blame] | 269 | |
| 270 | #define MGMT_EV_POWERED 0x0006 |
Johan Hedberg | 73f22f6 | 2010-12-29 16:00:25 +0200 | [diff] [blame] | 271 | |
| 272 | #define MGMT_EV_DISCOVERABLE 0x0007 |
Johan Hedberg | 9fbcbb4 | 2010-12-30 00:18:33 +0200 | [diff] [blame] | 273 | |
| 274 | #define MGMT_EV_CONNECTABLE 0x0008 |
Johan Hedberg | c542a06 | 2011-01-26 13:11:03 +0200 | [diff] [blame] | 275 | |
| 276 | #define MGMT_EV_PAIRABLE 0x0009 |
Johan Hedberg | 55ed8ca | 2011-01-17 14:41:05 +0200 | [diff] [blame] | 277 | |
| 278 | #define MGMT_EV_NEW_KEY 0x000A |
| 279 | struct mgmt_ev_new_key { |
Brian Gix | a68668b | 2011-08-11 15:49:36 -0700 | [diff] [blame] | 280 | __u8 store_hint; |
Johan Hedberg | 55ed8ca | 2011-01-17 14:41:05 +0200 | [diff] [blame] | 281 | struct mgmt_key_info key; |
Johan Hedberg | 55ed8ca | 2011-01-17 14:41:05 +0200 | [diff] [blame] | 282 | } __packed; |
Johan Hedberg | f752054 | 2011-01-20 12:34:39 +0200 | [diff] [blame] | 283 | |
| 284 | #define MGMT_EV_CONNECTED 0x000B |
| 285 | struct mgmt_ev_connected { |
Johan Hedberg | f752054 | 2011-01-20 12:34:39 +0200 | [diff] [blame] | 286 | bdaddr_t bdaddr; |
Brian Gix | 2e2f50d | 2011-09-13 12:36:04 -0700 | [diff] [blame] | 287 | __u8 le; |
Johan Hedberg | f752054 | 2011-01-20 12:34:39 +0200 | [diff] [blame] | 288 | } __packed; |
| 289 | |
| 290 | #define MGMT_EV_DISCONNECTED 0x000C |
| 291 | struct mgmt_ev_disconnected { |
Johan Hedberg | f752054 | 2011-01-20 12:34:39 +0200 | [diff] [blame] | 292 | bdaddr_t bdaddr; |
| 293 | } __packed; |
Johan Hedberg | 17d5c04 | 2011-01-22 06:09:08 +0200 | [diff] [blame] | 294 | |
| 295 | #define MGMT_EV_CONNECT_FAILED 0x000D |
| 296 | struct mgmt_ev_connect_failed { |
Johan Hedberg | 17d5c04 | 2011-01-22 06:09:08 +0200 | [diff] [blame] | 297 | bdaddr_t bdaddr; |
| 298 | __u8 status; |
| 299 | } __packed; |
Johan Hedberg | 980e1a5 | 2011-01-22 06:10:07 +0200 | [diff] [blame] | 300 | |
| 301 | #define MGMT_EV_PIN_CODE_REQUEST 0x000E |
| 302 | struct mgmt_ev_pin_code_request { |
Johan Hedberg | 980e1a5 | 2011-01-22 06:10:07 +0200 | [diff] [blame] | 303 | bdaddr_t bdaddr; |
Brian Gix | a68668b | 2011-08-11 15:49:36 -0700 | [diff] [blame] | 304 | __u8 secure; |
Johan Hedberg | 980e1a5 | 2011-01-22 06:10:07 +0200 | [diff] [blame] | 305 | } __packed; |
Johan Hedberg | a5c2968 | 2011-02-19 12:05:57 -0300 | [diff] [blame] | 306 | |
| 307 | #define MGMT_EV_USER_CONFIRM_REQUEST 0x000F |
| 308 | struct mgmt_ev_user_confirm_request { |
Johan Hedberg | a5c2968 | 2011-02-19 12:05:57 -0300 | [diff] [blame] | 309 | bdaddr_t bdaddr; |
Brian Gix | a68668b | 2011-08-11 15:49:36 -0700 | [diff] [blame] | 310 | __u8 auto_confirm; |
| 311 | __u8 event; |
Johan Hedberg | a5c2968 | 2011-02-19 12:05:57 -0300 | [diff] [blame] | 312 | __le32 value; |
| 313 | } __packed; |
Johan Hedberg | 2a61169 | 2011-02-19 12:06:00 -0300 | [diff] [blame] | 314 | |
| 315 | #define MGMT_EV_AUTH_FAILED 0x0010 |
| 316 | struct mgmt_ev_auth_failed { |
Johan Hedberg | 2a61169 | 2011-02-19 12:06:00 -0300 | [diff] [blame] | 317 | bdaddr_t bdaddr; |
| 318 | __u8 status; |
| 319 | } __packed; |
Johan Hedberg | b312b161 | 2011-03-16 14:29:37 +0200 | [diff] [blame] | 320 | |
| 321 | #define MGMT_EV_LOCAL_NAME_CHANGED 0x0011 |
| 322 | struct mgmt_ev_local_name_changed { |
| 323 | __u8 name[MGMT_MAX_NAME_LENGTH]; |
| 324 | } __packed; |
Johan Hedberg | e17acd4 | 2011-03-30 23:57:16 +0300 | [diff] [blame] | 325 | |
| 326 | #define MGMT_EV_DEVICE_FOUND 0x0012 |
| 327 | struct mgmt_ev_device_found { |
| 328 | bdaddr_t bdaddr; |
| 329 | __u8 dev_class[3]; |
| 330 | __s8 rssi; |
Brian Gix | a68668b | 2011-08-11 15:49:36 -0700 | [diff] [blame] | 331 | __u8 le; |
| 332 | __u8 type; |
Johan Hedberg | e17acd4 | 2011-03-30 23:57:16 +0300 | [diff] [blame] | 333 | __u8 eir[HCI_MAX_EIR_LENGTH]; |
| 334 | } __packed; |
Johan Hedberg | a88a965 | 2011-03-30 13:18:12 +0300 | [diff] [blame] | 335 | |
| 336 | #define MGMT_EV_REMOTE_NAME 0x0013 |
| 337 | struct mgmt_ev_remote_name { |
| 338 | bdaddr_t bdaddr; |
Brian Gix | a68668b | 2011-08-11 15:49:36 -0700 | [diff] [blame] | 339 | __u8 status; |
Johan Hedberg | a88a965 | 2011-03-30 13:18:12 +0300 | [diff] [blame] | 340 | __u8 name[MGMT_MAX_NAME_LENGTH]; |
| 341 | } __packed; |
Brian Gix | a68668b | 2011-08-11 15:49:36 -0700 | [diff] [blame] | 342 | |
| 343 | #define MGMT_EV_DISCOVERING 0x0014 |
| 344 | |
| 345 | #define MGMT_EV_USER_PASSKEY_REQUEST 0x0015 |
| 346 | struct mgmt_ev_user_passkey_request { |
| 347 | bdaddr_t bdaddr; |
| 348 | } __packed; |
| 349 | |
Prabhakaran Mc | 46230fa | 2011-11-30 18:11:21 +0530 | [diff] [blame] | 350 | #define MGMT_EV_ENCRYPT_CHANGE 0x0016 |
| 351 | struct mgmt_ev_encrypt_change { |
| 352 | bdaddr_t bdaddr; |
| 353 | __u8 status; |
| 354 | } __packed; |
| 355 | |
| 356 | |
Srinivas Krovvidi | 0916aed | 2011-12-20 12:06:34 +0530 | [diff] [blame] | 357 | #define MGMT_EV_REMOTE_CLASS 0x0017 |
| 358 | struct mgmt_ev_remote_class { |
| 359 | bdaddr_t bdaddr; |
| 360 | __u8 dev_class[3]; |
| 361 | } __packed; |
Srinivas Krovvidi | d352b26 | 2012-01-12 19:46:26 +0530 | [diff] [blame] | 362 | |
| 363 | #define MGMT_EV_REMOTE_VERSION 0x0018 |
| 364 | struct mgmt_ev_remote_version { |
| 365 | bdaddr_t bdaddr; |
| 366 | __u8 lmp_ver; |
| 367 | __u16 manufacturer; |
| 368 | __u16 lmp_subver; |
| 369 | } __packed; |
Sunny Kapdi | f3caf88 | 2012-02-25 19:27:09 -0800 | [diff] [blame] | 370 | |
| 371 | #define MGMT_EV_REMOTE_FEATURES 0x0019 |
| 372 | struct mgmt_ev_remote_features { |
| 373 | bdaddr_t bdaddr; |
| 374 | uint8_t features[8]; |
| 375 | } __packed; |
Archana Ramachandran | 26a752b | 2011-12-20 11:27:40 -0800 | [diff] [blame] | 376 | |
| 377 | #define MGMT_EV_RSSI_UPDATE 0x0020 |
| 378 | struct mgmt_ev_rssi_update { |
| 379 | bdaddr_t bdaddr; |
| 380 | __s8 rssi; |
| 381 | } __packed; |