Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_timer.h
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | |||||
#define TCPTV_PERSMIN ( 5*hz) /* minimum persist interval */ | #define TCPTV_PERSMIN ( 5*hz) /* minimum persist interval */ | ||||
#define TCPTV_PERSMAX ( 60*hz) /* maximum persist interval */ | #define TCPTV_PERSMAX ( 60*hz) /* maximum persist interval */ | ||||
#define TCPTV_KEEP_INIT ( 75*hz) /* initial connect keepalive */ | #define TCPTV_KEEP_INIT ( 75*hz) /* initial connect keepalive */ | ||||
#define TCPTV_KEEP_IDLE (120*60*hz) /* dflt time before probing */ | #define TCPTV_KEEP_IDLE (120*60*hz) /* dflt time before probing */ | ||||
#define TCPTV_KEEPINTVL ( 75*hz) /* default probe interval */ | #define TCPTV_KEEPINTVL ( 75*hz) /* default probe interval */ | ||||
#define TCPTV_KEEPCNT 8 /* max probes before drop */ | #define TCPTV_KEEPCNT 8 /* max probes before drop */ | ||||
#define TCPTV_MAXUNACKTIME 0 /* max time without making progress */ | |||||
#define TCPTV_FINWAIT2_TIMEOUT (60*hz) /* FIN_WAIT_2 timeout if no receiver */ | #define TCPTV_FINWAIT2_TIMEOUT (60*hz) /* FIN_WAIT_2 timeout if no receiver */ | ||||
/* | /* | ||||
* Minimum retransmit timer is 3 ticks, for algorithmic stability. | * Minimum retransmit timer is 3 ticks, for algorithmic stability. | ||||
* TCPT_RANGESET() will add another TCPTV_CPU_VAR to deal with | * TCPT_RANGESET() will add another TCPTV_CPU_VAR to deal with | ||||
* the expected worst-case processing variances by the kernels | * the expected worst-case processing variances by the kernels | ||||
* representing the end points. Such variances do not always show | * representing the end points. Such variances do not always show | ||||
▲ Show 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | |||||
#define TT_STOPPED 0x00010000 | #define TT_STOPPED 0x00010000 | ||||
#define TP_KEEPINIT(tp) ((tp)->t_keepinit ? (tp)->t_keepinit : tcp_keepinit) | #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_KEEPIDLE(tp) ((tp)->t_keepidle ? (tp)->t_keepidle : tcp_keepidle) | ||||
#define TP_KEEPINTVL(tp) ((tp)->t_keepintvl ? (tp)->t_keepintvl : tcp_keepintvl) | #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_KEEPCNT(tp) ((tp)->t_keepcnt ? (tp)->t_keepcnt : tcp_keepcnt) | ||||
#define TP_MAXIDLE(tp) (TP_KEEPCNT(tp) * TP_KEEPINTVL(tp)) | #define TP_MAXIDLE(tp) (TP_KEEPCNT(tp) * TP_KEEPINTVL(tp)) | ||||
#define TP_MAXUNACKTIME(tp) \ | |||||
((tp)->t_maxunacktime ? (tp)->t_maxunacktime : tcp_maxunacktime) | |||||
/* | |||||
* Obtain the time until the restransmit timer should fire. | |||||
* This macro ensures the restransmit timer fires at the earlier of the | |||||
* t_rxtcur value or the time the maxunacktime would be exceeded. | |||||
*/ | |||||
#define TP_RXTCUR(tp) \ | |||||
((TP_MAXUNACKTIME(tp) == 0 || tp->t_acktime == 0) ? tp->t_rxtcur : \ | |||||
max(1, min(tp->t_rxtcur, tp->t_acktime + TP_MAXUNACKTIME(tp) - ticks))) | |||||
extern int tcp_persmin; /* minimum persist interval */ | extern int tcp_persmin; /* minimum persist interval */ | ||||
extern int tcp_persmax; /* maximum persist interval */ | extern int tcp_persmax; /* maximum persist interval */ | ||||
extern int tcp_keepinit; /* time to establish connection */ | extern int tcp_keepinit; /* time to establish connection */ | ||||
extern int tcp_keepidle; /* time before keepalive probes begin */ | extern int tcp_keepidle; /* time before keepalive probes begin */ | ||||
extern int tcp_keepintvl; /* time between keepalive probes */ | extern int tcp_keepintvl; /* time between keepalive probes */ | ||||
extern int tcp_keepcnt; /* number of keepalives */ | extern int tcp_keepcnt; /* number of keepalives */ | ||||
extern int tcp_delacktime; /* time before sending a delayed ACK */ | extern int tcp_delacktime; /* time before sending a delayed ACK */ | ||||
extern int tcp_maxunacktime; /* max time without making progress */ | |||||
extern int tcp_maxpersistidle; | extern int tcp_maxpersistidle; | ||||
extern int tcp_rexmit_initial; | extern int tcp_rexmit_initial; | ||||
extern int tcp_rexmit_min; | extern int tcp_rexmit_min; | ||||
extern int tcp_rexmit_slop; | extern int tcp_rexmit_slop; | ||||
extern int tcp_ttl; /* time to live for TCP segs */ | extern int tcp_ttl; /* time to live for TCP segs */ | ||||
extern int tcp_backoff[]; | extern int tcp_backoff[]; | ||||
extern int tcp_totbackoff; | extern int tcp_totbackoff; | ||||
extern int tcp_rexmit_drop_options; | extern int tcp_rexmit_drop_options; | ||||
Show All 29 Lines |