summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHarsha Sharma <harshasharmaiitr@gmail.com>2018-01-14 22:13:52 +0530
committerPablo Neira Ayuso <pablo@netfilter.org>2018-03-05 16:31:55 +0100
commit48f76f4dd9e3f66758953a2d8fa67731ceefb764 (patch)
tree4b2316d1e66eb7c38fb5a9710d278dc8e378596b /include
parentd6f8edceb7873b9cf7e8bbf582a0009210594268 (diff)
src: parse new handle attribute for sets
This patch adds code to allocate set handles and delete sets via set handle. Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/libnftnl/set.h1
-rw-r--r--include/linux/netfilter/nf_tables.h2
-rw-r--r--include/set.h1
3 files changed, 4 insertions, 0 deletions
diff --git a/include/libnftnl/set.h b/include/libnftnl/set.h
index e760d31..27f5bc4 100644
--- a/include/libnftnl/set.h
+++ b/include/libnftnl/set.h
@@ -24,6 +24,7 @@ enum nftnl_set_attr {
NFTNL_SET_GC_INTERVAL,
NFTNL_SET_USERDATA,
NFTNL_SET_OBJ_TYPE,
+ NFTNL_SET_HANDLE,
__NFTNL_SET_MAX
};
#define NFTNL_SET_MAX (__NFTNL_SET_MAX - 1)
diff --git a/include/linux/netfilter/nf_tables.h b/include/linux/netfilter/nf_tables.h
index 1938bb7..5833297 100644
--- a/include/linux/netfilter/nf_tables.h
+++ b/include/linux/netfilter/nf_tables.h
@@ -317,6 +317,7 @@ enum nft_set_desc_attributes {
* @NFTA_SET_GC_INTERVAL: garbage collection interval (NLA_U32)
* @NFTA_SET_USERDATA: user data (NLA_BINARY)
* @NFTA_SET_OBJ_TYPE: stateful object type (NLA_U32: NFT_OBJECT_*)
+ * @NFTA_SET_HANDLE: numerical table handle (NLA_U64)
*/
enum nft_set_attributes {
NFTA_SET_UNSPEC,
@@ -335,6 +336,7 @@ enum nft_set_attributes {
NFTA_SET_USERDATA,
NFTA_SET_PAD,
NFTA_SET_OBJ_TYPE,
+ NFTA_SET_HANDLE,
__NFTA_SET_MAX
};
#define NFTA_SET_MAX (__NFTA_SET_MAX - 1)
diff --git a/include/set.h b/include/set.h
index c6deb73..3bcec7c 100644
--- a/include/set.h
+++ b/include/set.h
@@ -10,6 +10,7 @@ struct nftnl_set {
uint32_t set_flags;
const char *table;
const char *name;
+ uint64_t handle;
uint32_t key_type;
uint32_t key_len;
uint32_t data_type;