diff options
author | Stanislav Fomichev <sdf@google.com> | 2019-06-27 22:38:55 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-06-28 00:25:17 +0200 |
commit | f6d08d9d8543c8ee494b307804b28e2750ffedb9 (patch) | |
tree | c6690684ef434a3c3759f419ef9a5492e3644dc9 /tools/bpf/bpftool/cgroup.c | |
parent | bpf: add sockopt documentation (diff) | |
download | linux-f6d08d9d8543c8ee494b307804b28e2750ffedb9.tar.xz linux-f6d08d9d8543c8ee494b307804b28e2750ffedb9.zip |
bpftool: support cgroup sockopt
Support sockopt prog type and cgroup hooks in the bpftool.
Cc: Andrii Nakryiko <andriin@fb.com>
Cc: Martin Lau <kafai@fb.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/bpf/bpftool/cgroup.c')
-rw-r--r-- | tools/bpf/bpftool/cgroup.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/cgroup.c b/tools/bpf/bpftool/cgroup.c index 73ec8ea33fb4..390b89a224f1 100644 --- a/tools/bpf/bpftool/cgroup.c +++ b/tools/bpf/bpftool/cgroup.c @@ -26,7 +26,8 @@ " sock_ops | device | bind4 | bind6 |\n" \ " post_bind4 | post_bind6 | connect4 |\n" \ " connect6 | sendmsg4 | sendmsg6 |\n" \ - " recvmsg4 | recvmsg6 | sysctl }" + " recvmsg4 | recvmsg6 | sysctl |\n" \ + " getsockopt | setsockopt }" static const char * const attach_type_strings[] = { [BPF_CGROUP_INET_INGRESS] = "ingress", @@ -45,6 +46,8 @@ static const char * const attach_type_strings[] = { [BPF_CGROUP_SYSCTL] = "sysctl", [BPF_CGROUP_UDP4_RECVMSG] = "recvmsg4", [BPF_CGROUP_UDP6_RECVMSG] = "recvmsg6", + [BPF_CGROUP_GETSOCKOPT] = "getsockopt", + [BPF_CGROUP_SETSOCKOPT] = "setsockopt", [__MAX_BPF_ATTACH_TYPE] = NULL, }; |