diff options
author | Laura Garcia Liebana <nevola@gmail.com> | 2018-04-22 11:04:56 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-05-08 14:34:18 +0200 |
commit | b97f45c2ebaa60ec5c3e8781937ce8ac3bba1251 (patch) | |
tree | 8bf942b8025aa87646ff33568fc2de518bdbd4fd /include | |
parent | 7a1cdba29988e848e0c9f177515e1d03c6032da6 (diff) |
expr: add map lookups for numgen statements
This patch introduces two new attributes for numgen to allow map
lookups where the number generator will be the key.
Two new attributes needs to be included: NFTNL_EXPR_NG_SET_NAME and
NFTNL_EXPR_NG_SET_ID in order to identify the given map.
Signed-off-by: Laura Garcia Liebana <nevola@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/libnftnl/expr.h | 2 | ||||
-rw-r--r-- | include/linux/netfilter/nf_tables.h | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/libnftnl/expr.h b/include/libnftnl/expr.h index 76df942..25d4103 100644 --- a/include/libnftnl/expr.h +++ b/include/libnftnl/expr.h @@ -57,6 +57,8 @@ enum { NFTNL_EXPR_NG_MODULUS, NFTNL_EXPR_NG_TYPE, NFTNL_EXPR_NG_OFFSET, + NFTNL_EXPR_NG_SET_NAME, + NFTNL_EXPR_NG_SET_ID, }; enum { diff --git a/include/linux/netfilter/nf_tables.h b/include/linux/netfilter/nf_tables.h index b904e33..54e35c1 100644 --- a/include/linux/netfilter/nf_tables.h +++ b/include/linux/netfilter/nf_tables.h @@ -1448,6 +1448,8 @@ enum nft_trace_types { * @NFTA_NG_MODULUS: maximum counter value (NLA_U32) * @NFTA_NG_TYPE: operation type (NLA_U32) * @NFTA_NG_OFFSET: offset to be added to the counter (NLA_U32) + * @NFTA_NG_SET_NAME: name of the map to lookup (NLA_STRING) + * @NFTA_NG_SET_ID: if of the map (NLA_U32) */ enum nft_ng_attributes { NFTA_NG_UNSPEC, @@ -1455,6 +1457,8 @@ enum nft_ng_attributes { NFTA_NG_MODULUS, NFTA_NG_TYPE, NFTA_NG_OFFSET, + NFTA_NG_SET_NAME, + NFTA_NG_SET_ID, __NFTA_NG_MAX }; #define NFTA_NG_MAX (__NFTA_NG_MAX - 1) |