typed mbufs
[unix-history] / usr / src / sys / net / if_loop.c
index 2ff7994..e783861 100644 (file)
@@ -1,4 +1,4 @@
-/*     if_loop.c       4.10    82/04/13        */
+/*     if_loop.c       4.15    82/10/13        */
 
 /*
  * Loopback interface driver for protocol testing and timing.
 
 /*
  * Loopback interface driver for protocol testing and timing.
@@ -8,13 +8,15 @@
 #include "../h/systm.h"
 #include "../h/mbuf.h"
 #include "../h/socket.h"
 #include "../h/systm.h"
 #include "../h/mbuf.h"
 #include "../h/socket.h"
-#include "../net/in.h"
-#include "../net/in_systm.h"
+#include "../netinet/in.h"
+#include "../netinet/in_systm.h"
 #include "../net/if.h"
 #include "../net/if.h"
-#include "../net/ip.h"
-#include "../net/ip_var.h"
-#include "../h/mtpr.h"
+#include "../net/netisr.h"
+#include "../netinet/ip.h"
+#include "../netinet/ip_var.h"
+#include "../vax/mtpr.h"
 #include "../net/route.h"
 #include "../net/route.h"
+#include <errno.h>
 
 #define        LONET   127
 #define        LOMTU   (1024+512)
 
 #define        LONET   127
 #define        LOMTU   (1024+512)
@@ -27,7 +29,6 @@ loattach()
        register struct ifnet *ifp = &loif;
        register struct sockaddr_in *sin;
 
        register struct ifnet *ifp = &loif;
        register struct sockaddr_in *sin;
 
-COUNT(LOATTACH);
        ifp->if_name = "lo";
        ifp->if_mtu = LOMTU;
        ifp->if_net = LONET;
        ifp->if_name = "lo";
        ifp->if_mtu = LOMTU;
        ifp->if_net = LONET;
@@ -37,7 +38,7 @@ COUNT(LOATTACH);
        ifp->if_flags = IFF_UP;
        ifp->if_output = looutput;
        if_attach(ifp);
        ifp->if_flags = IFF_UP;
        ifp->if_output = looutput;
        if_attach(ifp);
-       if_rtinit(ifp, RTF_DIRECT|RTF_UP);
+       if_rtinit(ifp, RTF_UP);
 }
 
 looutput(ifp, m0, dst)
 }
 
 looutput(ifp, m0, dst)
@@ -48,7 +49,6 @@ looutput(ifp, m0, dst)
        int s = splimp();
        register struct ifqueue *ifq;
 
        int s = splimp();
        register struct ifqueue *ifq;
 
-COUNT(LOOUTPUT);
        ifp->if_opackets++;
        switch (dst->sa_family) {
 
        ifp->if_opackets++;
        switch (dst->sa_family) {