tools/bpftool: Remove libbpf_internal.h usage in bpftool
Most netlink-related functions were unique to bpftool usage, so I moved them into net.c. Few functions are still used by both bpftool and libbpf itself internally, so I've copy-pasted them (libbpf_nl_get_link, libbpf_netlink_open). It's a bit of duplication of code, but better separation of libbpf as a library with public API and bpftool, relying on unexposed functions in libbpf. Signed-off-by:Andrii Nakryiko <andriin@fb.com> Signed-off-by:
Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20200819013607.3607269-3-andriin@fb.com
Showing
- tools/bpf/bpftool/gen.c 0 additions, 2 deletionstools/bpf/bpftool/gen.c
- tools/bpf/bpftool/net.c 282 additions, 17 deletionstools/bpf/bpftool/net.c
- tools/lib/bpf/libbpf_internal.h 0 additions, 12 deletionstools/lib/bpf/libbpf_internal.h
- tools/lib/bpf/netlink.c 6 additions, 119 deletionstools/lib/bpf/netlink.c
Loading
Please register or sign in to comment