tcp_var.h revision 50673
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 3450477Speter * $FreeBSD: head/sys/netinet/tcp_var.h 50673 1999-08-30 21:17:07Z jlemon $ 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 5250673Sjlemon struct callout *tt_rexmt; /* retransmit timer */ 5350673Sjlemon struct callout *tt_persist; /* retransmit persistence */ 5450673Sjlemon struct callout *tt_keep; /* keepalive */ 5550673Sjlemon struct callout *tt_2msl; /* 2*msl TIME_WAIT timer */ 5650673Sjlemon struct callout *tt_delack; /* delayed ACK timer */ 5732821Sdg 5832821Sdg struct inpcb *t_inpcb; /* back pointer to internet pcb */ 5911187Swollman int t_state; /* state of this connection */ 6011187Swollman u_int t_flags; 6142902Sfenner#define TF_ACKNOW 0x00001 /* ack peer immediately */ 6242902Sfenner#define TF_DELACK 0x00002 /* ack, but try to delay it */ 6342902Sfenner#define TF_NODELAY 0x00004 /* don't delay packets to coalesce */ 6442902Sfenner#define TF_NOOPT 0x00008 /* don't use tcp options */ 6542902Sfenner#define TF_SENTFIN 0x00010 /* have sent FIN */ 6642902Sfenner#define TF_REQ_SCALE 0x00020 /* have/will request window scaling */ 6742902Sfenner#define TF_RCVD_SCALE 0x00040 /* other side has requested scaling */ 6842902Sfenner#define TF_REQ_TSTMP 0x00080 /* have/will request timestamps */ 6942902Sfenner#define TF_RCVD_TSTMP 0x00100 /* a timestamp was received in SYN */ 7042902Sfenner#define TF_SACK_PERMIT 0x00200 /* other side said I could SACK */ 7142902Sfenner#define TF_NEEDSYN 0x00400 /* send SYN (implicit state) */ 7242902Sfenner#define TF_NEEDFIN 0x00800 /* send FIN (implicit state) */ 7342902Sfenner#define TF_NOPUSH 0x01000 /* don't push */ 7442902Sfenner#define TF_REQ_CC 0x02000 /* have/will request CC */ 7542902Sfenner#define TF_RCVD_CC 0x04000 /* a CC was received in SYN */ 7642902Sfenner#define TF_SENDCCNEW 0x08000 /* send CCnew instead of CC in SYN */ 7742902Sfenner#define TF_MORETOCOME 0x10000 /* More data to be appended to sock */ 7832821Sdg int t_force; /* 1 if forcing out a byte */ 791541Srgrimes 801541Srgrimes tcp_seq snd_una; /* send unacknowledged */ 8132821Sdg tcp_seq snd_max; /* highest sequence number sent; 8232821Sdg * used to recognize retransmits 8332821Sdg */ 841541Srgrimes tcp_seq snd_nxt; /* send next */ 851541Srgrimes tcp_seq snd_up; /* send urgent pointer */ 8632821Sdg 871541Srgrimes tcp_seq snd_wl1; /* window update seg seq number */ 881541Srgrimes tcp_seq snd_wl2; /* window update seg ack number */ 891541Srgrimes tcp_seq iss; /* initial send sequence number */ 9032821Sdg tcp_seq irs; /* initial receive sequence number */ 9132821Sdg 9232821Sdg tcp_seq rcv_nxt; /* receive next */ 9332821Sdg tcp_seq rcv_adv; /* advertised window */ 941541Srgrimes u_long rcv_wnd; /* receive window */ 951541Srgrimes tcp_seq rcv_up; /* receive urgent pointer */ 9632821Sdg 9732821Sdg u_long snd_wnd; /* send window */ 981541Srgrimes u_long snd_cwnd; /* congestion-controlled window */ 9913765Smpp u_long snd_ssthresh; /* snd_cwnd size threshold for 1001541Srgrimes * for slow start exponential to 1011541Srgrimes * linear switch 1021541Srgrimes */ 10332821Sdg u_int t_maxopd; /* mss plus options */ 10432821Sdg 10550673Sjlemon u_long t_rcvtime; /* inactivity time */ 10650673Sjlemon u_long t_starttime; /* time connection was established */ 10750673Sjlemon int t_rtttime; /* round trip time */ 1081541Srgrimes tcp_seq t_rtseq; /* sequence number being timed */ 10932821Sdg 11050673Sjlemon int t_rxtcur; /* current retransmit value (ticks) */ 11132821Sdg u_int t_maxseg; /* maximum segment size */ 11211187Swollman int t_srtt; /* smoothed round-trip time */ 11311187Swollman int t_rttvar; /* variance in round-trip time */ 11432821Sdg 11532821Sdg int t_rxtshift; /* log(2) of rexmt exp. backoff */ 11611187Swollman u_int t_rttmin; /* minimum rtt allowed */ 11732821Sdg u_long t_rttupdated; /* number of times rtt sampled */ 1181541Srgrimes u_long max_sndwnd; /* largest window peer has offered */ 1191541Srgrimes 12032821Sdg int t_softerror; /* possible error not yet reported */ 1211541Srgrimes/* out-of-band data */ 1221541Srgrimes char t_oobflags; /* have some */ 1231541Srgrimes char t_iobc; /* input character */ 1241541Srgrimes#define TCPOOB_HAVEDATA 0x01 1251541Srgrimes#define TCPOOB_HADDATA 0x02 1261541Srgrimes/* RFC 1323 variables */ 1271541Srgrimes u_char snd_scale; /* window scaling for send window */ 1281541Srgrimes u_char rcv_scale; /* window scaling for recv window */ 1291541Srgrimes u_char request_r_scale; /* pending window scaling */ 1301541Srgrimes u_char requested_s_scale; 1311541Srgrimes u_long ts_recent; /* timestamp echo data */ 13232821Sdg 1331541Srgrimes u_long ts_recent_age; /* when last updated */ 1341541Srgrimes tcp_seq last_ack_sent; 1356247Swollman/* RFC 1644 variables */ 1366247Swollman tcp_cc cc_send; /* send connection count */ 1376247Swollman tcp_cc cc_recv; /* receive connection count */ 13850673Sjlemon/* experimental */ 13950673Sjlemon u_long snd_cwnd_prev; /* cwnd prior to retransmit */ 14050673Sjlemon u_long snd_ssthresh_prev; /* ssthresh prior to retransmit */ 14150673Sjlemon u_long t_badrxtwin; /* window for retransmit recovery */ 1421541Srgrimes}; 1431541Srgrimes 1446247Swollman/* 1456247Swollman * Structure to hold TCP options that are only used during segment 1466247Swollman * processing (in tcp_input), but not held in the tcpcb. 1476247Swollman * It's basically used to reduce the number of parameters 1486247Swollman * to tcp_dooptions. 1496247Swollman */ 1506247Swollmanstruct tcpopt { 1516247Swollman u_long to_flag; /* which options are present */ 1526247Swollman#define TOF_TS 0x0001 /* timestamp */ 1536247Swollman#define TOF_CC 0x0002 /* CC and CCnew are exclusive */ 1546247Swollman#define TOF_CCNEW 0x0004 1556247Swollman#define TOF_CCECHO 0x0008 1566247Swollman u_long to_tsval; 1576247Swollman u_long to_tsecr; 1586247Swollman tcp_cc to_cc; /* holds CC or CCnew */ 1596247Swollman tcp_cc to_ccecho; 1606247Swollman}; 1616247Swollman 1626247Swollman/* 1636247Swollman * The TAO cache entry which is stored in the protocol family specific 1646247Swollman * portion of the route metrics. 1656247Swollman */ 1666247Swollmanstruct rmxp_tao { 1676247Swollman tcp_cc tao_cc; /* latest CC in valid SYN */ 1686247Swollman tcp_cc tao_ccsent; /* latest CC sent to peer */ 1696247Swollman u_short tao_mssopt; /* peer's cached MSS */ 1706247Swollman#ifdef notyet 1716247Swollman u_short tao_flags; /* cache status flags */ 1726247Swollman#define TAOF_DONT 0x0001 /* peer doesn't understand rfc1644 */ 1736247Swollman#define TAOF_OK 0x0002 /* peer does understand rfc1644 */ 1746247Swollman#define TAOF_UNDEF 0 /* we don't know yet */ 1756247Swollman#endif /* notyet */ 1766247Swollman}; 1776283Swollman#define rmx_taop(r) ((struct rmxp_tao *)(r).rmx_filler) 1786247Swollman 1791541Srgrimes#define intotcpcb(ip) ((struct tcpcb *)(ip)->inp_ppcb) 1801541Srgrimes#define sototcpcb(so) (intotcpcb(sotoinpcb(so))) 1811541Srgrimes 1821541Srgrimes/* 1831541Srgrimes * The smoothed round-trip time and estimated variance 1841541Srgrimes * are stored as fixed point numbers scaled by the values below. 1851541Srgrimes * For convenience, these scales are also used in smoothing the average 1861541Srgrimes * (smoothed = (1/scale)sample + ((scale-1)/scale)smoothed). 1871541Srgrimes * With these scales, srtt has 3 bits to the right of the binary point, 1881541Srgrimes * and thus an "ALPHA" of 0.875. rttvar has 2 bits to the right of the 1891541Srgrimes * binary point, and is smoothed with an ALPHA of 0.75. 1901541Srgrimes */ 19114753Swollman#define TCP_RTT_SCALE 32 /* multiplier for srtt; 3 bits frac. */ 19214753Swollman#define TCP_RTT_SHIFT 5 /* shift for srtt; 3 bits frac. */ 19314753Swollman#define TCP_RTTVAR_SCALE 16 /* multiplier for rttvar; 2 bits */ 19414753Swollman#define TCP_RTTVAR_SHIFT 4 /* shift for rttvar; 2 bits */ 19514753Swollman#define TCP_DELTA_SHIFT 2 /* see tcp_input.c */ 1961541Srgrimes 1971541Srgrimes/* 1981541Srgrimes * The initial retransmission should happen at rtt + 4 * rttvar. 1991541Srgrimes * Because of the way we do the smoothing, srtt and rttvar 2001541Srgrimes * will each average +1/2 tick of bias. When we compute 2011541Srgrimes * the retransmit timer, we want 1/2 tick of rounding and 2021541Srgrimes * 1 extra tick because of +-1/2 tick uncertainty in the 2031541Srgrimes * firing of the timer. The bias will give us exactly the 2041541Srgrimes * 1.5 tick we need. But, because the bias is 2051541Srgrimes * statistical, we have to test that we don't drop below 2061541Srgrimes * the minimum feasible timer (which is 2 ticks). 20714753Swollman * This version of the macro adapted from a paper by Lawrence 20814753Swollman * Brakmo and Larry Peterson which outlines a problem caused 20914753Swollman * by insufficient precision in the original implementation, 21014753Swollman * which results in inappropriately large RTO values for very 21114753Swollman * fast networks. 2121541Srgrimes */ 2131541Srgrimes#define TCP_REXMTVAL(tp) \ 21435419Sdg max((tp)->t_rttmin, (((tp)->t_srtt >> (TCP_RTT_SHIFT - TCP_DELTA_SHIFT)) \ 21516141Swollman + (tp)->t_rttvar) >> TCP_DELTA_SHIFT) 2161541Srgrimes 2171541Srgrimes/* 2181541Srgrimes * TCP statistics. 2191541Srgrimes * Many of these should be kept per connection, 2201541Srgrimes * but that's inconvenient at the moment. 2211541Srgrimes */ 2221541Srgrimesstruct tcpstat { 2231541Srgrimes u_long tcps_connattempt; /* connections initiated */ 2241541Srgrimes u_long tcps_accepts; /* connections accepted */ 2251541Srgrimes u_long tcps_connects; /* connections established */ 2261541Srgrimes u_long tcps_drops; /* connections dropped */ 2271541Srgrimes u_long tcps_conndrops; /* embryonic connections dropped */ 2281541Srgrimes u_long tcps_closed; /* conn. closed (includes drops) */ 2291541Srgrimes u_long tcps_segstimed; /* segs where we tried to get rtt */ 2301541Srgrimes u_long tcps_rttupdated; /* times we succeeded */ 2311541Srgrimes u_long tcps_delack; /* delayed acks sent */ 2321541Srgrimes u_long tcps_timeoutdrop; /* conn. dropped in rxmt timeout */ 2331541Srgrimes u_long tcps_rexmttimeo; /* retransmit timeouts */ 2341541Srgrimes u_long tcps_persisttimeo; /* persist timeouts */ 2351541Srgrimes u_long tcps_keeptimeo; /* keepalive timeouts */ 2361541Srgrimes u_long tcps_keepprobe; /* keepalive probes sent */ 2371541Srgrimes u_long tcps_keepdrops; /* connections dropped in keepalive */ 2381541Srgrimes 2391541Srgrimes u_long tcps_sndtotal; /* total packets sent */ 2401541Srgrimes u_long tcps_sndpack; /* data packets sent */ 2411541Srgrimes u_long tcps_sndbyte; /* data bytes sent */ 2421541Srgrimes u_long tcps_sndrexmitpack; /* data packets retransmitted */ 2431541Srgrimes u_long tcps_sndrexmitbyte; /* data bytes retransmitted */ 2441541Srgrimes u_long tcps_sndacks; /* ack-only packets sent */ 2451541Srgrimes u_long tcps_sndprobe; /* window probes sent */ 2461541Srgrimes u_long tcps_sndurg; /* packets sent with URG only */ 2471541Srgrimes u_long tcps_sndwinup; /* window update-only packets sent */ 2481541Srgrimes u_long tcps_sndctrl; /* control (SYN|FIN|RST) packets sent */ 2491541Srgrimes 2501541Srgrimes u_long tcps_rcvtotal; /* total packets received */ 2511541Srgrimes u_long tcps_rcvpack; /* packets received in sequence */ 2521541Srgrimes u_long tcps_rcvbyte; /* bytes received in sequence */ 2531541Srgrimes u_long tcps_rcvbadsum; /* packets received with ccksum errs */ 2541541Srgrimes u_long tcps_rcvbadoff; /* packets received with bad offset */ 2551541Srgrimes u_long tcps_rcvshort; /* packets received too short */ 2561541Srgrimes u_long tcps_rcvduppack; /* duplicate-only packets received */ 2571541Srgrimes u_long tcps_rcvdupbyte; /* duplicate-only bytes received */ 2581541Srgrimes u_long tcps_rcvpartduppack; /* packets with some duplicate data */ 2591541Srgrimes u_long tcps_rcvpartdupbyte; /* dup. bytes in part-dup. packets */ 2601541Srgrimes u_long tcps_rcvoopack; /* out-of-order packets received */ 2611541Srgrimes u_long tcps_rcvoobyte; /* out-of-order bytes received */ 2621541Srgrimes u_long tcps_rcvpackafterwin; /* packets with data after window */ 2631541Srgrimes u_long tcps_rcvbyteafterwin; /* bytes rcvd after window */ 2641541Srgrimes u_long tcps_rcvafterclose; /* packets rcvd after "close" */ 2651541Srgrimes u_long tcps_rcvwinprobe; /* rcvd window probe packets */ 2661541Srgrimes u_long tcps_rcvdupack; /* rcvd duplicate acks */ 2671541Srgrimes u_long tcps_rcvacktoomuch; /* rcvd acks for unsent data */ 2681541Srgrimes u_long tcps_rcvackpack; /* rcvd ack packets */ 2691541Srgrimes u_long tcps_rcvackbyte; /* bytes acked by rcvd acks */ 2701541Srgrimes u_long tcps_rcvwinupd; /* rcvd window update packets */ 2711541Srgrimes u_long tcps_pawsdrop; /* segments dropped due to PAWS */ 2721541Srgrimes u_long tcps_predack; /* times hdr predict ok for acks */ 2731541Srgrimes u_long tcps_preddat; /* times hdr predict ok for data pkts */ 2741541Srgrimes u_long tcps_pcbcachemiss; 2759263Swollman u_long tcps_cachedrtt; /* times cached RTT in route updated */ 2769263Swollman u_long tcps_cachedrttvar; /* times cached rttvar updated */ 2779263Swollman u_long tcps_cachedssthresh; /* times cached ssthresh updated */ 2789470Swollman u_long tcps_usedrtt; /* times RTT initialized from route */ 2799470Swollman u_long tcps_usedrttvar; /* times RTTVAR initialized from rt */ 2809470Swollman u_long tcps_usedssthresh; /* times ssthresh initialized from rt*/ 28110937Swollman u_long tcps_persistdrop; /* timeout in persist state */ 28210937Swollman u_long tcps_badsyn; /* bogus SYN, e.g. premature ACK */ 28311415Swollman u_long tcps_mturesent; /* resends due to MTU discovery */ 28414281Sbde u_long tcps_listendrop; /* listen queue overflows */ 2851541Srgrimes}; 2861541Srgrimes 2876247Swollman/* 28836079Swollman * TCB structure exported to user-land via sysctl(3). 28937183Sjhay * Evil hack: declare only if in_pcb.h and sys/socketvar.h have been 29037183Sjhay * included. Not all of our clients do. 29136079Swollman */ 29237183Sjhay#if defined(_NETINET_IN_PCB_H_) && defined(_SYS_SOCKETVAR_H_) 29336079Swollmanstruct xtcpcb { 29436079Swollman size_t xt_len; 29536079Swollman struct inpcb xt_inp; 29636079Swollman struct tcpcb xt_tp; 29736079Swollman struct xsocket xt_socket; 29836079Swollman u_quad_t xt_alignment_hack; 29936079Swollman}; 30036079Swollman#endif 30136079Swollman 30236079Swollman/* 3036247Swollman * Names for TCP sysctl objects 3046247Swollman */ 3056247Swollman#define TCPCTL_DO_RFC1323 1 /* use RFC-1323 extensions */ 3066247Swollman#define TCPCTL_DO_RFC1644 2 /* use RFC-1644 extensions */ 3076247Swollman#define TCPCTL_MSSDFLT 3 /* MSS default */ 3086472Swollman#define TCPCTL_STATS 4 /* statistics (read-only) */ 3096472Swollman#define TCPCTL_RTTDFLT 5 /* default RTT estimate */ 3106472Swollman#define TCPCTL_KEEPIDLE 6 /* keepalive idle timer */ 3116472Swollman#define TCPCTL_KEEPINTVL 7 /* interval to send keepalives */ 31218281Spst#define TCPCTL_SENDSPACE 8 /* send buffer space */ 31318281Spst#define TCPCTL_RECVSPACE 9 /* receive buffer space */ 31418281Spst#define TCPCTL_KEEPINIT 10 /* receive buffer space */ 31536079Swollman#define TCPCTL_PCBLIST 11 /* list of all outstanding PCBs */ 31650673Sjlemon#define TCPCTL_DELACKTIME 12 /* time before sending delayed ACK */ 31750673Sjlemon#define TCPCTL_MAXID 13 3186247Swollman 3196247Swollman#define TCPCTL_NAMES { \ 3206247Swollman { 0, 0 }, \ 3216348Swollman { "rfc1323", CTLTYPE_INT }, \ 3226348Swollman { "rfc1644", CTLTYPE_INT }, \ 3236247Swollman { "mssdflt", CTLTYPE_INT }, \ 3246472Swollman { "stats", CTLTYPE_STRUCT }, \ 3256472Swollman { "rttdflt", CTLTYPE_INT }, \ 3266472Swollman { "keepidle", CTLTYPE_INT }, \ 3276472Swollman { "keepintvl", CTLTYPE_INT }, \ 3286472Swollman { "sendspace", CTLTYPE_INT }, \ 3296472Swollman { "recvspace", CTLTYPE_INT }, \ 33018281Spst { "keepinit", CTLTYPE_INT }, \ 33136079Swollman { "pcblist", CTLTYPE_STRUCT }, \ 33250673Sjlemon { "delacktime", CTLTYPE_INT }, \ 3336247Swollman} 3346247Swollman 33544078Sdfr 3361541Srgrimes#ifdef KERNEL 33744078Sdfr#ifdef SYSCTL_DECL 33844078SdfrSYSCTL_DECL(_net_inet_tcp); 33944078Sdfr#endif 34044078Sdfr 3417684Sdgextern struct inpcbhead tcb; /* head of queue of active tcpcb's */ 3427684Sdgextern struct inpcbinfo tcbinfo; 3436348Swollmanextern struct tcpstat tcpstat; /* tcp statistics */ 3447090Sbdeextern int tcp_mssdflt; /* XXX */ 34533846Sdgextern int tcp_delack_enabled; 34650673Sjlemonextern int ss_fltsz; 34750673Sjlemonextern int ss_fltsz_local; 3481541Srgrimes 3491541Srgrimesvoid tcp_canceltimers __P((struct tcpcb *)); 3501541Srgrimesstruct tcpcb * 3511541Srgrimes tcp_close __P((struct tcpcb *)); 35212881Sbdevoid tcp_ctlinput __P((int, struct sockaddr *, void *)); 35338482Swollmanint tcp_ctloutput __P((struct socket *, struct sockopt *)); 3541541Srgrimesstruct tcpcb * 3551541Srgrimes tcp_drop __P((struct tcpcb *, int)); 3561541Srgrimesvoid tcp_drain __P((void)); 3571541Srgrimesvoid tcp_fasttimo __P((void)); 3586247Swollmanstruct rmxp_tao * 3596247Swollman tcp_gettaocache __P((struct inpcb *)); 3601541Srgrimesvoid tcp_init __P((void)); 3611541Srgrimesvoid tcp_input __P((struct mbuf *, int)); 3626247Swollmanvoid tcp_mss __P((struct tcpcb *, int)); 3636247Swollmanint tcp_mssopt __P((struct tcpcb *)); 36412635Swollmanvoid tcp_mtudisc __P((struct inpcb *, int)); 3651541Srgrimesstruct tcpcb * 3661541Srgrimes tcp_newtcpcb __P((struct inpcb *)); 3671541Srgrimesint tcp_output __P((struct tcpcb *)); 3681541Srgrimesvoid tcp_quench __P((struct inpcb *, int)); 3691541Srgrimesvoid tcp_respond __P((struct tcpcb *, 37037622Sbde struct tcpiphdr *, struct mbuf *, tcp_seq, tcp_seq, int)); 3716247Swollmanstruct rtentry * 3726247Swollman tcp_rtlookup __P((struct inpcb *)); 3731541Srgrimesvoid tcp_setpersist __P((struct tcpcb *)); 3741541Srgrimesvoid tcp_slowtimo __P((void)); 3751541Srgrimesstruct tcpiphdr * 3761541Srgrimes tcp_template __P((struct tcpcb *)); 3771541Srgrimesstruct tcpcb * 3781541Srgrimes tcp_timers __P((struct tcpcb *, int)); 3791541Srgrimesvoid tcp_trace __P((int, int, struct tcpcb *, struct tcpiphdr *, int)); 3809470Swollman 38117096Swollmanextern struct pr_usrreqs tcp_usrreqs; 3829470Swollmanextern u_long tcp_sendspace; 3839470Swollmanextern u_long tcp_recvspace; 3849470Swollman 3856348Swollman#endif /* KERNEL */ 3862169Spaul 3876348Swollman#endif /* _NETINET_TCP_VAR_H_ */ 388