Deleted Added
full compact
tcp_var.h (50477) tcp_var.h (50673)
1/*
2 * Copyright (c) 1982, 1986, 1993, 1994, 1995
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)tcp_var.h 8.4 (Berkeley) 5/24/95
1/*
2 * Copyright (c) 1982, 1986, 1993, 1994, 1995
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)tcp_var.h 8.4 (Berkeley) 5/24/95
34 * $FreeBSD: head/sys/netinet/tcp_var.h 50477 1999-08-28 01:08:13Z peter $
34 * $FreeBSD: head/sys/netinet/tcp_var.h 50673 1999-08-30 21:17:07Z jlemon $
35 */
36
37#ifndef _NETINET_TCP_VAR_H_
38#define _NETINET_TCP_VAR_H_
39/*
40 * Kernel variables for tcp.
41 */
42
43/*
44 * Tcp control block, one per tcp; fields:
45 * Organized for 16 byte cacheline efficiency.
46 */
47struct tcpcb {
48 struct mbuf *t_segq;
49 int t_dupacks; /* consecutive dup acks recd */
50 struct tcpiphdr *t_template; /* skeletal packet for transmit */
51
35 */
36
37#ifndef _NETINET_TCP_VAR_H_
38#define _NETINET_TCP_VAR_H_
39/*
40 * Kernel variables for tcp.
41 */
42
43/*
44 * Tcp control block, one per tcp; fields:
45 * Organized for 16 byte cacheline efficiency.
46 */
47struct tcpcb {
48 struct mbuf *t_segq;
49 int t_dupacks; /* consecutive dup acks recd */
50 struct tcpiphdr *t_template; /* skeletal packet for transmit */
51
52 int t_timer[TCPT_NTIMERS]; /* tcp timers */
52 struct callout *tt_rexmt; /* retransmit timer */
53 struct callout *tt_persist; /* retransmit persistence */
54 struct callout *tt_keep; /* keepalive */
55 struct callout *tt_2msl; /* 2*msl TIME_WAIT timer */
56 struct callout *tt_delack; /* delayed ACK timer */
53
54 struct inpcb *t_inpcb; /* back pointer to internet pcb */
55 int t_state; /* state of this connection */
56 u_int t_flags;
57#define TF_ACKNOW 0x00001 /* ack peer immediately */
58#define TF_DELACK 0x00002 /* ack, but try to delay it */
59#define TF_NODELAY 0x00004 /* don't delay packets to coalesce */
60#define TF_NOOPT 0x00008 /* don't use tcp options */

--- 32 unchanged lines hidden (view full) ---

93 u_long snd_wnd; /* send window */
94 u_long snd_cwnd; /* congestion-controlled window */
95 u_long snd_ssthresh; /* snd_cwnd size threshold for
96 * for slow start exponential to
97 * linear switch
98 */
99 u_int t_maxopd; /* mss plus options */
100
57
58 struct inpcb *t_inpcb; /* back pointer to internet pcb */
59 int t_state; /* state of this connection */
60 u_int t_flags;
61#define TF_ACKNOW 0x00001 /* ack peer immediately */
62#define TF_DELACK 0x00002 /* ack, but try to delay it */
63#define TF_NODELAY 0x00004 /* don't delay packets to coalesce */
64#define TF_NOOPT 0x00008 /* don't use tcp options */

--- 32 unchanged lines hidden (view full) ---

97 u_long snd_wnd; /* send window */
98 u_long snd_cwnd; /* congestion-controlled window */
99 u_long snd_ssthresh; /* snd_cwnd size threshold for
100 * for slow start exponential to
101 * linear switch
102 */
103 u_int t_maxopd; /* mss plus options */
104
101 u_int t_idle; /* inactivity time */
102 u_long t_duration; /* connection duration */
103 int t_rtt; /* round trip time */
105 u_long t_rcvtime; /* inactivity time */
106 u_long t_starttime; /* time connection was established */
107 int t_rtttime; /* round trip time */
104 tcp_seq t_rtseq; /* sequence number being timed */
105
108 tcp_seq t_rtseq; /* sequence number being timed */
109
106 int t_rxtcur; /* current retransmit value */
110 int t_rxtcur; /* current retransmit value (ticks) */
107 u_int t_maxseg; /* maximum segment size */
108 int t_srtt; /* smoothed round-trip time */
109 int t_rttvar; /* variance in round-trip time */
110
111 int t_rxtshift; /* log(2) of rexmt exp. backoff */
112 u_int t_rttmin; /* minimum rtt allowed */
113 u_long t_rttupdated; /* number of times rtt sampled */
114 u_long max_sndwnd; /* largest window peer has offered */

--- 11 unchanged lines hidden (view full) ---

126 u_char requested_s_scale;
127 u_long ts_recent; /* timestamp echo data */
128
129 u_long ts_recent_age; /* when last updated */
130 tcp_seq last_ack_sent;
131/* RFC 1644 variables */
132 tcp_cc cc_send; /* send connection count */
133 tcp_cc cc_recv; /* receive connection count */
111 u_int t_maxseg; /* maximum segment size */
112 int t_srtt; /* smoothed round-trip time */
113 int t_rttvar; /* variance in round-trip time */
114
115 int t_rxtshift; /* log(2) of rexmt exp. backoff */
116 u_int t_rttmin; /* minimum rtt allowed */
117 u_long t_rttupdated; /* number of times rtt sampled */
118 u_long max_sndwnd; /* largest window peer has offered */

--- 11 unchanged lines hidden (view full) ---

130 u_char requested_s_scale;
131 u_long ts_recent; /* timestamp echo data */
132
133 u_long ts_recent_age; /* when last updated */
134 tcp_seq last_ack_sent;
135/* RFC 1644 variables */
136 tcp_cc cc_send; /* send connection count */
137 tcp_cc cc_recv; /* receive connection count */
138/* experimental */
139 u_long snd_cwnd_prev; /* cwnd prior to retransmit */
140 u_long snd_ssthresh_prev; /* ssthresh prior to retransmit */
141 u_long t_badrxtwin; /* window for retransmit recovery */
134};
135
136/*
137 * Structure to hold TCP options that are only used during segment
138 * processing (in tcp_input), but not held in the tcpcb.
139 * It's basically used to reduce the number of parameters
140 * to tcp_dooptions.
141 */

--- 158 unchanged lines hidden (view full) ---

300#define TCPCTL_STATS 4 /* statistics (read-only) */
301#define TCPCTL_RTTDFLT 5 /* default RTT estimate */
302#define TCPCTL_KEEPIDLE 6 /* keepalive idle timer */
303#define TCPCTL_KEEPINTVL 7 /* interval to send keepalives */
304#define TCPCTL_SENDSPACE 8 /* send buffer space */
305#define TCPCTL_RECVSPACE 9 /* receive buffer space */
306#define TCPCTL_KEEPINIT 10 /* receive buffer space */
307#define TCPCTL_PCBLIST 11 /* list of all outstanding PCBs */
142};
143
144/*
145 * Structure to hold TCP options that are only used during segment
146 * processing (in tcp_input), but not held in the tcpcb.
147 * It's basically used to reduce the number of parameters
148 * to tcp_dooptions.
149 */

--- 158 unchanged lines hidden (view full) ---

308#define TCPCTL_STATS 4 /* statistics (read-only) */
309#define TCPCTL_RTTDFLT 5 /* default RTT estimate */
310#define TCPCTL_KEEPIDLE 6 /* keepalive idle timer */
311#define TCPCTL_KEEPINTVL 7 /* interval to send keepalives */
312#define TCPCTL_SENDSPACE 8 /* send buffer space */
313#define TCPCTL_RECVSPACE 9 /* receive buffer space */
314#define TCPCTL_KEEPINIT 10 /* receive buffer space */
315#define TCPCTL_PCBLIST 11 /* list of all outstanding PCBs */
308#define TCPCTL_MAXID 12
316#define TCPCTL_DELACKTIME 12 /* time before sending delayed ACK */
317#define TCPCTL_MAXID 13
309
310#define TCPCTL_NAMES { \
311 { 0, 0 }, \
312 { "rfc1323", CTLTYPE_INT }, \
313 { "rfc1644", CTLTYPE_INT }, \
314 { "mssdflt", CTLTYPE_INT }, \
315 { "stats", CTLTYPE_STRUCT }, \
316 { "rttdflt", CTLTYPE_INT }, \
317 { "keepidle", CTLTYPE_INT }, \
318 { "keepintvl", CTLTYPE_INT }, \
319 { "sendspace", CTLTYPE_INT }, \
320 { "recvspace", CTLTYPE_INT }, \
321 { "keepinit", CTLTYPE_INT }, \
322 { "pcblist", CTLTYPE_STRUCT }, \
318
319#define TCPCTL_NAMES { \
320 { 0, 0 }, \
321 { "rfc1323", CTLTYPE_INT }, \
322 { "rfc1644", CTLTYPE_INT }, \
323 { "mssdflt", CTLTYPE_INT }, \
324 { "stats", CTLTYPE_STRUCT }, \
325 { "rttdflt", CTLTYPE_INT }, \
326 { "keepidle", CTLTYPE_INT }, \
327 { "keepintvl", CTLTYPE_INT }, \
328 { "sendspace", CTLTYPE_INT }, \
329 { "recvspace", CTLTYPE_INT }, \
330 { "keepinit", CTLTYPE_INT }, \
331 { "pcblist", CTLTYPE_STRUCT }, \
332 { "delacktime", CTLTYPE_INT }, \
323}
324
325
326#ifdef KERNEL
327#ifdef SYSCTL_DECL
328SYSCTL_DECL(_net_inet_tcp);
329#endif
330
331extern struct inpcbhead tcb; /* head of queue of active tcpcb's */
332extern struct inpcbinfo tcbinfo;
333extern struct tcpstat tcpstat; /* tcp statistics */
334extern int tcp_mssdflt; /* XXX */
333}
334
335
336#ifdef KERNEL
337#ifdef SYSCTL_DECL
338SYSCTL_DECL(_net_inet_tcp);
339#endif
340
341extern struct inpcbhead tcb; /* head of queue of active tcpcb's */
342extern struct inpcbinfo tcbinfo;
343extern struct tcpstat tcpstat; /* tcp statistics */
344extern int tcp_mssdflt; /* XXX */
335extern u_long tcp_now; /* for RFC 1323 timestamps */
336extern int tcp_delack_enabled;
345extern int tcp_delack_enabled;
346extern int ss_fltsz;
347extern int ss_fltsz_local;
337
338void tcp_canceltimers __P((struct tcpcb *));
339struct tcpcb *
340 tcp_close __P((struct tcpcb *));
341void tcp_ctlinput __P((int, struct sockaddr *, void *));
342int tcp_ctloutput __P((struct socket *, struct sockopt *));
343struct tcpcb *
344 tcp_drop __P((struct tcpcb *, int));

--- 32 unchanged lines hidden ---
348
349void tcp_canceltimers __P((struct tcpcb *));
350struct tcpcb *
351 tcp_close __P((struct tcpcb *));
352void tcp_ctlinput __P((int, struct sockaddr *, void *));
353int tcp_ctloutput __P((struct socket *, struct sockopt *));
354struct tcpcb *
355 tcp_drop __P((struct tcpcb *, int));

--- 32 unchanged lines hidden ---