summaryrefslogtreecommitdiff
path: root/usr.sbin/ifmcstat/ifmcstat.c
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2013-01-03 22:27:57 +0000
committerHiroki Sato <hrs@FreeBSD.org>2013-01-03 22:27:57 +0000
commite0418c03e741083b6ef8e6ebaf05b07787e31150 (patch)
treedcd770886339c8c8a52c80297d5f2b1c7da755ca /usr.sbin/ifmcstat/ifmcstat.c
parent8ac5ae563b4dfe5250998253a340d97a9818ca19 (diff)
downloadsrc-test2-e0418c03e741083b6ef8e6ebaf05b07787e31150.tar.gz
src-test2-e0418c03e741083b6ef8e6ebaf05b07787e31150.zip
Notes
Diffstat (limited to 'usr.sbin/ifmcstat/ifmcstat.c')
-rw-r--r--usr.sbin/ifmcstat/ifmcstat.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/usr.sbin/ifmcstat/ifmcstat.c b/usr.sbin/ifmcstat/ifmcstat.c
index 9f5868036b9d..599e8503896a 100644
--- a/usr.sbin/ifmcstat/ifmcstat.c
+++ b/usr.sbin/ifmcstat/ifmcstat.c
@@ -296,7 +296,8 @@ in_ifinfo(struct igmp_ifinfo *igi)
printf("igmpv?(%d)", igi->igi_version);
break;
}
- printb(" flags", igi->igi_flags, "\020\1SILENT\2LOOPBACK");
+ if (igi->igi_flags)
+ printb(" flags", igi->igi_flags, "\020\1SILENT\2LOOPBACK");
if (igi->igi_version == IGMP_VERSION_3) {
printf(" rv %u qi %u qri %u uri %u",
igi->igi_rv, igi->igi_qi, igi->igi_qri, igi->igi_uri);
@@ -752,7 +753,8 @@ in6_ifinfo(struct mld_ifinfo *mli)
printf("mldv?(%d)", mli->mli_version);
break;
}
- printb(" flags", mli->mli_flags, "\020\1SILENT\2USEALLOW");
+ if (mli->mli_flags)
+ printb(" flags", mli->mli_flags, "\020\1SILENT\2USEALLOW");
if (mli->mli_version == MLD_VERSION_2) {
printf(" rv %u qi %u qri %u uri %u",
mli->mli_rv, mli->mli_qi, mli->mli_qri, mli->mli_uri);
@@ -1129,7 +1131,14 @@ ifmcstat_getifmaddrs(void)
break;
}
- fprintf(stdout, "\t%s %s\n", pafname, addrbuf);
+ fprintf(stdout, "\t%s %s", pafname, addrbuf);
+#ifdef INET6
+ if (pifasa->sa.sa_family == AF_INET6 &&
+ pifasa->sin6.sin6_scope_id)
+ fprintf(stdout, " scopeid 0x%x",
+ pifasa->sin6.sin6_scope_id);
+#endif
+ fprintf(stdout, "\n");
#ifdef INET
/*
* Print per-link IGMP information, if available.
@@ -1202,6 +1211,12 @@ next_ifnet:
}
fprintf(stdout, "\t\tgroup %s", addrbuf);
+#ifdef INET6
+ if (pgsa->sa.sa_family == AF_INET6 &&
+ pgsa->sin6.sin6_scope_id)
+ fprintf(stdout, " scopeid 0x%x",
+ pgsa->sin6.sin6_scope_id);
+#endif
#ifdef INET
if (pgsa->sa.sa_family == AF_INET) {
inm_print_sources_sysctl(thisifindex,