xdrippi is a Rust library focused on providing easy access to AF_XDP sockets and their goodies.
At the moment, this library is very experimental
This library requires:
clangto build the BPF programs found inside of thebpfdirectory.libbpfto be able to install the BPF trampoline.
On a Linux machine, run make test-net to assemble an 8-container configuration as follows:
| Container | IP Address | MAC Address | VETH name on host |
|---|---|---|---|
test1 |
10.42.0.10 |
54:00:00:00:00:10 |
test1 |
test2 |
10.42.0.20 |
54:00:00:00:00:20 |
test2 |
test3 |
10.42.0.30 |
54:00:00:00:00:30 |
test3 |
test4 |
10.42.0.40 |
54:00:00:00:00:40 |
test4 |
test5 |
10.42.0.50 |
54:00:00:00:00:50 |
test5 |
test6 |
10.42.0.60 |
54:00:00:00:00:60 |
test6 |
test7 |
10.42.0.70 |
54:00:00:00:00:70 |
test7 |
test8 |
10.42.0.80 |
54:00:00:00:00:80 |
test8 |
This environment is expected by the following examples
cargo build --example recv && sudo ./target/debug/recvThis sample will simply receive and print packets received from the first container, to send a ping run make test-ping-host
cargo build --example fwd && sudo ./target/debug/fwdThis sample forwards packets between container 1 and container 2 in a dumb way, i.e. everything flowing in on one side ends up on the other.
To enter the first container run make shell-test1.
To enter the second container run make shell-test2.
cargo build --example l2 && sudo ./target/debug/l2This sample builds a very simple L2 switch with all 8 containers attached to it.
To enter any container run make shell-test<x> where <x> is 1, ..., 8.
GNU Affero General Public License version 3 or later.
Sorry, I have had my code stolen with it and I wouldn't want to risk it again.
The development of this library was indirectly sponsored by the University of Genova
Writing out the literal pronunciation of XDP in italian yields something like xdippí. Add in some brainrot about the drip meme and you can figure it out.