summaryrefslogtreecommitdiffstats
path: root/include/nftables.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2018-10-29 14:04:07 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2018-10-29 18:19:13 +0100
commitbaa4e0e3fa5ff9ad6e3c97b0347ad23058c545d9 (patch)
tree3a9bbd3d76c459e1e0a3c6082fe584d5e24e6c1e /include/nftables.h
parent1a5153117784c267ceb81c048dd5e9b9c4309fbb (diff)
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 <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/nftables.h')
-rw-r--r--include/nftables.h5
1 files changed, 5 insertions, 0 deletions
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;