wpj428/xdp
Quentin 70aee3087b
Simplify the code
- We can use the structure not only to read the packet but also to modify it
 - Binary OR/AND are done with single chars, eg. & or | while logical OR/AND are done with 2 chars, eg. && or ||
2021-04-25 11:11:03 +02:00
..
README.md Refactor 2021-04-25 10:56:48 +02:00
xdp_udp.c Simplify the code 2021-04-25 11:11:03 +02:00

Compile:

clang -O2 -Wall -target bpf -c main.c -o main.o

Load:

ip link set dev lo xdp obj main.o

Unload:

ip link set dev lo xdp off