summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2007-09-10 11:50:46 +0000
committerPatrick McHardy <kaber@trash.net>2007-09-10 11:50:46 +0000
commit9640e529bd08c4c0458246fae0fd6b473c94ab46 (patch)
treecfffe7b11850caff98b483f62afbf896d24fd2e8 /include/linux
parent97fb2f1579f0794377db1dca7c5bb07fade1a0dc (diff)
Adds u32 to iptables.
Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/netfilter/xt_u32.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/include/linux/netfilter/xt_u32.h b/include/linux/netfilter/xt_u32.h
new file mode 100644
index 00000000..9947f56c
--- /dev/null
+++ b/include/linux/netfilter/xt_u32.h
@@ -0,0 +1,40 @@
+#ifndef _XT_U32_H
+#define _XT_U32_H 1
+
+enum xt_u32_ops {
+ XT_U32_AND,
+ XT_U32_LEFTSH,
+ XT_U32_RIGHTSH,
+ XT_U32_AT,
+};
+
+struct xt_u32_location_element {
+ u_int32_t number;
+ u_int8_t nextop;
+};
+
+struct xt_u32_value_element {
+ u_int32_t min;
+ u_int32_t max;
+};
+
+/*
+ * Any way to allow for an arbitrary number of elements?
+ * For now, I settle with a limit of 10 each.
+ */
+#define XT_U32_MAXSIZE 10
+
+struct xt_u32_test {
+ struct xt_u32_location_element location[XT_U32_MAXSIZE+1];
+ struct xt_u32_value_element value[XT_U32_MAXSIZE+1];
+ u_int8_t nnums;
+ u_int8_t nvalues;
+};
+
+struct xt_u32 {
+ struct xt_u32_test tests[XT_U32_MAXSIZE+1];
+ u_int8_t ntests;
+ u_int8_t invert;
+};
+
+#endif /* _XT_U32_H */