History

netfilter: bitwise: add NFTA_BITWISE_OP netlink attribute.

Add a new bitwise netlink attribute, NFTA_BITWISE_OP, which is set to a value of a new enum, nft_bitwise_ops. It describes the type of operation an expression contains. Currently, it only has one value: NFT_BITWISE_BOOL. More values will be added later to implement shifts.

Jeremy Sowden committed 6 years ago

Commit 9d1f9791 parent 577c7342 files · +28 −0Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/netfilter/nf_tables.h+12−0
@@ -484,6 +484,16 @@ enum nft_immediate_attributes { · 483 unmodified lines
484484 };
485485 #define NFTA_IMMEDIATE_MAX (__NFTA_IMMEDIATE_MAX - 1)
486486
487+/**
488+ * enum nft_bitwise_ops - nf_tables bitwise operations
489+ *
490+ * @NFT_BITWISE_BOOL: mask-and-xor operation used to implement NOT, AND, OR and
491+ * XOR boolean operations
492+ */
493+enum nft_bitwise_ops {
494+ NFT_BITWISE_BOOL,
495+};
496+
487497 /**
488498 * enum nft_bitwise_attributes - nf_tables bitwise expression netlink attributes
489499 *
@@ -492,6 +502,7 @@ enum nft_immediate_attributes { · 2 unmodified lines
492502 * @NFTA_BITWISE_LEN: length of operands (NLA_U32)
493503 * @NFTA_BITWISE_MASK: mask value (NLA_NESTED: nft_data_attributes)
494504 * @NFTA_BITWISE_XOR: xor value (NLA_NESTED: nft_data_attributes)
505+ * @NFTA_BITWISE_OP: type of operation (NLA_U32: nft_bitwise_ops)
495506 *
496507 * The bitwise expression performs the following operation:
497508 *
@@ -512,6 +523,7 @@ enum nft_bitwise_attributes { · 14 unmodified lines
512523 NFTA_BITWISE_LEN,
513524 NFTA_BITWISE_MASK,
514525 NFTA_BITWISE_XOR,
526+ NFTA_BITWISE_OP,
515527 __NFTA_BITWISE_MAX
516528 };
517529 #define NFTA_BITWISE_MAX (__NFTA_BITWISE_MAX - 1)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t