summaryrefslogtreecommitdiff
path: root/sys/dev/ic
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/dev/ic
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/dev/ic')
-rw-r--r--sys/dev/ic/am7990.c47
-rw-r--r--sys/dev/ic/elink3.c27
2 files changed, 11 insertions, 63 deletions
diff --git a/sys/dev/ic/am7990.c b/sys/dev/ic/am7990.c
index 15d4909bdf8..2b243bd2095 100644
--- a/sys/dev/ic/am7990.c
+++ b/sys/dev/ic/am7990.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: am7990.c,v 1.6 1996/05/02 13:51:45 deraadt Exp $ */
+/* $OpenBSD: am7990.c,v 1.7 1996/05/05 13:39:31 mickey Exp $ */
/* $NetBSD: am7990.c,v 1.18 1996/04/22 02:40:50 christos Exp $ */
/*-
@@ -49,19 +49,6 @@
#include <netinet/ip.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 <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>
@@ -772,6 +759,11 @@ leioctl(ifp, cmd, data)
s = splimp();
+ if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
+ splx(s);
+ return error;
+ }
+
switch (cmd) {
case SIOCSIFADDR:
@@ -784,39 +776,12 @@ leioctl(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
- bcopy(ina->x_host.c_host,
- sc->sc_arpcom.ac_enaddr,
- sizeof(sc->sc_arpcom.ac_enaddr));
- /* Set new address. */
- leinit(sc);
- break;
- }
-#endif
default:
leinit(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)
- leinit(sc);
- break;
-#endif /* CCITT && LLC */
-
case SIOCSIFFLAGS:
if ((ifp->if_flags & IFF_UP) == 0 &&
(ifp->if_flags & IFF_RUNNING) != 0) {
diff --git a/sys/dev/ic/elink3.c b/sys/dev/ic/elink3.c
index f1cd49a7229..36ef54701b3 100644
--- a/sys/dev/ic/elink3.c
+++ b/sys/dev/ic/elink3.c
@@ -55,11 +55,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>
@@ -783,6 +778,11 @@ epioctl(ifp, cmd, data)
s = splnet();
+ if ((error = ether_ioctl(ifp, sc->sc_arpcom, cmd, data)) > 0) {
+ splx(s);
+ return error;
+ }
+
switch (cmd) {
case SIOCSIFADDR:
@@ -795,23 +795,6 @@ epioctl(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
- bcopy(ina->x_host.c_host,
- sc->sc_arpcom.ac_enaddr,
- sizeof(sc->sc_arpcom.ac_enaddr));
- /* Set new address. */
- epinit(sc);
- break;
- }
-#endif
default:
epinit(sc);
break;