diff options
author | maxim <maxim@FreeBSD.org> | 2012-01-27 17:16:44 +0000 |
---|---|---|
committer | maxim <maxim@FreeBSD.org> | 2012-01-27 17:16:44 +0000 |
commit | 50a8e72cd9d9b53bd71ff571a225243e421c2f6f (patch) | |
tree | 87f242c31e0e7cc7ac67e092044bec6ad6e95b5d /usr.sbin/ifmcstat/ifmcstat.c | |
parent | 54939631d76ff9a99d2a1a546cce2f919c198737 (diff) | |
download | FreeBSD-src-50a8e72cd9d9b53bd71ff571a225243e421c2f6f.zip FreeBSD-src-50a8e72cd9d9b53bd71ff571a225243e421c2f6f.tar.gz |
o in6_ifinfo() does not do any kvm(3) operations, so
do not guard it by WITH_KVM ifdef. This allows to build
ifmcstat(8) without kvm(3) support.
PR: bin/164353
Submitted by: Ivan Rozhuk
MFC after: 2 weeks
Diffstat (limited to 'usr.sbin/ifmcstat/ifmcstat.c')
-rw-r--r-- | usr.sbin/ifmcstat/ifmcstat.c | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/usr.sbin/ifmcstat/ifmcstat.c b/usr.sbin/ifmcstat/ifmcstat.c index 139058c..d92c056 100644 --- a/usr.sbin/ifmcstat/ifmcstat.c +++ b/usr.sbin/ifmcstat/ifmcstat.c @@ -441,32 +441,6 @@ ll_addrlist(struct ifaddr *ifap) #ifdef INET6 static void -in6_ifinfo(struct mld_ifinfo *mli) -{ - - printf("\t"); - switch (mli->mli_version) { - case MLD_VERSION_1: - case MLD_VERSION_2: - printf("mldv%d", mli->mli_version); - break; - default: - printf("mldv?(%d)", mli->mli_version); - break; - } - printb(" flags", mli->mli_flags, "\020\1SILENT"); - 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); - } - if (vflag >= 2) { - printf(" v1timer %u v2timer %u", mli->mli_v1_timer, - mli->mli_v2_timer); - } - printf("\n"); -} - -static void if6_addrlist(struct ifaddr *ifap) { struct ifnet ifnet; @@ -763,6 +737,33 @@ in_multientry(struct in_multi *pinm) #endif /* WITH_KVM */ #ifdef INET6 + +static void +in6_ifinfo(struct mld_ifinfo *mli) +{ + + printf("\t"); + switch (mli->mli_version) { + case MLD_VERSION_1: + case MLD_VERSION_2: + printf("mldv%d", mli->mli_version); + break; + default: + printf("mldv?(%d)", mli->mli_version); + break; + } + printb(" flags", mli->mli_flags, "\020\1SILENT"); + 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); + } + if (vflag >= 2) { + printf(" v1timer %u v2timer %u", mli->mli_v1_timer, + mli->mli_v2_timer); + } + printf("\n"); +} + static const char * inet6_n2a(struct in6_addr *p) { |