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

Function imo_match_group

freebsd/netinet/in_mcast.c:415–435  ·  view source on GitHub ↗

* Find an IPv4 multicast group entry for this ip_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

413 * Return its index into the array, or -1 if not found.
414 */
415static struct in_mfilter *
416imo_match_group(const struct ip_moptions *imo, const struct ifnet *ifp,
417 const struct sockaddr *group)
418{
419 const struct sockaddr_in *gsin;
420 struct in_mfilter *imf;
421 struct in_multi *inm;
422
423 gsin = (const struct sockaddr_in *)group;
424
425 IP_MFILTER_FOREACH(imf, &imo->imo_head) {
426 inm = imf->imf_inm;
427 if (inm == NULL)
428 continue;
429 if ((ifp == NULL || (inm->inm_ifp == ifp)) &&
430 in_hosteq(inm->inm_addr, gsin->sin_addr)) {
431 break;
432 }
433 }
434 return (imf);
435}
436
437/*
438 * Find an IPv4 multicast source entry for this imo which matches

Callers 6

imo_multi_filterFunction · 0.85
inp_block_unblock_sourceFunction · 0.85
inp_get_source_filtersFunction · 0.85
inp_join_groupFunction · 0.85
inp_leave_groupFunction · 0.85
inp_set_source_filtersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected