diff options
author | Carlos Falgueras García <carlosfg@riseup.net> | 2016-06-27 19:05:22 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-07-01 16:23:53 +0200 |
commit | 352a74d4e93e3db7380197720eb1003365a5781d (patch) | |
tree | cc73d385310a63ee83592b8b8d7b15907026dc40 /include | |
parent | 5ad0e626492e835fff65369c93d1e571013129e9 (diff) |
set: Add new attribute into 'set' to store user data
The new structure 'user' holds a pointer to user data and its length. The
kernel must have the flag NFTA_SET_USERDATA to support this feature.
Signed-off-by: Carlos Falgueras García <carlosfg@riseup.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/libnftnl/set.h | 1 | ||||
-rw-r--r-- | include/set.h | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/libnftnl/set.h b/include/libnftnl/set.h index 3d50d56..5266b6f 100644 --- a/include/libnftnl/set.h +++ b/include/libnftnl/set.h @@ -22,6 +22,7 @@ enum nftnl_set_attr { NFTNL_SET_DESC_SIZE, NFTNL_SET_TIMEOUT, NFTNL_SET_GC_INTERVAL, + NFTNL_SET_USERDATA, __NFTNL_SET_MAX }; #define NFTNL_SET_MAX (__NFTNL_SET_MAX - 1) diff --git a/include/set.h b/include/set.h index c3b96f2..85bd389 100644 --- a/include/set.h +++ b/include/set.h @@ -14,6 +14,10 @@ struct nftnl_set { uint32_t key_len; uint32_t data_type; uint32_t data_len; + struct { + void *data; + uint32_t len; + } user; uint32_t id; enum nft_set_policies policy; struct { |