FreeBSD kernel IPv4 code
|
Go to the source code of this file.
Data Structures | |
struct | tcp_timer |
Macros | |
#define | TCPTV_MSL ( 30*hz) /* max seg lifetime (hah!) */ |
#define | TCPTV_SRTTBASE |
#define | TCPTV_RTOBASE ( 1*hz) /* assumed RTO if no info */ |
#define | TCPTV_PERSMIN ( 5*hz) /* minimum persist interval */ |
#define | TCPTV_PERSMAX ( 60*hz) /* maximum persist interval */ |
#define | TCPTV_KEEP_INIT ( 75*hz) /* initial connect keepalive */ |
#define | TCPTV_KEEP_IDLE (120*60*hz) /* dflt time before probing */ |
#define | TCPTV_KEEPINTVL ( 75*hz) /* default probe interval */ |
#define | TCPTV_KEEPCNT 8 /* max probes before drop */ |
#define | TCPTV_FINWAIT2_TIMEOUT (60*hz) /* FIN_WAIT_2 timeout if no receiver */ |
#define | TCPTV_MIN ( hz/33 ) /* minimum allowable value */ |
#define | TCPTV_CPU_VAR ( hz/5 ) /* cpu variance allowed (200ms) */ |
#define | TCPTV_REXMTMAX ( 64*hz) /* max allowable REXMT value */ |
#define | TCPTV_TWTRUNC 8 /* RTO factor to truncate TW */ |
#define | TCP_MAXRXTSHIFT 12 /* maximum retransmits */ |
#define | TCPTV_DELACK ( hz/25 ) /* 40ms timeout */ |
#define | TCP_RTT_INVALIDATE (TCP_MAXRXTSHIFT / 4) |
#define | TCPT_RANGESET(tv, value, tvmin, tvmax) |
#define | TT_DELACK 0x0001 |
#define | TT_REXMT 0x0002 |
#define | TT_PERSIST 0x0004 |
#define | TT_KEEP 0x0008 |
#define | TT_2MSL 0x0010 |
#define | TT_MASK (TT_DELACK|TT_REXMT|TT_PERSIST|TT_KEEP|TT_2MSL) |
#define | TT_DELACK_SUS 0x0100 |
#define | TT_REXMT_SUS 0x0200 |
#define | TT_PERSIST_SUS 0x0400 |
#define | TT_KEEP_SUS 0x0800 |
#define | TT_2MSL_SUS 0x1000 |
#define | TT_STOPPED 0x00010000 |
#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)) |
#define | V_tcp_always_keepalive VNET(tcp_always_keepalive) |
#define | V_tcp_pmtud_blackhole_detect VNET(tcp_pmtud_blackhole_detect) |
#define | V_tcp_pmtud_blackhole_mss VNET(tcp_pmtud_blackhole_mss) |
#define | V_tcp_v6pmtud_blackhole_mss VNET(tcp_v6pmtud_blackhole_mss) |
#define | V_tcp_msl VNET(tcp_msl) |
Functions | |
VNET_DECLARE (int, tcp_always_keepalive) | |
VNET_DECLARE (int, tcp_pmtud_blackhole_detect) | |
VNET_DECLARE (int, tcp_pmtud_blackhole_mss) | |
VNET_DECLARE (int, tcp_v6pmtud_blackhole_mss) | |
VNET_DECLARE (int, tcp_msl) | |
void | tcp_inpinfo_lock_del (struct inpcb *inp, struct tcpcb *tp) |
void | tcp_timer_init (void) |
void | tcp_timer_2msl (void *xtp) |
struct tcptw * | tcp_tw_2msl_scan (int reuse) |
void | tcp_timer_keep (void *xtp) |
void | tcp_timer_persist (void *xtp) |
void | tcp_timer_rexmt (void *xtp) |
void | tcp_timer_delack (void *xtp) |
Variables | |
int | tcp_persmin |
int | tcp_persmax |
int | tcp_keepinit |
int | tcp_keepidle |
int | tcp_keepintvl |
int | tcp_keepcnt |
int | tcp_delacktime |
int | tcp_maxpersistidle |
int | tcp_rexmit_initial |
int | tcp_rexmit_min |
int | tcp_rexmit_slop |
int | tcp_ttl |
int | tcp_backoff [] |
int | tcp_totbackoff |
int | tcp_rexmit_drop_options |
int | tcp_finwait2_timeout |
int | tcp_fast_finwait2_recycle |
#define TCP_MAXRXTSHIFT 12 /* maximum retransmits */ |
Definition at line 117 of file tcp_timer.h.
#define TCP_RTT_INVALIDATE (TCP_MAXRXTSHIFT / 4) |
Definition at line 126 of file tcp_timer.h.
#define TCPT_RANGESET | ( | tv, | |
value, | |||
tvmin, | |||
tvmax | |||
) |
Definition at line 136 of file tcp_timer.h.
#define TCPTV_CPU_VAR ( hz/5 ) /* cpu variance allowed (200ms) */ |
Definition at line 112 of file tcp_timer.h.
#define TCPTV_DELACK ( hz/25 ) /* 40ms timeout */ |
Definition at line 119 of file tcp_timer.h.
#define TCPTV_FINWAIT2_TIMEOUT (60*hz) /* FIN_WAIT_2 timeout if no receiver */ |
Definition at line 89 of file tcp_timer.h.
#define TCPTV_KEEP_IDLE (120*60*hz) /* dflt time before probing */ |
Definition at line 85 of file tcp_timer.h.
#define TCPTV_KEEP_INIT ( 75*hz) /* initial connect keepalive */ |
Definition at line 84 of file tcp_timer.h.
#define TCPTV_KEEPCNT 8 /* max probes before drop */ |
Definition at line 87 of file tcp_timer.h.
#define TCPTV_KEEPINTVL ( 75*hz) /* default probe interval */ |
Definition at line 86 of file tcp_timer.h.
#define TCPTV_MIN ( hz/33 ) /* minimum allowable value */ |
Definition at line 111 of file tcp_timer.h.
#define TCPTV_MSL ( 30*hz) /* max seg lifetime (hah!) */ |
Definition at line 77 of file tcp_timer.h.
#define TCPTV_PERSMAX ( 60*hz) /* maximum persist interval */ |
Definition at line 82 of file tcp_timer.h.
#define TCPTV_PERSMIN ( 5*hz) /* minimum persist interval */ |
Definition at line 81 of file tcp_timer.h.
#define TCPTV_REXMTMAX ( 64*hz) /* max allowable REXMT value */ |
Definition at line 113 of file tcp_timer.h.
#define TCPTV_RTOBASE ( 1*hz) /* assumed RTO if no info */ |
Definition at line 79 of file tcp_timer.h.
#define TCPTV_SRTTBASE |
Definition at line 78 of file tcp_timer.h.
#define TCPTV_TWTRUNC 8 /* RTO factor to truncate TW */ |
Definition at line 115 of file tcp_timer.h.
#define TP_KEEPCNT | ( | tp | ) | ((tp)->t_keepcnt ? (tp)->t_keepcnt : tcp_keepcnt) |
Definition at line 183 of file tcp_timer.h.
#define TP_KEEPIDLE | ( | tp | ) | ((tp)->t_keepidle ? (tp)->t_keepidle : tcp_keepidle) |
Definition at line 181 of file tcp_timer.h.
#define TP_KEEPINIT | ( | tp | ) | ((tp)->t_keepinit ? (tp)->t_keepinit : tcp_keepinit) |
Definition at line 180 of file tcp_timer.h.
#define TP_KEEPINTVL | ( | tp | ) | ((tp)->t_keepintvl ? (tp)->t_keepintvl : tcp_keepintvl) |
Definition at line 182 of file tcp_timer.h.
#define TP_MAXIDLE | ( | tp | ) | (TP_KEEPCNT(tp) * TP_KEEPINTVL(tp)) |
Definition at line 184 of file tcp_timer.h.
#define TT_2MSL 0x0010 |
Definition at line 165 of file tcp_timer.h.
#define TT_2MSL_SUS 0x1000 |
Definition at line 176 of file tcp_timer.h.
#define TT_DELACK 0x0001 |
Definition at line 161 of file tcp_timer.h.
#define TT_DELACK_SUS 0x0100 |
Definition at line 172 of file tcp_timer.h.
#define TT_KEEP 0x0008 |
Definition at line 164 of file tcp_timer.h.
#define TT_KEEP_SUS 0x0800 |
Definition at line 175 of file tcp_timer.h.
#define TT_MASK (TT_DELACK|TT_REXMT|TT_PERSIST|TT_KEEP|TT_2MSL) |
Definition at line 166 of file tcp_timer.h.
#define TT_PERSIST 0x0004 |
Definition at line 163 of file tcp_timer.h.
#define TT_PERSIST_SUS 0x0400 |
Definition at line 174 of file tcp_timer.h.
#define TT_REXMT 0x0002 |
Definition at line 162 of file tcp_timer.h.
#define TT_REXMT_SUS 0x0200 |
Definition at line 173 of file tcp_timer.h.
#define TT_STOPPED 0x00010000 |
Definition at line 178 of file tcp_timer.h.
#define V_tcp_always_keepalive VNET(tcp_always_keepalive) |
Definition at line 206 of file tcp_timer.h.
#define V_tcp_msl VNET(tcp_msl) |
Definition at line 214 of file tcp_timer.h.
#define V_tcp_pmtud_blackhole_detect VNET(tcp_pmtud_blackhole_detect) |
Definition at line 208 of file tcp_timer.h.
#define V_tcp_pmtud_blackhole_mss VNET(tcp_pmtud_blackhole_mss) |
Definition at line 210 of file tcp_timer.h.
#define V_tcp_v6pmtud_blackhole_mss VNET(tcp_v6pmtud_blackhole_mss) |
Definition at line 212 of file tcp_timer.h.
Definition at line 295 of file tcp_timer.c.
References INP_WUNLOCK.
Referenced by tcp_timer_2msl(), tcp_timer_keep(), tcp_timer_persist(), and tcp_timer_rexmt().
void tcp_timer_2msl | ( | void * | xtp | ) |
Definition at line 302 of file tcp_timer.c.
References INP_DROPPED, inpcb::inp_flags, inpcb::inp_socket, INP_TIMEWAIT, INP_WLOCK, INP_WUNLOCK, tcpcb::t_inpcb, tcpcb::t_rcvtime, tcpcb::t_state, tcpcb::t_timers, tcpcb::t_vnet, TA_USER, tcp_close(), tcp_fast_finwait2_recycle, tcp_free_sackholes(), tcp_inpinfo_lock_del(), TCP_PROBE2, tcp_timer_2msl(), tcp_trace(), TCPS_FIN_WAIT_2, TCPSTAT_INC, TP_KEEPINTVL, TP_MAXIDLE, tcp_timer::tt_2msl, tcp_timer::tt_flags, and TT_STOPPED.
Referenced by tcp_timer_2msl(), and tcp_timer_activate().
void tcp_timer_delack | ( | void * | xtp | ) |
Definition at line 264 of file tcp_timer.c.
References INP_DROPPED, inpcb::inp_flags, INP_WLOCK, INP_WUNLOCK, tcpcb::t_flags, tcpcb::t_inpcb, tcpcb::t_timers, tcpcb::t_vnet, TCPSTAT_INC, TF_ACKNOW, and tcp_timer::tt_delack.
Referenced by tcp_timer_activate().
void tcp_timer_init | ( | void | ) |
void tcp_timer_keep | ( | void * | xtp | ) |
Definition at line 377 of file tcp_timer.c.
References INP_DROPPED, inpcb::inp_flags, inpcb::inp_socket, INP_TIMEWAIT, INP_WLOCK, INP_WUNLOCK, tcpcb::rcv_nxt, tcpcb::snd_una, tcpcb::t_inpcb, tcpcb::t_rcvtime, tcpcb::t_state, tcpcb::t_timers, tcpcb::t_vnet, TA_USER, tcp_drop(), tcp_inpinfo_lock_del(), TCP_PROBE2, tcp_respond(), tcp_timer_keep(), tcp_trace(), tcpip_maketemplate(), TCPS_CLOSING, TCPS_ESTABLISHED, TCPS_HAVEESTABLISHED, TCPSTAT_INC, TP_KEEPIDLE, TP_KEEPINTVL, TP_MAXIDLE, tcp_timer::tt_flags, tcptemp::tt_ipgen, tcp_timer::tt_keep, TT_STOPPED, tcptemp::tt_t, and V_tcp_always_keepalive.
Referenced by tcp_timer_activate(), and tcp_timer_keep().
void tcp_timer_persist | ( | void * | xtp | ) |
Definition at line 493 of file tcp_timer.c.
References INP_DROPPED, inpcb::inp_flags, inpcb::inp_socket, INP_TIMEWAIT, INP_WLOCK, INP_WUNLOCK, tcpcb::t_flags, tcpcb::t_inpcb, tcpcb::t_rcvtime, tcpcb::t_rxtshift, tcpcb::t_state, tcpcb::t_timers, tcpcb::t_vnet, TA_USER, tcp_drop(), tcp_inpinfo_lock_del(), tcp_maxpersistidle, TCP_MAXRXTSHIFT, TCP_PROBE2, TCP_REXMTVAL, tcp_setpersist(), tcp_totbackoff, tcp_trace(), TCPS_CLOSE_WAIT, TCPSTAT_INC, TCPTV_PERSMAX, TF_FORCEDATA, tcp_timer::tt_flags, tcp_timer::tt_persist, and TT_STOPPED.
Referenced by tcp_timer_activate().
void tcp_timer_rexmt | ( | void * | xtp | ) |
Definition at line 575 of file tcp_timer.c.
References CC_ALGO, cc_cong_signal(), CC_RTO, tcpcb::ccv, IN_CONGRECOVERY, IN_FASTRECOVERY, in_losing(), INP_DROPPED, inpcb::inp_flags, INP_IPV6, inpcb::inp_socket, INP_TIMEWAIT, inpcb::inp_vflag, INP_WLOCK, INP_WUNLOCK, tcpcb::snd_cwnd, tcpcb::snd_cwnd_prev, tcpcb::snd_max, tcpcb::snd_nxt, tcpcb::snd_recover, tcpcb::snd_recover_prev, tcpcb::snd_ssthresh, tcpcb::snd_ssthresh_prev, tcpcb::snd_una, tcpcb::t_badrxtwin, tcpcb::t_blackhole_enter, tcpcb::t_blackhole_exit, tcpcb::t_fb, tcpcb::t_flags, tcpcb::t_flags2, tcpcb::t_inpcb, tcpcb::t_maxseg, tcpcb::t_pmtud_saved_maxseg, tcpcb::t_rttmin, tcpcb::t_rtttime, tcpcb::t_rxtcur, tcpcb::t_rxtshift, tcpcb::t_srtt, tcpcb::t_state, tcpcb::t_timers, tcpcb::t_vnet, TA_USER, tcp_backoff, tcp_drop(), tcp_free_sackholes(), tcp_inpinfo_lock_del(), TCP_LOG_EVENT, TCP_LOG_RTO, TCP_MAXRXTSHIFT, TCP_PROBE2, tcp_rexmit_drop_options, tcp_rexmit_initial, TCP_REXMTVAL, TCP_RTT_INVALIDATE, TCP_RTT_SHIFT, tcp_trace(), TCPS_ESTABLISHED, TCPS_FIN_WAIT_1, TCPS_SYN_RECEIVED, TCPS_SYN_SENT, TCPSTAT_INC, TCPT_RANGESET, TCPTV_REXMTMAX, TF2_PLPMTU_BLACKHOLE, TF2_PLPMTU_MAXSEGSNT, TF2_PLPMTU_PMTUD, TF_ACKNOW, TF_PREVVALID, TF_RCVD_TSTMP, TF_REQ_SCALE, TF_REQ_TSTMP, TF_SACK_PERMIT, TF_WASCRECOVERY, TF_WASFRECOVERY, tcp_function_block::tfb_tcp_rexmit_tmr, tcp_timer::tt_flags, tcp_timer::tt_rexmt, TT_STOPPED, V_tcp_mssdflt, V_tcp_pmtud_blackhole_detect, V_tcp_pmtud_blackhole_mss, and V_tcp_v6pmtud_blackhole_mss.
Referenced by tcp_timer_activate().
struct tcptw * tcp_tw_2msl_scan | ( | int | reuse | ) |
Definition at line 803 of file tcp_timewait.c.
References in_pcbref(), in_pcbrele_wlocked(), INP_WLOCK, INP_WUNLOCK, intotw, tcp_twclose(), tcptw::tw_inpcb, TW_RLOCK, TW_RUNLOCK, tcptw::tw_time, V_tw_lock, and V_twq_2msl.
Referenced by tcp_slowtimo(), and tcp_twstart().
VNET_DECLARE | ( | int | , |
tcp_always_keepalive | |||
) |
VNET_DECLARE | ( | int | , |
tcp_msl | |||
) |
VNET_DECLARE | ( | int | , |
tcp_pmtud_blackhole_detect | |||
) |
VNET_DECLARE | ( | int | , |
tcp_pmtud_blackhole_mss | |||
) |
VNET_DECLARE | ( | int | , |
tcp_v6pmtud_blackhole_mss | |||
) |
|
extern |
Definition at line 254 of file tcp_timer.c.
Referenced by bbr_get_persists_timer_val(), bbr_timeout_rxt(), bbr_timer_start(), rack_get_persists_timer_val(), rack_timeout_rxt(), syncache_timeout(), tcp_setpersist(), and tcp_timer_rexmt().
|
extern |
Definition at line 114 of file tcp_timer.c.
Referenced by cc_ecnpkt_handler_flags(), rack_start_hpts_timer(), tcp_do_segment(), tcp_init(), and tcp_timers_unsuspend().
|
extern |
Definition at line 149 of file tcp_timer.c.
Referenced by bbr_do_fin_wait_1(), bbr_do_syn_recv(), bbr_do_syn_sent(), rack_do_compressed_ack_processing(), rack_do_fin_wait_1(), rack_do_syn_recv(), rack_do_syn_sent(), tcp_do_segment(), tcp_timer_2msl(), tcp_timers_unsuspend(), and tcp_usrclosed().
|
extern |
Definition at line 154 of file tcp_timer.c.
Referenced by bbr_do_fin_wait_1(), bbr_do_syn_recv(), bbr_do_syn_sent(), rack_do_compressed_ack_processing(), rack_do_fin_wait_1(), rack_do_syn_recv(), rack_do_syn_sent(), tcp_do_segment(), tcp_init(), tcp_timers_unsuspend(), and tcp_usrclosed().
|
extern |
Definition at line 160 of file tcp_timer.c.
|
extern |
Definition at line 102 of file tcp_timer.c.
Referenced by tcp_init().
|
extern |
Definition at line 96 of file tcp_timer.c.
Referenced by tcp_init().
|
extern |
Definition at line 108 of file tcp_timer.c.
Referenced by tcp_init().
|
extern |
Definition at line 165 of file tcp_timer.c.
Referenced by bbr_timeout_persist(), rack_timeout_persist(), tcp_init(), and tcp_timer_persist().
|
extern |
Definition at line 90 of file tcp_timer.c.
Referenced by tcp_init(), and tcp_setpersist().
|
extern |
Definition at line 84 of file tcp_timer.c.
Referenced by tcp_init(), and tcp_setpersist().
|
extern |
Definition at line 167 of file tcp_timer.c.
Referenced by bbr_timeout_rxt(), rack_timeout_rxt(), and tcp_timer_rexmt().
|
extern |
Definition at line 126 of file tcp_timer.c.
Referenced by syncache_timeout(), tcp_init(), tcp_newtcpcb(), and tcp_timer_rexmt().
|
extern |
Definition at line 132 of file tcp_timer.c.
Referenced by syncache_timeout(), tcp_init(), and tcp_newtcpcb().
|
extern |
Definition at line 138 of file tcp_timer.c.
Referenced by rack_convert_rtts(), rack_init(), rack_log_rtt_sample(), and tcp_init().
|
extern |
Definition at line 257 of file tcp_timer.c.
Referenced by bbr_timeout_persist(), rack_timeout_persist(), and tcp_timer_persist().
|
extern |