Lines Matching defs:ifpr
159 struct ifprefix *ifpr;
163 for (ifpr = TAILQ_FIRST(&ifp->if_prefixhead); ifpr;
164 ifpr = TAILQ_NEXT(ifpr, ifpr_list))
166 if (ifpr->ifpr_prefix->sa_family != AF_INET6 ||
167 ifpr->ifpr_type != IN6_PREFIX_RR)
169 if (plen <= in6_matchlen(dst, IFPR_IN6(ifpr)))
173 return (ifpr);
183 struct ifprefix *ifpr;
188 ifpr = in6_prefixwithifp(ifp, ipr->ipr_plen,
190 if (ifpr != NULL)
191 return ifpr2rp(ifpr);
218 for (ifpr = TAILQ_FIRST(&ifp->if_prefixhead); ifpr;
219 ifpr = TAILQ_NEXT(ifpr, ifpr_list))
221 if (ifpr->ifpr_prefix->sa_family != AF_INET6 ||
222 ifpr->ifpr_type != IN6_PREFIX_RR)
224 if (ifpr->ifpr_plen <= in6_matchlen(IFA_IN6(ifa),
225 IFPR_IN6(ifpr)))
229 if (ifpr != NULL)
232 ip6_sprintf(IFPR_IN6(ifpr)));
233 return ifpr2rp(ifpr);
244 struct ifprefix *ifpr;
250 for (ifpr = TAILQ_FIRST(&ifp->if_prefixhead); ifpr;
251 ifpr = TAILQ_NEXT(ifpr, ifpr_list))
253 if (ifpr->ifpr_prefix->sa_family != AF_INET6 ||
254 ifpr->ifpr_type != IN6_PREFIX_RR)
257 IFPR_IN6(ifpr));
258 if (irr->irr_m_minlen > ifpr->ifpr_plen ||
259 irr->irr_m_maxlen < ifpr->ifpr_plen ||
263 ifpr2rp(ifpr)->rp_statef_addmark = 1;
265 ifpr2rp(ifpr)->rp_statef_delmark = 1;
305 struct ifprefix *ifpr;
309 for (ifpr = TAILQ_FIRST(&ifp->if_prefixhead); ifpr;
310 ifpr = TAILQ_NEXT(ifpr, ifpr_list))
312 if (ifpr->ifpr_prefix->sa_family != AF_INET6 ||
313 ifpr->ifpr_type != IN6_PREFIX_RR)
316 if (in6_addrscope(RP_IN6(ifpr2rp(ifpr))) ==
318 ifpr2rp(ifpr)->rp_statef_delmark = 1;
327 struct ifprefix *ifpr;
331 for (ifpr = TAILQ_FIRST(&ifp->if_prefixhead); ifpr;
332 ifpr = TAILQ_NEXT(ifpr, ifpr_list))
334 if (ifpr->ifpr_prefix->sa_family != AF_INET6 ||
335 ifpr->ifpr_type != IN6_PREFIX_RR)
338 ifpr2rp(ifpr)->rp_statef_addmark = 0;
339 ifpr2rp(ifpr)->rp_statef_delmark = 0;
481 struct ifprefix *ifpr;
487 ifpr = in6_prefixwithifp(ia->ia_ifp, plen, IA6_IN6(ia));
488 if (ifpr == NULL) {
532 ifpr = in6_prefixwithifp(ia->ia_ifp, pplen, IA6_IN6(ia));
533 if (ifpr == NULL)
536 rap = search_ifidwithprefix(ifpr2rp(ifpr), IA6_IN6(ia));
550 ia->ia6_ifpr = ifpr;
553 error = assign_ra_entry(ifpr2rp(ifpr), iilen, ia);
555 ia->ia6_ifpr = ifpr;
584 struct ifprefix *ifpr, *nextifpr;
588 for (ifpr = TAILQ_FIRST(&ifp->if_prefixhead); ifpr;
589 ifpr = nextifpr)
591 nextifpr = TAILQ_NEXT(ifpr, ifpr_list);
592 if (ifpr->ifpr_prefix->sa_family != AF_INET6 ||
593 ifpr->ifpr_type != IN6_PREFIX_RR)
595 (void)delete_each_prefix(ifpr2rp(ifpr), PR_ORIG_KERNEL);
694 struct ifprefix *ifpr;
699 for (ifpr = TAILQ_FIRST(&new->rp_ifp->if_prefixhead); ifpr;
700 ifpr = TAILQ_NEXT(ifpr, ifpr_list))
702 if (ifpr->ifpr_prefix->sa_family != AF_INET6 ||
703 ifpr->ifpr_type != IN6_PREFIX_RR)
705 if (ifpr->ifpr_plen == new->rp_plen &&
706 in6_are_prefix_equal(IFPR_IN6(ifpr), RP_IN6(new),
707 ifpr->ifpr_plen))
710 rpp = ifpr2rp(ifpr);
785 if ((ifpr = TAILQ_FIRST(&ifp->if_prefixhead))
787 for ( ; TAILQ_NEXT(ifpr, ifpr_list);
788 ifpr = TAILQ_NEXT(ifpr, ifpr_list))
790 TAILQ_NEXT(ifpr, ifpr_list) = rp2ifpr(rpp);
840 struct ifprefix *ifpr;
843 if ((ifpr = TAILQ_FIRST(&ifp->if_prefixhead)) == rp2ifpr(rpp))
845 TAILQ_NEXT(ifpr, ifpr_list);
847 while (TAILQ_NEXT(ifpr, ifpr_list) != NULL &&
848 (TAILQ_NEXT(ifpr, ifpr_list) != rp2ifpr(rpp)))
849 ifpr = TAILQ_NEXT(ifpr, ifpr_list);
850 if (TAILQ_NEXT(ifpr, ifpr_list))
851 TAILQ_NEXT(ifpr, ifpr_list) =
880 init_newprefix(struct in6_rrenumreq *irr, struct ifprefix *ifpr,
888 rpp->rp_ifp = ifpr->ifpr_ifp;
889 rpp->rp_plen = ifpr->ifpr_plen;
897 if (irr->irr_u_uselen < ifpr->ifpr_plen)
899 (char *)IFPR_IN6(ifpr), sizeof(*IFPR_IN6(ifpr)) << 3,
901 min(ifpr->ifpr_plen - irr->irr_u_uselen,
904 LIST_FOREACH(orap, &(ifpr2rp(ifpr)->rp_addrhead), ra_entry)
920 ifpr2rp(ifpr)->rp_raf_onlink;
922 ifpr2rp(ifpr)->rp_raf_auto;
956 struct ifprefix *ifpr, *nextifpr;
962 for (ifpr = TAILQ_FIRST(&ifp->if_prefixhead); ifpr; ifpr = nextifpr)
964 nextifpr = TAILQ_NEXT(ifpr, ifpr_list);
965 if (ifpr->ifpr_prefix->sa_family != AF_INET6 ||
966 ifpr->ifpr_type != IN6_PREFIX_RR)
968 if (ifpr2rp(ifpr)->rp_statef_addmark) {
969 if ((error = init_newprefix(irr, ifpr, &rp)) != 0)
1037 struct ifprefix *ifpr, *nextifpr;
1041 for (ifpr = TAILQ_FIRST(&ifp->if_prefixhead); ifpr; ifpr = nextifpr)
1043 nextifpr = TAILQ_NEXT(ifpr, ifpr_list);
1044 if (ifpr->ifpr_prefix->sa_family != AF_INET6 ||
1045 ifpr->ifpr_type != IN6_PREFIX_RR)
1047 if (ifpr2rp(ifpr)->rp_statef_delmark)
1048 (void)delete_each_prefix(ifpr2rp(ifpr), origin);