pub struct Features { /* private fields */ }Expand description
Features implements BPF and BTF feature detection
Implementations§
Source§impl Features
impl Features
Sourcepub fn bpf_name(&self) -> bool
pub 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 fn bpf_probe_read_kernel(&self) -> bool
pub fn bpf_probe_read_kernel(&self) -> bool
Returns whether the bpf_probe_read_kernel helper is supported.
Sourcepub fn bpf_perf_link(&self) -> bool
pub fn bpf_perf_link(&self) -> bool
Returns whether bpf_links are supported for Kprobes/Uprobes/Tracepoints.
Sourcepub fn bpf_global_data(&self) -> bool
pub fn bpf_global_data(&self) -> bool
Returns whether BPF program global data is supported.
Returns whether BPF program cookie is supported.
Sourcepub fn cpumap_prog_id(&self) -> bool
pub fn cpumap_prog_id(&self) -> bool
Returns whether XDP CPU Maps support chained program IDs.
Sourcepub fn devmap_prog_id(&self) -> bool
pub fn devmap_prog_id(&self) -> bool
Returns whether XDP Device Maps support chained program IDs.
Sourcepub fn btf(&self) -> Option<&BtfFeatures>
pub 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 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