Project : madwifi
Revision : 2237
Author : proski (Pavel Roskin)
Date : 2007-03-28 16:36:38 +0200 (Wed, 28 Mar 2007)
Log Message :
Update ieee80211_radiotap.h to the version from trunk
Affected Files:
* branches/madwifi-old-openhal/net80211/ieee80211_radiotap.h updated
Modified: branches/madwifi-old-openhal/net80211/ieee80211_radiotap.h
===================================================================
--- branches/madwifi-old-openhal/net80211/ieee80211_radiotap.h 2007-03-28
14:26:41 UTC (rev 2236)
+++ branches/madwifi-old-openhal/net80211/ieee80211_radiotap.h 2007-03-28
14:36:38 UTC (rev 2237)
@@ -1,5 +1,5 @@
/* $FreeBSD: src/sys/net80211/ieee80211_radiotap.h,v 1.5 2005/01/22 20:12:05
sam Exp $ */
-/* $NetBSD: ieee80211_radiotap.h,v 1.10 2005/01/04 00:34:58 dyoung Exp $ */
+/* $NetBSD: ieee80211_radiotap.h,v 1.17 2007/03/26 04:32:14 dyoung Exp $ */
/*-
* Copyright (c) 2003, 2004 David Young. All rights reserved.
@@ -28,6 +28,8 @@
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
* OF SUCH DAMAGE.
+ *
+ * $Id$
*/
#ifndef _NET_IF_IEEE80211RADIOTAP_H_
#define _NET_IF_IEEE80211RADIOTAP_H_
@@ -52,25 +54,20 @@
#endif
#endif /* defined(__KERNEL__) || defined(_KERNEL) */
-/* XXX tcpdump/libpcap do not tolerate variable-length headers,
- * yet, so we pad every radiotap header to 64 bytes. Ugh.
- */
-#define IEEE80211_RADIOTAP_HDRLEN 64
-
/* The radio capture header precedes the 802.11 header. */
struct ieee80211_radiotap_header {
- u_int8_t it_version; /* Version 0. Only increases
+ u_int8_t it_version; /* Version 0. Only increases
* for drastic changes,
* introduction of compatible
* new fields does not count.
*/
- u_int8_t it_pad;
- u_int16_t it_len; /* length of the whole
+ u_int8_t it_pad;
+ __le16 it_len; /* length of the whole
* header in bytes, including
* it_version, it_pad,
* it_len, and data fields.
*/
- u_int32_t it_present; /* A bitmap telling which
+ __le32 it_present; /* A bitmap telling which
* fields are present. Set bit 31
* (0x80000000) to extend the
* bitmap by another 32 bits.
@@ -123,7 +120,7 @@
* RF noise power at the antenna, decibel difference from an
* arbitrary, fixed reference point.
*
- * IEEE80211_RADIOTAP_LOCK_QUALITY u_int16_t unitless
+ * IEEE80211_RADIOTAP_BARKER_CODE_LOCK u_int16_t unitless
*
* Quality of Barker code lock. Unitless. Monotonically
* nondecreasing with "better" lock strength. Called "Signal
@@ -161,20 +158,19 @@
*
* IEEE80211_RADIOTAP_RX_FLAGS u_int16_t bitmap
*
- * Properties of received frames. See flags defined below.
+ * Properties of received frames. See flags defined below.
*
* IEEE80211_RADIOTAP_TX_FLAGS u_int16_t bitmap
*
- * Properties of transmitted frames. See flags defined below.
+ * Properties of transmitted frames. See flags defined below.
*
* IEEE80211_RADIOTAP_RTS_RETRIES u_int8_t data
*
- * Number of rts retries a transmitted frame used.
- *
+ * Number of rts retries a transmitted frame used.
+ *
* IEEE80211_RADIOTAP_DATA_RETRIES u_int8_t data
*
- * Number of unicast retries a transmitted frame used.
- *
+ * Number of unicast retries a transmitted frame used.
*/
enum ieee80211_radiotap_type {
IEEE80211_RADIOTAP_TSFT = 0,
@@ -195,21 +191,34 @@
IEEE80211_RADIOTAP_TX_FLAGS = 15,
IEEE80211_RADIOTAP_RTS_RETRIES = 16,
IEEE80211_RADIOTAP_DATA_RETRIES = 17,
- IEEE80211_RADIOTAP_EXT = 31
+ IEEE80211_RADIOTAP_EXT = 31,
};
-#if !defined(__KERNEL__) && !defined(_KERNEL)
+#ifndef _KERNEL
/* Channel flags. */
#define IEEE80211_CHAN_TURBO 0x0010 /* Turbo channel */
#define IEEE80211_CHAN_CCK 0x0020 /* CCK channel */
#define IEEE80211_CHAN_OFDM 0x0040 /* OFDM channel */
-#define IEEE80211_CHAN_2GHZ 0x0080 /* 2 GHz spectrum channel. */
+#define IEEE80211_CHAN_2GHZ 0x0080 /* 2 GHz spectrum channel. */
#define IEEE80211_CHAN_5GHZ 0x0100 /* 5 GHz spectrum channel */
#define IEEE80211_CHAN_PASSIVE 0x0200 /* Only passive scan allowed */
#define IEEE80211_CHAN_DYN 0x0400 /* Dynamic CCK-OFDM channel */
#define IEEE80211_CHAN_GFSK 0x0800 /* GFSK channel (FHSS PHY) */
-#endif /* !defined(__KERNEL__) && !defined(_KERNEL) */
+/* Useful combinations of channel characteristics, borrowed from Ethereal */
+#define IEEE80211_CHAN_A \
+ (IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM)
+#define IEEE80211_CHAN_B \
+ (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_CCK)
+#define IEEE80211_CHAN_G \
+ (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_DYN)
+#define IEEE80211_CHAN_TA \
+ (IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM | IEEE80211_CHAN_TURBO)
+#define IEEE80211_CHAN_TG \
+ (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_DYN | IEEE80211_CHAN_TURBO)
+
+#endif /* !_KERNEL */
+
/* For IEEE80211_RADIOTAP_FLAGS */
#define IEEE80211_RADIOTAP_F_CFP 0x01 /* sent/received
* during CFP
@@ -229,11 +238,21 @@
* 802.11 header and payload
* (to 32-bit boundary)
*/
+#define IEEE80211_RADIOTAP_F_BADFCS 0x40 /* does not pass FCS
check */
+
/* For IEEE80211_RADIOTAP_RX_FLAGS */
-#define IEEE80211_RADIOTAP_F_RX_BADFCS 0x0001 /* frame failed crc
check */
+#define IEEE80211_RADIOTAP_F_RX_BADFCS 0x0001 /* Frame failed CRC check.
+ *
+ * Deprecated: use the flag
+ * IEEE80211_RADIOTAP_F_FCS in
+ * the IEEE80211_RADIOTAP_FLAGS
+ * field, instead.
+ */
/* For IEEE80211_RADIOTAP_TX_FLAGS */
-#define IEEE80211_RADIOTAP_F_TX_FAIL 0x0001 /* failed due to
excessive
- * retries */
-
+#define IEEE80211_RADIOTAP_F_TX_FAIL 0x0001 /* failed due to excessive
+ * retries
+ */
+#define IEEE80211_RADIOTAP_F_TX_CTS 0x0002 /* used cts 'protection' */
+#define IEEE80211_RADIOTAP_F_TX_RTS 0x0004 /* used rts/cts handshake */
#endif /* _NET_IF_IEEE80211RADIOTAP_H_ */
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
|