diff options
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_ethersubr.c | 83 | ||||
-rw-r--r-- | sys/net/if_fddisubr.c | 69 | ||||
-rw-r--r-- | sys/net/if_gre.c | 6 | ||||
-rw-r--r-- | sys/net/if_loop.c | 13 | ||||
-rw-r--r-- | sys/net/if_spppfr.c | 10 | ||||
-rw-r--r-- | sys/net/if_tun.c | 6 | ||||
-rw-r--r-- | sys/net/netisr.h | 14 |
7 files changed, 5 insertions, 196 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 44d5f24..860971c 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -30,7 +30,6 @@ * $FreeBSD$ */ -#include "opt_atalk.h" #include "opt_inet.h" #include "opt_inet6.h" #include "opt_netgraph.h" @@ -82,18 +81,6 @@ int (*ef_inputp)(struct ifnet*, struct ether_header *eh, struct mbuf *m); int (*ef_outputp)(struct ifnet *ifp, struct mbuf **mp, const struct sockaddr *dst, short *tp, int *hlen); -#ifdef NETATALK -#include <netatalk/at.h> -#include <netatalk/at_var.h> -#include <netatalk/at_extern.h> - -#define llc_snap_org_code llc_un.type_snap.org_code -#define llc_snap_ether_type llc_un.type_snap.ether_type - -extern u_char at_org_code[3]; -extern u_char aarp_org_code[3]; -#endif /* NETATALK */ - #include <security/mac/mac_framework.h> #ifdef CTASSERT @@ -243,42 +230,6 @@ ether_output(struct ifnet *ifp, struct mbuf *m, type = htons(ETHERTYPE_IPV6); break; #endif -#ifdef NETATALK - case AF_APPLETALK: - { - struct at_ifaddr *aa; - - if ((aa = at_ifawithnet((const struct sockaddr_at *)dst)) == NULL) - senderr(EHOSTUNREACH); /* XXX */ - if (!aarpresolve(ifp, m, (const struct sockaddr_at *)dst, edst)) { - ifa_free(&aa->aa_ifa); - return (0); - } - /* - * In the phase 2 case, need to prepend an mbuf for the llc header. - */ - if ( aa->aa_flags & AFA_PHASE2 ) { - struct llc llc; - - ifa_free(&aa->aa_ifa); - M_PREPEND(m, LLC_SNAPFRAMELEN, M_NOWAIT); - if (m == NULL) - senderr(ENOBUFS); - llc.llc_dsap = llc.llc_ssap = LLC_SNAP_LSAP; - llc.llc_control = LLC_UI; - bcopy(at_org_code, llc.llc_snap_org_code, sizeof(at_org_code)); - llc.llc_snap_ether_type = htons( ETHERTYPE_AT ); - bcopy(&llc, mtod(m, caddr_t), LLC_SNAPFRAMELEN); - type = htons(m->m_pkthdr.len); - hlen = LLC_SNAPFRAMELEN + ETHER_HDR_LEN; - } else { - ifa_free(&aa->aa_ifa); - type = htons(ETHERTYPE_AT); - } - break; - } -#endif /* NETATALK */ - case pseudo_AF_HDRCMPLT: { const struct ether_header *eh; @@ -720,9 +671,6 @@ ether_demux(struct ifnet *ifp, struct mbuf *m) struct ether_header *eh; int i, isr; u_short ether_type; -#if defined(NETATALK) - struct llc *l; -#endif KASSERT(ifp != NULL, ("%s: NULL interface pointer", __func__)); @@ -798,38 +746,7 @@ ether_demux(struct ifnet *ifp, struct mbuf *m) isr = NETISR_IPV6; break; #endif -#ifdef NETATALK - case ETHERTYPE_AT: - isr = NETISR_ATALK1; - break; - case ETHERTYPE_AARP: - isr = NETISR_AARP; - break; -#endif /* NETATALK */ default: -#if defined(NETATALK) - if (ether_type > ETHERMTU) - goto discard; - l = mtod(m, struct llc *); - if (l->llc_dsap == LLC_SNAP_LSAP && - l->llc_ssap == LLC_SNAP_LSAP && - l->llc_control == LLC_UI) { - if (bcmp(&(l->llc_snap_org_code)[0], at_org_code, - sizeof(at_org_code)) == 0 && - ntohs(l->llc_snap_ether_type) == ETHERTYPE_AT) { - m_adj(m, LLC_SNAPFRAMELEN); - isr = NETISR_ATALK2; - break; - } - if (bcmp(&(l->llc_snap_org_code)[0], aarp_org_code, - sizeof(aarp_org_code)) == 0 && - ntohs(l->llc_snap_ether_type) == ETHERTYPE_AARP) { - m_adj(m, LLC_SNAPFRAMELEN); - isr = NETISR_AARP; - break; - } - } -#endif /* NETATALK */ goto discard; } netisr_dispatch(isr, m); diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c index bfaf71a..1680dca 100644 --- a/sys/net/if_fddisubr.c +++ b/sys/net/if_fddisubr.c @@ -36,7 +36,6 @@ * $FreeBSD$ */ -#include "opt_atalk.h" #include "opt_inet.h" #include "opt_inet6.h" @@ -75,15 +74,6 @@ #include <netdnet/dn.h> #endif -#ifdef NETATALK -#include <netatalk/at.h> -#include <netatalk/at_var.h> -#include <netatalk/at_extern.h> - -extern u_char at_org_code[ 3 ]; -extern u_char aarp_org_code[ 3 ]; -#endif /* NETATALK */ - #include <security/mac/mac_framework.h> static const u_char fddibroadcastaddr[FDDI_ADDR_LEN] = @@ -178,40 +168,6 @@ fddi_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, type = htons(ETHERTYPE_IPV6); break; #endif /* INET6 */ -#ifdef NETATALK - case AF_APPLETALK: { - struct at_ifaddr *aa; - if (!aarpresolve(ifp, m, (const struct sockaddr_at *)dst, edst)) - return (0); - /* - * ifaddr is the first thing in at_ifaddr - */ - if ((aa = at_ifawithnet((const struct sockaddr_at *)dst)) == 0) - goto bad; - - /* - * In the phase 2 case, we need to prepend an mbuf for the llc header. - * Since we must preserve the value of m, which is passed to us by - * value, we m_copy() the first mbuf, and use it for our llc header. - */ - if (aa->aa_flags & AFA_PHASE2) { - struct llc llc; - - M_PREPEND(m, LLC_SNAPFRAMELEN, M_WAITOK); - llc.llc_dsap = llc.llc_ssap = LLC_SNAP_LSAP; - llc.llc_control = LLC_UI; - bcopy(at_org_code, llc.llc_snap.org_code, sizeof(at_org_code)); - llc.llc_snap.ether_type = htons(ETHERTYPE_AT); - bcopy(&llc, mtod(m, caddr_t), LLC_SNAPFRAMELEN); - type = 0; - } else { - type = htons(ETHERTYPE_AT); - } - ifa_free(&aa->aa_ifa); - break; - } -#endif /* NETATALK */ - case pseudo_AF_HDRCMPLT: { const struct ether_header *eh; @@ -459,23 +415,6 @@ fddi_input(ifp, m) ifp->if_noproto++; goto dropanyway; } -#ifdef NETATALK - if (bcmp(&(l->llc_snap.org_code)[0], at_org_code, - sizeof(at_org_code)) == 0 && - ntohs(l->llc_snap.ether_type) == ETHERTYPE_AT) { - isr = NETISR_ATALK2; - m_adj(m, LLC_SNAPFRAMELEN); - break; - } - - if (bcmp(&(l->llc_snap.org_code)[0], aarp_org_code, - sizeof(aarp_org_code)) == 0 && - ntohs(l->llc_snap.ether_type) == ETHERTYPE_AARP) { - m_adj(m, LLC_SNAPFRAMELEN); - isr = NETISR_AARP; - break; - } -#endif /* NETATALK */ if (l->llc_snap.org_code[0] != 0 || l->llc_snap.org_code[1] != 0 || l->llc_snap.org_code[2] != 0) { @@ -510,14 +449,6 @@ fddi_input(ifp, m) isr = NETISR_DECNET; break; #endif -#ifdef NETATALK - case ETHERTYPE_AT: - isr = NETISR_ATALK1; - break; - case ETHERTYPE_AARP: - isr = NETISR_AARP; - break; -#endif /* NETATALK */ default: /* printf("fddi_input: unknown protocol 0x%x\n", type); */ ifp->if_noproto++; diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c index 9f6a78e..c553dc8 100644 --- a/sys/net/if_gre.c +++ b/sys/net/if_gre.c @@ -41,7 +41,6 @@ * Also supported: IP in IP encaps (proto 55) as of RFC 2004 */ -#include "opt_atalk.h" #include "opt_inet.h" #include "opt_inet6.h" @@ -440,11 +439,6 @@ gre_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, etype = ETHERTYPE_IPV6; break; #endif -#ifdef NETATALK - case AF_APPLETALK: - etype = ETHERTYPE_ATALK; - 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 e114699..0687050 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -34,7 +34,6 @@ * Loopback interface driver for protocol testing and timing. */ -#include "opt_atalk.h" #include "opt_inet.h" #include "opt_inet6.h" @@ -71,11 +70,6 @@ #include <netinet/ip6.h> #endif -#ifdef NETATALK -#include <netatalk/at.h> -#include <netatalk/at_var.h> -#endif - #include <security/mac/mac_framework.h> #ifdef TINY_LOMTU @@ -267,8 +261,6 @@ looutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, #endif m->m_pkthdr.csum_flags &= ~LO_CSUM_FEATURES6; break; - case AF_APPLETALK: - break; default: printf("looutput: af=%d unexpected\n", af); m_freem(m); @@ -361,11 +353,6 @@ if_simloop(struct ifnet *ifp, struct mbuf *m, int af, int hlen) isr = NETISR_IPV6; break; #endif -#ifdef NETATALK - case AF_APPLETALK: - isr = NETISR_ATALK2; - break; -#endif default: printf("if_simloop: can't handle af=%d\n", af); m_freem(m); diff --git a/sys/net/if_spppfr.c b/sys/net/if_spppfr.c index fffcdba..8fda38b 100644 --- a/sys/net/if_spppfr.c +++ b/sys/net/if_spppfr.c @@ -260,11 +260,6 @@ drop: ++ifp->if_ierrors; isr = NETISR_IP; break; #endif -#ifdef NETATALK - case ETHERTYPE_AT: - isr = NETISR_ATALK; - break; -#endif } if (! (ifp->if_flags & IFF_UP)) @@ -339,11 +334,6 @@ struct mbuf *sppp_fr_header (struct sppp *sp, struct mbuf *m, type = 0x8137; break; #endif -#ifdef NETATALK - case AF_APPLETALK: - type = ETHERTYPE_AT; - break; -#endif } h[3] = FR_PADDING; h[4] = FR_SNAP; diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 03fcd59..504bab0 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -16,7 +16,6 @@ * $FreeBSD$ */ -#include "opt_atalk.h" #include "opt_inet.h" #include "opt_inet6.h" @@ -905,11 +904,6 @@ tunwrite(struct cdev *dev, struct uio *uio, int flag) isr = NETISR_IPV6; break; #endif -#ifdef NETATALK - case AF_APPLETALK: - isr = NETISR_ATALK2; - break; -#endif default: m_freem(m); return (EAFNOSUPPORT); diff --git a/sys/net/netisr.h b/sys/net/netisr.h index 2cf3113..b011c21 100644 --- a/sys/net/netisr.h +++ b/sys/net/netisr.h @@ -52,15 +52,11 @@ #define NETISR_IP 1 #define NETISR_IGMP 2 /* IGMPv3 output queue */ #define NETISR_ROUTE 3 /* routing socket */ -#define NETISR_AARP 4 /* Appletalk ARP */ -#define NETISR_ATALK2 5 /* Appletalk phase 2 */ -#define NETISR_ATALK1 6 /* Appletalk phase 1 */ -#define NETISR_ARP 7 /* same as AF_LINK */ -/* 8 was IPX */ -#define NETISR_ETHER 9 /* ethernet input */ -#define NETISR_IPV6 10 -#define NETISR_NATM 11 -#define NETISR_EPAIR 12 /* if_epair(4) */ +#define NETISR_ARP 4 /* same as AF_LINK */ +#define NETISR_ETHER 5 /* ethernet input */ +#define NETISR_IPV6 6 +#define NETISR_NATM 7 +#define NETISR_EPAIR 8 /* if_epair(4) */ /* * Protocol ordering and affinity policy constants. See the detailed |