Struct Bpf

Source
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.

Trait Implementations§

Source§

impl Debug for Bpf

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Bpf

§

impl RefUnwindSafe for Bpf

§

impl Send for Bpf

§

impl Sync for Bpf

§

impl Unpin for Bpf

§

impl UnwindSafe for Bpf

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.