This commit is contained in:
Jordan Whited 2024-04-26 08:37:04 -07:00
parent fbfc3b7e51
commit 1cbfd1dda2
No known key found for this signature in database
GPG Key ID: 33DF352F65991EB8
2 changed files with 19 additions and 0 deletions

12
derp/xdp/xdp.c Normal file
View File

@ -0,0 +1,12 @@
//go:build ignore
#include <linux/bpf.h>
#include <bpf_helpers.h>
SEC("xdp")
int xdp_prog_func(struct xdp_md *ctx) {
void *data_end = (void *)(long)ctx->data_end;
void *data = (void *)(long)ctx->data;
return XDP_PASS;
}

7
derp/xdp/xdp.go Normal file
View File

@ -0,0 +1,7 @@
package main
//go:generate go run github.com/cilium/ebpf/cmd/bpf2go bpf xdp.c --
func main() {
}