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