FreeBSD/sys/netinet/in_mcast.c
/*
 * Reap unreferenced nodes from an in_multi's filter set.
 */
Reap unreferenced nodes from an in_multi's filter set.
Reap unreferenced nodes from an in_multi ' s filter set .
static void
inm_reap(struct in_multi *inm)
{
	struct ip_msource	*ims, *tims;
	RB_FOREACH_SAFE(ims, ip_msource_tree, &inm->inm_srcs, tims) {
		if (ims->ims_st[0].ex > 0 || ims->ims_st[0].in > 0 ||
		    ims->ims_st[1].ex > 0 || ims->ims_st[1].in > 0 ||
		    ims->ims_stp != 0)
			continue;
		CTR2(KTR_IGMPV3, "%s: free ims %p", __func__, ims);
		RB_REMOVE(ip_msource_tree, &inm->inm_srcs, ims);
		free(ims, M_IPMSOURCE);
		inm->inm_nsrc--;
	}
}
static void inm_reap ( struct in_multi * inm ) { struct ip_msource * ims , * tims ; RB_FOREACH_SAFE ( ims , ip_msource_tree , & inm -> inm_srcs , tims ) { if ( ims -> ims_st [ 0 ] . ex > 0 || ims -> ims_st [ 0 ] . in > 0 || ims -> ims_st [ 1 ] . ex > 0 || ims -> ims_st [ 1 ] . in > 0 || ims -> ims_stp != 0 ) continue ; CTR2 ( KTR_IGMPV3 , " " , __func__ , ims ) ; RB_REMOVE ( ip_msource_tree , & inm -> inm_srcs , ims ) ; free ( ims , M_IPMSOURCE ) ; inm -> inm_nsrc -- ; } }
Reap unreferenced nodes from an in_multi's filter set.
Reap unreferenced nodes from an in_multi ' s filter set .