summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/net/if_ethersubr.c119
-rw-r--r--sys/net/if_fddisubr.c110
-rw-r--r--sys/net/if_loop.c21
-rw-r--r--sys/net/if_spppsubr.c26
-rw-r--r--sys/net/if_tokensubr.c123
-rw-r--r--sys/net/if_tun.c13
6 files changed, 7 insertions, 405 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index e65362995e8..bd750b9ed89 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ethersubr.c,v 1.78 2004/06/26 06:01:14 naddy Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.79 2004/07/16 15:01:08 henning Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */
/*
@@ -140,13 +140,6 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>.
#include <netipx/ipx_if.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 <netccitt/x25.h>
#include <netccitt/pk.h>
#include <netccitt/pk_extern.h>
@@ -395,52 +388,6 @@ ether_output(ifp, m0, dst, rt0)
}
} break;
#endif /* NETATALK */
-#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 {
- error = iso_snparesolve(ifp, (struct sockaddr_iso *)dst,
- (char *)edst, &snpalen);
- if (error)
- 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 (*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));
- }
- }
- M_PREPEND(m, 3, M_DONTWAIT);
- if (m == NULL)
- return (0);
- etype = htons(m->m_pkthdr.len);
- l = mtod(m, struct llc *);
- l->llc_dsap = l->llc_ssap = LLC_ISO_LSAP;
- l->llc_control = LLC_UI;
-#ifdef ARGO_DEBUG
- if (argo_debug[D_ETHER]) {
- int i;
- printf("unoutput: sending pkt to: ");
- for (i=0; i < ETHER_ADDR_LEN; i++)
- printf("%x ", edst[i] & 0xff);
- printf("\n");
- }
-#endif
- } break;
-#endif /* ISO */
/* case AF_NSAP: */
case AF_CCITT: {
struct sockaddr_dl *sdl =
@@ -823,70 +770,6 @@ decapsulate:
goto decapsulate;
}
goto dropanyway;
-#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 */
- if (m->m_pkthdr.len > etype)
- m_adj(m, etype - m->m_pkthdr.len);
- m->m_data += 3; /* XXX */
- m->m_len -= 3; /* XXX */
- m->m_pkthdr.len -= 3; /* XXX */
- M_PREPEND(m, sizeof *eh, M_DONTWAIT);
- if (m == 0)
- return;
- *mtod(m, struct ether_header *) = *eh;
-#ifdef ARGO_DEBUG
- if (argo_debug[D_ETHER])
- printf("clnp packet");
-#endif
- schednetisr(NETISR_ISO);
- inq = &clnlintrq;
- break;
- }
- goto dropanyway;
-
- case LLC_XID:
- case LLC_XID_P:
- if (m->m_len < ETHER_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 *eh2;
- 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(ac->ac_enaddr,
- eh->ether_dhost, ETHER_ADDR_LEN);
- sa.sa_family = AF_UNSPEC;
- sa.sa_len = sizeof(sa);
- eh2 = (struct ether_header *)sa.sa_data;
- for (i = 0; i < ETHER_ADDR_LEN; i++) {
- eh2->ether_shost[i] = c = eh->ether_dhost[i];
- eh2->ether_dhost[i] =
- eh->ether_dhost[i] = eh->ether_shost[i];
- eh->ether_shost[i] = c;
- }
- ifp->if_output(ifp, m, &sa, NULL);
- return;
- }
- break;
- }
-#endif /* ISO */
#ifdef CCITT
case LLC_X25_LSAP:
if (m->m_pkthdr.len > etype)
diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c
index 895b06ab002..0ecfe2d0ac3 100644
--- a/sys/net/if_fddisubr.c
+++ b/sys/net/if_fddisubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_fddisubr.c,v 1.39 2004/07/08 15:01:05 mcbride Exp $ */
+/* $OpenBSD: if_fddisubr.c,v 1.40 2004/07/16 15:01:08 henning Exp $ */
/* $NetBSD: if_fddisubr.c,v 1.5 1996/05/07 23:20:21 christos Exp $ */
/*
@@ -123,13 +123,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"
#include <netccitt/dll.h>
@@ -266,42 +259,6 @@ fddi_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)) != 0)
- 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 (*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));
- }
- }
- M_PREPEND(m, 3, M_DONTWAIT);
- if (m == NULL)
- return (0);
- type = 0;
- l = mtod(m, struct llc *);
- l->llc_dsap = l->llc_ssap = LLC_ISO_LSAP;
- l->llc_control = LLC_UI;
- } break;
-#endif /* ISO */
#ifdef CCITT
/* case AF_NSAP: */
case AF_CCITT: {
@@ -485,9 +442,6 @@ fddi_input(ifp, fh, m)
{
struct ifqueue *inq;
struct llc *l;
-#ifdef ISO
- struct arpcom *ac = (struct arpcom *)ifp;
-#endif
int s;
if ((ifp->if_flags & IFF_UP) == 0) {
@@ -561,68 +515,6 @@ fddi_input(ifp, fh, m)
break;
}
#endif /* INET || IPX || NS || DECNET */
-#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 *fh, M_DONTWAIT);
- if (m == 0)
- return;
- *mtod(m, struct fddi_header *) = *fh;
- schednetisr(NETISR_ISO);
- inq = &clnlintrq;
- break;
- }
- goto dropanyway;
-
- case LLC_XID:
- case LLC_XID_P:
- if(m->m_len < 6)
- 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((caddr_t)ac->ac_enaddr,
- (caddr_t)fh->fddi_dhost, 6);
- sa.sa_family = AF_UNSPEC;
- sa.sa_len = sizeof(sa);
- eh = (struct ether_header *)sa.sa_data;
- for (i = 0; i < 6; i++) {
- eh->ether_shost[i] = c = fh->fddi_dhost[i];
- eh->ether_dhost[i] =
- fh->fddi_dhost[i] = fh->fddi_shost[i];
- fh->fddi_shost[i] = c;
- }
- eh->ether_type = 0;
- ifp->if_output(ifp, m, &sa, NULL);
- return;
- }
- default:
- m_freem(m);
- return;
- }
- break;
-#endif /* ISO */
#ifdef CCITT
case LLC_X25_LSAP:
{
diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c
index 2149f45db29..97ab1f34376 100644
--- a/sys/net/if_loop.c
+++ b/sys/net/if_loop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_loop.c,v 1.32 2003/12/16 20:33:25 markus Exp $ */
+/* $OpenBSD: if_loop.c,v 1.33 2004/07/16 15:01:09 henning Exp $ */
/* $NetBSD: if_loop.c,v 1.15 1996/05/07 02:40:33 thorpej Exp $ */
/*
@@ -148,11 +148,6 @@
#include <netipx/ipx_if.h>
#endif
-#ifdef ISO
-#include <netiso/iso.h>
-#include <netiso/iso_var.h>
-#endif
-
#ifdef NETATALK
#include <netinet/if_ether.h>
#include <netatalk/at.h>
@@ -338,12 +333,6 @@ looutput(ifp, m, dst, rt)
isr = NETISR_IPX;
break;
#endif
-#ifdef ISO
- case AF_ISO:
- ifq = &clnlintrq;
- isr = NETISR_ISO;
- break;
-#endif
#ifdef NETATALK
case AF_APPLETALK:
ifq = &atintrq2;
@@ -418,12 +407,6 @@ lo_altqstart(ifp)
isr = NETISR_NS;
break;
#endif
-#ifdef ISO
- case AF_ISO:
- ifq = &clnlintrq;
- isr = NETISR_ISO;
- break;
-#endif
#ifdef NETATALK
case AF_APPLETALK:
ifq = &atintrq2;
@@ -483,7 +466,7 @@ loioctl(ifp, cmd, data)
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP | IFF_RUNNING;
ifa = (struct ifaddr *)data;
- if (ifa != 0 /*&& ifa->ifa_addr->sa_family == AF_ISO*/)
+ if (ifa != 0)
ifa->ifa_rtrequest = lortrequest;
/*
* Everything else is done at a higher level.
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index a6c1d48dd20..44e9b912818 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_spppsubr.c,v 1.23 2004/06/24 19:35:25 tholo Exp $ */
+/* $OpenBSD: if_spppsubr.c,v 1.24 2004/07/16 15:01:09 henning Exp $ */
/*
* Synchronous PPP/Cisco link level subroutines.
* Keepalive protocol implemented in both Cisco and PPP modes.
@@ -104,13 +104,6 @@
#include <netns/ns_if.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 <net/if_sppp.h>
#if defined (__FreeBSD__)
@@ -562,15 +555,6 @@ sppp_input(struct ifnet *ifp, struct mbuf *m)
}
break;
#endif
-#ifdef ISO
- case PPP_ISO:
- /* OSI NLCP not implemented yet */
- if (sp->pp_phase == PHASE_NETWORK) {
- schednetisr (NETISR_ISO);
- inq = &clnlintrq;
- }
- break;
-#endif
}
break;
case CISCO_MULTICAST:
@@ -776,14 +760,6 @@ sppp_output(struct ifnet *ifp, struct mbuf *m,
ETHERTYPE_IPX : PPP_IPX);
break;
#endif
-#ifdef ISO
- case AF_ISO: /* ISO OSI Protocol */
- if (sp->pp_flags & PP_CISCO)
- goto nosupport;
- h->protocol = htons (PPP_ISO);
- break;
-nosupport:
-#endif
default:
m_freem (m);
++ifp->if_oerrors;
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:
{
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index 18494fdf1fc..7f9b8217d39 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tun.c,v 1.60 2004/06/25 04:09:03 claudio Exp $ */
+/* $OpenBSD: if_tun.c,v 1.61 2004/07/16 15:01:09 henning Exp $ */
/* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */
/*
@@ -86,11 +86,6 @@
#include <netatalk/at_var.h>
#endif
-#ifdef ISO
-#include <netiso/iso.h>
-#include <netiso/iso_var.h>
-#endif
-
#include "bpfilter.h"
#if NBPFILTER > 0
#include <net/bpf.h>
@@ -945,12 +940,6 @@ tunwrite(dev, uio, ioflag)
isr = NETISR_ATALK;
break;
#endif
-#ifdef ISO
- case AF_ISO:
- ifq = &clnlintrq;
- isr = NETISR_ISO;
- break;
-#endif
default:
m_freem(top);
return EAFNOSUPPORT;