Go to the documentation of this file.
10 #ifndef _UAPI_LINUX_WIRELESS_H
11 #define _UAPI_LINUX_WIRELESS_H
72 #include <linux/types.h>
73 #include <linux/socket.h>
83 #define WIRELESS_EXT 22
230 #define SIOCSIWCOMMIT 0x8B00
231 #define SIOCGIWNAME 0x8B01
237 #define SIOCSIWNWID 0x8B02
238 #define SIOCGIWNWID 0x8B03
239 #define SIOCSIWFREQ 0x8B04
240 #define SIOCGIWFREQ 0x8B05
241 #define SIOCSIWMODE 0x8B06
242 #define SIOCGIWMODE 0x8B07
243 #define SIOCSIWSENS 0x8B08
244 #define SIOCGIWSENS 0x8B09
247 #define SIOCSIWRANGE 0x8B0A
248 #define SIOCGIWRANGE 0x8B0B
249 #define SIOCSIWPRIV 0x8B0C
250 #define SIOCGIWPRIV 0x8B0D
251 #define SIOCSIWSTATS 0x8B0E
252 #define SIOCGIWSTATS 0x8B0F
257 #define SIOCSIWSPY 0x8B10
258 #define SIOCGIWSPY 0x8B11
259 #define SIOCSIWTHRSPY 0x8B12
260 #define SIOCGIWTHRSPY 0x8B13
263 #define SIOCSIWAP 0x8B14
264 #define SIOCGIWAP 0x8B15
265 #define SIOCGIWAPLIST 0x8B17
266 #define SIOCSIWSCAN 0x8B18
267 #define SIOCGIWSCAN 0x8B19
270 #define SIOCSIWESSID 0x8B1A
271 #define SIOCGIWESSID 0x8B1B
272 #define SIOCSIWNICKN 0x8B1C
273 #define SIOCGIWNICKN 0x8B1D
279 #define SIOCSIWRATE 0x8B20
280 #define SIOCGIWRATE 0x8B21
281 #define SIOCSIWRTS 0x8B22
282 #define SIOCGIWRTS 0x8B23
283 #define SIOCSIWFRAG 0x8B24
284 #define SIOCGIWFRAG 0x8B25
285 #define SIOCSIWTXPOW 0x8B26
286 #define SIOCGIWTXPOW 0x8B27
287 #define SIOCSIWRETRY 0x8B28
288 #define SIOCGIWRETRY 0x8B29
291 #define SIOCSIWENCODE 0x8B2A
292 #define SIOCGIWENCODE 0x8B2B
294 #define SIOCSIWPOWER 0x8B2C
295 #define SIOCGIWPOWER 0x8B2D
304 #define SIOCSIWGENIE 0x8B30
305 #define SIOCGIWGENIE 0x8B31
308 #define SIOCSIWMLME 0x8B16
311 #define SIOCSIWAUTH 0x8B32
312 #define SIOCGIWAUTH 0x8B33
315 #define SIOCSIWENCODEEXT 0x8B34
316 #define SIOCGIWENCODEEXT 0x8B35
319 #define SIOCSIWPMKSA 0x8B36
330 #define SIOCIWFIRSTPRIV 0x8BE0
331 #define SIOCIWLASTPRIV 0x8BFF
346 #define SIOCIWFIRST 0x8B00
347 #define SIOCIWLAST SIOCIWLASTPRIV
348 #define IW_IOCTL_IDX(cmd) ((cmd) - SIOCIWFIRST)
349 #define IW_HANDLER(id, func) \
350 [IW_IOCTL_IDX(id)] = func
353 #define IW_IS_SET(cmd) (!((cmd) & 0x1))
354 #define IW_IS_GET(cmd) ((cmd) & 0x1)
360 #define IWEVTXDROP 0x8C00
361 #define IWEVQUAL 0x8C01
362 #define IWEVCUSTOM 0x8C02
363 #define IWEVREGISTERED 0x8C03
364 #define IWEVEXPIRED 0x8C04
365 #define IWEVGENIE 0x8C05
371 #define IWEVMICHAELMICFAILURE 0x8C06
374 #define IWEVASSOCREQIE 0x8C07
383 #define IWEVASSOCRESPIE 0x8C08
390 #define IWEVPMKIDCAND 0x8C09
394 #define IWEVFIRST 0x8C00
395 #define IW_EVENT_IDX(cmd) ((cmd) - IWEVFIRST)
404 #define IW_PRIV_TYPE_MASK 0x7000
405 #define IW_PRIV_TYPE_NONE 0x0000
406 #define IW_PRIV_TYPE_BYTE 0x1000
407 #define IW_PRIV_TYPE_CHAR 0x2000
408 #define IW_PRIV_TYPE_INT 0x4000
409 #define IW_PRIV_TYPE_FLOAT 0x5000
410 #define IW_PRIV_TYPE_ADDR 0x6000
412 #define IW_PRIV_SIZE_FIXED 0x0800
414 #define IW_PRIV_SIZE_MASK 0x07FF
424 #define IW_MAX_FREQUENCIES 32
430 #define IW_MAX_BITRATES 32
433 #define IW_MAX_TXPOWER 8
445 #define IW_ESSID_MAX_SIZE 32
448 #define IW_MODE_AUTO 0
449 #define IW_MODE_ADHOC 1
450 #define IW_MODE_INFRA 2
451 #define IW_MODE_MASTER 3
452 #define IW_MODE_REPEAT 4
453 #define IW_MODE_SECOND 5
454 #define IW_MODE_MONITOR 6
455 #define IW_MODE_MESH 7
458 #define IW_QUAL_QUAL_UPDATED 0x01
459 #define IW_QUAL_LEVEL_UPDATED 0x02
460 #define IW_QUAL_NOISE_UPDATED 0x04
461 #define IW_QUAL_ALL_UPDATED 0x07
462 #define IW_QUAL_DBM 0x08
463 #define IW_QUAL_QUAL_INVALID 0x10
464 #define IW_QUAL_LEVEL_INVALID 0x20
465 #define IW_QUAL_NOISE_INVALID 0x40
466 #define IW_QUAL_RCPI 0x80
467 #define IW_QUAL_ALL_INVALID 0x70
470 #define IW_FREQ_AUTO 0x00
471 #define IW_FREQ_FIXED 0x01
475 #define IW_MAX_ENCODING_SIZES 8
478 #define IW_ENCODING_TOKEN_MAX 64
481 #define IW_ENCODE_INDEX 0x00FF
482 #define IW_ENCODE_FLAGS 0xFF00
483 #define IW_ENCODE_MODE 0xF000
484 #define IW_ENCODE_DISABLED 0x8000
485 #define IW_ENCODE_ENABLED 0x0000
486 #define IW_ENCODE_RESTRICTED 0x4000
487 #define IW_ENCODE_OPEN 0x2000
488 #define IW_ENCODE_NOKEY 0x0800
489 #define IW_ENCODE_TEMP 0x0400
492 #define IW_POWER_ON 0x0000
493 #define IW_POWER_TYPE 0xF000
494 #define IW_POWER_PERIOD 0x1000
495 #define IW_POWER_TIMEOUT 0x2000
496 #define IW_POWER_MODE 0x0F00
497 #define IW_POWER_UNICAST_R 0x0100
498 #define IW_POWER_MULTICAST_R 0x0200
499 #define IW_POWER_ALL_R 0x0300
500 #define IW_POWER_FORCE_S 0x0400
501 #define IW_POWER_REPEATER 0x0800
502 #define IW_POWER_MODIFIER 0x000F
503 #define IW_POWER_MIN 0x0001
504 #define IW_POWER_MAX 0x0002
505 #define IW_POWER_RELATIVE 0x0004
508 #define IW_TXPOW_TYPE 0x00FF
509 #define IW_TXPOW_DBM 0x0000
510 #define IW_TXPOW_MWATT 0x0001
511 #define IW_TXPOW_RELATIVE 0x0002
512 #define IW_TXPOW_RANGE 0x1000
515 #define IW_RETRY_ON 0x0000
516 #define IW_RETRY_TYPE 0xF000
517 #define IW_RETRY_LIMIT 0x1000
518 #define IW_RETRY_LIFETIME 0x2000
519 #define IW_RETRY_MODIFIER 0x00FF
520 #define IW_RETRY_MIN 0x0001
521 #define IW_RETRY_MAX 0x0002
522 #define IW_RETRY_RELATIVE 0x0004
523 #define IW_RETRY_SHORT 0x0010
524 #define IW_RETRY_LONG 0x0020
527 #define IW_SCAN_DEFAULT 0x0000
528 #define IW_SCAN_ALL_ESSID 0x0001
529 #define IW_SCAN_THIS_ESSID 0x0002
530 #define IW_SCAN_ALL_FREQ 0x0004
531 #define IW_SCAN_THIS_FREQ 0x0008
532 #define IW_SCAN_ALL_MODE 0x0010
533 #define IW_SCAN_THIS_MODE 0x0020
534 #define IW_SCAN_ALL_RATE 0x0040
535 #define IW_SCAN_THIS_RATE 0x0080
537 #define IW_SCAN_TYPE_ACTIVE 0
538 #define IW_SCAN_TYPE_PASSIVE 1
540 #define IW_SCAN_MAX_DATA 4096
543 #define IW_SCAN_CAPA_NONE 0x00
544 #define IW_SCAN_CAPA_ESSID 0x01
545 #define IW_SCAN_CAPA_BSSID 0x02
546 #define IW_SCAN_CAPA_CHANNEL 0x04
547 #define IW_SCAN_CAPA_MODE 0x08
548 #define IW_SCAN_CAPA_RATE 0x10
549 #define IW_SCAN_CAPA_TYPE 0x20
550 #define IW_SCAN_CAPA_TIME 0x40
553 #define IW_CUSTOM_MAX 256
556 #define IW_GENERIC_IE_MAX 1024
559 #define IW_MLME_DEAUTH 0
560 #define IW_MLME_DISASSOC 1
561 #define IW_MLME_AUTH 2
562 #define IW_MLME_ASSOC 3
565 #define IW_AUTH_INDEX 0x0FFF
566 #define IW_AUTH_FLAGS 0xF000
571 #define IW_AUTH_WPA_VERSION 0
572 #define IW_AUTH_CIPHER_PAIRWISE 1
573 #define IW_AUTH_CIPHER_GROUP 2
574 #define IW_AUTH_KEY_MGMT 3
575 #define IW_AUTH_TKIP_COUNTERMEASURES 4
576 #define IW_AUTH_DROP_UNENCRYPTED 5
577 #define IW_AUTH_80211_AUTH_ALG 6
578 #define IW_AUTH_WPA_ENABLED 7
579 #define IW_AUTH_RX_UNENCRYPTED_EAPOL 8
580 #define IW_AUTH_ROAMING_CONTROL 9
581 #define IW_AUTH_PRIVACY_INVOKED 10
582 #define IW_AUTH_CIPHER_GROUP_MGMT 11
583 #define IW_AUTH_MFP 12
586 #define IW_AUTH_WPA_VERSION_DISABLED 0x00000001
587 #define IW_AUTH_WPA_VERSION_WPA 0x00000002
588 #define IW_AUTH_WPA_VERSION_WPA2 0x00000004
592 #define IW_AUTH_CIPHER_NONE 0x00000001
593 #define IW_AUTH_CIPHER_WEP40 0x00000002
594 #define IW_AUTH_CIPHER_TKIP 0x00000004
595 #define IW_AUTH_CIPHER_CCMP 0x00000008
596 #define IW_AUTH_CIPHER_WEP104 0x00000010
597 #define IW_AUTH_CIPHER_AES_CMAC 0x00000020
600 #define IW_AUTH_KEY_MGMT_802_1X 1
601 #define IW_AUTH_KEY_MGMT_PSK 2
604 #define IW_AUTH_ALG_OPEN_SYSTEM 0x00000001
605 #define IW_AUTH_ALG_SHARED_KEY 0x00000002
606 #define IW_AUTH_ALG_LEAP 0x00000004
609 #define IW_AUTH_ROAMING_ENABLE 0
610 #define IW_AUTH_ROAMING_DISABLE 1
614 #define IW_AUTH_MFP_DISABLED 0
615 #define IW_AUTH_MFP_OPTIONAL 1
616 #define IW_AUTH_MFP_REQUIRED 2
619 #define IW_ENCODE_SEQ_MAX_SIZE 8
621 #define IW_ENCODE_ALG_NONE 0
622 #define IW_ENCODE_ALG_WEP 1
623 #define IW_ENCODE_ALG_TKIP 2
624 #define IW_ENCODE_ALG_CCMP 3
625 #define IW_ENCODE_ALG_PMK 4
626 #define IW_ENCODE_ALG_AES_CMAC 5
628 #define IW_ENCODE_EXT_TX_SEQ_VALID 0x00000001
629 #define IW_ENCODE_EXT_RX_SEQ_VALID 0x00000002
630 #define IW_ENCODE_EXT_GROUP_KEY 0x00000004
631 #define IW_ENCODE_EXT_SET_TX_KEY 0x00000008
634 #define IW_MICFAILURE_KEY_ID 0x00000003
635 #define IW_MICFAILURE_GROUP 0x00000004
636 #define IW_MICFAILURE_PAIRWISE 0x00000008
637 #define IW_MICFAILURE_STAKEY 0x00000010
638 #define IW_MICFAILURE_COUNT 0x00000060
642 #define IW_ENC_CAPA_WPA 0x00000001
643 #define IW_ENC_CAPA_WPA2 0x00000002
644 #define IW_ENC_CAPA_CIPHER_TKIP 0x00000004
645 #define IW_ENC_CAPA_CIPHER_CCMP 0x00000008
646 #define IW_ENC_CAPA_4WAY_HANDSHAKE 0x00000010
651 #define IW_EVENT_CAPA_BASE(cmd) ((cmd >= SIOCIWFIRSTPRIV) ? \
652 (cmd - SIOCIWFIRSTPRIV + 0x60) : \
654 #define IW_EVENT_CAPA_INDEX(cmd) (IW_EVENT_CAPA_BASE(cmd) >> 5)
655 #define IW_EVENT_CAPA_MASK(cmd) (1 << (IW_EVENT_CAPA_BASE(cmd) & 0x1F))
658 #define IW_EVENT_CAPA_K_0 (IW_EVENT_CAPA_MASK(0x8B04) | \
659 IW_EVENT_CAPA_MASK(0x8B06) | \
660 IW_EVENT_CAPA_MASK(0x8B1A))
661 #define IW_EVENT_CAPA_K_1 (IW_EVENT_CAPA_MASK(0x8B2A))
663 #define IW_EVENT_CAPA_SET(event_capa, cmd) (event_capa[IW_EVENT_CAPA_INDEX(cmd)] |= IW_EVENT_CAPA_MASK(cmd))
664 #define IW_EVENT_CAPA_SET_KERNEL(event_capa) {event_capa[0] |= IW_EVENT_CAPA_K_0; event_capa[1] |= IW_EVENT_CAPA_K_1; }
852 #define IW_PMKSA_ADD 1
853 #define IW_PMKSA_REMOVE 2
854 #define IW_PMKSA_FLUSH 3
856 #define IW_PMKID_LEN 16
874 #define IW_PMKID_CAND_PREAUTH 0x00000001
1099 #define IW_EV_LCP_LEN (sizeof(struct iw_event) - sizeof(union iwreq_data))
1101 #define IW_EV_CHAR_LEN (IW_EV_LCP_LEN + IFNAMSIZ)
1102 #define IW_EV_UINT_LEN (IW_EV_LCP_LEN + sizeof(__u32))
1103 #define IW_EV_FREQ_LEN (IW_EV_LCP_LEN + sizeof(struct iw_freq))
1104 #define IW_EV_PARAM_LEN (IW_EV_LCP_LEN + sizeof(struct iw_param))
1105 #define IW_EV_ADDR_LEN (IW_EV_LCP_LEN + sizeof(struct sockaddr))
1106 #define IW_EV_QUAL_LEN (IW_EV_LCP_LEN + sizeof(struct iw_quality))
1111 #define IW_EV_POINT_OFF (((char *) &(((struct iw_point *) NULL)->length)) - \
1113 #define IW_EV_POINT_LEN (IW_EV_LCP_LEN + sizeof(struct iw_point) - \
1118 #define IW_EV_LCP_PK_LEN (4)
1120 #define IW_EV_CHAR_PK_LEN (IW_EV_LCP_PK_LEN + IFNAMSIZ)
1121 #define IW_EV_UINT_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(__u32))
1122 #define IW_EV_FREQ_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(struct iw_freq))
1123 #define IW_EV_PARAM_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(struct iw_param))
1124 #define IW_EV_ADDR_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(struct sockaddr))
1125 #define IW_EV_QUAL_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(struct iw_quality))
1126 #define IW_EV_POINT_PK_LEN (IW_EV_LCP_PK_LEN + 4)