Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 348 lines (302 sloc) 8.507 kb
7bfcc5e yuguy Don't attempt to dissect the payload of a no-data frame.
yuguy authored
1 /* @(#) $Header: /tcpdump/master/tcpdump/ieee802_11.h,v 1.12 2007-07-22 19:59:06 guy Exp $ (LBL) */
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
2 /*
3 * Copyright (c) 2001
4 * Fortress Technologies
5 * Charlie Lenahan ( clenahan@fortresstech.com )
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that: (1) source code distributions
9 * retain the above copyright notice and this paragraph in its entirety, (2)
10 * distributions including binary code include the above copyright notice and
11 * this paragraph in its entirety in the documentation or other materials
12 * provided with the distribution, and (3) all advertising materials mentioning
13 * features or use of this software display the following acknowledgement:
14 * ``This product includes software developed by the University of California,
15 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
16 * the University nor the names of its contributors may be used to endorse
17 * or promote products derived from this software without specific prior
18 * written permission.
19 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
20 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
21 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22 */
23
d8add7c yuguy Stylistic cleanups, from David Young.
yuguy authored
24 /* Lengths of 802.11 header components. */
25 #define IEEE802_11_FC_LEN 2
26 #define IEEE802_11_DUR_LEN 2
27 #define IEEE802_11_DA_LEN 6
28 #define IEEE802_11_SA_LEN 6
29 #define IEEE802_11_BSSID_LEN 6
30 #define IEEE802_11_RA_LEN 6
31 #define IEEE802_11_TA_LEN 6
32 #define IEEE802_11_SEQ_LEN 2
aae14f9 Merge in stuff from the current top-of-tree FreeBSD tcpdump; this picks
Guy Harris authored
33 #define IEEE802_11_CTL_LEN 2
d8add7c yuguy Stylistic cleanups, from David Young.
yuguy authored
34 #define IEEE802_11_IV_LEN 3
35 #define IEEE802_11_KID_LEN 1
36
37 /* Frame check sequence length. */
38 #define IEEE802_11_FCS_LEN 4
39
40 /* Lengths of beacon components. */
41 #define IEEE802_11_TSTAMP_LEN 8
42 #define IEEE802_11_BCNINT_LEN 2
43 #define IEEE802_11_CAPINFO_LEN 2
44 #define IEEE802_11_LISTENINT_LEN 2
45
46 #define IEEE802_11_AID_LEN 2
47 #define IEEE802_11_STATUS_LEN 2
48 #define IEEE802_11_REASON_LEN 2
49
50 /* Length of previous AP in reassocation frame */
51 #define IEEE802_11_AP_LEN 6
52
53 #define T_MGMT 0x0 /* management */
54 #define T_CTRL 0x1 /* control */
55 #define T_DATA 0x2 /* data */
56 #define T_RESV 0x3 /* reserved */
57
58 #define ST_ASSOC_REQUEST 0x0
59 #define ST_ASSOC_RESPONSE 0x1
60 #define ST_REASSOC_REQUEST 0x2
61 #define ST_REASSOC_RESPONSE 0x3
62 #define ST_PROBE_REQUEST 0x4
63 #define ST_PROBE_RESPONSE 0x5
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
64 /* RESERVED 0x6 */
65 /* RESERVED 0x7 */
d8add7c yuguy Stylistic cleanups, from David Young.
yuguy authored
66 #define ST_BEACON 0x8
67 #define ST_ATIM 0x9
68 #define ST_DISASSOC 0xA
69 #define ST_AUTH 0xB
70 #define ST_DEAUTH 0xC
aae14f9 Merge in stuff from the current top-of-tree FreeBSD tcpdump; this picks
Guy Harris authored
71 #define ST_ACTION 0xD
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
72 /* RESERVED 0xE */
73 /* RESERVED 0xF */
74
75
f2aee3e Handle frames with an FCS (at least with a radiotap header).
Guy Harris authored
76 #define CTRL_CONTROL_WRAPPER 0x7
aae14f9 Merge in stuff from the current top-of-tree FreeBSD tcpdump; this picks
Guy Harris authored
77 #define CTRL_BAR 0x8
78 #define CTRL_BA 0x9
79 #define CTRL_PS_POLL 0xA
80 #define CTRL_RTS 0xB
81 #define CTRL_CTS 0xC
82 #define CTRL_ACK 0xD
83 #define CTRL_CF_END 0xE
84 #define CTRL_END_ACK 0xF
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
85
7bfcc5e yuguy Don't attempt to dissect the payload of a no-data frame.
yuguy authored
86 #define DATA_DATA 0x0
87 #define DATA_DATA_CF_ACK 0x1
88 #define DATA_DATA_CF_POLL 0x2
89 #define DATA_DATA_CF_ACK_POLL 0x3
90 #define DATA_NODATA 0x4
91 #define DATA_NODATA_CF_ACK 0x5
92 #define DATA_NODATA_CF_POLL 0x6
93 #define DATA_NODATA_CF_ACK_POLL 0x7
94
95 #define DATA_QOS_DATA 0x8
96 #define DATA_QOS_DATA_CF_ACK 0x9
97 #define DATA_QOS_DATA_CF_POLL 0xA
98 #define DATA_QOS_DATA_CF_ACK_POLL 0xB
99 #define DATA_QOS_NODATA 0xC
100 #define DATA_QOS_CF_POLL_NODATA 0xE
101 #define DATA_QOS_CF_ACK_POLL_NODATA 0xF
102
103 /*
104 * The subtype field of a data frame is, in effect, composed of 4 flag
105 * bits - CF-Ack, CF-Poll, Null (means the frame doesn't actually have
106 * any data), and QoS.
107 */
108 #define DATA_FRAME_IS_CF_ACK(x) ((x) & 0x01)
109 #define DATA_FRAME_IS_CF_POLL(x) ((x) & 0x02)
110 #define DATA_FRAME_IS_NULL(x) ((x) & 0x04)
111 #define DATA_FRAME_IS_QOS(x) ((x) & 0x08)
f72f67a yuguy From David Young: print Ack/Poll information for data frames with
yuguy authored
112
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
113 /*
114 * Bits in the frame control field.
115 */
d8add7c yuguy Stylistic cleanups, from David Young.
yuguy authored
116 #define FC_VERSION(fc) ((fc) & 0x3)
117 #define FC_TYPE(fc) (((fc) >> 2) & 0x3)
118 #define FC_SUBTYPE(fc) (((fc) >> 4) & 0xF)
119 #define FC_TO_DS(fc) ((fc) & 0x0100)
120 #define FC_FROM_DS(fc) ((fc) & 0x0200)
121 #define FC_MORE_FLAG(fc) ((fc) & 0x0400)
122 #define FC_RETRY(fc) ((fc) & 0x0800)
123 #define FC_POWER_MGMT(fc) ((fc) & 0x1000)
124 #define FC_MORE_DATA(fc) ((fc) & 0x2000)
125 #define FC_WEP(fc) ((fc) & 0x4000)
126 #define FC_ORDER(fc) ((fc) & 0x8000)
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
127
128 struct mgmt_header_t {
129 u_int16_t fc;
130 u_int16_t duration;
131 u_int8_t da[6];
132 u_int8_t sa[6];
133 u_int8_t bssid[6];
d2642d6 yuguy Don't use "sizeof" to compute the sizes of various headers - the
yuguy authored
134 u_int16_t seq_ctrl;
fcc82f4 yuguy The "__attribute__((packed))" tag on structures causes some files not to
yuguy authored
135 };
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
136
91f7cb2 yuguy From David Young:
yuguy authored
137 #define MGMT_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\
d8add7c yuguy Stylistic cleanups, from David Young.
yuguy authored
138 IEEE802_11_DA_LEN+IEEE802_11_SA_LEN+\
139 IEEE802_11_BSSID_LEN+IEEE802_11_SEQ_LEN)
d2642d6 yuguy Don't use "sizeof" to compute the sizes of various headers - the
yuguy authored
140
d8add7c yuguy Stylistic cleanups, from David Young.
yuguy authored
141 #define CAPABILITY_ESS(cap) ((cap) & 0x0001)
142 #define CAPABILITY_IBSS(cap) ((cap) & 0x0002)
143 #define CAPABILITY_CFP(cap) ((cap) & 0x0004)
144 #define CAPABILITY_CFP_REQ(cap) ((cap) & 0x0008)
145 #define CAPABILITY_PRIVACY(cap) ((cap) & 0x0010)
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
146
147 struct ssid_t {
148 u_int8_t element_id;
149 u_int8_t length;
150 u_char ssid[33]; /* 32 + 1 for null */
fcc82f4 yuguy The "__attribute__((packed))" tag on structures causes some files not to
yuguy authored
151 };
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
152
153 struct rates_t {
154 u_int8_t element_id;
155 u_int8_t length;
86f96f8 yuguy Have parse_elements() flag each item as "present (and not truncated)",
yuguy authored
156 u_int8_t rate[16];
fcc82f4 yuguy The "__attribute__((packed))" tag on structures causes some files not to
yuguy authored
157 };
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
158
159 struct challenge_t {
160 u_int8_t element_id;
161 u_int8_t length;
162 u_int8_t text[254]; /* 1-253 + 1 for null */
fcc82f4 yuguy The "__attribute__((packed))" tag on structures causes some files not to
yuguy authored
163 };
86f96f8 yuguy Have parse_elements() flag each item as "present (and not truncated)",
yuguy authored
164
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
165 struct fh_t {
166 u_int8_t element_id;
167 u_int8_t length;
168 u_int16_t dwell_time;
169 u_int8_t hop_set;
170 u_int8_t hop_pattern;
171 u_int8_t hop_index;
fcc82f4 yuguy The "__attribute__((packed))" tag on structures causes some files not to
yuguy authored
172 };
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
173
174 struct ds_t {
175 u_int8_t element_id;
176 u_int8_t length;
177 u_int8_t channel;
fcc82f4 yuguy The "__attribute__((packed))" tag on structures causes some files not to
yuguy authored
178 };
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
179
180 struct cf_t {
181 u_int8_t element_id;
182 u_int8_t length;
183 u_int8_t count;
184 u_int8_t period;
185 u_int16_t max_duration;
186 u_int16_t dur_remaing;
fcc82f4 yuguy The "__attribute__((packed))" tag on structures causes some files not to
yuguy authored
187 };
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
188
189 struct tim_t {
190 u_int8_t element_id;
191 u_int8_t length;
192 u_int8_t count;
193 u_int8_t period;
194 u_int8_t bitmap_control;
195 u_int8_t bitmap[251];
fcc82f4 yuguy The "__attribute__((packed))" tag on structures causes some files not to
yuguy authored
196 };
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
197
d8add7c yuguy Stylistic cleanups, from David Young.
yuguy authored
198 #define E_SSID 0
199 #define E_RATES 1
200 #define E_FH 2
201 #define E_DS 3
202 #define E_CF 4
203 #define E_TIM 5
204 #define E_IBSS 6
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
205 /* reserved 7 */
206 /* reserved 8 */
207 /* reserved 9 */
208 /* reserved 10 */
209 /* reserved 11 */
210 /* reserved 12 */
211 /* reserved 13 */
212 /* reserved 14 */
213 /* reserved 15 */
214 /* reserved 16 */
215
d8add7c yuguy Stylistic cleanups, from David Young.
yuguy authored
216 #define E_CHALLENGE 16
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
217 /* reserved 17 */
218 /* reserved 18 */
219 /* reserved 19 */
220 /* reserved 16 */
221 /* reserved 16 */
222
223
224 struct mgmt_body_t {
c589777 yuguy Uniformly use IEEE802_11_TSTAMP_LEN as the 802.11 timestamp length and
yuguy authored
225 u_int8_t timestamp[IEEE802_11_TSTAMP_LEN];
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
226 u_int16_t beacon_interval;
227 u_int16_t listen_interval;
228 u_int16_t status_code;
229 u_int16_t aid;
c589777 yuguy Uniformly use IEEE802_11_TSTAMP_LEN as the 802.11 timestamp length and
yuguy authored
230 u_char ap[IEEE802_11_AP_LEN];
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
231 u_int16_t reason_code;
232 u_int16_t auth_alg;
233 u_int16_t auth_trans_seq_num;
7923f06 Guy Harris When parsing IEs in a management frame, save the *first* IE of a given
guyharris authored
234 int challenge_present;
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
235 struct challenge_t challenge;
236 u_int16_t capability_info;
7923f06 Guy Harris When parsing IEs in a management frame, save the *first* IE of a given
guyharris authored
237 int ssid_present;
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
238 struct ssid_t ssid;
7923f06 Guy Harris When parsing IEs in a management frame, save the *first* IE of a given
guyharris authored
239 int rates_present;
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
240 struct rates_t rates;
7923f06 Guy Harris When parsing IEs in a management frame, save the *first* IE of a given
guyharris authored
241 int ds_present;
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
242 struct ds_t ds;
7923f06 Guy Harris When parsing IEs in a management frame, save the *first* IE of a given
guyharris authored
243 int cf_present;
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
244 struct cf_t cf;
7923f06 Guy Harris When parsing IEs in a management frame, save the *first* IE of a given
guyharris authored
245 int fh_present;
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
246 struct fh_t fh;
7923f06 Guy Harris When parsing IEs in a management frame, save the *first* IE of a given
guyharris authored
247 int tim_present;
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
248 struct tim_t tim;
fcc82f4 yuguy The "__attribute__((packed))" tag on structures causes some files not to
yuguy authored
249 };
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
250
251 struct ctrl_rts_t {
252 u_int16_t fc;
253 u_int16_t duration;
254 u_int8_t ra[6];
255 u_int8_t ta[6];
884ae4d yuguy Don't make the FCS field of a control frame structure a "u_int32_t", as
yuguy authored
256 u_int8_t fcs[4];
fcc82f4 yuguy The "__attribute__((packed))" tag on structures causes some files not to
yuguy authored
257 };
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
258
91f7cb2 yuguy From David Young:
yuguy authored
259 #define CTRL_RTS_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\
260 IEEE802_11_RA_LEN+IEEE802_11_TA_LEN)
d2642d6 yuguy Don't use "sizeof" to compute the sizes of various headers - the
yuguy authored
261
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
262 struct ctrl_cts_t {
263 u_int16_t fc;
264 u_int16_t duration;
265 u_int8_t ra[6];
884ae4d yuguy Don't make the FCS field of a control frame structure a "u_int32_t", as
yuguy authored
266 u_int8_t fcs[4];
fcc82f4 yuguy The "__attribute__((packed))" tag on structures causes some files not to
yuguy authored
267 };
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
268
91f7cb2 yuguy From David Young:
yuguy authored
269 #define CTRL_CTS_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+IEEE802_11_RA_LEN)
d2642d6 yuguy Don't use "sizeof" to compute the sizes of various headers - the
yuguy authored
270
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
271 struct ctrl_ack_t {
272 u_int16_t fc;
273 u_int16_t duration;
274 u_int8_t ra[6];
884ae4d yuguy Don't make the FCS field of a control frame structure a "u_int32_t", as
yuguy authored
275 u_int8_t fcs[4];
fcc82f4 yuguy The "__attribute__((packed))" tag on structures causes some files not to
yuguy authored
276 };
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
277
91f7cb2 yuguy From David Young:
yuguy authored
278 #define CTRL_ACK_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+IEEE802_11_RA_LEN)
d2642d6 yuguy Don't use "sizeof" to compute the sizes of various headers - the
yuguy authored
279
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
280 struct ctrl_ps_poll_t {
281 u_int16_t fc;
282 u_int16_t aid;
283 u_int8_t bssid[6];
284 u_int8_t ta[6];
884ae4d yuguy Don't make the FCS field of a control frame structure a "u_int32_t", as
yuguy authored
285 u_int8_t fcs[4];
fcc82f4 yuguy The "__attribute__((packed))" tag on structures causes some files not to
yuguy authored
286 };
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
287
91f7cb2 yuguy From David Young:
yuguy authored
288 #define CTRL_PS_POLL_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_AID_LEN+\
289 IEEE802_11_BSSID_LEN+IEEE802_11_TA_LEN)
d2642d6 yuguy Don't use "sizeof" to compute the sizes of various headers - the
yuguy authored
290
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
291 struct ctrl_end_t {
292 u_int16_t fc;
293 u_int16_t duration;
294 u_int8_t ra[6];
295 u_int8_t bssid[6];
884ae4d yuguy Don't make the FCS field of a control frame structure a "u_int32_t", as
yuguy authored
296 u_int8_t fcs[4];
fcc82f4 yuguy The "__attribute__((packed))" tag on structures causes some files not to
yuguy authored
297 };
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
298
91f7cb2 yuguy From David Young:
yuguy authored
299 #define CTRL_END_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\
300 IEEE802_11_RA_LEN+IEEE802_11_BSSID_LEN)
d2642d6 yuguy Don't use "sizeof" to compute the sizes of various headers - the
yuguy authored
301
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
302 struct ctrl_end_ack_t {
303 u_int16_t fc;
304 u_int16_t duration;
305 u_int8_t ra[6];
306 u_int8_t bssid[6];
884ae4d yuguy Don't make the FCS field of a control frame structure a "u_int32_t", as
yuguy authored
307 u_int8_t fcs[4];
fcc82f4 yuguy The "__attribute__((packed))" tag on structures causes some files not to
yuguy authored
308 };
15b5a0a yuguy IEEE 802.11 support, from Charlie Lenahan <clenahan@fortresstech.com>.
yuguy authored
309
91f7cb2 yuguy From David Young:
yuguy authored
310 #define CTRL_END_ACK_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\
311 IEEE802_11_RA_LEN+IEEE802_11_BSSID_LEN)
d2642d6 yuguy Don't use "sizeof" to compute the sizes of various headers - the
yuguy authored
312
aae14f9 Merge in stuff from the current top-of-tree FreeBSD tcpdump; this picks
Guy Harris authored
313 struct ctrl_ba_t {
f2aee3e Handle frames with an FCS (at least with a radiotap header).
Guy Harris authored
314 u_int16_t fc;
315 u_int16_t duration;
316 u_int8_t ra[6];
aae14f9 Merge in stuff from the current top-of-tree FreeBSD tcpdump; this picks
Guy Harris authored
317 u_int8_t fcs[4];
f2aee3e Handle frames with an FCS (at least with a radiotap header).
Guy Harris authored
318 };
319
aae14f9 Merge in stuff from the current top-of-tree FreeBSD tcpdump; this picks
Guy Harris authored
320 #define CTRL_BA_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+IEEE802_11_RA_LEN)
f2aee3e Handle frames with an FCS (at least with a radiotap header).
Guy Harris authored
321
aae14f9 Merge in stuff from the current top-of-tree FreeBSD tcpdump; this picks
Guy Harris authored
322 struct ctrl_bar_t {
f2aee3e Handle frames with an FCS (at least with a radiotap header).
Guy Harris authored
323 u_int16_t fc;
aae14f9 Merge in stuff from the current top-of-tree FreeBSD tcpdump; this picks
Guy Harris authored
324 u_int16_t dur;
f2aee3e Handle frames with an FCS (at least with a radiotap header).
Guy Harris authored
325 u_int8_t ra[6];
326 u_int8_t ta[6];
aae14f9 Merge in stuff from the current top-of-tree FreeBSD tcpdump; this picks
Guy Harris authored
327 u_int16_t ctl;
328 u_int16_t seq;
329 u_int8_t fcs[4];
f2aee3e Handle frames with an FCS (at least with a radiotap header).
Guy Harris authored
330 };
331
aae14f9 Merge in stuff from the current top-of-tree FreeBSD tcpdump; this picks
Guy Harris authored
332 #define CTRL_BAR_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\
333 IEEE802_11_RA_LEN+IEEE802_11_TA_LEN+\
334 IEEE802_11_CTL_LEN+IEEE802_11_SEQ_LEN)
335
336 struct meshcntl_t {
337 u_int8_t flags;
338 u_int8_t ttl;
339 u_int8_t seq[4];
340 u_int8_t addr4[6];
341 u_int8_t addr5[6];
342 u_int8_t addr6[6];
343 };
f2aee3e Handle frames with an FCS (at least with a radiotap header).
Guy Harris authored
344
d8add7c yuguy Stylistic cleanups, from David Young.
yuguy authored
345 #define IV_IV(iv) ((iv) & 0xFFFFFF)
346 #define IV_PAD(iv) (((iv) >> 24) & 0x3F)
347 #define IV_KEYID(iv) (((iv) >> 30) & 0x03)
Something went wrong with that request. Please try again.