These functions serve two purposes: estimating the round-trip time and setting the actual retransmission timer. rtt_init - this function initializes srtt_ and rtt_ to zero, sets rttvar_ to , and sets the backoff multiplier to one.
rtt_timeout - this function gives the timeout value in seconds that should be used to schedule the next retransmission timer. It computes this based on the current estimates of the mean and deviation of the round-trip time. In addition, it implements Karn's exponential timer backoff for multiple consecutive retransmission timeouts.
rtt_update - this function takes as argument the measured RTT and averages it in to the running mean and deviation estimators according to the description above. Note that t_srtt_ and t_rttvar are both stored in fixed-point (integers). They have 3 and 2 bits, respectively, to the right of the binary point.
reset_rtx_timer - This function is invoked during fast retransmit or during a timeout. It sets a retransmission timer by calling set_rtx_timer and if invoked by a timeout also calls rtt_backoff.
rtt_backoff - this function backs off the retransmission timer (by doubling it).
newtimer - this function called only when a new ACK arrives. If the sender's left window edge is beyond the ACK, then set_rtx_timer is called, otherwise if a retransmission timer is pending it is cancelled.
Tom Henderson 2011-11-05