FreeBSD/sys/netinet6/mld6.c
/*
 * Switch to a different version on the given interface,
 * as per Section 9.12.
 */
Switch to a different version on the given interface,
as per Section 9.12.
Switch to a different version on the given interface as per Section 9 . 12 .
static void
mld_set_version(struct mld_ifsoftc *mli, const int version)
{
	int old_version_timer;
	MLD_LOCK_ASSERT();
	CTR4(KTR_MLD, "%s: switching to v%d on ifp %p(%s)", __func__,
	    version, mli->mli_ifp, if_name(mli->mli_ifp));
	if (version == MLD_VERSION_1) {
		old_version_timer = (mli->mli_rv * mli->mli_qi) + mli->mli_qri;
		old_version_timer *= PR_SLOWHZ;
		mli->mli_v1_timer = old_version_timer;
	}
	if (mli->mli_v1_timer > 0 && mli->mli_version != MLD_VERSION_1) {
		mli->mli_version = MLD_VERSION_1;
		mld_v2_cancel_link_timers(mli);
	}
}
static void mld_set_version ( struct mld_ifsoftc * mli , const int version ) { int old_version_timer ; MLD_LOCK_ASSERT ( ) ; CTR4 ( KTR_MLD , " " , __func__ , version , mli -> mli_ifp , if_name ( mli -> mli_ifp ) ) ; if ( version == MLD_VERSION_1 ) { old_version_timer = ( mli -> mli_rv * mli -> mli_qi ) + mli -> mli_qri ; old_version_timer *= PR_SLOWHZ ; mli -> mli_v1_timer = old_version_timer ; } if ( mli -> mli_v1_timer > 0 && mli -> mli_version != MLD_VERSION_1 ) { mli -> mli_version = MLD_VERSION_1 ; mld_v2_cancel_link_timers ( mli ) ; } }
Switch to a different version on the given interface,
 as per Section 9.12.
Switch to a different version on the given interface as per Section 9 . 12 .
/*
		 * Compute the "Older Version Querier Present" timer as per
		 * Section 9.12.
		 */