summaryrefslogtreecommitdiff
path: root/sys/arch/amiga
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/amiga
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/amiga')
-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
5 files changed, 30 insertions, 138 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;