aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>1995-10-26 20:31:59 +0000
committerJulian Elischer <julian@FreeBSD.org>1995-10-26 20:31:59 +0000
commitcc6a66f20e9c3dbde378e543b40bea846059e2d3 (patch)
treed823a4d0efac391c6dfad3ac2e27c0e984cea732 /sys/dev
parent059a9bc2bb95ccc3a5f6b8f40819813380523d7e (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ed/if_ed.c38
-rw-r--r--sys/dev/ep/if_ep.c25
-rw-r--r--sys/dev/fe/if_fe.c31
-rw-r--r--sys/dev/ie/if_ie.c29
4 files changed, 116 insertions, 7 deletions
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index e5c17717a7e5d..9234fcf082d6d 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/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/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c
index 6c940ffead79f..0b5008dcd21e0 100644
--- a/sys/dev/ep/if_ep.c
+++ b/sys/dev/ep/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/dev/fe/if_fe.c b/sys/dev/fe/if_fe.c
index d6e9ca7587cb9..b17d4fbc99738 100644
--- a/sys/dev/fe/if_fe.c
+++ b/sys/dev/fe/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/dev/ie/if_ie.c b/sys/dev/ie/if_ie.c
index c0465e9c81161..46aa4281705fc 100644
--- a/sys/dev/ie/if_ie.c
+++ b/sys/dev/ie/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.