From 92abc51d3580dc719fdcbca8d36fdcf5a3751be5 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 29 Oct 2018 14:15:14 +0100 Subject: src: add -y to priority base chain nummerically By default base chains are printed using default hook priority definitions. Add -y option to print them as numbers. Acked-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- include/nftables.h | 5 +++++ include/nftables/libnftables.h | 1 + 2 files changed, 6 insertions(+) (limited to 'include') diff --git a/include/nftables.h b/include/nftables.h index d0031e84..a4d01e0c 100644 --- a/include/nftables.h +++ b/include/nftables.h @@ -68,6 +68,11 @@ static inline bool nft_output_numeric_proto(const struct output_ctx *octx) return octx->flags & NFT_CTX_OUTPUT_NUMERIC_PROTO; } +static inline bool nft_output_numeric_prio(const struct output_ctx *octx) +{ + return octx->flags & NFT_CTX_OUTPUT_NUMERIC_PRIO; +} + struct nft_cache { uint16_t genid; struct list_head list; diff --git a/include/nftables/libnftables.h b/include/nftables/libnftables.h index 74f2dabb..fb81edc0 100644 --- a/include/nftables/libnftables.h +++ b/include/nftables/libnftables.h @@ -53,6 +53,7 @@ enum { NFT_CTX_OUTPUT_ECHO = (1 << 5), NFT_CTX_OUTPUT_GUID = (1 << 6), NFT_CTX_OUTPUT_NUMERIC_PROTO = (1 << 7), + NFT_CTX_OUTPUT_NUMERIC_PRIO = (1 << 8), }; unsigned int nft_ctx_output_get_flags(struct nft_ctx *ctx); -- cgit v1.2.3