* 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. */
| 413 | * Return its index into the array, or -1 if not found. |
| 414 | */ |
| 415 | static struct in_mfilter * |
| 416 | imo_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 |
no outgoing calls
no test coverage detected