summaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_timer.h
diff options
context:
space:
mode:
authorYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2023-03-14 00:24:06 +0000
committerYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2023-03-14 00:24:06 +0000
commit83b640d8501f740b0acb19e25f1e8b1ebb6049aa (patch)
tree2575d1489ed78b5806251ef1d4cf9e850ea3d579 /sys/netinet/tcp_timer.h
parent8b48d534bc1fda0ca7fb5784eb3586088afe7ce8 (diff)
To avoid misunderstanding, keep variables for tcp keepalive in
milliseconds, which is the same unit of tcp_now(). However, keep the unit of sysctl variables in seconds and convert their unit in tcp_sysctl(). Additionally revert TCPTV_SRTTDFLT back to 3 seconds, which was mistakenly changed to 1.5 seconds by tcp_timer.h 1.19. ok claudio
Diffstat (limited to 'sys/netinet/tcp_timer.h')
-rw-r--r--sys/netinet/tcp_timer.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/netinet/tcp_timer.h b/sys/netinet/tcp_timer.h
index c0f417f55dc..53027af4f3a 100644
--- a/sys/netinet/tcp_timer.h
+++ b/sys/netinet/tcp_timer.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_timer.h,v 1.19 2022/11/07 11:22:55 yasuoka Exp $ */
+/* $OpenBSD: tcp_timer.h,v 1.20 2023/03/14 00:24:05 yasuoka Exp $ */
/* $NetBSD: tcp_timer.h,v 1.6 1995/03/26 20:32:37 jtc Exp $ */
/*
@@ -86,17 +86,17 @@
/*
* Time constants.
*/
-#define TCPTV_MSL 30 /* max seg lifetime (hah!) */
+#define TCPTV_MSL TCP_TIME(30) /* max seg lifetime (hah!) */
#define TCPTV_SRTTBASE 0 /* base roundtrip time;
if 0, no idea yet */
-#define TCPTV_SRTTDFLT TCP_TIME_MSEC(1500) /* assumed RTT if no info */
+#define TCPTV_SRTTDFLT TCP_TIME(3) /* assumed RTT if no info */
-#define TCPTV_PERSMIN 5 /* retransmit persistence */
-#define TCPTV_PERSMAX 60 /* maximum persist interval */
+#define TCPTV_PERSMIN TCP_TIME(5) /* retransmit persistence */
+#define TCPTV_PERSMAX TCP_TIME(60) /* maximum persist interval */
-#define TCPTV_KEEP_INIT 75 /* initial connect keep alive */
-#define TCPTV_KEEP_IDLE 120*60 /* dflt time before probing */
-#define TCPTV_KEEPINTVL 75 /* default probe interval */
+#define TCPTV_KEEP_INIT TCP_TIME(75) /* initial connect keep alive */
+#define TCPTV_KEEP_IDLE TCP_TIME(120*60) /* dflt time before probing */
+#define TCPTV_KEEPINTVL TCP_TIME(75) /* default probe interval */
#define TCPTV_KEEPCNT 8 /* max probes before drop */
#define TCPTV_MIN TCP_TIME(1) /* minimum allowable value */