Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netiso don't check for ether_output, instead use if_type...
details: https://anonhg.NetBSD.org/src/rev/1f0c634811d7
branches: trunk
changeset: 471905:1f0c634811d7
user: chopps <chopps%NetBSD.org@localhost>
date: Wed Apr 14 16:26:42 1999 +0000
description:
don't check for ether_output, instead use if_type == IFT_ETHER
while we are here add IFT_FDDI support
diffstat:
sys/netiso/clnp_input.c | 26 +++++++++++++++++---------
sys/netiso/esis.c | 4 ++--
sys/netiso/iso.c | 5 +++--
3 files changed, 22 insertions(+), 13 deletions(-)
diffs (92 lines):
diff -r bde5aa2f22ca -r 1f0c634811d7 sys/netiso/clnp_input.c
--- a/sys/netiso/clnp_input.c Wed Apr 14 16:19:03 1999 +0000
+++ b/sys/netiso/clnp_input.c Wed Apr 14 16:26:42 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: clnp_input.c,v 1.17 1998/07/05 04:37:42 jonathan Exp $ */
+/* $NetBSD: clnp_input.c,v 1.18 1999/04/14 16:26:42 chopps Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -79,6 +79,7 @@
#include <net/route.h>
#include <net/if_ether.h>
+#include <net/if_fddi.h>
#include <netiso/iso.h>
#include <netiso/iso_var.h>
@@ -205,15 +206,22 @@
m->m_len -= EONIPLEN;
m->m_pkthdr.len -= EONIPLEN;
break;
-
+ case IFT_ETHER:
+ bcopy((caddr_t) (mtod(m, struct ether_header *)->ether_dhost),
+ (caddr_t) sh.snh_dhost, 2 * sizeof(sh.snh_dhost));
+ m->m_data += sizeof(struct ether_header);
+ m->m_len -= sizeof(struct ether_header);
+ m->m_pkthdr.len -= sizeof(struct ether_header);
+ break;
+ case IFT_FDDI:
+ bcopy((caddr_t) (mtod(m, struct fddi_header *)->fddi_dhost),
+ (caddr_t) sh.snh_dhost, 2 * sizeof(sh.snh_dhost));
+ m->m_data += sizeof(struct fddi_header);
+ m->m_len -= sizeof(struct fddi_header);
+ m->m_pkthdr.len -= sizeof(struct fddi_header);
+ break;
default:
- if (sh.snh_ifp->if_output == ether_output) {
- bcopy((caddr_t) (mtod(m, struct ether_header *)->ether_dhost),
- (caddr_t) sh.snh_dhost, 2 * sizeof(sh.snh_dhost));
- m->m_data += sizeof(struct ether_header);
- m->m_len -= sizeof(struct ether_header);
- m->m_pkthdr.len -= sizeof(struct ether_header);
- }
+ break;
}
#ifdef ARGO_DEBUG
if (argo_debug[D_INPUT]) {
diff -r bde5aa2f22ca -r 1f0c634811d7 sys/netiso/esis.c
--- a/sys/netiso/esis.c Wed Apr 14 16:19:03 1999 +0000
+++ b/sys/netiso/esis.c Wed Apr 14 16:26:42 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: esis.c,v 1.20 1998/07/05 04:37:42 jonathan Exp $ */
+/* $NetBSD: esis.c,v 1.21 1999/04/14 16:26:42 chopps Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -1149,7 +1149,7 @@
if (error) {
#ifdef ARGO_DEBUG
if (argo_debug[D_ISISOUTPUT]) {
- printf("isis_output: error from ether_output is %d\n",
+ printf("isis_output: error from if_output is %d\n",
error);
}
#endif
diff -r bde5aa2f22ca -r 1f0c634811d7 sys/netiso/iso.c
--- a/sys/netiso/iso.c Wed Apr 14 16:19:03 1999 +0000
+++ b/sys/netiso/iso.c Wed Apr 14 16:26:42 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iso.c,v 1.22 1999/04/01 06:51:48 chopps Exp $ */
+/* $NetBSD: iso.c,v 1.23 1999/04/14 16:26:42 chopps Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -77,6 +77,7 @@
#include <sys/proc.h>
#include <net/if.h>
+#include <net/if_types.h>
#include <net/route.h>
#include <netiso/iso.h>
@@ -633,7 +634,7 @@
* XXX -- The following is here temporarily out of laziness in not
* changing every ethernet driver's if_ioctl routine
*/
- if (ifp->if_output == ether_output) {
+ if (ifp->if_type == IFT_ETHER || ifp->if_type == IFT_FDDI) {
ia->ia_ifa.ifa_rtrequest = llc_rtrequest;
ia->ia_ifa.ifa_flags |= RTF_CLONING;
}
Home |
Main Index |
Thread Index |
Old Index