create netif directory
[unix-history] / usr / src / sys / netinet / tcp_timer.c
index ee34d84..725b668 100644 (file)
@@ -1,4 +1,4 @@
-/* tcp_timer.c 4.21 82/06/06 */
+/*     tcp_timer.c     4.28    82/10/20        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -6,20 +6,21 @@
 #include "../h/socket.h"
 #include "../h/socketvar.h"
 #include "../h/protosw.h"
 #include "../h/socket.h"
 #include "../h/socketvar.h"
 #include "../h/protosw.h"
-#include "../net/in.h"
-#include "../net/route.h"
-#include "../net/in_pcb.h"
-#include "../net/in_systm.h"
+#include <errno.h>
+
 #include "../net/if.h"
 #include "../net/if.h"
-#include "../net/ip.h"
-#include "../net/ip_var.h"
-#include "../net/tcp.h"
-#include "../net/tcp_fsm.h"
-#include "../net/tcp_seq.h"
-#include "../net/tcp_timer.h"
-#include "../net/tcp_var.h"
-#include "../net/tcpip.h"
-#include "../errno.h"
+#include "../net/route.h"
+#include "../netinet/in.h"
+#include "../netinet/in_pcb.h"
+#include "../netinet/in_systm.h"
+#include "../netinet/ip.h"
+#include "../netinet/ip_var.h"
+#include "../netinet/tcp.h"
+#include "../netinet/tcp_fsm.h"
+#include "../netinet/tcp_seq.h"
+#include "../netinet/tcp_timer.h"
+#include "../netinet/tcp_var.h"
+#include "../netinet/tcpip.h"
 
 int    tcpnodelack = 0;
 /*
 
 int    tcpnodelack = 0;
 /*
@@ -30,7 +31,6 @@ tcp_fasttimo()
        register struct inpcb *inp;
        register struct tcpcb *tp;
        int s = splnet();
        register struct inpcb *inp;
        register struct tcpcb *tp;
        int s = splnet();
-COUNT(TCP_FASTTIMO);
 
        inp = tcb.inp_next;
        if (inp)
 
        inp = tcb.inp_next;
        if (inp)
@@ -55,7 +55,6 @@ tcp_slowtimo()
        register struct tcpcb *tp;
        int s = splnet();
        register int i;
        register struct tcpcb *tp;
        int s = splnet();
        register int i;
-COUNT(TCP_SLOWTIMO);
 
        /*
         * Search through tcb's and update active timers.
 
        /*
         * Search through tcb's and update active timers.
@@ -74,7 +73,8 @@ COUNT(TCP_SLOWTIMO);
                        if (tp->t_timer[i] && --tp->t_timer[i] == 0) {
                                (void) tcp_usrreq(tp->t_inpcb->inp_socket,
                                    PRU_SLOWTIMO, (struct mbuf *)0,
                        if (tp->t_timer[i] && --tp->t_timer[i] == 0) {
                                (void) tcp_usrreq(tp->t_inpcb->inp_socket,
                                    PRU_SLOWTIMO, (struct mbuf *)0,
-                                   (caddr_t)i);
+                                   (struct mbuf *)i,
+                                   (struct socketopt *)0);
                                if (ipnxt->inp_prev != ip)
                                        goto tpgone;
                        }
                                if (ipnxt->inp_prev != ip)
                                        goto tpgone;
                        }
@@ -97,7 +97,6 @@ tcp_canceltimers(tp)
 {
        register int i;
 
 {
        register int i;
 
-COUNT(TCP_CANCELTIMERS);
        for (i = 0; i < TCPT_NTIMERS; i++)
                tp->t_timer[i] = 0;
 }
        for (i = 0; i < TCPT_NTIMERS; i++)
                tp->t_timer[i] = 0;
 }
@@ -114,7 +113,6 @@ tcp_timers(tp, timer)
        int timer;
 {
 
        int timer;
 {
 
-COUNT(TCP_TIMERS);
        switch (timer) {
 
        /*
        switch (timer) {
 
        /*
@@ -161,11 +159,10 @@ printf("rexmt set to %d\n", tp->t_timer[TCPT_REXMT]);
         * Force a byte to be output, if possible.
         */
        case TCPT_PERSIST:
         * Force a byte to be output, if possible.
         */
        case TCPT_PERSIST:
+               tcp_setpersist(tp);
                tp->t_force = 1;
                (void) tcp_output(tp);
                tp->t_force = 0;
                tp->t_force = 1;
                (void) tcp_output(tp);
                tp->t_force = 0;
-               TCPT_RANGESET(tp->t_timer[TCPT_PERSIST],
-                   tcp_beta * tp->t_srtt, TCPTV_PERSMIN, TCPTV_MAX);
                return;
 
        /*
                return;
 
        /*
@@ -197,18 +194,5 @@ printf("rexmt set to %d\n", tp->t_timer[TCPT_REXMT]);
        dropit:
                tcp_drop(tp, ETIMEDOUT);
                return;
        dropit:
                tcp_drop(tp, ETIMEDOUT);
                return;
-
-#ifdef TCPTRUEOOB
-       /*
-        * Out-of-band data retransmit timer.
-        */
-       case TCPT_OOBREXMT:
-               if (tp->t_flags & TF_NOOPT)
-                       return;
-               (void) tcp_output(tp);
-               TCPT_RANGESET(tp->t_timer[TCPT_OOBREXMT],
-                   2 * tp->t_srtt, TCPTV_MIN, TCPTV_MAX);
-               return;
-#endif
        }
 }
        }
 }