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 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/* |
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. |
118 */ |
119#define TCP_MSS 536 120#define TCP6_MSS 1220 121 |
122/* |
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). |
135 */ 136#define TCP_MINMSS 216 137 |
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 --- |