diff options
author | glebius <glebius@FreeBSD.org> | 2012-02-05 16:53:02 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2012-02-05 16:53:02 +0000 |
commit | 4326beb059fb2e0786289b19b1bf9a8b7a2b824b (patch) | |
tree | dcb36bc519c1f170cc8c8a32ba0dd1c8c7acfc78 /sys/netinet/tcp_timer.h | |
parent | 96baefc0cb3bd4bac8a5c692c335abaf29650d71 (diff) | |
download | FreeBSD-src-4326beb059fb2e0786289b19b1bf9a8b7a2b824b.zip FreeBSD-src-4326beb059fb2e0786289b19b1bf9a8b7a2b824b.tar.gz |
Add new socket options: TCP_KEEPINIT, TCP_KEEPIDLE, TCP_KEEPINTVL and
TCP_KEEPCNT, that allow to control initial timeout, idle time, idle
re-send interval and idle send count on a per-socket basis.
Reviewed by: andre, bz, lstewart
Diffstat (limited to 'sys/netinet/tcp_timer.h')
-rw-r--r-- | sys/netinet/tcp_timer.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/netinet/tcp_timer.h b/sys/netinet/tcp_timer.h index 4bfcdf6..2fc8f7b 100644 --- a/sys/netinet/tcp_timer.h +++ b/sys/netinet/tcp_timer.h @@ -153,10 +153,16 @@ struct tcp_timer { #define TT_KEEP 0x08 #define TT_2MSL 0x10 +#define TP_KEEPINIT(tp) ((tp)->t_keepinit ? (tp)->t_keepinit : tcp_keepinit) +#define TP_KEEPIDLE(tp) ((tp)->t_keepidle ? (tp)->t_keepidle : tcp_keepidle) +#define TP_KEEPINTVL(tp) ((tp)->t_keepintvl ? (tp)->t_keepintvl : tcp_keepintvl) +#define TP_KEEPCNT(tp) ((tp)->t_keepcnt ? (tp)->t_keepcnt : tcp_keepcnt) +#define TP_MAXIDLE(tp) (TP_KEEPCNT(tp) * TP_KEEPINTVL(tp)) + 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 */ +extern int tcp_keepcnt; /* number of keepalives */ extern int tcp_delacktime; /* time before sending a delayed ACK */ extern int tcp_maxpersistidle; extern int tcp_rexmit_min; |