From cc3765743fa59c3a747b9ce8432769cd4d963587 Mon Sep 17 00:00:00 2001 From: Tizian Maxime Weigt Date: Mon, 27 Oct 2025 16:16:08 +0000 Subject: [PATCH] README.md aktualisiert --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index e756fa0..4a249cb 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,36 @@ L3-L4 xdp based forwarding +xdp-tools is your friend to load xdp in that case. + +# INSTALL +``` +apt update +``` +``` +apt install clang llvm libbpf-dev libelf-dev pkg-config make git bpftool xdp-tools +``` + +# Compile +``` +clang -O2 -g -Wall -target bpf \ + -D__BPF_TRACING__ \ + -I/usr/include \ + -I/usr/include/linux \ + -c main.c -o main.o +``` + +# Attach to the interface +``` +xdp-loader load eth0 ./main.o +``` +``` +xdp-loader status +``` + ``` BASH bpftool map show +bpftool map dump name xdp_flow_stats + bpftool map dump name xdp_flow_stats ``` \ No newline at end of file