Deleted Added
full compact
ieee80211.h (116904) ieee80211.h (120098)
1/*-
2 * Copyright (c) 2001 Atsushi Onoe
3 * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 15 unchanged lines hidden (view full) ---

24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
1/*-
2 * Copyright (c) 2001 Atsushi Onoe
3 * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 15 unchanged lines hidden (view full) ---

24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 * $FreeBSD: head/sys/net80211/ieee80211.h 116904 2003-06-27 05:13:52Z sam $
32 * $FreeBSD: head/sys/net80211/ieee80211.h 120098 2003-09-15 19:36:34Z sam $
33 */
34#ifndef _NET80211_IEEE80211_H_
35#define _NET80211_IEEE80211_H_
36
37/*
38 * 802.11 protocol definitions.
39 */
40

--- 90 unchanged lines hidden (view full) ---

131#define IEEE80211_SEQ_FRAG_MASK 0x000f
132#define IEEE80211_SEQ_FRAG_SHIFT 0
133#define IEEE80211_SEQ_SEQ_MASK 0xfff0
134#define IEEE80211_SEQ_SEQ_SHIFT 4
135
136#define IEEE80211_NWID_LEN 32
137
138/*
33 */
34#ifndef _NET80211_IEEE80211_H_
35#define _NET80211_IEEE80211_H_
36
37/*
38 * 802.11 protocol definitions.
39 */
40

--- 90 unchanged lines hidden (view full) ---

131#define IEEE80211_SEQ_FRAG_MASK 0x000f
132#define IEEE80211_SEQ_FRAG_SHIFT 0
133#define IEEE80211_SEQ_SEQ_MASK 0xfff0
134#define IEEE80211_SEQ_SEQ_SHIFT 4
135
136#define IEEE80211_NWID_LEN 32
137
138/*
139 * Control frames.
140 */
141struct ieee80211_frame_min {
142 u_int8_t i_fc[2];
143 u_int8_t i_dur[2];
144 u_int8_t i_addr1[IEEE80211_ADDR_LEN];
145 u_int8_t i_addr2[IEEE80211_ADDR_LEN];
146 /* FCS */
147} __attribute__((__packed__));
148
149struct ieee80211_frame_rts {
150 u_int8_t i_fc[2];
151 u_int8_t i_dur[2];
152 u_int8_t i_ra[IEEE80211_ADDR_LEN];
153 u_int8_t i_ta[IEEE80211_ADDR_LEN];
154 /* FCS */
155} __attribute__((__packed__));
156
157struct ieee80211_frame_cts {
158 u_int8_t i_fc[2];
159 u_int8_t i_dur[2];
160 u_int8_t i_ra[IEEE80211_ADDR_LEN];
161 /* FCS */
162} __attribute__((__packed__));
163
164struct ieee80211_frame_ack {
165 u_int8_t i_fc[2];
166 u_int8_t i_dur[2];
167 u_int8_t i_ra[IEEE80211_ADDR_LEN];
168 /* FCS */
169} __attribute__((__packed__));
170
171struct ieee80211_frame_pspoll {
172 u_int8_t i_fc[2];
173 u_int8_t i_aid[2];
174 u_int8_t i_bssid[IEEE80211_ADDR_LEN];
175 u_int8_t i_ta[IEEE80211_ADDR_LEN];
176 /* FCS */
177} __attribute__((__packed__));
178
179struct ieee80211_frame_cfend { /* NB: also CF-End+CF-Ack */
180 u_int8_t i_fc[2];
181 u_int8_t i_dur[2]; /* should be zero */
182 u_int8_t i_ra[IEEE80211_ADDR_LEN];
183 u_int8_t i_bssid[IEEE80211_ADDR_LEN];
184 /* FCS */
185} __attribute__((__packed__));
186
187/*
139 * BEACON management packets
140 *
141 * octet timestamp[8]
142 * octet beacon interval[2]
143 * octet capability information[2]
144 * information element
145 * octet elemid
146 * octet length

--- 162 unchanged lines hidden (view full) ---

309#define IEEE80211_WEP_CRCLEN 4 /* CRC-32 */
310#define IEEE80211_WEP_NKID 4 /* number of key ids */
311
312#define IEEE80211_CRC_LEN 4
313
314#define IEEE80211_MTU 1500
315#define IEEE80211_MAX_LEN (2300 + IEEE80211_CRC_LEN + \
316 (IEEE80211_WEP_IVLEN + IEEE80211_WEP_KIDLEN + IEEE80211_WEP_CRCLEN))
188 * BEACON management packets
189 *
190 * octet timestamp[8]
191 * octet beacon interval[2]
192 * octet capability information[2]
193 * information element
194 * octet elemid
195 * octet length

--- 162 unchanged lines hidden (view full) ---

358#define IEEE80211_WEP_CRCLEN 4 /* CRC-32 */
359#define IEEE80211_WEP_NKID 4 /* number of key ids */
360
361#define IEEE80211_CRC_LEN 4
362
363#define IEEE80211_MTU 1500
364#define IEEE80211_MAX_LEN (2300 + IEEE80211_CRC_LEN + \
365 (IEEE80211_WEP_IVLEN + IEEE80211_WEP_KIDLEN + IEEE80211_WEP_CRCLEN))
366#define IEEE80211_MIN_LEN \
367 (sizeof(struct ieee80211_frame_min) + IEEE80211_CRC_LEN)
317
318/*
319 * RTS frame length parameters. The default is specified in
320 * the 802.11 spec. The max may be wrong for jumbo frames.
321 */
322#define IEEE80211_RTS_DEFAULT 512
323#define IEEE80211_RTS_MIN 1
324#define IEEE80211_RTS_MAX IEEE80211_MAX_LEN
325
326enum {
327 IEEE80211_AUTH_NONE = 0,
328 IEEE80211_AUTH_OPEN = 1,
329 IEEE80211_AUTH_SHARED = 2,
330};
331
332#endif /* _NET80211_IEEE80211_H_ */
368
369/*
370 * RTS frame length parameters. The default is specified in
371 * the 802.11 spec. The max may be wrong for jumbo frames.
372 */
373#define IEEE80211_RTS_DEFAULT 512
374#define IEEE80211_RTS_MIN 1
375#define IEEE80211_RTS_MAX IEEE80211_MAX_LEN
376
377enum {
378 IEEE80211_AUTH_NONE = 0,
379 IEEE80211_AUTH_OPEN = 1,
380 IEEE80211_AUTH_SHARED = 2,
381};
382
383#endif /* _NET80211_IEEE80211_H_ */