summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/inet/tcp.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@nexenta.com>2011-08-17 16:31:10 -0700
committerGarrett D'Amore <garrett@nexenta.com>2011-08-17 16:31:10 -0700
commit3d0a255c417cf2e7b69e770de43f195b0eeffacb (patch)
tree9fbbacfdcae24cab7914edc9825da1708191153b /usr/src/uts/common/inet/tcp.h
parent49ba5bc4e7d0a3e56108ec7cbf1d8cf2483ccca9 (diff)
downloadillumos-joyent-3d0a255c417cf2e7b69e770de43f195b0eeffacb.tar.gz
1361 Add support for socket options TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL
Reviewed by: Pavan <pavan.tc@gmail.com> Reviewed by: Dan McDonald <danmcd at nexenta.com> Reviewed by: Garrett D'Amore <garrett@damore.org> Approved by: Garrett D'Amore <garrett@damore.org>
Diffstat (limited to 'usr/src/uts/common/inet/tcp.h')
-rw-r--r--usr/src/uts/common/inet/tcp.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/usr/src/uts/common/inet/tcp.h b/usr/src/uts/common/inet/tcp.h
index 460f183884..d95f2559c6 100644
--- a/usr/src/uts/common/inet/tcp.h
+++ b/usr/src/uts/common/inet/tcp.h
@@ -21,6 +21,7 @@
/*
* Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, Joyent, Inc. All rights reserved.
+ * Copyright (c) 2011 Nexenta Systems, Inc. All rights reserved.
*/
/* Copyright (c) 1990 Mentat Inc. */
@@ -334,11 +335,26 @@ typedef struct tcp_s {
} tcp_conn;
uint32_t tcp_syn_rcvd_timeout; /* How many SYN_RCVD timeout in q0 */
- /* TCP Keepalive Timer members */
+ /*
+ * TCP Keepalive Timer members.
+ * All keepalive timer intervals are in milliseconds.
+ */
int32_t tcp_ka_last_intrvl; /* Last probe interval */
timeout_id_t tcp_ka_tid; /* Keepalive timer ID */
uint32_t tcp_ka_interval; /* Keepalive interval */
+
+ /*
+ * TCP connection is terminated if we don't hear back from the peer
+ * for tcp_ka_abort_thres milliseconds after the first keepalive probe.
+ * tcp_ka_rinterval is the interval in milliseconds between successive
+ * keepalive probes. tcp_ka_cnt is the number of keepalive probes to
+ * be sent before terminating the connection, if we don't hear back from
+ * peer.
+ * tcp_ka_abort_thres = tcp_ka_rinterval * tcp_ka_cnt
+ */
+ uint32_t tcp_ka_rinterval; /* keepalive retransmit interval */
uint32_t tcp_ka_abort_thres; /* Keepalive abort threshold */
+ uint32_t tcp_ka_cnt; /* count of keepalive probes */
int32_t tcp_client_errno; /* How the client screwed up */