summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2003-09-15 19:36:34 +0000
committersam <sam@FreeBSD.org>2003-09-15 19:36:34 +0000
commit36064095128b1d6040da3311a636da14b6ea2158 (patch)
tree5ff8e6a394358211b7d6812fcfc12291e00f26c9
parent958e5bbfa22c480d5e3e0844684a06f425a18771 (diff)
downloadFreeBSD-src-36064095128b1d6040da3311a636da14b6ea2158.zip
FreeBSD-src-36064095128b1d6040da3311a636da14b6ea2158.tar.gz
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
-rw-r--r--sys/net80211/ieee80211.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211.h b/sys/net80211/ieee80211.h
index d917210..7ad6231 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
OpenPOWER on IntegriCloud