1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
|
/*
* Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* File: 80211mgr.h
*
* Purpose: Defines the macros, types, and functions for dealing
* with 802.11 managment frames.
*
* Author: Lyndon Chen
*
* Date: May 8, 2002
*
*/
#ifndef __80211MGR_H__
#define __80211MGR_H__
#if !defined(__TTYPE_H__)
#include "ttype.h"
#endif
#if !defined(__80211HDR_H__)
#include "80211hdr.h"
#endif
/*--------------------- Export Definitions -------------------------*/
#define WLAN_MIN_ARRAY 1
// Information Element ID value
#define WLAN_EID_SSID 0
#define WLAN_EID_SUPP_RATES 1
#define WLAN_EID_FH_PARMS 2
#define WLAN_EID_DS_PARMS 3
#define WLAN_EID_CF_PARMS 4
#define WLAN_EID_TIM 5
#define WLAN_EID_IBSS_PARMS 6
#define WLAN_EID_COUNTRY 7
#define WLAN_EID_CHALLENGE 16
#define WLAN_EID_PWR_CONSTRAINT 32
#define WLAN_EID_PWR_CAPABILITY 33
#define WLAN_EID_TPC_REQ 34
#define WLAN_EID_TPC_REP 35
#define WLAN_EID_SUPP_CH 36
#define WLAN_EID_CH_SWITCH 37
#define WLAN_EID_MEASURE_REQ 38
#define WLAN_EID_MEASURE_REP 39
#define WLAN_EID_QUIET 40
#define WLAN_EID_IBSS_DFS 41
#define WLAN_EID_ERP 42
// reference 802.11i 7.3.2 table 20
#define WLAN_EID_RSN 48
#define WLAN_EID_EXTSUPP_RATES 50
// reference WiFi WPA spec.
#define WLAN_EID_RSN_WPA 221
#define WLAN_EID_ERP_NONERP_PRESENT 0x01
#define WLAN_EID_ERP_USE_PROTECTION 0x02
#define WLAN_EID_ERP_BARKER_MODE 0x04
// Reason Codes
#define WLAN_MGMT_REASON_RSVD 0
#define WLAN_MGMT_REASON_UNSPEC 1
#define WLAN_MGMT_REASON_PRIOR_AUTH_INVALID 2
#define WLAN_MGMT_REASON_DEAUTH_LEAVING 3
#define WLAN_MGMT_REASON_DISASSOC_INACTIVE 4
#define WLAN_MGMT_REASON_DISASSOC_AP_BUSY 5
#define WLAN_MGMT_REASON_CLASS2_NONAUTH 6
#define WLAN_MGMT_REASON_CLASS3_NONASSOC 7
#define WLAN_MGMT_REASON_DISASSOC_STA_HASLEFT 8
#define WLAN_MGMT_REASON_CANT_ASSOC_NONAUTH 9
#define WLAN_MGMT_REASON_DISASSOC_PWR_CAP_UNACCEPT 10
#define WLAN_MGMT_REASON_DISASSOC_SUPP_CH_UNACCEPT 11
#define WLAN_MGMT_REASON_INVALID_IE 13
#define WLAN_MGMT_REASON_MIC_FAILURE 14
#define WLAN_MGMT_REASON_4WAY_HANDSHAKE_TIMEOUT 15
#define WLAN_MGMT_REASON_GRPKEY_UPDATE_TIMEOUT 16
#define WLAN_MGMT_REASON_4WAY_INFO_DIFFERENT 17
#define WLAN_MGMT_REASON_MULTCAST_CIPHER_INVALID 18
#define WLAN_MGMT_REASON_UNCAST_CIPHER_INVALID 19
#define WLAN_MGMT_REASON_AKMP_INVALID 20
#define WLAN_MGMT_REASON_RSNE_UNSUPPORTED 21
#define WLAN_MGMT_REASON_RSNE_CAP_INVALID 22
#define WLAN_MGMT_REASON_80211X_AUTH_FAILED 23
// Status Codes
#define WLAN_MGMT_STATUS_SUCCESS 0
#define WLAN_MGMT_STATUS_UNSPEC_FAILURE 1
#define WLAN_MGMT_STATUS_CAPS_UNSUPPORTED 10
#define WLAN_MGMT_STATUS_REASSOC_NO_ASSOC 11
#define WLAN_MGMT_STATUS_ASSOC_DENIED_UNSPEC 12
#define WLAN_MGMT_STATUS_UNSUPPORTED_AUTHALG 13
#define WLAN_MGMT_STATUS_RX_AUTH_NOSEQ 14
#define WLAN_MGMT_STATUS_CHALLENGE_FAIL 15
#define WLAN_MGMT_STATUS_AUTH_TIMEOUT 16
#define WLAN_MGMT_STATUS_ASSOC_DENIED_BUSY 17
#define WLAN_MGMT_STATUS_ASSOC_DENIED_RATES 18
#define WLAN_MGMT_STATUS_ASSOC_DENIED_SHORTPREAMBLE 19
#define WLAN_MGMT_STATUS_ASSOC_DENIED_PBCC 20
#define WLAN_MGMT_STATUS_ASSOC_DENIED_AGILITY 21
// reference 802.11h 7.3.1.9
//
#define WLAN_MGMT_STATUS_ASSOC_REJECT_BCS_SPECTRUM_MNG 22
#define WLAN_MGMT_STATUS_ASSOC_REJECT_BCS_PWR_CAP 23
#define WLAN_MGMT_STATUS_ASSOC_REJECT_BCS_SUPP_CH 24
//
// reference 802.11g 7.3.1.9
//
#define WLAN_MGMT_STATUS_SHORTSLOTTIME_UNSUPPORTED 25
#define WLAN_MGMT_STATUS_DSSSOFDM_UNSUPPORTED 26
//
// reference 802.11i 7.3.1.9 table 19
//
#define WLAN_MGMT_STATUS_INVALID_IE 40
#define WLAN_MGMT_STATUS_GROUP_CIPHER_INVALID 41
#define WLAN_MGMT_STATUS_PAIRWISE_CIPHER_INVALID 42
#define WLAN_MGMT_STATUS_AKMP_INVALID 43
#define WLAN_MGMT_STATUS_UNSUPPORT_RSN_IE_VER 44
#define WLAN_MGMT_STATUS_INVALID_RSN_IE_CAP 45
#define WLAN_MGMT_STATUS_CIPHER_REJECT 46
// Auth Algorithm
#define WLAN_AUTH_ALG_OPENSYSTEM 0
#define WLAN_AUTH_ALG_SHAREDKEY 1
// Management Frame Field Offsets
// Note: Not all fields are listed because of variable lengths.
// Note: These offsets are from the start of the frame data
#define WLAN_BEACON_OFF_TS 0
#define WLAN_BEACON_OFF_BCN_INT 8
#define WLAN_BEACON_OFF_CAPINFO 10
#define WLAN_BEACON_OFF_SSID 12
#define WLAN_DISASSOC_OFF_REASON 0
#define WLAN_ASSOCREQ_OFF_CAP_INFO 0
#define WLAN_ASSOCREQ_OFF_LISTEN_INT 2
#define WLAN_ASSOCREQ_OFF_SSID 4
#define WLAN_ASSOCRESP_OFF_CAP_INFO 0
#define WLAN_ASSOCRESP_OFF_STATUS 2
#define WLAN_ASSOCRESP_OFF_AID 4
#define WLAN_ASSOCRESP_OFF_SUPP_RATES 6
#define WLAN_REASSOCREQ_OFF_CAP_INFO 0
#define WLAN_REASSOCREQ_OFF_LISTEN_INT 2
#define WLAN_REASSOCREQ_OFF_CURR_AP 4
#define WLAN_REASSOCREQ_OFF_SSID 10
#define WLAN_REASSOCRESP_OFF_CAP_INFO 0
#define WLAN_REASSOCRESP_OFF_STATUS 2
#define WLAN_REASSOCRESP_OFF_AID 4
#define WLAN_REASSOCRESP_OFF_SUPP_RATES 6
#define WLAN_PROBEREQ_OFF_SSID 0
#define WLAN_PROBERESP_OFF_TS 0
#define WLAN_PROBERESP_OFF_BCN_INT 8
#define WLAN_PROBERESP_OFF_CAP_INFO 10
#define WLAN_PROBERESP_OFF_SSID 12
#define WLAN_AUTHEN_OFF_AUTH_ALG 0
#define WLAN_AUTHEN_OFF_AUTH_SEQ 2
#define WLAN_AUTHEN_OFF_STATUS 4
#define WLAN_AUTHEN_OFF_CHALLENGE 6
#define WLAN_DEAUTHEN_OFF_REASON 0
//
// Cipher Suite Selectors defiened in 802.11i
//
#define WLAN_11i_CSS_USE_GROUP 0
#define WLAN_11i_CSS_WEP40 1
#define WLAN_11i_CSS_TKIP 2
#define WLAN_11i_CSS_CCMP 4
#define WLAN_11i_CSS_WEP104 5
#define WLAN_11i_CSS_UNKNOWN 255
//
// Authentication and Key Management Suite Selectors defined in 802.11i
//
#define WLAN_11i_AKMSS_802_1X 1
#define WLAN_11i_AKMSS_PSK 2
#define WLAN_11i_AKMSS_UNKNOWN 255
// Measurement type definitions reference ieee 802.11h Table 20b
#define MEASURE_TYPE_BASIC 0
#define MEASURE_TYPE_CCA 1
#define MEASURE_TYPE_RPI 2
// Measurement request mode definitions reference ieee 802.11h Figure 46h
#define MEASURE_MODE_ENABLE 0x02
#define MEASURE_MODE_REQ 0x04
#define MEASURE_MODE_REP 0x08
// Measurement report mode definitions reference ieee 802.11h Figure 46m
#define MEASURE_MODE_LATE 0x01
#define MEASURE_MODE_INCAPABLE 0x02
#define MEASURE_MODE_REFUSED 0x04
/*--------------------- Export Classes ----------------------------*/
/*--------------------- Export Variables --------------------------*/
/*--------------------- Export Types ------------------------------*/
// Information Element Types
#pragma pack(1)
typedef struct tagWLAN_IE {
BYTE byElementID;
BYTE len;
}__attribute__ ((__packed__))
WLAN_IE, *PWLAN_IE;
// Service Set Identity (SSID)
#pragma pack(1)
typedef struct tagWLAN_IE_SSID {
BYTE byElementID;
BYTE len;
BYTE abySSID[1];
}__attribute__ ((__packed__))
WLAN_IE_SSID, *PWLAN_IE_SSID;
// Supported Rates
#pragma pack(1)
typedef struct tagWLAN_IE_SUPP_RATES {
BYTE byElementID;
BYTE len;
BYTE abyRates[1];
}__attribute__ ((__packed__))
WLAN_IE_SUPP_RATES, *PWLAN_IE_SUPP_RATES;
// FH Parameter Set
#pragma pack(1)
typedef struct _WLAN_IE_FH_PARMS {
BYTE byElementID;
BYTE len;
WORD wDwellTime;
BYTE byHopSet;
BYTE byHopPattern;
BYTE byHopIndex;
} WLAN_IE_FH_PARMS, *PWLAN_IE_FH_PARMS;
// DS Parameter Set
#pragma pack(1)
typedef struct tagWLAN_IE_DS_PARMS {
BYTE byElementID;
BYTE len;
BYTE byCurrChannel;
}__attribute__ ((__packed__))
WLAN_IE_DS_PARMS, *PWLAN_IE_DS_PARMS;
// CF Parameter Set
#pragma pack(1)
typedef struct tagWLAN_IE_CF_PARMS {
BYTE byElementID;
BYTE len;
BYTE byCFPCount;
BYTE byCFPPeriod;
WORD wCFPMaxDuration;
WORD wCFPDurRemaining;
}__attribute__ ((__packed__))
WLAN_IE_CF_PARMS, *PWLAN_IE_CF_PARMS;
// TIM
#pragma pack(1)
typedef struct tagWLAN_IE_TIM {
BYTE byElementID;
BYTE len;
BYTE byDTIMCount;
BYTE byDTIMPeriod;
BYTE byBitMapCtl;
BYTE byVirtBitMap[1];
}__attribute__ ((__packed__))
WLAN_IE_TIM, *PWLAN_IE_TIM;
// IBSS Parameter Set
#pragma pack(1)
typedef struct tagWLAN_IE_IBSS_PARMS {
BYTE byElementID;
BYTE len;
WORD wATIMWindow;
}__attribute__ ((__packed__))
WLAN_IE_IBSS_PARMS, *PWLAN_IE_IBSS_PARMS;
// Challenge Text
#pragma pack(1)
typedef struct tagWLAN_IE_CHALLENGE {
BYTE byElementID;
BYTE len;
BYTE abyChallenge[1];
}__attribute__ ((__packed__))
WLAN_IE_CHALLENGE, *PWLAN_IE_CHALLENGE;
#pragma pack(1)
typedef struct tagWLAN_IE_RSN_EXT {
BYTE byElementID;
BYTE len;
BYTE abyOUI[4];
WORD wVersion;
BYTE abyMulticast[4];
WORD wPKCount;
struct {
BYTE abyOUI[4];
} PKSList[1]; // the rest is variable so need to
// overlay ieauth structure
} WLAN_IE_RSN_EXT, *PWLAN_IE_RSN_EXT;
#pragma pack(1)
typedef struct tagWLAN_IE_RSN_AUTH {
WORD wAuthCount;
struct {
BYTE abyOUI[4];
} AuthKSList[1];
} WLAN_IE_RSN_AUTH, *PWLAN_IE_RSN_AUTH;
// RSN Identity
#pragma pack(1)
typedef struct tagWLAN_IE_RSN {
BYTE byElementID;
BYTE len;
WORD wVersion;
BYTE abyRSN[WLAN_MIN_ARRAY];
} WLAN_IE_RSN, *PWLAN_IE_RSN;
// ERP
#pragma pack(1)
typedef struct tagWLAN_IE_ERP {
BYTE byElementID;
BYTE len;
BYTE byContext;
}__attribute__ ((__packed__))
WLAN_IE_ERP, *PWLAN_IE_ERP;
#pragma pack(1)
typedef struct _MEASEURE_REQ {
BYTE byChannel;
BYTE abyStartTime[8];
BYTE abyDuration[2];
} MEASEURE_REQ, *PMEASEURE_REQ,
MEASEURE_REQ_BASIC, *PMEASEURE_REQ_BASIC,
MEASEURE_REQ_CCA, *PMEASEURE_REQ_CCA,
MEASEURE_REQ_RPI, *PMEASEURE_REQ_RPI;
typedef struct _MEASEURE_REP_BASIC {
BYTE byChannel;
BYTE abyStartTime[8];
BYTE abyDuration[2];
BYTE byMap;
} MEASEURE_REP_BASIC, *PMEASEURE_REP_BASIC;
typedef struct _MEASEURE_REP_CCA {
BYTE byChannel;
BYTE abyStartTime[8];
BYTE abyDuration[2];
BYTE byCCABusyFraction;
} MEASEURE_REP_CCA, *PMEASEURE_REP_CCA;
typedef struct _MEASEURE_REP_RPI {
BYTE byChannel;
BYTE abyStartTime[8];
BYTE abyDuration[2];
BYTE abyRPIdensity[8];
} MEASEURE_REP_RPI, *PMEASEURE_REP_RPI;
typedef union _MEASEURE_REP {
MEASEURE_REP_BASIC sBasic;
MEASEURE_REP_CCA sCCA;
MEASEURE_REP_RPI sRPI;
} MEASEURE_REP, *PMEASEURE_REP;
typedef struct _WLAN_IE_MEASURE_REQ {
BYTE byElementID;
BYTE len;
BYTE byToken;
BYTE byMode;
BYTE byType;
MEASEURE_REQ sReq;
} WLAN_IE_MEASURE_REQ, *PWLAN_IE_MEASURE_REQ;
typedef struct _WLAN_IE_MEASURE_REP {
BYTE byElementID;
BYTE len;
BYTE byToken;
BYTE byMode;
BYTE byType;
MEASEURE_REP sRep;
} WLAN_IE_MEASURE_REP, *PWLAN_IE_MEASURE_REP;
typedef struct _WLAN_IE_CH_SW {
BYTE byElementID;
BYTE len;
BYTE byMode;
BYTE byChannel;
BYTE byCount;
} WLAN_IE_CH_SW, *PWLAN_IE_CH_SW;
typedef struct _WLAN_IE_QUIET {
BYTE byElementID;
BYTE len;
BYTE byQuietCount;
BYTE byQuietPeriod;
BYTE abyQuietDuration[2];
BYTE abyQuietOffset[2];
} WLAN_IE_QUIET, *PWLAN_IE_QUIET;
typedef struct _WLAN_IE_COUNTRY {
BYTE byElementID;
BYTE len;
BYTE abyCountryString[3];
BYTE abyCountryInfo[3];
} WLAN_IE_COUNTRY, *PWLAN_IE_COUNTRY;
typedef struct _WLAN_IE_PW_CONST {
BYTE byElementID;
BYTE len;
BYTE byPower;
} WLAN_IE_PW_CONST, *PWLAN_IE_PW_CONST;
typedef struct _WLAN_IE_PW_CAP {
BYTE byElementID;
BYTE len;
BYTE byMinPower;
BYTE byMaxPower;
} WLAN_IE_PW_CAP, *PWLAN_IE_PW_CAP;
typedef struct _WLAN_IE_SUPP_CH {
BYTE byElementID;
BYTE len;
BYTE abyChannelTuple[2];
} WLAN_IE_SUPP_CH, *PWLAN_IE_SUPP_CH;
typedef struct _WLAN_IE_TPC_REQ {
BYTE byElementID;
BYTE len;
} WLAN_IE_TPC_REQ, *PWLAN_IE_TPC_REQ;
typedef struct _WLAN_IE_TPC_REP {
BYTE byElementID;
BYTE len;
BYTE byTxPower;
BYTE byLinkMargin;
} WLAN_IE_TPC_REP, *PWLAN_IE_TPC_REP;
typedef struct _WLAN_IE_IBSS_DFS {
BYTE byElementID;
BYTE len;
BYTE abyDFSOwner[6];
BYTE byDFSRecovery;
BYTE abyChannelMap[2];
} WLAN_IE_IBSS_DFS, *PWLAN_IE_IBSS_DFS;
#pragma pack()
// Frame Types
// prototype structure, all mgmt frame types will start with these members
typedef struct tagWLAN_FR_MGMT {
UINT uType;
UINT len;
PBYTE pBuf;
PUWLAN_80211HDR pHdr;
} WLAN_FR_MGMT, *PWLAN_FR_MGMT;
// Beacon frame
typedef struct tagWLAN_FR_BEACON {
UINT uType;
UINT len;
PBYTE pBuf;
PUWLAN_80211HDR pHdr;
// fixed fields
PQWORD pqwTimestamp;
PWORD pwBeaconInterval;
PWORD pwCapInfo;
/*-- info elements ----------*/
PWLAN_IE_SSID pSSID;
PWLAN_IE_SUPP_RATES pSuppRates;
// PWLAN_IE_FH_PARMS pFHParms;
PWLAN_IE_DS_PARMS pDSParms;
PWLAN_IE_CF_PARMS pCFParms;
PWLAN_IE_TIM pTIM;
PWLAN_IE_IBSS_PARMS pIBSSParms;
PWLAN_IE_RSN pRSN;
PWLAN_IE_RSN_EXT pRSNWPA;
PWLAN_IE_ERP pERP;
PWLAN_IE_SUPP_RATES pExtSuppRates;
PWLAN_IE_COUNTRY pIE_Country;
PWLAN_IE_PW_CONST pIE_PowerConstraint;
PWLAN_IE_CH_SW pIE_CHSW;
PWLAN_IE_IBSS_DFS pIE_IBSSDFS;
PWLAN_IE_QUIET pIE_Quiet;
} WLAN_FR_BEACON, *PWLAN_FR_BEACON;
// IBSS ATIM frame
typedef struct tagWLAN_FR_IBSSATIM {
UINT uType;
UINT len;
PBYTE pBuf;
PUWLAN_80211HDR pHdr;
// fixed fields
// info elements
// this frame type has a null body
} WLAN_FR_IBSSATIM, *PWLAN_FR_IBSSATIM;
// Disassociation
typedef struct tagWLAN_FR_DISASSOC {
UINT uType;
UINT len;
PBYTE pBuf;
PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/
PWORD pwReason;
/*-- info elements ----------*/
} WLAN_FR_DISASSOC, *PWLAN_FR_DISASSOC;
// Association Request
typedef struct tagWLAN_FR_ASSOCREQ {
UINT uType;
UINT len;
PBYTE pBuf;
PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/
PWORD pwCapInfo;
PWORD pwListenInterval;
/*-- info elements ----------*/
PWLAN_IE_SSID pSSID;
PWLAN_IE_SUPP_RATES pSuppRates;
PWLAN_IE_RSN pRSN;
PWLAN_IE_RSN_EXT pRSNWPA;
PWLAN_IE_SUPP_RATES pExtSuppRates;
PWLAN_IE_PW_CAP pCurrPowerCap;
PWLAN_IE_SUPP_CH pCurrSuppCh;
} WLAN_FR_ASSOCREQ, *PWLAN_FR_ASSOCREQ;
// Association Response
typedef struct tagWLAN_FR_ASSOCRESP {
UINT uType;
UINT len;
PBYTE pBuf;
PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/
PWORD pwCapInfo;
PWORD pwStatus;
PWORD pwAid;
/*-- info elements ----------*/
PWLAN_IE_SUPP_RATES pSuppRates;
PWLAN_IE_SUPP_RATES pExtSuppRates;
} WLAN_FR_ASSOCRESP, *PWLAN_FR_ASSOCRESP;
// Reassociation Request
typedef struct tagWLAN_FR_REASSOCREQ {
UINT uType;
UINT len;
PBYTE pBuf;
PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/
PWORD pwCapInfo;
PWORD pwListenInterval;
PIEEE_ADDR pAddrCurrAP;
/*-- info elements ----------*/
PWLAN_IE_SSID pSSID;
PWLAN_IE_SUPP_RATES pSuppRates;
PWLAN_IE_RSN pRSN;
PWLAN_IE_RSN_EXT pRSNWPA;
PWLAN_IE_SUPP_RATES pExtSuppRates;
} WLAN_FR_REASSOCREQ, *PWLAN_FR_REASSOCREQ;
// Reassociation Response
typedef struct tagWLAN_FR_REASSOCRESP {
UINT uType;
UINT len;
PBYTE pBuf;
PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/
PWORD pwCapInfo;
PWORD pwStatus;
PWORD pwAid;
/*-- info elements ----------*/
PWLAN_IE_SUPP_RATES pSuppRates;
PWLAN_IE_SUPP_RATES pExtSuppRates;
} WLAN_FR_REASSOCRESP, *PWLAN_FR_REASSOCRESP;
// Probe Request
typedef struct tagWLAN_FR_PROBEREQ {
UINT uType;
UINT len;
PBYTE pBuf;
PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/
/*-- info elements ----------*/
PWLAN_IE_SSID pSSID;
PWLAN_IE_SUPP_RATES pSuppRates;
PWLAN_IE_SUPP_RATES pExtSuppRates;
} WLAN_FR_PROBEREQ, *PWLAN_FR_PROBEREQ;
// Probe Response
typedef struct tagWLAN_FR_PROBERESP {
UINT uType;
UINT len;
PBYTE pBuf;
PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/
PQWORD pqwTimestamp;
PWORD pwBeaconInterval;
PWORD pwCapInfo;
/*-- info elements ----------*/
PWLAN_IE_SSID pSSID;
PWLAN_IE_SUPP_RATES pSuppRates;
PWLAN_IE_DS_PARMS pDSParms;
PWLAN_IE_CF_PARMS pCFParms;
PWLAN_IE_IBSS_PARMS pIBSSParms;
PWLAN_IE_RSN pRSN;
PWLAN_IE_RSN_EXT pRSNWPA;
PWLAN_IE_ERP pERP;
PWLAN_IE_SUPP_RATES pExtSuppRates;
PWLAN_IE_COUNTRY pIE_Country;
PWLAN_IE_PW_CONST pIE_PowerConstraint;
PWLAN_IE_CH_SW pIE_CHSW;
PWLAN_IE_IBSS_DFS pIE_IBSSDFS;
PWLAN_IE_QUIET pIE_Quiet;
} WLAN_FR_PROBERESP, *PWLAN_FR_PROBERESP;
// Authentication
typedef struct tagWLAN_FR_AUTHEN {
UINT uType;
UINT len;
PBYTE pBuf;
PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/
PWORD pwAuthAlgorithm;
PWORD pwAuthSequence;
PWORD pwStatus;
/*-- info elements ----------*/
PWLAN_IE_CHALLENGE pChallenge;
} WLAN_FR_AUTHEN, *PWLAN_FR_AUTHEN;
// Deauthenication
typedef struct tagWLAN_FR_DEAUTHEN {
UINT uType;
UINT len;
PBYTE pBuf;
PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/
PWORD pwReason;
/*-- info elements ----------*/
} WLAN_FR_DEAUTHEN, *PWLAN_FR_DEAUTHEN;
/*--------------------- Export Functions --------------------------*/
VOID
vMgrEncodeBeacon(
IN PWLAN_FR_BEACON pFrame
);
VOID
vMgrDecodeBeacon(
IN PWLAN_FR_BEACON pFrame
);
VOID
vMgrEncodeIBSSATIM(
IN PWLAN_FR_IBSSATIM pFrame
);
VOID
vMgrDecodeIBSSATIM(
IN PWLAN_FR_IBSSATIM pFrame
);
VOID
vMgrEncodeDisassociation(
IN PWLAN_FR_DISASSOC pFrame
);
VOID
vMgrDecodeDisassociation(
IN PWLAN_FR_DISASSOC pFrame
);
VOID
vMgrEncodeAssocRequest(
IN PWLAN_FR_ASSOCREQ pFrame
);
VOID
vMgrDecodeAssocRequest(
IN PWLAN_FR_ASSOCREQ pFrame
);
VOID
vMgrEncodeAssocResponse(
IN PWLAN_FR_ASSOCRESP pFrame
);
VOID
vMgrDecodeAssocResponse(
IN PWLAN_FR_ASSOCRESP pFrame
);
VOID
vMgrEncodeReassocRequest(
IN PWLAN_FR_REASSOCREQ pFrame
);
VOID
vMgrDecodeReassocRequest(
IN PWLAN_FR_REASSOCREQ pFrame
);
VOID
vMgrEncodeProbeRequest(
IN PWLAN_FR_PROBEREQ pFrame
);
VOID
vMgrDecodeProbeRequest(
IN PWLAN_FR_PROBEREQ pFrame
);
VOID
vMgrEncodeProbeResponse(
IN PWLAN_FR_PROBERESP pFrame
);
VOID
vMgrDecodeProbeResponse(
IN PWLAN_FR_PROBERESP pFrame
);
VOID
vMgrEncodeAuthen(
IN PWLAN_FR_AUTHEN pFrame
);
VOID
vMgrDecodeAuthen(
IN PWLAN_FR_AUTHEN pFrame
);
VOID
vMgrEncodeDeauthen(
IN PWLAN_FR_DEAUTHEN pFrame
);
VOID
vMgrDecodeDeauthen(
IN PWLAN_FR_DEAUTHEN pFrame
);
VOID
vMgrEncodeReassocResponse(
IN PWLAN_FR_REASSOCRESP pFrame
);
VOID
vMgrDecodeReassocResponse(
IN PWLAN_FR_REASSOCRESP pFrame
);
#endif// __80211MGR_H__
|