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

Function imf_prune

freebsd/netinet/in_mcast.c:824–839  ·  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

822 * Return 0 if no error occurred, otherwise return an errno value.
823 */
824static int
825imf_prune(struct in_mfilter *imf, const struct sockaddr_in *psin)
826{
827 struct ip_msource find;
828 struct ip_msource *ims;
829 struct in_msource *lims;
830
831 /* key is host byte order */
832 find.ims_haddr = ntohl(psin->sin_addr.s_addr);
833 ims = RB_FIND(ip_msource_tree, &imf->imf_sources, &find);
834 if (ims == NULL)
835 return (ENOENT);
836 lims = (struct in_msource *)ims;
837 lims->imsl_st[1] = MCAST_UNDEFINED;
838 return (0);
839}
840
841/*
842 * Revert socket-layer filter set deltas at t1 to t0 state.

Callers 2

inp_block_unblock_sourceFunction · 0.85
inp_leave_groupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected