/** This structure really needs to be cleaned up.* Most of it is for TCP, and not used by any of* the other protocols.*/struct sock {struct options *o......
int ip_mc_ttl; /* Multicasting TTL */
int ip_mc_loop; /* Loopback (not implemented yet) */
char ip_mc_name[MAX_ADDR_LEN]; /* Multicast device name */
struct ip_mc_socklist *ip_mc_list; /* Group array */
#endif
/* This part is used for the timeout functions (timer.c). */
int timeout; /* What are we waiting for? */
struct timer_list timer; /* This is the TIME_WAIT/receive timer when we are doing IP */
struct timeval stamp;
/* identd */
struct socket *socket;
/* Callbacks */
void (*state_change)(struct sock *sk);
void (*data_ready)(struct sock *sk,int bytes);
void (*write_space)(struct sock *sk);
void (*error_report)(struct sock *sk);
};
2结构用途
TCP协议的核心结构,只应用于TCP协议。
3语句注释
3.1 成员注释opt:IP选项缓存于此处。
wmem_alloc:当前写缓冲区大小,该值不可大于系统规定的最大值。
rmem_alloc:当前读缓冲区大小,该值不可大于系统规定最大值。
write_seq:表示应用程序下一次写数据时所对应的第一个字节的序列号,write_queue队列的序列号。
sent_seq:表示本地将要发送的下一个数据包中第一个字节对应的序列号。
acked_seq:表示本地希望从远端接收的下一个数据的序列号。
copied_seq:应用程序有待读取但尚未读取的数据的第一个字节的序列号。
rcv_ack_seq:表示目前本地接收到的远端对本地发送数据的应答序列号,表示本地已经发送的小于此序列号的所有数据已被远端成功接收。
window_seq:sent_seq值加上远端窗口的大小,本地将要发送的数据包的最后一个字节的序列号不可大于此值。
编辑特别推荐:
Linux系统通过手机GPRS上网设置简介
提高Apache服务器性能的四个建议
Linux认证能帮助你找到一份好工作吗
linux面试题参考答案
3/3 首页 上一页 1 2 3 |