4 #define IEEE802_11_DATA_LEN 2304
5 /* Maximum size for the MA-UNITDATA primitive, 802.11 standard section
8 The figure in section 7.1.2 suggests a body size of up to 2312
9 bytes is allowed, which is a bit confusing, I suspect this
10 represents the 2304 bytes of real data, plus a possible 8 bytes of
11 WEP IV and ICV. (this interpretation suggested by Ramiro Barreiro) */
14 #define IEEE802_11_HLEN 30
15 #define IEEE802_11_FRAME_LEN (IEEE802_11_DATA_LEN + IEEE802_11_HLEN)
17 struct ieee802_11_hdr
{
25 } __attribute__ ((packed
));
27 /* Frame control field constants */
28 #define IEEE802_11_FCTL_VERS 0x0002
29 #define IEEE802_11_FCTL_FTYPE 0x000c
30 #define IEEE802_11_FCTL_STYPE 0x00f0
31 #define IEEE802_11_FCTL_TODS 0x0100
32 #define IEEE802_11_FCTL_FROMDS 0x0200
33 #define IEEE802_11_FCTL_MOREFRAGS 0x0400
34 #define IEEE802_11_FCTL_RETRY 0x0800
35 #define IEEE802_11_FCTL_PM 0x1000
36 #define IEEE802_11_FCTL_MOREDATA 0x2000
37 #define IEEE802_11_FCTL_WEP 0x4000
38 #define IEEE802_11_FCTL_ORDER 0x8000
40 #define IEEE802_11_FTYPE_MGMT 0x0000
41 #define IEEE802_11_FTYPE_CTL 0x0004
42 #define IEEE802_11_FTYPE_DATA 0x0008
45 #define IEEE802_11_STYPE_ASSOC_REQ 0x0000
46 #define IEEE802_11_STYPE_ASSOC_RESP 0x0010
47 #define IEEE802_11_STYPE_REASSOC_REQ 0x0020
48 #define IEEE802_11_STYPE_REASSOC_RESP 0x0030
49 #define IEEE802_11_STYPE_PROBE_REQ 0x0040
50 #define IEEE802_11_STYPE_PROBE_RESP 0x0050
51 #define IEEE802_11_STYPE_BEACON 0x0080
52 #define IEEE802_11_STYPE_ATIM 0x0090
53 #define IEEE802_11_STYPE_DISASSOC 0x00A0
54 #define IEEE802_11_STYPE_AUTH 0x00B0
55 #define IEEE802_11_STYPE_DEAUTH 0x00C0
58 #define IEEE802_11_STYPE_PSPOLL 0x00A0
59 #define IEEE802_11_STYPE_RTS 0x00B0
60 #define IEEE802_11_STYPE_CTS 0x00C0
61 #define IEEE802_11_STYPE_ACK 0x00D0
62 #define IEEE802_11_STYPE_CFEND 0x00E0
63 #define IEEE802_11_STYPE_CFENDACK 0x00F0
66 #define IEEE802_11_STYPE_DATA 0x0000
67 #define IEEE802_11_STYPE_DATA_CFACK 0x0010
68 #define IEEE802_11_STYPE_DATA_CFPOLL 0x0020
69 #define IEEE802_11_STYPE_DATA_CFACKPOLL 0x0030
70 #define IEEE802_11_STYPE_NULLFUNC 0x0040
71 #define IEEE802_11_STYPE_CFACK 0x0050
72 #define IEEE802_11_STYPE_CFPOLL 0x0060
73 #define IEEE802_11_STYPE_CFACKPOLL 0x0070
75 #define IEEE802_11_SCTL_FRAG 0x000F
76 #define IEEE802_11_SCTL_SEQ 0xFFF0
78 #endif /* _IEEE802_11_H */