summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1999-02-20 11:18:00 +0000
committerjulian <julian@FreeBSD.org>1999-02-20 11:18:00 +0000
commit16c8d9e8d0ca48475483b6c811b4af317c734ab0 (patch)
treee3e5ce3fffddfb7abb04759c7f4a6af8d76a18c1 /sys/netinet
parent0fd1dd9aabd45a0d145034aef2766eb2a88c1185 (diff)
downloadFreeBSD-src-16c8d9e8d0ca48475483b6c811b4af317c734ab0.zip
FreeBSD-src-16c8d9e8d0ca48475483b6c811b4af317c734ab0.tar.gz
World, I'd like you to meet the first FreeBSD token Ring driver.
This is for various Olicom cards. An IBM driver is following. This patch also adds support to tcpdump to decode packets on tokenring. Congratulations to the proud father.. (below) Submitted by: Larry Lile <lile@stdio.com>
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/if_ether.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index 382b5a4..5b634cd 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_ether.c 8.1 (Berkeley) 6/10/93
- * $Id: if_ether.c,v 1.52 1999/01/19 23:17:03 fenner Exp $
+ * $Id: if_ether.c,v 1.53 1999/02/16 10:49:51 dfr Exp $
*/
/*
@@ -55,6 +55,7 @@
#include <net/if.h>
#include <net/if_dl.h>
+#include <net/if_types.h>
#include <net/route.h>
#include <net/netisr.h>
@@ -297,7 +298,10 @@ arprequest(ac, sip, tip, enaddr)
bzero((caddr_t)ea, sizeof (*ea));
(void)memcpy(eh->ether_dhost, etherbroadcastaddr, sizeof(eh->ether_dhost));
eh->ether_type = htons(ETHERTYPE_ARP); /* if_output will not swap */
- ea->arp_hrd = htons(ARPHRD_ETHER);
+ if (ac->ac_if.if_type == IFT_ETHER)
+ ea->arp_hrd = htons(ARPHRD_ETHER);
+ if (ac->ac_if.if_type == IFT_ISO88025)
+ ea->arp_hrd = htons(ARPHRD_IEEE802);
ea->arp_pro = htons(ETHERTYPE_IP);
ea->arp_hln = sizeof(ea->arp_sha); /* hardware address length */
ea->arp_pln = sizeof(ea->arp_spa); /* protocol address length */
@@ -410,7 +414,8 @@ arpintr()
panic("arpintr");
if (m->m_len >= sizeof(struct arphdr) &&
(ar = mtod(m, struct arphdr *)) &&
- ntohs(ar->ar_hrd) == ARPHRD_ETHER &&
+ (ntohs(ar->ar_hrd) == ARPHRD_ETHER ||
+ ntohs(ar->ar_hrd) == ARPHRD_IEEE802) &&
m->m_len >=
sizeof(struct arphdr) + 2 * ar->ar_hln + 2 * ar->ar_pln)
OpenPOWER on IntegriCloud