Deleted Added
full compact
tcp_subr.c (185571) tcp_subr.c (185895)
1/*-
2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 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

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

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_subr.c 8.2 (Berkeley) 5/24/95
30 */
31
32#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 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

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

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_subr.c 8.2 (Berkeley) 5/24/95
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/netinet/tcp_subr.c 185571 2008-12-02 21:37:28Z bz $");
33__FBSDID("$FreeBSD: head/sys/netinet/tcp_subr.c 185895 2008-12-10 23:12:39Z zec $");
34
35#include "opt_compat.h"
36#include "opt_inet.h"
37#include "opt_inet6.h"
38#include "opt_ipsec.h"
39#include "opt_mac.h"
40#include "opt_tcpdebug.h"
41

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

198SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcbhashsize, CTLFLAG_RDTUN,
199 &tcp_tcbhashsize, 0, "Size of TCP control-block hashtable");
200
201static int do_tcpdrain = 1;
202SYSCTL_INT(_net_inet_tcp, OID_AUTO, do_tcpdrain, CTLFLAG_RW, &do_tcpdrain, 0,
203 "Enable tcp_drain routine for extra help when low on mbufs");
204
205SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, pcbcount,
34
35#include "opt_compat.h"
36#include "opt_inet.h"
37#include "opt_inet6.h"
38#include "opt_ipsec.h"
39#include "opt_mac.h"
40#include "opt_tcpdebug.h"
41

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

198SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcbhashsize, CTLFLAG_RDTUN,
199 &tcp_tcbhashsize, 0, "Size of TCP control-block hashtable");
200
201static int do_tcpdrain = 1;
202SYSCTL_INT(_net_inet_tcp, OID_AUTO, do_tcpdrain, CTLFLAG_RW, &do_tcpdrain, 0,
203 "Enable tcp_drain routine for extra help when low on mbufs");
204
205SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, pcbcount,
206 CTLFLAG_RD, V_tcbinfo.ipi_count, 0, "Number of active PCBs");
206 CTLFLAG_RD, tcbinfo.ipi_count, 0, "Number of active PCBs");
207
208SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, icmp_may_rst,
209 CTLFLAG_RW, icmp_may_rst, 0,
210 "Certain ICMP unreachable messages may abort connections in SYN_SENT");
211
212SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, isn_reseed_interval,
213 CTLFLAG_RW, tcp_isn_reseed_interval, 0,
214 "Seconds between reseeding of ISN secret");

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

354 tcp_msl = TCPTV_MSL;
355 tcp_rexmit_min = TCPTV_MIN;
356 if (tcp_rexmit_min < 1)
357 tcp_rexmit_min = 1;
358 tcp_rexmit_slop = TCPTV_CPU_VAR;
359 V_tcp_inflight_rttthresh = TCPTV_INFLIGHT_RTTTHRESH;
360 tcp_finwait2_timeout = TCPTV_FINWAIT2_TIMEOUT;
361
207
208SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, icmp_may_rst,
209 CTLFLAG_RW, icmp_may_rst, 0,
210 "Certain ICMP unreachable messages may abort connections in SYN_SENT");
211
212SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, isn_reseed_interval,
213 CTLFLAG_RW, tcp_isn_reseed_interval, 0,
214 "Seconds between reseeding of ISN secret");

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

354 tcp_msl = TCPTV_MSL;
355 tcp_rexmit_min = TCPTV_MIN;
356 if (tcp_rexmit_min < 1)
357 tcp_rexmit_min = 1;
358 tcp_rexmit_slop = TCPTV_CPU_VAR;
359 V_tcp_inflight_rttthresh = TCPTV_INFLIGHT_RTTTHRESH;
360 tcp_finwait2_timeout = TCPTV_FINWAIT2_TIMEOUT;
361
362 TUNABLE_INT_FETCH("net.inet.tcp.sack.enable", &V_tcp_do_sack);
363
362 INP_INFO_LOCK_INIT(&V_tcbinfo, "tcp");
363 LIST_INIT(&V_tcb);
364 V_tcbinfo.ipi_listhead = &V_tcb;
365 hashsize = TCBHASHSIZE;
366 TUNABLE_INT_FETCH("net.inet.tcp.tcbhashsize", &hashsize);
367 if (!powerof2(hashsize)) {
368 printf("WARNING: TCB hash size not a power of 2\n");
369 hashsize = 512; /* safe default */

--- 1939 unchanged lines hidden ---
364 INP_INFO_LOCK_INIT(&V_tcbinfo, "tcp");
365 LIST_INIT(&V_tcb);
366 V_tcbinfo.ipi_listhead = &V_tcb;
367 hashsize = TCBHASHSIZE;
368 TUNABLE_INT_FETCH("net.inet.tcp.tcbhashsize", &hashsize);
369 if (!powerof2(hashsize)) {
370 printf("WARNING: TCB hash size not a power of 2\n");
371 hashsize = 512; /* safe default */

--- 1939 unchanged lines hidden ---