Module query

Source
Expand description

Query the host about BPF

For example, to list the name of every bpf program running on the system:

use libbpf_rs::query::ProgInfoIter;

let mut iter = ProgInfoIter::default();
for prog in iter {
    println!("{}", prog.name.to_string_lossy());
}

Structs§

BtfInfo
Information about BPF type format.
BtfInfoIter
An iterator for the btf type information of modules and programs in the kernel
CgroupLinkInfo
Information about a cgroup link
KprobeMultiLinkInfo
Information about a multi-kprobe link.
LineInfo
BTF Line information.
LinkInfo
Information about a BPF link. Maps to struct bpf_link_info in kernel uapi.
LinkInfoIter
Iterator that returns LinkInfos.
MapInfo
Information about a BPF map. Maps to struct bpf_map_info in kernel uapi.
MapInfoIter
Iterator that returns MapInfos.
NetNsLinkInfo
Information about a network namespace link.
NetfilterLinkInfo
Information about a BPF netfilter link.
NetkitLinkInfo
Information about a BPF netkit link.
ProgInfoIter
An iterator for the information of loaded bpf programs.
ProgInfoQueryOptions
Options to query the program info currently loaded.
ProgramInfo
Information about a BPF program. Maps to struct bpf_prog_info in kernel uapi.
RawTracepointLinkInfo
Information about a raw tracepoint.
SockMapLinkInfo
Information about a BPF sockmap link.
StructOpsLinkInfo
Information about a BPF struct_ops link.
Tag
Bpf identifier tag.
TcxLinkInfo
Information about a BPF tc link.
TracingLinkInfo
Information about a tracing link
UprobeMultiLinkInfo
Information about a multi-uprobe link.
XdpLinkInfo
Information about a XDP link.

Enums§

LinkTypeInfo
Information about BPF link types. Maps to the anonymous union in struct bpf_link_info in kernel uapi.