tcpdump: added 4.0.0, minimal support for IEEE802.15.4 capture
authorSergey Lapin <slapin@ossfans.org>
Wed, 28 Jan 2009 13:52:35 +0000 (16:52 +0300)
committerSergey Lapin <slapin@ossfans.org>
Thu, 29 Jan 2009 15:26:08 +0000 (18:26 +0300)
packages/tcpdump/files/0001-minimal-IEEE802.15.4-allowed.patch [new file with mode: 0644]
packages/tcpdump/files/no-ipv6-tcpdump4.patch [new file with mode: 0644]
packages/tcpdump/tcpdump_4.0.0.bb [new file with mode: 0644]

diff --git a/packages/tcpdump/files/0001-minimal-IEEE802.15.4-allowed.patch b/packages/tcpdump/files/0001-minimal-IEEE802.15.4-allowed.patch
new file mode 100644 (file)
index 0000000..f4358b5
--- /dev/null
@@ -0,0 +1,26 @@
+From 9a6a3f37b6715fafb79fd88d2a2db3b49183226e Mon Sep 17 00:00:00 2001
+From: Sergey Lapin <slapin@slind.org>
+Date: Wed, 28 Jan 2009 16:34:15 +0300
+Subject: [PATCH] minimal IEEE802.15.4 allowed
+
+---
+ tcpdump.c |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/tcpdump.c b/tcpdump.c
+index ba8b702..0a88343 100644
+--- a/tcpdump.c
++++ b/tcpdump.c
+@@ -273,6 +273,9 @@ static struct printer printers[] = {
+ #ifdef DLT_MFR
+       { mfr_if_print, DLT_MFR },
+ #endif
++#ifdef DLT_IEEE802_15_4
++      { raw_if_print, DLT_IEEE802_15_4 },
++#endif
+ #if defined(DLT_BLUETOOTH_HCI_H4_WITH_PHDR) && defined(HAVE_PCAP_BLUETOOTH_H)
+       { bt_if_print, DLT_BLUETOOTH_HCI_H4_WITH_PHDR},
+ #endif
+-- 
+1.5.6.2
+
diff --git a/packages/tcpdump/files/no-ipv6-tcpdump4.patch b/packages/tcpdump/files/no-ipv6-tcpdump4.patch
new file mode 100644 (file)
index 0000000..a399d05
--- /dev/null
@@ -0,0 +1,22 @@
+Compiling tcpdump 4.0.0 without ipv6 - linking against ipv6less
+libpcap too - generates the following error:
+
+print-enc.o: In function `enc_if_print':
+print-enc.c:(.text+0xce): undefined reference to `ip6_print'
+collect2: ld returned 1 exit status
+make: *** [tcpdump] Error 1
+
+--- tcpdump/print-enc.c.orig   2008-09-01 04:44:22 +0200
++++ tcpdump/print-enc.c        2008-11-11 14:48:00 +0100
+@@ -77,9 +77,11 @@
+       case AF_INET:
+               ip_print(gndo, p, length);
+               break;
++#ifdef INET6
+       case AF_INET6:
+               ip6_print(p, length);
+               break;
++#endif
+       }
+
+ out:
diff --git a/packages/tcpdump/tcpdump_4.0.0.bb b/packages/tcpdump/tcpdump_4.0.0.bb
new file mode 100644 (file)
index 0000000..537cb36
--- /dev/null
@@ -0,0 +1,25 @@
+DESCRIPTION = "A sophisticated network protocol analyzer"
+HOMEPAGE = "http://www.tcpdump.org/"
+LICENSE = "BSD"
+SECTION = "console/network"
+PRIORITY = "optional"
+DEPENDS = "libpcap"
+PR = "r1"
+
+SRC_URI = "http://www.tcpdump.org/release/tcpdump-${PV}.tar.gz \
+           file://tcpdump_configure_no_-O2.patch;patch=1 \
+           file://no-ipv6-tcpdump4.patch;patch=1 \
+           file://0001-minimal-IEEE802.15.4-allowed.patch;patch=1"
+
+inherit autotools
+# ac_cv_linux_vers=${ac_cv_linux_vers=2}
+
+EXTRA_OECONF = "--without-crypto"
+
+do_configure() {
+       gnu-configize
+    autoconf
+       oe_runconf
+        sed -i 's:/usr/lib:${STAGING_LIBDIR}:' ./Makefile
+        sed -i 's:/usr/include:${STAGING_INCDIR}:' ./Makefile
+}