Data Structure
Every xsock has parent sock as its first filed.
sock_common
1 | 157 struct sock_common { |
sock
1 | 288 struct sock { |
inet_sock
1 | 37 struct inet_sock { |
inet_connection_sock
1 | 87 struct inet_connection_sock { |
tcp_sock
1 | 133 struct tcp_sock { |
转换函数:
sk to inet_sock
1 | 213 static inline struct inet_sock *inet_sk(const struct sock *sk) |
sk to inet_connection_sock
1 | 145 static inline struct inet_connection_sock *inet_csk(const struct sock *sk) |
sk to tcp_sk
1 | 351 static inline struct tcp_sock *tcp_sk(const struct sock *sk) |
