summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2005-01-03 03:48:40 +0000
committerRusty Russell <rusty@rustcorp.com.au>2005-01-03 03:48:40 +0000
commit3aef54dce4f9bbe0b466478fd33a1d3131efbbb8 (patch)
tree58c303308741dab836833dc15cade877a6bf6939 /include
parent708f7b97a5a7455abf5c3c5a86bf6603c6c7a1c5 (diff)
Extension revision number support (if kernel supports the getsockopts).
Enhance MARK match with second revision. Committed in anticipation of the kernel patch being applied.
Diffstat (limited to 'include')
-rw-r--r--include/iptables.h18
-rw-r--r--include/linux/netfilter_ipv4/ipt_MARK.h15
2 files changed, 33 insertions, 0 deletions
diff --git a/include/iptables.h b/include/iptables.h
index 6d997f7c..25f36aeb 100644
--- a/include/iptables.h
+++ b/include/iptables.h
@@ -12,6 +12,18 @@
#define IPPROTO_SCTP 132
#endif
+#ifndef IPT_SO_GET_REVISION_MATCH /* Old kernel source. */
+#define IPT_SO_GET_REVISION_MATCH (IPT_BASE_CTL + 2)
+#define IPT_SO_GET_REVISION_TARGET (IPT_BASE_CTL + 3)
+
+struct ipt_get_revision
+{
+ char name[IPT_FUNCTION_MAXNAMELEN-1];
+
+ u_int8_t revision;
+};
+#endif /* IPT_SO_GET_REVISION_MATCH Old kernel source */
+
struct iptables_rule_match
{
struct iptables_rule_match *next;
@@ -26,6 +38,9 @@ struct iptables_match
ipt_chainlabel name;
+ /* Revision of match (0 by default). */
+ u_int8_t revision;
+
const char *version;
/* Size of match data. */
@@ -76,6 +91,9 @@ struct iptables_target
ipt_chainlabel name;
+ /* Revision of target (0 by default). */
+ u_int8_t revision;
+
const char *version;
/* Size of target data. */
diff --git a/include/linux/netfilter_ipv4/ipt_MARK.h b/include/linux/netfilter_ipv4/ipt_MARK.h
index 6febfe64..3694e488 100644
--- a/include/linux/netfilter_ipv4/ipt_MARK.h
+++ b/include/linux/netfilter_ipv4/ipt_MARK.h
@@ -9,4 +9,19 @@ struct ipt_mark_target_info {
#endif
};
+enum {
+ IPT_MARK_SET=0,
+ IPT_MARK_AND,
+ IPT_MARK_OR
+};
+
+struct ipt_mark_target_info_v1 {
+#ifdef KERNEL_64_USERSPACE_32
+ unsigned long long mark;
+#else
+ unsigned long mark;
+#endif
+ u_int8_t mode;
+};
+
#endif /*_IPT_MARK_H_target*/