Print out IEEE1394 addresses with : . Add a hack to limit the address

to 8 bytes.
This commit is contained in:
matt 2000-11-14 23:00:57 +00:00
parent 990d23039d
commit b6e8f357a2
1 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if.c,v 1.45 2000/10/11 14:46:14 is Exp $ */ /* $NetBSD: if.c,v 1.46 2000/11/14 23:00:57 matt Exp $ */
/* /*
* Copyright (c) 1983, 1988, 1993 * Copyright (c) 1983, 1988, 1993
@ -38,7 +38,7 @@
#if 0 #if 0
static char sccsid[] = "from: @(#)if.c 8.2 (Berkeley) 2/21/94"; static char sccsid[] = "from: @(#)if.c 8.2 (Berkeley) 2/21/94";
#else #else
__RCSID("$NetBSD: if.c,v 1.45 2000/10/11 14:46:14 is Exp $"); __RCSID("$NetBSD: if.c,v 1.46 2000/11/14 23:00:57 matt Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -340,9 +340,13 @@ intpr(interval, ifnetaddr, pfunc)
(struct sockaddr_dl *)sa; (struct sockaddr_dl *)sa;
cp = (char *)LLADDR(sdl); cp = (char *)LLADDR(sdl);
if (sdl->sdl_type == IFT_FDDI if (sdl->sdl_type == IFT_FDDI
|| sdl->sdl_type == IFT_ETHER) || sdl->sdl_type == IFT_ETHER
|| sdl->sdl_type == IFT_IEEE1394)
hexsep = ':'; hexsep = ':';
n = sdl->sdl_alen; n = sdl->sdl_alen;
if (sdl->sdl_type == IFT_IEEE1394
&& sdl->sdl_len > 8)
n = 8; /* XXX */
} }
m = printf("%-13.13s ", "<Link>"); m = printf("%-13.13s ", "<Link>");
goto hexprint; goto hexprint;