Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Andrey Ignatov and committed by
Daniel Borkmann
434fe9d4 d71019b5

+3 -3
-3
tools/lib/bpf/libbpf.h
··· 304 304 void **buf, size_t *buf_len, 305 305 bpf_perf_event_print_t fn, void *priv); 306 306 307 - struct nlmsghdr; 308 307 struct nlattr; 309 308 typedef int (*dump_nlmsg_t)(void *cookie, void *msg, struct nlattr **tb); 310 - typedef int (*__dump_nlmsg_t)(struct nlmsghdr *nlmsg, dump_nlmsg_t, 311 - void *cookie); 312 309 int bpf_netlink_open(unsigned int *nl_pid); 313 310 int nl_get_link(int sock, unsigned int nl_pid, dump_nlmsg_t dump_link_nlmsg, 314 311 void *cookie);
+3
tools/lib/bpf/netlink.c
··· 18 18 #define SOL_NETLINK 270 19 19 #endif 20 20 21 + typedef int (*__dump_nlmsg_t)(struct nlmsghdr *nlmsg, dump_nlmsg_t, 22 + void *cookie); 23 + 21 24 int bpf_netlink_open(__u32 *nl_pid) 22 25 { 23 26 struct sockaddr_nl sa;