xnu-4903.241.1/bsd/netinet6/in6_mcast.c
/*
 * Prune a source entry from an existing socket-layer filter set,
 * maintaining any required invariants and checking allocations.
 *
 * The source is marked as being left at t1, it is not freed.
 *
 * Return 0 if no error occurred, otherwise return an errno value.
 *
 * Caller is expected to be holding im6o_lock.
 */
Prune a source entry from an existing socket-layer filter set,
maintaining any required invariants and checking allocations.

The source is marked as being left at t1, it is not freed.

Return 0 if no error occurred, otherwise return an errno value.

Caller is expected to be holding im6o_lock.
Prune a source entry from an existing socket - layer filter set maintaining any required invariants and checking allocations . The source is marked as being left at t1 it is not freed . Return 0 if no error occurred otherwise return an errno value . Caller is expected to be holding im6o_lock .
static int
im6f_prune(struct in6_mfilter *imf, const struct sockaddr_in6 *psin)
{
	struct ip6_msource	 find;
	struct ip6_msource	*ims;
	struct in6_msource	*lims;
	find.im6s_addr = psin->sin6_addr;
	ims = RB_FIND(ip6_msource_tree, &imf->im6f_sources, &find);
	if (ims == NULL)
		return (ENOENT);
	lims = (struct in6_msource *)ims;
	lims->im6sl_st[1] = MCAST_UNDEFINED;
	return (0);
}
static int im6f_prune ( struct in6_mfilter * imf , const struct sockaddr_in6 * psin ) { struct ip6_msource find ; struct ip6_msource * ims ; struct in6_msource * lims ; find . im6s_addr = psin -> sin6_addr ; ims = RB_FIND ( ip6_msource_tree , & imf -> im6f_sources , & find ) ; if ( ims == NULL ) return ( ENOENT ) ; lims = ( struct in6_msource * ) ims ; lims -> im6sl_st [ 1 ] = MCAST_UNDEFINED ; return ( 0 ) ; }
Prune a source entry from an existing socket-layer filter set,
 maintaining any required invariants and checking allocations.
Prune a source entry from an existing socket - layer filter set maintaining any required invariants and checking allocations .