Deleted Added
full compact
tcp.h (203343) tcp.h (212653)
1/*-
2 * Copyright (c) 1982, 1986, 1993
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

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

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)tcp.h 8.1 (Berkeley) 6/10/93
1/*-
2 * Copyright (c) 1982, 1986, 1993
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

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

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)tcp.h 8.1 (Berkeley) 6/10/93
30 * $FreeBSD: head/sys/netinet/tcp.h 203343 2010-02-01 14:13:44Z luigi $
30 * $FreeBSD: head/sys/netinet/tcp.h 212653 2010-09-15 10:39:30Z andre $
31 */
32
33#ifndef _NETINET_TCP_H_
34#define _NETINET_TCP_H_
35
36#include <sys/cdefs.h>
37
38#if __BSD_VISIBLE

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

98#define TCPOLEN_SIGNATURE 18
99
100/* Miscellaneous constants */
101#define MAX_SACK_BLKS 6 /* Max # SACK blocks stored at receiver side */
102#define TCP_MAX_SACK 4 /* MAX # SACKs sent in any segment */
103
104
105/*
31 */
32
33#ifndef _NETINET_TCP_H_
34#define _NETINET_TCP_H_
35
36#include <sys/cdefs.h>
37
38#if __BSD_VISIBLE

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

98#define TCPOLEN_SIGNATURE 18
99
100/* Miscellaneous constants */
101#define MAX_SACK_BLKS 6 /* Max # SACK blocks stored at receiver side */
102#define TCP_MAX_SACK 4 /* MAX # SACKs sent in any segment */
103
104
105/*
106 * Default maximum segment size for TCP.
107 * With an IP MTU of 576, this is 536,
108 * but 512 is probably more convenient.
109 * This should be defined as MIN(512, IP_MSS - sizeof (struct tcpiphdr)).
106 * The default maximum segment size (MSS) to be used for new TCP connections
107 * when path MTU discovery is not enabled.
108 *
109 * RFC879 derives the default MSS from the largest datagram size hosts are
110 * minimally required to handle directly or through IP reassembly minus the
111 * size of the IP and TCP header. With IPv6 the minimum MTU is specified
112 * in RFC2460.
113 *
114 * For IPv4 the MSS is 576 - sizeof(struct tcpiphdr)
115 * For IPv6 the MSS is IPV6_MMTU - sizeof(struct ip6_hdr) - sizeof(struct tcphdr)
116 *
117 * We use explicit numerical definition here to avoid header pollution.
110 */
118 */
111#define TCP_MSS 512
119#define TCP_MSS 536
120#define TCP6_MSS 1220
121
112/*
122/*
113 * TCP_MINMSS is defined to be 216 which is fine for the smallest
114 * link MTU (256 bytes, AX.25 packet radio) in the Internet.
115 * However it is very unlikely to come across such low MTU interfaces
116 * these days (anno dato 2003).
117 * See tcp_subr.c tcp_minmss SYSCTL declaration for more comments.
118 * Setting this to "0" disables the minmss check.
123 * Limit the lowest MSS we accept from path MTU discovery and the TCP SYN MSS
124 * option. Allowing too low values of MSS can consume significant amounts of
125 * resources and be used as a form of a resource exhaustion attack.
126 * Connections requesting lower MSS values will be rounded up to this value
127 * and the IP_DF flag is cleared to allow fragmentation along the path.
128 *
129 * See tcp_subr.c tcp_minmss SYSCTL declaration for more comments. Setting
130 * it to "0" disables the minmss check.
131 *
132 * The default value is fine for the smallest official link MTU (256 bytes,
133 * AX.25 packet radio) in the Internet. However it is very unlikely to come
134 * across such low MTU interfaces these days (anno domini 2003).
119 */
120#define TCP_MINMSS 216
121
135 */
136#define TCP_MINMSS 216
137
122/*
123 * Default maximum segment size for TCP6.
124 * With an IP6 MSS of 1280, this is 1220,
125 * but 1024 is probably more convenient. (xxx kazu in doubt)
126 * This should be defined as MIN(1024, IP6_MSS - sizeof (struct tcpip6hdr))
127 */
128#define TCP6_MSS 1024
129
130#define TCP_MAXWIN 65535 /* largest value for (unscaled) window */
131#define TTCP_CLIENT_SND_WND 4096 /* dflt send window for T/TCP client */
132
133#define TCP_MAX_WINSHIFT 14 /* maximum window shift */
134
135#define TCP_MAXBURST 4 /* maximum segments in a burst */
136
137#define TCP_MAXHLEN (0xf<<2) /* max length of header in bytes */

--- 89 unchanged lines hidden ---
138#define TCP_MAXWIN 65535 /* largest value for (unscaled) window */
139#define TTCP_CLIENT_SND_WND 4096 /* dflt send window for T/TCP client */
140
141#define TCP_MAX_WINSHIFT 14 /* maximum window shift */
142
143#define TCP_MAXBURST 4 /* maximum segments in a burst */
144
145#define TCP_MAXHLEN (0xf<<2) /* max length of header in bytes */

--- 89 unchanged lines hidden ---