This source file includes following definitions.
- __bug_on_wrong_struct_sizes
1
2
3
4
5
6
7
8 #if !defined(_ISL_OID_H)
9 #define _ISL_OID_H
10
11
12
13
14
15
16 struct obj_ssid {
17 u8 length;
18 char octets[33];
19 } __packed;
20
21 struct obj_key {
22 u8 type;
23 u8 length;
24 char key[32];
25 } __packed;
26
27 struct obj_mlme {
28 u8 address[6];
29 u16 id;
30 u16 state;
31 u16 code;
32 } __packed;
33
34 struct obj_mlmeex {
35 u8 address[6];
36 u16 id;
37 u16 state;
38 u16 code;
39 u16 size;
40 u8 data[0];
41 } __packed;
42
43 struct obj_buffer {
44 u32 size;
45 u32 addr;
46 } __packed;
47
48 struct obj_bss {
49 u8 address[6];
50 int:16;
51
52 char state;
53 char reserved;
54 short age;
55
56 char quality;
57 char rssi;
58
59 struct obj_ssid ssid;
60 short channel;
61 char beacon_period;
62 char dtim_period;
63 short capinfo;
64 short rates;
65 short basic_rates;
66 int:16;
67 } __packed;
68
69 struct obj_bsslist {
70 u32 nr;
71 struct obj_bss bsslist[0];
72 } __packed;
73
74 struct obj_frequencies {
75 u16 nr;
76 u16 mhz[0];
77 } __packed;
78
79 struct obj_attachment {
80 char type;
81 char reserved;
82 short id;
83 short size;
84 char data[0];
85 } __packed;
86
87
88
89
90
91 static inline void
92 __bug_on_wrong_struct_sizes(void)
93 {
94 BUILD_BUG_ON(sizeof (struct obj_ssid) != 34);
95 BUILD_BUG_ON(sizeof (struct obj_key) != 34);
96 BUILD_BUG_ON(sizeof (struct obj_mlme) != 12);
97 BUILD_BUG_ON(sizeof (struct obj_mlmeex) != 14);
98 BUILD_BUG_ON(sizeof (struct obj_buffer) != 8);
99 BUILD_BUG_ON(sizeof (struct obj_bss) != 60);
100 BUILD_BUG_ON(sizeof (struct obj_bsslist) != 4);
101 BUILD_BUG_ON(sizeof (struct obj_frequencies) != 2);
102 }
103
104 enum dot11_state_t {
105 DOT11_STATE_NONE = 0,
106 DOT11_STATE_AUTHING = 1,
107 DOT11_STATE_AUTH = 2,
108 DOT11_STATE_ASSOCING = 3,
109
110 DOT11_STATE_ASSOC = 5,
111 DOT11_STATE_IBSS = 6,
112 DOT11_STATE_WDS = 7
113 };
114
115 enum dot11_bsstype_t {
116 DOT11_BSSTYPE_NONE = 0,
117 DOT11_BSSTYPE_INFRA = 1,
118 DOT11_BSSTYPE_IBSS = 2,
119 DOT11_BSSTYPE_ANY = 3
120 };
121
122 enum dot11_auth_t {
123 DOT11_AUTH_NONE = 0,
124 DOT11_AUTH_OS = 1,
125 DOT11_AUTH_SK = 2,
126 DOT11_AUTH_BOTH = 3
127 };
128
129 enum dot11_mlme_t {
130 DOT11_MLME_AUTO = 0,
131 DOT11_MLME_INTERMEDIATE = 1,
132 DOT11_MLME_EXTENDED = 2
133 };
134
135 enum dot11_priv_t {
136 DOT11_PRIV_WEP = 0,
137 DOT11_PRIV_TKIP = 1
138 };
139
140
141
142
143
144
145
146
147
148 enum dot11_maxframeburst_t {
149
150 DOT11_MAXFRAMEBURST_OFF = 0,
151 DOT11_MAXFRAMEBURST_MIXED_SAFE = 650,
152 DOT11_MAXFRAMEBURST_IDEAL = 1300,
153 DOT11_MAXFRAMEBURST_MAX = 5000,
154
155
156
157
158
159 };
160
161
162
163
164
165
166
167
168 enum dot11_preamblesettings_t {
169 DOT11_PREAMBLESETTING_LONG = 0,
170
171 DOT11_PREAMBLESETTING_SHORT = 1,
172
173 DOT11_PREAMBLESETTING_DYNAMIC = 2
174
175 };
176
177
178
179
180
181 enum dot11_slotsettings_t {
182 DOT11_SLOTSETTINGS_LONG = 0,
183
184 DOT11_SLOTSETTINGS_SHORT = 1,
185
186 DOT11_SLOTSETTINGS_DYNAMIC = 2
187
188 };
189
190
191
192
193
194
195
196
197
198
199
200
201 enum do11_nonerpstatus_t {
202 DOT11_ERPSTAT_NONEPRESENT = 0,
203 DOT11_ERPSTAT_USEPROTECTION = 1
204 };
205
206
207
208
209
210
211 enum dot11_nonerpprotection_t {
212 DOT11_NONERP_NEVER = 0,
213 DOT11_NONERP_ALWAYS = 1,
214 DOT11_NONERP_DYNAMIC = 2
215 };
216
217
218
219
220 enum dot11_profile_t {
221
222 DOT11_PROFILE_B_ONLY = 0,
223
224
225
226
227
228
229 DOT11_PROFILE_MIXED_G_WIFI = 1,
230
231
232
233
234
235
236 DOT11_PROFILE_MIXED_LONG = 2,
237
238 DOT11_PROFILE_G_ONLY = 3,
239
240 DOT11_PROFILE_TEST = 4,
241
242
243
244
245
246 DOT11_PROFILE_B_WIFI = 5,
247
248 DOT11_PROFILE_A_ONLY = 6,
249
250
251
252 DOT11_PROFILE_MIXED_SHORT = 7
253
254 };
255
256
257
258
259 enum oid_inl_conformance_t {
260 OID_INL_CONFORMANCE_NONE = 0,
261 OID_INL_CONFORMANCE_STRICT = 1,
262 OID_INL_CONFORMANCE_FLEXIBLE = 2,
263
264
265 };
266
267 enum oid_inl_mode_t {
268 INL_MODE_NONE = -1,
269 INL_MODE_PROMISCUOUS = 0,
270 INL_MODE_CLIENT = 1,
271 INL_MODE_AP = 2,
272 INL_MODE_SNIFFER = 3
273 };
274
275 enum oid_inl_config_t {
276 INL_CONFIG_NOTHING = 0x00,
277 INL_CONFIG_MANUALRUN = 0x01,
278 INL_CONFIG_FRAMETRAP = 0x02,
279 INL_CONFIG_RXANNEX = 0x04,
280 INL_CONFIG_TXANNEX = 0x08,
281 INL_CONFIG_WDS = 0x10
282 };
283
284 enum oid_inl_phycap_t {
285 INL_PHYCAP_2400MHZ = 1,
286 INL_PHYCAP_5000MHZ = 2,
287 INL_PHYCAP_FAA = 0x80000000,
288 };
289
290
291 enum oid_num_t {
292 GEN_OID_MACADDRESS = 0,
293 GEN_OID_LINKSTATE,
294 GEN_OID_WATCHDOG,
295 GEN_OID_MIBOP,
296 GEN_OID_OPTIONS,
297 GEN_OID_LEDCONFIG,
298
299
300 DOT11_OID_BSSTYPE,
301 DOT11_OID_BSSID,
302 DOT11_OID_SSID,
303 DOT11_OID_STATE,
304 DOT11_OID_AID,
305 DOT11_OID_COUNTRYSTRING,
306 DOT11_OID_SSIDOVERRIDE,
307
308 DOT11_OID_MEDIUMLIMIT,
309 DOT11_OID_BEACONPERIOD,
310 DOT11_OID_DTIMPERIOD,
311 DOT11_OID_ATIMWINDOW,
312 DOT11_OID_LISTENINTERVAL,
313 DOT11_OID_CFPPERIOD,
314 DOT11_OID_CFPDURATION,
315
316 DOT11_OID_AUTHENABLE,
317 DOT11_OID_PRIVACYINVOKED,
318 DOT11_OID_EXUNENCRYPTED,
319 DOT11_OID_DEFKEYID,
320 DOT11_OID_DEFKEYX,
321 DOT11_OID_STAKEY,
322 DOT11_OID_REKEYTHRESHOLD,
323 DOT11_OID_STASC,
324
325 DOT11_OID_PRIVTXREJECTED,
326 DOT11_OID_PRIVRXPLAIN,
327 DOT11_OID_PRIVRXFAILED,
328 DOT11_OID_PRIVRXNOKEY,
329
330 DOT11_OID_RTSTHRESH,
331 DOT11_OID_FRAGTHRESH,
332 DOT11_OID_SHORTRETRIES,
333 DOT11_OID_LONGRETRIES,
334 DOT11_OID_MAXTXLIFETIME,
335 DOT11_OID_MAXRXLIFETIME,
336 DOT11_OID_AUTHRESPTIMEOUT,
337 DOT11_OID_ASSOCRESPTIMEOUT,
338
339 DOT11_OID_ALOFT_TABLE,
340 DOT11_OID_ALOFT_CTRL_TABLE,
341 DOT11_OID_ALOFT_RETREAT,
342 DOT11_OID_ALOFT_PROGRESS,
343 DOT11_OID_ALOFT_FIXEDRATE,
344 DOT11_OID_ALOFT_RSSIGRAPH,
345 DOT11_OID_ALOFT_CONFIG,
346
347 DOT11_OID_VDCFX,
348 DOT11_OID_MAXFRAMEBURST,
349
350 DOT11_OID_PSM,
351 DOT11_OID_CAMTIMEOUT,
352 DOT11_OID_RECEIVEDTIMS,
353 DOT11_OID_ROAMPREFERENCE,
354
355 DOT11_OID_BRIDGELOCAL,
356 DOT11_OID_CLIENTS,
357 DOT11_OID_CLIENTSASSOCIATED,
358 DOT11_OID_CLIENTX,
359
360 DOT11_OID_CLIENTFIND,
361 DOT11_OID_WDSLINKADD,
362 DOT11_OID_WDSLINKREMOVE,
363 DOT11_OID_EAPAUTHSTA,
364 DOT11_OID_EAPUNAUTHSTA,
365 DOT11_OID_DOT1XENABLE,
366 DOT11_OID_MICFAILURE,
367 DOT11_OID_REKEYINDICATE,
368
369 DOT11_OID_MPDUTXSUCCESSFUL,
370 DOT11_OID_MPDUTXONERETRY,
371 DOT11_OID_MPDUTXMULTIPLERETRIES,
372 DOT11_OID_MPDUTXFAILED,
373 DOT11_OID_MPDURXSUCCESSFUL,
374 DOT11_OID_MPDURXDUPS,
375 DOT11_OID_RTSSUCCESSFUL,
376 DOT11_OID_RTSFAILED,
377 DOT11_OID_ACKFAILED,
378 DOT11_OID_FRAMERECEIVES,
379 DOT11_OID_FRAMEERRORS,
380 DOT11_OID_FRAMEABORTS,
381 DOT11_OID_FRAMEABORTSPHY,
382
383 DOT11_OID_SLOTTIME,
384 DOT11_OID_CWMIN,
385 DOT11_OID_CWMAX,
386 DOT11_OID_ACKWINDOW,
387 DOT11_OID_ANTENNARX,
388 DOT11_OID_ANTENNATX,
389 DOT11_OID_ANTENNADIVERSITY,
390 DOT11_OID_CHANNEL,
391 DOT11_OID_EDTHRESHOLD,
392 DOT11_OID_PREAMBLESETTINGS,
393 DOT11_OID_RATES,
394 DOT11_OID_CCAMODESUPPORTED,
395 DOT11_OID_CCAMODE,
396 DOT11_OID_RSSIVECTOR,
397 DOT11_OID_OUTPUTPOWERTABLE,
398 DOT11_OID_OUTPUTPOWER,
399 DOT11_OID_SUPPORTEDRATES,
400 DOT11_OID_FREQUENCY,
401 DOT11_OID_SUPPORTEDFREQUENCIES,
402 DOT11_OID_NOISEFLOOR,
403 DOT11_OID_FREQUENCYACTIVITY,
404 DOT11_OID_IQCALIBRATIONTABLE,
405 DOT11_OID_NONERPPROTECTION,
406 DOT11_OID_SLOTSETTINGS,
407 DOT11_OID_NONERPTIMEOUT,
408 DOT11_OID_PROFILES,
409 DOT11_OID_EXTENDEDRATES,
410
411 DOT11_OID_DEAUTHENTICATE,
412 DOT11_OID_AUTHENTICATE,
413 DOT11_OID_DISASSOCIATE,
414 DOT11_OID_ASSOCIATE,
415 DOT11_OID_SCAN,
416 DOT11_OID_BEACON,
417 DOT11_OID_PROBE,
418 DOT11_OID_DEAUTHENTICATEEX,
419 DOT11_OID_AUTHENTICATEEX,
420 DOT11_OID_DISASSOCIATEEX,
421 DOT11_OID_ASSOCIATEEX,
422 DOT11_OID_REASSOCIATE,
423 DOT11_OID_REASSOCIATEEX,
424
425 DOT11_OID_NONERPSTATUS,
426
427 DOT11_OID_STATIMEOUT,
428 DOT11_OID_MLMEAUTOLEVEL,
429 DOT11_OID_BSSTIMEOUT,
430 DOT11_OID_ATTACHMENT,
431 DOT11_OID_PSMBUFFER,
432
433 DOT11_OID_BSSS,
434 DOT11_OID_BSSX,
435 DOT11_OID_BSSFIND,
436 DOT11_OID_BSSLIST,
437
438 OID_INL_TUNNEL,
439 OID_INL_MEMADDR,
440 OID_INL_MEMORY,
441 OID_INL_MODE,
442 OID_INL_COMPONENT_NR,
443 OID_INL_VERSION,
444 OID_INL_INTERFACE_ID,
445 OID_INL_COMPONENT_ID,
446 OID_INL_CONFIG,
447 OID_INL_DOT11D_CONFORMANCE,
448 OID_INL_PHYCAPABILITIES,
449 OID_INL_OUTPUTPOWER,
450
451 OID_NUM_LAST
452 };
453
454 #define OID_FLAG_CACHED 0x80
455 #define OID_FLAG_TYPE 0x7f
456
457 #define OID_TYPE_U32 0x01
458 #define OID_TYPE_SSID 0x02
459 #define OID_TYPE_KEY 0x03
460 #define OID_TYPE_BUFFER 0x04
461 #define OID_TYPE_BSS 0x05
462 #define OID_TYPE_BSSLIST 0x06
463 #define OID_TYPE_FREQUENCIES 0x07
464 #define OID_TYPE_MLME 0x08
465 #define OID_TYPE_MLMEEX 0x09
466 #define OID_TYPE_ADDR 0x0A
467 #define OID_TYPE_RAW 0x0B
468 #define OID_TYPE_ATTACH 0x0C
469
470
471
472
473
474 struct oid_t {
475 enum oid_num_t oid;
476 short range;
477 short size;
478 char flags;
479 };
480
481 union oid_res_t {
482 void *ptr;
483 u32 u;
484 };
485
486 #define IWMAX_BITRATES 20
487 #define IWMAX_BSS 24
488 #define IWMAX_FREQ 30
489 #define PRIV_STR_SIZE 1024
490
491 #endif
492