MCPcopy Create free account
hub / github.com/F-Stack/f-stack / im6f_prune

Function im6f_prune

freebsd/netinet6/in6_mcast.c:793–807  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

791 * Return 0 if no error occurred, otherwise return an errno value.
792 */
793static int
794im6f_prune(struct in6_mfilter *imf, const struct sockaddr_in6 *psin)
795{
796 struct ip6_msource find;
797 struct ip6_msource *ims;
798 struct in6_msource *lims;
799
800 find.im6s_addr = psin->sin6_addr;
801 ims = RB_FIND(ip6_msource_tree, &imf->im6f_sources, &find);
802 if (ims == NULL)
803 return (ENOENT);
804 lims = (struct in6_msource *)ims;
805 lims->im6sl_st[1] = MCAST_UNDEFINED;
806 return (0);
807}
808
809/*
810 * Revert socket-layer filter set deltas at t1 to t0 state.

Callers 2

in6p_leave_groupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected