【发布时间】:2016-12-13 15:12:41
【问题描述】:
是否有可能在sk_buff struct 的linux 内核中获得套接字ID?
我知道我可以使用此代码获得socket:
const struct tcphdr *th = tcp_hdr(skb);
struct sock *sk = __inet_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest);
if (sk)
struct socket* = sk->sk_socket;
我在哪里可以找到 ID 以及这个 ID 的最大值是多少?
【问题讨论】: