Lines Matching defs:ifp
273 struct ifnet *ifp = m->m_pkthdr.rcvif;
285 if (!ip6_forwarding || !(ifp->if_eflags & IFEF_IPV6_ROUTER))
293 ip6_sprintf(&ip6->ip6_dst), if_name(ifp)));
311 if (!nd6_is_addr_neighbor(&src_sa6, ifp, 0)) {
343 if (lladdr && ((ifp->if_addrlen + 2 + 7) & ~7) != lladdrlen) {
347 ip6_sprintf(&saddr6), ifp->if_addrlen, lladdrlen - 2));
351 nd6_cache_lladdr(ifp, &saddr6, lladdr, lladdrlen, ND_ROUTER_SOLICIT, 0);
375 struct ifnet *ifp = m->m_pkthdr.rcvif;
406 if (!(ifp->if_eflags & (IFEF_ACCEPT_RTADV | IFEF_IPV6_ROUTER)) ||
407 ((ifp->if_eflags & IFEF_IPV6_ROUTER) &&
420 ip6_sprintf(&ip6->ip6_dst), if_name(ifp)));
460 if (ifp->if_index >= nd_ifinfo_indexlim) {
464 ndi = &nd_ifinfo[ifp->if_index];
472 dr0.ifp = ifp;
634 if (ifp->if_index >= nd_ifinfo_indexlim) {
638 ndi = &nd_ifinfo[ifp->if_index];
681 if (lladdr && ((ifp->if_addrlen + 2 + 7) & ~7) != lladdrlen) {
685 ip6_sprintf(&saddr6), ifp->if_addrlen, lladdrlen - 2));
689 nd6_cache_lladdr(ifp, &saddr6, lladdr, (int)lladdrlen,
736 struct ifnet *ifp = rt->rt_ifp;
741 /* Lock ifp for if_lladdr */
742 ifnet_lock_shared(ifp);
750 info.rti_info[RTAX_IFP] = ifp->if_lladdr->ifa_addr;
754 ifnet_lock_done(ifp);
770 if (new->ifp->if_eflags & IFEF_IPV6_ROUTER) {
772 "static=%d on advertising interface\n", if_name(new->ifp),
779 "static=%d\n", if_name(new->ifp), ip6_sprintf(&new->rtaddr),
791 ifscope = scoped ? new->ifp->if_index : IFSCOPE_NONE;
809 ip6_sprintf(&gate.sin6_addr), if_name(new->ifp),
818 struct ifnet *ifp)
827 if (dr->ifp == ifp && IN6_ARE_ADDR_EQUAL(addr, &dr->rtaddr)) {
853 /* ifp would be NULL for the "drany" case */
854 if (dr->ifp != NULL && !(dr->stateflags & NDDRF_INSTALLED))
860 "static=%d\n", dr->ifp != NULL ? if_name(dr->ifp) : "ANY",
873 if (dr->ifp != NULL) {
875 dr->ifp->if_index : IFSCOPE_NONE;
891 ip6_sprintf(&gate.sin6_addr), dr->ifp != NULL ?
892 if_name(dr->ifp) : "ANY", (ifscope != IFSCOPE_NONE), err));
992 dr0.ifp = dr_ifp;
1028 struct ifnet *ifp = dr->ifp;
1040 rt6_flush(&dr->rtaddr, ifp);
1051 nd6log2((LOG_INFO, "%s: freeing defrouter %s\n", if_name(dr->ifp),
1085 defrouter_select(ifp);
1088 if (ifp->if_index < nd_ifinfo_indexlim) {
1089 struct nd_ifinfo *ndi = &nd_ifinfo[ifp->if_index];
1114 dr = defrouter_lookup(&new->rtaddr, new->ifp);
1139 dr = defrouter_lookup(&new->rtaddr, new->ifp);
1211 defrouter_select(struct ifnet *ifp)
1213 #pragma unused(ifp)
1277 drifp = dr->ifp;
1389 if (_dr == dr || _dr->ifp != dr->ifp) {
1406 if (_dr == NULL && dr->ifp != NULL &&
1407 !(dr->ifp->if_eflags & IFEF_IPV6_ROUTER)) {
1411 "static=%d (unreachable)\n", if_name(dr->ifp),
1421 "static=%d [round 1]\n", if_name(dr->ifp),
1449 rt = nd6_lookup(&installed_dr->rtaddr, 0, installed_dr->ifp, 0);
1455 installed_dr->ifp == nd6_defifp) &&
1474 if (installed_dr != NULL && installed_dr->ifp != nd6_defifp &&
1477 selected_dr->ifp != nd6_defifp) {
1520 "installed router %s\n", if_name(dr->ifp),
1525 if_name(dr->ifp), ip6_sprintf(&dr->rtaddr)));
1555 "static=%d [round 2]\n", if_name(dr->ifp),
1646 if (_dr->ifp == dr->ifp && rtpref(_dr) >= rtpref(dr) &&
1674 dr->ifp != selected_dr->ifp));
1713 struct ifnet *ifp = new->ifp;
1718 if ((dr = defrouter_lookup(&new->rtaddr, ifp)) != NULL) {
1801 if (ifp->if_index >= nd_ifinfo_indexlim)
1803 ndi = &nd_ifinfo[ifp->if_index];
1824 nd6log2((LOG_INFO, "%s: allocating defrouter %s\n", if_name(ifp),
1834 n->ifp = new->ifp;
1862 defrouter_select(ifp);
1874 (nd6_defifp != NULL && new->ifp != nd6_defifp));
1880 defrtrlist_sync(struct ifnet *ifp)
1887 defrouter_select(ifp);
1894 if (dr->ifp == ifp && (dr->stateflags & NDDRF_INSTALLED))
1900 defrouter_select(ifp);
1908 new.ifp = dr->ifp;
1989 purge_detached(struct ifnet *ifp)
2002 if (pr->ndpr_ifp != ifp ||
2011 ifnet_lock_shared(ifp);
2012 for (ifa = ifp->if_addrlist.tqh_first; ifa; ifa = ifa_next) {
2029 ifnet_lock_done(ifp);
2039 ifnet_lock_done(ifp);
2060 struct ifnet *ifp = pr->ndpr_ifp;
2069 if (ifp->if_index >= nd_ifinfo_indexlim) {
2073 ndi = &nd_ifinfo[ifp->if_index];
2079 purge_detached(ifp);
2086 ndi = &nd_ifinfo[ifp->if_index];
2149 "non-scoped", if_name(ifp), e));
2164 ndi = &nd_ifinfo[ifp->if_index];
2184 struct ifnet *ifp = pr->ndpr_ifp;
2208 pr->ndpr_plen, if_name(ifp), e));
2231 if (ifp->if_index < nd_ifinfo_indexlim) {
2232 struct nd_ifinfo *ndi = &nd_ifinfo[ifp->if_index];
2259 struct ifnet *ifp = new->ndpr_ifp;
2405 ifnet_lock_shared(ifp);
2406 TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list)
2543 ifnet_lock_done(ifp);
2561 ifidlen = in6_if2idlen(ifp);
2565 if_name(ifp));
2573 pr->ndpr_plen, if_name(ifp)));
2899 pfxrtr->router->ifp, 0)) != NULL) {
3277 nd6_prefix_sync(struct ifnet *ifp)
3284 if (!ip6_doscopedroute || ifp == NULL)
3293 if (pr->ndpr_ifp == ifp &&
3378 struct ifnet *ifp = pr->ndpr_ifp;
3420 ifscope = (opr != NULL) ? ifp->if_index : IFSCOPE_NONE;
3432 ifa = (struct ifaddr *)in6ifa_ifpforlinklocal(ifp,
3437 ifnet_lock_shared(ifp);
3438 IFP_TO_IA6(ifp, ia6);
3439 ifnet_lock_done(ifp);
3456 pr->ndpr_plen, if_name(ifp)));
3477 if (nd6_need_cache(ifp)) {
3514 pr->ndpr_plen, if_name(ifp),
3535 ndi = ND_IFINFO(ifp);
3599 struct ifnet *ifp = pr->ndpr_ifp;
3636 ifp->if_index : IFSCOPE_NONE;
3696 opr->ndpr_plen, if_name(ifp),
3711 ip6_sprintf(&sa6.sin6_addr), plen, if_name(ifp),
3751 struct ifnet *ifp = pr->ndpr_ifp;
3779 ib = in6ifa_ifpforlinklocal(ifp, 0);/* 0 is OK? */
3792 if_name(ifp), prefixlen, 128 - plen0));
3806 strncpy(ifra.ifra_name, if_name(ifp), sizeof(ifra.ifra_name));
3850 if ((ib = in6ifa_ifpwithaddr(ifp, &ifra.ifra_addr.sin6_addr)) != NULL) {
3867 error = in6_update_ifa(ifp, &ifra, NULL, updateflags, M_WAITOK);
3871 ip6_sprintf(&ifra.ifra_addr.sin6_addr), if_name(ifp),
3876 ia = in6ifa_ifpwithaddr(ifp, &ifra.ifra_addr.sin6_addr);
3891 in6_post_msg(ifp, KEV_INET6_NEW_RTADV_ADDR, ia);
3903 struct ifnet *ifp = ia0->ia_ifa.ifa_ifp;
3918 strncpy(ifra.ifra_name, if_name(ifp), sizeof(ifra.ifra_name));
3932 in6_get_tmpifid(ifp, (u_int8_t *)randid,
3946 if ((ia = in6ifa_ifpwithaddr(ifp, &ifra.ifra_addr.sin6_addr)) != NULL) {
3997 if ((error = in6_update_ifa(ifp, &ifra, NULL, updateflags, how)) != 0)
4000 newia = in6ifa_ifpwithaddr(ifp, &ifra.ifra_addr.sin6_addr);
4126 struct ifnet *ifp)
4136 gateway->s6_addr16[1] = htons(ifp->if_index);