commit 0ec456c785aa2fe8fa686fd19282a887f3cbe8eb (tree)
parent 6d98649f68cd369376020733a691db5c4324130a
Author: ahwayakchih <ahwayakchih@noreply.codeberg.org>
Date: Tue, 28 Apr 2026 21:54:54 +0200
Add missing BPF.TAX and BPF.TXA declarations
As described in #32112, two instructions were missing from bpf.zig. They're declared in `linux/filter.h` (not in `linux/bpf.h`).
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/lib/std/os/linux/bpf.zig b/lib/std/os/linux/bpf.zig
@@ -58,6 +58,12 @@ pub const JGT = 0x20;
pub const JGE = 0x30;
pub const JSET = 0x40;
+// misc fields
+/// copy A into X
+pub const TAX = 0x00;
+/// copy X into A
+pub const TXA = 0x80;
+
//#define BPF_SRC(code) ((code) & 0x08)
pub const K = 0x00;
pub const X = 0x08;