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

Function igi_delete_locked

freebsd/netinet/igmp.c:725–747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

723}
724
725static void
726igi_delete_locked(const struct ifnet *ifp)
727{
728 struct igmp_ifsoftc *igi, *tigi;
729
730 CTR3(KTR_IGMPV3, "%s: freeing igmp_ifsoftc for ifp %p(%s)",
731 __func__, ifp, ifp->if_xname);
732
733 IGMP_LOCK_ASSERT();
734
735 LIST_FOREACH_SAFE(igi, &V_igi_head, igi_link, tigi) {
736 if (igi->igi_ifp == ifp) {
737 /*
738 * Free deferred General Query responses.
739 */
740 mbufq_drain(&igi->igi_gq);
741
742 LIST_REMOVE(igi, igi_link);
743 free(igi, M_IGMP);
744 return;
745 }
746 }
747}
748
749/*
750 * Process a received IGMPv1 query.

Callers 1

igmp_domifdetachFunction · 0.85

Calls 2

mbufq_drainFunction · 0.50
freeFunction · 0.50

Tested by

no test coverage detected