MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mld_domifattach

Function mld_domifattach

freebsd/netinet6/mld6.c:477–496  ·  view source on GitHub ↗

* Attach MLD when PF_INET6 is attached to an interface. * * SMPng: Normally called with IF_AFDATA_LOCK held. */

Source from the content-addressed store, hash-verified

475 * SMPng: Normally called with IF_AFDATA_LOCK held.
476 */
477struct mld_ifsoftc *
478mld_domifattach(struct ifnet *ifp)
479{
480 struct mld_ifsoftc *mli;
481
482 CTR3(KTR_MLD, "%s: called for ifp %p(%s)",
483 __func__, ifp, if_name(ifp));
484
485 MLD_LOCK();
486
487 mli = mli_alloc_locked(ifp);
488 if (!(ifp->if_flags & IFF_MULTICAST))
489 mli->mli_flags |= MLIF_SILENT;
490 if (mld_use_allow)
491 mli->mli_flags |= MLIF_USEALLOW;
492
493 MLD_UNLOCK();
494
495 return (mli);
496}
497
498/*
499 * VIMAGE: assume curvnet set by caller.

Callers 1

in6_domifattachFunction · 0.85

Calls 1

mli_alloc_lockedFunction · 0.85

Tested by

no test coverage detected