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

Function im6o_match_group

freebsd/netinet6/in6_mcast.c:258–279  ·  view source on GitHub ↗

* Find an IPv6 multicast group entry for this ip6_moptions instance * which matches the specified group, and optionally an interface. * Return its index into the array, or -1 if not found. */

Source from the content-addressed store, hash-verified

256 * Return its index into the array, or -1 if not found.
257 */
258static struct in6_mfilter *
259im6o_match_group(const struct ip6_moptions *imo, const struct ifnet *ifp,
260 const struct sockaddr *group)
261{
262 const struct sockaddr_in6 *gsin6;
263 struct in6_mfilter *imf;
264 struct in6_multi *inm;
265
266 gsin6 = (const struct sockaddr_in6 *)group;
267
268 IP6_MFILTER_FOREACH(imf, &imo->im6o_head) {
269 inm = imf->im6f_in6m;
270 if (inm == NULL)
271 continue;
272 if ((ifp == NULL || (inm->in6m_ifp == ifp)) &&
273 IN6_ARE_ADDR_EQUAL(&inm->in6m_addr,
274 &gsin6->sin6_addr)) {
275 break;
276 }
277 }
278 return (imf);
279}
280
281/*
282 * Find an IPv6 multicast source entry for this imo which matches

Callers 6

im6o_mc_filterFunction · 0.85
in6p_get_source_filtersFunction · 0.85
in6p_join_groupFunction · 0.85
in6p_leave_groupFunction · 0.85
in6p_set_source_filtersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected