FreeBSD/sys/netinet6/in6_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
im6f_reap(struct in6_mfilter *imf)
{
	struct ip6_msource	*ims, *tims;
	struct in6_msource	*lims;
	RB_FOREACH_SAFE(ims, ip6_msource_tree, &imf->im6f_sources, tims) {
		lims = (struct in6_msource *)ims;
		if ((lims->im6sl_st[0] == MCAST_UNDEFINED) &&
		    (lims->im6sl_st[1] == MCAST_UNDEFINED)) {
			CTR2(KTR_MLD, "%s: free lims %p", __func__, ims);
			RB_REMOVE(ip6_msource_tree, &imf->im6f_sources, ims);
			free(ims, M_IN6MFILTER);
			imf->im6f_nsrc--;
		}
	}
}
static void im6f_reap ( struct in6_mfilter * imf ) { struct ip6_msource * ims , * tims ; struct in6_msource * lims ; RB_FOREACH_SAFE ( ims , ip6_msource_tree , & imf -> im6f_sources , tims ) { lims = ( struct in6_msource * ) ims ; if ( ( lims -> im6sl_st [ 0 ] == MCAST_UNDEFINED ) && ( lims -> im6sl_st [ 1 ] == MCAST_UNDEFINED ) ) { CTR2 ( KTR_MLD , " " , __func__ , ims ) ; RB_REMOVE ( ip6_msource_tree , & imf -> im6f_sources , ims ) ; free ( ims , M_IN6MFILTER ) ; imf -> im6f_nsrc -- ; } } }
Reap unreferenced sources from socket-layer filter set.
Reap unreferenced sources from socket - layer filter set .