|0.1.5||Aug 28, 2020|
|0.1.4||Jun 17, 2020|
|0.1.2||Apr 22, 2020|
|0.1.1||Mar 24, 2020|
#3 in #libbpf
rebpf is a Rust library built on top of libbpf (no bcc dependency) that allows to write and load bpf program, in details this library provides:
- A raw binding of libbpf provide by libbpf-sys.
- A safe wrapper of libbpf.
- High level ebpf api built on top of libbpf wrapper.
- Parse packets in bpf programs using pdu, for more details see packet_parser.
Source code overview
rebpf has "bpf" and "userspace" features in Cargo.toml, on default both are enabled but if you want use rebpf only to write bpf programs or bpf userspace loader you can choose only one of them.
All functions and structs that represent a safe wrapper of libbpf are located in libbpf.rs and helpers.rs with the same names of the functions and structs in libbpf (structs names are switched from snake_case to caml_case).
Add to your Cargo.toml:
[dependencies] rebpf = "0.1.5"
To create your first ebpf program with rebpf library you can copy and rename an empty project template and edit it changing <your_project_name>/src/kern.rs and <your_project_name>/src/user.rs files.
- A recent linux kernel
- LLVM 9
Roadmap and contributions
Roadmap is composed from all issues with label "roadmap". If you want contribute to this repo to avoid future conflicts you can describe what are you implementing in a new issue with label "roadmap".
Licensed under The MIT License (MIT) https://mit-license.org/.