From 755d08e98c67232a19ee8c15cd378eda246c8f09 Mon Sep 17 00:00:00 2001 From: Sergey Lapin Date: Wed, 28 Jan 2009 16:52:35 +0300 Subject: tcpdump: added 4.0.0, minimal support for IEEE802.15.4 capture --- .../files/0001-minimal-IEEE802.15.4-allowed.patch | 26 ++++++++++++++++++++++ packages/tcpdump/files/no-ipv6-tcpdump4.patch | 22 ++++++++++++++++++ packages/tcpdump/tcpdump_4.0.0.bb | 25 +++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 packages/tcpdump/files/0001-minimal-IEEE802.15.4-allowed.patch create mode 100644 packages/tcpdump/files/no-ipv6-tcpdump4.patch create mode 100644 packages/tcpdump/tcpdump_4.0.0.bb 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 index 0000000000..f4358b5d49 --- /dev/null +++ b/packages/tcpdump/files/0001-minimal-IEEE802.15.4-allowed.patch @@ -0,0 +1,26 @@ +From 9a6a3f37b6715fafb79fd88d2a2db3b49183226e Mon Sep 17 00:00:00 2001 +From: Sergey Lapin +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 index 0000000000..a399d0508f --- /dev/null +++ b/packages/tcpdump/files/no-ipv6-tcpdump4.patch @@ -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 index 0000000000..537cb36aed --- /dev/null +++ b/packages/tcpdump/tcpdump_4.0.0.bb @@ -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 +} -- cgit 1.2.3-korg