Lines Matching defs:ifp
261 * Inline function which wraps assertions for a valid ifp.
340 imo_match_group(const struct ip_moptions *imo, const struct ifnet *ifp,
362 if ((ifp == NULL || (pinm->inm_ifp == ifp)) &&
416 imo_multi_filter(const struct ip_moptions *imo, const struct ifnet *ifp,
424 VERIFY(ifp != NULL);
426 gidx = imo_match_group(imo, ifp, group);
532 * Find and return a reference to an in_multi record for (ifp, group),
535 * filters on ifp to listen for group.
539 in_getmulti(struct ifnet *ifp, const struct in_addr *group,
548 IN_LOOKUP_MULTI(group, ifp, inm);
574 error = if_addmulti(ifp, (struct sockaddr *)&gsin, &ifma);
590 VERIFY(inm->inm_ifp == ifp);
640 inm->inm_ifp = ifp;
641 inm->inm_igi = IGMP_IFINFO(ifp);
1268 in_joingroup(struct ifnet *ifp, const struct in_addr *gina,
1276 inet_ntoa(*gina), ifp, ifp->if_name, ifp->if_unit));
1289 error = in_getmulti(ifp, gina, &inm);
1396 in_addmulti(struct in_addr *ap, struct ifnet *ifp)
1404 error = in_joingroup(ifp, ap, NULL, &pinm);
1435 struct ifnet *ifp;
1445 ifp = NULL;
1473 ifp = ip_multicast_if(&mreqs.imr_interface, &ifindex);
1478 IGMP_PRINTF(("%s: imr_interface = %s, ifp = %p\n",
1479 __func__, inet_ntoa(mreqs.imr_interface), ifp));
1506 ifp = ifindex2ifnet[gsr.gsr_interface];
1509 if (ifp == NULL)
1534 idx = imo_match_group(imo, ifp, &gsa->sa);
1686 struct ifnet *ifp;
1725 ifp = ifindex2ifnet[msfr.msfr_ifindex];
1728 if (ifp == NULL)
1743 idx = imo_match_group(imo, ifp, &gsa->sa);
1846 struct ifnet *ifp;
1881 ifp = imo->imo_multicast_ifp;
1884 } else if (ifp != NULL) {
1885 mreqn.imr_ifindex = ifp->if_index;
1886 IFP_TO_IA(ifp, ia);
1981 * Returns NULL if no ifp could be found.
1988 struct ifnet *ifp;
1994 ifp = NULL;
1998 ifp = ip_multicast_if(&new_ina, &ifindex);
2010 ifp = ro.ro_rt->rt_ifp;
2011 VERIFY(ifp != NULL);
2025 ifp = mifp;
2033 return (ifp);
2049 struct ifnet *ifp;
2057 ifp = NULL;
2108 ifp = inp_lookup_mcast_ifp(inp, &gsa->sin,
2110 IGMP_PRINTF(("%s: imr_interface = %s, ifp = %p\n",
2111 __func__, inet_ntoa(mreqs.imr_interface), ifp));
2154 ifp = ifindex2ifnet[gsr.gsr_interface];
2166 if (ifp == NULL || (ifp->if_flags & IFF_MULTICAST) == 0)
2174 idx = imo_match_group(imo, ifp, &gsa->sa);
2293 error = in_joingroup(ifp, &gsa->sin.sin_addr, imf, &inm);
2354 struct ifnet *ifp;
2363 ifp = NULL;
2405 * Attempt to look up hinted ifp from interface address.
2406 * Fallthrough with null ifp iff lookup fails, to
2412 ifp = ip_multicast_if(&mreqs.imr_interface, &ifindex);
2414 IGMP_PRINTF(("%s: imr_interface = %s, ifp = %p\n",
2415 __func__, inet_ntoa(mreqs.imr_interface), ifp));
2450 ifp = ifindex2ifnet[gsr.gsr_interface];
2472 idx = imo_match_group(imo, ifp, &gsa->sa);
2586 struct ifnet *ifp;
2608 ifp = NULL;
2610 ifp = ifindex2ifnet[mreqn.imr_ifindex];
2611 if (ifp == NULL) {
2627 ifp = NULL;
2629 ifp = ip_multicast_if(&addr, &ifindex);
2630 if (ifp == NULL) {
2631 IGMP_PRINTF(("%s: can't find ifp for addr=%s\n",
2637 IGMP_PRINTF(("%s: ifp = %p, addr = %s\n", __func__, ifp,
2643 if (ifp != NULL && (ifp->if_flags & IFF_MULTICAST) == 0)
2651 imo->imo_multicast_ifp = ifp;
2671 struct ifnet *ifp;
2724 ifp = ifindex2ifnet[msfr.msfr_ifindex];
2726 if (ifp == NULL)
2737 idx = imo_match_group(imo, ifp, &gsa->sa);
2877 struct ifnet *ifp;
2960 ifp = ifindex2ifnet[ifindex];
2964 if (ifp == NULL || !(ifp->if_flags & IFF_MULTICAST)) {
2970 imo->imo_multicast_ifp = ifp;
3103 struct ifnet *ifp;
3138 ifp = ifindex2ifnet[ifindex];
3140 if (ifp == NULL) {
3141 IGMP_PRINTF(("%s: no ifp for ifindex %u\n", __func__, ifindex));
3149 if (inm->inm_ifp != ifp)
3204 struct ifnet *ifp;
3216 ifp = ifindex2ifnet[ifindex];
3218 if (ifp != NULL && ifindexp != NULL)
3221 INADDR_TO_IFP(*a, ifp);
3223 return (ifp);
3631 printf("addr %s ifp %p(%s%d) ifma %p\n",