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

Function im6o_match_source

freebsd/netinet6/in6_mcast.c:292–307  ·  view source on GitHub ↗

* Find an IPv6 multicast source entry for this imo which matches * the given group index for this socket, and source address. * * XXX TODO: The scope ID, if present in src, is stripped before * any comparison. We SHOULD enforce scope/zone checks where the source * filter entry has a link scope. * * NOTE: This does not check if the entry is in-mode, merely if * it exists, which may not be t

Source from the content-addressed store, hash-verified

290 * it exists, which may not be the desired behaviour.
291 */
292static struct in6_msource *
293im6o_match_source(struct in6_mfilter *imf, const struct sockaddr *src)
294{
295 struct ip6_msource find;
296 struct ip6_msource *ims;
297 const sockunion_t *psa;
298
299 KASSERT(src->sa_family == AF_INET6, ("%s: !AF_INET6", __func__));
300
301 psa = (const sockunion_t *)src;
302 find.im6s_addr = psa->sin6.sin6_addr;
303 in6_clearscope(&find.im6s_addr); /* XXX */
304 ims = RB_FIND(ip6_msource_tree, &imf->im6f_sources, &find);
305
306 return ((struct in6_msource *)ims);
307}
308
309/*
310 * Perform filtering for multicast datagrams on a socket by group and source.

Callers 4

im6o_mc_filterFunction · 0.85
in6p_join_groupFunction · 0.85
in6p_leave_groupFunction · 0.85

Calls 1

in6_clearscopeFunction · 0.85

Tested by

no test coverage detected