summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpst <pst@FreeBSD.org>1996-09-13 23:51:44 +0000
committerpst <pst@FreeBSD.org>1996-09-13 23:51:44 +0000
commit460ca264a35697912ee6892edf43493bc7037685 (patch)
tree9a4c6784e5101afa9ee7f4c8c86e2355d2a13483
parentaa0bf1e119360aec199b9032cc73b4ad92f3b4a1 (diff)
downloadFreeBSD-src-460ca264a35697912ee6892edf43493bc7037685.zip
FreeBSD-src-460ca264a35697912ee6892edf43493bc7037685.tar.gz
Make the misnamed tcp initial keepalive timer value (which is really the
time, in seconds, that state for non-established TCP sessions stays about) a sysctl modifyable variable. [part 1 of two commits, I just realized I can't play with the indices as I was typing this commit message.]
-rw-r--r--sys/netinet/tcp_input.c6
-rw-r--r--sys/netinet/tcp_reass.c6
-rw-r--r--sys/netinet/tcp_timer.c6
-rw-r--r--sys/netinet/tcp_timer.h3
-rw-r--r--sys/netinet/tcp_usrreq.c4
-rw-r--r--sys/netinet/tcp_var.h10
6 files changed, 21 insertions, 14 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 329cf25..75a33e6 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_input.c 8.12 (Berkeley) 5/24/95
- * $Id: tcp_input.c,v 1.46 1996/05/02 05:54:12 fenner Exp $
+ * $Id: tcp_input.c,v 1.47 1996/09/13 18:47:03 pst Exp $
*/
#ifndef TUBA_INCLUDE
@@ -715,7 +715,7 @@ findpcb:
tp->rcv_adv += min(tp->rcv_wnd, TCP_MAXWIN);
tcpstat.tcps_connects++;
soisconnected(so);
- tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT;
+ tp->t_timer[TCPT_KEEP] = tcp_keepinit;
dropsocket = 0; /* committed to socket */
tcpstat.tcps_accepts++;
goto trimthenstep6;
@@ -734,7 +734,7 @@ findpcb:
*/
tp->t_flags |= TF_ACKNOW;
tp->t_state = TCPS_SYN_RECEIVED;
- tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT;
+ tp->t_timer[TCPT_KEEP] = tcp_keepinit;
dropsocket = 0; /* committed to socket */
tcpstat.tcps_accepts++;
goto trimthenstep6;
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c
index 329cf25..75a33e6 100644
--- a/sys/netinet/tcp_reass.c
+++ b/sys/netinet/tcp_reass.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_input.c 8.12 (Berkeley) 5/24/95
- * $Id: tcp_input.c,v 1.46 1996/05/02 05:54:12 fenner Exp $
+ * $Id: tcp_input.c,v 1.47 1996/09/13 18:47:03 pst Exp $
*/
#ifndef TUBA_INCLUDE
@@ -715,7 +715,7 @@ findpcb:
tp->rcv_adv += min(tp->rcv_wnd, TCP_MAXWIN);
tcpstat.tcps_connects++;
soisconnected(so);
- tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT;
+ tp->t_timer[TCPT_KEEP] = tcp_keepinit;
dropsocket = 0; /* committed to socket */
tcpstat.tcps_accepts++;
goto trimthenstep6;
@@ -734,7 +734,7 @@ findpcb:
*/
tp->t_flags |= TF_ACKNOW;
tp->t_state = TCPS_SYN_RECEIVED;
- tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT;
+ tp->t_timer[TCPT_KEEP] = tcp_keepinit;
dropsocket = 0; /* committed to socket */
tcpstat.tcps_accepts++;
goto trimthenstep6;
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c
index 73396b3..fd477b9 100644
--- a/sys/netinet/tcp_timer.c
+++ b/sys/netinet/tcp_timer.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_timer.c 8.2 (Berkeley) 5/24/95
- * $Id: tcp_timer.c,v 1.18 1996/07/11 16:32:35 wollman Exp $
+ * $Id: tcp_timer.c,v 1.19 1996/07/12 17:28:46 davidg Exp $
*/
#ifndef TUBA_INCLUDE
@@ -67,6 +67,10 @@
#include <netinet/tcp_debug.h>
#endif
+int tcp_keepinit = TCPTV_KEEP_INIT;
+SYSCTL_INT(_net_inet_tcp, TCPCTL_KEEPINIT, keepinit,
+ CTLFLAG_RW, &tcp_keepinit , 0, "");
+
int tcp_keepidle = TCPTV_KEEP_IDLE;
SYSCTL_INT(_net_inet_tcp, TCPCTL_KEEPIDLE, keepidle,
CTLFLAG_RW, &tcp_keepidle , 0, "");
diff --git a/sys/netinet/tcp_timer.h b/sys/netinet/tcp_timer.h
index f431b01..df501d1 100644
--- a/sys/netinet/tcp_timer.h
+++ b/sys/netinet/tcp_timer.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_timer.h 8.1 (Berkeley) 6/10/93
- * $Id: tcp_timer.h,v 1.8 1996/01/30 22:58:29 mpp Exp $
+ * $Id: tcp_timer.h,v 1.9 1996/06/14 17:17:32 wollman Exp $
*/
#ifndef _NETINET_TCP_TIMER_H_
@@ -127,6 +127,7 @@ static char *tcptimers[] =
}
#ifdef KERNEL
+extern int tcp_keepinit; /* time to establish connection */
extern int tcp_keepidle; /* time before keepalive probes begin */
extern int tcp_keepintvl; /* time between keepalive probes */
extern int tcp_maxidle; /* time to drop after starting probes */
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 9fb4d48..78f8acf 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* From: @(#)tcp_usrreq.c 8.2 (Berkeley) 1/3/94
- * $Id: tcp_usrreq.c,v 1.23 1996/07/11 16:32:38 wollman Exp $
+ * $Id: tcp_usrreq.c,v 1.24 1996/07/12 17:28:47 davidg Exp $
*/
#include <sys/param.h>
@@ -891,7 +891,7 @@ tcp_connect(tp, nam)
soisconnecting(so);
tcpstat.tcps_connattempt++;
tp->t_state = TCPS_SYN_SENT;
- tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT;
+ tp->t_timer[TCPT_KEEP] = tcp_keepinit;
tp->iss = tcp_iss; tcp_iss += TCP_ISSINCR/2;
tcp_sendseqinit(tp);
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
index 4717e5d..06836c2 100644
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_var.h 8.4 (Berkeley) 5/24/95
- * $Id: tcp_var.h,v 1.33 1996/06/05 16:57:38 wollman Exp $
+ * $Id: tcp_var.h,v 1.34 1996/07/11 16:32:40 wollman Exp $
*/
#ifndef _NETINET_TCP_VAR_H_
@@ -307,9 +307,10 @@ struct tcpstat {
#define TCPCTL_RTTDFLT 5 /* default RTT estimate */
#define TCPCTL_KEEPIDLE 6 /* keepalive idle timer */
#define TCPCTL_KEEPINTVL 7 /* interval to send keepalives */
-#define TCPCTL_SENDSPACE 8 /* send buffer space */
-#define TCPCTL_RECVSPACE 9 /* receive buffer space */
-#define TCPCTL_MAXID 10
+#define TCPCTL_KEEPINIT 8 /* timeout for establishing syn */
+#define TCPCTL_SENDSPACE 9 /* send buffer space */
+#define TCPCTL_RECVSPACE 10 /* receive buffer space */
+#define TCPCTL_MAXID 11
#define TCPCTL_NAMES { \
{ 0, 0 }, \
@@ -320,6 +321,7 @@ struct tcpstat {
{ "rttdflt", CTLTYPE_INT }, \
{ "keepidle", CTLTYPE_INT }, \
{ "keepintvl", CTLTYPE_INT }, \
+ { "keepinit", CTLTYPE_INT }, \
{ "sendspace", CTLTYPE_INT }, \
{ "recvspace", CTLTYPE_INT }, \
}
OpenPOWER on IntegriCloud