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
484};484};
485#define NFTA_IMMEDIATE_MAX (__NFTA_IMMEDIATE_MAX - 1)485#define NFTA_IMMEDIATE_MAX (__NFTA_IMMEDIATE_MAX - 1)
486 486
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 */
493enum nft_bitwise_ops {
494 NFT_BITWISE_BOOL,
495};
496
487/**497/**
488 * enum nft_bitwise_attributes - nf_tables bitwise expression netlink attributes498 * enum nft_bitwise_attributes - nf_tables bitwise expression netlink attributes
489 *499 *
@@ -492,6 +502,7 @@ enum nft_immediate_attributes { · 2 unmodified lines
492 * @NFTA_BITWISE_LEN: length of operands (NLA_U32)502 * @NFTA_BITWISE_LEN: length of operands (NLA_U32)
493 * @NFTA_BITWISE_MASK: mask value (NLA_NESTED: nft_data_attributes)503 * @NFTA_BITWISE_MASK: mask value (NLA_NESTED: nft_data_attributes)
494 * @NFTA_BITWISE_XOR: xor value (NLA_NESTED: nft_data_attributes)504 * @NFTA_BITWISE_XOR: xor value (NLA_NESTED: nft_data_attributes)
505 * @NFTA_BITWISE_OP: type of operation (NLA_U32: nft_bitwise_ops)
495 *506 *
496 * The bitwise expression performs the following operation:507 * The bitwise expression performs the following operation:
497 *508 *
@@ -512,6 +523,7 @@ enum nft_bitwise_attributes { · 14 unmodified lines
512 NFTA_BITWISE_LEN,523 NFTA_BITWISE_LEN,
513 NFTA_BITWISE_MASK,524 NFTA_BITWISE_MASK,
514 NFTA_BITWISE_XOR,525 NFTA_BITWISE_XOR,
526 NFTA_BITWISE_OP,
515 __NFTA_BITWISE_MAX527 __NFTA_BITWISE_MAX
516};528};
517#define NFTA_BITWISE_MAX (__NFTA_BITWISE_MAX - 1)529#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