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