libbpfgo
libbpfgo copied to clipboard
Implement libbpf bpf_program API
We should expose all of the bpf_program api, just being careful about what is deprecated and/or discouraged when 1.0 is released.
- [ ] bpf_program__set_ifindex
- [ ] bpf_program__name
- [ ] bpf_program__section_name
- [ ] bpf_program__autoload
- [x] bpf_program__set_autoload
- [x] bpf_program__fd
- [x] bpf_program__pin
- [x] bpf_program__unpin
- [ ] bpf_program__unload
- [x] bpf_program__attach
- [x] bpf_program__attach_perf_event
- [ ] bpf_program__attach_perf_event_opts
- [x] bpf_program__attach_kprobe
- [ ] bpf_program__attach_kprobe_opts
- [x] bpf_program__attach_uprobe
- [ ] bpf_program__attach_uprobe_opts
- [x] bpf_program__attach_tracepoint
- [ ] bpf_program__attach_tracepoint_opts
- [x] bpf_program__attach_raw_tracepoint
- [ ] bpf_program__attach_trace
- [ ] bpf_program__attach_trace_opts
- [x] bpf_program__attach_lsm
- [x] bpf_program__attach_cgroup
- [x] bpf_program__attach_netns
- [x] bpf_program__attach_xdp
- [ ] bpf_program__attach_freplace
- [x] bpf_program__attach_iter
- [x] bpf_program__type
- [x] bpf_program__set_type
- [ ] bpf_program__expected_attach_type
- [x] bpf_program__set_expected_attach_type
- [x] bpf_program__set_attach_target
Low-level API:
- [ ] bpf_prog_get_info_by_fd
Hey folks, is anyone already working on the XDP API bits? I would require it for a PoC so I can probably contribute from this perspective.
Hi @saschagrunert! No one currently has the XDP api on their plate, you're more than welcome to contribute and I'd be happy to help in any way I can!
BTW, there is a generic attachment interface now, right ?

It is tied to bpf_program__attach_cgroup and some other attachments.
bpf_program__attach_cgroup PR: https://github.com/aquasecurity/libbpfgo/pull/196