pub struct Bpf {
pub has_bpf_syscall: bool,
pub program_types: HashMap<ProgramType, Result<bool, BpfError>>,
pub map_types: HashMap<MapType, Result<bool, BpfError>>,
pub helpers: HashMap<ProgramType, Vec<Result<BpfHelper, BpfError>>>,
}
Expand description
Results for each eBPF detection technique
The determination of support for these features relies on the implementations provided by libbpf.
Fields§
§has_bpf_syscall: bool
Attempts to load a simple program without error to determine if syscall is available
program_types: HashMap<ProgramType, Result<bool, BpfError>>
For each program type, we determine definite support or propagate the resulting error to the client.
Internally, this relies on libbpf’s libbpf_probe_bpf_prog_type
implementation
which currently attempts to load a basic program of each type to determine
support
map_types: HashMap<MapType, Result<bool, BpfError>>
For each program type, we determine definite support or propagate the resulting error to the client
Internally, this relies on libbpf’s libbpf_probe_bpf_map_type
implementation
which currently attempts to create a map of each type to determine
support
helpers: HashMap<ProgramType, Vec<Result<BpfHelper, BpfError>>>
Returns a list of supported helpers (or error if probe fails) for each program type.
Note: If the program type is NOT supported, then the list will be empty. If the program type is supported but an error occurs on the individual helper probe, that error will be propagated to the list.