Crate bpf_rs

Source
Expand description

bpf-rs is a safe, lean library for inspecting and querying eBPF objects. A lot of the design & inspiration stems from bpftool internals and libbpf-rs.

It is based upon the work of libbpf-sys to safely create wrappers around libbpf.

This crate is NOT meant to help with writing and loading of sophisticated eBPF programs and maps. For that, we recommend libbpf-rs and libbpf-cargo.

Re-exports§

pub use libbpf_sys;

Modules§

insns
Primitives for the eBPF instruction set. See kernel docs for the canonical details

Structs§

ProgramInfo
eBPF program object info. Similar to (but not the same) kernel header’s struct bpf_prog_info

Enums§

BpfHelper
eBPF helper functions. See bpf-helpers(7)
Error
Propagates error variants from libbpf-sys
MapType
eBPF map type variants. Based off of kernel header’s enum bpf_map_type
ProgramLicense
Collection of eBPF program license types (e.g. GPL)
ProgramType
eBPF program type variants. Based off of kernel header’s enum bpf_prog_type