Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/netstat print IPv6 multicast group on -ia (-iav will...
details: https://anonhg.NetBSD.org/src/rev/86ea7fc8d32c
branches: trunk
changeset: 480686:86ea7fc8d32c
user: itojun <itojun%NetBSD.org@localhost>
date: Mon Jan 17 18:24:37 2000 +0000
description:
print IPv6 multicast group on -ia (-iav will avoid truncation)
diffstat:
usr.bin/netstat/if.c | 27 +++++++++++++++++++++++++--
1 files changed, 25 insertions(+), 2 deletions(-)
diffs (48 lines):
diff -r b9620db6517a -r 86ea7fc8d32c usr.bin/netstat/if.c
--- a/usr.bin/netstat/if.c Mon Jan 17 18:03:51 2000 +0000
+++ b/usr.bin/netstat/if.c Mon Jan 17 18:24:37 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.c,v 1.34 1999/12/13 15:22:55 itojun Exp $ */
+/* $NetBSD: if.c,v 1.35 2000/01/17 18:24:37 itojun Exp $ */
/*
* Copyright (c) 1983, 1988, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "from: @(#)if.c 8.2 (Berkeley) 2/21/94";
#else
-__RCSID("$NetBSD: if.c,v 1.34 1999/12/13 15:22:55 itojun Exp $");
+__RCSID("$NetBSD: if.c,v 1.35 2000/01/17 18:24:37 itojun Exp $");
#endif
#endif /* not lint */
@@ -261,6 +261,29 @@
else
n = 17;
printf("%-*.*s ", n, n, cp);
+ if (aflag) {
+ u_long multiaddr;
+ struct in6_multi inm;
+
+ multiaddr = (u_long)
+ ifaddr.in6.ia6_multiaddrs.lh_first;
+ while (multiaddr != 0) {
+ kread(multiaddr, (char *)&inm,
+ sizeof inm);
+ inet_ntop(AF_INET6, &inm.in6m_addr,
+ hbuf, sizeof(hbuf));
+ cp = hbuf;
+ if (vflag)
+ n = strlen(cp) < 17
+ ? 17 : strlen(cp);
+ else
+ n = 17;
+ printf("\n%25s %-*.*s ", "",
+ n, n, cp);
+ multiaddr =
+ (u_long)inm.in6m_entry.le_next;
+ }
+ }
break;
#endif /*INET6*/
#ifndef SMALL
Home |
Main Index |
Thread Index |
Old Index