/* tcp_timer.c 4.2 81/11/25 */
#include "../h/socketvar.h"
#include "../h/protosw.h"
#include "../net/inet_pcb.h"
#include "../net/inet_systm.h"
#include "../net/ip_var.h"
#include "../net/tcp_fsm.h"
#include "../net/tcp_var.h"
#include "/usr/include/errno.h"
* Fast timeout routine for processing delayed acks
* Tcp protocol timeout routine called every 500 ms.
* Updates the timers in all active tcb's and
* causes finite state machine actions if timers expire.
register struct inpcb
*ip
;
register struct tcpcb
*tp
;
* Search through tcb's and update active timers.
for (ip
= tcb
.inp_next
; ip
!= &tcb
; ip
= ip
->inp_next
) {
for (i
= 0; i
< TCPT_NTIMERS
; i
++) {
(void) tcp_usrreq(tp
->t_inpcb
->inp_socket
,
PRU_SLOWTIMO
, (struct mbuf
*)0,
tcp_iss
+= TCP_ISSINCR
/PR_SLOWHZ
; /* increment iss */
* Cancel all timers for TCP tp.
for (i
= 0; i
< TCPT_NTIMERS
; i
++)
* TCP timer went off processing.
register struct tcpcb
*tp
;
if (tp
->t_xmtime
> TCPT_TOOLONG
) {
tp
->snd_wnd
++, (void) tcp_output(tp
), tp
->snd_wnd
--;