pub struct Features { /* private fields */ }Expand description
Features implements BPF and BTF feature detection
Implementations§
Source§impl Features
impl Features
Sourcepub const fn bpf_name(&self) -> bool
pub const fn bpf_name(&self) -> bool
Returns whether BPF program names and map names are supported.
Although the feature probe performs the check for program name, we can use this to also detect if map name is supported since they were both introduced in the same commit.
Sourcepub const fn bpf_probe_read_kernel(&self) -> bool
pub const fn bpf_probe_read_kernel(&self) -> bool
Returns whether the bpf_probe_read_kernel helper is supported.
Sourcepub const fn bpf_perf_link(&self) -> bool
pub const fn bpf_perf_link(&self) -> bool
Returns whether bpf_links are supported for Kprobes/Uprobes/Tracepoints.
Sourcepub const fn bpf_global_data(&self) -> bool
pub const fn bpf_global_data(&self) -> bool
Returns whether BPF program global data is supported.
Returns whether BPF program cookie is supported.
Sourcepub const fn cpumap_prog_id(&self) -> bool
pub const fn cpumap_prog_id(&self) -> bool
Returns whether XDP CPU Maps support chained program IDs.
Sourcepub const fn devmap_prog_id(&self) -> bool
pub const fn devmap_prog_id(&self) -> bool
Returns whether XDP Device Maps support chained program IDs.
Sourcepub const fn btf(&self) -> Option<&BtfFeatures>
pub const fn btf(&self) -> Option<&BtfFeatures>
If BTF is supported, returns which BTF features are supported.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Features
impl RefUnwindSafe for Features
impl Send for Features
impl Sync for Features
impl Unpin for Features
impl UnsafeUnpin for Features
impl UnwindSafe for Features
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more