unsigned char *data; /* Data head pointer */
unsigned char *tail; /* Tail pointer*/
unsigned char *end;/* End pointer */
void(*destructor)(struct sk_buff *); /* Destruct function */
__u16 redirport; /* Redirect port */
};
sock
包含BSD套接口的协议相关信息 。例如对于一个INET(Internet Address Domain)套接口此数据结构 包含TCP/IP和UDP/IP信息 。
struct sock
{
/* This must be first. */
struct sock *sklist_next;
struct sock *sklist_prev;
struct options*opt;
atomic_twmem_alloc;
atomic_trmem_alloc;
unsigned long allocation; /* Allocation mode */
__u32 write_seq;
__u32 sent_seq;
__u32 acked_seq;
__u32 copied_seq;
__u32 rcv_ack_seq;
unsigned shortrcv_ack_cnt;/* count of same ack */
__u32 window_seq;
__u32 fin_seq;
__u32 urg_seq;
__u32 urg_data;
__u32 syn_seq;
int users;/* user count */
/*
*Not all are volatile, but some are, so we
* might as well say they all are.
*/
volatile char dead,
urginline,
intr,
blog,
done,
reuse,
keepopen,
linger,
delay_acks,
destroy,
ack_timed,
no_check,
zapped,
broadcast,
nonagle,
bsdism;
unsigned long lingertime;
int proc;
struct sock *next;
struct sock **pprev;
struct sock *bind_next;
struct sock **bind_pprev;
struct sock *pair;
int hashent;
struct sock *prev;
struct sk_buff*volatile send_head;
struct sk_buff*volatile send_next;
struct sk_buff*volatile send_tail;
struct sk_buff_head back_log;
struct sk_buff*partial;
struct timer_list partial_timer;
longretransmits;
struct sk_buff_head write_queue,
receive_queue;
struct proto*prot;
struct wait_queue **sleep;
__u32 daddr;
__u32 saddr;/* Sending source */
__u32 rcv_saddr;/* Bound address */
unsigned shortmax_unacked;
unsigned shortwindow;
__u32 lastwin_seq;/* sequence number when we last
updated the window we offer */
__u32 high_seq; /* sequence number when we did
current fast retransmit */
volatile unsigned longato;/* ack timeout */
volatile unsigned longlrcvtime; /* jiffies at last data rcv */
volatile unsigned longidletime; /* jiffies at last rcv */
unsigned intbytes_rcv;
/*
*mss is min(mtu, max_window)
*/
unsigned shortmtu;/* mss negotiated in the syn"s */
volatile unsigned short mss;/* current eff. mss - can change */
volatile unsigned short user_mss; /* mss requested by user in ioctl */
volatile unsigned short max_window;
unsigned long window_clamp;
unsigned intssthresh;
unsigned shortnum;
volatile unsigned short cong_window;
volatile unsigned short cong_count;
volatile unsigned short packets_out;
volatile unsigned short shutdown;
volatile unsigned longrtt;
volatile unsigned longmdev;
volatile unsigned longrto;
volatile unsigned short backoff;
int err, err_soft;/* Soft holds errors that don"t
cause failure but are the cause
of a persistent failure not
just "timed out" */
unsigned char protocol;
volatile unsigned charstate;
unsigned char ack_backlog;
unsigned char max_ack_backlog;
unsigned char priority;
unsigned char debug;
int rcvbuf;
int sndbuf;
unsigned shorttype;
unsigned char localroute; /* Route locally only */
/*
*This is where all the private (optional) areas that don"t
推荐阅读
- Linux 核心--17.关于Linux的Web与FTP站点 --18.作者简介
- Linux 核心--13.Linux动态模块
- Linux 核心--14.处理器
- Linux 核心--15.Linux内核资源
- Linux 核心--12.Linux内核机制
- Linux 核心--11.网络
- Linux 核心--10.文件系统
- 诺基亚将在更多产品上采用Linux操作系统
- 蛤蟆皮的功效与作用 蛤蟆皮的功效
- Linux 核心--7.PCI设备
