From 2dafaec132e9b7f36daa93d5002222cca1a91e6a Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Tue, 7 Jun 2005 02:45:12 +0000 Subject: do not handle CCITT any longer --- sys/net/if.c | 5 +-- sys/net/if_ethersubr.c | 75 +--------------------------------------- sys/net/if_fddisubr.c | 68 +----------------------------------- sys/net/if_tokensubr.c | 87 +++-------------------------------------------- sys/net/netisr.h | 4 +-- sys/net/netisr_dispatch.h | 5 +-- 6 files changed, 10 insertions(+), 234 deletions(-) (limited to 'sys/net') diff --git a/sys/net/if.c b/sys/net/if.c index 75cfe0d3703..12767ea05ee 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.126 2005/06/06 03:44:21 henning Exp $ */ +/* $OpenBSD: if.c,v 1.127 2005/06/07 02:45:11 henning Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -581,9 +581,6 @@ do { \ IF_DETACH_QUEUES(atintrq1); IF_DETACH_QUEUES(atintrq2); #endif -#ifdef CCITT - IF_DETACH_QUEUES(llcintrq); -#endif #ifdef NATM IF_DETACH_QUEUES(natmintrq); #endif diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index d3d7f5626a6..87a6faf5f73 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ethersubr.c,v 1.93 2005/05/24 16:28:03 deraadt Exp $ */ +/* $OpenBSD: if_ethersubr.c,v 1.94 2005/06/07 02:45:11 henning Exp $ */ /* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */ /* @@ -151,12 +151,6 @@ didn't get a copy, you may request one from . #include #endif -#include -#include -#include -#include -#include - #ifdef NETATALK #include #include @@ -166,10 +160,6 @@ extern u_char at_org_code[ 3 ]; extern u_char aarp_org_code[ 3 ]; #endif /* NETATALK */ -#if defined(CCITT) -#include -#endif - u_char etherbroadcastaddr[ETHER_ADDR_LEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; #define senderr(e) { error = (e); goto bad;} @@ -187,13 +177,6 @@ ether_ioctl(ifp, arp, cmd, data) switch (cmd) { -#if defined(CCITT) - case SIOCSIFCONF_X25: - ifp->if_flags |= IFF_UP; - ifa->ifa_rtrequest = cons_rtrequest; - error = x25_llcglue(PRC_IFUP, ifa->ifa_addr); - break; -#endif /* CCITT */ case SIOCSIFADDR: switch (ifa->ifa_addr->sa_family) { #ifdef IPX @@ -426,43 +409,6 @@ ether_output(ifp0, m0, dst, rt0) } } break; #endif /* NETATALK */ -/* case AF_NSAP: */ - case AF_CCITT: { - struct sockaddr_dl *sdl = - (struct sockaddr_dl *) rt -> rt_gateway; - - if (sdl && sdl->sdl_family == AF_LINK - && sdl->sdl_alen > 0) { - bcopy(LLADDR(sdl), (char *)edst, - sizeof(edst)); - } else goto bad; /* Not a link interface ? Funny ... */ - if ((ifp->if_flags & IFF_SIMPLEX) && (*edst & 1) && - (mcopy = m_copy(m, 0, (int)M_COPYALL))) { - M_PREPEND(mcopy, sizeof(*eh), M_DONTWAIT); - if (mcopy) { - eh = mtod(mcopy, struct ether_header *); - bcopy(edst, eh->ether_dhost, sizeof(edst)); - bcopy(ac->ac_enaddr, eh->ether_shost, - sizeof(edst)); - } - } - etype = htons(m->m_pkthdr.len); -#ifdef LLC_DEBUG - { - int i; - struct llc *l = mtod(m, struct llc *); - - printf("ether_output: sending LLC2 pkt to: "); - for (i=0; i < ETHER_ADDR_LEN; i++) - printf("%x ", edst[i] & 0xff); - printf(" len 0x%x dsap 0x%x ssap 0x%x control 0x%x\n", - m->m_pkthdr.len, l->llc_dsap & 0xff, - l->llc_ssap &0xff, l->llc_control & 0xff); - - } -#endif /* LLC_DEBUG */ - } break; - case pseudo_AF_HDRCMPLT: hdrcmplt = 1; eh = (struct ether_header *)dst->sa_data; @@ -864,25 +810,6 @@ decapsulate: goto decapsulate; } goto dropanyway; -#ifdef CCITT - case LLC_X25_LSAP: - if (m->m_pkthdr.len > etype) - m_adj(m, etype - m->m_pkthdr.len); - M_PREPEND(m, sizeof(struct sdl_hdr) , M_DONTWAIT); - if (m == 0) - return; - if (!sdl_sethdrif(ifp, eh->ether_shost, LLC_X25_LSAP, - eh->ether_dhost, LLC_X25_LSAP, ETHER_ADDR_LEN, - mtod(m, struct sdl_hdr *))) - panic("ETHER cons addr failure"); - mtod(m, struct sdl_hdr *)->sdlhdr_len = etype; -#ifdef LLC_DEBUG - printf("llc packet\n"); -#endif /* LLC_DEBUG */ - schednetisr(NETISR_CCITT); - inq = &llcintrq; - break; -#endif /* CCITT */ dropanyway: default: m_freem(m); diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c index 9a8a67d0a41..0dacbe01374 100644 --- a/sys/net/if_fddisubr.c +++ b/sys/net/if_fddisubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_fddisubr.c,v 1.44 2005/01/18 23:26:52 mpf Exp $ */ +/* $OpenBSD: if_fddisubr.c,v 1.45 2005/06/07 02:45:11 henning Exp $ */ /* $NetBSD: if_fddisubr.c,v 1.5 1996/05/07 23:20:21 christos Exp $ */ /* @@ -125,13 +125,6 @@ #include "bpfilter.h" -#include -#include - -#if defined(CCITT) -extern struct ifqueue pkintrq; -#endif - #include "carp.h" #if NCARP > 0 #include @@ -278,46 +271,6 @@ fddi_output(ifp0, m0, dst, rt0) mcopy = m_copy(m, 0, (int)M_COPYALL); break; #endif -#ifdef CCITT -/* case AF_NSAP: */ - case AF_CCITT: { - struct sockaddr_dl *sdl = - (struct sockaddr_dl *) rt->rt_gateway; - - if (sdl && sdl->sdl_family == AF_LINK - && sdl->sdl_alen > 0) { - bcopy(LLADDR(sdl), (char *)edst, - sizeof(edst)); - } else goto bad; /* Not a link interface ? Funny ... */ - if ((ifp->if_flags & IFF_SIMPLEX) && (*edst & 1) && - (mcopy = m_copy(m, 0, (int)M_COPYALL))) { - M_PREPEND(mcopy, sizeof (*fh), M_DONTWAIT); - if (mcopy) { - fh = mtod(mcopy, struct fddi_header *); - bcopy((caddr_t)edst, - (caddr_t)fh->fddi_dhost, sizeof (edst)); - bcopy((caddr_t)ac->ac_enaddr, - (caddr_t)fh->fddi_shost, sizeof (edst)); - fh->fddi_fc = FDDIFC_LLC_ASYNC|FDDIFC_LLC_PRIO4; - } - } - type = 0; -#ifdef LLC_DEBUG - { - int i; - struct llc *l = mtod(m, struct llc *); - - printf("fddi_output: sending LLC2 pkt to: "); - for (i=0; i<6; i++) - printf("%x ", edst[i] & 0xff); - printf(" len 0x%x dsap 0x%x ssap 0x%x control 0x%x\n", - m->m_pkthdr.len, l->llc_dsap & 0xff, l->llc_ssap &0xff, - l->llc_control & 0xff); - - } -#endif /* LLC_DEBUG */ - } break; -#endif /* CCITT */ case pseudo_AF_HDRCMPLT: { @@ -544,25 +497,6 @@ fddi_input(ifp, fh, m) break; } #endif /* INET || IPX || NS || DECNET */ -#ifdef CCITT - case LLC_X25_LSAP: - { - M_PREPEND(m, sizeof(struct sdl_hdr) , M_DONTWAIT); - if (m == 0) - return; - if ( !sdl_sethdrif(ifp, fh->fddi_shost, LLC_X25_LSAP, - fh->fddi_dhost, LLC_X25_LSAP, 6, - mtod(m, struct sdl_hdr *))) - panic("ETHER cons addr failure"); - mtod(m, struct sdl_hdr *)->sdlhdr_len = m->m_pkthdr.len - sizeof(struct sdl_hdr); -#ifdef LLC_DEBUG - printf("llc packet\n"); -#endif /* LLC_DEBUG */ - schednetisr(NETISR_CCITT); - inq = &llcintrq; - break; - } -#endif /* CCITT */ default: /* printf("fddi_input: unknown dsap 0x%x\n", l->llc_dsap); */ diff --git a/sys/net/if_tokensubr.c b/sys/net/if_tokensubr.c index 23d74acc58c..02b56cf20c1 100644 --- a/sys/net/if_tokensubr.c +++ b/sys/net/if_tokensubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tokensubr.c,v 1.18 2005/01/18 23:26:52 mpf Exp $ */ +/* $OpenBSD: if_tokensubr.c,v 1.19 2005/06/07 02:45:11 henning Exp $ */ /* $NetBSD: if_tokensubr.c,v 1.7 1999/05/30 00:39:07 bad Exp $ */ /* @@ -56,7 +56,6 @@ #include #include - #ifdef INET #include #include @@ -80,24 +79,13 @@ #include #endif -#ifdef LLC -#include -#include -#endif - /* * TODO: * handle source routing via send_xid() - * source routing for ISO,LLC,CCITT protocols - * need sockaddr_dl_8025 to handle this correctly * IPX cases * handle "fast" forwarding like if_ether and if_fddi */ -#if defined(LLC) && defined(CCITT) -extern struct ifqueue pkintrq; -#endif - #define senderr(e) { error = (e); goto bad;} #if defined(__bsdi__) || defined(__NetBSD__) || defined(__OpenBSD__) @@ -113,8 +101,11 @@ extern struct ifqueue pkintrq; #define RCF_ALLROUTES (2 << 8) | TOKEN_RCF_FRAME2 | TOKEN_RCF_BROADCAST_ALL #define RCF_SINGLEROUTE (2 << 8) | TOKEN_RCF_FRAME2 | TOKEN_RCF_BROADCAST_SINGLE +/* + * This really should be defined in if_llc.h but in case it isn't. + */ #ifndef llc_snap -#define llc_snap llc_un.type_snap +#define llc_snap llc_un.type_snap #endif int token_output(struct ifnet *, struct mbuf *, struct sockaddr *, @@ -296,49 +287,6 @@ token_output(ifp0, m0, dst, rt0) mcopy = m_copy(m, 0, (int)M_COPYALL); break; #endif -#ifdef LLC -/* case AF_NSAP: */ - case AF_CCITT: { - struct sockaddr_dl *sdl = - (struct sockaddr_dl *) rt -> rt_gateway; - - if (sdl && sdl->sdl_family == AF_LINK - && sdl->sdl_alen > 0) { - bcopy(LLADDR(sdl), (char *)edst, sizeof(edst)); - } - else { - /* Not a link interface ? Funny ... */ - goto bad; - } - if ((ifp->if_flags & IFF_SIMPLEX) && (*edst & 1) && - (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)); - } - } - etype = 0; -#ifdef LLC_DEBUG - { - int i; - struct llc *l = mtod(m, struct llc *); - - printf("token_output: sending LLC2 pkt to: "); - for (i=0; i < ISO88025_ADDR_LEN; i++) - printf("%x ", edst[i] & 0xff); - printf(" len 0x%x dsap 0x%x ssap 0x%x control 0x%x\n", - etype & 0xff, l->llc_dsap & 0xff, l->llc_ssap &0xff, - l->llc_control & 0xff); - - } -#endif /* LLC_DEBUG */ - } - break; -#endif /* LLC */ case AF_UNSPEC: { @@ -545,31 +493,6 @@ token_input(ifp, m) break; } #endif /* INET || NS */ -#ifdef LLC - case LLC_X25_LSAP: - { -/* - * XXX check for source routing info ? (sizeof(struct sdl_hdr) and - * ISO88025_ADDR_LEN) - */ - M_PREPEND(m, sizeof(struct sdl_hdr) , M_DONTWAIT); - if (m == 0) - return; - if (!sdl_sethdrif(ifp, trh->token_shost, LLC_X25_LSAP, - trh->token_dhost, LLC_X25_LSAP, - ISO88025_ADDR_LEN, - mtod(m, struct sdl_hdr *))) - panic("ETHER cons addr failure"); - mtod(m, struct sdl_hdr *)->sdlhdr_len = - m->m_pkthdr.len - sizeof(struct sdl_hdr); -#ifdef LLC_DEBUG - printf("llc packet\n"); -#endif /* LLC_DEBUG */ - schednetisr(NETISR_CCITT); - inq = &llcintrq; - break; - } -#endif /* LLC */ default: /* printf("token_input: unknown dsap 0x%x\n", l->llc_dsap); */ diff --git a/sys/net/netisr.h b/sys/net/netisr.h index a98bc6661c2..af698560852 100644 --- a/sys/net/netisr.h +++ b/sys/net/netisr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: netisr.h,v 1.21 2005/01/14 12:04:02 grange Exp $ */ +/* $OpenBSD: netisr.h,v 1.22 2005/06/07 02:45:11 henning Exp $ */ /* $NetBSD: netisr.h,v 1.12 1995/08/12 23:59:24 mycroft Exp $ */ /* @@ -55,8 +55,6 @@ #define NETISR_IP 2 /* same as AF_INET */ #define NETISR_IMP 3 /* same as AF_IMPLINK */ #define NETISR_NS 6 /* same as AF_NS */ -#define NETISR_ISO 7 /* same as AF_ISO */ -#define NETISR_CCITT 10 /* same as AF_CCITT */ #define NETISR_ATALK 16 /* same as AF_APPLETALK */ #define NETISR_ARP 18 /* same as AF_LINK */ #define NETISR_IPX 23 /* same as AF_IPX */ diff --git a/sys/net/netisr_dispatch.h b/sys/net/netisr_dispatch.h index f5e5ae31b5d..f59fb66fabe 100644 --- a/sys/net/netisr_dispatch.h +++ b/sys/net/netisr_dispatch.h @@ -1,4 +1,4 @@ -/* $OpenBSD: netisr_dispatch.h,v 1.8 2005/01/14 12:04:02 grange Exp $ */ +/* $OpenBSD: netisr_dispatch.h,v 1.9 2005/06/07 02:45:11 henning Exp $ */ /* $NetBSD: netisr_dispatch.h,v 1.2 2000/07/02 04:40:47 cgd Exp $ */ /* @@ -55,9 +55,6 @@ #ifdef NS DONETISR(NETISR_NS,nsintr); #endif -#ifdef CCITT - DONETISR(NETISR_CCITT,ccittintr); -#endif #if NATM > 0 DONETISR(NETISR_NATM,natmintr); #endif -- cgit v1.2.3