diff options
author | Sam Leffler <sam@FreeBSD.org> | 2003-09-15 19:36:34 +0000 |
---|---|---|
committer | Sam Leffler <sam@FreeBSD.org> | 2003-09-15 19:36:34 +0000 |
commit | 993338b6abb9126fe92ca397998c128b70a7e068 (patch) | |
tree | 5ff8e6a394358211b7d6812fcfc12291e00f26c9 /sys/net80211/ieee80211.h | |
parent | 516b220f3e556ad459b32ff7798efdd94cdc3a83 (diff) | |
download | src-993338b6abb9126fe92ca397998c128b70a7e068.tar.gz src-993338b6abb9126fe92ca397998c128b70a7e068.zip |
add definitions for various control frames and a minimum-sized frame that
we use to define IEEE80211_MIN_LEN; the minimal length for frames drivers
may pass up into the 802.11 layer
Notes
Notes:
svn path=/head/; revision=120098
Diffstat (limited to 'sys/net80211/ieee80211.h')
-rw-r--r-- | sys/net80211/ieee80211.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211.h b/sys/net80211/ieee80211.h index d917210f737b..7ad623119966 100644 --- a/sys/net80211/ieee80211.h +++ b/sys/net80211/ieee80211.h @@ -136,6 +136,55 @@ struct ieee80211_frame_addr4 { #define IEEE80211_NWID_LEN 32 /* + * Control frames. + */ +struct ieee80211_frame_min { + u_int8_t i_fc[2]; + u_int8_t i_dur[2]; + u_int8_t i_addr1[IEEE80211_ADDR_LEN]; + u_int8_t i_addr2[IEEE80211_ADDR_LEN]; + /* FCS */ +} __attribute__((__packed__)); + +struct ieee80211_frame_rts { + u_int8_t i_fc[2]; + u_int8_t i_dur[2]; + u_int8_t i_ra[IEEE80211_ADDR_LEN]; + u_int8_t i_ta[IEEE80211_ADDR_LEN]; + /* FCS */ +} __attribute__((__packed__)); + +struct ieee80211_frame_cts { + u_int8_t i_fc[2]; + u_int8_t i_dur[2]; + u_int8_t i_ra[IEEE80211_ADDR_LEN]; + /* FCS */ +} __attribute__((__packed__)); + +struct ieee80211_frame_ack { + u_int8_t i_fc[2]; + u_int8_t i_dur[2]; + u_int8_t i_ra[IEEE80211_ADDR_LEN]; + /* FCS */ +} __attribute__((__packed__)); + +struct ieee80211_frame_pspoll { + u_int8_t i_fc[2]; + u_int8_t i_aid[2]; + u_int8_t i_bssid[IEEE80211_ADDR_LEN]; + u_int8_t i_ta[IEEE80211_ADDR_LEN]; + /* FCS */ +} __attribute__((__packed__)); + +struct ieee80211_frame_cfend { /* NB: also CF-End+CF-Ack */ + u_int8_t i_fc[2]; + u_int8_t i_dur[2]; /* should be zero */ + u_int8_t i_ra[IEEE80211_ADDR_LEN]; + u_int8_t i_bssid[IEEE80211_ADDR_LEN]; + /* FCS */ +} __attribute__((__packed__)); + +/* * BEACON management packets * * octet timestamp[8] @@ -314,6 +363,8 @@ enum { #define IEEE80211_MTU 1500 #define IEEE80211_MAX_LEN (2300 + IEEE80211_CRC_LEN + \ (IEEE80211_WEP_IVLEN + IEEE80211_WEP_KIDLEN + IEEE80211_WEP_CRCLEN)) +#define IEEE80211_MIN_LEN \ + (sizeof(struct ieee80211_frame_min) + IEEE80211_CRC_LEN) /* * RTS frame length parameters. The default is specified in |