Lines Matching refs:pr
50 void incoming_prefix_onlink_process(struct prefix *pr,
57 struct prefix *pr, uchar_t *opt,
646 struct prefix *pr;
651 for (pr = pi->pi_prefix_list; pr != NULL; pr = pr->pr_next) {
652 if (pr->pr_prefix_len == plen &&
653 prefix_equal(po->nd_opt_pi_prefix, pr->pr_prefix, plen)) {
655 if (pr->pr_state & PR_STATIC)
658 incoming_prefix_onlink_process(pr, opt);
669 pr = prefix_create(pi, po->nd_opt_pi_prefix, plen, 0);
670 if (pr == NULL)
672 incoming_prefix_onlink_process(pr, opt);
676 incoming_prefix_onlink_process(struct prefix *pr, uchar_t *opt)
684 pr->pr_state |= PR_ONLINK;
686 pr->pr_state &= ~PR_ONLINK;
696 if (pr->pr_flags & IFF_TEMPORARY) {
697 pr->pr_OnLinkLifetime = pr->pr_ValidLifetime;
700 pr->pr_OnLinkLifetime = PREFIX_INFINITY - 1;
702 pr->pr_OnLinkLifetime = validtime * MILLISEC;
704 pr->pr_OnLinkFlag = _B_TRUE;
708 pr->pr_name, inet_ntop(AF_INET6, (void *)&pr->pr_prefix,
709 abuf, sizeof (abuf)), pr->pr_prefix_len,
710 pr->pr_OnLinkLifetime, pr->pr_state, pr->pr_kernel_state);
713 if (pr->pr_kernel_state != pr->pr_state) {
714 prefix_update_k(pr);
717 if (pr->pr_OnLinkLifetime != 0)
718 timer_schedule(pr->pr_OnLinkLifetime);
729 struct prefix *pr;
747 for (pr = pi->pi_prefix_list; pr != NULL; pr = pr->pr_next) {
748 if (prefix_equal(po->nd_opt_pi_prefix, pr->pr_prefix,
750 if ((pr->pr_flags & IFF_DHCPRUNNING) &&
751 pr->pr_prefix_len != po->nd_opt_pi_prefix_len) {
752 pr->pr_prefix_len = po->nd_opt_pi_prefix_len;
753 if (pr->pr_flags & IFF_UP) {
758 pr->pr_name);
759 prefix_update_dhcp(pr);
762 if (pr->pr_prefix_len == po->nd_opt_pi_prefix_len &&
763 (!(pr->pr_state & PR_STATIC) ||
764 (pr->pr_flags & IFF_DHCPRUNNING)))
773 pr = prefix_create(pi, po->nd_opt_pi_prefix,
775 if (pr != NULL) {
776 pr->pr_state = PR_STATIC;
798 struct prefix *pr;
824 for (pr = pi->pi_prefix_list; pr != NULL; pr = pr->pr_next) {
825 if (pr->pr_prefix_len == plen &&
826 prefix_equal(po->nd_opt_pi_prefix, pr->pr_prefix, plen)) {
829 if ((pr->pr_state & PR_STATIC) ||
830 (pr->pr_flags & IFF_DHCPRUNNING))
832 if (pr->pr_flags & IFF_TEMPORARY) {
839 if (!((pr->pr_flags & IFF_DEPRECATED) &&
841 pr->pr_address, TMP_TOKEN_BITS)))
846 (void) incoming_prefix_addrconf_process(pi, pr, opt,
861 pr = prefix_create(pi, po->nd_opt_pi_prefix, plen, 0);
862 if (pr == NULL)
864 ret = incoming_prefix_addrconf_process(pi, pr, opt, from,
875 pr = prefix_create(pi, po->nd_opt_pi_prefix, plen,
877 if (pr == NULL)
879 ret = incoming_prefix_addrconf_process(pi, pr, opt, from,
887 incoming_prefix_addrconf_process(struct phyint *pi, struct prefix *pr,
910 recorded_validtime = pr->pr_ValidLifetime / MILLISEC;
912 if (loopback || !(pr->pr_state & PR_AUTO) ||
961 if (pr->pr_flags & IFF_TEMPORARY) {
972 cur_vexp = pr->pr_CreateTime + pi->pi_TmpValidLifetime;
973 cur_pexp = pr->pr_CreateTime + cur_tpreftime;
983 if ((pr->pr_PreferredLifetime == 0) &&
984 !token_equal(pr->pr_address, pi->pi_tmp_token,
1004 prefix_update_ipadm_addrobj(pr, _B_FALSE);
1005 prefix_delete(pr);
1012 "p %d\n", pr->pr_name, pr->pr_flags, validtime, preftime);
1014 if (!(pr->pr_state & PR_AUTO)) {
1020 if (pr->pr_flags & IFF_TEMPORARY) {
1023 prefix_delete(pr);
1033 if (pr->pr_prefix_len + tokenlen != IPV6_ABITS) {
1043 pr->pr_prefix_len, tokenlen);
1051 pr->pr_address.s6_addr[i] = pr->pr_prefix.s6_addr[i] |
1058 if ((other_pr = prefix_lookup_addr_match(pr)) != NULL) {
1071 prefix_update_ipadm_addrobj(pr, _B_FALSE);
1072 prefix_delete(pr);
1078 if ((pr->pr_flags & IFF_TEMPORARY) && new_prefix) {
1079 pr->pr_CreateTime = getcurrenttime() / MILLISEC;
1083 pr->pr_name, validtime, preftime);
1088 pr->pr_state |= PR_AUTO;
1090 pr->pr_state &= ~(PR_AUTO|PR_DEPRECATED);
1091 if (preftime != 0 || !(pr->pr_state & PR_AUTO))
1092 pr->pr_state &= ~PR_DEPRECATED;
1094 pr->pr_state |= PR_DEPRECATED;
1105 pr->pr_ValidLifetime = PREFIX_INFINITY - 1;
1107 pr->pr_ValidLifetime = validtime * MILLISEC;
1109 pr->pr_PreferredLifetime = PREFIX_INFINITY - 1;
1111 pr->pr_PreferredLifetime = preftime * MILLISEC;
1112 pr->pr_AutonomousFlag = _B_TRUE;
1117 pr->pr_physical->pi_name,
1118 inet_ntop(AF_INET6, (void *)&pr->pr_prefix,
1119 abuf, sizeof (abuf)), pr->pr_prefix_len,
1120 pr->pr_ValidLifetime, pr->pr_PreferredLifetime);
1123 if (pr->pr_state & PR_AUTO) {
1125 if (pr->pr_ValidLifetime != 0)
1126 timer_schedule(pr->pr_ValidLifetime);
1127 if (pr->pr_PreferredLifetime != 0)
1128 timer_schedule(pr->pr_PreferredLifetime);
1130 if (pr->pr_kernel_state != pr->pr_state) {
1132 if ((pr->pr_kernel_state & PR_AUTO) &&
1133 !(pr->pr_state & PR_AUTO)) {
1138 inet_ntop(AF_INET6, (void *)&pr->pr_address,
1141 prefix_update_k(pr);