* 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. */
| 256 | * Return its index into the array, or -1 if not found. |
| 257 | */ |
| 258 | static struct in6_mfilter * |
| 259 | im6o_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 |
no outgoing calls
no test coverage detected