summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2011-04-17 11:38:18 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2011-04-17 11:38:18 +0200
commite39f367d905670e39e6f08d2b73c715a6d0b4bfb (patch)
treec8c481c0861d32d51001e45432bb59fe8fe96c3f /include
parent316ae9d2f1996caea4cf221201accb8c2087a154 (diff)
SET target revision 2 added
The new revision of the SET target supports the following new operations - specifying the timeout value of the entry to be added - flag to instruct the kernel that if the entry already exists then reset the timeout value to the specified one (or to the default from the set definition)
Diffstat (limited to 'include')
-rw-r--r--include/linux/netfilter/xt_set.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/include/linux/netfilter/xt_set.h b/include/linux/netfilter/xt_set.h
index 3ad31378..4379ce9f 100644
--- a/include/linux/netfilter/xt_set.h
+++ b/include/linux/netfilter/xt_set.h
@@ -89,7 +89,7 @@ struct xt_set_info_target_v0 {
struct xt_set_info_v0 del_set;
};
-/* Revision 1: current interface to netfilter/iptables */
+/* Revision 1 match and target */
struct xt_set_info {
ip_set_id_t index;
@@ -98,13 +98,27 @@ struct xt_set_info {
};
/* match and target infos */
-struct xt_set_info_match {
+struct xt_set_info_match_v1 {
struct xt_set_info match_set;
};
-struct xt_set_info_target {
+struct xt_set_info_target_v1 {
struct xt_set_info add_set;
struct xt_set_info del_set;
};
+/* Revision 2 target */
+
+enum ipset_cmd_flags {
+ IPSET_FLAG_BIT_EXIST = 0,
+ IPSET_FLAG_EXIST = (1 << IPSET_FLAG_BIT_EXIST),
+};
+
+struct xt_set_info_target_v2 {
+ struct xt_set_info add_set;
+ struct xt_set_info del_set;
+ u_int32_t flags;
+ u_int32_t timeout;
+};
+
#endif /*_XT_SET_H*/