From 48636e1fe6f6d3141de735f9faf4c359938b837c Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 29 Oct 2018 12:11:09 +0100 Subject: src: add nft_ctx_output_{get,set}_echo() to nft_ctx_output_{get,set}_flags Add NFT_CTX_OUTPUT_ECHO flag and echo the command that has been send to the kernel. 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 86788a43..fa6665a1 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 echo; union { FILE *output_fp; struct cookie output_cookie; @@ -54,6 +53,11 @@ static inline bool nft_output_json(const struct output_ctx *octx) return octx->flags & NFT_CTX_OUTPUT_JSON; } +static inline bool nft_output_echo(const struct output_ctx *octx) +{ + return octx->flags & NFT_CTX_OUTPUT_ECHO; +} + struct nft_cache { uint16_t genid; struct list_head list; -- cgit v1.2.3