mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Bart vdr. Meulen" <bartvdrmeulen@gmail.com>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] arptables: Add new packege
Date: Mon, 28 May 2012 14:42:45 +0200	[thread overview]
Message-ID: <1338208981-8681-19-git-send-email-bartvdrmeulen@gmail.com> (raw)

From: "Bart vdr. Meulen" <bartvdrmeulen@gmail.com>

Add arptables, an administration tool for arp packet filtering

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
---
 rules/arptables.in   |   33 ++++++++++++++++++
 rules/arptables.make |   90 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 123 insertions(+)
 create mode 100644 rules/arptables.in
 create mode 100644 rules/arptables.make

diff --git a/rules/arptables.in b/rules/arptables.in
new file mode 100644
index 0000000..565d831
--- /dev/null
+++ b/rules/arptables.in
@@ -0,0 +1,33 @@
+## SECTION=networking
+
+menuconfig ARPTABLES
+	tristate
+	prompt "arptables"
+	select KERNEL_HEADER
+	help
+	  Arptables is used to set up, maintain, and inspect the tables of
+	  ARP rules in the Linux kernel. It is analogous to iptables,
+	  but operates at the ARP layer rather than the IP layer.
+
+if ARPTABLES
+
+config ARPTABLES_INSTALL_ARPTABLES
+	bool "install arptables"
+	help
+	  install the arptables command
+
+config ARPTABLES_INSTALL_ARPTABLES_RESTORE
+	bool "install arptables-restore"
+	help
+	  The arptables-restore command is used to restore
+	  the arptables rule-set that was saved with the
+	  arptables-save command.
+
+config ARPTABLES_INSTALL_ARPTABLES_SAVE
+	bool "install arptables-save"
+	help
+	  The arptables-save command is a tool to save
+	  the current rule-set into a file that
+	  arptables-restore can use.
+
+endif
diff --git a/rules/arptables.make b/rules/arptables.make
new file mode 100644
index 0000000..97b06ed
--- /dev/null
+++ b/rules/arptables.make
@@ -0,0 +1,90 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2011 by Bart vdr. Meulen <bartvdrmeulen@gmail.com>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_ARPTABLES) += arptables
+
+#
+# Paths and names
+#
+ARPTABLES_VERSION	:= 0.0.3-4
+ARPTABLES_MD5		:= 1d4ab05761f063b0751645d8f2b8f8e5
+ARPTABLES		:= arptables-v$(ARPTABLES_VERSION)
+ARPTABLES_SUFFIX	:= tar.gz
+ARPTABLES_URL		:= $(PTXCONF_SETUP_SFMIRROR)/ebtables/arptables/arptables-v0.0.3/$(ARPTABLES).$(ARPTABLES_SUFFIX)
+ARPTABLES_SOURCE	:= $(SRCDIR)/$(ARPTABLES).$(ARPTABLES_SUFFIX)
+ARPTABLES_DIR		:= $(BUILDDIR)/$(ARPTABLES)
+ARPTABLES_LICENSE	:= GPLv2
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+$(ARPTABLES_SOURCE):
+	@$(call targetinfo)
+	@$(call get, ARPTABLES)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+ARPTABLES_CONF_TOOL	:= NO
+ARPTABLES_MAKE_OPT := \
+	$(CROSS_ENV_CFLAGS) \
+	$(CROSS_ENV_CPPFLAGS) \
+	$(CROSS_ENV_LDFLAGS) \
+	$(CROSS_ENV_CC) \
+	KERNEL_DIR=$(KERNEL_HEADERS_DIR)
+ARPTABLES_INSTALL_OPT := \
+	PREFIX=/usr install
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/arptables.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, arptables)
+	@$(call install_fixup, arptables,PRIORITY,optional)
+	@$(call install_fixup, arptables,SECTION,base)
+	@$(call install_fixup, arptables,AUTHOR,"Bart vdr. Meulen <bartvdrmeulen@gmail.com>")
+	@$(call install_fixup, arptables,DESCRIPTION,missing)
+
+ifdef PTXCONF_ARPTABLES_INSTALL_ARPTABLES
+	@$(call install_copy, arptables, 0, 0, 0755, -, \
+		/usr/sbin/arptables)
+endif
+
+ifdef PTXCONF_ARPTABLES_INSTALL_ARPTABLES_SAVE
+	@$(call install_copy, arptables, 0, 0, 0755, -, \
+		/usr/sbin/arptables-save)
+endif
+
+ifdef PTXCONF_ARPTABLES_INSTALL_ARPTABLES_RESTORE
+	@$(call install_copy, arptables, 0, 0, 0755, -, \
+		/usr/sbin/arptables-restore)
+endif
+
+	@$(call install_finish, arptables)
+
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+#$(STATEDIR)/arptables.clean:
+#	@$(call targetinfo)
+#	@$(call clean_pkg, ARPTABLES)
+
+# vim: syntax=make
-- 
1.7.9.5


-- 
ptxdist mailing list
ptxdist@pengutronix.de

             reply	other threads:[~2012-05-28 12:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-28 12:42 Bart vdr. Meulen [this message]
2012-05-31 14:51 ` 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=1338208981-8681-19-git-send-email-bartvdrmeulen@gmail.com \
    --to=bartvdrmeulen@gmail.com \
    --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