summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorAndrey Ignatov <rdna@fb.com>2018-10-03 15:26:38 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2018-10-04 16:04:15 +0200
commit434fe9d4b4bfa8becb0959ef32b9b9fa628ef6fe (patch)
treefcb82601678f3dbe3c49720fb8c8ab385a400152 /tools/lib
parentd71019b54bff4b8f52903e354bf3b8cb2b4dfa75 (diff)
downloadlinux-434fe9d4b4bfa8becb0959ef32b9b9fa628ef6fe.tar.gz
linux-434fe9d4b4bfa8becb0959ef32b9b9fa628ef6fe.tar.bz2
linux-434fe9d4b4bfa8becb0959ef32b9b9fa628ef6fe.zip
libbpf: Move __dump_nlmsg_t from API to implementation
This typedef is used only by implementation in netlink.c. Nothing uses it in public API. Move it to netlink.c. Signed-off-by: Andrey Ignatov <rdna@fb.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/bpf/libbpf.h3
-rw-r--r--tools/lib/bpf/netlink.c3
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h
index 2ed24d3f80b3..8388be525388 100644
--- a/tools/lib/bpf/libbpf.h
+++ b/tools/lib/bpf/libbpf.h
@@ -304,11 +304,8 @@ int bpf_perf_event_read_simple(void *mem, unsigned long size,
void **buf, size_t *buf_len,
bpf_perf_event_print_t fn, void *priv);
-struct nlmsghdr;
struct nlattr;
typedef int (*dump_nlmsg_t)(void *cookie, void *msg, struct nlattr **tb);
-typedef int (*__dump_nlmsg_t)(struct nlmsghdr *nlmsg, dump_nlmsg_t,
- void *cookie);
int bpf_netlink_open(unsigned int *nl_pid);
int nl_get_link(int sock, unsigned int nl_pid, dump_nlmsg_t dump_link_nlmsg,
void *cookie);
diff --git a/tools/lib/bpf/netlink.c b/tools/lib/bpf/netlink.c
index fde1d7bf8199..da46d9358d9d 100644
--- a/tools/lib/bpf/netlink.c
+++ b/tools/lib/bpf/netlink.c
@@ -18,6 +18,9 @@
#define SOL_NETLINK 270
#endif
+typedef int (*__dump_nlmsg_t)(struct nlmsghdr *nlmsg, dump_nlmsg_t,
+ void *cookie);
+
int bpf_netlink_open(__u32 *nl_pid)
{
struct sockaddr_nl sa;