summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2003-05-14 20:40:53 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2003-05-14 20:40:53 +0000
commit68e95c329f424201743883d529ef58a0b6cd8634 (patch)
treefdd541ba85bb37733c3d2a7ec2cb052a9f6d9ef4
parent7594b685ab9212f6847f6fdeacfcf835db7d503e (diff)
unifdef __FreeBSD__ and stuff. markus ok
-rw-r--r--sys/net/if_fddisubr.c37
1 files changed, 5 insertions, 32 deletions
diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c
index 5c210c2c084..ba47290217d 100644
--- a/sys/net/if_fddisubr.c
+++ b/sys/net/if_fddisubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_fddisubr.c,v 1.30 2003/01/07 09:00:33 kjc Exp $ */
+/* $OpenBSD: if_fddisubr.c,v 1.31 2003/05/14 20:40:52 itojun Exp $ */
/* $NetBSD: if_fddisubr.c,v 1.5 1996/05/07 23:20:21 christos Exp $ */
/*
@@ -103,11 +103,7 @@
#include <netinet/in_var.h>
#endif
#include <netinet/if_ether.h>
-#if defined(__FreeBSD__)
-#include <netinet/if_fddi.h>
-#else
#include <net/if_fddi.h>
-#endif
#ifdef IPX
#include <netipx/ipx.h>
@@ -156,15 +152,6 @@ extern struct ifqueue pkintrq;
#define llc_snap llc_un.type_snap
#endif
-#if defined(__bsdi__) || defined(__NetBSD__) || defined(__OpenBSD__)
-#define RTALLOC1(a, b) rtalloc1(a, b)
-#define ARPRESOLVE(a, b, c, d, e, f) arpresolve(a, b, c, d, e)
-#define TYPEHTONS(t) (t)
-#elif defined(__FreeBSD__)
-#define RTALLOC1(a, b) rtalloc1(a, b, 0UL)
-#define ARPRESOLVE(a, b, c, d, e, f) arpresolve(a, b, c, d, e, f)
-#define TYPEHTONS(t) (htons(t))
-#endif
/*
* FDDI output routine.
* Encapsulate a packet of type family for the local net.
@@ -191,7 +178,7 @@ fddi_output(ifp, m0, dst, rt0)
senderr(ENETDOWN);
if ((rt = rt0) != NULL) {
if ((rt->rt_flags & RTF_UP) == 0) {
- if ((rt0 = rt = RTALLOC1(dst, 1)) != NULL)
+ if ((rt0 = rt = rtalloc1(dst, 1)) != NULL)
rt->rt_refcnt--;
else
senderr(EHOSTUNREACH);
@@ -201,7 +188,7 @@ fddi_output(ifp, m0, dst, rt0)
goto lookup;
if (((rt = rt->rt_gwroute)->rt_flags & RTF_UP) == 0) {
rtfree(rt); rt = rt0;
- lookup: rt->rt_gwroute = RTALLOC1(rt->rt_gateway, 1);
+ lookup: rt->rt_gwroute = rtalloc1(rt->rt_gateway, 1);
if ((rt = rt->rt_gwroute) == 0)
senderr(EHOSTUNREACH);
}
@@ -216,7 +203,7 @@ fddi_output(ifp, m0, dst, rt0)
#ifdef INET
case AF_INET:
- if (!ARPRESOLVE(ac, rt, m, dst, edst, rt0))
+ if (!arpresolve(ac, rt, m, dst, edst))
return (0); /* if not yet resolved */
/* If broadcasting on a simplex interface, loopback a copy */
if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX))
@@ -311,15 +298,6 @@ fddi_output(ifp, m0, dst, rt0)
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("unoutput: sending pkt to: ");
- for (i=0; i<6; i++)
- printf("%x ", edst[i] & 0xff);
- printf("\n");
- ENDDEBUG
-#endif
} break;
#endif /* ISO */
#ifdef CCITT
@@ -378,7 +356,7 @@ fddi_output(ifp, m0, dst, rt0)
bcopy((caddr_t)eh->ether_dhost, (caddr_t)edst, sizeof (edst));
if (*edst & 1)
m->m_flags |= (M_BCAST|M_MCAST);
- type = TYPEHTONS(eh->ether_type);
+ type = eh->ether_type;
break;
}
@@ -588,11 +566,6 @@ fddi_input(ifp, fh, m)
if (m == 0)
return;
*mtod(m, struct fddi_header *) = *fh;
-#if defined(__FreeBSD__)
- IFDEBUG(D_ETHER)
- printf("clnp packet");
- ENDDEBUG
-#endif
schednetisr(NETISR_ISO);
inq = &clnlintrq;
break;