summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1996-05-05 13:39:51 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1996-05-05 13:39:51 +0000
commit69eb3008fd7c3ef1de34f9de181036c0e4610954 (patch)
treef1d1e3152a6b2bf3967a9f5726672e4fb083f6c3 /sys/arch
parentb98401c6946ce4b2b6909f688f4739738d87ffe0 (diff)
add general ether_ioctl call in net/if_ethersubr.c,
NS,IPX,X.25 special processing is now handled in there. reflect this amazing addition in all the ether ifaces. ppl, pls check the stuff.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amiga/dev/if_ae.c50
-rw-r--r--sys/arch/amiga/dev/if_ed.c30
-rw-r--r--sys/arch/amiga/dev/if_es.c29
-rw-r--r--sys/arch/amiga/dev/if_qn.c29
-rw-r--r--sys/arch/amiga/isa/if_isaed.c30
-rw-r--r--sys/arch/arm32/podulebus/if_ea.c29
-rw-r--r--sys/arch/arm32/podulebus/if_eb.c29
-rw-r--r--sys/arch/arm32/podulebus/if_eh.c10
-rw-r--r--sys/arch/arm32/podulebus/if_ie.c10
-rw-r--r--sys/arch/mac68k/dev/if_ae.c28
-rw-r--r--sys/arch/mac68k/dev/if_sn.c32
-rw-r--r--sys/arch/mvme68k/dev/if_ie.c30
-rw-r--r--sys/arch/mvme68k/dev/if_le.c37
-rw-r--r--sys/arch/pica/dev/if_sn.c32
-rw-r--r--sys/arch/sparc/dev/if_ie.c28
-rw-r--r--sys/arch/sun3/dev/if_ie.c28
-rw-r--r--sys/arch/vax/if/if_de.c22
-rw-r--r--sys/arch/vax/if/if_qe.c22
18 files changed, 97 insertions, 408 deletions
diff --git a/sys/arch/amiga/dev/if_ae.c b/sys/arch/amiga/dev/if_ae.c
index c0c91a3b30c..57d9e7f9983 100644
--- a/sys/arch/amiga/dev/if_ae.c
+++ b/sys/arch/amiga/dev/if_ae.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ae.c,v 1.5 1996/05/02 06:44:02 niklas Exp $ */
+/* $OpenBSD: if_ae.c,v 1.6 1996/05/05 13:36:23 mickey Exp $ */
/* $NetBSD: if_ae.c,v 1.7 1996/04/21 21:11:40 veego Exp $ */
/*
@@ -84,23 +84,6 @@
#include <netinet/if_ether.h>
#endif
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
-#if defined(CCITT) && defined(LLC)
-#include <sys/socketvar.h>
-#include <netccitt/x25.h>
-#include <net/if_dl.h>
-#include <net/if_llc.h>
-#include <netccitt/dll.h>
-#include <netccitt/llc_var.h>
-#include <netccitt/pk.h>
-#include <netccitt/pk_var.h>
-#include <netccitt/pk_extern.h>
-#endif
-
#if NBPFILTER > 0
#include <net/bpf.h>
#include <net/bpfdesc.h>
@@ -967,6 +950,11 @@ aeioctl(ifp, cmd, data)
s = splnet();
+ if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
+ splx(s);
+ return error;
+ }
+
switch (cmd) {
case SIOCSIFADDR:
@@ -979,38 +967,12 @@ aeioctl(ifp, cmd, data)
arp_ifinit(&sc->sc_arpcom, ifa);
break;
#endif
-#ifdef NS
- case AF_NS:
- {
- register struct ns_addr *ina = &IA_SNS(ifa)->sns_addr;
-
- if (ns_nullhost(*ina))
- ina->x_host =
- *(union ns_host *)(sc->sc_arpcom.ac_enaddr);
- else
- wcopyto(ina->x_host.c_host,
- sc->sc_arpcom.ac_enaddr,
- sizeof(sc->sc_arpcom.ac_enaddr));
- aeinit(sc); /* does ae_setaddr() */
- break;
- }
-#endif
default:
aeinit(sc);
break;
}
break;
-#if defined(CCITT) && defined(LLC)
- case SIOCSIFCONF_X25:
- ifp->if_flags |= IFF_UP;
- ifa->ifa_rtrequest = cons_rtrequest; /* XXX */
- error = x25_llcglue(PRC_IFUP, ifa->ifa_addr);
- if (error == 0)
- aeinit(sc);
- break;
-#endif /* CCITT && LLC */
-
case SIOCSIFFLAGS:
if ((ifp->if_flags & IFF_UP) == 0 &&
(ifp->if_flags & IFF_RUNNING) != 0) {
diff --git a/sys/arch/amiga/dev/if_ed.c b/sys/arch/amiga/dev/if_ed.c
index e38ac42f46f..c2fb9e8a6f3 100644
--- a/sys/arch/amiga/dev/if_ed.c
+++ b/sys/arch/amiga/dev/if_ed.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ed.c,v 1.4 1996/05/02 06:44:04 niklas Exp $ */
+/* $OpenBSD: if_ed.c,v 1.5 1996/05/05 13:36:29 mickey Exp $ */
/* $NetBSD: if_ed.c,v 1.20 1996/04/21 21:11:44 veego Exp $ */
/*
@@ -40,11 +40,6 @@
#include <netinet/if_ether.h>
#endif
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
#if NBPFILTER > 0
#include <net/bpf.h>
#include <net/bpfdesc.h>
@@ -870,6 +865,11 @@ ed_ioctl(ifp, command, data)
s = splnet();
+ if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
+ splx(s);
+ return error;
+ }
+
switch (command) {
case SIOCSIFADDR:
@@ -882,24 +882,6 @@ ed_ioctl(ifp, command, data)
arp_ifinit(&sc->sc_arpcom, ifa);
break;
#endif
-#ifdef NS
- /* XXX - This code is probably wrong. */
- case AF_NS:
- {
- register struct ns_addr *ina = &IA_SNS(ifa)->sns_addr;
-
- if (ns_nullhost(*ina))
- ina->x_host =
- *(union ns_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. */
- ed_init(sc);
- break;
- }
-#endif
default:
ed_init(sc);
break;
diff --git a/sys/arch/amiga/dev/if_es.c b/sys/arch/amiga/dev/if_es.c
index b8da7a192bf..d053af2d960 100644
--- a/sys/arch/amiga/dev/if_es.c
+++ b/sys/arch/amiga/dev/if_es.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_es.c,v 1.5 1996/05/04 14:04:04 niklas Exp $ */
+/* $OpenBSD: if_es.c,v 1.6 1996/05/05 13:36:33 mickey Exp $ */
/* $NetBSD: if_es.c,v 1.12 1996/05/01 15:55:28 mhitch Exp $ */
/*
@@ -60,11 +60,6 @@
#include <netinet/if_ether.h>
#endif
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
#include <machine/cpu.h>
#include <machine/mtpr.h>
#include <amiga/amiga/device.h>
@@ -972,6 +967,11 @@ esioctl(ifp, command, data)
s = splnet();
+ if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
+ aplx(s);
+ return error;
+ }
+
switch (command) {
case SIOCSIFADDR:
@@ -984,23 +984,6 @@ esioctl(ifp, command, data)
arp_ifinit(&sc->sc_arpcom, ifa);
break;
#endif
-#ifdef NS
- case AF_NS:
- {
- register struct ns_addr *ina = &IA_SNS(ifa)->sns_addr;
-
- if (ns_nullhost(*ina))
- ina->x_host =
- *(union ns_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. */
- esinit(sc);
- break;
- }
-#endif
default:
esinit(sc);
break;
diff --git a/sys/arch/amiga/dev/if_qn.c b/sys/arch/amiga/dev/if_qn.c
index a34342e1802..1ab37330c36 100644
--- a/sys/arch/amiga/dev/if_qn.c
+++ b/sys/arch/amiga/dev/if_qn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_qn.c,v 1.5 1996/05/02 06:44:08 niklas Exp $ */
+/* $OpenBSD: if_qn.c,v 1.6 1996/05/05 13:36:38 mickey Exp $ */
/* $NetBSD: if_qn.c,v 1.5 1996/04/21 21:11:50 veego Exp $ */
/*
@@ -102,11 +102,6 @@
#include <netinet/if_ether.h>
#endif
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
#include <machine/cpu.h>
#include <machine/mtpr.h>
#include <amiga/amiga/device.h>
@@ -877,6 +872,11 @@ qnioctl(ifp, command, data)
s = splnet();
+ if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
+ splx(s);
+ return error;
+ }
+
switch (command) {
case SIOCSIFADDR:
@@ -890,23 +890,6 @@ qnioctl(ifp, command, data)
arp_ifinit(&sc->sc_arpcom, ifa);
break;
#endif
-#ifdef NS
- case AF_NS:
- {
- register struct ns_addr *ina = &(IA_SNS(ifa)->sns_addr);
-
- if (ns_nullhost(*ina))
- ina->x_host =
- *(union ns_host *)(sc->sc_arpcom.ac_enaddr);
- else
- bcopy(ina->x_host.c_host,
- sc->sc_arpcom.ac_enaddr,
- sizeof(sc->sc_arpcom.ac_enaddr));
- qnstop(sc);
- qninit(sc);
- break;
- }
-#endif
default:
log(LOG_INFO, "qn:sa_family:default (not tested)\n");
qnstop(sc);
diff --git a/sys/arch/amiga/isa/if_isaed.c b/sys/arch/amiga/isa/if_isaed.c
index 7302b5dbdcb..c4e35ebd5ec 100644
--- a/sys/arch/amiga/isa/if_isaed.c
+++ b/sys/arch/amiga/isa/if_isaed.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_isaed.c,v 1.4 1996/05/02 06:30:26 niklas Exp $ */
+/* $OpenBSD: if_isaed.c,v 1.5 1996/05/05 13:36:46 mickey Exp $ */
/*
* Device driver for National Semiconductor DS8390/WD83C690 based ethernet
@@ -41,11 +41,6 @@
#include <netinet/if_ether.h>
#endif
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
#if NBPFILTER > 0
#include <net/bpf.h>
#include <net/bpfdesc.h>
@@ -2157,6 +2152,11 @@ edioctl(ifp, cmd, data)
return ENXIO; /* may be ignored, oh well. */
}
+ if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
+ splx(s);
+ return error;
+ }
+
switch (cmd) {
case SIOCSIFADDR:
@@ -2169,24 +2169,6 @@ edioctl(ifp, cmd, data)
arp_ifinit(&sc->sc_arpcom, ifa);
break;
#endif
-#ifdef NS
- /* XXX - This code is probably wrong. */
- case AF_NS:
- {
- register struct ns_addr *ina = &IA_SNS(ifa)->sns_addr;
-
- if (ns_nullhost(*ina))
- ina->x_host =
- *(union ns_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. */
- edinit(sc);
- break;
- }
-#endif
default:
edinit(sc);
break;
diff --git a/sys/arch/arm32/podulebus/if_ea.c b/sys/arch/arm32/podulebus/if_ea.c
index 1104d512f7f..de1d1d3576e 100644
--- a/sys/arch/arm32/podulebus/if_ea.c
+++ b/sys/arch/arm32/podulebus/if_ea.c
@@ -73,11 +73,6 @@
#include <netinet/if_ether.h>
#endif
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
#include "bpfilter.h"
#if NBPFILTER > 0
#include <net/bpf.h>
@@ -1445,6 +1440,11 @@ ea_ioctl(ifp, cmd, data)
s = splimp();
+ if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
+ splx(s);
+ return error;
+ }
+
switch (cmd) {
case SIOCSIFADDR:
@@ -1459,25 +1459,6 @@ ea_ioctl(ifp, cmd, data)
ea_init(sc);
break;
#endif
-#ifdef NS
- /* XXX - This code is probably wrong. */
- case AF_NS:
- {
- register struct ns_addr *ina = &IA_SNS(ifa)->sns_addr;
-
- if (ns_nullhost(*ina))
- ina->x_host =
- *(union ns_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. */
- dprintf(("Interface ea is coming up (AF_NS)\n"));
- ea_init(sc);
- break;
- }
-#endif
default:
dprintf(("Interface ea is coming up (default)\n"));
ea_init(sc);
diff --git a/sys/arch/arm32/podulebus/if_eb.c b/sys/arch/arm32/podulebus/if_eb.c
index a433d38bbf7..5075b955fd9 100644
--- a/sys/arch/arm32/podulebus/if_eb.c
+++ b/sys/arch/arm32/podulebus/if_eb.c
@@ -73,11 +73,6 @@
#include <netinet/if_ether.h>
#endif
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
#include "bpfilter.h"
#if NBPFILTER > 0
#include <net/bpf.h>
@@ -1464,6 +1459,11 @@ eb_ioctl(ifp, cmd, data)
s = splimp();
+ if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
+ splx(s);
+ return error;
+ }
+
switch (cmd) {
case SIOCSIFADDR:
@@ -1478,25 +1478,6 @@ eb_ioctl(ifp, cmd, data)
eb_init(sc);
break;
#endif
-#ifdef NS
- /* XXX - This code is probably wrong. */
- case AF_NS:
- {
- register struct ns_addr *ina = &IA_SNS(ifa)->sns_addr;
-
- if (ns_nullhost(*ina))
- ina->x_host =
- *(union ns_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. */
- dprintf(("Interface eb is coming up (AF_NS)\n"));
- eb_init(sc);
- break;
- }
-#endif
default:
dprintf(("Interface eb is coming up (default)\n"));
eb_init(sc);
diff --git a/sys/arch/arm32/podulebus/if_eh.c b/sys/arch/arm32/podulebus/if_eh.c
index ab476637091..a9b830634b4 100644
--- a/sys/arch/arm32/podulebus/if_eh.c
+++ b/sys/arch/arm32/podulebus/if_eh.c
@@ -89,11 +89,6 @@
#include <netinet/if_ether.h>
#endif
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
/****************************************************************************/
/* Some useful definitions **************************************************/
/****************************************************************************/
@@ -555,6 +550,11 @@ ehioctl(ifp, cmd, data)
int s = splimp ();
int error = 0;
+ if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
+ splx(s);
+ return error;
+ }
+
switch (cmd) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
diff --git a/sys/arch/arm32/podulebus/if_ie.c b/sys/arch/arm32/podulebus/if_ie.c
index ecc8269445d..8ea7517c1de 100644
--- a/sys/arch/arm32/podulebus/if_ie.c
+++ b/sys/arch/arm32/podulebus/if_ie.c
@@ -88,11 +88,6 @@
#include <netinet/if_ether.h>
#endif
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
/* Import our data structres */
#include "if_iereg.h"
@@ -579,6 +574,11 @@ int ieioctl ( struct ifnet *ifp, u_long cmd, caddr_t data )
s=splimp();
+ if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
+ splx(s);
+ return error;
+ }
+
switch ( cmd )
{
case SIOCSIFADDR:
diff --git a/sys/arch/mac68k/dev/if_ae.c b/sys/arch/mac68k/dev/if_ae.c
index 53bb0fb1499..0897e54dfec 100644
--- a/sys/arch/mac68k/dev/if_ae.c
+++ b/sys/arch/mac68k/dev/if_ae.c
@@ -46,11 +46,6 @@
#include <netinet/if_ether.h>
#endif
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
#if NBPFILTER > 0
#include <net/bpf.h>
#include <net/bpfdesc.h>
@@ -1033,6 +1028,11 @@ aeioctl(ifp, cmd, data)
s = splnet();
+ if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
+ splx(s);
+ return error;
+ }
+
switch (cmd) {
case SIOCSIFADDR:
@@ -1045,24 +1045,6 @@ aeioctl(ifp, cmd, data)
arp_ifinit(&sc->sc_arpcom, ifa);
break;
#endif
-#ifdef NS
- /* XXX - This code is probably wrong. */
- case AF_NS:
- {
- register struct ns_addr *ina = &IA_SNS(ifa)->sns_addr;
-
- if (ns_nullhost(*ina))
- ina->x_host =
- *(union ns_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. */
- aeinit(sc);
- break;
- }
-#endif
default:
aeinit(sc);
break;
diff --git a/sys/arch/mac68k/dev/if_sn.c b/sys/arch/mac68k/dev/if_sn.c
index d2dd319be29..3a6051a1176 100644
--- a/sys/arch/mac68k/dev/if_sn.c
+++ b/sys/arch/mac68k/dev/if_sn.c
@@ -33,16 +33,6 @@
#include <netinet/if_ether.h>
#endif
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
-#ifdef RMP
-#include <netrmp/rmp.h>
-#include <netrmp/rmp_var.h>
-#endif
-
#include <vm/vm.h>
#include "bpfilter.h"
@@ -388,6 +378,11 @@ snioctl(ifp, cmd, data)
int s = splnet(), err = 0;
int temp;
+ if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
+ splx(s);
+ return error;
+ }
+
switch (cmd) {
case SIOCSIFADDR:
@@ -400,23 +395,6 @@ snioctl(ifp, cmd, data)
arp_ifinit(&sc->sc_ac, ifa);
break;
#endif
-#ifdef NS
- case AF_NS:
- {
- struct ns_addr *ina = &(IA_SNS(ifa)->sns_addr);
-
- if (ns_nullhost(*ina)) {
- ina->x_host = *(union ns_host *)(sc->sc_enaddr);
- } else {
- /* XXX
- * add an extra i/f address to
- * sonic filter
- */
- }
- }
- (void)sninit(ifp->if_unit);
- break;
-#endif /* NS */
default:
(void)sninit(ifp->if_unit);
break;
diff --git a/sys/arch/mvme68k/dev/if_ie.c b/sys/arch/mvme68k/dev/if_ie.c
index f4c4ecddaa6..2370698fc14 100644
--- a/sys/arch/mvme68k/dev/if_ie.c
+++ b/sys/arch/mvme68k/dev/if_ie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ie.c,v 1.4 1996/04/28 11:06:04 deraadt Exp $ */
+/* $OpenBSD: if_ie.c,v 1.5 1996/05/05 13:37:27 mickey Exp $ */
/*-
* Copyright (c) 1995 Theo de Raadt
@@ -127,11 +127,6 @@ Mode of operation:
#include <netinet/if_ether.h>
#endif
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
#include <vm/vm.h>
/*
@@ -1831,6 +1826,11 @@ ieioctl(ifp, cmd, data)
s = splnet();
+ if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
+ splx(s);
+ return error;
+ }
+
switch(cmd) {
case SIOCSIFADDR:
@@ -1843,24 +1843,6 @@ ieioctl(ifp, cmd, data)
arp_ifinit(&sc->sc_arpcom, ifa);
break;
#endif
-#ifdef NS
- /* XXX - This code is probably wrong. */
- case AF_NS:
- {
- struct ns_addr *ina = &IA_SNS(ifa)->sns_addr;
-
- if (ns_nullhost(*ina))
- ina->x_host =
- *(union ns_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. */
- ieinit(sc);
- break;
- }
-#endif /* NS */
default:
ieinit(sc);
break;
diff --git a/sys/arch/mvme68k/dev/if_le.c b/sys/arch/mvme68k/dev/if_le.c
index 89dfcfce69a..d98d976ceee 100644
--- a/sys/arch/mvme68k/dev/if_le.c
+++ b/sys/arch/mvme68k/dev/if_le.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_le.c,v 1.4 1996/04/28 11:06:05 deraadt Exp $ */
+/* $OpenBSD: if_le.c,v 1.5 1996/05/05 13:37:32 mickey Exp $ */
/*-
* Copyright (c) 1982, 1992, 1993
@@ -71,15 +71,6 @@
#include <netinet/if_ether.h>
#endif
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
-#ifdef APPLETALK
-#include <netddp/atalk.h>
-#endif
-
#include <machine/cpu.h>
#include <machine/autoconf.h>
#include <machine/pmap.h>
@@ -827,6 +818,11 @@ leioctl(ifp, cmd, data)
register struct lereg1 *ler1;
int s = splnet(), error = 0;
+ if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
+ splx(s);
+ retun error;
+ }
+
switch (cmd) {
case SIOCSIFADDR:
@@ -839,27 +835,6 @@ leioctl(ifp, cmd, data)
arp_ifinit(&sc->sc_ac, ifa);
break;
#endif
-#ifdef NS
- case AF_NS:
- {
- register struct ns_addr *ina = &(IA_SNS(ifa)->sns_addr);
-
- if (ns_nullhost(*ina))
- ina->x_host = *(union ns_host *)(sc->sc_addr);
- else {
- /*
- * The manual says we can't change the address
- * while the receiver is armed,
- * so reset everything
- */
- ifp->if_flags &= ~IFF_RUNNING;
- bcopy((caddr_t)ina->x_host.c_host,
- (caddr_t)sc->sc_addr, sizeof(sc->sc_addr));
- }
- (void)leinit(ifp->if_unit); /* does le_setaddr() */
- break;
- }
-#endif
default:
(void)leinit(ifp->if_unit);
break;
diff --git a/sys/arch/pica/dev/if_sn.c b/sys/arch/pica/dev/if_sn.c
index 12f815a7d63..47fd54a725a 100644
--- a/sys/arch/pica/dev/if_sn.c
+++ b/sys/arch/pica/dev/if_sn.c
@@ -34,16 +34,6 @@
#include <netinet/if_ether.h>
#endif
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
-#ifdef RMP
-#include <netrmp/rmp.h>
-#include <netrmp/rmp_var.h>
-#endif
-
#include <vm/vm.h>
#include "bpfilter.h"
@@ -377,6 +367,11 @@ snioctl(ifp, cmd, data)
int s = splnet(), err = 0;
int temp;
+ if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
+ splx(s);
+ return error;
+ }
+
switch (cmd) {
case SIOCSIFADDR:
@@ -389,23 +384,6 @@ snioctl(ifp, cmd, data)
arp_ifinit(&sc->sc_ac, ifa);
break;
#endif
-#ifdef NS
- case AF_NS:
- {
- struct ns_addr *ina = &(IA_SNS(ifa)->sns_addr);
-
- if (ns_nullhost(*ina)) {
- ina->x_host = *(union ns_host *)(sc->sc_addr);
- } else {
- /* XXX
- * add an extra i/f address to
- * sonic filter
- */
- }
- }
- (void)sninit(ifp->if_unit);
- break;
-#endif /* NS */
default:
(void)sninit(ifp->if_unit);
break;
diff --git a/sys/arch/sparc/dev/if_ie.c b/sys/arch/sparc/dev/if_ie.c
index 9646afb053a..20aa5204d26 100644
--- a/sys/arch/sparc/dev/if_ie.c
+++ b/sys/arch/sparc/dev/if_ie.c
@@ -129,11 +129,6 @@ Mode of operation:
#include <netinet/if_ether.h>
#endif
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
#include <vm/vm.h>
/*
@@ -1932,6 +1927,11 @@ ieioctl(ifp, cmd, data)
s = splnet();
+ if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
+ splx(s);
+ return error;
+ }
+
switch(cmd) {
case SIOCSIFADDR:
@@ -1944,24 +1944,6 @@ ieioctl(ifp, cmd, data)
arp_ifinit(&sc->sc_arpcom, ifa);
break;
#endif
-#ifdef NS
- /* XXX - This code is probably wrong. */
- case AF_NS:
- {
- struct ns_addr *ina = &IA_SNS(ifa)->sns_addr;
-
- if (ns_nullhost(*ina))
- ina->x_host =
- *(union ns_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. */
- ieinit(sc);
- break;
- }
-#endif /* NS */
default:
ieinit(sc);
break;
diff --git a/sys/arch/sun3/dev/if_ie.c b/sys/arch/sun3/dev/if_ie.c
index eafc268cf9c..3309c3d3a33 100644
--- a/sys/arch/sun3/dev/if_ie.c
+++ b/sys/arch/sun3/dev/if_ie.c
@@ -128,11 +128,6 @@
#include <netinet/if_ether.h>
#endif
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
#include <vm/vm.h>
/*
@@ -1568,6 +1563,11 @@ ieioctl(ifp, cmd, data)
s = splnet();
+ if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
+ splx(s);
+ return error;
+ }
+
switch (cmd) {
case SIOCSIFADDR:
@@ -1580,24 +1580,6 @@ ieioctl(ifp, cmd, data)
arp_ifinit(&sc->sc_arpcom, ifa);
break;
#endif
-#ifdef NS
- /* XXX - This code is probably wrong. */
- case AF_NS:
- {
- struct ns_addr *ina = &IA_SNS(ifa)->sns_addr;
-
- if (ns_nullhost(*ina))
- ina->x_host =
- *(union ns_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. */
- ieinit(sc);
- break;
- }
-#endif /* NS */
default:
ieinit(sc);
break;
diff --git a/sys/arch/vax/if/if_de.c b/sys/arch/vax/if/if_de.c
index 997d43d9468..9e40f50cddf 100644
--- a/sys/arch/vax/if/if_de.c
+++ b/sys/arch/vax/if/if_de.c
@@ -71,11 +71,6 @@
#include <netinet/if_ether.h>
#endif
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
#ifdef ISO
#include <netiso/iso.h>
#include <netiso/iso_var.h>
@@ -580,6 +575,11 @@ deioctl(ifp, cmd, data)
register struct de_softc *ds = de_cd.cd_devs[ifp->if_unit];
int s = splnet(), error = 0;
+ if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
+ splx(s);
+ return error;
+ }
+
switch (cmd) {
case SIOCSIFADDR:
@@ -592,18 +592,6 @@ deioctl(ifp, cmd, data)
arp_ifinit(&ds->ds_ac, ifa);
break;
#endif
-#ifdef NS
- case AF_NS:
- {
- register struct ns_addr *ina = &(IA_SNS(ifa)->sns_addr);
-
- if (ns_nullhost(*ina))
- ina->x_host = *(union ns_host *)(ds->ds_addr);
- else
- de_setaddr(ina->x_host.c_host,ifp->if_unit);
- break;
- }
-#endif
}
break;
diff --git a/sys/arch/vax/if/if_qe.c b/sys/arch/vax/if/if_qe.c
index 6e1eaecd033..ab0e59eabe1 100644
--- a/sys/arch/vax/if/if_qe.c
+++ b/sys/arch/vax/if/if_qe.c
@@ -162,11 +162,6 @@
#include <netinet/if_ether.h>
#endif
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
#ifdef ISO
#include <netiso/iso.h>
#include <netiso/iso_var.h>
@@ -771,6 +766,11 @@ qeioctl(ifp, cmd, data)
struct ifaddr *ifa = (struct ifaddr *)data;
int s = splnet(), error = 0;
+ if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
+ splx(s);
+ return error;
+ }
+
switch (cmd) {
case SIOCSIFADDR:
@@ -782,18 +782,6 @@ qeioctl(ifp, cmd, data)
arp_ifinit(&sc->qe_ac, ifa);
break;
#endif
-#ifdef NS
- case AF_NS:
- {
- register struct ns_addr *ina = &(IA_SNS(ifa)->sns_addr);
-
- if (ns_nullhost(*ina))
- ina->x_host = *(union ns_host *)(sc->qe_addr);
- else
- qe_setaddr(ina->x_host.c_host, ifp->if_unit);
- break;
- }
-#endif
}
break;