fix includes
[unix-history] / usr / src / sys / vax / if / if_dmc.c
index 7f3a5fc..a2b5bf4 100644 (file)
@@ -1,4 +1,4 @@
-/*     if_dmc.c        4.14    82/04/24        */
+/*     if_dmc.c        4.18    82/10/09        */
 
 #include "dmc.h"
 #if NDMC > 0
 
 #include "dmc.h"
 #if NDMC > 0
@@ -24,13 +24,11 @@ int dmcdebug = 1;
 #include "../h/cpu.h"
 #include "../h/mtpr.h"
 #include "../h/vmmac.h"
 #include "../h/cpu.h"
 #include "../h/mtpr.h"
 #include "../h/vmmac.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/if_uba.h"
-#include "../net/if_dmc.h"
-#include "../net/ip.h"
-#include "../net/ip_var.h"
+#include "../vaxif/if_uba.h"
+#include "../vaxif/if_dmc.h"
 #include "../net/route.h"
 #include <errno.h>
 
 #include "../net/route.h"
 #include <errno.h>
 
@@ -44,7 +42,7 @@ struct        uba_driver dmcdriver =
        { dmcprobe, 0, dmcattach, 0, dmcstd, "dmc", dmcinfo };
 
 #define        DMC_AF  0xff            /* 8 bits of address type in ui_flags */
        { dmcprobe, 0, dmcattach, 0, dmcstd, "dmc", dmcinfo };
 
 #define        DMC_AF  0xff            /* 8 bits of address type in ui_flags */
-#define        DMC_NET 0xff00          /* 8 bits of net number in ui_flags */
+#define        DMC_NET 0xffffff00      /* 24 bits of net number in ui_flags */
 
 /*
  * DMC software status per interface.
 
 /*
  * DMC software status per interface.
@@ -85,7 +83,6 @@ dmcprobe(reg)
        register struct dmcdevice *addr = (struct dmcdevice *)reg;
        register int i;
 
        register struct dmcdevice *addr = (struct dmcdevice *)reg;
        register int i;
 
-COUNT(DMCPROBE);
 #ifdef lint
        br = 0; cvec = br; br = cvec;
        dmcrint(0); dmcxint(0);
 #ifdef lint
        br = 0; cvec = br; br = cvec;
        dmcrint(0); dmcxint(0);
@@ -118,7 +115,6 @@ dmcattach(ui)
        register struct dmc_softc *sc = &dmc_softc[ui->ui_unit];
        register struct sockaddr_in *sin;
 
        register struct dmc_softc *sc = &dmc_softc[ui->ui_unit];
        register struct sockaddr_in *sin;
 
-COUNT(DMCATTACH);
        sc->sc_if.if_unit = ui->ui_unit;
        sc->sc_if.if_name = "dmc";
        sc->sc_if.if_mtu = DMCMTU;
        sc->sc_if.if_unit = ui->ui_unit;
        sc->sc_if.if_name = "dmc";
        sc->sc_if.if_mtu = DMCMTU;
@@ -144,7 +140,6 @@ dmcreset(unit, uban)
 {
        register struct uba_device *ui;
 
 {
        register struct uba_device *ui;
 
-COUNT(DMCRESET);
        if (unit >= NDMC || (ui = dmcinfo[unit]) == 0 || ui->ui_alive == 0 ||
            ui->ui_ubanum != uban)
                return;
        if (unit >= NDMC || (ui = dmcinfo[unit]) == 0 || ui->ui_alive == 0 ||
            ui->ui_ubanum != uban)
                return;
@@ -163,7 +158,6 @@ dmcinit(unit)
        register struct dmcdevice *addr;
        int base;
 
        register struct dmcdevice *addr;
        int base;
 
-COUNT(DMCINIT);
        printd("dmcinit\n");
        if ((sc->sc_flag&DMCBMAPPED) == 0) {
                sc->sc_ubinfo = uballoc(ui->ui_ubanum,
        printd("dmcinit\n");
        if ((sc->sc_flag&DMCBMAPPED) == 0) {
                sc->sc_ubinfo = uballoc(ui->ui_ubanum,
@@ -188,8 +182,7 @@ COUNT(DMCINIT);
        sc->sc_if.if_flags |= IFF_UP;
        /* set up routing table entry */
        if ((sc->sc_if.if_flags & IFF_ROUTE) == 0) {
        sc->sc_if.if_flags |= IFF_UP;
        /* set up routing table entry */
        if ((sc->sc_if.if_flags & IFF_ROUTE) == 0) {
-               rtinit(&sc->sc_if.if_addr, &sc->sc_if.if_addr,
-                       RTF_DIRECT|RTF_HOST|RTF_UP);
+               rtinit(&sc->sc_if.if_addr, &sc->sc_if.if_addr, RTF_HOST|RTF_UP);
                sc->sc_if.if_flags |= IFF_ROUTE;
        }
 }
                sc->sc_if.if_flags |= IFF_ROUTE;
        }
 }
@@ -208,7 +201,6 @@ dmcstart(dev)
        int addr, len;
        struct mbuf *m;
 
        int addr, len;
        struct mbuf *m;
 
-COUNT(DMCSTART);
        printd("dmcstart\n");
        /*
         * Dequeue a request and map it to the UNIBUS.
        printd("dmcstart\n");
        /*
         * Dequeue a request and map it to the UNIBUS.
@@ -242,7 +234,6 @@ dmcload(sc, type, w0, w1)
        register struct dmcdevice *addr;
        register int unit, sps, n;
 
        register struct dmcdevice *addr;
        register int unit, sps, n;
 
-COUNT(DMCLOAD);
        printd("dmcload: 0x%x 0x%x 0x%x\n", type, w0, w1);
        unit = sc - dmc_softc;
        addr = (struct dmcdevice *)dmcinfo[unit]->ui_addr;
        printd("dmcload: 0x%x 0x%x 0x%x\n", type, w0, w1);
        unit = sc - dmc_softc;
        addr = (struct dmcdevice *)dmcinfo[unit]->ui_addr;
@@ -270,7 +261,6 @@ dmcrint(unit)
        register struct dmcdevice *addr;
        register int n;
 
        register struct dmcdevice *addr;
        register int n;
 
-COUNT(DMCRINT);
        addr = (struct dmcdevice *)dmcinfo[unit]->ui_addr;
        sc = &dmc_softc[unit];
        while (addr->bsel0&DMC_RDYI) {
        addr = (struct dmcdevice *)dmcinfo[unit]->ui_addr;
        sc = &dmc_softc[unit];
        while (addr->bsel0&DMC_RDYI) {
@@ -306,7 +296,6 @@ dmcxint(unit)
        register struct ifqueue *inq;
        int arg, cmd, len;
 
        register struct ifqueue *inq;
        int arg, cmd, len;
 
-COUNT(DMCXINT);
        addr = (struct dmcdevice *)ui->ui_addr;
        arg = addr->sel6;
        cmd = addr->bsel2&7;
        addr = (struct dmcdevice *)ui->ui_addr;
        arg = addr->sel6;
        cmd = addr->bsel2&7;
@@ -404,7 +393,6 @@ dmcoutput(ifp, m, dst)
        struct uba_device *ui = dmcinfo[ifp->if_unit];
        int s;
 
        struct uba_device *ui = dmcinfo[ifp->if_unit];
        int s;
 
-COUNT(DMCOUTPUT);
        printd("dmcoutput\n");
        if (dst->sa_family != (ui->ui_flags & DMC_AF)) {
                printf("dmc%d: af%d not supported\n", ifp->if_unit, pf);
        printd("dmcoutput\n");
        if (dst->sa_family != (ui->ui_flags & DMC_AF)) {
                printf("dmc%d: af%d not supported\n", ifp->if_unit, pf);