Lines Matching refs:rap
98 struct rp_addr *rap);
396 struct rp_addr *rap;
399 LIST_FOREACH(rap, &rpp->rp_addrhead, ra_entry)
401 if (rr_are_ifid_equal(ifid, &rap->ra_ifid,
407 return rap;
414 struct rp_addr *rap;
416 if ((error = create_ra_entry(&rap)) != 0)
420 bit_copy((caddr_t)&rap->ra_ifid, sizeof(rap->ra_ifid) << 3,
424 rap->ra_addr = ia;
425 ifaref(&rap->ra_addr->ia_ifa);
430 LIST_INSERT_HEAD(&rpp->rp_addrhead, rap, ra_entry);
444 struct rp_addr *rap;
448 if ((error = create_ra_entry(&rap)) != 0)
451 bit_copy((caddr_t)&rap->ra_ifid, sizeof(rap->ra_ifid) << 3,
453 64, (sizeof(rap->ra_ifid) << 3) - 64);
466 LIST_INSERT_HEAD(&rpp->rp_addrhead, rap, ra_entry);
467 add_each_addr(&so, rpp, rap);
482 struct rp_addr *rap;
536 rap = search_ifidwithprefix(ifpr2rp(ifpr), IA6_IN6(ia));
537 if (rap != NULL) {
538 if (rap->ra_addr == NULL) {
539 rap->ra_addr = ia;
540 ifaref(&rap->ra_addr->ia_ifa);
541 } else if (rap->ra_addr != ia) {
546 rap->ra_addr,
547 ip6_sprintf(IA6_IN6(rap->ra_addr)));
562 struct rp_addr *rap;
566 rap = search_ifidwithprefix(ifpr2rp(ia->ia6_ifpr), IA6_IN6(ia));
567 if (rap != NULL) {
569 LIST_REMOVE(rap, ra_entry);
571 if (rap->ra_addr)
572 ifafree(&rap->ra_addr->ia_ifa);
573 FREE(rap, M_RR_ADDR);
601 add_each_addr(struct socket *so, struct rr_prefix *rpp, struct rp_addr *rap)
622 (char *)&rap->ra_ifid, sizeof(rap->ra_ifid) << 3,
623 rpp->rp_plen, (sizeof(rap->ra_ifid) << 3) - rpp->rp_plen);
639 if (rap->ra_addr)
640 ifafree(&rap->ra_addr->ia_ifa);
641 rap->ra_addr = ia6;
642 ifaref(&rap->ra_addr->ia_ifa);
647 if (rap->ra_addr)
648 ifafree(&rap->ra_addr->ia_ifa);
649 rap->ra_addr = ia6;
650 ifaref(&rap->ra_addr->ia_ifa);
672 if (rap->ra_flags.anycast != 0)
695 struct rp_addr *rap;
741 rap = LIST_FIRST(&new->rp_addrhead);
742 LIST_REMOVE(rap, ra_entry);
743 if (search_ifidwithprefix(rpp, &rap->ra_ifid)
745 if (rap->ra_addr)
746 ifafree(&rap->ra_addr->ia_ifa);
747 FREE(rap, M_RR_ADDR);
750 LIST_INSERT_HEAD(&rpp->rp_addrhead, rap, ra_entry);
773 rap = LIST_FIRST(&new->rp_addrhead);
774 LIST_REMOVE(rap, ra_entry);
775 LIST_INSERT_HEAD(&rpp->rp_addrhead, rap, ra_entry);
812 LIST_FOREACH(rap, &rpp->rp_addrhead, ra_entry)
814 if (rap->ra_addr != NULL) {
815 if (rap->ra_addr->ia6_ifpr == NULL)
816 rap->ra_addr->ia6_ifpr = rp2ifpr(rpp);
819 add_each_addr(so, rpp, rap);
906 struct rp_addr *rap;
909 if ((error = create_ra_entry(&rap)) != 0)
911 rap->ra_ifid = orap->ra_ifid;
912 rap->ra_flags.anycast = (orap->ra_addr != NULL &&
915 LIST_INSERT_HEAD(&rpp->rp_addrhead, rap, ra_entry);
941 struct rp_addr *rap;
943 rap = LIST_FIRST(&rpp->rp_addrhead);
944 LIST_REMOVE(rap, ra_entry);
945 if (rap->ra_addr)
946 ifafree(&rap->ra_addr->ia_ifa);
947 FREE(rap, M_RR_ADDR);
984 struct rp_addr *rap;
990 for (rap = rpp->rp_addrhead.lh_first; rap != NULL;
991 rap = rap->ra_entry.le_next) {
992 if (rap->ra_addr == NULL)
994 rap->ra_addr->ia6_lifetime.ia6t_preferred = timenow.tv_sec;
995 rap->ra_addr->ia6_lifetime.ia6t_pltime = 0;
1011 struct rp_addr *rap;
1013 rap = LIST_FIRST(&rpp->rp_addrhead);
1014 if (rap == NULL) {
1017 LIST_REMOVE(rap, ra_entry);
1018 if (rap->ra_addr == NULL) {
1019 FREE(rap, M_RR_ADDR);
1022 rap->ra_addr->ia6_ifpr = NULL;
1024 in6_purgeaddr(&rap->ra_addr->ia_ifa, 0);
1025 ifafree(&rap->ra_addr->ia_ifa);
1026 FREE(rap, M_RR_ADDR);
1061 struct rp_addr *rap;
1083 (sizeof(rap->ra_ifid) << 3) -
1097 struct rp_addr *rap;
1188 if ((error = create_ra_entry(&rap)) != 0) {
1193 bit_copy((caddr_t)&rap->ra_ifid,
1194 sizeof(rap->ra_ifid) << 3,
1198 (sizeof(rap->ra_ifid) << 3) - rp_tmp.rp_plen);
1201 LIST_INSERT_HEAD(&rp_tmp.rp_addrhead, rap, ra_entry);