add class a/b/c net #'s and purge logical host kludge code
authorSam Leffler <sam@ucbvax.Berkeley.EDU>
Mon, 14 Jun 1982 14:01:52 +0000 (06:01 -0800)
committerSam Leffler <sam@ucbvax.Berkeley.EDU>
Mon, 14 Jun 1982 14:01:52 +0000 (06:01 -0800)
SCCS-vsn: sys/net/if.c 4.16
SCCS-vsn: sys/net/if.h 4.14
SCCS-vsn: sys/vax/if/if_dmc.c 4.16
SCCS-vsn: sys/vax/if/if_ec.c 4.16
SCCS-vsn: sys/vax/if/if_en.c 4.65
SCCS-vsn: sys/vax/if/if_il.c 4.6
SCCS-vsn: sys/deprecated/netimp/if_imp.c 4.34
SCCS-vsn: sys/vax/if/if_vv.c 4.3
SCCS-vsn: sys/netinet/in.c 4.2
SCCS-vsn: sys/netinet/in.h 4.13
SCCS-vsn: sys/netinet/in_pcb.c 4.27
SCCS-vsn: sys/netinet/ip_input.c 1.44
SCCS-vsn: sys/netinet/ip_output.c 1.34

13 files changed:
usr/src/sys/deprecated/netimp/if_imp.c
usr/src/sys/net/if.c
usr/src/sys/net/if.h
usr/src/sys/netinet/in.c
usr/src/sys/netinet/in.h
usr/src/sys/netinet/in_pcb.c
usr/src/sys/netinet/ip_input.c
usr/src/sys/netinet/ip_output.c
usr/src/sys/vax/if/if_dmc.c
usr/src/sys/vax/if/if_ec.c
usr/src/sys/vax/if/if_en.c
usr/src/sys/vax/if/if_il.c
usr/src/sys/vax/if/if_vv.c

index df8b243..bca4812 100644 (file)
@@ -1,4 +1,4 @@
-/*     if_imp.c        4.33    82/06/12        */
+/*     if_imp.c        4.34    82/06/13        */
 
 #include "imp.h"
 #if NIMP > 0
 
 #include "imp.h"
 #if NIMP > 0
index 095a620..7915b25 100644 (file)
@@ -1,4 +1,4 @@
-/*     if.c    4.15    82/05/04        */
+/*     if.c    4.16    82/06/13        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -148,44 +148,3 @@ if_down(ifp)
        ifp->if_flags &= ~IFF_UP;
        pfctlinput(PRC_IFDOWN, (caddr_t)&ifp->if_addr);
 }
        ifp->if_flags &= ~IFF_UP;
        pfctlinput(PRC_IFDOWN, (caddr_t)&ifp->if_addr);
 }
-
-/*
- * Formulate an Internet address from network + host.  Used in
- * building addresses stored in the ifnet structure.
- */
-struct in_addr
-if_makeaddr(net, host)
-       int net, host;
-{
-       u_long addr;
-
-       if (net < 128)
-               addr = (net << 24) | host;
-       else if (net < 65536)
-               addr = (net << 16) | host;
-       else
-               addr = (net << 8) | host;
-#ifdef vax
-       addr = htonl(addr);
-#endif
-       return (*(struct in_addr *)&addr);
-}
-
-/*
- * Initialize an interface's routing
- * table entry according to the network.
- * INTERNET SPECIFIC.
- */
-if_rtinit(ifp, flags)
-       register struct ifnet *ifp;
-       int flags;
-{
-       struct sockaddr_in sin;
-
-       if (ifp->if_flags & IFF_ROUTE)
-               return;
-       bzero((caddr_t)&sin, sizeof (sin));
-       sin.sin_family = AF_INET;
-       sin.sin_addr = if_makeaddr(ifp->if_net, 0);
-       rtinit(&sin, &ifp->if_addr, flags);
-}
index a166d53..f3f43b1 100644 (file)
@@ -1,4 +1,4 @@
-/*     if.h    4.13    82/05/24        */
+/*     if.h    4.14    82/06/13        */
 
 /*
  * Structures defining a network interface, providing a packet
 
 /*
  * Structures defining a network interface, providing a packet
  * Structure defining a queue for a network interface.
  *
  * (Would like to call this struct ``if'', but C isn't PL/1.)
  * Structure defining a queue for a network interface.
  *
  * (Would like to call this struct ``if'', but C isn't PL/1.)
+ *
+ * EVENTUALLY PURGE if_net AND if_host FROM STRUCTURE
  */
 struct ifnet {
        char    *if_name;               /* name, e.g. ``en'' or ``lo'' */
        short   if_unit;                /* sub-unit for lower level driver */
        short   if_mtu;                 /* maximum transmission unit */
  */
 struct ifnet {
        char    *if_name;               /* name, e.g. ``en'' or ``lo'' */
        short   if_unit;                /* sub-unit for lower level driver */
        short   if_mtu;                 /* maximum transmission unit */
-       short   if_net;                 /* network number of interface */
+       int     if_net;                 /* network number of interface */
        short   if_flags;               /* up/down, broadcast, etc. */
        int     if_host[2];             /* local net host number */
        struct  sockaddr if_addr;       /* address of interface */
        short   if_flags;               /* up/down, broadcast, etc. */
        int     if_host[2];             /* local net host number */
        struct  sockaddr if_addr;       /* address of interface */
index 441b87d..cf65f69 100644 (file)
@@ -1,4 +1,4 @@
-/*     in.c    4.1     82/06/13        */
+/*     in.c    4.2     82/06/13        */
 
 #include "../h/param.h"
 #include "../h/mbuf.h"
 
 #include "../h/param.h"
 #include "../h/mbuf.h"
@@ -7,6 +7,8 @@
 #include "../h/socketvar.h"
 #include "../net/in.h"
 #include "../net/in_systm.h"
 #include "../h/socketvar.h"
 #include "../net/in.h"
 #include "../net/in_systm.h"
+#include "../net/if.h"
+#include "../net/route.h"
 #include "../net/af.h"
 
 #ifdef INET
 #include "../net/af.h"
 
 #ifdef INET
index 9e41fd7..4da362b 100644 (file)
@@ -1,4 +1,4 @@
-/* in.h 4.12 82/06/05 */
+/*     in.h    4.13    82/06/13        */
 
 /*
  * Constants and structures defined by the internet system,
 
 /*
  * Constants and structures defined by the internet system,
@@ -91,27 +91,29 @@ struct in_addr {
  * Macros for dealing with Class A/B/C network
  * numbers.  High 3 bits of uppermost byte indicates
  * how to interpret the remainder of the 32-bit
  * Macros for dealing with Class A/B/C network
  * numbers.  High 3 bits of uppermost byte indicates
  * how to interpret the remainder of the 32-bit
- * Internet address.
+ * Internet address.  The macros may be used in time
+ * time critical sections of code, while subroutine
+ * versions also exist use in other places.
  */
  */
-#ifdef vax || pdp11
+#if vax || pdp11
+#define        IN_CLASSA       0x00000080
 #define        IN_CLASSA_NET   0x000000ff      /* 8 bits of net # */
 #define        IN_CLASSA_LNA   0xffffff00
 #define        IN_CLASSA_NET   0x000000ff      /* 8 bits of net # */
 #define        IN_CLASSA_LNA   0xffffff00
-#define        IN_CLASSB       0x00000008
+#define        IN_CLASSB       0x00000040
 #define        IN_CLASSB_NET   0x0000ffff      /* 16 bits of net # */
 #define        IN_CLASSB_LNA   0xffff0000
 #define        IN_CLASSB_NET   0x0000ffff      /* 16 bits of net # */
 #define        IN_CLASSB_LNA   0xffff0000
-#define        IN_CLASSC       0x0000000c
 #define        IN_CLASSC_NET   0x00ffffff      /* 24 bits of net # */
 #define        IN_CLASSC_LNA   0xff000000
 #endif
 
 #define        IN_CLASSC_NET   0x00ffffff      /* 24 bits of net # */
 #define        IN_CLASSC_LNA   0xff000000
 #endif
 
-#define        inetpart(in) \
-       ((((in).s_addr&IN_CLASSC)==IN_CLASSC)?((in).s_addr&IN_CLASSC_NET):\
-        ((((in).s_addr&IN_CLASSB)==IN_CLASSB)?((in).s_addr&IN_CLASSB_NET):\
-         ((in).s_addr&IN_CLASSA_NET)))
-#define        lnapart(in) \
-       ((((in).s_addr&IN_CLASSC)==IN_CLASSC)?((in).s_addr&IN_CLASSC_LNA) : \
-        ((((in).s_addr&IN_CLASSB)==IN_CLASSB)?((in).s_addr&IN_CLASSB_LNA) : \
-         ((in).s_addr&IN_CLASSA_LNA)))
+#define        IN_NETOF(in) \
+       (((in).s_addr&IN_CLASSA) == 0 ? (in).s_addr&IN_CLASSA_NET : \
+               ((in).s_addr&IN_CLASSB) == 0 ? (in).s_addr&IN_CLASSB_NET : \
+                       (in).s_addr&IN_CLASSC_NET)
+#define        IN_LNAOF(in) \
+       (((in).s_addr&IN_CLASSA) == 0 ? (in).s_addr&IN_CLASSA_LNA : \
+               ((in).s_addr&IN_CLASSB) == 0 ? (in).s_addr&IN_CLASSB_LNA : \
+                       (in).s_addr&IN_CLASSC_LNA)
 
 #define        INADDR_ANY      0x00000000
 
 
 #define        INADDR_ANY      0x00000000
 
index 135a4e2..1caf0fe 100644 (file)
@@ -1,4 +1,4 @@
-/*     in_pcb.c        4.26    82/04/24        */
+/*     in_pcb.c        4.27    82/06/13        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -144,7 +144,7 @@ COUNT(IN_PCBCONNECT);
        if (sin->sin_addr.s_addr == 0 || sin->sin_port == 0)
                return (EADDRNOTAVAIL);
        if (inp->inp_laddr.s_addr == 0) {
        if (sin->sin_addr.s_addr == 0 || sin->sin_port == 0)
                return (EADDRNOTAVAIL);
        if (inp->inp_laddr.s_addr == 0) {
-               ifp = if_ifonnetof(sin->sin_addr.s_net);
+               ifp = if_ifonnetof(in_netof(sin->sin_addr));
                if (ifp == 0) {
                        /*
                         * We should select the interface based on
                if (ifp == 0) {
                        /*
                         * We should select the interface based on
index 0bb9021..5ee6402 100644 (file)
@@ -1,4 +1,4 @@
-/*     ip_input.c      1.43    82/05/02        */
+/*     ip_input.c      1.44    82/06/13        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -481,7 +481,7 @@ COUNT(IP_DOOPTIONS);
                                break;
                        ip->ip_dst = sin[1];
                        if (opt == IPOPT_SSRR &&
                                break;
                        ip->ip_dst = sin[1];
                        if (opt == IPOPT_SSRR &&
-                           if_ifonnetof(ip->ip_dst.s_net) == 0)
+                           if_ifonnetof(in_netof(ip->ip_dst)) == 0)
                                goto bad;
                        break;
 
                                goto bad;
                        break;
 
index 887de1d..7815368 100644 (file)
@@ -1,4 +1,4 @@
-/*     ip_output.c     1.33    82/06/12        */
+/*     ip_output.c     1.34    82/06/13        */
 
 #include "../h/param.h"
 #include "../h/mbuf.h"
 
 #include "../h/param.h"
 #include "../h/mbuf.h"
@@ -54,7 +54,7 @@ COUNT(IP_OUTPUT);
                 */
                if (ro == &routetoif) {
                        /* check ifp is AF_INET??? */
                 */
                if (ro == &routetoif) {
                        /* check ifp is AF_INET??? */
-                       ifp = if_ifonnetof(ip->ip_dst.s_net);
+                       ifp = if_ifonnetof(IN_NETOF(ip->ip_dst));
                        if (ifp == 0)
                                goto unreachable;
                        goto gotif;
                        if (ifp == 0)
                                goto unreachable;
                        goto gotif;
index ac7cf75..37251c5 100644 (file)
@@ -1,4 +1,4 @@
-/*     if_dmc.c        4.15    82/06/12        */
+/*     if_dmc.c        4.16    82/06/13        */
 
 #include "dmc.h"
 #if NDMC > 0
 
 #include "dmc.h"
 #if NDMC > 0
@@ -44,7 +44,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.
index b8bc44a..9b79389 100644 (file)
@@ -1,8 +1,6 @@
-/*     if_ec.c 4.15    82/06/12        */
+/*     if_ec.c 4.16    82/06/13        */
 
 #include "ec.h"
 
 #include "ec.h"
-#include "imp.h"
-#include "loop.h"
 
 /*
  * 3Com Ethernet Controller interface
 
 /*
  * 3Com Ethernet Controller interface
@@ -138,7 +136,7 @@ COUNT(ECATTACH);
        es->es_if.if_unit = ui->ui_unit;
        es->es_if.if_name = "ec";
        es->es_if.if_mtu = ECMTU;
        es->es_if.if_unit = ui->ui_unit;
        es->es_if.if_name = "ec";
        es->es_if.if_mtu = ECMTU;
-       es->es_if.if_net = ui->ui_flags & 0xff;
+       es->es_if.if_net = ui->ui_flags;
 
        /*
         * Read the ethernet address off the board,
 
        /*
         * Read the ethernet address off the board,
@@ -183,11 +181,6 @@ COUNT(ECATTACH);
        for (i=0; i<16; i++)
                es->es_buf[i] = &umem[ui->ui_ubanum][0600000+2048*i];
        if_attach(&es->es_if);
        for (i=0; i<16; i++)
                es->es_buf[i] = &umem[ui->ui_ubanum][0600000+2048*i];
        if_attach(&es->es_if);
-#if NIMP == 0
-       /* here's one for you john baby.... */
-       if (ui->ui_flags &~ 0xff)
-               eclhinit(&es->es_if, (ui->ui_flags &~ 0xff) | 0x0a);
-#endif
 }
 
 /*
 }
 
 /*
@@ -746,43 +739,3 @@ bad:
        m_freem(top);
        return (0);
 }
        m_freem(top);
        return (0);
 }
-
-#if NIMP == 0 && NEC > 0
-/*
- * Logical host interface driver.
- * Allows host to appear as an ARPAnet
- * logical host.  Must also have routing
- * table entry set up to forward packets
- * to appropriate gateway on localnet.
- */
-
-struct ifnet eclhif;
-int    looutput();
-
-/*
- * Called by localnet interface to allow logical
- * host interface to "attach", it's purpose
- * is simply to establish the host's arpanet address.
- */
-eclhinit(ecifp, addr)
-       struct ifnet *ecifp;
-       int addr;
-{
-       register struct ifnet *ifp = &eclhif;
-       register struct sockaddr_in *sin;
-
-COUNT(ECLHINIT);
-       ifp->if_name = "lh";
-       ifp->if_mtu = ECMTU;
-       sin = (struct sockaddr_in *)&ifp->if_addr;
-       sin->sin_family = AF_INET;
-       sin->sin_addr.s_addr = addr;
-       sin->sin_addr.s_lh = ecifp->if_host[0];
-       ifp->if_net = sin->sin_addr.s_net;
-       ifp->if_dstaddr = ifp->if_addr;
-       ifp->if_flags = IFF_UP|IFF_POINTOPOINT;
-       ifp->if_output = looutput;
-       if_attach(ifp);
-       rtinit(&ifp->if_addr, &ifp->if_addr, RTF_UP|RTF_HOST);
-}
-#endif
index 02e4840..821cbb8 100644 (file)
@@ -1,7 +1,6 @@
-/*     if_en.c 4.64    82/06/12        */
+/*     if_en.c 4.65    82/06/13        */
 
 #include "en.h"
 
 #include "en.h"
-#include "imp.h"
 
 /*
  * Xerox prototype (3 Mb) Ethernet interface driver.
 
 /*
  * Xerox prototype (3 Mb) Ethernet interface driver.
@@ -107,7 +106,7 @@ COUNT(ENATTACH);
        es->es_if.if_unit = ui->ui_unit;
        es->es_if.if_name = "en";
        es->es_if.if_mtu = ENMTU;
        es->es_if.if_unit = ui->ui_unit;
        es->es_if.if_name = "en";
        es->es_if.if_mtu = ENMTU;
-       es->es_if.if_net = ui->ui_flags & 0xff;
+       es->es_if.if_net = ui->ui_flags;
        es->es_if.if_host[0] =
         (~(((struct endevice *)eninfo[ui->ui_unit]->ui_addr)->en_addr)) & 0xff;
        sin = (struct sockaddr_in *)&es->es_if.if_addr;
        es->es_if.if_host[0] =
         (~(((struct endevice *)eninfo[ui->ui_unit]->ui_addr)->en_addr)) & 0xff;
        sin = (struct sockaddr_in *)&es->es_if.if_addr;
@@ -122,11 +121,6 @@ COUNT(ENATTACH);
        es->es_if.if_ubareset = enreset;
        es->es_ifuba.ifu_flags = UBA_NEEDBDP | UBA_NEED16 | UBA_CANTWAIT;
        if_attach(&es->es_if);
        es->es_if.if_ubareset = enreset;
        es->es_ifuba.ifu_flags = UBA_NEEDBDP | UBA_NEED16 | UBA_CANTWAIT;
        if_attach(&es->es_if);
-#if NIMP == 0
-       /* here's one for you john baby.... */
-       if (ui->ui_flags &~ 0xff)
-               enlhinit(&es->es_if, (ui->ui_flags &~ 0xff) | 0x0a);
-#endif
 }
 
 /*
 }
 
 /*
@@ -562,43 +556,3 @@ bad:
        m_freem(m0);
        return (error);
 }
        m_freem(m0);
        return (error);
 }
-
-#if NIMP == 0 && NEN > 0
-/*
- * Logical host interface driver.
- * Allows host to appear as an ARPAnet
- * logical host.  Must also have routing
- * table entry set up to forward packets
- * to appropriate gateway on localnet.
- */
-
-struct ifnet enlhif;
-int    looutput();
-
-/*
- * Called by localnet interface to allow logical
- * host interface to "attach", it's purpose
- * is simply to establish the host's arpanet address.
- */
-enlhinit(esifp, addr)
-       struct ifnet *esifp;
-       int addr;
-{
-       register struct ifnet *ifp = &enlhif;
-       struct sockaddr_in *sin;
-
-COUNT(ENLHINIT);
-       ifp->if_name = "lh";
-       ifp->if_mtu = ENMTU;
-       sin = (struct sockaddr_in *)&ifp->if_addr;
-       sin->sin_family = AF_INET;
-       sin->sin_addr.s_addr = addr;
-       sin->sin_addr.s_lh = esifp->if_host[0];
-       ifp->if_net = sin->sin_addr.s_net;
-       ifp->if_flags = IFF_UP|IFF_POINTOPOINT;
-       ifp->if_dstaddr = ifp->if_addr;
-       ifp->if_output = looutput;
-       if_attach(ifp);
-       rtinit(&ifp->if_addr, &ifp->if_addr, RTF_UP|RTF_HOST);
-}
-#endif
index 84aed7e..7529089 100644 (file)
@@ -1,8 +1,6 @@
-/*     if_il.c 4.5     82/06/12        */
+/*     if_il.c 4.6     82/06/13        */
 
 #include "il.h"
 
 #include "il.h"
-#include "imp.h"
-#include "loop.h"
 
 /*
  * Interlan Ethernet Communications Controller interface
 
 /*
  * Interlan Ethernet Communications Controller interface
@@ -110,7 +108,7 @@ COUNT(ILATTACH);
        is->is_if.if_unit = ui->ui_unit;
        is->is_if.if_name = "il";
        is->is_if.if_mtu = ILMTU;
        is->is_if.if_unit = ui->ui_unit;
        is->is_if.if_name = "il";
        is->is_if.if_mtu = ILMTU;
-       is->is_if.if_net = ui->ui_flags & 0xff;
+       is->is_if.if_net = ui->ui_flags;
 
        /*
         * Reset the board
 
        /*
         * Reset the board
@@ -167,10 +165,6 @@ COUNT(ILATTACH);
        is->is_if.if_ubareset = ilreset;
        is->is_ifuba.ifu_flags = UBA_CANTWAIT;
        if_attach(&is->is_if);
        is->is_if.if_ubareset = ilreset;
        is->is_ifuba.ifu_flags = UBA_CANTWAIT;
        if_attach(&is->is_if);
-#if NIMP == 0
-       if (ui->ui_flags &~ 0xff)
-               illhinit(&is->is_if, (ui->ui_flags &~ 0xff) | 0x0a);
-#endif
 }
 
 /*
 }
 
 /*
@@ -547,44 +541,3 @@ bad:
        m_freem(m0);
        return(error);
 }
        m_freem(m0);
        return(error);
 }
-
-#if NIMP == 0 && NIL > 0
-/*
- * Logical host interface driver.
- * Allows host to appear as an ARPAnet
- * logical host.  Must also have routing
- * table entry set up to forward packets
- * to appropriate gateway on localnet.
- */
-
-struct ifnet illhif;
-int    looutput();
-
-/*
- * Called by localnet interface to allow logical
- * host interface to "attach".  Nothing should ever
- * be sent locally to this interface, it's purpose
- * is simply to establish the host's arpanet address.
- */
-illhinit(ilifp, addr)
-       struct ifnet *ilifp;
-       int addr;
-{
-       register struct ifnet *ifp = &illhif;
-       register struct sockaddr_in *sin;
-
-COUNT(ILLHINIT);
-       ifp->if_name = "lh";
-       ifp->if_mtu = ILMTU;
-       sin = (struct sockaddr_in *)&ifp->if_addr;
-       sin->sin_family = AF_INET;
-       sin->sin_addr.s_addr = addr;
-       sin->sin_addr.s_lh = ilifp->if_host[0];
-       ifp->if_net = sin->sin_addr.s_net;
-       ifp->if_dstaddr = ifp->if_addr;
-       ifp->if_flags = IFF_UP|IFF_POINTOPOINT;
-       ifp->if_output = looutput;
-       if_attach(ifp);
-       rtinit(&ifp->if_addr, &ifp->if_addr, RTF_UP|RTF_HOST);
-}
-#endif
index 7486163..e237703 100644 (file)
@@ -1,4 +1,4 @@
-/*     if_vv.c 4.2     82/06/12        */
+/*     if_vv.c 4.3     82/06/13        */
 
 /*
  * Proteon 10 Meg Ring Driver.
 
 /*
  * Proteon 10 Meg Ring Driver.
@@ -28,7 +28,6 @@
 #include "../net/route.h"
 
 #include "vv.h"
 #include "../net/route.h"
 
 #include "vv.h"
-#include "imp.h"
 
 /*
  * N.B. - if WIRECENTER is defined wrong, it can well break
 
 /*
  * N.B. - if WIRECENTER is defined wrong, it can well break
@@ -135,10 +134,6 @@ COUNT(VVATTACH);
        vs->vs_if.if_ubareset = vvreset;
        vs->vs_ifuba.ifu_flags = UBA_NEEDBDP | UBA_NEED16;
        if_attach(&vs->vs_if);
        vs->vs_if.if_ubareset = vvreset;
        vs->vs_ifuba.ifu_flags = UBA_NEEDBDP | UBA_NEED16;
        if_attach(&vs->vs_if);
-#if NIMP == 0
-       if (ui->ui_flags & ~0xff)
-               vvlhinit((ui->ui_flags &~ 0xff) | 0x0a);
-#endif
 }
 
 /*
 }
 
 /*
@@ -598,39 +593,3 @@ vvprt_hex(s, l)
        }
 }
 #endif
        }
 }
 #endif
-
-#if NIMP == 0 && NVV > 0
-/*
- * Logical host interface driver.
- * Allows host to appear as an ARPAnet
- * logical host.  Must also have routing
- * table entry set up to forward packets
- * to appropriate geteway on localnet.
- */
-struct ifnet vvlhif;
-int    looutput();
-
-/*
- * Called by localnet interface to allow logical
- * host interface to "attach".  
- */
-vvlhinit(vvifp, addr)
-       struct ifnet *vvifp;
-       int addr;
-{
-       register struct ifnet *ifp = &vvlhif;
-       register struct sockaddr_in *sin;
-
-COUNT(VVLHINIT);
-       ifp->if_name = "lh";
-       ifp->if_mtu = VVMTU;
-       sin = (struct sockaddr_in *)&ifp->if_addr;
-       sin->sin_family = AF_INET;
-       sin->sin_addr.s_addr = addr;
-       ifp->if_net = netpart(sin->sin_addr);
-       ifp->if_flags = IFF_UP;
-       ifp->if_output = looutput;
-       if_attach(ifp);
-       rtinit(&ifp->if_addr, &ifp->if_addr, RTF_UP|RTF_HOST);
-}
-#endif