From: Zongchun Yu <zongchun...@freescale.com> *tcpreplay - a suite of BSD 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...@freescale.com> --- .../files/tcpreplay-3.4.4-cross-compile.patch | 90 ++++++++++++++++++++ .../files/tcpreplay-3.4.4-no-bfp-support.patch | 13 +++ .../recipes-support/tcpreplay/tcpreplay_3.4.4.bb | 23 +++++ 3 files changed, 126 insertions(+) create mode 100755 meta-oe/recipes-support/tcpreplay/files/tcpreplay-3.4.4-cross-compile.patch create mode 100644 meta-oe/recipes-support/tcpreplay/files/tcpreplay-3.4.4-no-bfp-support.patch create mode 100644 meta-oe/recipes-support/tcpreplay/tcpreplay_3.4.4.bb diff --git a/meta-oe/recipes-support/tcpreplay/files/tcpreplay-3.4.4-cross-compile.patch b/meta-oe/recipes-support/tcpreplay/files/tcpreplay-3.4.4-cross-compile.patch new file mode 100755 index 0000000..226f97a --- /dev/null +++ b/meta-oe/recipes-support/tcpreplay/files/tcpreplay-3.4.4-cross-compile.patch @@ -0,0 +1,90 @@ +Uptream-Status: Inappropriate [embedded specific] + +--- a/configure.ac ++++ b/configure.ac +@@ -402,7 +402,6 @@ + + dnl 0.9.6 (which is still thinks it is 0.9.5 due to a bug) introduces an important + dnl fix for OSX. See: http://tcpreplay.synfin.net/trac/ticket/167 +-libpcap_version_096=no + AC_RUN_IFELSE(AC_LANG_PROGRAM([[ + #include <string.h> + #include <stdlib.h> +@@ -419,11 +418,12 @@ + exit(0); + + exit(1); +-]]), [ +- libpcap_version_096=yes +-]) ++]]), ++ [libpcap_version_096=yes], ++ [libpcap_version_096=no], ++ [libpcap_version_096=yes] ++) + +-libpcap_ver8=no + AC_RUN_IFELSE(AC_LANG_PROGRAM([[ + #include <string.h> + #include <stdlib.h> +@@ -444,13 +444,12 @@ + exit(0); + + exit(1); +-]]), [ +- libpcap_ver8=yes +-], [ +- libpcap_ver8=no +-]) ++]]), ++ [libpcap_ver8=yes], ++ [libpcap_ver8=no], ++ [libpcap_ver8=yes] ++) + +-libpcap_ver7=no + AC_RUN_IFELSE(AC_LANG_PROGRAM([[ + #include <string.h> + #include <stdlib.h> +@@ -469,11 +468,11 @@ + exit(0); + + exit(1); +-]]), [ +- libpcap_ver7=yes +-], [ +- libpcap_ver7=no +-]) ++]]), ++ [libpcap_ver7=yes], ++ [libpcap_ver7=no], ++ [libpcap_ver7=yes] ++) + + if test x$libpcap_ver8 = xyes ; then + AC_MSG_RESULT(>= 0.8.0) +@@ -761,8 +760,8 @@ + + have_bpf=no + dnl Check for BSD's BPF +-AC_MSG_CHECKING(for BPF device sending support) +-AC_TRY_RUN([ ++AC_CACHE_CHECK([for BPF device sending support], ac_cv_have_bpf, ++[AC_TRY_RUN([ + #include <stdio.h> + #include <stdlib.h> + #include <sys/types.h> +@@ -796,8 +795,11 @@ + [Do we have BPF device support?]) + AC_MSG_RESULT(yes) + have_bpf=yes +-],[ +- AC_MSG_RESULT(no) ++], ++[AC_MSG_RESULT(no)], ++[AC_MSG_ERROR([cross-compiling, ++ presetting ac_cv_have_bpf=(yes|no) will help])] ++) + ]) + + diff --git a/meta-oe/recipes-support/tcpreplay/files/tcpreplay-3.4.4-no-bfp-support.patch b/meta-oe/recipes-support/tcpreplay/files/tcpreplay-3.4.4-no-bfp-support.patch new file mode 100644 index 0000000..70fa959 --- /dev/null +++ b/meta-oe/recipes-support/tcpreplay/files/tcpreplay-3.4.4-no-bfp-support.patch @@ -0,0 +1,13 @@ +Uptream-Status: Inappropriate [embedded specific] + +--- a/configure.ac ++++ b/configure.ac +@@ -758,6 +758,8 @@ + AC_MSG_RESULT(no) + ]) + ++ac_cv_have_bpf=no ++ + have_bpf=no + dnl Check for BSD's BPF + AC_CACHE_CHECK([for BPF device sending support], ac_cv_have_bpf, diff --git a/meta-oe/recipes-support/tcpreplay/tcpreplay_3.4.4.bb b/meta-oe/recipes-support/tcpreplay/tcpreplay_3.4.4.bb new file mode 100644 index 0000000..16b2f08 --- /dev/null +++ b/meta-oe/recipes-support/tcpreplay/tcpreplay_3.4.4.bb @@ -0,0 +1,23 @@ +SUMMARY = "Use previously captured traffic to test network devices" + +HOMEPAGE = "http://tcpreplay.synfin.net/" +SECTION = "console/network" + +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://docs/LICENSE;md5=c33cccf72cc1603e8a72a84811ae3ac8" + +PR = "r0" + +SRC_URI = "http://prdownloads.sourceforge.net/tcpreplay/${PV}/tcpreplay-${PV}.tar.gz \ + file://tcpreplay-3.4.4-cross-compile.patch \ + file://tcpreplay-3.4.4-no-bfp-support.patch \ + " +SRC_URI[md5sum] = "22725feb9b2590809f9350308ec65180" +SRC_URI[sha256sum] = "7a809c58ddec86407fd6e5597ac883d7874a19bea81d716bb2b1c6e3b0e7b58f" + +DEPENDS = "libpcap" + +EXTRA_OECONF += "--with-libpcap=${STAGING_DIR_HOST}/usr" + +inherit siteinfo autotools + -- 1.7.9.7 _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel