/XDP-Rust-Example

Primary LanguageMakefileMIT LicenseMIT

Rust XDP example

Why

Because XDP is awesome. Rust is also awesome

Building

make all

Testing

Code in this repo just drops all packets received

To start executing code run this command (Replace enp3s0 with correct network device)

env DEVICE=enp3s0 sudo -E make inject

To see logs enter

echo -n 1 | sudo tee /sys/kernel/debug/tracing/options/trace_printk
sudo cat /sys/kernel/debug/tracing/trace_pipe

TODO

Publish complete api crate

Built With

  • Shellvm - eBPF have almost same limitations as shellcode