⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tcp_var.h

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 H
字号:
/* @(#)tcp_var.h	4.4		(ULTRIX)	3/8/91; *//************************************************************************ *									* *			Copyright (c) 1985 by				* *		Digital Equipment Corporation, Maynard, MA		* *			All rights reserved.				* *									* *   This software is furnished under a license and may be used and	* *   copied  only  in accordance with the terms of such license and	* *   with the  inclusion  of  the  above  copyright  notice.   This	* *   software  or  any  other copies thereof may not be provided or	* *   otherwise made available to any other person.  No title to and	* *   ownership of the software is hereby transferred.			* *									* *   This software is  derived  from  software  received  from  the	* *   University    of   California,   Berkeley,   and   from   Bell	* *   Laboratories.  Use, duplication, or disclosure is  subject  to	* *   restrictions  under  license  agreements  with  University  of	* *   California and with AT&T.						* *									* *   The information in this software is subject to change  without	* *   notice  and should not be construed as a commitment by Digital	* *   Equipment Corporation.						* *									* *   Digital assumes no responsibility for the use  or  reliability	* *   of its software on equipment which is not supplied by Digital.	* *									* ************************************************************************//************************************************************************ *			Modification History				* *									* *	Uttam Shikarpur Nadig - 8/20/90 *		Added tcps_sndrst counter. * *      Michael G. Mc Menemy    - 5/04/89 *              Add XTI support. *	Ursula Sinkewicz	- 3/27/89 *		Defined macro for tcpstatistics as per lp change from *		3/16/89. * *	Larry Cohen  -  01/28/87 *		change define TF_DONTKEEP to TF_NODELAY * *	Larry Cohen  -	09/16/85					* * 		Add 43bsd alpha tape changes for subnet routing		* *									* ************************************************************************//* * Copyright (c) 1982 Regents of the University of California. * All rights reserved.  The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * *	@(#)tcp_var.h	6.3 (Berkeley) 6/8/85 *//* * Kernel variables for tcp. *//* * Tcp control block, one per tcp; fields: */struct tcpcb {	struct	tcpiphdr *seg_next;	/* sequencing queue */	struct	tcpiphdr *seg_prev;	short	t_state;		/* state of this connection */	short	t_timer[TCPT_NTIMERS];	/* tcp timers */	short	t_rxtshift;		/* log(2) of rexmt exp. backoff */        short   t_rxtcur;               /* current retransmit value */	short   t_dupacks;              /* consecutive dup acks recd */	u_short	t_maxseg;		/* maximum segment size */	char	t_force;		/* 1 if forcing out a byte */	u_char	t_flags;#define	TF_ACKNOW	0x01		/* ack peer immediately */#define	TF_DELACK	0x02		/* ack, but try to delay it */#define	TF_NODELAY	0x04		/* don't delay packets to coalesce */#define	TF_NOOPT	0x08		/* don't use tcp options */#define TF_SENTFIN	0x10		/* have sent FIN */	struct	tcpiphdr *t_template;	/* skeletal packet for transmit */	struct	inpcb *t_inpcb;		/* back pointer to internet pcb *//* * The following fields are used as in the protocol specification. * See RFC783, Dec. 1981, page 21. *//* send sequence variables */	tcp_seq	snd_una;		/* send unacknowledged */	tcp_seq	snd_nxt;		/* send next */	tcp_seq	snd_up;			/* send urgent pointer */	tcp_seq	snd_wl1;		/* window update seg seq number */	tcp_seq	snd_wl2;		/* window update seg ack number */	tcp_seq	iss;			/* initial send sequence number */	u_short	snd_wnd;		/* send window *//* receive sequence variables */	u_short	rcv_wnd;		/* receive window */	tcp_seq	rcv_nxt;		/* receive next */	tcp_seq	rcv_up;			/* receive urgent pointer */	tcp_seq	irs;			/* initial receive sequence number *//* * Additional variables for this implementation. *//* receive variables */	tcp_seq	rcv_adv;		/* advertised window *//* retransmit variables */	tcp_seq	snd_max;		/* highest sequence number sent					 * used to recognize retransmits					 *//* congestion control (for source quench) */	u_short	snd_cwnd;		/* congestion-controlled window */        u_short snd_ssthresh;           /* snd_cwnd size threshhold for					 * for slow start exponential to					 * linear switch *//* * transmit timing stuff. * srtt and rttvar are stored as fixed point; for convenience in smoothing, * srtt has 3 bits to the right of the binary point, rttvar has 2. * "Variance" is actually smoothed difference. */	short	t_idle;			/* inactivity time */	short	t_rtt;			/* round trip time */	tcp_seq	t_rtseq;		/* sequence number being timed */	short	t_srtt;			/* smoothed round-trip time */	short	t_rttvar;		/* variance in round-trip time */	u_short max_rcvd;		/* most peer has sent into window */	u_short	max_sndwnd;		/* largest window peer has offered *//* out-of-band data */	char	t_oobflags;		/* have some */#ifdef XTI#define XTI_EXPED_SIZE 16         	/* largest supported expedited data */#endif /* XTI */	char	t_iobc;			/* input character */#define	TCPOOB_HAVEDATA	0x01#define	TCPOOB_HADDATA	0x02#ifdef XTI        int t_acceptmode; 		   /* immediate or deferred */	struct tcp_options xti_inbound_qos;/* incomming tcp options */	struct tcp_options xti_neg_qos;	   /* negotiated tcp options */	struct tcp_options xti_tmpneg_qos; /* tmp negotiated tcp options */	struct tcp_options xti_tcp_defqos; /* tcp options needed by XTI */#endif /* XTI */};#ifdef XTIstruct t_info xti_tcpinfo; /* info needed by XTI - one instance per provider */#endif /* XTI */#define	intotcpcb(ip)	((struct tcpcb *)(ip)->inp_ppcb)#define	sototcpcb(so)	(intotcpcb(sotoinpcb(so)))struct	tcpstat {	u_long	tcps_connattempt;	/* connections initiated */	u_long	tcps_accepts;		/* connections accepted */	u_long	tcps_connects;		/* connections established */	u_long	tcps_drops;		/* connections dropped */	u_long	tcps_conndrops;		/* embryonic connections dropped */	u_long	tcps_closed;		/* conn. closed (includes drops) */	u_long	tcps_segstimed;		/* segs where we tried to get rtt */	u_long	tcps_rttupdated;	/* times we succeeded */	u_long	tcps_delack;		/* delayed acks sent */	u_long	tcps_timeoutdrop;	/* conn. dropped in rxmt timeout */	u_long	tcps_rexmttimeo;	/* retransmit timeouts */	u_long	tcps_persisttimeo;	/* persist timeouts */	u_long	tcps_keeptimeo;		/* keepalive timeouts */	u_long	tcps_keepprobe;		/* keepalive probes sent */	u_long	tcps_keepdrops;		/* connections dropped in keepalive */	u_long	tcps_sndtotal;		/* total packets sent */	u_long	tcps_sndpack;		/* data packets sent */	u_long	tcps_sndbyte;		/* data bytes sent */	u_long	tcps_sndrexmitpack;	/* data packets retransmitted */	u_long	tcps_sndrexmitbyte;	/* data bytes retransmitted */	u_long	tcps_sndacks;		/* ack-only packets sent */	u_long	tcps_sndprobe;		/* window probes sent */	u_long	tcps_sndurg;		/* packets sent with URG only */	u_long	tcps_sndwinup;		/* window update-only packets sent */	u_long	tcps_sndctrl;		/* control (SYN|FIN|RST) packets sent */	u_long	tcps_sndrst;		/* control (RST) packets sent */	u_long	tcps_rcvtotal;		/* total packets received */	u_long	tcps_rcvpack;		/* packets received in sequence */	u_long	tcps_rcvbyte;		/* bytes received in sequence */	u_long	tcps_rcvbadsum;		/* packets received with ccksum errs */	u_long	tcps_rcvbadoff;		/* packets received with bad offset */	u_long	tcps_rcvshort;		/* packets received too short */	u_long	tcps_rcvduppack;	/* duplicate-only packets received */	u_long	tcps_rcvdupbyte;	/* duplicate-only bytes received */	u_long	tcps_rcvpartduppack;	/* packets with some duplicate data */	u_long	tcps_rcvpartdupbyte;	/* dup. bytes in part-dup. packets */	u_long	tcps_rcvoopack;		/* out-of-order packets received */	u_long	tcps_rcvoobyte;		/* out-of-order bytes received */	u_long	tcps_rcvpackafterwin;	/* packets with data after window */	u_long	tcps_rcvbyteafterwin;	/* bytes rcvd after window */	u_long	tcps_rcvafterclose;	/* packets rcvd after "close" */	u_long	tcps_rcvwinprobe;	/* rcvd window probe packets */	u_long	tcps_rcvdupack;		/* rcvd duplicate acks */	u_long	tcps_rcvacktoomuch;	/* rcvd acks for unsent data */	u_long	tcps_rcvackpack;	/* rcvd ack packets */	u_long	tcps_rcvackbyte;	/* bytes acked by rcvd acks */	u_long	tcps_rcvwinupd;		/* rcvd window update packets */};#define TCPSTAT(x) tcpstat.x#ifdef KERNELstruct	inpcb tcb;		/* head of queue of active tcpcb's */extern  struct  lock_t lk_tcb;	/* SMP: tcb lock */struct	tcpstat tcpstat;	/* tcp statistics */extern  struct  lock_t lk_tcpstat; /* SMP: tcpstat lock. */struct	tcpiphdr *tcp_template();struct	tcpcb *tcp_close(), *tcp_drop();struct	tcpcb *tcp_timers(), *tcp_disconnect(), *tcp_usrclosed();#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -