mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
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 <yhs@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Martin KaFai Lau <kafai@fb.com> Cc: Eric Dumazet <edumazet@google.com> Link: https://lore.kernel.org/bpf/20200623230815.3988481-1-yhs@fb.com
This commit is contained in:
parent
5788b3a07f
commit
0d4fad3e57
6 changed files with 43 additions and 2 deletions
|
@ -425,6 +425,7 @@ class PrinterHelpers(Printer):
|
|||
'struct tcp_sock',
|
||||
'struct tcp_timewait_sock',
|
||||
'struct tcp_request_sock',
|
||||
'struct udp6_sock',
|
||||
|
||||
'struct __sk_buff',
|
||||
'struct sk_msg_md',
|
||||
|
@ -466,6 +467,7 @@ class PrinterHelpers(Printer):
|
|||
'struct tcp_sock',
|
||||
'struct tcp_timewait_sock',
|
||||
'struct tcp_request_sock',
|
||||
'struct udp6_sock',
|
||||
}
|
||||
mapped_types = {
|
||||
'u8': '__u8',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue