Lines Matching defs:ifp
217 * will not accept an ifp; it wants an embedded scope ID, unlike
218 * ip_output(), which happily takes the ifp given to it. The embedded
357 struct ifnet *ifp;
380 ifp = ifindex2ifnet[name[0]];
382 if (ifp == NULL)
389 if (ifp != mli->mli_ifp) {
480 mld_domifattach(struct ifnet *ifp, int how)
484 MLD_PRINTF(("%s: called for ifp %p(%s%d)\n",
485 __func__, ifp, ifp->if_name, ifp->if_unit));
494 mli_initvar(mli, ifp, 0);
499 ifnet_lock_shared(ifp);
500 mld6_initsilent(ifp, mli);
501 ifnet_lock_done(ifp);
507 MLD_PRINTF(("allocate mld_ifinfo for ifp %p(%s%d)\n",
508 ifp, ifp->if_name, ifp->if_unit));
520 struct ifnet *ifp;
526 ifp = mli->mli_ifp;
527 VERIFY(ifp != NULL);
528 mli_initvar(mli, ifp, 1);
532 ifnet_lock_shared(ifp);
533 mld6_initsilent(ifp, mli);
534 ifnet_lock_done(ifp);
540 MLD_PRINTF(("reattached mld_ifinfo for ifp %p(%s%d)\n",
541 ifp, ifp->if_name, ifp->if_unit));
548 mld_domifdetach(struct ifnet *ifp)
554 MLD_PRINTF(("%s: called for ifp %p(%s%d)\n",
555 __func__, ifp, ifp->if_name, ifp->if_unit));
558 mli_delete(ifp, (struct mld_in6m_relhead *)&in6m_dthead);
572 mli_delete(const struct ifnet *ifp, struct mld_in6m_relhead *in6m_dthead)
580 if (mli->mli_ifp == ifp) {
597 panic("%s: mld_ifinfo not found for ifp %p\n", __func__, ifp);
601 mld6_initsilent(struct ifnet *ifp, struct mld_ifinfo *mli)
603 ifnet_lock_assert(ifp, IFNET_LCK_ASSERT_OWNED);
607 if (!(ifp->if_flags & IFF_MULTICAST) &&
608 (ifp->if_eflags & (IFEF_IPV6_ND6ALT|IFEF_LOCALNET_PRIVATE)))
616 mli_initvar(struct mld_ifinfo *mli, struct ifnet *ifp, int reattach)
620 mli->mli_ifp = ifp;
662 panic("%s: ifp not NULL for mli=%p", __func__, mli);
698 struct ifnet *ifp;
713 ifp = mli->mli_ifp;
725 MLD_PRINTF(("%s: freeing mld_ifinfo for ifp %p(%s%d)\n",
726 __func__, ifp, ifp->if_name, ifp->if_unit));
739 mld_v1_input_query(struct ifnet *ifp, const struct ip6_hdr *ip6,
750 MLD_PRINTF(("ignore v1 query %s on ifp %p(%s%d)\n",
752 ifp, ifp->if_name, ifp->if_unit));
761 MLD_PRINTF(("ignore v1 query src %s on ifp %p(%s%d)\n",
763 ifp, ifp->if_name, ifp->if_unit));
788 in6_setscope(&mld->mld_addr, ifp, NULL);
794 mli = MLD_IFINFO(ifp);
808 MLD_PRINTF(("process v1 general query on ifp %p(%s%d)\n",
809 ifp, ifp->if_name, ifp->if_unit));
818 if (inm->in6m_ifp == ifp)
831 IN6_LOOKUP_MULTI(&mld->mld_addr, ifp, inm);
836 MLD_PRINTF(("process v1 query %s on ifp %p(%s%d)\n",
838 ifp, ifp->if_name, ifp->if_unit));
914 mld_v2_input_query(struct ifnet *ifp, const struct ip6_hdr *ip6,
932 MLD_PRINTF(("ignore v1 query src %s on ifp %p(%s%d)\n",
934 ifp, ifp->if_name, ifp->if_unit));
938 MLD_PRINTF(("input v2 query on ifp %p(%s%d)\n", ifp, ifp->if_name,
939 ifp->if_unit));
996 in6_setscope(&mld->mld_addr, ifp, NULL);
999 mli = MLD_IFINFO(ifp);
1025 * Schedule a current-state report on this ifp for
1033 MLD_PRINTF(("process v2 general query on ifp %p(%s%d)\n",
1034 ifp, ifp->if_name, ifp->if_unit));
1051 IN6_LOOKUP_MULTI(&mld->mld_addr, ifp, inm);
1070 MLD_PRINTF(("process v2 group query on ifp %p(%s%d)\n",
1071 ifp, ifp->if_name, ifp->if_unit));
1215 mld_v1_input_report(struct ifnet *ifp, const struct ip6_hdr *ip6,
1223 MLD_PRINTF(("ignore v1 report %s on ifp %p(%s%d)\n",
1225 ifp, ifp->if_name, ifp->if_unit));
1229 if (ifp->if_flags & IFF_LOOPBACK)
1239 MLD_PRINTF(("ignore v1 query src %s on ifp %p(%s%d)\n",
1241 ifp, ifp->if_name, ifp->if_unit));
1253 MLD_PRINTF(("ignore v1 query dst %s on ifp %p(%s%d)\n",
1255 ifp, ifp->if_name, ifp->if_unit));
1269 ia = in6ifa_ifpforlinklocal(ifp, IN6_IFF_NOTREADY|IN6_IFF_ANYCAST);
1283 MLD_PRINTF(("process v1 report %s on ifp %p(%s%d)\n",
1284 ip6_sprintf(&mld->mld_addr), ifp, ifp->if_name, ifp->if_unit));
1291 in6_setscope(&mld->mld_addr, ifp, NULL);
1300 IN6_LOOKUP_MULTI(&mld->mld_addr, ifp, inm);
1333 MLD_PRINTF(("report suppressed for %s on ifp %p(%s%d)\n",
1335 ifp, ifp->if_name, ifp->if_unit));
1369 struct ifnet *ifp;
1376 ifp = m->m_pkthdr.rcvif;
1400 icmp6_ifstat_inc(ifp, ifs6_in_mldquery);
1402 if (mld_v1_input_query(ifp, ip6, mld) != 0)
1405 if (mld_v2_input_query(ifp, ip6, m, off,
1411 icmp6_ifstat_inc(ifp, ifs6_in_mldreport);
1412 if (mld_v1_input_report(ifp, ip6, mld) != 0)
1416 icmp6_ifstat_inc(ifp, ifs6_in_mldreport);
1419 icmp6_ifstat_inc(ifp, ifs6_in_mlddone);
1438 struct ifnet *ifp;
1510 ifp = mli->mli_ifp;
1518 if (inm->in6m_ifp != ifp)
1810 MLD_PRINTF(("%s: switching to v%d on ifp %p(%s%d)\n", __func__,
1839 struct ifnet *ifp;
1845 MLD_PRINTF(("%s: cancel v2 timers on ifp %p(%s%d)\n", __func__,
1858 ifp = mli->mli_ifp;
1865 if (inm->in6m_ifp != ifp)
1941 struct ifnet *ifp;
1951 ifp = in6m->in6m_ifp;
1953 ia = in6ifa_ifpforlinklocal(ifp, IN6_IFF_NOTREADY|IN6_IFF_ANYCAST);
2051 struct ifnet *ifp;
2063 ifp = inm->in6m_ifma->ifma_ifp;
2065 * Sanity check that netinet6's notion of ifp is the same as net's.
2067 VERIFY(inm->in6m_ifp == ifp);
2069 mli = MLD_IFINFO(ifp);
2115 struct ifnet *ifp;
2123 MLD_PRINTF(("%s: initial join %s on ifp %p(%s%d)\n",
2130 ifp = inm->in6m_ifp;
2133 VERIFY(mli->mli_ifp == ifp);
2144 if ((ifp->if_flags & IFF_LOOPBACK) ||
2257 inm->in6m_ifp->if_name, ifp->if_unit));
2269 struct ifnet *ifp;
2275 MLD_PRINTF(("%s: state change for %s on ifp %p(%s%d)\n",
2279 ifp = inm->in6m_ifp;
2282 VERIFY(mli->mli_ifp == ifp);
2284 if ((ifp->if_flags & IFF_LOOPBACK) ||
2338 MLD_PRINTF(("%s: final leave %s on ifp %p(%s%d)\n",
2469 struct ifnet *ifp;
2483 ifp = inm->in6m_ifp;
2609 (ifp->if_mtu - MLD_MTUSPACE)) {
2610 m0srcs = (ifp->if_mtu - m0->m_pkthdr.len -
2621 m0srcs = (ifp->if_mtu - MLD_MTUSPACE -
2727 m->m_pkthdr.rcvif = ifp;
2766 m0srcs = (ifp->if_mtu - MLD_MTUSPACE -
2802 m->m_pkthdr.rcvif = ifp;
2847 struct ifnet *ifp;
2863 ifp = inm->in6m_ifp; /* interface */
2891 (ifp->if_mtu - MLD_MTUSPACE)) {
2893 m0srcs = (ifp->if_mtu - m0->m_pkthdr.len -
2908 m0srcs = (ifp->if_mtu - MLD_MTUSPACE -
3027 m->m_pkthdr.rcvif = ifp;
3158 struct ifnet *ifp;
3167 ifp = mli->mli_ifp;
3174 if (inm->in6m_ifp != ifp)
3228 struct ifnet *ifp;
3243 ifp = m->m_pkthdr.rcvif;
3244 if (ifp == NULL || !ifnet_is_attached(ifp, 0)) {
3264 im6o->im6o_multicast_ifp = ifp;
3269 m0 = mld_v2_encap_report(ifp, m);
3286 (void) in6_setscope(&ip6->ip6_dst, ifp, NULL); /* XXX LOR */
3293 MLD_EMBEDSCOPE(&ip6->ip6_dst, ifp->if_index);
3304 if (ifp->if_eflags & IFEF_TXSTART) {
3349 mld_v2_encap_report(struct ifnet *ifp, struct mbuf *m)
3362 ia = in6ifa_ifpforlinklocal(ifp, IN6_IFF_NOTREADY|IN6_IFF_ANYCAST);