用户socket与内核sock是一一对应的,在用户socket结构体中有成员变量指向内核中的sock结构体;socket结构体中含有成员变量结构体struct sock sk;socket->sk = sock;
struct sock 定义在linux/include/net/sock.h中
其个别成员含义:
sk_rcvbuf:size of receive buffer in bytes;
sk_receive_queue:incomming packets;
sk_write_queue:packet sending queue;