1 #ifndef __NL802154_H << 2 #define __NL802154_H << 3 /* 1 /* 4 * 802.15.4 netlink interface public header !! 2 * nl802154.h 5 * 3 * 6 * Copyright 2014 Alexander Aring <aar@pengutr !! 4 * Copyright (C) 2007, 2008, 2009 Siemens AG 7 * 5 * 8 * Permission to use, copy, modify, and/or dis !! 6 * This program is free software; you can redistribute it and/or modify 9 * purpose with or without fee is hereby grant !! 7 * it under the terms of the GNU General Public License version 2 10 * copyright notice and this permission notice !! 8 * as published by the Free Software Foundation. 11 * !! 9 * 12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AU !! 10 * This program is distributed in the hope that it will be useful, 13 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL !! 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY AND FITNESS. IN NO EVENT SH !! 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUEN !! 13 * GNU General Public License for more details. 16 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA !! 14 * 17 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TOR !! 15 * You should have received a copy of the GNU General Public License along 18 * OR IN CONNECTION WITH THE USE OR PERFORMANC !! 16 * with this program; if not, write to the Free Software Foundation, Inc., >> 17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 * 18 * 20 */ 19 */ 21 20 22 #include <linux/types.h> !! 21 #ifndef IEEE802154_NL_H 23 !! 22 #define IEEE802154_NL_H 24 #define NL802154_GENL_NAME "nl802154" << 25 << 26 enum nl802154_commands { << 27 /* don't change the order or add anything betw << 28 /* currently we don't shipping this file via u << 29 NL802154_CMD_UNSPEC, << 30 << 31 NL802154_CMD_GET_WPAN_PHY, << 32 NL802154_CMD_SET_WPAN_PHY, << 33 NL802154_CMD_NEW_WPAN_PHY, << 34 NL802154_CMD_DEL_WPAN_PHY, << 35 << 36 NL802154_CMD_GET_INTERFACE, << 37 NL802154_CMD_SET_INTERFACE, << 38 NL802154_CMD_NEW_INTERFACE, << 39 NL802154_CMD_DEL_INTERFACE, << 40 << 41 NL802154_CMD_SET_CHANNEL, << 42 << 43 NL802154_CMD_SET_PAN_ID, << 44 NL802154_CMD_SET_SHORT_ADDR, << 45 << 46 NL802154_CMD_SET_TX_POWER, << 47 NL802154_CMD_SET_CCA_MODE, << 48 NL802154_CMD_SET_CCA_ED_LEVEL, << 49 << 50 NL802154_CMD_SET_MAX_FRAME_RETRIES, << 51 << 52 NL802154_CMD_SET_BACKOFF_EXPONENT, << 53 NL802154_CMD_SET_MAX_CSMA_BACKOFFS, << 54 << 55 NL802154_CMD_SET_LBT_MODE, << 56 << 57 NL802154_CMD_SET_ACKREQ_DEFAULT, << 58 << 59 NL802154_CMD_SET_WPAN_PHY_NETNS, << 60 << 61 NL802154_CMD_SET_SEC_PARAMS, << 62 NL802154_CMD_GET_SEC_KEY, << 63 NL802154_CMD_NEW_SEC_KEY, << 64 NL802154_CMD_DEL_SEC_KEY, << 65 NL802154_CMD_GET_SEC_DEV, << 66 NL802154_CMD_NEW_SEC_DEV, << 67 NL802154_CMD_DEL_SEC_DEV, << 68 NL802154_CMD_GET_SEC_DEVKEY, << 69 NL802154_CMD_NEW_SEC_DEVKEY, << 70 NL802154_CMD_DEL_SEC_DEVKEY, << 71 NL802154_CMD_GET_SEC_LEVEL, << 72 NL802154_CMD_NEW_SEC_LEVEL, << 73 NL802154_CMD_DEL_SEC_LEVEL, << 74 << 75 NL802154_CMD_SCAN_EVENT, << 76 NL802154_CMD_TRIGGER_SCAN, << 77 NL802154_CMD_ABORT_SCAN, << 78 NL802154_CMD_SCAN_DONE, << 79 NL802154_CMD_SEND_BEACONS, << 80 NL802154_CMD_STOP_BEACONS, << 81 NL802154_CMD_ASSOCIATE, << 82 NL802154_CMD_DISASSOCIATE, << 83 NL802154_CMD_SET_MAX_ASSOCIATIONS, << 84 NL802154_CMD_LIST_ASSOCIATIONS, << 85 << 86 /* add new commands above here */ << 87 << 88 /* used to define NL802154_CMD_MAX bel << 89 __NL802154_CMD_AFTER_LAST, << 90 NL802154_CMD_MAX = __NL802154_CMD_AFTE << 91 }; << 92 << 93 enum nl802154_attrs { << 94 /* don't change the order or add anything betw << 95 /* currently we don't shipping this file via u << 96 NL802154_ATTR_UNSPEC, << 97 << 98 NL802154_ATTR_WPAN_PHY, << 99 NL802154_ATTR_WPAN_PHY_NAME, << 100 << 101 NL802154_ATTR_IFINDEX, << 102 NL802154_ATTR_IFNAME, << 103 NL802154_ATTR_IFTYPE, << 104 << 105 NL802154_ATTR_WPAN_DEV, << 106 << 107 NL802154_ATTR_PAGE, << 108 NL802154_ATTR_CHANNEL, << 109 << 110 NL802154_ATTR_PAN_ID, << 111 NL802154_ATTR_SHORT_ADDR, << 112 << 113 NL802154_ATTR_TX_POWER, << 114 23 115 NL802154_ATTR_CCA_MODE, !! 24 struct net_device; 116 NL802154_ATTR_CCA_OPT, !! 25 struct ieee802154_addr; 117 NL802154_ATTR_CCA_ED_LEVEL, << 118 << 119 NL802154_ATTR_MAX_FRAME_RETRIES, << 120 << 121 NL802154_ATTR_MAX_BE, << 122 NL802154_ATTR_MIN_BE, << 123 NL802154_ATTR_MAX_CSMA_BACKOFFS, << 124 << 125 NL802154_ATTR_LBT_MODE, << 126 << 127 NL802154_ATTR_GENERATION, << 128 << 129 NL802154_ATTR_CHANNELS_SUPPORTED, << 130 NL802154_ATTR_SUPPORTED_CHANNEL, << 131 << 132 NL802154_ATTR_EXTENDED_ADDR, << 133 << 134 NL802154_ATTR_WPAN_PHY_CAPS, << 135 << 136 NL802154_ATTR_SUPPORTED_COMMANDS, << 137 << 138 NL802154_ATTR_ACKREQ_DEFAULT, << 139 << 140 NL802154_ATTR_PAD, << 141 << 142 NL802154_ATTR_PID, << 143 NL802154_ATTR_NETNS_FD, << 144 << 145 NL802154_ATTR_COORDINATOR, << 146 NL802154_ATTR_SCAN_TYPE, << 147 NL802154_ATTR_SCAN_FLAGS, << 148 NL802154_ATTR_SCAN_CHANNELS, << 149 NL802154_ATTR_SCAN_PREAMBLE_CODES, << 150 NL802154_ATTR_SCAN_MEAN_PRF, << 151 NL802154_ATTR_SCAN_DURATION, << 152 NL802154_ATTR_SCAN_DONE_REASON, << 153 NL802154_ATTR_BEACON_INTERVAL, << 154 NL802154_ATTR_MAX_ASSOCIATIONS, << 155 NL802154_ATTR_PEER, << 156 << 157 /* add attributes here, update the pol << 158 << 159 #ifdef CONFIG_IEEE802154_NL802154_EXPERIMENTAL << 160 NL802154_ATTR_SEC_ENABLED, << 161 NL802154_ATTR_SEC_OUT_LEVEL, << 162 NL802154_ATTR_SEC_OUT_KEY_ID, << 163 NL802154_ATTR_SEC_FRAME_COUNTER, << 164 << 165 NL802154_ATTR_SEC_LEVEL, << 166 NL802154_ATTR_SEC_DEVICE, << 167 NL802154_ATTR_SEC_DEVKEY, << 168 NL802154_ATTR_SEC_KEY, << 169 #endif /* CONFIG_IEEE802154_NL802154_EXPERIMEN << 170 << 171 __NL802154_ATTR_AFTER_LAST, << 172 NL802154_ATTR_MAX = __NL802154_ATTR_AF << 173 }; << 174 << 175 enum nl802154_iftype { << 176 NL802154_IFTYPE_UNSPEC = (~(__u32)0), << 177 << 178 NL802154_IFTYPE_NODE = 0, << 179 NL802154_IFTYPE_MONITOR, << 180 NL802154_IFTYPE_COORD, << 181 << 182 /* keep last */ << 183 NUM_NL802154_IFTYPES, << 184 NL802154_IFTYPE_MAX = NUM_NL802154_IFT << 185 }; << 186 26 187 /** 27 /** 188 * enum nl802154_wpan_phy_capability_attr - wp !! 28 * ieee802154_nl_assoc_indic - Notify userland of an association request. >> 29 * @dev: The network device on which this association request was >> 30 * received. >> 31 * @addr: The address of the device requesting association. >> 32 * @cap: The capability information field from the device. 189 * 33 * 190 * @__NL802154_CAP_ATTR_INVALID: attribute num !! 34 * This informs a userland coordinator of a device requesting to 191 * @NL802154_CAP_ATTR_CHANNELS: a nested attri !! 35 * associate with the PAN controlled by the coordinator. 192 * @NL802154_CAP_ATTR_TX_POWERS: a nested attr !! 36 * 193 * nl802154_wpan_phy_tx_power !! 37 * Note: This is in section 7.3.1 of the IEEE 802.15.4-2006 document. 194 * @NL802154_CAP_ATTR_MIN_CCA_ED_LEVEL: minimu << 195 * @NL802154_CAP_ATTR_MAX_CCA_ED_LEVEL: maxmim << 196 * @NL802154_CAP_ATTR_CCA_MODES: nl802154_cca_ << 197 * @NL802154_CAP_ATTR_CCA_OPTS: nl802154_cca_o << 198 * @NL802154_CAP_ATTR_MIN_MINBE: minimum of mi << 199 * @NL802154_CAP_ATTR_MAX_MINBE: maximum of mi << 200 * @NL802154_CAP_ATTR_MIN_MAXBE: minimum of ma << 201 * @NL802154_CAP_ATTR_MAX_MINBE: maximum of ma << 202 * @NL802154_CAP_ATTR_MIN_CSMA_BACKOFFS: minim << 203 * @NL802154_CAP_ATTR_MAX_CSMA_BACKOFFS: maxim << 204 * @NL802154_CAP_ATTR_MIN_FRAME_RETRIES: minim << 205 * @NL802154_CAP_ATTR_MAX_FRAME_RETRIES: maxim << 206 * @NL802154_CAP_ATTR_IFTYPES: nl802154_iftype << 207 * @NL802154_CAP_ATTR_LBT: nl802154_supported_ << 208 * @NL802154_CAP_ATTR_MAX: highest cap attribu << 209 * @__NL802154_CAP_ATTR_AFTER_LAST: internal u << 210 */ 38 */ 211 enum nl802154_wpan_phy_capability_attr { !! 39 int ieee802154_nl_assoc_indic(struct net_device *dev, 212 __NL802154_CAP_ATTR_INVALID, !! 40 struct ieee802154_addr *addr, u8 cap); 213 << 214 NL802154_CAP_ATTR_IFTYPES, << 215 << 216 NL802154_CAP_ATTR_CHANNELS, << 217 NL802154_CAP_ATTR_TX_POWERS, << 218 << 219 NL802154_CAP_ATTR_CCA_ED_LEVELS, << 220 NL802154_CAP_ATTR_CCA_MODES, << 221 NL802154_CAP_ATTR_CCA_OPTS, << 222 << 223 NL802154_CAP_ATTR_MIN_MINBE, << 224 NL802154_CAP_ATTR_MAX_MINBE, << 225 << 226 NL802154_CAP_ATTR_MIN_MAXBE, << 227 NL802154_CAP_ATTR_MAX_MAXBE, << 228 << 229 NL802154_CAP_ATTR_MIN_CSMA_BACKOFFS, << 230 NL802154_CAP_ATTR_MAX_CSMA_BACKOFFS, << 231 << 232 NL802154_CAP_ATTR_MIN_FRAME_RETRIES, << 233 NL802154_CAP_ATTR_MAX_FRAME_RETRIES, << 234 << 235 NL802154_CAP_ATTR_LBT, << 236 << 237 /* keep last */ << 238 __NL802154_CAP_ATTR_AFTER_LAST, << 239 NL802154_CAP_ATTR_MAX = __NL802154_CAP << 240 }; << 241 41 242 /** 42 /** 243 * enum nl802154_coord - Netlink attributes fo !! 43 * ieee802154_nl_assoc_confirm - Notify userland of association. >> 44 * @dev: The device which has completed association. >> 45 * @short_addr: The short address assigned to the device. >> 46 * @status: The status of the association. 244 * 47 * 245 * @__NL802154_COORD_INVALID: invalid !! 48 * Inform userland of the result of an association request. If the 246 * @NL802154_COORD_PANID: PANID of the coordin !! 49 * association request included asking the coordinator to allocate 247 * @NL802154_COORD_ADDR: coordinator address, !! 50 * a short address then it is returned in @short_addr. 248 * @NL802154_COORD_CHANNEL: channel number, re !! 51 * 249 * @NL802154_COORD_PAGE: channel page, related !! 52 * Note: This is in section 7.3.2 of the IEEE 802.15.4 document. 250 * @NL802154_COORD_PREAMBLE_CODE: Preamble cod << 251 * this is PHY dependent and optional (u8 << 252 * @NL802154_COORD_MEAN_PRF: Mean PRF used whe << 253 * this is PHY dependent and optional (u8) << 254 * @NL802154_COORD_SUPERFRAME_SPEC: superframe << 255 * @NL802154_COORD_LINK_QUALITY: signal qualit << 256 * scaled to 0..255 (u8) << 257 * @NL802154_COORD_GTS_PERMIT: set to true if << 258 * @NL802154_COORD_PAYLOAD_DATA: binary data c << 259 * frame payload, (only if beacon or prob << 260 * @NL802154_COORD_PAD: attribute used for pad << 261 * @NL802154_COORD_MAX: highest coordinator at << 262 */ 53 */ 263 enum nl802154_coord { !! 54 int ieee802154_nl_assoc_confirm(struct net_device *dev, 264 __NL802154_COORD_INVALID, !! 55 u16 short_addr, u8 status); 265 NL802154_COORD_PANID, << 266 NL802154_COORD_ADDR, << 267 NL802154_COORD_CHANNEL, << 268 NL802154_COORD_PAGE, << 269 NL802154_COORD_PREAMBLE_CODE, << 270 NL802154_COORD_MEAN_PRF, << 271 NL802154_COORD_SUPERFRAME_SPEC, << 272 NL802154_COORD_LINK_QUALITY, << 273 NL802154_COORD_GTS_PERMIT, << 274 NL802154_COORD_PAYLOAD_DATA, << 275 NL802154_COORD_PAD, << 276 << 277 /* keep last */ << 278 NL802154_COORD_MAX, << 279 }; << 280 56 281 /** 57 /** 282 * enum nl802154_scan_types - Scan types !! 58 * ieee802154_nl_disassoc_indic - Notify userland of disassociation. >> 59 * @dev: The device on which disassociation was indicated. >> 60 * @addr: The device which is disassociating. >> 61 * @reason: The reason for the disassociation. >> 62 * >> 63 * Inform userland that a device has disassociated from the network. 283 * 64 * 284 * @__NL802154_SCAN_INVALID: scan type number !! 65 * Note: This is in section 7.3.3 of the IEEE 802.15.4 document. 285 * @NL802154_SCAN_ED: An ED scan allows a devi << 286 * energy in each requested channel << 287 * @NL802154_SCAN_ACTIVE: Locate any coordinat << 288 * a Beacon Request command << 289 * @NL802154_SCAN_PASSIVE: Locate any coordina << 290 * @NL802154_SCAN_ORPHAN: Relocate coordinator << 291 * @NL802154_SCAN_ENHANCED_ACTIVE: Same as Act << 292 * command instead of Beacon Request comm << 293 * @NL802154_SCAN_RIT_PASSIVE: Passive scan fo << 294 * instead of Beacon frames << 295 * @NL802154_SCAN_ATTR_MAX: Maximum SCAN attri << 296 */ 66 */ 297 enum nl802154_scan_types { !! 67 int ieee802154_nl_disassoc_indic(struct net_device *dev, 298 __NL802154_SCAN_INVALID, !! 68 struct ieee802154_addr *addr, u8 reason); 299 NL802154_SCAN_ED, << 300 NL802154_SCAN_ACTIVE, << 301 NL802154_SCAN_PASSIVE, << 302 NL802154_SCAN_ORPHAN, << 303 NL802154_SCAN_ENHANCED_ACTIVE, << 304 NL802154_SCAN_RIT_PASSIVE, << 305 << 306 /* keep last */ << 307 NL802154_SCAN_ATTR_MAX, << 308 }; << 309 69 310 /** 70 /** 311 * enum nl802154_scan_done_reasons - End of sc !! 71 * ieee802154_nl_disassoc_confirm - Notify userland of disassociation >> 72 * completion. >> 73 * @dev: The device on which disassociation was ordered. >> 74 * @status: The result of the disassociation. >> 75 * >> 76 * Inform userland of the result of requesting that a device >> 77 * disassociate, or the result of requesting that we disassociate from >> 78 * a PAN managed by another coordinator. 312 * 79 * 313 * @__NL802154_SCAN_DONE_REASON_INVALID: scan !! 80 * Note: This is in section 7.1.4.3 of the IEEE 802.15.4 document. 314 * @NL802154_SCAN_DONE_REASON_FINISHED: The sc << 315 * going through all the requested and po << 316 * @NL802154_SCAN_DONE_REASON_ABORTED: The sca << 317 * a Beacon Request command << 318 * @NL802154_SCAN_DONE_REASON_MAX: Maximum sca << 319 */ 81 */ 320 enum nl802154_scan_done_reasons { !! 82 int ieee802154_nl_disassoc_confirm(struct net_device *dev, 321 __NL802154_SCAN_DONE_REASON_INVALID, !! 83 u8 status); 322 NL802154_SCAN_DONE_REASON_FINISHED, << 323 NL802154_SCAN_DONE_REASON_ABORTED, << 324 << 325 /* keep last */ << 326 NL802154_SCAN_DONE_REASON_MAX, << 327 }; << 328 84 329 /** 85 /** 330 * enum nl802154_cca_modes - cca modes !! 86 * ieee802154_nl_scan_confirm - Notify userland of completion of scan. >> 87 * @dev: The device which was instructed to scan. >> 88 * @status: The status of the scan operation. >> 89 * @scan_type: What type of scan was performed. >> 90 * @unscanned: Any channels that the device was unable to scan. >> 91 * @edl: The energy levels (if a passive scan). 331 * 92 * 332 * @__NL802154_CCA_INVALID: cca mode number 0 !! 93 * 333 * @NL802154_CCA_ENERGY: Energy above threshol !! 94 * Note: This is in section 7.1.11 of the IEEE 802.15.4 document. 334 * @NL802154_CCA_CARRIER: Carrier sense only !! 95 * Note: This API does not permit the return of an active scan result. 335 * @NL802154_CCA_ENERGY_CARRIER: Carrier sense << 336 * @NL802154_CCA_ALOHA: CCA shall always repor << 337 * @NL802154_CCA_UWB_SHR: UWB preamble sense b << 338 * @NL802154_CCA_UWB_MULTIPLEXED: UWB preamble << 339 * the multiplexed preamble << 340 * @__NL802154_CCA_ATTR_AFTER_LAST: Internal << 341 * @NL802154_CCA_ATTR_MAX: Maximum CCA attribu << 342 */ 96 */ 343 enum nl802154_cca_modes { !! 97 int ieee802154_nl_scan_confirm(struct net_device *dev, 344 __NL802154_CCA_INVALID, !! 98 u8 status, u8 scan_type, u32 unscanned, u8 page, 345 NL802154_CCA_ENERGY, !! 99 u8 *edl/*, struct list_head *pan_desc_list */); 346 NL802154_CCA_CARRIER, << 347 NL802154_CCA_ENERGY_CARRIER, << 348 NL802154_CCA_ALOHA, << 349 NL802154_CCA_UWB_SHR, << 350 NL802154_CCA_UWB_MULTIPLEXED, << 351 << 352 /* keep last */ << 353 __NL802154_CCA_ATTR_AFTER_LAST, << 354 NL802154_CCA_ATTR_MAX = __NL802154_CCA << 355 }; << 356 100 357 /** 101 /** 358 * enum nl802154_cca_opts - additional options !! 102 * ieee802154_nl_beacon_indic - Notify userland of a received beacon. >> 103 * @dev: The device on which a beacon was received. >> 104 * @panid: The PAN of the coordinator. >> 105 * @coord_addr: The short address of the coordinator on that PAN. 359 * 106 * 360 * @NL802154_CCA_OPT_ENERGY_CARRIER_OR: NL8021 !! 107 * Note: This is in section 7.1.5 of the IEEE 802.15.4 document. 361 * @NL802154_CCA_OPT_ENERGY_CARRIER_AND: NL802 !! 108 * Note: This API does not provide extended information such as what >> 109 * channel the PAN is on or what the LQI of the beacon frame was on >> 110 * receipt. >> 111 * Note: This API cannot indicate a beacon frame for a coordinator >> 112 * operating in long addressing mode. 362 */ 113 */ 363 enum nl802154_cca_opts { !! 114 int ieee802154_nl_beacon_indic(struct net_device *dev, u16 panid, 364 NL802154_CCA_OPT_ENERGY_CARRIER_AND, !! 115 u16 coord_addr); 365 NL802154_CCA_OPT_ENERGY_CARRIER_OR, << 366 << 367 /* keep last */ << 368 __NL802154_CCA_OPT_ATTR_AFTER_LAST, << 369 NL802154_CCA_OPT_ATTR_MAX = __NL802154 << 370 }; << 371 116 372 /** 117 /** 373 * enum nl802154_supported_bool_states - bool !! 118 * ieee802154_nl_start_confirm - Notify userland of completion of start. >> 119 * @dev: The device which was instructed to scan. >> 120 * @status: The status of the scan operation. 374 * 121 * 375 * @NL802154_SUPPORTED_BOOL_FALSE: indicates t !! 122 * Note: This is in section 7.1.14 of the IEEE 802.15.4 document. 376 * @NL802154_SUPPORTED_BOOL_TRUE: indicates to << 377 * @__NL802154_SUPPORTED_BOOL_INVALD: reserved << 378 * @NL802154_SUPPORTED_BOOL_BOTH: indicates to << 379 * @__NL802154_SUPPORTED_BOOL_AFTER_LAST: Inte << 380 * @NL802154_SUPPORTED_BOOL_MAX: highest value << 381 */ 123 */ 382 enum nl802154_supported_bool_states { !! 124 int ieee802154_nl_start_confirm(struct net_device *dev, u8 status); 383 NL802154_SUPPORTED_BOOL_FALSE, << 384 NL802154_SUPPORTED_BOOL_TRUE, << 385 /* to handle them in a mask */ << 386 __NL802154_SUPPORTED_BOOL_INVALD, << 387 NL802154_SUPPORTED_BOOL_BOTH, << 388 << 389 /* keep last */ << 390 __NL802154_SUPPORTED_BOOL_AFTER_LAST, << 391 NL802154_SUPPORTED_BOOL_MAX = __NL8021 << 392 }; << 393 << 394 enum nl802154_dev_addr_modes { << 395 NL802154_DEV_ADDR_NONE, << 396 __NL802154_DEV_ADDR_INVALID, << 397 NL802154_DEV_ADDR_SHORT, << 398 NL802154_DEV_ADDR_EXTENDED, << 399 << 400 /* keep last */ << 401 __NL802154_DEV_ADDR_AFTER_LAST, << 402 NL802154_DEV_ADDR_MAX = __NL802154_DEV << 403 }; << 404 << 405 enum nl802154_dev_addr_attrs { << 406 NL802154_DEV_ADDR_ATTR_UNSPEC, << 407 << 408 NL802154_DEV_ADDR_ATTR_PAN_ID, << 409 NL802154_DEV_ADDR_ATTR_MODE, << 410 NL802154_DEV_ADDR_ATTR_SHORT, << 411 NL802154_DEV_ADDR_ATTR_EXTENDED, << 412 NL802154_DEV_ADDR_ATTR_PAD, << 413 NL802154_DEV_ADDR_ATTR_PEER_TYPE, << 414 << 415 /* keep last */ << 416 __NL802154_DEV_ADDR_ATTR_AFTER_LAST, << 417 NL802154_DEV_ADDR_ATTR_MAX = __NL80215 << 418 }; << 419 << 420 enum nl802154_peer_type { << 421 NL802154_PEER_TYPE_UNSPEC, << 422 << 423 NL802154_PEER_TYPE_PARENT, << 424 NL802154_PEER_TYPE_CHILD, << 425 << 426 /* keep last */ << 427 __NL802154_PEER_TYPE_AFTER_LAST, << 428 NL802154_PEER_TYPE_MAX = __NL802154_PE << 429 }; << 430 << 431 #ifdef CONFIG_IEEE802154_NL802154_EXPERIMENTAL << 432 << 433 enum nl802154_key_id_modes { << 434 NL802154_KEY_ID_MODE_IMPLICIT, << 435 NL802154_KEY_ID_MODE_INDEX, << 436 NL802154_KEY_ID_MODE_INDEX_SHORT, << 437 NL802154_KEY_ID_MODE_INDEX_EXTENDED, << 438 << 439 /* keep last */ << 440 __NL802154_KEY_ID_MODE_AFTER_LAST, << 441 NL802154_KEY_ID_MODE_MAX = __NL802154_ << 442 }; << 443 << 444 enum nl802154_key_id_attrs { << 445 NL802154_KEY_ID_ATTR_UNSPEC, << 446 << 447 NL802154_KEY_ID_ATTR_MODE, << 448 NL802154_KEY_ID_ATTR_INDEX, << 449 NL802154_KEY_ID_ATTR_IMPLICIT, << 450 NL802154_KEY_ID_ATTR_SOURCE_SHORT, << 451 NL802154_KEY_ID_ATTR_SOURCE_EXTENDED, << 452 NL802154_KEY_ID_ATTR_PAD, << 453 << 454 /* keep last */ << 455 __NL802154_KEY_ID_ATTR_AFTER_LAST, << 456 NL802154_KEY_ID_ATTR_MAX = __NL802154_ << 457 }; << 458 << 459 enum nl802154_seclevels { << 460 NL802154_SECLEVEL_NONE, << 461 NL802154_SECLEVEL_MIC32, << 462 NL802154_SECLEVEL_MIC64, << 463 NL802154_SECLEVEL_MIC128, << 464 NL802154_SECLEVEL_ENC, << 465 NL802154_SECLEVEL_ENC_MIC32, << 466 NL802154_SECLEVEL_ENC_MIC64, << 467 NL802154_SECLEVEL_ENC_MIC128, << 468 << 469 /* keep last */ << 470 __NL802154_SECLEVEL_AFTER_LAST, << 471 NL802154_SECLEVEL_MAX = __NL802154_SEC << 472 }; << 473 << 474 enum nl802154_frames { << 475 NL802154_FRAME_BEACON, << 476 NL802154_FRAME_DATA, << 477 NL802154_FRAME_ACK, << 478 NL802154_FRAME_CMD, << 479 << 480 /* keep last */ << 481 __NL802154_FRAME_AFTER_LAST, << 482 NL802154_FRAME_MAX = __NL802154_FRAME_ << 483 }; << 484 << 485 enum nl802154_cmd_frames { << 486 __NL802154_CMD_FRAME_INVALID, << 487 NL802154_CMD_FRAME_ASSOC_REQUEST, << 488 NL802154_CMD_FRAME_ASSOC_RESPONSE, << 489 NL802154_CMD_FRAME_DISASSOC_NOTIFY, << 490 NL802154_CMD_FRAME_DATA_REQUEST, << 491 NL802154_CMD_FRAME_PAN_ID_CONFLICT_NOT << 492 NL802154_CMD_FRAME_ORPHAN_NOTIFY, << 493 NL802154_CMD_FRAME_BEACON_REQUEST, << 494 NL802154_CMD_FRAME_COORD_REALIGNMENT, << 495 NL802154_CMD_FRAME_GTS_REQUEST, << 496 << 497 /* keep last */ << 498 __NL802154_CMD_FRAME_AFTER_LAST, << 499 NL802154_CMD_FRAME_MAX = __NL802154_CM << 500 }; << 501 << 502 enum nl802154_seclevel_attrs { << 503 NL802154_SECLEVEL_ATTR_UNSPEC, << 504 << 505 NL802154_SECLEVEL_ATTR_LEVELS, << 506 NL802154_SECLEVEL_ATTR_FRAME, << 507 NL802154_SECLEVEL_ATTR_CMD_FRAME, << 508 NL802154_SECLEVEL_ATTR_DEV_OVERRIDE, << 509 << 510 /* keep last */ << 511 __NL802154_SECLEVEL_ATTR_AFTER_LAST, << 512 NL802154_SECLEVEL_ATTR_MAX = __NL80215 << 513 }; << 514 << 515 /* TODO what is this? couldn't find in mib */ << 516 enum { << 517 NL802154_DEVKEY_IGNORE, << 518 NL802154_DEVKEY_RESTRICT, << 519 NL802154_DEVKEY_RECORD, << 520 << 521 /* keep last */ << 522 __NL802154_DEVKEY_AFTER_LAST, << 523 NL802154_DEVKEY_MAX = __NL802154_DEVKE << 524 }; << 525 << 526 enum nl802154_dev { << 527 NL802154_DEV_ATTR_UNSPEC, << 528 << 529 NL802154_DEV_ATTR_FRAME_COUNTER, << 530 NL802154_DEV_ATTR_PAN_ID, << 531 NL802154_DEV_ATTR_SHORT_ADDR, << 532 NL802154_DEV_ATTR_EXTENDED_ADDR, << 533 NL802154_DEV_ATTR_SECLEVEL_EXEMPT, << 534 NL802154_DEV_ATTR_KEY_MODE, << 535 NL802154_DEV_ATTR_PAD, << 536 << 537 /* keep last */ << 538 __NL802154_DEV_ATTR_AFTER_LAST, << 539 NL802154_DEV_ATTR_MAX = __NL802154_DEV << 540 }; << 541 << 542 enum nl802154_devkey { << 543 NL802154_DEVKEY_ATTR_UNSPEC, << 544 << 545 NL802154_DEVKEY_ATTR_FRAME_COUNTER, << 546 NL802154_DEVKEY_ATTR_EXTENDED_ADDR, << 547 NL802154_DEVKEY_ATTR_ID, << 548 NL802154_DEVKEY_ATTR_PAD, << 549 << 550 /* keep last */ << 551 __NL802154_DEVKEY_ATTR_AFTER_LAST, << 552 NL802154_DEVKEY_ATTR_MAX = __NL802154_ << 553 }; << 554 << 555 enum nl802154_key { << 556 NL802154_KEY_ATTR_UNSPEC, << 557 << 558 NL802154_KEY_ATTR_ID, << 559 NL802154_KEY_ATTR_USAGE_FRAMES, << 560 NL802154_KEY_ATTR_USAGE_CMDS, << 561 NL802154_KEY_ATTR_BYTES, << 562 << 563 /* keep last */ << 564 __NL802154_KEY_ATTR_AFTER_LAST, << 565 NL802154_KEY_ATTR_MAX = __NL802154_KEY << 566 }; << 567 << 568 #define NL802154_KEY_SIZE 16 << 569 #define NL802154_CMD_FRAME_NR_IDS 256 << 570 << 571 #endif /* CONFIG_IEEE802154_NL802154_EXPERIMEN << 572 125 573 #endif /* __NL802154_H */ !! 126 #endif 574 127
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.