FreeBSD/sys/netinet6/mld6.c
/*
 * Attach MLD when PF_INET6 is attached to an interface.
 *
 * SMPng: Normally called with IF_AFDATA_LOCK held.
 */
Attach MLD when PF_INET6 is attached to an interface.
Attach MLD when PF_INET6 is attached to an interface .
struct mld_ifsoftc *
mld_domifattach(struct ifnet *ifp)
{
	struct mld_ifsoftc *mli;
	CTR3(KTR_MLD, "%s: called for ifp %p(%s)",
	    __func__, ifp, if_name(ifp));
	MLD_LOCK();
	mli = mli_alloc_locked(ifp);
	if (!(ifp->if_flags & IFF_MULTICAST))
		mli->mli_flags |= MLIF_SILENT;
	if (mld_use_allow)
		mli->mli_flags |= MLIF_USEALLOW;
	MLD_UNLOCK();
	return (mli);
}
struct mld_ifsoftc * mld_domifattach ( struct ifnet * ifp ) { struct mld_ifsoftc * mli ; CTR3 ( KTR_MLD , " " , __func__ , ifp , if_name ( ifp ) ) ; MLD_LOCK ( ) ; mli = mli_alloc_locked ( ifp ) ; if ( ! ( ifp -> if_flags & IFF_MULTICAST ) ) mli -> mli_flags |= MLIF_SILENT ; if ( mld_use_allow ) mli -> mli_flags |= MLIF_USEALLOW ; MLD_UNLOCK ( ) ; return ( mli ) ; }
Attach MLD when PF_INET6 is attached to an interface.
Attach MLD when PF_INET6 is attached to an interface .