From 6eb9a9adf91724bc8f8bb0516ce6bc9f52b58d95 Mon Sep 17 00:00:00 2001 From: julian Date: Wed, 10 Mar 1999 10:11:43 +0000 Subject: Submitted by: Larry Lile Move the Olicom token ring driver to the officially sanctionned location of /sys/contrib. Also fix some brokenness in the generic token ring support. Be warned that if_dl.h has been changed and SOME programs might like recompilation. --- usr.sbin/arp/arp.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'usr.sbin/arp/arp.c') diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index 1ff232a..6326fb7 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -45,7 +45,7 @@ static char const copyright[] = static char const sccsid[] = "@(#)from: arp.c 8.2 (Berkeley) 1/2/94"; #endif static const char rcsid[] = - "$Id: arp.c,v 1.13 1997/11/13 01:16:57 julian Exp $"; + "$Id: arp.c,v 1.14 1998/01/16 17:38:51 bde Exp $"; #endif /* not lint */ /* @@ -469,6 +469,7 @@ print_entry(struct sockaddr_dl *sdl, char *host; extern int h_errno; struct hostent *hp; + int seg; if (nflag == 0) hp = gethostbyaddr((caddr_t)&(sin->sin_addr), @@ -499,7 +500,23 @@ print_entry(struct sockaddr_dl *sdl, if (sin->sin_len != 8) printf("(wierd)"); } + switch(sdl->sdl_type) { + case IFT_ETHER: + printf(" [ethernet]"); + break; + case IFT_ISO88025: + printf(" [token-ring]"); + break; + default: + } + if (sdl->sdl_rcf != NULL) { + printf(" rt=%x", ntohs(sdl->sdl_rcf)); + for (seg = 0; seg < ((((ntohs(sdl->sdl_rcf) & 0x1f00) >> 8) - 2 ) / 2); seg++) + printf(":%x", ntohs(sdl->sdl_route[seg])); + } + printf("\n"); + } /* -- cgit v1.1