summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_ethersubr.c9
-rw-r--r--sys/net/if_fddisubr.c27
-rw-r--r--sys/net/if_loop.c1
-rw-r--r--sys/net/ppp_defs.h2
4 files changed, 35 insertions, 4 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index dfbabc61e0b..b20dbe3e614 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ethersubr.c,v 1.4 1996/04/19 18:12:28 mickey Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.5 1996/04/28 14:36:59 mickey Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.18 1996/02/13 22:00:14 christos Exp $ */
/*
@@ -366,12 +366,17 @@ ether_input(ifp, eh, m)
revarpinput(m); /* XXX queue? */
return;
#endif
+#ifdef IPX
+ case ETHERTYPE_IPX:
+ schednetisr(NETISR_IPX);
+ inq = &ipxintrq;
+ break;
+#endif
#ifdef NS
case ETHERTYPE_NS:
schednetisr(NETISR_NS);
inq = &nsintrq;
break;
-
#endif
default:
#if defined (ISO) || defined (LLC)
diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c
index 4b95818097d..22b16c71e91 100644
--- a/sys/net/if_fddisubr.c
+++ b/sys/net/if_fddisubr.c
@@ -68,6 +68,11 @@
#include <net/if_fddi.h>
#endif
+#ifdef IPX
+#include <netipx/ipx.h>
+#include <netipx/ipx_if.h>
+#endif
+
#ifdef NS
#include <netns/ns.h>
#include <netns/ns_if.h>
@@ -171,6 +176,18 @@ fddi_output(ifp, m0, dst, rt0)
type = htons(ETHERTYPE_IP);
break;
#endif
+#ifdef IPX
+ case AF_IPX:
+ type = htons(ETHERTYPE_IPX);
+ bcopy((caddr_t)&(((struct sockaddr_ipx*)dst)->sipx_addr.x_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
#ifdef NS
case AF_NS:
type = htons(ETHERTYPE_NS);
@@ -404,7 +421,7 @@ fddi_input(ifp, fh, m)
l = mtod(m, struct llc *);
switch (l->llc_dsap) {
-#if defined(INET) || defined(NS) || defined(DECNET)
+#if defined(INET) || defined(IPX) || defined(NS) || defined(DECNET)
case LLC_SNAP_LSAP:
{
u_int16_t etype;
@@ -426,6 +443,12 @@ fddi_input(ifp, fh, m)
inq = &arpintrq;
break;
#endif
+#ifdef IPX
+ case ETHERTYPE_IPX:
+ schednetisr(NETISR_IPX);
+ inq = &ipxintrq;
+ break;
+#endif
#ifdef NS
case ETHERTYPE_NS:
schednetisr(NETISR_NS);
@@ -445,7 +468,7 @@ fddi_input(ifp, fh, m)
}
break;
}
-#endif /* INET || NS */
+#endif /* INET || IPX || NS || DECNET */
#ifdef ISO
case LLC_ISO_LSAP:
switch (l->llc_control) {
diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c
index e7b7105c31b..4a2dd0f4684 100644
--- a/sys/net/if_loop.c
+++ b/sys/net/if_loop.c
@@ -1,3 +1,4 @@
+/* $OpenBSD: if_loop.c,v 1.4 1996/04/28 14:37:06 mickey Exp $ */
/* $NetBSD: if_loop.c,v 1.14 1995/07/23 16:33:08 mycroft Exp $ */
/*
diff --git a/sys/net/ppp_defs.h b/sys/net/ppp_defs.h
index 41c63642dd5..b5fc672a34e 100644
--- a/sys/net/ppp_defs.h
+++ b/sys/net/ppp_defs.h
@@ -54,10 +54,12 @@
* Protocol field values.
*/
#define PPP_IP 0x21 /* Internet Protocol */
+#define PPP_IPX 0x2b /* Internetwork Packet Exchange */
#define PPP_VJC_COMP 0x2d /* VJ compressed TCP */
#define PPP_VJC_UNCOMP 0x2f /* VJ uncompressed TCP */
#define PPP_COMP 0xfd /* compressed packet */
#define PPP_IPCP 0x8021 /* IP Control Protocol */
+#define PPP_IPXCP 0x802b /* IPX Control Protocol */
#define PPP_CCP 0x80fd /* Compression Control Protocol */
#define PPP_LCP 0xc021 /* Link Control Protocol */
#define PPP_PAP 0xc023 /* Password Authentication Protocol */