diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-07-16 15:01:10 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-07-16 15:01:10 +0000 |
commit | 7cffd1370ee5a668e1f416017a806f6298dfbdf8 (patch) | |
tree | 2fbcdb2611e425398ee8ab523856225643c299e9 /sys/net/if_tokensubr.c | |
parent | 3a0746f02ab0c6a1a7131d5d393402e088bd7b44 (diff) |
remove netiso shitz, millert ok
Diffstat (limited to 'sys/net/if_tokensubr.c')
-rw-r--r-- | sys/net/if_tokensubr.c | 123 |
1 files changed, 1 insertions, 122 deletions
diff --git a/sys/net/if_tokensubr.c b/sys/net/if_tokensubr.c index d5b9ece85fe..74077d9c467 100644 --- a/sys/net/if_tokensubr.c +++ b/sys/net/if_tokensubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tokensubr.c,v 1.15 2004/06/21 23:50:36 tholo Exp $ */ +/* $OpenBSD: if_tokensubr.c,v 1.16 2004/07/16 15:01:09 henning Exp $ */ /* $NetBSD: if_tokensubr.c,v 1.7 1999/05/30 00:39:07 bad Exp $ */ /* @@ -73,13 +73,6 @@ #include <netdnet/dn.h> #endif -#ifdef ISO -#include <netiso/argo_debug.h> -#include <netiso/iso.h> -#include <netiso/iso_var.h> -#include <netiso/iso_snpac.h> -#endif - #include "bpfilter.h" #ifdef LLC @@ -278,52 +271,6 @@ token_output(ifp, m0, dst, rt0) mcopy = m_copy(m, 0, (int)M_COPYALL); break; #endif -#ifdef ISO - case AF_ISO: { - int snpalen; - struct llc *l; - struct sockaddr_dl *sdl; - - if (rt && (sdl = (struct sockaddr_dl *)rt->rt_gateway) && - sdl->sdl_family == AF_LINK && sdl->sdl_alen > 0) { - bcopy(LLADDR(sdl), (caddr_t)edst, sizeof(edst)); - } - else if ((error = - iso_snparesolve(ifp, (struct sockaddr_iso *)dst, - (char *)edst, &snpalen))) - goto bad; /* Not resolved */ - /* If broadcasting on a simplex interface, loopback a copy. */ - if (*edst & 1) - m->m_flags |= (M_BCAST|M_MCAST); - if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX) && - (mcopy = m_copy(m, 0, (int)M_COPYALL))) { - M_PREPEND(mcopy, sizeof (*trh), M_DONTWAIT); - if (mcopy) { - trh = mtod(mcopy, struct token_header *); - bcopy((caddr_t)edst, - (caddr_t)trh->token_dhost, sizeof (edst)); - bcopy(LLADDR(ifp->if_sadl), - (caddr_t)trh->token_shost, sizeof (edst)); - } - } - M_PREPEND(m, 3, M_DONTWAIT); - if (m == NULL) - return (0); - etype = 0; - l = mtod(m, struct llc *); - l->llc_dsap = l->llc_ssap = LLC_ISO_LSAP; - l->llc_control = LLC_UI; -#if defined(__FreeBSD__) - IFDEBUG(D_ETHER) - int i; - printf("token_output: sending pkt to: "); - for (i=0; i < ISO88025_ADDR_LEN; i++) - printf("%x ", edst[i] & 0xff); - printf("\n"); - ENDDEBUG -#endif - } break; -#endif /* ISO */ #ifdef LLC /* case AF_NSAP: */ case AF_CCITT: { @@ -554,74 +501,6 @@ token_input(ifp, m) break; } #endif /* INET || NS */ -#ifdef ISO - case LLC_ISO_LSAP: - switch (l->llc_control) { - case LLC_UI: - /* LLC_UI_P forbidden in class 1 service */ - if ((l->llc_dsap == LLC_ISO_LSAP) && - (l->llc_ssap == LLC_ISO_LSAP)) { - /* LSAP for ISO */ - m->m_data += 3; /* XXX */ - m->m_len -= 3; /* XXX */ - m->m_pkthdr.len -= 3; /* XXX */ - M_PREPEND(m, sizeof *trh, M_DONTWAIT); - if (m == 0) - return; - *mtod(m, struct token_header *) = *trh; -#if defined(__FreeBSD__) - IFDEBUG(D_ETHER) - printf("clnp packet"); - ENDDEBUG -#endif - schednetisr(NETISR_ISO); - inq = &clnlintrq; - break; - } - goto dropanyway; - - case LLC_XID: - case LLC_XID_P: - if(m->m_len < ISO88025_ADDR_LEN) - goto dropanyway; - l->llc_window = 0; - l->llc_fid = 9; - l->llc_class = 1; - l->llc_dsap = l->llc_ssap = 0; - /* Fall through to */ - case LLC_TEST: - case LLC_TEST_P: - { - struct sockaddr sa; - struct ether_header *eh; - int i; - u_char c = l->llc_dsap; - - l->llc_dsap = l->llc_ssap; - l->llc_ssap = c; - if (m->m_flags & (M_BCAST | M_MCAST)) - bcopy(LLADDR(ifp->if_sadl), - (caddr_t)trh->token_dhost, - ISO88025_ADDR_LEN); - sa.sa_family = AF_UNSPEC; - sa.sa_len = sizeof(sa); - eh = (struct ether_header *)sa.sa_data; - for (i = 0; i < ISO88025_ADDR_LEN; i++) { - eh->ether_shost[i] = c = trh->token_dhost[i]; - eh->ether_dhost[i] = - eh->ether_dhost[i] = trh->token_shost[i]; - eh->ether_shost[i] = c; - } - eh->ether_type = 0; - ifp->if_output(ifp, m, &sa, NULL); - return; - } - default: - m_freem(m); - return; - } - break; -#endif /* ISO */ #ifdef LLC case LLC_X25_LSAP: { |