summaryrefslogtreecommitdiff
path: root/sys/net/if_ethersubr.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2011-07-09 00:47:19 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2011-07-09 00:47:19 +0000
commit0db3d0d8af1c885cf082f4cbc484006aadf0baf1 (patch)
tree256507b0a879a8e802adb77351a248b278a0d4ff /sys/net/if_ethersubr.c
parent1791d2a4765ecc135e5955bc390ee0f45ff8689d (diff)
begone, fucking rotten appletalk shit. ok room
Diffstat (limited to 'sys/net/if_ethersubr.c')
-rw-r--r--sys/net/if_ethersubr.c110
1 files changed, 1 insertions, 109 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 0321a33726f..477fd7018b5 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ethersubr.c,v 1.150 2011/07/08 18:30:16 yasuoka Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.151 2011/07/09 00:47:18 henning Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */
/*
@@ -151,15 +151,6 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>.
#include <net/pipex.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 */
-
#ifdef MPLS
#include <netmpls/mpls.h>
#endif /* MPLS */
@@ -172,19 +163,11 @@ u_char etherbroadcastaddr[ETHER_ADDR_LEN] =
int
ether_ioctl(struct ifnet *ifp, struct arpcom *arp, u_long cmd, caddr_t data)
{
- struct ifaddr *ifa = (struct ifaddr *)data;
struct ifreq *ifr = (struct ifreq *)data;
int error = 0;
switch (cmd) {
case SIOCSIFADDR:
- switch (ifa->ifa_addr->sa_family) {
-#ifdef NETATALK
- case AF_APPLETALK:
- /* Nothing to do. */
- break;
-#endif /* NETATALK */
- }
break;
case SIOCSIFMTU:
@@ -316,56 +299,6 @@ ether_output(ifp0, m0, dst, rt0)
etype = htons(ETHERTYPE_IPV6);
break;
#endif
-#ifdef NETATALK
- case AF_APPLETALK: {
- struct at_ifaddr *aa;
-
- if (!aarpresolve(ac, m, (struct sockaddr_at *)dst, edst)) {
-#ifdef NETATALKDEBUG
- extern char *prsockaddr(struct sockaddr *);
- printf("aarpresolv: failed for %s\n", prsockaddr(dst));
-#endif /* NETATALKDEBUG */
- return (0);
- }
-
- /*
- * ifaddr is the first thing in at_ifaddr
- */
- aa = (struct at_ifaddr *)at_ifawithnet(
- (struct sockaddr_at *)dst,
- TAILQ_FIRST(&ifp->if_addrlist));
- if (aa == 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, AT_LLC_SIZE, M_DONTWAIT);
- if (m == NULL)
- return (0);
- /*
- * FreeBSD doesn't count the LLC len in
- * ifp->obytes, so they increment a length
- * field here. We don't do this.
- */
- 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), AT_LLC_SIZE);
- etype = htons(m->m_pkthdr.len);
- } else {
- etype = htons(ETHERTYPE_AT);
- }
- } break;
-#endif /* NETATALK */
#ifdef MPLS
case AF_MPLS:
if (rt)
@@ -723,17 +656,6 @@ decapsulate:
inq = &ip6intrq;
break;
#endif /* INET6 */
-#ifdef NETATALK
- case ETHERTYPE_AT:
- schednetisr(NETISR_ATALK);
- inq = &atintrq1;
- break;
- case ETHERTYPE_AARP:
- /* probably this should be done with a NETISR as well */
- /* XXX queue this */
- aarpinput((struct arpcom *)ifp, m);
- goto done;
-#endif
#if NPPPOE > 0 || defined(PIPEX)
case ETHERTYPE_PPPOEDISC:
case ETHERTYPE_PPPOE:
@@ -786,36 +708,6 @@ decapsulate:
l = mtod(m, struct llc *);
switch (l->llc_dsap) {
case LLC_SNAP_LSAP:
-#ifdef NETATALK
- /*
- * Some protocols (like Appletalk) need special
- * handling depending on if they are type II
- * or SNAP encapsulated. Everything else
- * gets handled by stripping off the SNAP header
- * and going back up to decapsulate.
- */
- if (l->llc_control == LLC_UI &&
- l->llc_ssap == LLC_SNAP_LSAP &&
- Bcmp(&(l->llc_snap.org_code)[0],
- at_org_code, sizeof(at_org_code)) == 0 &&
- ntohs(l->llc_snap.ether_type) == ETHERTYPE_AT) {
- inq = &atintrq2;
- m_adj(m, AT_LLC_SIZE);
- schednetisr(NETISR_ATALK);
- break;
- }
-
- if (l->llc_control == LLC_UI &&
- l->llc_ssap == LLC_SNAP_LSAP &&
- 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, AT_LLC_SIZE);
- /* XXX Really this should use netisr too */
- aarpinput((struct arpcom *)ifp, m);
- goto done;
- }
-#endif /* NETATALK */
if (l->llc_control == LLC_UI &&
l->llc_dsap == LLC_SNAP_LSAP &&
l->llc_ssap == LLC_SNAP_LSAP) {