path: root/include/nftables.h
diff options
authorJeremy Sowden <>2019-10-21 22:49:22 +0100
committerPablo Neira Ayuso <>2019-10-22 09:39:41 +0200
commit46763359adc3be45f7202dc0a130718203bfafce (patch)
tree08e359a29b53a0fe9a0073aa0be9d0a4a3adbe73 /include/nftables.h
parent27c9fc5e879c903e4e9ddefc27b0110bab3a1d87 (diff)
src: add --terse to suppress output of set elements.
Listing an entire ruleset or a table with `nft list` prints the elements of all set definitions within the ruleset or table. Seeing the full set contents is not often necessary especially when requesting to see someone's ruleset for help and support purposes. Add a new option '-t, --terse' options to suppress the output of set contents. Link: Signed-off-by: Jeremy Sowden <> Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'include/nftables.h')
1 files changed, 5 insertions, 0 deletions
diff --git a/include/nftables.h b/include/nftables.h
index 1ecf5ef5..21553c6b 100644
--- a/include/nftables.h
+++ b/include/nftables.h
@@ -90,6 +90,11 @@ static inline bool nft_output_numeric_symbol(const struct output_ctx *octx)
return octx->flags & NFT_CTX_OUTPUT_NUMERIC_SYMBOL;
+static inline bool nft_output_terse(const struct output_ctx *octx)
+ return octx->flags & NFT_CTX_OUTPUT_TERSE;
struct nft_cache {
uint32_t genid;
struct list_head list;