summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/tcpreplay
diff options
context:
space:
mode:
authorZongchun Yu <Zongchun.Yu@freescale.com>2013-11-26 10:51:54 +0800
committerJoe MacDonald <joe@deserted.net>2013-11-28 10:35:00 -0500
commit0501fa0f0bf3c9495c337dccf332b39f791ddbb1 (patch)
treeab5cf66054ee796d2eb5157da85dad2f60f1e9bf /meta-networking/recipes-support/tcpreplay
parentd62fe9254a116ae5b908889b61fa83e2a9702e3b (diff)
downloadmeta-openembedded-0501fa0f0bf3c9495c337dccf332b39f791ddbb1.tar.gz
tcpreplay: add recipe
tcpreplay - a suite of GPLv3 licensed tools for UNIX operating systems which gives you the ability to use previously captured traffic in libpcap format to test a variety of network devices. Signed-off-by: Zongchun Yu <Zongchun.Yu@freescale.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
Diffstat (limited to 'meta-networking/recipes-support/tcpreplay')
-rwxr-xr-xmeta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-cross-compile.patch92
-rw-r--r--meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-fix-unable-to-link-libpcap-issue.patch17
-rw-r--r--meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-no-bfp-support.patch15
-rw-r--r--meta-networking/recipes-support/tcpreplay/tcpreplay_3.4.4.bb22
4 files changed, 146 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-cross-compile.patch b/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-cross-compile.patch
new file mode 100755
index 000000000..a856b1809
--- /dev/null
+++ b/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-cross-compile.patch
@@ -0,0 +1,92 @@
1Uptream-Status: Pending
2
3Signed-off-by: Zongchun Yu <Zongchun.Yu@freescale.com>
4
5--- a/configure.ac
6+++ b/configure.ac
7@@ -402,7 +402,6 @@
8
9 dnl 0.9.6 (which is still thinks it is 0.9.5 due to a bug) introduces an important
10 dnl fix for OSX. See: http://tcpreplay.synfin.net/trac/ticket/167
11-libpcap_version_096=no
12 AC_RUN_IFELSE(AC_LANG_PROGRAM([[
13 #include <string.h>
14 #include <stdlib.h>
15@@ -419,11 +418,12 @@
16 exit(0);
17
18 exit(1);
19-]]), [
20- libpcap_version_096=yes
21-])
22+]]),
23+ [libpcap_version_096=yes],
24+ [libpcap_version_096=no],
25+ [libpcap_version_096=yes]
26+)
27
28-libpcap_ver8=no
29 AC_RUN_IFELSE(AC_LANG_PROGRAM([[
30 #include <string.h>
31 #include <stdlib.h>
32@@ -444,13 +444,12 @@
33 exit(0);
34
35 exit(1);
36-]]), [
37- libpcap_ver8=yes
38-], [
39- libpcap_ver8=no
40-])
41+]]),
42+ [libpcap_ver8=yes],
43+ [libpcap_ver8=no],
44+ [libpcap_ver8=yes]
45+)
46
47-libpcap_ver7=no
48 AC_RUN_IFELSE(AC_LANG_PROGRAM([[
49 #include <string.h>
50 #include <stdlib.h>
51@@ -469,11 +468,11 @@
52 exit(0);
53
54 exit(1);
55-]]), [
56- libpcap_ver7=yes
57-], [
58- libpcap_ver7=no
59-])
60+]]),
61+ [libpcap_ver7=yes],
62+ [libpcap_ver7=no],
63+ [libpcap_ver7=yes]
64+)
65
66 if test x$libpcap_ver8 = xyes ; then
67 AC_MSG_RESULT(>= 0.8.0)
68@@ -761,8 +760,8 @@
69
70 have_bpf=no
71 dnl Check for BSD's BPF
72-AC_MSG_CHECKING(for BPF device sending support)
73-AC_TRY_RUN([
74+AC_CACHE_CHECK([for BPF device sending support], ac_cv_have_bpf,
75+[AC_TRY_RUN([
76 #include <stdio.h>
77 #include <stdlib.h>
78 #include <sys/types.h>
79@@ -796,8 +795,11 @@
80 [Do we have BPF device support?])
81 AC_MSG_RESULT(yes)
82 have_bpf=yes
83-],[
84- AC_MSG_RESULT(no)
85+],
86+[AC_MSG_RESULT(no)],
87+[AC_MSG_ERROR([cross-compiling,
88+ presetting ac_cv_have_bpf=(yes|no) will help])]
89+)
90 ])
91
92
diff --git a/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-fix-unable-to-link-libpcap-issue.patch b/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-fix-unable-to-link-libpcap-issue.patch
new file mode 100644
index 000000000..5f36c68c9
--- /dev/null
+++ b/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-fix-unable-to-link-libpcap-issue.patch
@@ -0,0 +1,17 @@
1Uptream-Status: Pending
2
3Signed-off-by: Zongchun Yu <Zongchun.Yu@freescale.com>
4
5Index: tcpreplay-3.4.4/configure.ac
6===================================================================
7--- tcpreplay-3.4.4.orig/configure.ac
8+++ tcpreplay-3.4.4/configure.ac
9@@ -389,7 +389,7 @@ CFLAGS="$CFLAGS -I$LPCAPINCDIR"
10 AC_SEARCH_LIBS([pcap_close], [pcap],
11 LPCAPLIB="$LIBS",
12 AC_ERROR([Unable to link libpcap in ${foundpcap}]),
13- -lnl)
14+ -lnl-3)
15
16 AC_SUBST(LPCAPINC)
17 AC_SUBST(LPCAPLIB)
diff --git a/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-no-bfp-support.patch b/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-no-bfp-support.patch
new file mode 100644
index 000000000..3c11c922b
--- /dev/null
+++ b/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-no-bfp-support.patch
@@ -0,0 +1,15 @@
1Uptream-Status: Pending
2
3Signed-off-by: Zongchun Yu <Zongchun.Yu@freescale.com>
4
5--- a/configure.ac
6+++ b/configure.ac
7@@ -758,6 +758,8 @@
8 AC_MSG_RESULT(no)
9 ])
10
11+ac_cv_have_bpf=no
12+
13 have_bpf=no
14 dnl Check for BSD's BPF
15 AC_CACHE_CHECK([for BPF device sending support], ac_cv_have_bpf,
diff --git a/meta-networking/recipes-support/tcpreplay/tcpreplay_3.4.4.bb b/meta-networking/recipes-support/tcpreplay/tcpreplay_3.4.4.bb
new file mode 100644
index 000000000..d21188882
--- /dev/null
+++ b/meta-networking/recipes-support/tcpreplay/tcpreplay_3.4.4.bb
@@ -0,0 +1,22 @@
1SUMMARY = "Use previously captured traffic to test network devices"
2
3HOMEPAGE = "http://tcpreplay.synfin.net/"
4SECTION = "console/network"
5
6LICENSE = "GPLv3"
7LIC_FILES_CHKSUM = "file://docs/LICENSE;md5=c33cccf72cc1603e8a72a84811ae3ac8"
8
9SRC_URI = "http://prdownloads.sourceforge.net/tcpreplay/${PV}/tcpreplay-${PV}.tar.gz \
10 file://tcpreplay-3.4.4-cross-compile.patch \
11 file://tcpreplay-3.4.4-no-bfp-support.patch \
12 file://tcpreplay-3.4.4-fix-unable-to-link-libpcap-issue.patch \
13 "
14SRC_URI[md5sum] = "22725feb9b2590809f9350308ec65180"
15SRC_URI[sha256sum] = "7a809c58ddec86407fd6e5597ac883d7874a19bea81d716bb2b1c6e3b0e7b58f"
16
17DEPENDS = "libpcap"
18
19EXTRA_OECONF += "--with-libpcap=${STAGING_DIR_HOST}/usr"
20
21inherit siteinfo autotools
22