summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHarsha Sharma <harshasharmaiitr@gmail.com>2018-01-19 00:21:32 +0530
committerPablo Neira Ayuso <pablo@netfilter.org>2018-03-05 17:51:13 +0100
commit9a19e7d0abfb3c2523c4f6db610603a0885041b0 (patch)
treef60e14358be512983377b56d7f1e50286823a9c1 /include
parent48f76f4dd9e3f66758953a2d8fa67731ceefb764 (diff)
src: parse new handle attribute for objects
This patch add code to allocate object handles and delete objects via object handles. Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r--include/libnftnl/object.h1
-rw-r--r--include/linux/netfilter/nf_tables.h2
-rw-r--r--include/obj.h1
3 files changed, 4 insertions, 0 deletions
diff --git a/include/libnftnl/object.h b/include/libnftnl/object.h
index 1c3bc7c..93a40d0 100644
--- a/include/libnftnl/object.h
+++ b/include/libnftnl/object.h
@@ -18,6 +18,7 @@ enum {
NFTNL_OBJ_TYPE,
NFTNL_OBJ_FAMILY,
NFTNL_OBJ_USE,
+ NFTNL_OBJ_HANDLE,
NFTNL_OBJ_BASE = 16,
__NFTNL_OBJ_MAX
};
diff --git a/include/linux/netfilter/nf_tables.h b/include/linux/netfilter/nf_tables.h
index 5833297..d6dbb0d 100644
--- a/include/linux/netfilter/nf_tables.h
+++ b/include/linux/netfilter/nf_tables.h
@@ -1310,6 +1310,7 @@ enum nft_ct_helper_attributes {
*
* @NFTA_OBJ_TABLE: name of the table containing the expression (NLA_STRING)
* @NFTA_OBJ_NAME: name of this expression type (NLA_STRING)
+ * @NFTA_OBJ_HANDLE: numeric object handle (NLA_U64)
* @NFTA_OBJ_TYPE: stateful object type (NLA_U32)
* @NFTA_OBJ_DATA: stateful object data (NLA_NESTED)
* @NFTA_OBJ_USE: number of references to this expression (NLA_U32)
@@ -1321,6 +1322,7 @@ enum nft_object_attributes {
NFTA_OBJ_TYPE,
NFTA_OBJ_DATA,
NFTA_OBJ_USE,
+ NFTA_OBJ_HANDLE,
__NFTA_OBJ_MAX
};
#define NFTA_OBJ_MAX (__NFTA_OBJ_MAX - 1)
diff --git a/include/obj.h b/include/obj.h
index d17d63a..4a728c8 100644
--- a/include/obj.h
+++ b/include/obj.h
@@ -19,6 +19,7 @@ struct nftnl_obj {
uint32_t use;
uint32_t flags;
+ uint64_t handle;
union {
struct nftnl_obj_counter {