From 0ecc7f01165938bb52bbbe0a92738eee85df09d6 Mon Sep 17 00:00:00 2001 From: mickey Date: Fri, 19 Apr 1996 18:12:28 +0000 Subject: [PATCH] According to the latest config stuff changes (as for if_ppp.c). the other stuff is just for IPX support. --- sys/net/if_ethersubr.c | 27 ++++++++++++++++++++++----- sys/net/if_ppp.c | 4 ++-- sys/net/netisr.h | 1 + 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 38a64b0ccc8..dfbabc61e0b 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ethersubr.c,v 1.3 1996/03/03 21:07:07 niklas Exp $ */ +/* $OpenBSD: if_ethersubr.c,v 1.4 1996/04/19 18:12:28 mickey Exp $ */ /* $NetBSD: if_ethersubr.c,v 1.18 1996/02/13 22:00:14 christos Exp $ */ /* @@ -67,6 +67,11 @@ #include #endif +#ifdef IPX +#include +#include +#endif + #ifdef ISO #include #include @@ -139,7 +144,7 @@ ether_output(ifp, m0, dst, rt0) if (!arpresolve(ac, rt, m, dst, edst)) return (0); /* if not yet resolved */ /* If broadcasting on a simplex interface, loopback a copy */ - if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX)) + if (m->m_flags & (M_BCAST|IFF_SIMPLEX) == (M_BCAST|IFF_SIMPLEX)) mcopy = m_copy(m, 0, (int)M_COPYALL); etype = htons(ETHERTYPE_IP); break; @@ -152,7 +157,19 @@ ether_output(ifp, m0, dst, rt0) if (!bcmp((caddr_t)edst, (caddr_t)&ns_thishost, sizeof(edst))) return (looutput(ifp, m, dst, rt)); /* If broadcasting on a simplex interface, loopback a copy */ - if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX)) + if (m->m_flags & (M_BCAST|IFF_SIMPLEX) == (M_BCAST|IFF_SIMPLEX)) + mcopy = m_copy(m, 0, (int)M_COPYALL); + break; +#endif +#ifdef IPX + case AF_IPX: + etype = htons(ETHERTYPE_IPX); + bcopy((caddr_t)&(((struct sockaddr_ipx *)dst)->sipx_addr.ipx_host), + (caddr_t)edst, sizeof (edst)); + if (!bcmp((caddr_t)edst, (caddr_t)&ipx_thishost, sizeof(edst))) + return (looutput(ifp, m, dst, rt)); + /* If broadcasting on a simplex interface, loopback a copy */ + if (m->m_flags & (M_BCAST|IFF_SIMPLEX) == (M_BCAST|IFF_SIMPLEX)) mcopy = m_copy(m, 0, (int)M_COPYALL); break; #endif @@ -174,8 +191,8 @@ ether_output(ifp, m0, dst, rt0) /* If broadcasting on a simplex interface, loopback a copy */ if (*edst & 1) m->m_flags |= (M_BCAST|M_MCAST); - if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX) && - (mcopy = m_copy(m, 0, (int)M_COPYALL))) { + if((m->m_flags & (M_BCAST|IFF_SIMPLEX)) == (M_BCAST|IFF_SIMPLEX) + && (mcopy = m_copy(m, 0, (int)M_COPYALL))) { M_PREPEND(mcopy, sizeof (*eh), M_DONTWAIT); if (mcopy) { eh = mtod(mcopy, struct ether_header *); diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c index da06e6a69fc..6b0ae0da941 100644 --- a/sys/net/if_ppp.c +++ b/sys/net/if_ppp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ppp.c,v 1.4 1996/03/03 21:07:07 niklas Exp $ */ +/* $OpenBSD: if_ppp.c,v 1.5 1996/04/19 18:12:29 mickey Exp $ */ /* $NetBSD: if_ppp.c,v 1.28 1996/02/13 22:00:18 christos Exp $ */ /* @@ -158,7 +158,7 @@ static void pppdumpm __P((struct mbuf *m0)); extern struct compressor ppp_bsd_compress; struct compressor *ppp_compressors[8] = { -#if DO_BSD_COMPRESS +#ifdef PPP_BSDCOMP &ppp_bsd_compress, #endif NULL diff --git a/sys/net/netisr.h b/sys/net/netisr.h index 32db862d910..27186a54c4a 100644 --- a/sys/net/netisr.h +++ b/sys/net/netisr.h @@ -59,6 +59,7 @@ #define NETISR_ISO 7 /* same as AF_ISO */ #define NETISR_CCITT 10 /* same as AF_CCITT */ #define NETISR_ARP 18 /* same as AF_LINK */ +#define NETISR_IPX 23 /* same as AF_IPX */ #define NETISR_PPP 26 /* for PPP processing */ #ifndef _LOCORE -- 2.20.1