- for (tp = tcb_head; tp != NULL; tp = tp->t_tcb_next) {
- if (tp->t_init != 0 && --tp->t_init == 0)
- tcp_usrreq(ISTIMER, TINIT, tp, 0);
- if (tp->t_rexmt != 0 && --tp->t_rexmt == 0)
- tcp_usrreq(ISTIMER, TREXMT, tp, 0);
- if (tp->t_rexmttl != 0 && --tp->t_rexmttl == 0)
- tcp_usrreq(ISTIMER, TREXMTTL, tp, 0);
- if (tp->t_persist != 0 && --tp->t_persist == 0)
- tcp_usrreq(ISTIMER, TPERSIST, tp, 0);
- if (tp->t_finack != 0 && --tp->t_finack == 0)
- tcp_usrreq(ISTIMER, TFINACK, tp, 0);
+ for (ip = tcb.inp_next; ip != &tcb; ip = ip->inp_next) {
+ tp = intotcpcb(ip);
+ tmp = &tp->t_init;
+ for (i = 0; i < TNTIMERS; i++) {
+ if (*tmp && --*tmp == 0)
+ (void) tcp_usrreq(tp->t_inpcb->inp_socket,
+ PRU_SLOWTIMO, (struct mbuf *)0,
+ (caddr_t)i);
+ tmp++;
+ }