summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguy <guy>2002-02-05 05:48:29 +0000
committerguy <guy>2002-02-05 05:48:29 +0000
commitbb791a9c07a150e9e4a5a9db9ebaa4edc4164918 (patch)
tree8026a95546f7396261fbc437ae05946d1ede2ad8
parentfa3c36e7bf9b3fd566e6bf1f2b9c55d4a6c60c00 (diff)
downloadlibpcap-bb791a9c07a150e9e4a5a9db9ebaa4edc4164918.tar.gz
From Solomon Peachy <pizza@shaftnet.org>: Linux 2.4.18pre4 defines
ARPHRD_IEEE80211_PRISM, for sniffing on Prism II-based 802.11 interfaces and getting the special Prism header, so we should map it to DLT_PRISM_HEADER.
-rw-r--r--CREDITS1
-rw-r--r--pcap-linux.c9
2 files changed, 9 insertions, 1 deletions
diff --git a/CREDITS b/CREDITS
index 3c39e5b4..a604760a 100644
--- a/CREDITS
+++ b/CREDITS
@@ -44,6 +44,7 @@ Additional people who have contributed patches:
Rick Jones <raj@cup.hp.com>
Scott Barron <sb125499@ohiou.edu>
Scott Gifford <sgifford@tir.com>
+ Solomon Peachy <pizza@shaftnet.org>
Stefan Hudson <hudson@mbay.net>
Tony Li <tli@jnx.com>
Uns Lider <unslider@miranda.org>
diff --git a/pcap-linux.c b/pcap-linux.c
index a57d8551..1091d3c6 100644
--- a/pcap-linux.c
+++ b/pcap-linux.c
@@ -26,7 +26,7 @@
*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.73.2.1 2002-02-03 23:04:48 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.73.2.2 2002-02-05 05:48:29 guy Exp $ (LBL)";
#endif
/*
@@ -961,6 +961,13 @@ static void map_arphrd_to_dlt(pcap_t *handle, int arptype)
handle->linktype = DLT_IEEE802_11;
break;
+#ifndef ARPHRD_IEEE80211_PRISM /* From Linux 2.4.18 */
+#define ARPHRD_IEEE80211_PRISM 802
+#endif
+ case ARPHRD_IEEE80211_PRISM:
+ handle->linktype = DLT_PRISM_HEADER;
+ break;
+
case ARPHRD_PPP:
/*
* Some PPP code in the kernel supplies no link-layer