diff options
Diffstat (limited to 'include/linux/nl80211.h')
-rw-r--r-- | include/linux/nl80211.h | 174 |
1 files changed, 169 insertions, 5 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index dbea93b694e5..a8d71ed43a0e 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -242,6 +242,29 @@ | |||
242 | * @NL80211_CMD_LEAVE_IBSS: Leave the IBSS -- no special arguments, the IBSS is | 242 | * @NL80211_CMD_LEAVE_IBSS: Leave the IBSS -- no special arguments, the IBSS is |
243 | * determined by the network interface. | 243 | * determined by the network interface. |
244 | * | 244 | * |
245 | * @NL80211_CMD_TESTMODE: testmode command, takes a wiphy (or ifindex) attribute | ||
246 | * to identify the device, and the TESTDATA blob attribute to pass through | ||
247 | * to the driver. | ||
248 | * | ||
249 | * @NL80211_CMD_CONNECT: connection request and notification; this command | ||
250 | * requests to connect to a specified network but without separating | ||
251 | * auth and assoc steps. For this, you need to specify the SSID in a | ||
252 | * %NL80211_ATTR_SSID attribute, and can optionally specify the association | ||
253 | * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_MAC, | ||
254 | * %NL80211_ATTR_WIPHY_FREQ and %NL80211_ATTR_CONTROL_PORT. | ||
255 | * It is also sent as an event, with the BSSID and response IEs when the | ||
256 | * connection is established or failed to be established. This can be | ||
257 | * determined by the STATUS_CODE attribute. | ||
258 | * @NL80211_CMD_ROAM: request that the card roam (currently not implemented), | ||
259 | * sent as an event when the card/driver roamed by itself. | ||
260 | * @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify | ||
261 | * userspace that a connection was dropped by the AP or due to other | ||
262 | * reasons, for this the %NL80211_ATTR_DISCONNECTED_BY_AP and | ||
263 | * %NL80211_ATTR_REASON_CODE attributes are used. | ||
264 | * | ||
265 | * @NL80211_CMD_SET_WIPHY_NETNS: Set a wiphy's netns. Note that all devices | ||
266 | * associated with this wiphy must be down and will follow. | ||
267 | * | ||
245 | * @NL80211_CMD_MAX: highest used command number | 268 | * @NL80211_CMD_MAX: highest used command number |
246 | * @__NL80211_CMD_AFTER_LAST: internal use | 269 | * @__NL80211_CMD_AFTER_LAST: internal use |
247 | */ | 270 | */ |
@@ -310,6 +333,14 @@ enum nl80211_commands { | |||
310 | NL80211_CMD_JOIN_IBSS, | 333 | NL80211_CMD_JOIN_IBSS, |
311 | NL80211_CMD_LEAVE_IBSS, | 334 | NL80211_CMD_LEAVE_IBSS, |
312 | 335 | ||
336 | NL80211_CMD_TESTMODE, | ||
337 | |||
338 | NL80211_CMD_CONNECT, | ||
339 | NL80211_CMD_ROAM, | ||
340 | NL80211_CMD_DISCONNECT, | ||
341 | |||
342 | NL80211_CMD_SET_WIPHY_NETNS, | ||
343 | |||
313 | /* add new commands above here */ | 344 | /* add new commands above here */ |
314 | 345 | ||
315 | /* used to define NL80211_CMD_MAX below */ | 346 | /* used to define NL80211_CMD_MAX below */ |
@@ -449,10 +480,6 @@ enum nl80211_commands { | |||
449 | * @NL80211_ATTR_SCAN_FREQUENCIES: nested attribute with frequencies (in MHz) | 480 | * @NL80211_ATTR_SCAN_FREQUENCIES: nested attribute with frequencies (in MHz) |
450 | * @NL80211_ATTR_SCAN_SSIDS: nested attribute with SSIDs, leave out for passive | 481 | * @NL80211_ATTR_SCAN_SSIDS: nested attribute with SSIDs, leave out for passive |
451 | * scanning and include a zero-length SSID (wildcard) for wildcard scan | 482 | * scanning and include a zero-length SSID (wildcard) for wildcard scan |
452 | * @NL80211_ATTR_SCAN_GENERATION: the scan generation increases whenever the | ||
453 | * scan result list changes (BSS expired or added) so that applications | ||
454 | * can verify that they got a single, consistent snapshot (when all dump | ||
455 | * messages carried the same generation number) | ||
456 | * @NL80211_ATTR_BSS: scan result BSS | 483 | * @NL80211_ATTR_BSS: scan result BSS |
457 | * | 484 | * |
458 | * @NL80211_ATTR_REG_INITIATOR: indicates who requested the regulatory domain | 485 | * @NL80211_ATTR_REG_INITIATOR: indicates who requested the regulatory domain |
@@ -511,6 +538,52 @@ enum nl80211_commands { | |||
511 | * authorized by user space. Otherwise, port is marked authorized by | 538 | * authorized by user space. Otherwise, port is marked authorized by |
512 | * default in station mode. | 539 | * default in station mode. |
513 | * | 540 | * |
541 | * @NL80211_ATTR_TESTDATA: Testmode data blob, passed through to the driver. | ||
542 | * We recommend using nested, driver-specific attributes within this. | ||
543 | * | ||
544 | * @NL80211_ATTR_DISCONNECTED_BY_AP: A flag indicating that the DISCONNECT | ||
545 | * event was due to the AP disconnecting the station, and not due to | ||
546 | * a local disconnect request. | ||
547 | * @NL80211_ATTR_STATUS_CODE: StatusCode for the %NL80211_CMD_CONNECT | ||
548 | * event (u16) | ||
549 | * @NL80211_ATTR_PRIVACY: Flag attribute, used with connect(), indicating | ||
550 | * that protected APs should be used. | ||
551 | * | ||
552 | * @NL80211_ATTR_CIPHERS_PAIRWISE: Used with CONNECT and ASSOCIATE to | ||
553 | * indicate which unicast key ciphers will be used with the connection | ||
554 | * (an array of u32). | ||
555 | * @NL80211_ATTR_CIPHER_GROUP: Used with CONNECT and ASSOCIATE to indicate | ||
556 | * which group key cipher will be used with the connection (a u32). | ||
557 | * @NL80211_ATTR_WPA_VERSIONS: Used with CONNECT and ASSOCIATE to indicate | ||
558 | * which WPA version(s) the AP we want to associate with is using | ||
559 | * (a u32 with flags from &enum nl80211_wpa_versions). | ||
560 | * @NL80211_ATTR_AKM_SUITES: Used with CONNECT and ASSOCIATE to indicate | ||
561 | * which key management algorithm(s) to use (an array of u32). | ||
562 | * | ||
563 | * @NL80211_ATTR_REQ_IE: (Re)association request information elements as | ||
564 | * sent out by the card, for ROAM and successful CONNECT events. | ||
565 | * @NL80211_ATTR_RESP_IE: (Re)association response information elements as | ||
566 | * sent by peer, for ROAM and successful CONNECT events. | ||
567 | * | ||
568 | * @NL80211_ATTR_PREV_BSSID: previous BSSID, to be used by in ASSOCIATE | ||
569 | * commands to specify using a reassociate frame | ||
570 | * | ||
571 | * @NL80211_ATTR_KEY: key information in a nested attribute with | ||
572 | * %NL80211_KEY_* sub-attributes | ||
573 | * @NL80211_ATTR_KEYS: array of keys for static WEP keys for connect() | ||
574 | * and join_ibss(), key information is in a nested attribute each | ||
575 | * with %NL80211_KEY_* sub-attributes | ||
576 | * | ||
577 | * @NL80211_ATTR_PID: Process ID of a network namespace. | ||
578 | * | ||
579 | * @NL80211_ATTR_GENERATION: Used to indicate consistent snapshots for | ||
580 | * dumps. This number increases whenever the object list being | ||
581 | * dumped changes, and as such userspace can verify that it has | ||
582 | * obtained a complete and consistent snapshot by verifying that | ||
583 | * all dump messages contain the same generation number. If it | ||
584 | * changed then the list changed and the dump should be repeated | ||
585 | * completely from scratch. | ||
586 | * | ||
514 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 587 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
515 | * @__NL80211_ATTR_AFTER_LAST: internal use | 588 | * @__NL80211_ATTR_AFTER_LAST: internal use |
516 | */ | 589 | */ |
@@ -582,7 +655,7 @@ enum nl80211_attrs { | |||
582 | 655 | ||
583 | NL80211_ATTR_SCAN_FREQUENCIES, | 656 | NL80211_ATTR_SCAN_FREQUENCIES, |
584 | NL80211_ATTR_SCAN_SSIDS, | 657 | NL80211_ATTR_SCAN_SSIDS, |
585 | NL80211_ATTR_SCAN_GENERATION, | 658 | NL80211_ATTR_GENERATION, /* replaces old SCAN_GENERATION */ |
586 | NL80211_ATTR_BSS, | 659 | NL80211_ATTR_BSS, |
587 | 660 | ||
588 | NL80211_ATTR_REG_INITIATOR, | 661 | NL80211_ATTR_REG_INITIATOR, |
@@ -619,16 +692,42 @@ enum nl80211_attrs { | |||
619 | 692 | ||
620 | NL80211_ATTR_CONTROL_PORT, | 693 | NL80211_ATTR_CONTROL_PORT, |
621 | 694 | ||
695 | NL80211_ATTR_TESTDATA, | ||
696 | |||
697 | NL80211_ATTR_PRIVACY, | ||
698 | |||
699 | NL80211_ATTR_DISCONNECTED_BY_AP, | ||
700 | NL80211_ATTR_STATUS_CODE, | ||
701 | |||
702 | NL80211_ATTR_CIPHER_SUITES_PAIRWISE, | ||
703 | NL80211_ATTR_CIPHER_SUITE_GROUP, | ||
704 | NL80211_ATTR_WPA_VERSIONS, | ||
705 | NL80211_ATTR_AKM_SUITES, | ||
706 | |||
707 | NL80211_ATTR_REQ_IE, | ||
708 | NL80211_ATTR_RESP_IE, | ||
709 | |||
710 | NL80211_ATTR_PREV_BSSID, | ||
711 | |||
712 | NL80211_ATTR_KEY, | ||
713 | NL80211_ATTR_KEYS, | ||
714 | |||
715 | NL80211_ATTR_PID, | ||
716 | |||
622 | /* add attributes here, update the policy in nl80211.c */ | 717 | /* add attributes here, update the policy in nl80211.c */ |
623 | 718 | ||
624 | __NL80211_ATTR_AFTER_LAST, | 719 | __NL80211_ATTR_AFTER_LAST, |
625 | NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1 | 720 | NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1 |
626 | }; | 721 | }; |
627 | 722 | ||
723 | /* source-level API compatibility */ | ||
724 | #define NL80211_ATTR_SCAN_GENERATION NL80211_ATTR_GENERATION | ||
725 | |||
628 | /* | 726 | /* |
629 | * Allow user space programs to use #ifdef on new attributes by defining them | 727 | * Allow user space programs to use #ifdef on new attributes by defining them |
630 | * here | 728 | * here |
631 | */ | 729 | */ |
730 | #define NL80211_CMD_CONNECT NL80211_CMD_CONNECT | ||
632 | #define NL80211_ATTR_HT_CAPABILITY NL80211_ATTR_HT_CAPABILITY | 731 | #define NL80211_ATTR_HT_CAPABILITY NL80211_ATTR_HT_CAPABILITY |
633 | #define NL80211_ATTR_BSS_BASIC_RATES NL80211_ATTR_BSS_BASIC_RATES | 732 | #define NL80211_ATTR_BSS_BASIC_RATES NL80211_ATTR_BSS_BASIC_RATES |
634 | #define NL80211_ATTR_WIPHY_TXQ_PARAMS NL80211_ATTR_WIPHY_TXQ_PARAMS | 733 | #define NL80211_ATTR_WIPHY_TXQ_PARAMS NL80211_ATTR_WIPHY_TXQ_PARAMS |
@@ -642,6 +741,12 @@ enum nl80211_attrs { | |||
642 | #define NL80211_ATTR_SSID NL80211_ATTR_SSID | 741 | #define NL80211_ATTR_SSID NL80211_ATTR_SSID |
643 | #define NL80211_ATTR_AUTH_TYPE NL80211_ATTR_AUTH_TYPE | 742 | #define NL80211_ATTR_AUTH_TYPE NL80211_ATTR_AUTH_TYPE |
644 | #define NL80211_ATTR_REASON_CODE NL80211_ATTR_REASON_CODE | 743 | #define NL80211_ATTR_REASON_CODE NL80211_ATTR_REASON_CODE |
744 | #define NL80211_ATTR_CIPHER_SUITES_PAIRWISE NL80211_ATTR_CIPHER_SUITES_PAIRWISE | ||
745 | #define NL80211_ATTR_CIPHER_SUITE_GROUP NL80211_ATTR_CIPHER_SUITE_GROUP | ||
746 | #define NL80211_ATTR_WPA_VERSIONS NL80211_ATTR_WPA_VERSIONS | ||
747 | #define NL80211_ATTR_AKM_SUITES NL80211_ATTR_AKM_SUITES | ||
748 | #define NL80211_ATTR_KEY NL80211_ATTR_KEY | ||
749 | #define NL80211_ATTR_KEYS NL80211_ATTR_KEYS | ||
645 | 750 | ||
646 | #define NL80211_MAX_SUPP_RATES 32 | 751 | #define NL80211_MAX_SUPP_RATES 32 |
647 | #define NL80211_MAX_SUPP_REG_RULES 32 | 752 | #define NL80211_MAX_SUPP_REG_RULES 32 |
@@ -650,6 +755,9 @@ enum nl80211_attrs { | |||
650 | #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24 | 755 | #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24 |
651 | #define NL80211_HT_CAPABILITY_LEN 26 | 756 | #define NL80211_HT_CAPABILITY_LEN 26 |
652 | 757 | ||
758 | #define NL80211_MAX_NR_CIPHER_SUITES 5 | ||
759 | #define NL80211_MAX_NR_AKM_SUITES 2 | ||
760 | |||
653 | /** | 761 | /** |
654 | * enum nl80211_iftype - (virtual) interface types | 762 | * enum nl80211_iftype - (virtual) interface types |
655 | * | 763 | * |
@@ -1168,6 +1276,7 @@ enum nl80211_channel_type { | |||
1168 | * in mBm (100 * dBm) (s32) | 1276 | * in mBm (100 * dBm) (s32) |
1169 | * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon | 1277 | * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon |
1170 | * in unspecified units, scaled to 0..100 (u8) | 1278 | * in unspecified units, scaled to 0..100 (u8) |
1279 | * @NL80211_BSS_STATUS: status, if this BSS is "used" | ||
1171 | * @__NL80211_BSS_AFTER_LAST: internal | 1280 | * @__NL80211_BSS_AFTER_LAST: internal |
1172 | * @NL80211_BSS_MAX: highest BSS attribute | 1281 | * @NL80211_BSS_MAX: highest BSS attribute |
1173 | */ | 1282 | */ |
@@ -1181,6 +1290,7 @@ enum nl80211_bss { | |||
1181 | NL80211_BSS_INFORMATION_ELEMENTS, | 1290 | NL80211_BSS_INFORMATION_ELEMENTS, |
1182 | NL80211_BSS_SIGNAL_MBM, | 1291 | NL80211_BSS_SIGNAL_MBM, |
1183 | NL80211_BSS_SIGNAL_UNSPEC, | 1292 | NL80211_BSS_SIGNAL_UNSPEC, |
1293 | NL80211_BSS_STATUS, | ||
1184 | 1294 | ||
1185 | /* keep last */ | 1295 | /* keep last */ |
1186 | __NL80211_BSS_AFTER_LAST, | 1296 | __NL80211_BSS_AFTER_LAST, |
@@ -1188,18 +1298,37 @@ enum nl80211_bss { | |||
1188 | }; | 1298 | }; |
1189 | 1299 | ||
1190 | /** | 1300 | /** |
1301 | * enum nl80211_bss_status - BSS "status" | ||
1302 | */ | ||
1303 | enum nl80211_bss_status { | ||
1304 | NL80211_BSS_STATUS_AUTHENTICATED, | ||
1305 | NL80211_BSS_STATUS_ASSOCIATED, | ||
1306 | NL80211_BSS_STATUS_IBSS_JOINED, | ||
1307 | }; | ||
1308 | |||
1309 | /** | ||
1191 | * enum nl80211_auth_type - AuthenticationType | 1310 | * enum nl80211_auth_type - AuthenticationType |
1192 | * | 1311 | * |
1193 | * @NL80211_AUTHTYPE_OPEN_SYSTEM: Open System authentication | 1312 | * @NL80211_AUTHTYPE_OPEN_SYSTEM: Open System authentication |
1194 | * @NL80211_AUTHTYPE_SHARED_KEY: Shared Key authentication (WEP only) | 1313 | * @NL80211_AUTHTYPE_SHARED_KEY: Shared Key authentication (WEP only) |
1195 | * @NL80211_AUTHTYPE_FT: Fast BSS Transition (IEEE 802.11r) | 1314 | * @NL80211_AUTHTYPE_FT: Fast BSS Transition (IEEE 802.11r) |
1196 | * @NL80211_AUTHTYPE_NETWORK_EAP: Network EAP (some Cisco APs and mainly LEAP) | 1315 | * @NL80211_AUTHTYPE_NETWORK_EAP: Network EAP (some Cisco APs and mainly LEAP) |
1316 | * @__NL80211_AUTHTYPE_NUM: internal | ||
1317 | * @NL80211_AUTHTYPE_MAX: maximum valid auth algorithm | ||
1318 | * @NL80211_AUTHTYPE_AUTOMATIC: determine automatically (if necessary by | ||
1319 | * trying multiple times); this is invalid in netlink -- leave out | ||
1320 | * the attribute for this on CONNECT commands. | ||
1197 | */ | 1321 | */ |
1198 | enum nl80211_auth_type { | 1322 | enum nl80211_auth_type { |
1199 | NL80211_AUTHTYPE_OPEN_SYSTEM, | 1323 | NL80211_AUTHTYPE_OPEN_SYSTEM, |
1200 | NL80211_AUTHTYPE_SHARED_KEY, | 1324 | NL80211_AUTHTYPE_SHARED_KEY, |
1201 | NL80211_AUTHTYPE_FT, | 1325 | NL80211_AUTHTYPE_FT, |
1202 | NL80211_AUTHTYPE_NETWORK_EAP, | 1326 | NL80211_AUTHTYPE_NETWORK_EAP, |
1327 | |||
1328 | /* keep last */ | ||
1329 | __NL80211_AUTHTYPE_NUM, | ||
1330 | NL80211_AUTHTYPE_MAX = __NL80211_AUTHTYPE_NUM - 1, | ||
1331 | NL80211_AUTHTYPE_AUTOMATIC | ||
1203 | }; | 1332 | }; |
1204 | 1333 | ||
1205 | /** | 1334 | /** |
@@ -1224,4 +1353,39 @@ enum nl80211_mfp { | |||
1224 | NL80211_MFP_REQUIRED, | 1353 | NL80211_MFP_REQUIRED, |
1225 | }; | 1354 | }; |
1226 | 1355 | ||
1356 | enum nl80211_wpa_versions { | ||
1357 | NL80211_WPA_VERSION_1 = 1 << 0, | ||
1358 | NL80211_WPA_VERSION_2 = 1 << 1, | ||
1359 | }; | ||
1360 | |||
1361 | /** | ||
1362 | * enum nl80211_key_attributes - key attributes | ||
1363 | * @__NL80211_KEY_INVALID: invalid | ||
1364 | * @NL80211_KEY_DATA: (temporal) key data; for TKIP this consists of | ||
1365 | * 16 bytes encryption key followed by 8 bytes each for TX and RX MIC | ||
1366 | * keys | ||
1367 | * @NL80211_KEY_IDX: key ID (u8, 0-3) | ||
1368 | * @NL80211_KEY_CIPHER: key cipher suite (u32, as defined by IEEE 802.11 | ||
1369 | * section 7.3.2.25.1, e.g. 0x000FAC04) | ||
1370 | * @NL80211_KEY_SEQ: transmit key sequence number (IV/PN) for TKIP and | ||
1371 | * CCMP keys, each six bytes in little endian | ||
1372 | * @NL80211_KEY_DEFAULT: flag indicating default key | ||
1373 | * @NL80211_KEY_DEFAULT_MGMT: flag indicating default management key | ||
1374 | * @__NL80211_KEY_AFTER_LAST: internal | ||
1375 | * @NL80211_KEY_MAX: highest key attribute | ||
1376 | */ | ||
1377 | enum nl80211_key_attributes { | ||
1378 | __NL80211_KEY_INVALID, | ||
1379 | NL80211_KEY_DATA, | ||
1380 | NL80211_KEY_IDX, | ||
1381 | NL80211_KEY_CIPHER, | ||
1382 | NL80211_KEY_SEQ, | ||
1383 | NL80211_KEY_DEFAULT, | ||
1384 | NL80211_KEY_DEFAULT_MGMT, | ||
1385 | |||
1386 | /* keep last */ | ||
1387 | __NL80211_KEY_AFTER_LAST, | ||
1388 | NL80211_KEY_MAX = __NL80211_KEY_AFTER_LAST - 1 | ||
1389 | }; | ||
1390 | |||
1227 | #endif /* __LINUX_NL80211_H */ | 1391 | #endif /* __LINUX_NL80211_H */ |