mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
bpf: Add bpf_skc_to_{tcp, tcp_timewait, tcp_request}_sock() helpers
Three more helpers are added to cast a sock_common pointer to an tcp_sock, tcp_timewait_sock or a tcp_request_sock for tracing programs. Signed-off-by: Yonghong Song <yhs@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Martin KaFai Lau <kafai@fb.com> Link: https://lore.kernel.org/bpf/20200623230811.3988277-1-yhs@fb.com
This commit is contained in:
parent
af7ec13833
commit
478cfbdf5f
6 changed files with 121 additions and 2 deletions
|
@ -422,6 +422,9 @@ class PrinterHelpers(Printer):
|
|||
'struct tcphdr',
|
||||
'struct seq_file',
|
||||
'struct tcp6_sock',
|
||||
'struct tcp_sock',
|
||||
'struct tcp_timewait_sock',
|
||||
'struct tcp_request_sock',
|
||||
|
||||
'struct __sk_buff',
|
||||
'struct sk_msg_md',
|
||||
|
@ -460,6 +463,9 @@ class PrinterHelpers(Printer):
|
|||
'struct tcphdr',
|
||||
'struct seq_file',
|
||||
'struct tcp6_sock',
|
||||
'struct tcp_sock',
|
||||
'struct tcp_timewait_sock',
|
||||
'struct tcp_request_sock',
|
||||
}
|
||||
mapped_types = {
|
||||
'u8': '__u8',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue