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 prog_info_map_ids(&self) -> bool
pub fn prog_info_map_ids(&self) -> bool
Returns whether bpf_prog_info supports nr_map_ids & map_ids fields.
Sourcepub fn prog_info_gpl_compatible(&self) -> bool
pub fn prog_info_gpl_compatible(&self) -> bool
Returns whether bpf_prog_info supports gpl_compatible field.
Sourcepub fn btf(&self) -> Option<&BtfFeatures>
pub fn btf(&self) -> Option<&BtfFeatures>
If BTF is supported, returns which BTF features are supported.