A Rust interface for Linux AF_XDP sockets using libbpf.
For more information please see the networking docs or a more detailed overview.
Inspired by Jesse DuMond's OCaml implementation.
These can be found in the examples
directory. A simple example of forwarding packets between two virtual
interfaces can be found in hello_xdp.rs
, while a slightly more complex example of sending and receiving
packets is in link1_to_link2.rs
.
It may be that root permissions are required to run the tests or examples. If that's the case try:
```
sudo env PATH=$PATH cargo test
sudo env PATH=$PATH cargo run --example hello_xdp ```
Tested on a 64-bit machine running Linux kernel version 5.7.1.