summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1995-11-13 22:09:39 +0000
committerpeter <peter@FreeBSD.org>1995-11-13 22:09:39 +0000
commitb1a17792e615d1d11373e13d5efc7001d1394edf (patch)
treef380d76b9b68ac478a800ee9934de134184e5062 /sys/net
parent4c1319ac1e1f1c569f51458c9ae870c3a113659c (diff)
downloadFreeBSD-src-b1a17792e615d1d11373e13d5efc7001d1394edf.zip
FreeBSD-src-b1a17792e615d1d11373e13d5efc7001d1394edf.tar.gz
Enhance the likelyhood that IPX over ppp will actually work.. :-)
Note that pppd doesn't have an ipxcp.c module for negotiating and confuguring IPX at startup, but after these mods, you can manually ifconfig IPX addresses on the interface and it will probably work.. :-)
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_ppp.c57
1 files changed, 54 insertions, 3 deletions
diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c
index 0c1a65e..f4b42cb 100644
--- a/sys/net/if_ppp.c
+++ b/sys/net/if_ppp.c
@@ -69,7 +69,7 @@
* Paul Mackerras (paulus@cs.anu.edu.au).
*/
-/* $Id: if_ppp.c,v 1.26 1995/11/01 00:58:42 peter Exp $ */
+/* $Id: if_ppp.c,v 1.27 1995/11/03 08:42:21 peter Exp $ */
/* from if_ppp.c,v 1.5 1995/08/16 01:36:38 paulus Exp */
/* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */
@@ -99,6 +99,11 @@
#include <netinet/ip.h>
#endif
+#if IPX
+#include <netipx/ipx.h>
+#include <netipx/ipx_if.h>
+#endif
+
#include "bpfilter.h"
#if NBPFILTER > 0
#include <sys/time.h>
@@ -487,13 +492,36 @@ pppsioctl(ifp, cmd, data)
break;
case SIOCSIFADDR:
- if (ifa->ifa_addr->sa_family != AF_INET)
+ case SIOCAIFADDR:
+ switch(ifa->ifa_addr->sa_family) {
+#ifdef INET
+ case AF_INET:
+ break;
+#endif
+#ifdef IPX
+ case AF_IPX:
+ break;
+#endif
+ default:
error = EAFNOSUPPORT;
+ break;
+ }
break;
case SIOCSIFDSTADDR:
- if (ifa->ifa_addr->sa_family != AF_INET)
+ switch(ifa->ifa_addr->sa_family) {
+#ifdef INET
+ case AF_INET:
+ break;
+#endif
+#ifdef IPX
+ case AF_IPX:
+ break;
+#endif
+ default:
error = EAFNOSUPPORT;
+ break;
+ }
break;
case SIOCSIFMTU:
@@ -518,6 +546,10 @@ pppsioctl(ifp, cmd, data)
case AF_INET:
break;
#endif
+#ifdef IPX /* ??? IPX support multicast? */
+ case AF_IPX:
+ break;
+#endif
default:
error = EAFNOSUPPORT;
break;
@@ -1318,6 +1350,25 @@ ppp_inproc(sc, m)
sc->sc_last_recv = time.tv_sec; /* update time of last pkt rcvd */
break;
#endif
+#ifdef IPX
+ case PPP_IPX:
+ /*
+ * IPX packet - take off the ppp header and pass it up to IPX.
+ */
+ if ((sc->sc_if.if_flags & IFF_UP) == 0
+ /* XXX: || sc->sc_npmode[NP_IPX] != NPMODE_PASS*/) {
+ /* interface is down - drop the packet. */
+ m_freem(m);
+ return;
+ }
+ m->m_pkthdr.len -= PPP_HDRLEN;
+ m->m_data += PPP_HDRLEN;
+ m->m_len -= PPP_HDRLEN;
+ schednetisr(NETISR_IPX);
+ inq = &ipxintrq;
+ sc->sc_last_recv = time.tv_sec; /* update time of last pkt rcvd */
+ break;
+#endif
default:
/*
OpenPOWER on IntegriCloud