summaryrefslogtreecommitdiffstats
path: root/tools/include/uapi/linux/bpf.h
diff options
context:
space:
mode:
authorStanislav Fomichev2019-06-12 19:30:38 +0200
committerDaniel Borkmann2019-06-15 01:21:57 +0200
commit1314ef561102e534e14cb1d37f89f5c1df0b2ea7 (patch)
treeb3b3c8aeeb19fc1874bee52dc616d152f9d48af9 /tools/include/uapi/linux/bpf.h
parentbpf: export bpf_sock for BPF_PROG_TYPE_CGROUP_SOCK_ADDR prog type (diff)
downloadkernel-qcow2-linux-1314ef561102e534e14cb1d37f89f5c1df0b2ea7.tar.gz
kernel-qcow2-linux-1314ef561102e534e14cb1d37f89f5c1df0b2ea7.tar.xz
kernel-qcow2-linux-1314ef561102e534e14cb1d37f89f5c1df0b2ea7.zip
bpf: export bpf_sock for BPF_PROG_TYPE_SOCK_OPS prog type
And let it use bpf_sk_storage_{get,delete} helpers to access socket storage. Kernel context (struct bpf_sock_ops_kern) already has sk member, so I just expose it to the BPF hooks. I use PTR_TO_SOCKET_OR_NULL and return NULL in !is_fullsock case. I also export bpf_tcp_sock to make it possible to access tcp socket stats. Cc: Martin Lau <kafai@fb.com> Signed-off-by: Stanislav Fomichev <sdf@google.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/include/uapi/linux/bpf.h')
0 files changed, 0 insertions, 0 deletions