]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
Build statistic match unconditionally
authorPatrick McHardy <kaber@trash.net>
Wed, 5 Sep 2007 13:47:05 +0000 (13:47 +0000)
committerPatrick McHardy <kaber@trash.net>
Wed, 5 Sep 2007 13:47:05 +0000 (13:47 +0000)
extensions/.statistic-testx [deleted file]
extensions/Makefile
include/linux/netfilter/xt_statistic.h [new file with mode: 0644]

diff --git a/extensions/.statistic-testx b/extensions/.statistic-testx
deleted file mode 100755 (executable)
index 843cb41..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-[ -f $KERNEL_DIR/net/netfilter/xt_statistic.c -a -f $KERNEL_DIR/include/linux/netfilter/xt_statistic.h ] && echo statistic
index 812f1341e146eb2e2b467abfefe74f858510b07d..48e36bdfb78f9bdc632c480e323b761d84186fe5 100644 (file)
@@ -7,7 +7,7 @@
 #
 PF_EXT_SLIB:=ah addrtype conntrack ecn icmp iprange owner policy realm tos ttl unclean DNAT ECN LOG MASQUERADE MIRROR NETMAP REDIRECT REJECT SAME SNAT TOS TTL ULOG
 PF6_EXT_SLIB:=eui64 hl icmp6 owner policy HL LOG
-PFX_EXT_SLIB:=connbytes connmark connlimit comment dscp esp hashlimit helper length limit mac mark multiport physdev pkttype quota sctp state standard tcp tcpmss udp CLASSIFY CONNMARK DSCP MARK NFLOG NFQUEUE NOTRACK TCPMSS TRACE
+PFX_EXT_SLIB:=connbytes connmark connlimit comment dscp esp hashlimit helper length limit mac mark multiport physdev pkttype quota sctp state statistic standard tcp tcpmss udp CLASSIFY CONNMARK DSCP MARK NFLOG NFQUEUE NOTRACK TCPMSS TRACE
 
 ifeq ($(DO_SELINUX), 1)
 PF_EXT_SE_SLIB:=
diff --git a/include/linux/netfilter/xt_statistic.h b/include/linux/netfilter/xt_statistic.h
new file mode 100644 (file)
index 0000000..c344e99
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef _XT_STATISTIC_H
+#define _XT_STATISTIC_H
+
+enum xt_statistic_mode {
+       XT_STATISTIC_MODE_RANDOM,
+       XT_STATISTIC_MODE_NTH,
+       __XT_STATISTIC_MODE_MAX
+};
+#define XT_STATISTIC_MODE_MAX (__XT_STATISTIC_MODE_MAX - 1)
+
+enum xt_statistic_flags {
+       XT_STATISTIC_INVERT             = 0x1,
+};
+#define XT_STATISTIC_MASK              0x1
+
+struct xt_statistic_info {
+       u_int16_t                       mode;
+       u_int16_t                       flags;
+       union {
+               struct {
+                       u_int32_t       probability;
+               } random;
+               struct {
+                       u_int32_t       every;
+                       u_int32_t       packet;
+                       u_int32_t       count;
+               } nth;
+       } u;
+       struct xt_statistic_info        *master __attribute__((aligned(8)));
+};
+
+#endif /* _XT_STATISTIC_H */