commit 96584c1b1b3edc577fb053e3785068fab39938db Author: Ryota Ozaki Date: Wed May 20 11:27:14 2015 +0900 Remove use of AF_NS and NS option diff --git a/sys/arch/acorn32/podulebus/if_ie.c b/sys/arch/acorn32/podulebus/if_ie.c index 298735b..ada8d90 100644 --- a/sys/arch/acorn32/podulebus/if_ie.c +++ b/sys/arch/acorn32/podulebus/if_ie.c @@ -94,11 +94,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.34 2014/10/25 10:58:12 skrll Exp $"); #include #endif -#ifdef NS -#include -#include -#endif - /* Import our data structres */ #include "if_iereg.h" diff --git a/sys/arch/amiga/dev/if_es.c b/sys/arch/amiga/dev/if_es.c index 4cef48b..4355c4a 100644 --- a/sys/arch/amiga/dev/if_es.c +++ b/sys/arch/amiga/dev/if_es.c @@ -60,11 +60,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_es.c,v 1.52 2014/01/22 00:25:16 christos Exp $"); #include #endif -#ifdef NS -#include -#include -#endif - #include #include #include @@ -969,22 +964,6 @@ esioctl(struct ifnet *ifp, u_long cmd, void *data) arp_ifinit(ifp, 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 *)LLADDR(ifp->if_sadl); - else - bcopy(ina->x_host.c_host, - LLADDR(ifp->if_sadl), ETHER_ADDR_LEN); - /* 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 3ed4328..540df7c 100644 --- a/sys/arch/amiga/dev/if_qn.c +++ b/sys/arch/amiga/dev/if_qn.c @@ -107,11 +107,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_qn.c,v 1.39 2012/10/27 17:17:29 chs Exp $"); #include #endif -#ifdef NS -#include -#include -#endif - #include #include #include @@ -828,22 +823,6 @@ qnioctl(register struct ifnet *ifp, u_long cmd, void *data) arp_ifinit(ifp, 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 *)LLADDR(ifp->if_sadl); - else - bcopy(ina->x_host.c_host, - LLADDR(ifp->if_sadl), ETHER_ADDR_LEN); - qnstop(sc); - qninit(sc); - break; - } -#endif default: log(LOG_INFO, "qn:sa_family:default (not tested)\n"); qnstop(sc); diff --git a/sys/arch/arm/at91/at91emac.c b/sys/arch/arm/at91/at91emac.c index 33ce35a..b290286 100644 --- a/sys/arch/arm/at91/at91emac.c +++ b/sys/arch/arm/at91/at91emac.c @@ -68,11 +68,6 @@ __KERNEL_RCSID(0, "$NetBSD: at91emac.c,v 1.13 2012/11/12 18:00:36 skrll Exp $"); #include #endif -#ifdef NS -#include -#include -#endif - #include #include diff --git a/sys/arch/arm/ep93xx/epe.c b/sys/arch/arm/ep93xx/epe.c index 72a19ad..3e47a21 100644 --- a/sys/arch/arm/ep93xx/epe.c +++ b/sys/arch/arm/ep93xx/epe.c @@ -65,11 +65,6 @@ __KERNEL_RCSID(0, "$NetBSD: epe.c,v 1.31 2014/03/08 18:08:48 skrll Exp $"); #include #endif -#ifdef NS -#include -#include -#endif - #include #include diff --git a/sys/arch/sun2/dev/if_ec.c b/sys/arch/sun2/dev/if_ec.c index c440596..382fe50 100644 --- a/sys/arch/sun2/dev/if_ec.c +++ b/sys/arch/sun2/dev/if_ec.c @@ -65,11 +65,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_ec.c,v 1.22 2015/04/13 21:18:42 riastradh Exp $") #include #endif -#ifdef NS -#include -#include -#endif - #include #include diff --git a/sys/arch/sun3/dev/if_ie.c b/sys/arch/sun3/dev/if_ie.c index d879347..8a596dd 100644 --- a/sys/arch/sun3/dev/if_ie.c +++ b/sys/arch/sun3/dev/if_ie.c @@ -130,11 +130,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.55 2010/04/05 07:19:32 joerg Exp $"); #include #endif -#ifdef NS -#include -#include -#endif - #include #include @@ -1520,23 +1515,6 @@ ieioctl(struct ifnet *ifp, u_long cmd, void *data) arp_ifinit(ifp, 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 *)LLADDR(ifp->if_sadl); - else - memcpy(LLADDR(ifp->if_sadl), - ina->x_host.c_host, ETHER_ADDR_LEN); - /* Set new address. */ - ieinit(sc); - break; - } -#endif /* NS */ default: ieinit(sc); break; diff --git a/sys/arch/x68k/dev/if_ne_intio.c b/sys/arch/x68k/dev/if_ne_intio.c index e3f6bd8..4fda5f9 100644 --- a/sys/arch/x68k/dev/if_ne_intio.c +++ b/sys/arch/x68k/dev/if_ne_intio.c @@ -55,11 +55,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_ne_intio.c,v 1.17 2011/10/16 03:10:18 isaki Exp $ #include #endif -#ifdef NS -#include -#include -#endif - #if BPFILTER > 0 #include #include diff --git a/sys/arch/x68k/dev/if_ne_neptune.c b/sys/arch/x68k/dev/if_ne_neptune.c index 904b9ed..f24c8fd 100644 --- a/sys/arch/x68k/dev/if_ne_neptune.c +++ b/sys/arch/x68k/dev/if_ne_neptune.c @@ -59,11 +59,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_ne_neptune.c,v 1.20 2010/03/03 13:39:57 tsutsui E #include #endif -#ifdef NS -#include -#include -#endif - #include #include diff --git a/sys/dev/cadence/if_cemac.c b/sys/dev/cadence/if_cemac.c index 2780e42..8eb0832 100644 --- a/sys/dev/cadence/if_cemac.c +++ b/sys/dev/cadence/if_cemac.c @@ -75,11 +75,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_cemac.c,v 1.1 2015/01/23 12:34:09 hkenken Exp $") #include #endif -#ifdef NS -#include -#include -#endif - #include #include diff --git a/sys/net/if_ecosubr.c b/sys/net/if_ecosubr.c index f3403e3..a5f6fff 100644 --- a/sys/net/if_ecosubr.c +++ b/sys/net/if_ecosubr.c @@ -191,7 +191,7 @@ eco_output(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst, } else senderr(EHOSTUNREACH); } - if ((rt->rt_flags & RTF_GATEWAY) && dst->sa_family != AF_NS) { + if ((rt->rt_flags & RTF_GATEWAY)) { if (rt->rt_gwroute == 0) goto lookup; if (((rt = rt->rt_gwroute)->rt_flags & RTF_UP) == 0) { diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 2c1331c..6e3c2f9 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -255,7 +255,7 @@ ether_output(struct ifnet * const ifp0, struct mbuf * const m0, } else senderr(EHOSTUNREACH); } - if ((rt->rt_flags & RTF_GATEWAY) && dst->sa_family != AF_NS) { + if ((rt->rt_flags & RTF_GATEWAY)) { if (rt->rt_gwroute == NULL) goto lookup; if (((rt = rt->rt_gwroute)->rt_flags & RTF_UP) == 0) { diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c index edf5789..aebe51e 100644 --- a/sys/net/if_fddisubr.c +++ b/sys/net/if_fddisubr.c @@ -462,10 +462,8 @@ fddi_input(struct ifnet *ifp, struct mbuf *m) #if defined(INET) || defined(INET6) pktqueue_t *pktq = NULL; #endif -#if defined(NS) || defined(DECNET) || defined(IPX) || defined(NETATALK) +#if defined(DECNET) || defined(IPX) || defined(NETATALK) struct ifqueue *inq = NULL; -#endif -#if defined(NS) || defined(DECNET) || defined(IPX) || defined(NETATALK) int isr = 0; int s; #endif @@ -508,7 +506,7 @@ fddi_input(struct ifnet *ifp, struct mbuf *m) l = (struct llc *)(fh+1); switch (l->llc_dsap) { -#if defined(INET) || defined(INET6) || defined(NS) || defined(DECNET) || defined(IPX) || defined(NETATALK) +#if defined(INET) || defined(INET6) || defined(DECNET) || defined(IPX) || defined(NETATALK) case LLC_SNAP_LSAP: { uint16_t etype; @@ -559,7 +557,7 @@ fddi_input(struct ifnet *ifp, struct mbuf *m) case ETHERTYPE_ARP: #if !defined(__bsdi__) || _BSDI_VERSION >= 199401 -#if defined(NS) || defined(DECNET) || defined(IPX) || defined(NETATALK) +#if defined(DECNET) || defined(IPX) || defined(NETATALK) isr = NETISR_ARP; inq = &arpintrq; #endif @@ -611,7 +609,7 @@ fddi_input(struct ifnet *ifp, struct mbuf *m) default: ifp->if_noproto++; -#if defined(INET) || defined(INET6) || defined(NS) || defined(DECNET) || defined(IPX) || defined(NETATALK) +#if defined(INET) || defined(INET6) || defined(DECNET) || defined(IPX) || defined(NETATALK) dropanyway: #endif m_freem(m); @@ -626,7 +624,7 @@ fddi_input(struct ifnet *ifp, struct mbuf *m) return; } #endif -#if defined(NS) || defined(DECNET) || defined(IPX) || defined(NETATALK) +#if defined(DECNET) || defined(IPX) || defined(NETATALK) if (!inq) { m_freem(m); } diff --git a/sys/net/if_hippisubr.c b/sys/net/if_hippisubr.c index 6c35899..cdd19db 100644 --- a/sys/net/if_hippisubr.c +++ b/sys/net/if_hippisubr.c @@ -112,7 +112,7 @@ hippi_output(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst, } else senderr(EHOSTUNREACH); } - if ((rt->rt_flags & RTF_GATEWAY) && dst->sa_family != AF_NS) { + if ((rt->rt_flags & RTF_GATEWAY)) { if (rt->rt_gwroute == 0) goto lookup; if (((rt = rt->rt_gwroute)->rt_flags & RTF_UP) == 0) { diff --git a/sys/net/if_tokensubr.c b/sys/net/if_tokensubr.c index 7328e58..10c6d84 100644 --- a/sys/net/if_tokensubr.c +++ b/sys/net/if_tokensubr.c @@ -451,7 +451,7 @@ token_input(struct ifnet *ifp, struct mbuf *m) l = (struct llc *)(mtod(m, uint8_t *) + lan_hdr_len); switch (l->llc_dsap) { -#if defined(INET) || defined(NS) || defined(DECNET) +#if defined(INET) || defined(DECNET) case LLC_SNAP_LSAP: { uint16_t etype; @@ -501,7 +501,7 @@ token_input(struct ifnet *ifp, struct mbuf *m) default: /* printf("token_input: unknown dsap 0x%x\n", l->llc_dsap); */ ifp->if_noproto++; -#if defined(INET) || defined(NS) || defined(DECNET) +#if defined(INET) || defined(DECNET) dropanyway: #endif m_freem(m); diff --git a/sys/net/netisr.h b/sys/net/netisr.h index 6386590..2d4c0ac 100644 --- a/sys/net/netisr.h +++ b/sys/net/netisr.h @@ -102,7 +102,6 @@ * on the lowest level routine of each protocol. */ #define NETISR_IP 2 /* same as AF_INET */ -#define NETISR_NS 6 /* same as AF_NS */ #define NETISR_CCITT 10 /* same as AF_CCITT */ #define NETISR_ATALK 16 /* same as AF_APPLETALK */ #define NETISR_IPX 23 /* same as AF_IPX */