summaryrefslogtreecommitdiffstats
path: root/usr.sbin/arp
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1999-03-10 10:11:43 +0000
committerjulian <julian@FreeBSD.org>1999-03-10 10:11:43 +0000
commit6eb9a9adf91724bc8f8bb0516ce6bc9f52b58d95 (patch)
tree48c43f547b4c8f1730068ca134d2818794a2739c /usr.sbin/arp
parent2ccd8bee025601450845f03de07e4614bb9468ea (diff)
downloadFreeBSD-src-6eb9a9adf91724bc8f8bb0516ce6bc9f52b58d95.zip
FreeBSD-src-6eb9a9adf91724bc8f8bb0516ce6bc9f52b58d95.tar.gz
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.
Diffstat (limited to 'usr.sbin/arp')
-rw-r--r--usr.sbin/arp/arp.c19
1 files changed, 18 insertions, 1 deletions
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");
+
}
/*
OpenPOWER on IntegriCloud