mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
add xdp struct to args
Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
#include <linux/bpf.h>
|
||||
#include "vmlinux.h"
|
||||
#include <bpf/bpf_helpers.h>
|
||||
#define u64 unsigned long long
|
||||
#define u32 unsigned int
|
||||
#include <bpf/bpf_endian.h>
|
||||
|
||||
SEC("xdp")
|
||||
int hello(struct xdp_md *ctx) {
|
||||
bpf_printk("Hello, World!\n");
|
||||
// ctx.
|
||||
bpf_printk("Hello, World! %ud \n", ctx->data);
|
||||
return XDP_PASS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user