en.c: no more kludge; timer: no more printf on rexmt
[unix-history] / usr / src / sys / vax / if / if_en.c
index a57a698..75e7df0 100644 (file)
@@ -1,4 +1,4 @@
-/*     if_en.c 4.24    81/12/22        */
+/*     if_en.c 4.29    82/01/19        */
 
 #include "en.h"
 
 
 #include "en.h"
 
@@ -101,6 +101,12 @@ COUNT(ENATTACH);
        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;
        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;
+#ifdef ENKLUDGE
+       if (es->es_if.if_net == 10) {
+               es->es_if.if_host[0] <<= 16;
+               es->es_if.if_host[0] |= 0x4e;
+       }
+#endif
        es->es_if.if_addr =
            if_makeaddr(es->es_if.if_net, es->es_if.if_host[0]);
        es->es_if.if_init = eninit;
        es->es_if.if_addr =
            if_makeaddr(es->es_if.if_net, es->es_if.if_host[0]);
        es->es_if.if_init = eninit;
@@ -408,8 +414,13 @@ enoutput(ifp, m0, pf)
                register struct ip *ip = mtod(m0, struct ip *);
                int off;
 
                register struct ip *ip = mtod(m0, struct ip *);
                int off;
 
+#ifndef ENKLUDGE
                dest = ip->ip_dst.s_addr >> 24;
                dest = ip->ip_dst.s_addr >> 24;
+#else
+               dest = (ip->ip_dst.s_addr >> 8) & 0xff;
+#endif
                off = ntohs((u_short)ip->ip_len) - m->m_len;
                off = ntohs((u_short)ip->ip_len) - m->m_len;
+#ifndef ENKLUDGE
                if (off > 0 && (off & 0x1ff) == 0 && m->m_off >= MMINOFF + 2) {
                        type = ENPUP_TRAIL + (off>>9);
                        m->m_off -= 2;
                if (off > 0 && (off & 0x1ff) == 0 && m->m_off >= MMINOFF + 2) {
                        type = ENPUP_TRAIL + (off>>9);
                        m->m_off -= 2;
@@ -417,6 +428,7 @@ enoutput(ifp, m0, pf)
                        *mtod(m, u_short *) = ENPUP_IPTYPE;
                        goto gottrailertype;
                }
                        *mtod(m, u_short *) = ENPUP_IPTYPE;
                        goto gottrailertype;
                }
+#endif
                type = ENPUP_IPTYPE;
                off = 0;
                goto gottype;
                type = ENPUP_IPTYPE;
                off = 0;
                goto gottype;