From bc98f10dd3b041198f344d737f8b1388adeb84b1 Mon Sep 17 00:00:00 2001 From: Jayden Nyamiaka Date: Thu, 12 Sep 2024 09:35:24 -0700 Subject: [PATCH] Add netfilter byteorder operation constants for nftables support. PiperOrigin-RevId: 673883678 --- pkg/abi/linux/nf_tables.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/abi/linux/nf_tables.go b/pkg/abi/linux/nf_tables.go index 1d974cc66..1f00d97aa 100644 --- a/pkg/abi/linux/nf_tables.go +++ b/pkg/abi/linux/nf_tables.go @@ -156,3 +156,12 @@ const ( // Bool for whether packet route involves a IPsec transform st xfrm is applied NFT_RT_XFRM ) + +// Nf table byteorder operators. +// Used by the nft byteorder operation to convert data in a register to a +// specific byte order. +// These correspond to enum values in include/uapi/linux/netfilter/nf_tables.h. +const ( + NFT_BYTEORDER_NTOH = iota // network to host operator + NFT_BYTEORDER_HTON // host to network operator +)