add i32 support and make it extensible

This commit is contained in:
2025-11-01 14:43:19 +05:30
parent a9d82d40d3
commit 204ec26154
8 changed files with 153 additions and 13 deletions

View File

@ -0,0 +1,15 @@
#include <linux/bpf.h>
#include <bpf/bpf_helpers.h>
SEC("xdp")
int print_xdp_data(struct xdp_md *ctx)
{
// 'data' is a pointer to the start of packet data
void *data = (void *)(long)ctx->data;
bpf_printk("ctx->data = %p\n", data);
return XDP_PASS;
}
char LICENSE[] SEC("license") = "GPL";