MCPcopy Create free account
hub / github.com/F-Stack/f-stack / tcp_setpersist

Function tcp_setpersist

freebsd/netinet/tcp_output.c:1710–1727  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1708}
1709
1710void
1711tcp_setpersist(struct tcpcb *tp)
1712{
1713 int t = ((tp->t_srtt >> 2) + tp->t_rttvar) >> 1;
1714 int tt;
1715
1716 tp->t_flags &= ~TF_PREVVALID;
1717 if (tcp_timer_active(tp, TT_REXMT))
1718 panic("tcp_setpersist: retransmit pending");
1719 /*
1720 * Start/restart persistence timer.
1721 */
1722 TCPT_RANGESET(tt, t * tcp_backoff[tp->t_rxtshift],
1723 tcp_persmin, tcp_persmax);
1724 tcp_timer_activate(tp, TT_PERSIST, tt);
1725 if (tp->t_rxtshift < TCP_MAXRXTSHIFT)
1726 tp->t_rxtshift++;
1727}
1728
1729/*
1730 * Insert TCP options according to the supplied parameters to the place

Callers 4

tcp_timer_persistFunction · 0.85
tcp_timers_unsuspendFunction · 0.85
tcp_output.cFile · 0.85
tcp_default_fb_initFunction · 0.85

Calls 3

tcp_timer_activeFunction · 0.85
tcp_timer_activateFunction · 0.85
panicFunction · 0.50

Tested by

no test coverage detected