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