-#include "/usr/include/errno.h"
-
-/*
- * Tcp initialization
- */
-tcp_init()
-{
-
- tcp_iss = 1; /* wrong */
- tcb.inp_next = tcb.inp_prev = &tcb;
-}
-
-/*
- * Tcp finite state machine entries for timer and user generated
- * requests. These routines raise the ipl to that of the network
- * to prevent reentry. In particluar, this requires that the software
- * clock interrupt have lower priority than the network so that
- * we can enter the network from timeout routines without improperly
- * nesting the interrupt stack.
- */
-
-/*
- * 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.
- */
-tcp_slowtimo()
-{
- register struct inpcb *ip;
- register struct tcpcb *tp;
- int s = splnet();
- register short *tmp;
- register int i;
-COUNT(TCP_TIMEO);
-
- /*
- * Search through tcb's and update active timers.
- */
- 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++;
- }
- tp->t_xmt++;
- }
- tcp_iss += ISSINCR/2; /* increment iss */
- splx(s);
-}