commit 750825ffa859ef12d05e404b2d896594da580a0c
parent a0a50afd5a9bef5d711d7fcb04155e0d99ded3cd
Author: Jordan Ritter <jpr5@darkridge.com>
Date: Sun, 10 Aug 2003 01:17:22 +0000
added in interface type 105 (DLT_IEEE802_11) support (I *think* I got it
right..)
Diffstat:
3 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/configure.in b/configure.in
@@ -152,6 +152,18 @@ AC_DEFINE(HAVE_LOOP)
echo yes,
echo no)
+AC_MSG_CHECKING(for DLT_IEEE802_11 in bpf.h)
+AC_EGREP_HEADER(yes,
+[
+#include <net/bpf.h>
+#ifdef DLT_IEEE802_11
+yes
+#endif
+],
+AC_DEFINE(HAVE_802_11)
+echo yes,
+echo no)
+
dnl
dnl OS-specific options
diff --git a/ngrep.c b/ngrep.c
@@ -408,6 +408,12 @@ int main(int argc, char **argv) {
break;
#endif
+#ifdef HAVE_802_11
+ case DLT_IEEE802_11:
+ link_offset = IEEE80211HDR_SIZE;
+ break;
+#endif
+
default:
fprintf(stderr, "fatal: unsupported interface type %d\n", pcap_datalink(pd));
clean_exit(-1);
diff --git a/ngrep.h b/ngrep.h
@@ -18,6 +18,7 @@
#define LOOPHDR_SIZE 4
#define FDDIHDR_SIZE 21
#define ISDNHDR_SIZE 16
+#define IEEE80211HDR_SIZE 24
#ifndef IP_OFFMASK
#define IP_OFFMASK 0x1fff