struct sock { /* * Now struct inet_timewait_sock also uses sock_common, so please just * don't add nothing before this first member (__sk_common) --acme */ struct sock_common __sk_common; /* skip some codes */ int sk_rcvbuf; /* skip some codes */ int sk_sndbuf; struct sk_buff_head sk_receive_queue; struct sk_buff_head sk_write_queue;
};
其中,sk_rcvbuf和sk_sendbuf分别是接收和发送缓存的字节数。
而struct sk_buff_head的定义如下:
struct sk_buff_head { /* These two members must be first. */ struct sk_buff *next; struct sk_buff *prev;