=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/netstat/if.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- src/usr.bin/netstat/if.c 1998/02/27 12:07:32 1.17 +++ src/usr.bin/netstat/if.c 1999/12/08 12:30:17 1.18 @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.17 1998/02/27 12:07:32 deraadt Exp $ */ +/* $OpenBSD: if.c,v 1.18 1999/12/08 12:30:17 itojun Exp $ */ /* $NetBSD: if.c,v 1.16.4.2 1996/06/07 21:46:46 thorpej Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "from: @(#)if.c 8.2 (Berkeley) 2/21/94"; #else -static char *rcsid = "$OpenBSD: if.c,v 1.17 1998/02/27 12:07:32 deraadt Exp $"; +static char *rcsid = "$OpenBSD: if.c,v 1.18 1999/12/08 12:30:17 itojun Exp $"; #endif #endif /* not lint */ @@ -88,6 +88,9 @@ union { struct ifaddr ifa; struct in_ifaddr in; +#ifdef INET6 + struct in6_ifaddr in6; +#endif struct ns_ifaddr ns; struct ipx_ifaddr ipx; struct iso_ifaddr iso; @@ -127,6 +130,9 @@ ifaddraddr = 0; while (ifnetaddr || ifaddraddr) { struct sockaddr_in *sin; +#ifdef INET6 + struct sockaddr_in6 *sin6; +#endif register char *cp; int n, m; @@ -193,6 +199,15 @@ } } break; +#ifdef INET6 + case AF_INET6: + sin6 = (struct sockaddr_in6 *)sa; + printf("%-11.11s ", + netname6(&ifaddr.in6.ia_addr, + &ifaddr.in6.ia_prefixmask.sin6_addr)); + printf("%-17.17s ", routename6(sin6)); + break; +#endif case AF_IPX: { struct sockaddr_ipx *sipx =