From b15d479ef70ec9c7f0897aac3756f167ab272f11 Mon Sep 17 00:00:00 2001 From: Andrii Nakryiko Date: Fri, 22 Oct 2021 17:39:26 -0700 Subject: [PATCH] sync: auto-generate latest BPF helpers Latest changes to BPF helper definitions. --- src/bpf_helper_defs.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/bpf_helper_defs.h b/src/bpf_helper_defs.h index dcb23fb..17f11b5 100644 --- a/src/bpf_helper_defs.h +++ b/src/bpf_helper_defs.h @@ -27,6 +27,7 @@ struct tcp_sock; struct tcp_timewait_sock; struct tcp_request_sock; struct udp6_sock; +struct unix_sock; struct task_struct; struct __sk_buff; struct sk_msg_md; @@ -4083,4 +4084,14 @@ static long (*bpf_get_branch_snapshot)(void *entries, __u32 size, __u64 flags) = */ static long (*bpf_trace_vprintk)(const char *fmt, __u32 fmt_size, const void *data, __u32 data_len) = (void *) 177; +/* + * bpf_skc_to_unix_sock + * + * Dynamically cast a *sk* pointer to a *unix_sock* pointer. + * + * Returns + * *sk* if casting is valid, or **NULL** otherwise. + */ +static struct unix_sock *(*bpf_skc_to_unix_sock)(void *sk) = (void *) 178; +