author | mickeyl <mickeyl> | 2003-03-30 01:41:56 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-03-30 01:41:56 (UTC) |
commit | 99899abc80a8aa05044eeecd8a061b0a8efaa713 (patch) (unidiff) | |
tree | 45db7a60f17d00ae72d0e8d6b986d5be10232c6c /libopie2/opienet/802_11_user.h | |
parent | 340cb7e64fb898966996b00b93c03ca05a347aa5 (diff) | |
download | opie-99899abc80a8aa05044eeecd8a061b0a8efaa713.zip opie-99899abc80a8aa05044eeecd8a061b0a8efaa713.tar.gz opie-99899abc80a8aa05044eeecd8a061b0a8efaa713.tar.bz2 |
- add classes for 802.11 tagged values
- adjust miniwellenreiter accordingly
Diffstat (limited to 'libopie2/opienet/802_11_user.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opienet/802_11_user.h | 54 |
1 files changed, 31 insertions, 23 deletions
diff --git a/libopie2/opienet/802_11_user.h b/libopie2/opienet/802_11_user.h index 0b3f198..ffdcb93 100644 --- a/libopie2/opienet/802_11_user.h +++ b/libopie2/opienet/802_11_user.h | |||
@@ -234,53 +234,53 @@ 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 | #define CAPABILITY_ESS(cap)((cap) & 0x0001) | 258 | #define CAPABILITY_ESS(cap) ((cap) & 0x0001) |
259 | #define CAPABILITY_IBSS(cap)((cap) & 0x0002) | 259 | #define CAPABILITY_IBSS(cap) ((cap) & 0x0002) |
260 | #define CAPABILITY_CFP(cap)((cap) & 0x0004) | 260 | #define CAPABILITY_CFP(cap) ((cap) & 0x0004) |
261 | #define CAPABILITY_CFP_REQ(cap)((cap) & 0x0008) | 261 | #define CAPABILITY_CFP_REQ(cap) ((cap) & 0x0008) |
262 | #define CAPABILITY_PRIVACY(cap)((cap) & 0x0010) | 262 | #define CAPABILITY_PRIVACY(cap) ((cap) & 0x0010) |
263 | 263 | ||
264 | struct ssid_t { | 264 | struct ssid_t { |
265 | u_int8_telement_id; | 265 | u_int8_telement_id; |
266 | u_int8_tlength; | 266 | u_int8_tlength; |
267 | u_char ssid[33]; /* 32 + 1 for null */ | 267 | u_char ssid[33]; /* 32 + 1 for null */ |
268 | }; | 268 | }; |
269 | 269 | ||
270 | 270 | ||
271 | struct rates_t { | 271 | struct rates_t { |
272 | u_int8_telement_id; | 272 | u_int8_telement_id; |
273 | u_int8_tlength; | 273 | u_int8_tlength; |
274 | u_int8_trate[8]; | 274 | u_int8_trate[8]; |
275 | }; | 275 | }; |
276 | 276 | ||
277 | 277 | ||
278 | struct challenge_t { | 278 | struct challenge_t { |
279 | u_int8_telement_id; | 279 | u_int8_telement_id; |
280 | u_int8_tlength; | 280 | u_int8_tlength; |
281 | u_int8_ttext[254]; /* 1-253 + 1 for null */ | 281 | u_int8_ttext[254]; /* 1-253 + 1 for null */ |
282 | }; | 282 | }; |
283 | 283 | ||
284 | 284 | ||
285 | struct fh_t { | 285 | struct fh_t { |
286 | u_int8_telement_id; | 286 | u_int8_telement_id; |
@@ -297,77 +297,85 @@ struct ds_t { | |||
297 | u_int8_tlength; | 297 | u_int8_tlength; |
298 | u_int8_tchannel; | 298 | u_int8_tchannel; |
299 | }; | 299 | }; |
300 | 300 | ||
301 | 301 | ||
302 | struct cf_t { | 302 | struct cf_t { |
303 | u_int8_telement_id; | 303 | u_int8_telement_id; |
304 | u_int8_tlength; | 304 | u_int8_tlength; |
305 | u_int8_tcount; | 305 | u_int8_tcount; |
306 | u_int8_tperiod; | 306 | u_int8_tperiod; |
307 | u_int16_tmax_duration; | 307 | u_int16_tmax_duration; |
308 | u_int16_tdur_remaing; | 308 | u_int16_tdur_remaing; |
309 | }; | 309 | }; |
310 | 310 | ||
311 | 311 | ||
312 | struct tim_t { | 312 | struct tim_t { |
313 | u_int8_telement_id; | 313 | u_int8_telement_id; |
314 | u_int8_tlength; | 314 | u_int8_tlength; |
315 | u_int8_tcount; | 315 | u_int8_tcount; |
316 | u_int8_tperiod; | 316 | u_int8_tperiod; |
317 | u_int8_tbitmap_control; | 317 | u_int8_tbitmap_control; |
318 | u_int8_tbitmap[251]; | 318 | u_int8_tbitmap[251]; |
319 | }; | 319 | }; |
320 | 320 | ||
321 | #define E_SSID 0 | 321 | |
322 | #define E_RATES 1 | 322 | struct ibss_t { |
323 | #define E_FH 2 | 323 | u_int8_telement_id; |
324 | #define E_DS 3 | 324 | u_int8_tlength; |
325 | #define E_CF 4 | 325 | u_int16_tatim_window; |
326 | #define E_TIM 5 | 326 | }; |
327 | #define E_IBSS 6 | 327 | |
328 | #define E_CHALLENGE 16 | 328 | |
329 | #define E_CISCO 133 | 329 | #define E_SSID 0 |
330 | #define E_RATES 1 | ||
331 | #define E_FH 2 | ||
332 | #define E_DS 3 | ||
333 | #define E_CF 4 | ||
334 | #define E_TIM 5 | ||
335 | #define E_IBSS 6 | ||
336 | #define E_CHALLENGE 16 | ||
337 | #define E_CISCO 133 | ||
330 | 338 | ||
331 | 339 | ||
332 | struct ieee_802_11_mgmt_body { | 340 | struct ieee_802_11_mgmt_body { |
333 | u_int8_t timestamp[8]; | 341 | u_int8_t timestamp[8]; |
334 | u_int16_t beacon_interval; | 342 | u_int16_t beacon_interval; |
335 | // u_int16_t listen_interval; | 343 | // u_int16_t listen_interval; |
336 | // u_int16_t status_code; | 344 | // u_int16_t status_code; |
337 | // u_int16_t aid; | 345 | // u_int16_t aid; |
338 | // u_char ap[6]; | 346 | // u_char ap[6]; |
339 | // u_int16_treason_code; | 347 | // u_int16_treason_code; |
340 | // u_int16_tauth_alg; | 348 | // u_int16_tauth_alg; |
341 | // u_int16_tauth_trans_seq_num; | 349 | // u_int16_tauth_trans_seq_num; |
342 | // struct challenge_t challenge; | 350 | // struct challenge_t challenge; |
343 | u_int16_tcapability_info; | 351 | u_int16_t capability_info; |
344 | struct ssid_tssid; | 352 | // struct ssid_tssid; |
345 | struct rates_t rates; | 353 | // struct rates_t rates; |
346 | struct ds_tds; | 354 | // struct ds_tds; |
347 | struct cf_tcf; | 355 | // struct cf_tcf; |
348 | struct fh_tfh; | 356 | // struct fh_tfh; |
349 | struct tim_ttim; | 357 | // struct tim_ttim; |
350 | }; | 358 | }; |
351 | 359 | ||
352 | 360 | ||
353 | struct ieee_802_11_data_body { | 361 | struct ieee_802_11_data_body { |
354 | //FIXME | 362 | //FIXME |
355 | }; | 363 | }; |
356 | 364 | ||
357 | struct ctrl_rts_t { | 365 | struct ctrl_rts_t { |
358 | u_int16_tfc; | 366 | u_int16_tfc; |
359 | u_int16_tduration; | 367 | u_int16_tduration; |
360 | u_int8_tra[6]; | 368 | u_int8_tra[6]; |
361 | u_int8_tta[6]; | 369 | u_int8_tta[6]; |
362 | u_int8_tfcs[4]; | 370 | u_int8_tfcs[4]; |
363 | }; | 371 | }; |
364 | 372 | ||
365 | #define CTRL_RTS_LEN(2+2+6+6+4) | 373 | #define CTRL_RTS_LEN(2+2+6+6+4) |
366 | 374 | ||
367 | struct ctrl_cts_t { | 375 | struct ctrl_cts_t { |
368 | u_int16_tfc; | 376 | u_int16_tfc; |
369 | u_int16_tduration; | 377 | u_int16_tduration; |
370 | u_int8_tra[6]; | 378 | u_int8_tra[6]; |
371 | u_int8_tfcs[4]; | 379 | u_int8_tfcs[4]; |
372 | }; | 380 | }; |
373 | 381 | ||