35#ifndef _NETINET_TCP_TIMER_H_
36#define _NETINET_TCP_TIMER_H_
77#define TCPTV_MSL ( 30*hz)
78#define TCPTV_SRTTBASE 0
80#define TCPTV_RTOBASE ( 1*hz)
82#define TCPTV_PERSMIN ( 5*hz)
83#define TCPTV_PERSMAX ( 60*hz)
85#define TCPTV_KEEP_INIT ( 75*hz)
86#define TCPTV_KEEP_IDLE (120*60*hz)
87#define TCPTV_KEEPINTVL ( 75*hz)
88#define TCPTV_KEEPCNT 8
90#define TCPTV_FINWAIT2_TIMEOUT (60*hz)
112#define TCPTV_MIN ( hz/33 )
113#define TCPTV_CPU_VAR ( hz/5 )
114#define TCPTV_REXMTMAX ( 64*hz)
116#define TCPTV_TWTRUNC 8
118#define TCP_MAXRXTSHIFT 12
120#define TCPTV_DELACK ( hz/25 )
127#define TCP_RTT_INVALIDATE (TCP_MAXRXTSHIFT / 4)
130static const char *tcptimers[] =
131 {
"REXMT",
"PERSIST",
"KEEP",
"2MSL",
"DELACK" };
137#define TCPT_RANGESET(tv, value, tvmin, tvmax) do { \
138 (tv) = (value) + tcp_rexmit_slop; \
139 if ((u_long)(tv) < (u_long)(tvmin)) \
141 if ((u_long)(tv) > (u_long)(tvmax)) \
162#define TT_DELACK 0x0001
163#define TT_REXMT 0x0002
164#define TT_PERSIST 0x0004
165#define TT_KEEP 0x0008
166#define TT_2MSL 0x0010
167#define TT_MASK (TT_DELACK|TT_REXMT|TT_PERSIST|TT_KEEP|TT_2MSL)
173#define TT_DELACK_SUS 0x0100
174#define TT_REXMT_SUS 0x0200
175#define TT_PERSIST_SUS 0x0400
176#define TT_KEEP_SUS 0x0800
177#define TT_2MSL_SUS 0x1000
179#define TT_STOPPED 0x00010000
181#define TP_KEEPINIT(tp) ((tp)->t_keepinit ? (tp)->t_keepinit : tcp_keepinit)
182#define TP_KEEPIDLE(tp) ((tp)->t_keepidle ? (tp)->t_keepidle : tcp_keepidle)
183#define TP_KEEPINTVL(tp) ((tp)->t_keepintvl ? (tp)->t_keepintvl : tcp_keepintvl)
184#define TP_KEEPCNT(tp) ((tp)->t_keepcnt ? (tp)->t_keepcnt : tcp_keepcnt)
185#define TP_MAXIDLE(tp) (TP_KEEPCNT(tp) * TP_KEEPINTVL(tp))
207#define V_tcp_always_keepalive VNET(tcp_always_keepalive)
209#define V_tcp_pmtud_blackhole_detect VNET(tcp_pmtud_blackhole_detect)
211#define V_tcp_pmtud_blackhole_mss VNET(tcp_pmtud_blackhole_mss)
213#define V_tcp_v6pmtud_blackhole_mss VNET(tcp_v6pmtud_blackhole_mss)
215#define V_tcp_msl VNET(tcp_msl)
struct callout tt_persist
void tcp_timer_persist(void *xtp)
void tcp_timer_rexmt(void *xtp)
void tcp_timer_init(void)
void tcp_timer_keep(void *xtp)
void tcp_timer_2msl(void *xtp)
struct tcptw * tcp_tw_2msl_scan(int reuse)
void tcp_timer_delack(void *xtp)
void tcp_inpinfo_lock_del(struct inpcb *inp, struct tcpcb *tp)
int tcp_rexmit_drop_options
VNET_DECLARE(int, tcp_always_keepalive)
int tcp_fast_finwait2_recycle