From 366c599c2083baf72c40c816da2c530dec7fd612 Mon Sep 17 00:00:00 2001 From: Tyrone Wu Date: Thu, 10 Oct 2024 16:45:53 +0000 Subject: [PATCH] codegen: cgroup_iter_order NFPROTO* nf_inet_hooks Adds the following to codegen: - `bpf_cgroup_iter_order`: used in `bpf_link_info.iter.group.order` - `NFPROTO_*`: used in `bpf_link_info.netfilter.pf` - `nf_inet_hooks`: used in `bpf_link_info.netfilter.hooknum` Include `linux/netfilter.h` in `linux_wrapper.h` for `NFPROTO_*` and `nf_inet_hooks` to generate. --- aya-obj/include/linux_wrapper.h | 1 + xtask/src/codegen/aya.rs | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/aya-obj/include/linux_wrapper.h b/aya-obj/include/linux_wrapper.h index 8be2459a..0e15d93f 100644 --- a/aya-obj/include/linux_wrapper.h +++ b/aya-obj/include/linux_wrapper.h @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include diff --git a/xtask/src/codegen/aya.rs b/xtask/src/codegen/aya.rs index 24b73087..cbb04a00 100644 --- a/xtask/src/codegen/aya.rs +++ b/xtask/src/codegen/aya.rs @@ -109,6 +109,10 @@ fn codegen_bindings(opts: &SysrootOptions, libbpf_dir: &Path) -> Result<(), anyh // NETLINK "ifinfomsg", "tcmsg", + // ITER + "bpf_cgroup_iter_order", + // NETFILTER + "nf_inet_hooks", ]; let vars = [ @@ -161,6 +165,8 @@ fn codegen_bindings(opts: &SysrootOptions, libbpf_dir: &Path) -> Result<(), anyh "TC_H_MIN_EGRESS", // Ringbuf "BPF_RINGBUF_.*", + // NETFILTER + "NFPROTO_.*", ]; let dir = PathBuf::from("aya-obj"); @@ -211,7 +217,9 @@ fn codegen_bindings(opts: &SysrootOptions, libbpf_dir: &Path) -> Result<(), anyh .constified_enum("BTF_VAR_.*") .constified_enum("IFLA_.*") .constified_enum("TCA_.*") - .constified_enum("BPF_RINGBUF_.*"); + .constified_enum("BPF_RINGBUF_.*") + // NETFILTER + .constified_enum("NFPROTO_.*"); } for x in &types {