2.9 Android ebpf帮助函数解读(八)

141.struct tcp_timewait_sock *bpf_skc_to_tcp_timewait_sock(void *sk)

描述:将 sk 指针动态转换为tcp_timewait_sock指针。

返回值:如果转换成功返回sk,否则为空。

142.struct tcp_request_sock *bpf_skc_to_tcp_request_sock(void *sk)

描述:将 sk 指针动态转换为tcp_request_sock指针。

返回值:如果转换成功返回sk,否则为空。

143.struct udp6_sock *bpf_skc_to_udp6_sock(void *sk)

描述:将 sk 指针动态转换为udp6_sock指针。

返回值:如果转换成功返回sk,否则为空。

144.long bpf_get_task_stack(struct task_struct *task, void *buf, u32 size, u64 flags)

描述:返回 bpf 程序中提供缓冲区中的用户或内核堆栈。 为此,帮助函数需要task,它是指向struct task_struct的有效指针。为了存储堆栈跟踪信息,bpf 程序提供了一个非负size的buf。

猜你喜欢

转载自blog.csdn.net/huangyabin001/article/details/131673030
2.9
今日推荐