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

Function imo_match_source

freebsd/netinet/in_mcast.c:444–459  ·  view source on GitHub ↗

* Find an IPv4 multicast source entry for this imo which matches * the given group index for this socket, and source address. * * NOTE: This does not check if the entry is in-mode, merely if * it exists, which may not be the desired behaviour. */

Source from the content-addressed store, hash-verified

442 * it exists, which may not be the desired behaviour.
443 */
444static struct in_msource *
445imo_match_source(struct in_mfilter *imf, const struct sockaddr *src)
446{
447 struct ip_msource find;
448 struct ip_msource *ims;
449 const sockunion_t *psa;
450
451 KASSERT(src->sa_family == AF_INET, ("%s: !AF_INET", __func__));
452
453 /* Source trees are keyed in host byte order. */
454 psa = (const sockunion_t *)src;
455 find.ims_haddr = ntohl(psa->sin.sin_addr.s_addr);
456 ims = RB_FIND(ip_msource_tree, &imf->imf_sources, &find);
457
458 return ((struct in_msource *)ims);
459}
460
461/*
462 * Perform filtering for multicast datagrams on a socket by group and source.

Callers 4

imo_multi_filterFunction · 0.85
inp_block_unblock_sourceFunction · 0.85
inp_join_groupFunction · 0.85
inp_leave_groupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected