18 lines
161 B
Markdown
18 lines
161 B
Markdown
|
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
|
||
|
```
|