From 3c69cf7603534ef6df01ec079c6a4d3d3382f580 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sat, 27 Oct 2018 11:55:00 +0200 Subject: src: add nft_ctx_output_{get,set}_handle() to nft_ctx_output_{get,set}_flags Add NFT_CTX_OUTPUT_HANDLE flag and print handle that uniquely identify objects from new output flags interface. Acked-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- include/nftables.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/nftables.h') diff --git a/include/nftables.h b/include/nftables.h index cb36e066..e0e7a113 100644 --- a/include/nftables.h +++ b/include/nftables.h @@ -18,7 +18,6 @@ struct cookie { struct output_ctx { unsigned int flags; unsigned int numeric; - unsigned int handle; unsigned int echo; unsigned int json; union { @@ -46,6 +45,11 @@ static inline bool nft_output_stateless(const struct output_ctx *octx) return octx->flags & NFT_CTX_OUTPUT_STATELESS; } +static inline bool nft_output_handle(const struct output_ctx *octx) +{ + return octx->flags & NFT_CTX_OUTPUT_HANDLE; +} + struct nft_cache { uint16_t genid; struct list_head list; -- cgit v1.2.3