From: Andrey Ignatov Date: Fri, 25 May 2018 15:55:25 +0000 (-0700) Subject: libbpf: Support guessing sendmsg{4,6} progs X-Git-Tag: v4.18-rc1~114^2~9^2~20^2~2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=72481f398c4fc6ca32013310c3dec0ef3e6e5bf2;p=linux.git libbpf: Support guessing sendmsg{4,6} progs libbpf can guess prog type and expected attach type based on section name. Add hints for "cgroup/sendmsg4" and "cgroup/sendmsg6" section names. Signed-off-by: Andrey Ignatov Acked-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann --- diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index d20411ebfa2f..b1a60ac8424e 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -2043,6 +2043,8 @@ static const struct { BPF_SA_PROG_SEC("cgroup/bind6", BPF_CGROUP_INET6_BIND), BPF_SA_PROG_SEC("cgroup/connect4", BPF_CGROUP_INET4_CONNECT), BPF_SA_PROG_SEC("cgroup/connect6", BPF_CGROUP_INET6_CONNECT), + BPF_SA_PROG_SEC("cgroup/sendmsg4", BPF_CGROUP_UDP4_SENDMSG), + BPF_SA_PROG_SEC("cgroup/sendmsg6", BPF_CGROUP_UDP6_SENDMSG), BPF_S_PROG_SEC("cgroup/post_bind4", BPF_CGROUP_INET4_POST_BIND), BPF_S_PROG_SEC("cgroup/post_bind6", BPF_CGROUP_INET6_POST_BIND), };