From 39646feffc0fc247ba8098adb33f76f0a12a9b7a Mon Sep 17 00:00:00 2001 From: Laura Garcia Liebana Date: Sun, 14 Aug 2016 16:48:48 +0200 Subject: expr: add number generation expression Support for the nft ng expression within libnftnl. Signed-off-by: Laura Garcia Liebana Signed-off-by: Pablo Neira Ayuso --- include/linux/netfilter/nf_tables.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'include/linux/netfilter') diff --git a/include/linux/netfilter/nf_tables.h b/include/linux/netfilter/nf_tables.h index 6390d6e..0b11abf 100644 --- a/include/linux/netfilter/nf_tables.h +++ b/include/linux/netfilter/nf_tables.h @@ -666,6 +666,33 @@ enum nft_exthdr_attributes { }; #define NFTA_EXTHDR_MAX (__NFTA_EXTHDR_MAX - 1) +/** + * enum nft_ng_attributes - nf_tables number generator expression attributes + * + * @NFTA_NG_DREG: destination register (NLA_U32) + * @NFTA_NG_UNTIL: limit value (NLA_U32) + * @NFTA_NG_TYPE: type of operation (NLA_U32) + */ +enum nft_ng_attributes { + NFTA_NG_UNSPEC, + NFTA_NG_DREG, + NFTA_NG_UNTIL, + NFTA_NG_TYPE, + __NFTA_NG_MAX +}; +#define NFTA_NG_MAX (__NFTA_NG_MAX - 1) + +/** + * enum nft_ng_type - nf_tables number generator expression reject types + * + * @NFT_NG_INCREMENTAL: Incremental number generator + * @NFT_NG_RANDOM: Random number generator + */ +enum nft_ng_type { + NFT_NG_INCREMENTAL, + NFT_NG_RANDOM +}; + /** * enum nft_meta_keys - nf_tables meta expression keys * -- cgit v1.2.3