Skip to content

Commit

Permalink
Add netfilter bitwise operation constants for nftables support.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 667902660
  • Loading branch information
Jayden Nyamiaka authored and gvisor-bot committed Aug 27, 2024
1 parent 9ecb627 commit 945b418
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/abi/linux/nf_tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,12 @@ const (
const (
NFT_PAYLOAD_L4CSUM_PSEUDOHDR = (1 << 0) // use pseudoheader for L4 checksum
)

// Nf table bitwise operators.
// Used by the nft bitwise operation to perform bitwise math over register data.
// These correspond to enum values in include/uapi/linux/netfilter/nf_tables.h.
const (
NFT_BITWISE_BOOL = iota // mask-and-xor operation for NOT, AND, OR, & XOR
NFT_BITWISE_LSHIFT // left-shift operation
NFT_BITWISE_RSHIFT // right-shift operation
)

0 comments on commit 945b418

Please sign in to comment.