diff options
author | peter <peter@FreeBSD.org> | 2003-03-05 19:24:24 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2003-03-05 19:24:24 +0000 |
commit | fbc7526e8f7461209707f4f096b1ec1f9f4aca7b (patch) | |
tree | 5244a504fc54940e377f138f4f959da0cbad8ceb /sys/net | |
parent | f9806b180393c9a3dbdc1792c27c8175975ff756 (diff) | |
download | FreeBSD-src-fbc7526e8f7461209707f4f096b1ec1f9f4aca7b.zip FreeBSD-src-fbc7526e8f7461209707f4f096b1ec1f9f4aca7b.tar.gz |
Finish driving a stake through the heart of netns and the associated
ifdefs scattered around the place - its dead Jim!
The SMB stuff had stolen AF_NS, make it official.
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_ethersubr.c | 90 | ||||
-rw-r--r-- | sys/net/if_fddisubr.c | 17 | ||||
-rw-r--r-- | sys/net/if_gre.c | 6 | ||||
-rw-r--r-- | sys/net/if_loop.c | 11 | ||||
-rw-r--r-- | sys/net/if_spppsubr.c | 25 | ||||
-rw-r--r-- | sys/net/if_tun.c | 5 | ||||
-rw-r--r-- | sys/net/netisr.h | 1 | ||||
-rw-r--r-- | sys/net/route.h | 1 | ||||
-rw-r--r-- | sys/net/rtsock.c | 6 |
9 files changed, 0 insertions, 162 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 9d51e69..143b82e 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -83,14 +83,6 @@ int (*ef_outputp)(struct ifnet *ifp, struct mbuf **mp, struct sockaddr *dst, short *tp, int *hlen); #endif -#ifdef NS -#include <netns/ns.h> -#include <netns/ns_if.h> -ushort ns_nettype; -int ether_outputdebug = 0; -int ether_inputdebug = 0; -#endif - #ifdef NETATALK #include <netatalk/at.h> #include <netatalk/at_var.h> @@ -230,43 +222,6 @@ ether_output(ifp, m, dst, rt0) break; } #endif /* NETATALK */ -#ifdef NS - case AF_NS: - switch(ns_nettype){ - default: - case 0x8137: /* Novell Ethernet_II Ethernet TYPE II */ - type = 0x8137; - break; - case 0x0: /* Novell 802.3 */ - type = htons( m->m_pkthdr.len); - break; - case 0xe0e0: /* Novell 802.2 and Token-Ring */ - M_PREPEND(m, 3, M_TRYWAIT); - type = htons( m->m_pkthdr.len); - cp = mtod(m, u_char *); - *cp++ = 0xE0; - *cp++ = 0xE0; - *cp++ = 0x03; - break; - } - bcopy((caddr_t)&(((struct sockaddr_ns *)dst)->sns_addr.x_host), - (caddr_t)edst, sizeof (edst)); - /* - * XXX if ns_thishost is the same as the node's ethernet - * address then just the default code will catch this anyhow. - * So I'm not sure if this next clause should be here at all? - * [JRE] - */ - if (!bcmp((caddr_t)edst, (caddr_t)&ns_thishost, sizeof(edst))){ - m->m_pkthdr.rcvif = ifp; - netisr_queue(NETISR_NS, m); - return (error); - } - if (!bcmp((caddr_t)edst, (caddr_t)&ns_broadhost, sizeof(edst))){ - m->m_flags |= M_BCAST; - } - break; -#endif /* NS */ case pseudo_AF_HDRCMPLT: hdrcmplt = 1; @@ -777,12 +732,6 @@ post_stats: isr = NETISR_IPV6; break; #endif -#ifdef NS - case 0x8137: /* Novell Ethernet_II Ethernet TYPE II */ - isr = NETISR_NS; - break; - -#endif /* NS */ #ifdef NETATALK case ETHERTYPE_AT: isr = NETISR_ATALK1; @@ -796,20 +745,6 @@ post_stats: if (ef_inputp && ef_inputp(ifp, eh, m) == 0) return; #endif /* IPX */ -#ifdef NS - checksum = mtod(m, ushort *); - /* Novell 802.3 */ - if ((ether_type <= ETHERMTU) && - ((*checksum == 0xffff) || (*checksum == 0xE0E0))) { - if (*checksum == 0xE0E0) { - m->m_pkthdr.len -= 3; - m->m_len -= 3; - m->m_data += 3; - } - isr = NETISR_NS; - break; - } -#endif /* NS */ #if defined(NETATALK) if (ether_type > ETHERMTU) goto discard; @@ -979,31 +914,6 @@ ether_ioctl(ifp, command, data) break; } #endif -#ifdef NS - /* - * XXX - This code is probably wrong - */ - case AF_NS: - { - struct ns_addr *ina = &(IA_SNS(ifa)->sns_addr); - struct arpcom *ac = IFP2AC(ifp); - - if (ns_nullhost(*ina)) - ina->x_host = - *(union ns_host *) (ac->ac_enaddr); - else { - bcopy((caddr_t) ina->x_host.c_host, - (caddr_t) ac->ac_enaddr, - sizeof(ac->ac_enaddr)); - } - - /* - * Set new address - */ - ifp->if_init(ifp->if_softc); - break; - } -#endif default: ifp->if_init(ifp->if_softc); break; diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c index 00b07e6..743098c 100644 --- a/sys/net/if_fddisubr.c +++ b/sys/net/if_fddisubr.c @@ -75,11 +75,6 @@ #include <netipx/ipx_if.h> #endif -#ifdef NS -#include <netns/ns.h> -#include <netns/ns_if.h> -#endif - #ifdef DECNET #include <netdnet/dn.h> #endif @@ -201,13 +196,6 @@ fddi_output(ifp, m, dst, rt0) break; } #endif /* NETATALK */ -#ifdef NS - case AF_NS: - type = htons(ETHERTYPE_NS); - bcopy((caddr_t)&(((struct sockaddr_ns *)dst)->sns_addr.x_host), - (caddr_t)edst, FDDI_ADDR_LEN); - break; -#endif case pseudo_AF_HDRCMPLT: { @@ -467,11 +455,6 @@ fddi_input(ifp, m) isr = NETISR_IPX; break; #endif -#ifdef NS - case ETHERTYPE_NS: - isr = NETISR_NS; - break; -#endif #ifdef DECNET case ETHERTYPE_DECNET: isr = NETISR_DECNET; diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c index 6585396..bc8f1f7 100644 --- a/sys/net/if_gre.c +++ b/sys/net/if_gre.c @@ -48,7 +48,6 @@ #include "opt_atalk.h" #include "opt_inet.h" -#include "opt_ns.h" #include <sys/param.h> #include <sys/kernel.h> @@ -337,11 +336,6 @@ gre_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, etype = ETHERTYPE_ATALK; break; #endif -#ifdef NS - case AF_NS: - etype = ETHERTYPE_NS; - break; -#endif default: _IF_DROP(&ifp->if_snd); m_freem(m); diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index 3e0a8c5..92add8a 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -82,11 +82,6 @@ #include <netinet/ip6.h> #endif -#ifdef NS -#include <netns/ns.h> -#include <netns/ns_if.h> -#endif - #ifdef NETATALK #include <netatalk/at.h> #include <netatalk/at_var.h> @@ -250,7 +245,6 @@ contiguousfail: case AF_INET: case AF_INET6: case AF_IPX: - case AF_NS: case AF_APPLETALK: break; default: @@ -349,11 +343,6 @@ if_simloop(ifp, m, af, hlen) isr = NETISR_IPX; break; #endif -#ifdef NS - case AF_NS: - isr = NETISR_NS; - break; -#endif #ifdef NETATALK case AF_APPLETALK: isr = NETISR_ATALK2; diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index 1c1e972..3b20e58 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -89,11 +89,6 @@ #include <netipx/ipx_if.h> #endif -#ifdef NS -#include <netns/ns.h> -#include <netns/ns_if.h> -#endif - #include <net/if_sppp.h> #if defined(__FreeBSD__) && __FreeBSD__ >= 3 @@ -664,14 +659,6 @@ sppp_input(struct ifnet *ifp, struct mbuf *m) do_account++; break; #endif -#ifdef NS - case PPP_XNS: - /* XNS IDPCP not implemented yet */ - if (sp->pp_phase == PHASE_NETWORK) - isr = NETISR_NS; - do_account++; - break; -#endif } break; case CISCO_MULTICAST: @@ -712,12 +699,6 @@ sppp_input(struct ifnet *ifp, struct mbuf *m) do_account++; break; #endif -#ifdef NS - case ETHERTYPE_NS: - isr = NETISR_NS; - do_account++; - break; -#endif } break; default: /* Invalid PPP packet. */ @@ -941,12 +922,6 @@ sppp_output(struct ifnet *ifp, struct mbuf *m, } break; #endif -#ifdef NS - case AF_NS: /* Xerox NS Protocol */ - h->protocol = htons (sp->pp_mode == IFF_CISCO ? - ETHERTYPE_NS : PPP_XNS); - break; -#endif #ifdef IPX case AF_IPX: /* Novell IPX Protocol */ h->protocol = htons (sp->pp_mode == IFF_CISCO ? diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 85c4cd3..9d65580 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -805,11 +805,6 @@ tunwrite(dev_t dev, struct uio *uio, int flag) isr = NETISR_IPX; break; #endif -#ifdef NS - case AF_NS: - isr = NETISR_NS; - break; -#endif #ifdef NETATALK case AF_APPLETALK: isr = NETISR_ATALK2; diff --git a/sys/net/netisr.h b/sys/net/netisr.h index a2e63de..5dd3607 100644 --- a/sys/net/netisr.h +++ b/sys/net/netisr.h @@ -54,7 +54,6 @@ */ #define NETISR_POLL 0 /* polling callback, must be first */ #define NETISR_IP 2 /* same as AF_INET */ -#define NETISR_NS 6 /* same as AF_NS */ #define NETISR_AARP 15 /* Appletalk ARP */ #define NETISR_ATALK2 16 /* Appletalk phase 2 */ #define NETISR_ATALK1 17 /* Appletalk phase 1 */ diff --git a/sys/net/route.h b/sys/net/route.h index fd14a9c..c7e7529 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -258,7 +258,6 @@ struct route_cb { int ip_count; int ip6_count; int ipx_count; - int ns_count; int any_count; }; diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 4780cc5..d85e686 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -141,9 +141,6 @@ rts_attach(struct socket *so, int proto, struct thread *td) case AF_IPX: route_cb.ipx_count++; break; - case AF_NS: - route_cb.ns_count++; - break; } rp->rcb_faddr = &route_src; route_cb.any_count++; @@ -194,9 +191,6 @@ rts_detach(struct socket *so) case AF_IPX: route_cb.ipx_count--; break; - case AF_NS: - route_cb.ns_count--; - break; } route_cb.any_count--; } |