Lines Matching refs:ifp
157 in6_prefixwithifp(struct ifnet *ifp, int plen, struct in6_addr *dst)
162 ifnet_lock_shared(ifp);
163 for (ifpr = TAILQ_FIRST(&ifp->if_prefixhead); ifpr;
172 ifnet_lock_done(ifp);
181 search_matched_prefix(struct ifnet *ifp, struct in6_prefixreq *ipr)
188 ifpr = in6_prefixwithifp(ifp, ipr->ipr_plen,
198 ifnet_lock_shared(ifp);
199 TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list)
208 ifnet_lock_done(ifp);
214 ifnet_lock_done(ifp);
218 for (ifpr = TAILQ_FIRST(&ifp->if_prefixhead); ifpr;
228 ifnet_lock_done(ifp);
242 mark_matched_prefixes(u_long cmd, struct ifnet *ifp, struct in6_rrenumreq *irr)
249 ifnet_lock_exclusive(ifp); /* Should if_prefixhead be protected by IPv6?? */
250 for (ifpr = TAILQ_FIRST(&ifp->if_prefixhead); ifpr;
272 TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list)
295 ifnet_lock_done(ifp);
303 delmark_global_prefixes(struct ifnet *ifp, __unused struct in6_rrenumreq *irr)
308 ifnet_lock_exclusive(ifp);
309 for (ifpr = TAILQ_FIRST(&ifp->if_prefixhead); ifpr;
320 ifnet_lock_done(ifp);
325 unmark_prefixes(struct ifnet *ifp)
330 ifnet_lock_exclusive(ifp);
331 for (ifpr = TAILQ_FIRST(&ifp->if_prefixhead); ifpr;
341 ifnet_lock_done(ifp);
461 * do not attempt to add an address, if ifp does not match
582 struct ifnet *ifp)
587 ifnet_lock_exclusive(ifp);
588 for (ifpr = TAILQ_FIRST(&ifp->if_prefixhead); ifpr;
597 ifnet_lock_done(ifp);
783 struct ifnet *ifp = rpp->rp_ifp;
785 if ((ifpr = TAILQ_FIRST(&ifp->if_prefixhead))
792 TAILQ_FIRST(&ifp->if_prefixhead) =
839 struct ifnet *ifp = rpp->rp_ifp;
842 ifnet_lock_exclusive(ifp);
843 if ((ifpr = TAILQ_FIRST(&ifp->if_prefixhead)) == rp2ifpr(rpp))
844 TAILQ_FIRST(&ifp->if_prefixhead) =
854 printf("Couldn't unlink rr_prefix from ifp\n");
856 ifnet_lock_done(ifp);
953 add_useprefixes(struct socket *so, struct ifnet *ifp,
961 ifnet_lock_exclusive(ifp);
962 for (ifpr = TAILQ_FIRST(&ifp->if_prefixhead); ifpr; ifpr = nextifpr)
974 ifnet_lock_done(ifp);
1035 delete_prefixes(struct ifnet *ifp, u_char origin)
1040 ifnet_lock_exclusive(ifp);
1041 for (ifpr = TAILQ_FIRST(&ifp->if_prefixhead); ifpr; ifpr = nextifpr)
1050 ifnet_lock_done(ifp);
1094 struct ifnet *ifp)
1112 delmark_global_prefixes(ifp, irr);
1125 if (mark_matched_prefixes(cmd, ifp, irr)) {
1127 if ((error = add_useprefixes(so, ifp, irr))
1131 delete_prefixes(ifp, irr->irr_origin);
1135 unmark_prefixes(ifp);
1138 rpp = search_matched_prefix(ifp, ipr);
1139 if (rpp == NULL || ifp != rpp->rp_ifp)
1163 rp_tmp.rp_ifp = ifp;
1176 ifnet_lock_exclusive(ifp);
1177 for (ifa = ifp->if_addrlist.tqh_first;
1204 ifnet_lock_done(ifp);
1213 rpp = search_matched_prefix(ifp, ipr);
1214 if (rpp == NULL || ifp != rpp->rp_ifp)
1217 ifnet_lock_exclusive(ifp);
1219 ifnet_lock_done(ifp);