1 /****************************************************************************
2 ****************************************************************************
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
10 ****************************************************************************
11 ****************************************************************************/
12 #ifndef _LINUX_WIRELESS_H
13 #define _LINUX_WIRELESS_H
15 #include <linux/types.h>
16 #include <linux/socket.h>
19 #define WIRELESS_EXT 20
21 #define SIOCSIWCOMMIT 0x8B00
22 #define SIOCGIWNAME 0x8B01
24 #define SIOCSIWNWID 0x8B02
25 #define SIOCGIWNWID 0x8B03
26 #define SIOCSIWFREQ 0x8B04
27 #define SIOCGIWFREQ 0x8B05
28 #define SIOCSIWMODE 0x8B06
29 #define SIOCGIWMODE 0x8B07
30 #define SIOCSIWSENS 0x8B08
31 #define SIOCGIWSENS 0x8B09
33 #define SIOCSIWRANGE 0x8B0A
34 #define SIOCGIWRANGE 0x8B0B
35 #define SIOCSIWPRIV 0x8B0C
36 #define SIOCGIWPRIV 0x8B0D
37 #define SIOCSIWSTATS 0x8B0E
38 #define SIOCGIWSTATS 0x8B0F
40 #define SIOCSIWSPY 0x8B10
41 #define SIOCGIWSPY 0x8B11
42 #define SIOCSIWTHRSPY 0x8B12
43 #define SIOCGIWTHRSPY 0x8B13
45 #define SIOCSIWAP 0x8B14
46 #define SIOCGIWAP 0x8B15
47 #define SIOCGIWAPLIST 0x8B17
48 #define SIOCSIWSCAN 0x8B18
49 #define SIOCGIWSCAN 0x8B19
51 #define SIOCSIWESSID 0x8B1A
52 #define SIOCGIWESSID 0x8B1B
53 #define SIOCSIWNICKN 0x8B1C
54 #define SIOCGIWNICKN 0x8B1D
56 #define SIOCSIWRATE 0x8B20
57 #define SIOCGIWRATE 0x8B21
58 #define SIOCSIWRTS 0x8B22
59 #define SIOCGIWRTS 0x8B23
60 #define SIOCSIWFRAG 0x8B24
61 #define SIOCGIWFRAG 0x8B25
62 #define SIOCSIWTXPOW 0x8B26
63 #define SIOCGIWTXPOW 0x8B27
64 #define SIOCSIWRETRY 0x8B28
65 #define SIOCGIWRETRY 0x8B29
67 #define SIOCSIWENCODE 0x8B2A
68 #define SIOCGIWENCODE 0x8B2B
70 #define SIOCSIWPOWER 0x8B2C
71 #define SIOCGIWPOWER 0x8B2D
73 #define SIOCSIWGENIE 0x8B30
74 #define SIOCGIWGENIE 0x8B31
76 #define SIOCSIWMLME 0x8B16
78 #define SIOCSIWAUTH 0x8B32
79 #define SIOCGIWAUTH 0x8B33
81 #define SIOCSIWENCODEEXT 0x8B34
82 #define SIOCGIWENCODEEXT 0x8B35
84 #define SIOCSIWPMKSA 0x8B36
86 #define SIOCIWFIRSTPRIV 0x8BE0
87 #define SIOCIWLASTPRIV 0x8BFF
89 #define SIOCIWFIRST 0x8B00
90 #define SIOCIWLAST SIOCIWLASTPRIV
91 #define IW_IOCTL_IDX(cmd) ((cmd) - SIOCIWFIRST)
93 #define IW_IS_SET(cmd) (!((cmd) & 0x1))
94 #define IW_IS_GET(cmd) ((cmd) & 0x1)
96 #define IWEVTXDROP 0x8C00
97 #define IWEVQUAL 0x8C01
98 #define IWEVCUSTOM 0x8C02
99 #define IWEVREGISTERED 0x8C03
100 #define IWEVEXPIRED 0x8C04
101 #define IWEVGENIE 0x8C05
102 #define IWEVMICHAELMICFAILURE 0x8C06
103 #define IWEVASSOCREQIE 0x8C07
104 #define IWEVASSOCRESPIE 0x8C08
105 #define IWEVPMKIDCAND 0x8C09
107 #define IWEVFIRST 0x8C00
108 #define IW_EVENT_IDX(cmd) ((cmd) - IWEVFIRST)
110 #define IW_PRIV_TYPE_MASK 0x7000
111 #define IW_PRIV_TYPE_NONE 0x0000
112 #define IW_PRIV_TYPE_BYTE 0x1000
113 #define IW_PRIV_TYPE_CHAR 0x2000
114 #define IW_PRIV_TYPE_INT 0x4000
115 #define IW_PRIV_TYPE_FLOAT 0x5000
116 #define IW_PRIV_TYPE_ADDR 0x6000
118 #define IW_PRIV_SIZE_FIXED 0x0800
120 #define IW_PRIV_SIZE_MASK 0x07FF
122 #define IW_MAX_FREQUENCIES 32
124 #define IW_MAX_BITRATES 32
126 #define IW_MAX_TXPOWER 8
132 #define IW_ESSID_MAX_SIZE 32
134 #define IW_MODE_AUTO 0
135 #define IW_MODE_ADHOC 1
136 #define IW_MODE_INFRA 2
137 #define IW_MODE_MASTER 3
138 #define IW_MODE_REPEAT 4
139 #define IW_MODE_SECOND 5
140 #define IW_MODE_MONITOR 6
142 #define IW_QUAL_QUAL_UPDATED 0x01
143 #define IW_QUAL_LEVEL_UPDATED 0x02
144 #define IW_QUAL_NOISE_UPDATED 0x04
145 #define IW_QUAL_ALL_UPDATED 0x07
146 #define IW_QUAL_DBM 0x08
147 #define IW_QUAL_QUAL_INVALID 0x10
148 #define IW_QUAL_LEVEL_INVALID 0x20
149 #define IW_QUAL_NOISE_INVALID 0x40
150 #define IW_QUAL_ALL_INVALID 0x70
152 #define IW_FREQ_AUTO 0x00
153 #define IW_FREQ_FIXED 0x01
155 #define IW_MAX_ENCODING_SIZES 8
157 #define IW_ENCODING_TOKEN_MAX 64
159 #define IW_ENCODE_INDEX 0x00FF
160 #define IW_ENCODE_FLAGS 0xFF00
161 #define IW_ENCODE_MODE 0xF000
162 #define IW_ENCODE_DISABLED 0x8000
163 #define IW_ENCODE_ENABLED 0x0000
164 #define IW_ENCODE_RESTRICTED 0x4000
165 #define IW_ENCODE_OPEN 0x2000
166 #define IW_ENCODE_NOKEY 0x0800
167 #define IW_ENCODE_TEMP 0x0400
169 #define IW_POWER_ON 0x0000
170 #define IW_POWER_TYPE 0xF000
171 #define IW_POWER_PERIOD 0x1000
172 #define IW_POWER_TIMEOUT 0x2000
173 #define IW_POWER_MODE 0x0F00
174 #define IW_POWER_UNICAST_R 0x0100
175 #define IW_POWER_MULTICAST_R 0x0200
176 #define IW_POWER_ALL_R 0x0300
177 #define IW_POWER_FORCE_S 0x0400
178 #define IW_POWER_REPEATER 0x0800
179 #define IW_POWER_MODIFIER 0x000F
180 #define IW_POWER_MIN 0x0001
181 #define IW_POWER_MAX 0x0002
182 #define IW_POWER_RELATIVE 0x0004
184 #define IW_TXPOW_TYPE 0x00FF
185 #define IW_TXPOW_DBM 0x0000
186 #define IW_TXPOW_MWATT 0x0001
187 #define IW_TXPOW_RELATIVE 0x0002
188 #define IW_TXPOW_RANGE 0x1000
190 #define IW_RETRY_ON 0x0000
191 #define IW_RETRY_TYPE 0xF000
192 #define IW_RETRY_LIMIT 0x1000
193 #define IW_RETRY_LIFETIME 0x2000
194 #define IW_RETRY_MODIFIER 0x000F
195 #define IW_RETRY_MIN 0x0001
196 #define IW_RETRY_MAX 0x0002
197 #define IW_RETRY_RELATIVE 0x0004
199 #define IW_SCAN_DEFAULT 0x0000
200 #define IW_SCAN_ALL_ESSID 0x0001
201 #define IW_SCAN_THIS_ESSID 0x0002
202 #define IW_SCAN_ALL_FREQ 0x0004
203 #define IW_SCAN_THIS_FREQ 0x0008
204 #define IW_SCAN_ALL_MODE 0x0010
205 #define IW_SCAN_THIS_MODE 0x0020
206 #define IW_SCAN_ALL_RATE 0x0040
207 #define IW_SCAN_THIS_RATE 0x0080
209 #define IW_SCAN_TYPE_ACTIVE 0
210 #define IW_SCAN_TYPE_PASSIVE 1
212 #define IW_SCAN_MAX_DATA 4096
214 #define IW_CUSTOM_MAX 256
216 #define IW_GENERIC_IE_MAX 1024
218 #define IW_MLME_DEAUTH 0
219 #define IW_MLME_DISASSOC 1
221 #define IW_AUTH_INDEX 0x0FFF
222 #define IW_AUTH_FLAGS 0xF000
224 #define IW_AUTH_WPA_VERSION 0
225 #define IW_AUTH_CIPHER_PAIRWISE 1
226 #define IW_AUTH_CIPHER_GROUP 2
227 #define IW_AUTH_KEY_MGMT 3
228 #define IW_AUTH_TKIP_COUNTERMEASURES 4
229 #define IW_AUTH_DROP_UNENCRYPTED 5
230 #define IW_AUTH_80211_AUTH_ALG 6
231 #define IW_AUTH_WPA_ENABLED 7
232 #define IW_AUTH_RX_UNENCRYPTED_EAPOL 8
233 #define IW_AUTH_ROAMING_CONTROL 9
234 #define IW_AUTH_PRIVACY_INVOKED 10
236 #define IW_AUTH_WPA_VERSION_DISABLED 0x00000001
237 #define IW_AUTH_WPA_VERSION_WPA 0x00000002
238 #define IW_AUTH_WPA_VERSION_WPA2 0x00000004
240 #define IW_AUTH_CIPHER_NONE 0x00000001
241 #define IW_AUTH_CIPHER_WEP40 0x00000002
242 #define IW_AUTH_CIPHER_TKIP 0x00000004
243 #define IW_AUTH_CIPHER_CCMP 0x00000008
244 #define IW_AUTH_CIPHER_WEP104 0x00000010
246 #define IW_AUTH_KEY_MGMT_802_1X 1
247 #define IW_AUTH_KEY_MGMT_PSK 2
249 #define IW_AUTH_ALG_OPEN_SYSTEM 0x00000001
250 #define IW_AUTH_ALG_SHARED_KEY 0x00000002
251 #define IW_AUTH_ALG_LEAP 0x00000004
253 #define IW_AUTH_ROAMING_ENABLE 0
254 #define IW_AUTH_ROAMING_DISABLE 1
256 #define IW_ENCODE_SEQ_MAX_SIZE 8
258 #define IW_ENCODE_ALG_NONE 0
259 #define IW_ENCODE_ALG_WEP 1
260 #define IW_ENCODE_ALG_TKIP 2
261 #define IW_ENCODE_ALG_CCMP 3
263 #define IW_ENCODE_EXT_TX_SEQ_VALID 0x00000001
264 #define IW_ENCODE_EXT_RX_SEQ_VALID 0x00000002
265 #define IW_ENCODE_EXT_GROUP_KEY 0x00000004
266 #define IW_ENCODE_EXT_SET_TX_KEY 0x00000008
268 #define IW_MICFAILURE_KEY_ID 0x00000003
269 #define IW_MICFAILURE_GROUP 0x00000004
270 #define IW_MICFAILURE_PAIRWISE 0x00000008
271 #define IW_MICFAILURE_STAKEY 0x00000010
272 #define IW_MICFAILURE_COUNT 0x00000060
274 #define IW_ENC_CAPA_WPA 0x00000001
275 #define IW_ENC_CAPA_WPA2 0x00000002
276 #define IW_ENC_CAPA_CIPHER_TKIP 0x00000004
277 #define IW_ENC_CAPA_CIPHER_CCMP 0x00000008
279 #define IW_EVENT_CAPA_BASE(cmd) ((cmd >= SIOCIWFIRSTPRIV) ? (cmd - SIOCIWFIRSTPRIV + 0x60) : (cmd - SIOCSIWCOMMIT))
280 #define IW_EVENT_CAPA_INDEX(cmd) (IW_EVENT_CAPA_BASE(cmd) >> 5)
281 #define IW_EVENT_CAPA_MASK(cmd) (1 << (IW_EVENT_CAPA_BASE(cmd) & 0x1F))
283 #define IW_EVENT_CAPA_K_0 (IW_EVENT_CAPA_MASK(0x8B04) | IW_EVENT_CAPA_MASK(0x8B06) | IW_EVENT_CAPA_MASK(0x8B1A))
284 #define IW_EVENT_CAPA_K_1 (IW_EVENT_CAPA_MASK(0x8B2A))
286 #define IW_EVENT_CAPA_SET(event_capa, cmd) (event_capa[IW_EVENT_CAPA_INDEX(cmd)] |= IW_EVENT_CAPA_MASK(cmd))
287 #define IW_EVENT_CAPA_SET_KERNEL(event_capa) {event_capa[0] |= IW_EVENT_CAPA_K_0; event_capa[1] |= IW_EVENT_CAPA_K_1; }
299 void __user *pointer;
336 struct sockaddr addr;
337 struct iw_quality qual;
338 struct iw_quality low;
339 struct iw_quality high;
348 struct sockaddr bssid;
350 __u8 essid[IW_ESSID_MAX_SIZE];
352 __u32 min_channel_time;
353 __u32 max_channel_time;
355 struct iw_freq channel_list[IW_MAX_FREQUENCIES];
361 __u8 tx_seq[IW_ENCODE_SEQ_MAX_SIZE];
362 __u8 rx_seq[IW_ENCODE_SEQ_MAX_SIZE];
363 struct sockaddr addr;
373 struct sockaddr addr;
376 #define IW_PMKSA_ADD 1
377 #define IW_PMKSA_REMOVE 2
378 #define IW_PMKSA_FLUSH 3
380 #define IW_PMKID_LEN 16
385 struct sockaddr bssid;
386 __u8 pmkid[IW_PMKID_LEN];
389 struct iw_michaelmicfailure
392 struct sockaddr src_addr;
393 __u8 tsc[IW_ENCODE_SEQ_MAX_SIZE];
396 #define IW_PMKID_CAND_PREAUTH 0x00000001
401 struct sockaddr bssid;
408 struct iw_quality qual;
409 struct iw_discarded discard;
410 struct iw_missed miss;
418 struct iw_point essid;
419 struct iw_param nwid;
422 struct iw_param sens;
423 struct iw_param bitrate;
424 struct iw_param txpower;
426 struct iw_param frag;
428 struct iw_param retry;
430 struct iw_point encoding;
431 struct iw_param power;
432 struct iw_quality qual;
434 struct sockaddr ap_addr;
435 struct sockaddr addr;
437 struct iw_param param;
438 struct iw_point data;
445 char ifrn_name[IFNAMSIZ];
459 __u16 old_num_channels;
460 __u8 old_num_frequency;
466 struct iw_quality max_qual;
468 struct iw_quality avg_qual;
471 __s32 bitrate[IW_MAX_BITRATES];
487 __u16 encoding_size[IW_MAX_ENCODING_SIZES];
488 __u8 num_encoding_sizes;
489 __u8 max_encoding_tokens;
491 __u8 encoding_login_index;
495 __s32 txpower[IW_MAX_TXPOWER];
497 __u8 we_version_compiled;
498 __u8 we_version_source;
510 struct iw_freq freq[IW_MAX_FREQUENCIES];
530 #define IW_EV_LCP_LEN (sizeof(struct iw_event) - sizeof(union iwreq_data))
532 #define IW_EV_CHAR_LEN (IW_EV_LCP_LEN + IFNAMSIZ)
533 #define IW_EV_UINT_LEN (IW_EV_LCP_LEN + sizeof(__u32))
534 #define IW_EV_FREQ_LEN (IW_EV_LCP_LEN + sizeof(struct iw_freq))
535 #define IW_EV_PARAM_LEN (IW_EV_LCP_LEN + sizeof(struct iw_param))
536 #define IW_EV_ADDR_LEN (IW_EV_LCP_LEN + sizeof(struct sockaddr))
537 #define IW_EV_QUAL_LEN (IW_EV_LCP_LEN + sizeof(struct iw_quality))
539 #define IW_EV_POINT_OFF (((char *) &(((struct iw_point *) NULL)->length)) - (char *) NULL)
540 #define IW_EV_POINT_LEN (IW_EV_LCP_LEN + sizeof(struct iw_point) - IW_EV_POINT_OFF)