summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeremy Sowden <jeremy@azazel.net>2024-11-13 22:27:08 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2024-11-19 16:07:17 +0100
commitf683f636a0aa8b121a9153c96cf5ca3f8e76faa5 (patch)
treee72c2389dc063ef2f11cb0e194ec2f15bcee0817 /include
parent638b687979befc4e2b22b92c6830ccc9bdcf41fb (diff)
expr: bitwise: add support for kernel space AND, OR and XOR operations
Hitherto, the kernel has only supported boolean operations of the form: dst = (src & mask) ^ xor where `src` is held in a register, and `mask` and `xor` are immediate values. User space has converted AND, OR and XOR operations to this form, and so one operand has had to be immediate. The kernel now supports performing AND, OR and XOR operations directly, on one register and an immediate value or on two registers, so we make that support available to user space. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r--include/libnftnl/expr.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/libnftnl/expr.h b/include/libnftnl/expr.h
index fba1210..1c07b54 100644
--- a/include/libnftnl/expr.h
+++ b/include/libnftnl/expr.h
@@ -139,6 +139,7 @@ enum {
NFTNL_EXPR_BITWISE_XOR,
NFTNL_EXPR_BITWISE_OP,
NFTNL_EXPR_BITWISE_DATA,
+ NFTNL_EXPR_BITWISE_SREG2,
__NFTNL_EXPR_BITWISE_MAX
};