From: Thomas Jarosch Date: Mon, 12 Apr 2004 18:55:54 +0000 (+0000) Subject: full pom-ng suite for ipt_ACCOUNT X-Git-Tag: v1.9~37 X-Git-Url: http://developer.intra2net.com/git/?p=ipt_ACCOUNT;a=commitdiff_plain;h=b03f465711e0c5c6eb309dde2067153c301e1220 full pom-ng suite for ipt_ACCOUNT --- diff --git a/help b/help new file mode 100644 index 0000000..0478a54 --- /dev/null +++ b/help @@ -0,0 +1,13 @@ + +This patch adds the ACCOUNT target + +The ACCOUNT target is a high performance accounting system for local networks. +It takes two parameters: --addr network/netmask and --tname NAME. + +--addr is the subnet we want accounting for +--tname is the table name where the information is stored + +The data can later be queried using the libipt_ACCOUNT userspace library +or by the "iptaccount" tool which is part of the libipt_ACCOUNT package. + +For more information go to http://www.intra2net.com/opensource/ipt_ACCOUNT diff --git a/info b/info new file mode 100644 index 0000000..ac1c880 --- /dev/null +++ b/info @@ -0,0 +1,4 @@ +Author: Intra2net AG +Status: Alpha +Repository: extra +Recompile: netfilter diff --git a/linux.patch b/linux.patch new file mode 100644 index 0000000..e341b94 --- /dev/null +++ b/linux.patch @@ -0,0 +1,25 @@ +diff -u -r kernel-2.4.25/include/linux/netfilter_ipv4/ip_tables.h kernel-2.4.25.ipt_ACCOUNT/include/linux/netfilter_ipv4/ip_tables.h +--- kernel-2.4.25/include/linux/netfilter_ipv4/ip_tables.h Mon Apr 12 20:02:19 2004 ++++ kernel-2.4.25.ipt_ACCOUNT/include/linux/netfilter_ipv4/ip_tables.h Mon Apr 12 17:37:20 2004 +@@ -151,10 +151,21 @@ + #define IPT_SO_SET_ADD_COUNTERS (IPT_BASE_CTL + 1) + #define IPT_SO_SET_MAX IPT_SO_SET_ADD_COUNTERS + ++#define IPT_SO_SET_ACCOUNT_HANDLE_FREE (IPT_BASE_CTL + 3) ++#define IPT_SO_SET_ACCOUNT_HANDLE_FREE_ALL (IPT_BASE_CTL + 4) ++#define IPT_SO_SET_ACCOUNT_MAX IPT_SO_SET_ACCOUNT_HANDLE_FREE_ALL ++ + #define IPT_SO_GET_INFO (IPT_BASE_CTL) + #define IPT_SO_GET_ENTRIES (IPT_BASE_CTL + 1) + #define IPT_SO_GET_MAX IPT_SO_GET_ENTRIES + ++#define IPT_SO_GET_ACCOUNT_PREPARE_READ (IPT_BASE_CTL + 3) ++#define IPT_SO_GET_ACCOUNT_PREPARE_READ_FLUSH (IPT_BASE_CTL + 4) ++#define IPT_SO_GET_ACCOUNT_GET_DATA (IPT_BASE_CTL + 5) ++#define IPT_SO_GET_ACCOUNT_GET_HANDLE_USAGE (IPT_BASE_CTL + 6) ++#define IPT_SO_GET_ACCOUNT_GET_TABLE_NAMES (IPT_BASE_CTL + 7) ++#define IPT_SO_GET_ACCOUNT_MAX IPT_SO_GET_ACCOUNT_GET_TABLE_NAMES ++ + /* CONTINUE verdict for targets */ + #define IPT_CONTINUE 0xFFFFFFFF + diff --git a/linux/Documentation/Configure.help.ladd b/linux/Documentation/Configure.help.ladd new file mode 100644 index 0000000..f663079 --- /dev/null +++ b/linux/Documentation/Configure.help.ladd @@ -0,0 +1,15 @@ +CONFIG_IP_NF_TARGET_ULOG +ACCOUNT target support +CONFIG_IP_NF_TARGET_ACCOUNT + + The ACCOUNT target is a high performance accounting system for local networks. + It takes two parameters: --addr network/netmask and --tname NAME. + + --addr is the subnet we want accounting for + --tname is the table name where the information is stored + + The data can later be queried using the libipt_ACCOUNT userspace library + or by the "iptaccount" tool which is part of the libipt_ACCOUNT package. + + If you want to compile it as a module, say M here and read + Documentation/modules.txt. If unsure, say `N'. diff --git a/linux/net/ipv4/netfilter/Config.in.ladd b/linux/net/ipv4/netfilter/Config.in.ladd new file mode 100644 index 0000000..055212b --- /dev/null +++ b/linux/net/ipv4/netfilter/Config.in.ladd @@ -0,0 +1,2 @@ + dep_tristate ' ULOG target support' CONFIG_IP_NF_TARGET_ULOG $CONFIG_IP_NF_IPTABLES + dep_tristate ' ACCOUNT target support' CONFIG_IP_NF_TARGET_ACCOUNT $CONFIG_IP_NF_IPTABLES diff --git a/linux/net/ipv4/netfilter/Makefile.ladd b/linux/net/ipv4/netfilter/Makefile.ladd new file mode 100644 index 0000000..30bf4c5 --- /dev/null +++ b/linux/net/ipv4/netfilter/Makefile.ladd @@ -0,0 +1,2 @@ +obj-$(CONFIG_IP_NF_TARGET_ULOG) += ipt_ULOG.o +obj-$(CONFIG_IP_NF_TARGET_ACCOUNT) += ipt_ACCOUNT.o