Diffstat (limited to 'libopie2/opienet/802_11_user.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opienet/802_11_user.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libopie2/opienet/802_11_user.h b/libopie2/opienet/802_11_user.h index ffdcb93..f596bd8 100644 --- a/libopie2/opienet/802_11_user.h +++ b/libopie2/opienet/802_11_user.h | |||
@@ -234,48 +234,60 @@ struct ieee_802_11_frame_subtype_class { | |||
234 | 234 | ||
235 | 235 | ||
236 | struct ieee_802_11_mgmt_header { | 236 | struct ieee_802_11_mgmt_header { |
237 | u_int16_t fc; | 237 | u_int16_t fc; |
238 | u_int16_t duration; | 238 | u_int16_t duration; |
239 | u_int8_t da[6]; | 239 | u_int8_t da[6]; |
240 | u_int8_t sa[6]; | 240 | u_int8_t sa[6]; |
241 | u_int8_t bssid[6]; | 241 | u_int8_t bssid[6]; |
242 | u_int16_t seq_ctrl; | 242 | u_int16_t seq_ctrl; |
243 | }; | 243 | }; |
244 | 244 | ||
245 | 245 | ||
246 | struct ieee_802_11_data_header { | 246 | struct ieee_802_11_data_header { |
247 | u_int16_tframe_control; | 247 | u_int16_tframe_control; |
248 | u_int16_tduration; | 248 | u_int16_tduration; |
249 | u_int8_tmac1[6]; | 249 | u_int8_tmac1[6]; |
250 | u_int8_tmac2[6]; | 250 | u_int8_tmac2[6]; |
251 | u_int8_tmac3[6]; | 251 | u_int8_tmac3[6]; |
252 | u_int16_tSeqCtl; | 252 | u_int16_tSeqCtl; |
253 | u_int8_tmac4[6]; | 253 | u_int8_tmac4[6]; |
254 | // u_int16_tgapLen; | 254 | // u_int16_tgapLen; |
255 | // u_int8_tgap[8]; | 255 | // u_int8_tgap[8]; |
256 | }; | 256 | }; |
257 | 257 | ||
258 | struct ieee_802_11_control_header { | ||
259 | u_int16_tframe_control; | ||
260 | u_int16_tduration; | ||
261 | u_int8_tmac1[6]; | ||
262 | u_int8_tmac2[6]; | ||
263 | u_int8_tmac3[6]; | ||
264 | u_int16_tSeqCtl; | ||
265 | u_int8_tmac4[6]; | ||
266 | // u_int16_tgapLen; | ||
267 | // u_int8_tgap[8]; | ||
268 | }; | ||
269 | |||
258 | #define CAPABILITY_ESS(cap) ((cap) & 0x0001) | 270 | #define CAPABILITY_ESS(cap) ((cap) & 0x0001) |
259 | #define CAPABILITY_IBSS(cap) ((cap) & 0x0002) | 271 | #define CAPABILITY_IBSS(cap) ((cap) & 0x0002) |
260 | #define CAPABILITY_CFP(cap) ((cap) & 0x0004) | 272 | #define CAPABILITY_CFP(cap) ((cap) & 0x0004) |
261 | #define CAPABILITY_CFP_REQ(cap) ((cap) & 0x0008) | 273 | #define CAPABILITY_CFP_REQ(cap) ((cap) & 0x0008) |
262 | #define CAPABILITY_PRIVACY(cap) ((cap) & 0x0010) | 274 | #define CAPABILITY_PRIVACY(cap) ((cap) & 0x0010) |
263 | 275 | ||
264 | struct ssid_t { | 276 | struct ssid_t { |
265 | u_int8_telement_id; | 277 | u_int8_telement_id; |
266 | u_int8_tlength; | 278 | u_int8_tlength; |
267 | u_char ssid[33]; /* 32 + 1 for null */ | 279 | u_char ssid[33]; /* 32 + 1 for null */ |
268 | }; | 280 | }; |
269 | 281 | ||
270 | 282 | ||
271 | struct rates_t { | 283 | struct rates_t { |
272 | u_int8_telement_id; | 284 | u_int8_telement_id; |
273 | u_int8_tlength; | 285 | u_int8_tlength; |
274 | u_int8_trate[8]; | 286 | u_int8_trate[8]; |
275 | }; | 287 | }; |
276 | 288 | ||
277 | 289 | ||
278 | struct challenge_t { | 290 | struct challenge_t { |
279 | u_int8_telement_id; | 291 | u_int8_telement_id; |
280 | u_int8_tlength; | 292 | u_int8_tlength; |
281 | u_int8_ttext[254]; /* 1-253 + 1 for null */ | 293 | u_int8_ttext[254]; /* 1-253 + 1 for null */ |
@@ -341,48 +353,52 @@ struct ieee_802_11_mgmt_body { | |||
341 | u_int8_t timestamp[8]; | 353 | u_int8_t timestamp[8]; |
342 | u_int16_t beacon_interval; | 354 | u_int16_t beacon_interval; |
343 | // u_int16_t listen_interval; | 355 | // u_int16_t listen_interval; |
344 | // u_int16_t status_code; | 356 | // u_int16_t status_code; |
345 | // u_int16_t aid; | 357 | // u_int16_t aid; |
346 | // u_char ap[6]; | 358 | // u_char ap[6]; |
347 | // u_int16_treason_code; | 359 | // u_int16_treason_code; |
348 | // u_int16_tauth_alg; | 360 | // u_int16_tauth_alg; |
349 | // u_int16_tauth_trans_seq_num; | 361 | // u_int16_tauth_trans_seq_num; |
350 | // struct challenge_t challenge; | 362 | // struct challenge_t challenge; |
351 | u_int16_t capability_info; | 363 | u_int16_t capability_info; |
352 | // struct ssid_tssid; | 364 | // struct ssid_tssid; |
353 | // struct rates_t rates; | 365 | // struct rates_t rates; |
354 | // struct ds_tds; | 366 | // struct ds_tds; |
355 | // struct cf_tcf; | 367 | // struct cf_tcf; |
356 | // struct fh_tfh; | 368 | // struct fh_tfh; |
357 | // struct tim_ttim; | 369 | // struct tim_ttim; |
358 | }; | 370 | }; |
359 | 371 | ||
360 | 372 | ||
361 | struct ieee_802_11_data_body { | 373 | struct ieee_802_11_data_body { |
362 | //FIXME | 374 | //FIXME |
363 | }; | 375 | }; |
364 | 376 | ||
377 | struct ieee_802_11_control_body { | ||
378 | //FIXME | ||
379 | }; | ||
380 | |||
365 | struct ctrl_rts_t { | 381 | struct ctrl_rts_t { |
366 | u_int16_tfc; | 382 | u_int16_tfc; |
367 | u_int16_tduration; | 383 | u_int16_tduration; |
368 | u_int8_tra[6]; | 384 | u_int8_tra[6]; |
369 | u_int8_tta[6]; | 385 | u_int8_tta[6]; |
370 | u_int8_tfcs[4]; | 386 | u_int8_tfcs[4]; |
371 | }; | 387 | }; |
372 | 388 | ||
373 | #define CTRL_RTS_LEN(2+2+6+6+4) | 389 | #define CTRL_RTS_LEN(2+2+6+6+4) |
374 | 390 | ||
375 | struct ctrl_cts_t { | 391 | struct ctrl_cts_t { |
376 | u_int16_tfc; | 392 | u_int16_tfc; |
377 | u_int16_tduration; | 393 | u_int16_tduration; |
378 | u_int8_tra[6]; | 394 | u_int8_tra[6]; |
379 | u_int8_tfcs[4]; | 395 | u_int8_tfcs[4]; |
380 | }; | 396 | }; |
381 | 397 | ||
382 | #define CTRL_CTS_LEN(2+2+6+4) | 398 | #define CTRL_CTS_LEN(2+2+6+4) |
383 | 399 | ||
384 | struct ctrl_ack_t { | 400 | struct ctrl_ack_t { |
385 | u_int16_tfc; | 401 | u_int16_tfc; |
386 | u_int16_tduration; | 402 | u_int16_tduration; |
387 | u_int8_tra[6]; | 403 | u_int8_tra[6]; |
388 | u_int8_tfcs[4]; | 404 | u_int8_tfcs[4]; |