libbpf-rs
libbpf-rs copied to clipboard
Support creating bpf links
To create a link in libbpf, there is this API:
LIBBPF_API int bpf_link_create(int prog_fd, int target_fd,
enum bpf_attach_type attach_type,
const struct bpf_link_create_opts *opts);
https://github.com/libbpf/libbpf/blob/3591deb9bc6b0848721f831790b78ae0a593b4c5/src/bpf.h
In libbpf-rs, we should support this operation as well