From: guy Date: Sat, 31 Jan 2004 01:54:43 +0000 (+0000) Subject: For now, support "link[N:M]" filtering, but nothing else, for X-Git-Tag: libpcap-0.9.1~217 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/34379f5c0e3b74b42107406d2eb1e5ed465091db For now, support "link[N:M]" filtering, but nothing else, for DLT_IEEE802_11_RADIO (rather than supporting nothing, which keeps most capture programs from working at all, as they set an empty filter if no filter was explicitly supplied). --- diff --git a/gencode.c b/gencode.c index a29d9262..c94be34a 100644 --- a/gencode.c +++ b/gencode.c @@ -21,7 +21,7 @@ */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.198 2004-01-29 10:36:43 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.199 2004-01-31 01:54:43 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -882,6 +882,29 @@ init_linktype(type) off_nl_nosnap = 64+27; /* Radio+802.11+802.2 */ return; + case DLT_IEEE802_11_RADIO: + /* + * Same as 802.11, but with an additional header before + * the 802.11 header, containing a bunch of additional + * information including radio-level information. + * + * XXX - same variable-length header problem, only + * even *more* so; this header is also variable-length, + * with the length being the 16-bit number at an offset + * of 2 from the beginning of the radio header, and it's + * device-dependent (different devices might supply + * different amounts of information), so we can't even + * assume a fixed length for the current version of the + * header. + * + * Therefore, currently, only raw "link[N:M]" filtering is + * supported. + */ + off_linktype = -1; + off_nl = -1; + off_nl_nosnap = -1; + return; + case DLT_ATM_RFC1483: case DLT_ATM_CLIP: /* Linux ATM defines this */ /*