FreeBSD/sys/netinet/in_mcast.c
/*
 * Purge socket-layer filter set.
 */
Purge socket-layer filter set.
Purge socket - layer filter set .
static void
imf_purge(struct in_mfilter *imf)
{
	struct ip_msource	*ims, *tims;
	RB_FOREACH_SAFE(ims, ip_msource_tree, &imf->imf_sources, tims) {
		CTR2(KTR_IGMPV3, "%s: free ims %p", __func__, ims);
		RB_REMOVE(ip_msource_tree, &imf->imf_sources, ims);
		free(ims, M_INMFILTER);
		imf->imf_nsrc--;
	}
	imf->imf_st[0] = imf->imf_st[1] = MCAST_UNDEFINED;
	KASSERT(RB_EMPTY(&imf->imf_sources),
	    ("%s: imf_sources not empty", __func__));
}
static void imf_purge ( struct in_mfilter * imf ) { struct ip_msource * ims , * tims ; RB_FOREACH_SAFE ( ims , ip_msource_tree , & imf -> imf_sources , tims ) { CTR2 ( KTR_IGMPV3 , " " , __func__ , ims ) ; RB_REMOVE ( ip_msource_tree , & imf -> imf_sources , ims ) ; free ( ims , M_INMFILTER ) ; imf -> imf_nsrc -- ; } imf -> imf_st [ 0 ] = imf -> imf_st [ 1 ] = MCAST_UNDEFINED ; KASSERT ( RB_EMPTY ( & imf -> imf_sources ) , ( " " , __func__ ) ) ; }
Purge socket-layer filter set.
Purge socket - layer filter set .