summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1996-04-19 18:12:31 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1996-04-19 18:12:31 +0000
commitf40416b64320c60dc8bb5471c04a65a8788387b5 (patch)
tree0b33251f0bcc489a6d804233042801ea83f764d1 /sys/net
parent7c4cfc5c047725e6c4c20e9adaa1ef4e70ff68d1 (diff)
According to the latest config stuff changes (as for if_ppp.c).
the other stuff is just for IPX support.
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_ethersubr.c27
-rw-r--r--sys/net/if_ppp.c4
-rw-r--r--sys/net/netisr.h1
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 <netns/ns_if.h>
#endif
+#ifdef IPX
+#include <netipx/ipx.h>
+#include <netipx/ipx_if.h>
+#endif
+
#ifdef ISO
#include <netiso/argo_debug.h>
#include <netiso/iso.h>
@@ -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