From baa4e0e3fa5ff9ad6e3c97b0347ad23058c545d9 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 29 Oct 2018 14:04:07 +0100 Subject: src: add NFT_CTX_OUTPUT_NUMERIC_PROTO We keep printing layer 4 protocols as literals since we do not use /etc/protocols. This new flag allows us to print it as a number. libnftables internally uses this to print layer 4 protocol as numbers when part of a range. Acked-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- include/nftables.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/nftables.h') diff --git a/include/nftables.h b/include/nftables.h index 2dff07fe..d0031e84 100644 --- a/include/nftables.h +++ b/include/nftables.h @@ -63,6 +63,11 @@ static inline bool nft_output_guid(const struct output_ctx *octx) return octx->flags & NFT_CTX_OUTPUT_GUID; } +static inline bool nft_output_numeric_proto(const struct output_ctx *octx) +{ + return octx->flags & NFT_CTX_OUTPUT_NUMERIC_PROTO; +} + struct nft_cache { uint16_t genid; struct list_head list; -- cgit v1.2.3