mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Subject: [ptxdist] [PATCH v1 5/5] add tcpreplay
Date: Wed,  7 Sep 2022 15:21:25 +0200	[thread overview]
Message-ID: <20220907132125.2345487-5-o.rempel@pengutronix.de> (raw)
In-Reply-To: <20220907132125.2345487-1-o.rempel@pengutronix.de>

Add tcpreplay for network testing

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 patches/tcpreplay-4.4.2/autogen.sh |  3 ++
 rules/tcpreplay.in                 | 10 ++++
 rules/tcpreplay.make               | 74 ++++++++++++++++++++++++++++++
 3 files changed, 87 insertions(+)
 create mode 100755 patches/tcpreplay-4.4.2/autogen.sh
 create mode 100644 rules/tcpreplay.in
 create mode 100644 rules/tcpreplay.make

diff --git a/patches/tcpreplay-4.4.2/autogen.sh b/patches/tcpreplay-4.4.2/autogen.sh
new file mode 100755
index 000000000..9992a42b2
--- /dev/null
+++ b/patches/tcpreplay-4.4.2/autogen.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+exec ${PWD}/autogen.sh
diff --git a/rules/tcpreplay.in b/rules/tcpreplay.in
new file mode 100644
index 000000000..13507be15
--- /dev/null
+++ b/rules/tcpreplay.in
@@ -0,0 +1,10 @@
+## SECTION=networking
+
+config TCPREPLAY
+	tristate
+	select HOST_AUTOTOOLS_AUTOGEN
+	select LIBPCAP
+	prompt "tcpreplay"
+	help
+	  Tcpreplay is a suite of free Open Source utilities for editing and
+	  replaying previously captured network traffic.
diff --git a/rules/tcpreplay.make b/rules/tcpreplay.make
new file mode 100644
index 000000000..6b5c5f261
--- /dev/null
+++ b/rules/tcpreplay.make
@@ -0,0 +1,74 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2022 by Oleksij Rempel <o.rempel@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_TCPREPLAY) += tcpreplay
+
+#
+# Paths and names
+#
+TCPREPLAY_VERSION	:= 4.4.2
+TCPREPLAY_MD5		:= a557d08da49a7d7c2f231299ef9354d1
+TCPREPLAY		:= tcpreplay-$(TCPREPLAY_VERSION)
+TCPREPLAY_URL		:= file://local_src/tcpreplay
+TCPREPLAY_SUFFIX	:= tar.gz
+TCPREPLAY_URL		:= https://github.com/appneta/tcpreplay/archive/$(TCPREPLAY_VERSION).$(TCPREPLAY_SUFFIX)
+TCPREPLAY_SOURCE	:= $(SRCDIR)/$(TCPREPLAY).$(TCPREPLAY_SUFFIX)
+TCPREPLAY_DIR		:= $(BUILDDIR)/$(TCPREPLAY)
+TCPREPLAY_BUILD_OOT	:= YES
+TCPREPLAY_LICENSE	:= GPLv3
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+TCPREPLAY_CONF_TOOL := autoconf
+TCPREPLAY_CONF_OPT := \
+	$(CROSS_AUTOCONF_USR) \
+	--with-libpcap=$(PTXDIST_SYSROOT_TARGET)/usr
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/tcpreplay.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, tcpreplay)
+	@$(call install_fixup, tcpreplay, PRIORITY, optional)
+	@$(call install_fixup, tcpreplay, SECTION, base)
+	@$(call install_fixup, tcpreplay, AUTHOR, "Oleksij Rempel <o.rempel@pengutronix.de>")
+	@$(call install_fixup, tcpreplay, DESCRIPTION, "TODO tcpreplay")
+
+#	# This is an example only. Adapt it to your requirements. Read the
+#	# documentation's section "Make it Work" in chapter "Adding new Packages"
+#	# how to prepare this content or/and read chapter
+#	# "Rule File Macro Reference" to get an idea of the available macros
+#	# you can use here and how to use them.
+
+#	# install binary (note: may fail, if there is no binary)
+	@$(call install_copy, tcpreplay, 0, 0, 0755, -, /usr/bin/tcpreplay)
+
+	@$(call install_finish, tcpreplay)
+
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+#$(STATEDIR)/tcpreplay.clean:
+#	@$(call targetinfo)
+#	@$(call clean_pkg, TCPREPLAY)
+
+# vim: syntax=make
-- 
2.30.2




  parent reply	other threads:[~2022-09-07 13:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07 13:21 [ptxdist] [PATCH v1 1/5] add host gc Oleksij Rempel
2022-09-07 13:21 ` [ptxdist] [PATCH v1 2/5] add host libunsitring Oleksij Rempel
2022-09-09  9:53   ` Michael Olbrich
2022-09-07 13:21 ` [ptxdist] [PATCH v1 3/5] add host guile tools Oleksij Rempel
2022-09-09  9:54   ` Michael Olbrich
2022-09-07 13:21 ` [ptxdist] [PATCH v1 4/5] add host autotools-autogen Oleksij Rempel
2022-09-07 13:21 ` Oleksij Rempel [this message]
2022-09-09  9:51 ` [ptxdist] [PATCH v1 1/5] add host gc Michael Olbrich
2022-09-09  9:57 ` Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220907132125.2345487-5-o.rempel@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox