aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorYonghong Song <[email protected]>2020-06-23 16:08:15 -0700
committerAlexei Starovoitov <[email protected]>2020-06-24 18:37:59 -0700
commit0d4fad3e57df2bf61e8ffc8d12a34b1caf9b8835 (patch)
treea0e1c4d3842e4fcf68b2258de801de5e4a092d1c /include/linux
parent5788b3a07fc5863606c3b92fa7b1ffe125e6eb4c (diff)
bpf: Add bpf_skc_to_udp6_sock() helper
The helper is used in tracing programs to cast a socket pointer to a udp6_sock pointer. The return value could be NULL if the casting is illegal. Signed-off-by: Yonghong Song <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: Martin KaFai Lau <[email protected]> Cc: Eric Dumazet <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/bpf.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index c23998cf6699..3d2ade703a35 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -1653,6 +1653,7 @@ extern const struct bpf_func_proto bpf_skc_to_tcp6_sock_proto;
extern const struct bpf_func_proto bpf_skc_to_tcp_sock_proto;
extern const struct bpf_func_proto bpf_skc_to_tcp_timewait_sock_proto;
extern const struct bpf_func_proto bpf_skc_to_tcp_request_sock_proto;
+extern const struct bpf_func_proto bpf_skc_to_udp6_sock_proto;
const struct bpf_func_proto *bpf_tracing_func_proto(
enum bpf_func_id func_id, const struct bpf_prog *prog);