diff options
author | Hiroki Sato <hrs@FreeBSD.org> | 2013-01-03 22:27:57 +0000 |
---|---|---|
committer | Hiroki Sato <hrs@FreeBSD.org> | 2013-01-03 22:27:57 +0000 |
commit | e0418c03e741083b6ef8e6ebaf05b07787e31150 (patch) | |
tree | dcd770886339c8c8a52c80297d5f2b1c7da755ca /usr.sbin/ifmcstat/ifmcstat.c | |
parent | 8ac5ae563b4dfe5250998253a340d97a9818ca19 (diff) | |
download | src-test2-e0418c03e741083b6ef8e6ebaf05b07787e31150.tar.gz src-test2-e0418c03e741083b6ef8e6ebaf05b07787e31150.zip |
Notes
Diffstat (limited to 'usr.sbin/ifmcstat/ifmcstat.c')
-rw-r--r-- | usr.sbin/ifmcstat/ifmcstat.c | 21 |
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, |