tcp_var.h revision 44078
11541Srgrimes/*
210937Swollman * Copyright (c) 1982, 1986, 1993, 1994, 1995
31541Srgrimes *	The Regents of the University of California.  All rights reserved.
41541Srgrimes *
51541Srgrimes * Redistribution and use in source and binary forms, with or without
61541Srgrimes * modification, are permitted provided that the following conditions
71541Srgrimes * are met:
81541Srgrimes * 1. Redistributions of source code must retain the above copyright
91541Srgrimes *    notice, this list of conditions and the following disclaimer.
101541Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
111541Srgrimes *    notice, this list of conditions and the following disclaimer in the
121541Srgrimes *    documentation and/or other materials provided with the distribution.
131541Srgrimes * 3. All advertising materials mentioning features or use of this software
141541Srgrimes *    must display the following acknowledgement:
151541Srgrimes *	This product includes software developed by the University of
161541Srgrimes *	California, Berkeley and its contributors.
171541Srgrimes * 4. Neither the name of the University nor the names of its contributors
181541Srgrimes *    may be used to endorse or promote products derived from this software
191541Srgrimes *    without specific prior written permission.
201541Srgrimes *
211541Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
221541Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
231541Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
241541Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
251541Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
261541Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
271541Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
281541Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
291541Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
301541Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
311541Srgrimes * SUCH DAMAGE.
321541Srgrimes *
3310937Swollman *	@(#)tcp_var.h	8.4 (Berkeley) 5/24/95
3444078Sdfr * 	$Id: tcp_var.h,v 1.49 1999/01/20 17:32:00 fenner Exp $
351541Srgrimes */
361541Srgrimes
372169Spaul#ifndef _NETINET_TCP_VAR_H_
382169Spaul#define _NETINET_TCP_VAR_H_
391541Srgrimes/*
401541Srgrimes * Kernel variables for tcp.
411541Srgrimes */
421541Srgrimes
431541Srgrimes/*
441541Srgrimes * Tcp control block, one per tcp; fields:
4532821Sdg * Organized for 16 byte cacheline efficiency.
461541Srgrimes */
471541Srgrimesstruct tcpcb {
4838513Sdfr	struct	mbuf *t_segq;
4932821Sdg	int	t_dupacks;		/* consecutive dup acks recd */
5032821Sdg	struct	tcpiphdr *t_template;	/* skeletal packet for transmit */
5132821Sdg
5232821Sdg	int	t_timer[TCPT_NTIMERS];	/* tcp timers */
5332821Sdg
5432821Sdg	struct	inpcb *t_inpcb;		/* back pointer to internet pcb */
5511187Swollman	int	t_state;		/* state of this connection */
5611187Swollman	u_int	t_flags;
5742902Sfenner#define	TF_ACKNOW	0x00001		/* ack peer immediately */
5842902Sfenner#define	TF_DELACK	0x00002		/* ack, but try to delay it */
5942902Sfenner#define	TF_NODELAY	0x00004		/* don't delay packets to coalesce */
6042902Sfenner#define	TF_NOOPT	0x00008		/* don't use tcp options */
6142902Sfenner#define	TF_SENTFIN	0x00010		/* have sent FIN */
6242902Sfenner#define	TF_REQ_SCALE	0x00020		/* have/will request window scaling */
6342902Sfenner#define	TF_RCVD_SCALE	0x00040		/* other side has requested scaling */
6442902Sfenner#define	TF_REQ_TSTMP	0x00080		/* have/will request timestamps */
6542902Sfenner#define	TF_RCVD_TSTMP	0x00100		/* a timestamp was received in SYN */
6642902Sfenner#define	TF_SACK_PERMIT	0x00200		/* other side said I could SACK */
6742902Sfenner#define	TF_NEEDSYN	0x00400		/* send SYN (implicit state) */
6842902Sfenner#define	TF_NEEDFIN	0x00800		/* send FIN (implicit state) */
6942902Sfenner#define	TF_NOPUSH	0x01000		/* don't push */
7042902Sfenner#define	TF_REQ_CC	0x02000		/* have/will request CC */
7142902Sfenner#define	TF_RCVD_CC	0x04000		/* a CC was received in SYN */
7242902Sfenner#define	TF_SENDCCNEW	0x08000		/* send CCnew instead of CC in SYN */
7342902Sfenner#define	TF_MORETOCOME	0x10000		/* More data to be appended to sock */
7432821Sdg	int	t_force;		/* 1 if forcing out a byte */
751541Srgrimes
761541Srgrimes	tcp_seq	snd_una;		/* send unacknowledged */
7732821Sdg	tcp_seq	snd_max;		/* highest sequence number sent;
7832821Sdg					 * used to recognize retransmits
7932821Sdg					 */
801541Srgrimes	tcp_seq	snd_nxt;		/* send next */
811541Srgrimes	tcp_seq	snd_up;			/* send urgent pointer */
8232821Sdg
831541Srgrimes	tcp_seq	snd_wl1;		/* window update seg seq number */
841541Srgrimes	tcp_seq	snd_wl2;		/* window update seg ack number */
851541Srgrimes	tcp_seq	iss;			/* initial send sequence number */
8632821Sdg	tcp_seq	irs;			/* initial receive sequence number */
8732821Sdg
8832821Sdg	tcp_seq	rcv_nxt;		/* receive next */
8932821Sdg	tcp_seq	rcv_adv;		/* advertised window */
901541Srgrimes	u_long	rcv_wnd;		/* receive window */
911541Srgrimes	tcp_seq	rcv_up;			/* receive urgent pointer */
9232821Sdg
9332821Sdg	u_long	snd_wnd;		/* send window */
941541Srgrimes	u_long	snd_cwnd;		/* congestion-controlled window */
9513765Smpp	u_long	snd_ssthresh;		/* snd_cwnd size threshold for
961541Srgrimes					 * for slow start exponential to
971541Srgrimes					 * linear switch
981541Srgrimes					 */
9932821Sdg	u_int	t_maxopd;		/* mss plus options */
10032821Sdg
10111187Swollman	u_int	t_idle;			/* inactivity time */
10232821Sdg	u_long	t_duration;		/* connection duration */
10311187Swollman	int	t_rtt;			/* round trip time */
1041541Srgrimes	tcp_seq	t_rtseq;		/* sequence number being timed */
10532821Sdg
10632821Sdg	int	t_rxtcur;		/* current retransmit value */
10732821Sdg	u_int	t_maxseg;		/* maximum segment size */
10811187Swollman	int	t_srtt;			/* smoothed round-trip time */
10911187Swollman	int	t_rttvar;		/* variance in round-trip time */
11032821Sdg
11132821Sdg	int	t_rxtshift;		/* log(2) of rexmt exp. backoff */
11211187Swollman	u_int	t_rttmin;		/* minimum rtt allowed */
11332821Sdg	u_long	t_rttupdated;		/* number of times rtt sampled */
1141541Srgrimes	u_long	max_sndwnd;		/* largest window peer has offered */
1151541Srgrimes
11632821Sdg	int	t_softerror;		/* possible error not yet reported */
1171541Srgrimes/* out-of-band data */
1181541Srgrimes	char	t_oobflags;		/* have some */
1191541Srgrimes	char	t_iobc;			/* input character */
1201541Srgrimes#define	TCPOOB_HAVEDATA	0x01
1211541Srgrimes#define	TCPOOB_HADDATA	0x02
1221541Srgrimes/* RFC 1323 variables */
1231541Srgrimes	u_char	snd_scale;		/* window scaling for send window */
1241541Srgrimes	u_char	rcv_scale;		/* window scaling for recv window */
1251541Srgrimes	u_char	request_r_scale;	/* pending window scaling */
1261541Srgrimes	u_char	requested_s_scale;
1271541Srgrimes	u_long	ts_recent;		/* timestamp echo data */
12832821Sdg
1291541Srgrimes	u_long	ts_recent_age;		/* when last updated */
1301541Srgrimes	tcp_seq	last_ack_sent;
1316247Swollman/* RFC 1644 variables */
1326247Swollman	tcp_cc	cc_send;		/* send connection count */
1336247Swollman	tcp_cc	cc_recv;		/* receive connection count */
1341541Srgrimes};
1351541Srgrimes
1366247Swollman/*
1376247Swollman * Structure to hold TCP options that are only used during segment
1386247Swollman * processing (in tcp_input), but not held in the tcpcb.
1396247Swollman * It's basically used to reduce the number of parameters
1406247Swollman * to tcp_dooptions.
1416247Swollman */
1426247Swollmanstruct tcpopt {
1436247Swollman	u_long	to_flag;		/* which options are present */
1446247Swollman#define TOF_TS		0x0001		/* timestamp */
1456247Swollman#define TOF_CC		0x0002		/* CC and CCnew are exclusive */
1466247Swollman#define TOF_CCNEW	0x0004
1476247Swollman#define	TOF_CCECHO	0x0008
1486247Swollman	u_long	to_tsval;
1496247Swollman	u_long	to_tsecr;
1506247Swollman	tcp_cc	to_cc;		/* holds CC or CCnew */
1516247Swollman	tcp_cc	to_ccecho;
1526247Swollman};
1536247Swollman
1546247Swollman/*
1556247Swollman * The TAO cache entry which is stored in the protocol family specific
1566247Swollman * portion of the route metrics.
1576247Swollman */
1586247Swollmanstruct rmxp_tao {
1596247Swollman	tcp_cc	tao_cc;			/* latest CC in valid SYN */
1606247Swollman	tcp_cc	tao_ccsent;		/* latest CC sent to peer */
1616247Swollman	u_short	tao_mssopt;		/* peer's cached MSS */
1626247Swollman#ifdef notyet
1636247Swollman	u_short	tao_flags;		/* cache status flags */
1646247Swollman#define	TAOF_DONT	0x0001		/* peer doesn't understand rfc1644 */
1656247Swollman#define	TAOF_OK		0x0002		/* peer does understand rfc1644 */
1666247Swollman#define	TAOF_UNDEF	0		/* we don't know yet */
1676247Swollman#endif /* notyet */
1686247Swollman};
1696283Swollman#define rmx_taop(r)	((struct rmxp_tao *)(r).rmx_filler)
1706247Swollman
1711541Srgrimes#define	intotcpcb(ip)	((struct tcpcb *)(ip)->inp_ppcb)
1721541Srgrimes#define	sototcpcb(so)	(intotcpcb(sotoinpcb(so)))
1731541Srgrimes
1741541Srgrimes/*
1751541Srgrimes * The smoothed round-trip time and estimated variance
1761541Srgrimes * are stored as fixed point numbers scaled by the values below.
1771541Srgrimes * For convenience, these scales are also used in smoothing the average
1781541Srgrimes * (smoothed = (1/scale)sample + ((scale-1)/scale)smoothed).
1791541Srgrimes * With these scales, srtt has 3 bits to the right of the binary point,
1801541Srgrimes * and thus an "ALPHA" of 0.875.  rttvar has 2 bits to the right of the
1811541Srgrimes * binary point, and is smoothed with an ALPHA of 0.75.
1821541Srgrimes */
18314753Swollman#define	TCP_RTT_SCALE		32	/* multiplier for srtt; 3 bits frac. */
18414753Swollman#define	TCP_RTT_SHIFT		5	/* shift for srtt; 3 bits frac. */
18514753Swollman#define	TCP_RTTVAR_SCALE	16	/* multiplier for rttvar; 2 bits */
18614753Swollman#define	TCP_RTTVAR_SHIFT	4	/* shift for rttvar; 2 bits */
18714753Swollman#define	TCP_DELTA_SHIFT		2	/* see tcp_input.c */
1881541Srgrimes
1891541Srgrimes/*
1901541Srgrimes * The initial retransmission should happen at rtt + 4 * rttvar.
1911541Srgrimes * Because of the way we do the smoothing, srtt and rttvar
1921541Srgrimes * will each average +1/2 tick of bias.  When we compute
1931541Srgrimes * the retransmit timer, we want 1/2 tick of rounding and
1941541Srgrimes * 1 extra tick because of +-1/2 tick uncertainty in the
1951541Srgrimes * firing of the timer.  The bias will give us exactly the
1961541Srgrimes * 1.5 tick we need.  But, because the bias is
1971541Srgrimes * statistical, we have to test that we don't drop below
1981541Srgrimes * the minimum feasible timer (which is 2 ticks).
19914753Swollman * This version of the macro adapted from a paper by Lawrence
20014753Swollman * Brakmo and Larry Peterson which outlines a problem caused
20114753Swollman * by insufficient precision in the original implementation,
20214753Swollman * which results in inappropriately large RTO values for very
20314753Swollman * fast networks.
2041541Srgrimes */
2051541Srgrimes#define	TCP_REXMTVAL(tp) \
20635419Sdg	max((tp)->t_rttmin, (((tp)->t_srtt >> (TCP_RTT_SHIFT - TCP_DELTA_SHIFT))  \
20716141Swollman	  + (tp)->t_rttvar) >> TCP_DELTA_SHIFT)
2081541Srgrimes
2091541Srgrimes/*
2101541Srgrimes * TCP statistics.
2111541Srgrimes * Many of these should be kept per connection,
2121541Srgrimes * but that's inconvenient at the moment.
2131541Srgrimes */
2141541Srgrimesstruct	tcpstat {
2151541Srgrimes	u_long	tcps_connattempt;	/* connections initiated */
2161541Srgrimes	u_long	tcps_accepts;		/* connections accepted */
2171541Srgrimes	u_long	tcps_connects;		/* connections established */
2181541Srgrimes	u_long	tcps_drops;		/* connections dropped */
2191541Srgrimes	u_long	tcps_conndrops;		/* embryonic connections dropped */
2201541Srgrimes	u_long	tcps_closed;		/* conn. closed (includes drops) */
2211541Srgrimes	u_long	tcps_segstimed;		/* segs where we tried to get rtt */
2221541Srgrimes	u_long	tcps_rttupdated;	/* times we succeeded */
2231541Srgrimes	u_long	tcps_delack;		/* delayed acks sent */
2241541Srgrimes	u_long	tcps_timeoutdrop;	/* conn. dropped in rxmt timeout */
2251541Srgrimes	u_long	tcps_rexmttimeo;	/* retransmit timeouts */
2261541Srgrimes	u_long	tcps_persisttimeo;	/* persist timeouts */
2271541Srgrimes	u_long	tcps_keeptimeo;		/* keepalive timeouts */
2281541Srgrimes	u_long	tcps_keepprobe;		/* keepalive probes sent */
2291541Srgrimes	u_long	tcps_keepdrops;		/* connections dropped in keepalive */
2301541Srgrimes
2311541Srgrimes	u_long	tcps_sndtotal;		/* total packets sent */
2321541Srgrimes	u_long	tcps_sndpack;		/* data packets sent */
2331541Srgrimes	u_long	tcps_sndbyte;		/* data bytes sent */
2341541Srgrimes	u_long	tcps_sndrexmitpack;	/* data packets retransmitted */
2351541Srgrimes	u_long	tcps_sndrexmitbyte;	/* data bytes retransmitted */
2361541Srgrimes	u_long	tcps_sndacks;		/* ack-only packets sent */
2371541Srgrimes	u_long	tcps_sndprobe;		/* window probes sent */
2381541Srgrimes	u_long	tcps_sndurg;		/* packets sent with URG only */
2391541Srgrimes	u_long	tcps_sndwinup;		/* window update-only packets sent */
2401541Srgrimes	u_long	tcps_sndctrl;		/* control (SYN|FIN|RST) packets sent */
2411541Srgrimes
2421541Srgrimes	u_long	tcps_rcvtotal;		/* total packets received */
2431541Srgrimes	u_long	tcps_rcvpack;		/* packets received in sequence */
2441541Srgrimes	u_long	tcps_rcvbyte;		/* bytes received in sequence */
2451541Srgrimes	u_long	tcps_rcvbadsum;		/* packets received with ccksum errs */
2461541Srgrimes	u_long	tcps_rcvbadoff;		/* packets received with bad offset */
2471541Srgrimes	u_long	tcps_rcvshort;		/* packets received too short */
2481541Srgrimes	u_long	tcps_rcvduppack;	/* duplicate-only packets received */
2491541Srgrimes	u_long	tcps_rcvdupbyte;	/* duplicate-only bytes received */
2501541Srgrimes	u_long	tcps_rcvpartduppack;	/* packets with some duplicate data */
2511541Srgrimes	u_long	tcps_rcvpartdupbyte;	/* dup. bytes in part-dup. packets */
2521541Srgrimes	u_long	tcps_rcvoopack;		/* out-of-order packets received */
2531541Srgrimes	u_long	tcps_rcvoobyte;		/* out-of-order bytes received */
2541541Srgrimes	u_long	tcps_rcvpackafterwin;	/* packets with data after window */
2551541Srgrimes	u_long	tcps_rcvbyteafterwin;	/* bytes rcvd after window */
2561541Srgrimes	u_long	tcps_rcvafterclose;	/* packets rcvd after "close" */
2571541Srgrimes	u_long	tcps_rcvwinprobe;	/* rcvd window probe packets */
2581541Srgrimes	u_long	tcps_rcvdupack;		/* rcvd duplicate acks */
2591541Srgrimes	u_long	tcps_rcvacktoomuch;	/* rcvd acks for unsent data */
2601541Srgrimes	u_long	tcps_rcvackpack;	/* rcvd ack packets */
2611541Srgrimes	u_long	tcps_rcvackbyte;	/* bytes acked by rcvd acks */
2621541Srgrimes	u_long	tcps_rcvwinupd;		/* rcvd window update packets */
2631541Srgrimes	u_long	tcps_pawsdrop;		/* segments dropped due to PAWS */
2641541Srgrimes	u_long	tcps_predack;		/* times hdr predict ok for acks */
2651541Srgrimes	u_long	tcps_preddat;		/* times hdr predict ok for data pkts */
2661541Srgrimes	u_long	tcps_pcbcachemiss;
2679263Swollman	u_long	tcps_cachedrtt;		/* times cached RTT in route updated */
2689263Swollman	u_long	tcps_cachedrttvar;	/* times cached rttvar updated */
2699263Swollman	u_long	tcps_cachedssthresh;	/* times cached ssthresh updated */
2709470Swollman	u_long	tcps_usedrtt;		/* times RTT initialized from route */
2719470Swollman	u_long	tcps_usedrttvar;	/* times RTTVAR initialized from rt */
2729470Swollman	u_long	tcps_usedssthresh;	/* times ssthresh initialized from rt*/
27310937Swollman	u_long	tcps_persistdrop;	/* timeout in persist state */
27410937Swollman	u_long	tcps_badsyn;		/* bogus SYN, e.g. premature ACK */
27511415Swollman	u_long	tcps_mturesent;		/* resends due to MTU discovery */
27614281Sbde	u_long	tcps_listendrop;	/* listen queue overflows */
2771541Srgrimes};
2781541Srgrimes
2796247Swollman/*
28036079Swollman * TCB structure exported to user-land via sysctl(3).
28137183Sjhay * Evil hack: declare only if in_pcb.h and sys/socketvar.h have been
28237183Sjhay * included.  Not all of our clients do.
28336079Swollman */
28437183Sjhay#if defined(_NETINET_IN_PCB_H_) && defined(_SYS_SOCKETVAR_H_)
28536079Swollmanstruct	xtcpcb {
28636079Swollman	size_t	xt_len;
28736079Swollman	struct	inpcb	xt_inp;
28836079Swollman	struct	tcpcb	xt_tp;
28936079Swollman	struct	xsocket	xt_socket;
29036079Swollman	u_quad_t	xt_alignment_hack;
29136079Swollman};
29236079Swollman#endif
29336079Swollman
29436079Swollman/*
2956247Swollman * Names for TCP sysctl objects
2966247Swollman */
2976247Swollman#define	TCPCTL_DO_RFC1323	1	/* use RFC-1323 extensions */
2986247Swollman#define	TCPCTL_DO_RFC1644	2	/* use RFC-1644 extensions */
2996247Swollman#define	TCPCTL_MSSDFLT		3	/* MSS default */
3006472Swollman#define TCPCTL_STATS		4	/* statistics (read-only) */
3016472Swollman#define	TCPCTL_RTTDFLT		5	/* default RTT estimate */
3026472Swollman#define	TCPCTL_KEEPIDLE		6	/* keepalive idle timer */
3036472Swollman#define	TCPCTL_KEEPINTVL	7	/* interval to send keepalives */
30418281Spst#define	TCPCTL_SENDSPACE	8	/* send buffer space */
30518281Spst#define	TCPCTL_RECVSPACE	9	/* receive buffer space */
30618281Spst#define	TCPCTL_KEEPINIT		10	/* receive buffer space */
30736079Swollman#define	TCPCTL_PCBLIST		11	/* list of all outstanding PCBs */
30836079Swollman#define TCPCTL_MAXID		12
3096247Swollman
3106247Swollman#define TCPCTL_NAMES { \
3116247Swollman	{ 0, 0 }, \
3126348Swollman	{ "rfc1323", CTLTYPE_INT }, \
3136348Swollman	{ "rfc1644", CTLTYPE_INT }, \
3146247Swollman	{ "mssdflt", CTLTYPE_INT }, \
3156472Swollman	{ "stats", CTLTYPE_STRUCT }, \
3166472Swollman	{ "rttdflt", CTLTYPE_INT }, \
3176472Swollman	{ "keepidle", CTLTYPE_INT }, \
3186472Swollman	{ "keepintvl", CTLTYPE_INT }, \
3196472Swollman	{ "sendspace", CTLTYPE_INT }, \
3206472Swollman	{ "recvspace", CTLTYPE_INT }, \
32118281Spst	{ "keepinit", CTLTYPE_INT }, \
32236079Swollman	{ "pcblist", CTLTYPE_STRUCT }, \
3236247Swollman}
3246247Swollman
32544078Sdfr
3261541Srgrimes#ifdef KERNEL
32744078Sdfr#ifdef SYSCTL_DECL
32844078SdfrSYSCTL_DECL(_net_inet_tcp);
32944078Sdfr#endif
33044078Sdfr
3317684Sdgextern	struct inpcbhead tcb;		/* head of queue of active tcpcb's */
3327684Sdgextern	struct inpcbinfo tcbinfo;
3336348Swollmanextern	struct tcpstat tcpstat;	/* tcp statistics */
3347090Sbdeextern	int tcp_mssdflt;	/* XXX */
3356348Swollmanextern	u_long tcp_now;		/* for RFC 1323 timestamps */
33633846Sdgextern	int tcp_delack_enabled;
3371541Srgrimes
3381541Srgrimesvoid	 tcp_canceltimers __P((struct tcpcb *));
3391541Srgrimesstruct tcpcb *
3401541Srgrimes	 tcp_close __P((struct tcpcb *));
34112881Sbdevoid	 tcp_ctlinput __P((int, struct sockaddr *, void *));
34238482Swollmanint	 tcp_ctloutput __P((struct socket *, struct sockopt *));
3431541Srgrimesstruct tcpcb *
3441541Srgrimes	 tcp_drop __P((struct tcpcb *, int));
3451541Srgrimesvoid	 tcp_drain __P((void));
3461541Srgrimesvoid	 tcp_fasttimo __P((void));
3476247Swollmanstruct rmxp_tao *
3486247Swollman	 tcp_gettaocache __P((struct inpcb *));
3491541Srgrimesvoid	 tcp_init __P((void));
3501541Srgrimesvoid	 tcp_input __P((struct mbuf *, int));
3516247Swollmanvoid	 tcp_mss __P((struct tcpcb *, int));
3526247Swollmanint	 tcp_mssopt __P((struct tcpcb *));
35312635Swollmanvoid	 tcp_mtudisc __P((struct inpcb *, int));
3541541Srgrimesstruct tcpcb *
3551541Srgrimes	 tcp_newtcpcb __P((struct inpcb *));
3561541Srgrimesint	 tcp_output __P((struct tcpcb *));
3571541Srgrimesvoid	 tcp_quench __P((struct inpcb *, int));
3581541Srgrimesvoid	 tcp_respond __P((struct tcpcb *,
35937622Sbde	    struct tcpiphdr *, struct mbuf *, tcp_seq, tcp_seq, int));
3606247Swollmanstruct rtentry *
3616247Swollman	 tcp_rtlookup __P((struct inpcb *));
3621541Srgrimesvoid	 tcp_setpersist __P((struct tcpcb *));
3631541Srgrimesvoid	 tcp_slowtimo __P((void));
3641541Srgrimesstruct tcpiphdr *
3651541Srgrimes	 tcp_template __P((struct tcpcb *));
3661541Srgrimesstruct tcpcb *
3671541Srgrimes	 tcp_timers __P((struct tcpcb *, int));
3681541Srgrimesvoid	 tcp_trace __P((int, int, struct tcpcb *, struct tcpiphdr *, int));
3699470Swollman
37017096Swollmanextern	struct pr_usrreqs tcp_usrreqs;
3719470Swollmanextern	u_long tcp_sendspace;
3729470Swollmanextern	u_long tcp_recvspace;
3739470Swollman
3746348Swollman#endif /* KERNEL */
3752169Spaul
3766348Swollman#endif /* _NETINET_TCP_VAR_H_ */
377