diff options
author | julian <julian@FreeBSD.org> | 1995-10-26 20:31:59 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 1995-10-26 20:31:59 +0000 |
commit | 90ae06d6ac1d2da3758389a70a20c91f3e9fd1dc (patch) | |
tree | d823a4d0efac391c6dfad3ac2e27c0e984cea732 /sys/i386/isa | |
parent | 627b063e661d2c0187cf625f83db54c6aca0a0c1 (diff) | |
download | FreeBSD-src-90ae06d6ac1d2da3758389a70a20c91f3e9fd1dc.zip FreeBSD-src-90ae06d6ac1d2da3758389a70a20c91f3e9fd1dc.tar.gz |
Reviewed by: julian and jhay@mikom.csir.co.za
Submitted by: Mike Mitchell, supervisor@alb.asctmd.com
This is a bulk mport of Mike's IPX/SPX protocol stacks and all the
related gunf that goes with it..
it is not guaranteed to work 100% correctly at this time
but as we had several people trying to work on it
I figured it would be better to get it checked in so
they could all get teh same thing to work on..
Mikes been using it for a year or so
but on 2.0
more changes and stuff will be merged in from other developers now that this is in.
Mike Mitchell, Network Engineer
AMTECH Systems Corporation, Technology and Manufacturing
8600 Jefferson Street, Albuquerque, New Mexico 87113 (505) 856-8000
supervisor@alb.asctmd.com
Diffstat (limited to 'sys/i386/isa')
-rw-r--r-- | sys/i386/isa/if_ed.c | 38 | ||||
-rw-r--r-- | sys/i386/isa/if_eg.c | 24 | ||||
-rw-r--r-- | sys/i386/isa/if_el.c | 33 | ||||
-rw-r--r-- | sys/i386/isa/if_ep.c | 25 | ||||
-rw-r--r-- | sys/i386/isa/if_fe.c | 31 | ||||
-rw-r--r-- | sys/i386/isa/if_ie.c | 29 | ||||
-rw-r--r-- | sys/i386/isa/if_ix.c | 13 | ||||
-rw-r--r-- | sys/i386/isa/if_le.c | 27 | ||||
-rw-r--r-- | sys/i386/isa/if_ze.c | 33 | ||||
-rw-r--r-- | sys/i386/isa/if_zp.c | 25 |
10 files changed, 264 insertions, 14 deletions
diff --git a/sys/i386/isa/if_ed.c b/sys/i386/isa/if_ed.c index e5c1771..9234fcf 100644 --- a/sys/i386/isa/if_ed.c +++ b/sys/i386/isa/if_ed.c @@ -13,7 +13,7 @@ * the SMC Elite Ultra (8216), the 3Com 3c503, the NE1000 and NE2000, * and a variety of similar clones. * - * $Id: if_ed.c,v 1.78 1995/10/13 19:47:40 wollman Exp $ + * $Id: if_ed.c,v 1.79 1995/10/21 00:55:23 phk Exp $ */ #include "ed.h" @@ -40,6 +40,11 @@ #include <netinet/if_ether.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> @@ -2256,11 +2261,34 @@ ed_ioctl(ifp, command, data) arp_ifinit((struct arpcom *)ifp, ifa); break; #endif -#ifdef NS +#ifdef IPX + /* + * XXX - This code is probably wrong + */ + case AF_IPX: + { + register struct ipx_addr *ina = &(IA_SIPX(ifa)->sipx_addr); - /* - * XXX - This code is probably wrong - */ + if (ipx_nullhost(*ina)) + ina->x_host = + *(union ipx_host *) (sc->arpcom.ac_enaddr); + else { + bcopy((caddr_t) ina->x_host.c_host, + (caddr_t) sc->arpcom.ac_enaddr, + sizeof(sc->arpcom.ac_enaddr)); + } + + /* + * Set new address + */ + ed_init(ifp->if_unit); + break; + } +#endif +#ifdef NS + /* + * XXX - This code is probably wrong + */ case AF_NS: { register struct ns_addr *ina = &(IA_SNS(ifa)->sns_addr); diff --git a/sys/i386/isa/if_eg.c b/sys/i386/isa/if_eg.c index b345b19..f3db5b5 100644 --- a/sys/i386/isa/if_eg.c +++ b/sys/i386/isa/if_eg.c @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_eg.c,v 1.4 1995/05/30 08:02:02 rgrimes Exp $ + * $Id: if_eg.c,v 1.5 1995/10/13 19:47:42 wollman Exp $ */ /* To do: @@ -58,6 +58,11 @@ #include <netinet/if_ether.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> @@ -725,6 +730,23 @@ egioctl(ifp, command, data) arp_ifinit((struct arpcom *)ifp, ifa); break; #endif +#ifdef IPX + case AF_IPX: + { + register struct ipx_addr *ina = &IA_SIPX(ifa)->sipx_addr; + + if (ipx_nullhost(*ina)) + ina->x_host = + *(union ipx_host *)(sc->sc_arpcom.ac_enaddr); + else + bcopy(ina->x_host.c_host, + sc->sc_arpcom.ac_enaddr, + sizeof(sc->sc_arpcom.ac_enaddr)); + /* Set new address. */ + eginit(sc); + break; + } +#endif #ifdef NS case AF_NS: { diff --git a/sys/i386/isa/if_el.c b/sys/i386/isa/if_el.c index 40f00a8..47d95d8 100644 --- a/sys/i386/isa/if_el.c +++ b/sys/i386/isa/if_el.c @@ -6,7 +6,7 @@ * * Questions, comments, bug reports and fixes to kimmel@cs.umass.edu. * - * $Id: if_el.c,v 1.14 1995/06/11 19:31:25 rgrimes Exp $ + * $Id: if_el.c,v 1.15 1995/10/13 19:47:43 wollman Exp $ */ /* Except of course for the portions of code lifted from other FreeBSD * drivers (mainly elread, elget and el_ioctl) @@ -44,6 +44,11 @@ #include <netinet/if_ether.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> @@ -711,6 +716,32 @@ el_ioctl(ifp, command, data) arp_ifinit((struct arpcom *)ifp, ifa); break; #endif +#ifdef IPX + /* + * XXX - This code is probably wrong + */ + case AF_IPX: + { + register struct ipx_addr *ina = &(IA_SIPX(ifa)->sipx_addr); + + if (ipx_nullhost(*ina)) + ina->x_host = + *(union ipx_host *)(sc->arpcom.ac_enaddr); + else { + /* + * + */ + bcopy((caddr_t)ina->x_host.c_host, + (caddr_t)sc->arpcom.ac_enaddr, + sizeof(sc->arpcom.ac_enaddr)); + } + /* + * Set new address + */ + el_init(ifp->if_unit); + break; + } +#endif #ifdef NS /* * XXX - This code is probably wrong diff --git a/sys/i386/isa/if_ep.c b/sys/i386/isa/if_ep.c index 6c940ff..0b5008d 100644 --- a/sys/i386/isa/if_ep.c +++ b/sys/i386/isa/if_ep.c @@ -38,7 +38,7 @@ */ /* - * $Id: if_ep.c,v 1.30 1995/08/28 12:01:17 guido Exp $ + * $Id: if_ep.c,v 1.31 1995/10/13 19:47:44 wollman Exp $ * * Promiscuous mode added and interrupt logic slightly changed * to reduce the number of adapter failures. Transceiver select @@ -82,6 +82,11 @@ #include <netinet/if_ether.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> @@ -1141,6 +1146,24 @@ epioctl(ifp, cmd, data) arp_ifinit((struct arpcom *)ifp, ifa); break; #endif +#ifdef IPX + case AF_IPX: + { + register struct ipx_addr *ina = &(IA_SIPX(ifa)->sipx_addr); + + if (ipx_nullhost(*ina)) + ina->x_host = + *(union ipx_host *) (sc->arpcom.ac_enaddr); + else { + ifp->if_flags &= ~IFF_RUNNING; + bcopy((caddr_t) ina->x_host.c_host, + (caddr_t) sc->arpcom.ac_enaddr, + sizeof(sc->arpcom.ac_enaddr)); + } + epinit(ifp->if_unit); + break; + } +#endif #ifdef NS case AF_NS: { diff --git a/sys/i386/isa/if_fe.c b/sys/i386/isa/if_fe.c index d6e9ca7..b17d4fb 100644 --- a/sys/i386/isa/if_fe.c +++ b/sys/i386/isa/if_fe.c @@ -72,6 +72,11 @@ #include <netinet/if_ether.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> @@ -2017,6 +2022,32 @@ fe_ioctl ( struct ifnet *ifp, int command, caddr_t data ) arp_ifinit( &sc->arpcom, ifa ); break; #endif +#ifdef IPX + + /* + * XXX - This code is probably wrong + */ + case AF_IPX: + { + register struct ipx_addr *ina + = &(IA_SIPX(ifa)->sipx_addr); + + if (ipx_nullhost(*ina)) + ina->x_host = + *(union ipx_host *) (sc->sc_enaddr); + else { + bcopy((caddr_t) ina->x_host.c_host, + (caddr_t) sc->sc_enaddr, + sizeof(sc->sc_enaddr)); + } + + /* + * Set new address + */ + fe_init(sc->sc_unit); + break; + } +#endif #ifdef NS /* diff --git a/sys/i386/isa/if_ie.c b/sys/i386/isa/if_ie.c index c0465e9..46aa428 100644 --- a/sys/i386/isa/if_ie.c +++ b/sys/i386/isa/if_ie.c @@ -43,7 +43,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ie.c,v 1.26 1995/09/19 18:55:09 bde Exp $ + * $Id: if_ie.c,v 1.27 1995/10/13 19:47:47 wollman Exp $ */ /* @@ -133,6 +133,11 @@ iomem, and to make 16-pointers, we subtract iomem and and with 0xffff. #include <netinet/if_ether.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> @@ -1891,6 +1896,28 @@ ieioctl(ifp, command, data) break; #endif /* INET */ +#ifdef IPX + /* This magic copied from if_is.c; I don't use XNS, so I have no + * way of telling if this actually works or not. + */ + case AF_IPX: + { + struct ipx_addr *ina = &(IA_SIPX(ifa)->sipx_addr); + + if(ipx_nullhost(*ina)) { + ina->x_host = *(union ipx_host *)(ie->arpcom.ac_enaddr); + } else { + ifp->if_flags &= ~IFF_RUNNING; + bcopy((caddr_t)ina->x_host.c_host, + (caddr_t)ie->arpcom.ac_enaddr, + sizeof ie->arpcom.ac_enaddr); + } + + ieinit(ifp->if_unit); + } + break; +#endif /* IPX */ + #ifdef NS /* This magic copied from if_is.c; I don't use XNS, so I have no * way of telling if this actually works or not. diff --git a/sys/i386/isa/if_ix.c b/sys/i386/isa/if_ix.c index cdafd00..0dc4317 100644 --- a/sys/i386/isa/if_ix.c +++ b/sys/i386/isa/if_ix.c @@ -28,7 +28,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_ix.c,v 1.9 1995/10/05 03:01:13 davidg Exp $ + * $Id: if_ix.c,v 1.10 1995/10/13 19:47:48 wollman Exp $ */ #include "ix.h" @@ -56,6 +56,11 @@ #include <netinet/if_ether.h> #endif /* INET */ +#ifdef IPX /*ZZZ no work done on this, this is just here to remind me*/ +#include <netipx/ipx.h> +#include <netipx/ipx_if.h> +#endif /* IPX */ + #ifdef NS /*ZZZ no work done on this, this is just here to remind me*/ #include <netns/ns.h> #include <netns/ns_if.h> @@ -1519,6 +1524,12 @@ ixioctl(struct ifnet *ifp, int cmd, caddr_t data) { break; } #endif /* INET */ +#ifdef IPX + case AF_IPX: { + /*ZZZ*/printf("Address family IPX not supported by ixioctl\n"); + break; + } +#endif /* IPX */ #ifdef NS case AF_NS: { /*ZZZ*/printf("Address family NS not supported by ixioctl\n"); diff --git a/sys/i386/isa/if_le.c b/sys/i386/isa/if_le.c index 6bfb08f..208f24a 100644 --- a/sys/i386/isa/if_le.c +++ b/sys/i386/isa/if_le.c @@ -21,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_le.c,v 1.19 1995/09/19 18:55:12 bde Exp $ + * $Id: if_le.c,v 1.20 1995/10/13 19:47:49 wollman Exp $ */ /* @@ -65,6 +65,11 @@ #include <netinet/if_ether.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> @@ -569,7 +574,26 @@ le_ioctl( break; } #endif /* INET */ +#ifdef IPX + /* This magic copied from if_is.c; I don't use XNS, + * so I have no way of telling if this actually + * works or not. + */ + case AF_IPX: { + struct ipx_addr *ina = &(IA_SIPX(ifa)->sipx_addr); + if (ipx_nullhost(*ina)) { + ina->x_host = *(union ipx_host *)(sc->le_ac.ac_enaddr); + } else { + ifp->if_flags &= ~IFF_RUNNING; + bcopy((caddr_t)ina->x_host.c_host, + (caddr_t)sc->le_ac.ac_enaddr, + sizeof sc->le_ac.ac_enaddr); + } + (*ifp->if_init)(ifp->if_unit); + break; + } +#endif /* IPX */ #ifdef NS /* This magic copied from if_is.c; I don't use XNS, * so I have no way of telling if this actually @@ -590,7 +614,6 @@ le_ioctl( break; } #endif /* NS */ - default: { (*ifp->if_init)(ifp->if_unit); break; diff --git a/sys/i386/isa/if_ze.c b/sys/i386/isa/if_ze.c index ac78d97..cad7fc8 100644 --- a/sys/i386/isa/if_ze.c +++ b/sys/i386/isa/if_ze.c @@ -47,7 +47,7 @@ */ /* - * $Id: if_ze.c,v 1.20 1995/09/26 08:57:47 phk Exp $ + * $Id: if_ze.c,v 1.21 1995/10/13 19:47:52 wollman Exp $ */ #include "ze.h" @@ -75,6 +75,11 @@ #include <netinet/if_ether.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> @@ -1349,6 +1354,32 @@ ze_ioctl(ifp, command, data) arp_ifinit((struct arpcom*) ifp, ifa); break; #endif +#ifdef IPX + /* + * XXX - This code is probably wrong + */ + case AF_IPX: + { + register struct ipx_addr *ina = &(IA_SIPX(ifa)->sipx_addr); + + if (ipx_nullhost(*ina)) + ina->x_host = + *(union ipx_host *)(sc->arpcom.ac_enaddr); + else { + /* + * + */ + bcopy((caddr_t)ina->x_host.c_host, + (caddr_t)sc->arpcom.ac_enaddr, + sizeof(sc->arpcom.ac_enaddr)); + } + /* + * Set new address + */ + ze_init(ifp->if_unit); + break; + } +#endif #ifdef NS /* * XXX - This code is probably wrong diff --git a/sys/i386/isa/if_zp.c b/sys/i386/isa/if_zp.c index 3c19a4f..e1453f0 100644 --- a/sys/i386/isa/if_zp.c +++ b/sys/i386/isa/if_zp.c @@ -34,7 +34,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * From: if_ep.c,v 1.9 1994/01/25 10:46:29 deraadt Exp $ - * $Id: if_zp.c,v 1.8 1995/08/16 23:34:28 nate Exp $ + * $Id: if_zp.c,v 1.9 1995/10/13 19:47:53 wollman Exp $ */ /*- * TODO: @@ -166,6 +166,11 @@ enum memtype { #include <netinet/if_ether.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> @@ -1958,6 +1963,24 @@ zpioctl(ifp, cmd, data) #endif break; #endif +#ifdef IPX + case AF_IPX: + { + register struct ipx_addr *ina = &(IA_SIPX(ifa)->sipx_addr); + + if (ipx_nullhost(*ina)) + ina->x_host = + *(union ipx_host *) (sc->arpcom.ac_enaddr); + else { + ifp->if_flags &= ~IFF_RUNNING; + bcopy((caddr_t) ina->x_host.c_host, + (caddr_t) sc->arpcom.ac_enaddr, + sizeof(sc->arpcom.ac_enaddr)); + } + zpinit(ifp->if_unit); + break; + } +#endif #ifdef NS case AF_NS: { |