FreeBSD/sys/netinet6/in6_mcast.c
/*
 * Purge socket-layer filter set.
 */
Purge socket-layer filter set.
Purge socket - layer filter set .
static void
im6f_purge(struct in6_mfilter *imf)
{
	struct ip6_msource	*ims, *tims;
	RB_FOREACH_SAFE(ims, ip6_msource_tree, &imf->im6f_sources, tims) {
		CTR2(KTR_MLD, "%s: free ims %p", __func__, ims);
		RB_REMOVE(ip6_msource_tree, &imf->im6f_sources, ims);
		free(ims, M_IN6MFILTER);
		imf->im6f_nsrc--;
	}
	imf->im6f_st[0] = imf->im6f_st[1] = MCAST_UNDEFINED;
	KASSERT(RB_EMPTY(&imf->im6f_sources),
	    ("%s: im6f_sources not empty", __func__));
}
static void im6f_purge ( struct in6_mfilter * imf ) { struct ip6_msource * ims , * tims ; RB_FOREACH_SAFE ( ims , ip6_msource_tree , & imf -> im6f_sources , tims ) { CTR2 ( KTR_MLD , " " , __func__ , ims ) ; RB_REMOVE ( ip6_msource_tree , & imf -> im6f_sources , ims ) ; free ( ims , M_IN6MFILTER ) ; imf -> im6f_nsrc -- ; } imf -> im6f_st [ 0 ] = imf -> im6f_st [ 1 ] = MCAST_UNDEFINED ; KASSERT ( RB_EMPTY ( & imf -> im6f_sources ) , ( " " , __func__ ) ) ; }
Purge socket-layer filter set.
Purge socket - layer filter set .