diff options
author | Andrey Ignatov <rdna@fb.com> | 2018-10-04 00:26:38 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-10-04 16:04:15 +0200 |
commit | 434fe9d4b4bfa8becb0959ef32b9b9fa628ef6fe (patch) | |
tree | fcb82601678f3dbe3c49720fb8c8ab385a400152 /tools | |
parent | net: core: Fix build with CONFIG_IPV6=m (diff) | |
download | linux-434fe9d4b4bfa8becb0959ef32b9b9fa628ef6fe.tar.xz 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')
-rw-r--r-- | tools/lib/bpf/libbpf.h | 3 | ||||
-rw-r--r-- | tools/lib/bpf/netlink.c | 3 |
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; |