Lines Matching defs:ifp
398 struct ifnet *ifp;
421 ifp = ifindex2ifnet[name[0]];
423 if (ifp == NULL)
430 if (ifp != igi->igi_ifp) {
462 const int loop, struct ifnet *ifp)
480 igmp_sendpkt(m, ifp);
540 igmp_domifattach(struct ifnet *ifp, int how)
544 IGMP_PRINTF(("%s: called for ifp %p(%s)\n",
545 __func__, ifp, ifp->if_name));
554 igi_initvar(igi, ifp, 0);
559 ifnet_lock_shared(ifp);
560 igmp_initsilent(ifp, igi);
561 ifnet_lock_done(ifp);
567 IGMP_PRINTF(("allocate igmp_ifinfo for ifp %p(%s)\n",
568 ifp, ifp->if_name));
580 struct ifnet *ifp;
586 ifp = igi->igi_ifp;
587 VERIFY(ifp != NULL);
588 igi_initvar(igi, ifp, 1);
592 ifnet_lock_shared(ifp);
593 igmp_initsilent(ifp, igi);
594 ifnet_lock_done(ifp);
600 IGMP_PRINTF(("reattached igmp_ifinfo for ifp %p(%s)\n",
601 ifp, ifp->if_name));
608 igmp_domifdetach(struct ifnet *ifp)
614 IGMP_PRINTF(("%s: called for ifp %p(%s%d)\n",
615 __func__, ifp, ifp->if_name, ifp->if_unit));
618 igi_delete(ifp, (struct igmp_inm_relhead *)&inm_dthead);
632 igi_delete(const struct ifnet *ifp, struct igmp_inm_relhead *inm_dthead)
640 if (igi->igi_ifp == ifp) {
657 panic("%s: igmp_ifinfo not found for ifp %p\n", __func__, ifp);
661 igmp_initsilent(struct ifnet *ifp, struct igmp_ifinfo *igi)
663 ifnet_lock_assert(ifp, IFNET_LCK_ASSERT_OWNED);
667 if (!(ifp->if_flags & IFF_MULTICAST))
675 igi_initvar(struct igmp_ifinfo *igi, struct ifnet *ifp, int reattach)
679 igi->igi_ifp = ifp;
719 panic("%s: ifp not NULL for igi=%p", __func__, igi);
755 struct ifnet *ifp;
770 ifp = igi->igi_ifp;
782 IGMP_PRINTF(("%s: freeing igmp_ifinfo for ifp %p(%s%d)\n",
783 __func__, ifp, ifp->if_name, ifp->if_unit));
793 igmp_input_v1_query(struct ifnet *ifp, const struct ip *ip,
813 igi = IGMP_IFINFO(ifp);
818 IGMP_PRINTF(("ignore v1 query on IGIF_LOOPBACK ifp %p(%s%d)\n",
819 ifp, ifp->if_name, ifp->if_unit));
829 IGMP_PRINTF(("process v1 query on ifp %p(%s%d)\n", ifp, ifp->if_name,
830 ifp->if_unit));
841 if (inm->inm_ifp != ifp)
878 igmp_input_v2_query(struct ifnet *ifp, const struct ip *ip,
905 igi = IGMP_IFINFO(ifp);
910 IGMP_PRINTF(("ignore v2 query on IGIF_LOOPBACK ifp %p(%s%d)\n",
911 ifp, ifp->if_name, ifp->if_unit));
932 IGMP_PRINTF(("process v2 general query on ifp %p(%s%d)\n",
933 ifp, ifp->if_name, ifp->if_unit));
942 if (inm->inm_ifp == ifp)
954 IN_LOOKUP_MULTI(&igmp->igmp_group, ifp, inm);
958 IGMP_PRINTF(("process v2 query %s on ifp %p(%s%d)\n",
959 inet_ntoa(igmp->igmp_group), ifp, ifp->if_name,
960 ifp->if_unit));
1033 igmp_input_v3_query(struct ifnet *ifp, const struct ip *ip,
1045 IGMP_PRINTF(("process v3 query on ifp %p(%s%d)\n", ifp, ifp->if_name,
1046 ifp->if_unit));
1056 * FUTURE: Check if ifp has IGIF_LOOPBACK set, as we will make
1106 igi = IGMP_IFINFO(ifp);
1111 IGMP_PRINTF(("ignore v3 query on IGIF_LOOPBACK ifp %p(%s%d)\n",
1112 ifp, ifp->if_name, ifp->if_unit));
1124 IGMP_PRINTF(("ignore v3 query in v%d mode on ifp %p(%s%d)\n",
1125 igi->igi_version, ifp, ifp->if_name, ifp->if_unit));
1141 * Schedule a current-state report on this ifp for
1148 IGMP_PRINTF(("process v3 general query on ifp %p(%s%d)\n",
1149 ifp, ifp->if_name, ifp->if_unit));
1164 IN_LOOKUP_MULTI(&igmpv3->igmp_group, ifp, inm);
1184 IGMP_PRINTF(("process v3 %s query on ifp %p(%s%d)\n",
1185 inet_ntoa(igmpv3->igmp_group), ifp, ifp->if_name,
1186 ifp->if_unit));
1314 igmp_input_v1_report(struct ifnet *ifp, /*const*/ struct ip *ip,
1323 if (ifp->if_flags & IFF_LOOPBACK)
1341 IFP_TO_IA(ifp, ia);
1350 IGMP_PRINTF(("process v1 report %s on ifp %p(%s%d)\n",
1351 inet_ntoa(igmp->igmp_group), ifp, ifp->if_name, ifp->if_unit));
1359 IN_LOOKUP_MULTI(&igmp->igmp_group, ifp, inm);
1397 IGMP_PRINTF(("report suppressed for %s on ifp %p(%s%d)\n",
1398 inet_ntoa(igmp->igmp_group), ifp, ifp->if_name,
1399 ifp->if_unit));
1404 IGMP_PRINTF(("report suppressed for %s on ifp %p(%s%d)\n",
1405 inet_ntoa(igmp->igmp_group), ifp, ifp->if_name,
1406 ifp->if_unit));
1431 igmp_input_v2_report(struct ifnet *ifp, /*const*/ struct ip *ip,
1442 IFP_TO_IA(ifp, ia);
1456 if (ifp->if_flags & IFF_LOOPBACK) {
1488 IGMP_PRINTF(("process v2 report %s on ifp %p(%s%d)\n",
1489 inet_ntoa(igmp->igmp_group), ifp, ifp->if_name, ifp->if_unit));
1498 IN_LOOKUP_MULTI(&igmp->igmp_group, ifp, inm);
1535 IGMP_PRINTF(("report suppressed for %s on ifp %p(%s%d)\n",
1536 inet_ntoa(igmp->igmp_group), ifp, ifp->if_name,
1537 ifp->if_unit));
1558 struct ifnet *ifp;
1567 ifp = m->m_pkthdr.rcvif;
1657 if (igmp_input_v1_query(ifp, ip, igmp) != 0) {
1667 if (igmp_input_v2_query(ifp, ip, igmp) != 0) {
1706 if (igmp_input_v3_query(ifp, ip, igmpv3) != 0) {
1718 if (igmp_input_v1_report(ifp, ip, igmp) != 0) {
1731 if (igmp_input_v2_report(ifp, ip, igmp) != 0) {
1772 struct ifnet *ifp;
1840 ifp = igi->igi_ifp;
1849 if (inm->inm_ifp != ifp)
1874 igmp_dispatch_queue(igi, &igi->igi_v2q, 0, loop, ifp);
1877 igmp_dispatch_queue(NULL, &qrq, 0, loop, ifp);
1878 igmp_dispatch_queue(NULL, &scq, 0, loop, ifp);
2173 IGMP_PRINTF(("%s: switching to v%d on ifp %p(%s%d)\n", __func__,
2221 struct ifnet *ifp;
2227 IGMP_PRINTF(("%s: cancel v3 timers on ifp %p(%s%d)\n", __func__,
2241 ifp = igi->igi_ifp;
2248 if (inm->inm_ifp != ifp)
2391 struct ifnet *ifp;
2400 ifp = inm->inm_ifp;
2478 struct ifnet *ifp;
2490 ifp = inm->inm_ifma->ifma_ifp;
2492 * Sanity check that netinet's notion of ifp is the same as net's.
2494 VERIFY(inm->inm_ifp == ifp);
2496 igi = IGMP_IFINFO(ifp);
2538 struct ifnet *ifp;
2545 IGMP_PRINTF(("%s: initial join %s on ifp %p(%s%d)\n",
2552 ifp = inm->inm_ifp;
2555 VERIFY(igi->igi_ifp == ifp);
2566 if ((ifp->if_flags & IFF_LOOPBACK) ||
2675 struct ifnet *ifp;
2681 IGMP_PRINTF(("%s: state change for %s on ifp %p(%s%d)\n",
2685 ifp = inm->inm_ifp;
2688 VERIFY(igi->igi_ifp == ifp);
2690 if ((ifp->if_flags & IFF_LOOPBACK) ||
2743 IGMP_PRINTF(("%s: final leave %s on ifp %p(%s%d)\n",
2877 struct ifnet *ifp;
2893 ifp = inm->inm_ifp;
2996 (ifp->if_mtu - IGMP_LEADINGSPACE)) {
2997 m0srcs = (ifp->if_mtu - m0->m_pkthdr.len -
3007 m0srcs = (ifp->if_mtu - IGMP_LEADINGSPACE -
3114 m->m_pkthdr.rcvif = ifp;
3159 m0srcs = (ifp->if_mtu - IGMP_LEADINGSPACE -
3195 m->m_pkthdr.rcvif = ifp;
3240 struct ifnet *ifp;
3258 ifp = inm->inm_ifp; /* interface */
3286 (ifp->if_mtu - IGMP_LEADINGSPACE)) {
3288 m0srcs = (ifp->if_mtu - m0->m_pkthdr.len -
3308 m0srcs = (ifp->if_mtu - IGMP_LEADINGSPACE -
3426 m->m_pkthdr.rcvif = ifp;
3557 struct ifnet *ifp;
3566 ifp = igi->igi_ifp;
3573 if (inm->inm_ifp != ifp)
3607 loop, ifp);
3625 igmp_sendpkt(struct mbuf *m, struct ifnet *ifp)
3637 if (ifp == NULL || !ifnet_is_attached(ifp, 0)) {
3638 IGMP_PRINTF(("%s: dropped %p as ifp u went away.\n",
3670 imo->imo_multicast_ifp = ifp;
3675 m0 = igmp_v3_encap_report(ifp, m);
3692 mac_netinet_igmp_send(ifp, m0);
3695 if (ifp->if_eflags & IFEF_TXSTART) {
3730 igmp_v3_encap_report(struct ifnet *ifp, struct mbuf *m)
3779 IFP_TO_IA(ifp, ia);