-/* $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 $ */
/*
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)
#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>
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);
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;
inq = &arpintrq;
break;
#endif
+#ifdef IPX
+ case ETHERTYPE_IPX:
+ schednetisr(NETISR_IPX);
+ inq = &ipxintrq;
+ break;
+#endif
#ifdef NS
case ETHERTYPE_NS:
schednetisr(NETISR_NS);
}
break;
}
-#endif /* INET || NS */
+#endif /* INET || IPX || NS || DECNET */
#ifdef ISO
case LLC_ISO_LSAP:
switch (l->llc_control) {
* 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 */