FreeBSD/sys/netinet/in_mcast.c
/*
 * Reap unreferenced sources from socket-layer filter set.
 */
Reap unreferenced sources from socket-layer filter set.
Reap unreferenced sources from socket - layer filter set .
static void
imf_reap(struct in_mfilter *imf)
{
	struct ip_msource	*ims, *tims;
	struct in_msource	*lims;
	RB_FOREACH_SAFE(ims, ip_msource_tree, &imf->imf_sources, tims) {
		lims = (struct in_msource *)ims;
		if ((lims->imsl_st[0] == MCAST_UNDEFINED) &&
		    (lims->imsl_st[1] == MCAST_UNDEFINED)) {
			CTR2(KTR_IGMPV3, "%s: free lims %p", __func__, ims);
			RB_REMOVE(ip_msource_tree, &imf->imf_sources, ims);
			free(ims, M_INMFILTER);
			imf->imf_nsrc--;
		}
	}
}
static void imf_reap ( struct in_mfilter * imf ) { struct ip_msource * ims , * tims ; struct in_msource * lims ; RB_FOREACH_SAFE ( ims , ip_msource_tree , & imf -> imf_sources , tims ) { lims = ( struct in_msource * ) ims ; if ( ( lims -> imsl_st [ 0 ] == MCAST_UNDEFINED ) && ( lims -> imsl_st [ 1 ] == MCAST_UNDEFINED ) ) { CTR2 ( KTR_IGMPV3 , " " , __func__ , ims ) ; RB_REMOVE ( ip_msource_tree , & imf -> imf_sources , ims ) ; free ( ims , M_INMFILTER ) ; imf -> imf_nsrc -- ; } } }
Reap unreferenced sources from socket-layer filter set.
Reap unreferenced sources from socket - layer filter set .