From 3c98aab6f8645a14612ab96ecf64a921f5af1b8d Mon Sep 17 00:00:00 2001 From: Jayden Nyamiaka Date: Thu, 1 Aug 2024 14:44:12 -0700 Subject: [PATCH] Add nf tables relational operator constants to use for Comparison operation. PiperOrigin-RevId: 658544703 --- pkg/abi/linux/nf_tables.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkg/abi/linux/nf_tables.go b/pkg/abi/linux/nf_tables.go index 6a005aba3..07a78aa6b 100644 --- a/pkg/abi/linux/nf_tables.go +++ b/pkg/abi/linux/nf_tables.go @@ -80,3 +80,15 @@ const ( // Return to the topmost chain on the jump stack. NFT_RETURN = -5 ) + +// Nf table relational operators. +// Used by the nft comparison operation to compare values in registers. +// These correspond to enum values in include/uapi/linux/netfilter/nf_tables.h. +const ( + NFT_CMP_EQ = iota // equal + NFT_CMP_NEQ // not equal + NFT_CMP_LT // less than + NFT_CMP_LTE // less than or equal to + NFT_CMP_GT // greater than + NFT_CMP_GTE // greater than or equal to +)