Closed Asphaltt closed 6 months ago
Like list_bpf_progs() and list_bpf_maps(), it's easy to implement list_bpf_links().
list_bpf_progs()
list_bpf_maps()
list_bpf_links()
Here's an use example:
drgn ./contrib/bpf_inspect.py l 1: BPF_LINK_TYPE_TRACING prog: 2: BPF_PROG_TYPE_TRACING hid_tail_call 931: BPF_LINK_TYPE_XDP prog: 2056: BPF_PROG_TYPE_XDP dummy 932: BPF_LINK_TYPE_TRACING prog: 2060: BPF_PROG_TYPE_TRACING fentry_xdp 933: BPF_LINK_TYPE_TRACING prog: 2061: BPF_PROG_TYPE_TRACING fexit_xdp
Like
list_bpf_progs()
andlist_bpf_maps()
, it's easy to implementlist_bpf_links()
.Here's an use example: