diff options
author | sam <sam@FreeBSD.org> | 2007-03-11 07:42:02 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2007-03-11 07:42:02 +0000 |
commit | afe366517c771fa26c744b4a329fa17f54f9ab20 (patch) | |
tree | 5abe5760b2fc4ec9d082467dc347ad0aca44b04e /sys/net80211/ieee80211_radiotap.h | |
parent | 63f1cc9c738cf124815b9f2b3c983f6c212a9715 (diff) | |
download | FreeBSD-src-afe366517c771fa26c744b4a329fa17f54f9ab20.zip FreeBSD-src-afe366517c771fa26c744b4a329fa17f54f9ab20.tar.gz |
Update to reflect correct usage:
o leave IEEE80211_RADIOTAP_HDRLEN for portability to other systems but
correct comment about radiotap headers being padded to 64-bytes
(hasn't been true for many years)
o remove reference to IEEE80211_RADIOTAP_FCS; it was never used, instead
the flags are marked with IEEE80211_RADIOTAP_F_FCS to indicate whether
or not FCS is present
Might be better to just remove IEEE80211_RADIOTAP_HDRLEN so drivers
don't bogusly pad.
MFC after: 2 weeks
Diffstat (limited to 'sys/net80211/ieee80211_radiotap.h')
-rw-r--r-- | sys/net80211/ieee80211_radiotap.h | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/sys/net80211/ieee80211_radiotap.h b/sys/net80211/ieee80211_radiotap.h index c474e32..fea0bbe 100644 --- a/sys/net80211/ieee80211_radiotap.h +++ b/sys/net80211/ieee80211_radiotap.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $NetBSD: ieee80211_radiotap.h,v 1.10 2005/01/04 00:34:58 dyoung Exp $ */ +/* $NetBSD: ieee80211_radiotap.h,v 1.16 2007/01/06 05:51:15 dyoung Exp $ */ /*- * Copyright (c) 2003, 2004 David Young. All rights reserved. @@ -29,14 +29,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. */ -#ifndef _NET_IF_IEEE80211RADIOTAP_H_ -#define _NET_IF_IEEE80211RADIOTAP_H_ +#ifndef _NET80211_IEEE80211_RADIOTAP_H_ +#define _NET80211_IEEE80211_RADIOTAP_H_ -/* A generic radio capture format is desirable. There is one for - * Linux, but it is neither rigidly defined (there were not even - * units given for some fields) nor easily extensible. +/* A generic radio capture format is desirable. It must be + * rigidly defined (e.g., units for fields should be given), + * and easily extensible. * - * I suggest the following extensible radio capture format. It is + * The following is an extensible radio capture format. It is * based on a bitmap indicating which fields are present. * * I am trying to describe precisely what the application programmer @@ -52,12 +52,13 @@ #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 +#define IEEE80211_RADIOTAP_HDRLEN 64 /* XXX deprecated */ -/* The radio capture header precedes the 802.11 header. */ +/* + * The radio capture header precedes the 802.11 header. + * + * Note well: all radiotap fields are little-endian. + */ struct ieee80211_radiotap_header { u_int8_t it_version; /* Version 0. Only increases * for drastic changes, @@ -79,7 +80,8 @@ struct ieee80211_radiotap_header { */ } __attribute__((__packed__)); -/* Name Data type Units +/* + * Name Data type Units * ---- --------- ----- * * IEEE80211_RADIOTAP_TSFT u_int64_t microseconds @@ -158,10 +160,6 @@ struct ieee80211_radiotap_header { * * Unitless indication of the Rx/Tx antenna for this packet. * The first antenna is antenna 0. - * - * IEEE80211_RADIOTAP_FCS u_int32_t data - * - * FCS from frame in network byte order. */ enum ieee80211_radiotap_type { IEEE80211_RADIOTAP_TSFT = 0, @@ -214,4 +212,4 @@ enum ieee80211_radiotap_type { */ #define IEEE80211_RADIOTAP_F_BADFCS 0x40 /* does not pass FCS check */ -#endif /* _NET_IF_IEEE80211RADIOTAP_H_ */ +#endif /* !_NET80211_IEEE80211_RADIOTAP_H_ */ |