Lines Matching defs:pii

65 static void	check_if_removed(struct phyint_instance *pii);
191 struct phyint_instance *pii;
197 pii = phyint_inst_lookup(af, name);
198 if (pii == NULL) {
203 pii = phyint_inst_init_from_k(af, name);
206 err = phyint_inst_update_from_k(pii);
211 pii->pii_in_use = 1;
221 pii_other = phyint_inst_other(pii);
224 phyint_inst_delete(pii);
225 pii = phyint_inst_init_from_k(af, name);
230 pii->pii_in_use = 0;
235 pii->pii_in_use = 1;
245 *pii_p = pii;
246 if (pii != NULL)
247 return (pii->pii_in_use ? _B_TRUE : _B_FALSE);
269 struct phyint_instance *pii;
287 * logint_init_from_k() will set {pii,li}_in_use when they find
292 for (pii = phyint_instances; pii != NULL; pii = pii->pii_next) {
293 pii->pii_in_use = 0;
294 for (li = pii->pii_logint; li != NULL; li = li->li_next) {
296 if (pii->pii_probe_logint == li)
427 if (pii_process(af, pi_name, &pii)) {
429 logint_init_from_k(pii, lifr->lifr_name);
430 check_addr_unique(pii, &lifr->lifr_addr);
439 for (pii = phyint_instances; pii != NULL; pii = next_pii) {
440 next_pii = pii->pii_next;
441 check_if_removed(pii);
483 struct phyint_instance *pii;
507 pii = PHYINT_INSTANCE(pi, ss->ss_family);
508 if (pii == NULL || pii == ourpii ||
509 pii->pii_probe_logint == NULL)
515 if (IN6_ARE_ADDR_EQUAL(&addr, &pii->pii_probe_logint->li_addr))
516 pii->pii_probe_logint->li_dupaddr = 1;
528 struct phyint_instance *pii;
530 pii = pi->pi_v4;
531 if (pii != NULL) {
532 if (pii->pii_probe_sock != -1)
533 close_probe_socket(pii, _B_TRUE);
534 pii->pii_probe_logint = NULL;
537 pii = pi->pi_v6;
538 if (pii != NULL) {
539 if (pii->pii_probe_sock != -1)
540 close_probe_socket(pii, _B_TRUE);
541 pii->pii_probe_logint = NULL;
582 struct phyint_instance *pii;
595 for (pii = phyint_instances; pii != NULL; pii = next_pii) {
596 next_pii = pii->pii_next;
604 if (pii->pii_phyint->pi_flags & IFF_OFFLINE) {
605 if (pii->pii_phyint->pi_state != PI_OFFLINE) {
609 pii->pii_phyint->pi_name,
610 pii->pii_phyint->pi_state);
611 stop_probing(pii->pii_phyint);
621 if (pii->pii_phyint->pi_state == PI_OFFLINE)
625 li = pii->pii_probe_logint;
639 for (li = pii->pii_logint; li != NULL; li = li->li_next) {
644 if (pii->pii_af == AF_INET &&
653 if (pii->pii_af == AF_INET6 &&
674 if (pii->pii_probe_logint != NULL &&
675 pii->pii_probe_logint != probe_logint) {
676 if (pii->pii_probe_sock != -1)
677 close_probe_socket(pii, _B_TRUE);
678 pii->pii_probe_logint = NULL;
689 pr_ndx = PROBE_INDEX_PREV(pii->pii_probe_next);
690 if (pii->pii_probes[pr_ndx].pr_status != PR_UNUSED) {
691 clear_pii_probe_stats(pii);
692 reset_crtt_all(pii->pii_phyint);
695 } else if (probe_logint == pii->pii_probe_logint) {
708 pii->pii_probe_logint = probe_logint;
709 if (!phyint_inst_sockinit(pii)) {
714 phyint_inst_delete(pii);
732 if (PROBE_CAPABLE(pii)) {
733 if (pii->pii_phyint->pi_state == PI_NOTARGETS)
734 phyint_chstate(pii->pii_phyint, PI_RUNNING);
735 } else if (!PROBE_CAPABLE(phyint_inst_other(pii))) {
736 if (pii->pii_phyint->pi_state == PI_RUNNING)
737 phyint_chstate(pii->pii_phyint, PI_NOTARGETS);
746 if (pii->pii_targets == NULL)
752 if (!pii->pii_basetime_inited && PROBE_ENABLED(pii)) {
753 start_timer(pii);
754 pii->pii_basetime_inited = 1;
1031 struct phyint_instance *pii;
1050 for (pii = phyint_instances; pii != NULL; pii = next_pii) {
1051 next_pii = pii->pii_next;
1052 next_event_time = phyint_inst_timer(pii);
1060 AF_STR(pii->pii_af), pii->pii_phyint->pi_name,
1120 struct phyint_instance *pii;
1170 for (pii = phyint_instances; pii != NULL;
1171 pii = pii->pii_next) {
1173 acked = pii->pii_cum_stats.acked;
1174 lost = pii->pii_cum_stats.lost;
1175 sent = pii->pii_cum_stats.sent;
1176 unknown = pii->pii_cum_stats.unknown;
1178 switch (pii->pii_probes[pr_ndx].pr_status) {
1196 AF_STR(pii->pii_af), pii->pii_name,
1227 struct phyint_instance *pii;
1237 for (pii = phyint_instances; pii != NULL; pii = next_pii) {
1238 next_pii = pii->pii_next;
1239 phyint_inst_delete(pii);
1338 struct phyint_instance *pii;
1398 pii = (type == AF_INET) ? pi->pi_v4 : pi->pi_v6;
1399 if (pii == NULL) {
1406 old_flags = pii->pii_flags;
1407 pii->pii_flags = PHYINT_FLAGS(ifm->ifm_flags);
1408 pi->pi_flags = pii->pii_flags;
1420 if ((old_flags ^ pii->pii_flags) & IFF_STANDBY) {
1422 if (pii->pii_flags & IFF_STANDBY)
1427 if ((old_flags ^ pii->pii_flags) != IFF_RUNNING) {
1433 pii_other = phyint_inst_other(pii);
1435 pii_other->pii_flags = pii->pii_flags;
1533 * Uses {pii,li}_in_use.
1536 check_if_removed(struct phyint_instance *pii)
1542 if (!pii->pii_in_use) {
1544 AF_STR(pii->pii_af), pii->pii_phyint->pi_name);
1545 phyint_inst_delete(pii);
1548 for (li = pii->pii_logint; li != NULL; li = next_li) {
1657 struct phyint_instance *pii;
1666 pii = phyint_inst_lookup(af, ifname);
1667 if (pii == NULL)
1684 pi = pii->pii_phyint;
1686 target_add(pii, nexthop, _B_TRUE);
1771 struct phyint_instance *pii;
1777 for (pii = phyint_instances; pii != NULL; pii = pii->pii_next) {
1778 pi = pii->pii_phyint;
1782 if (!pii->pii_targets_are_routers)
1785 for (tg = pii->pii_targets; tg != NULL; tg = tg->tg_next)
1792 for (pii = phyint_instances; pii != NULL; pii = pii->pii_next) {
1793 pi = pii->pii_phyint;
1794 if (!pii->pii_targets_are_routers)
1797 for (tg = pii->pii_targets; tg != NULL; tg = next_tg) {
1819 struct phyint_instance *pii;
1822 for (pii = phyint_instances; pii != NULL; pii = pii->pii_next) {
1823 pg = pii->pii_phyint->pi_group;
1824 if (pg != phyint_anongroup && pii->pii_targets == NULL)
1825 dup_host_targets(pii);
1838 struct phyint_instance *pii;
1850 pii = PHYINT_INSTANCE(pi, af);
1859 if ((pii == NULL) || (pii == desired_pii) ||
1860 pii->pii_targets_are_routers)
1862 for (tg = pii->pii_targets; tg != NULL; tg = tg->tg_next) {
1923 struct phyint_instance *pii;
2153 for (pii = phyint_instances; pii != NULL;
2154 pii = pii->pii_next) {
2155 if (pollfds[i].fd == pii->pii_probe_sock) {
2156 if (pii->pii_af == AF_INET)
2157 in_data(pii);
2159 in6_data(pii);
2774 logperror_pii(struct phyint_instance *pii, const char *str)
2778 str, AF_STR(pii->pii_af), pii->pii_phyint->pi_name);
2781 str, AF_STR(pii->pii_af), pii->pii_phyint->pi_name,
2789 struct phyint_instance *pii = li->li_phyint_inst;
2793 str, AF_STR(pii->pii_af), li->li_name);
2796 str, AF_STR(pii->pii_af), li->li_name,
2802 close_probe_socket(struct phyint_instance *pii, boolean_t polled)
2805 (void) poll_remove(pii->pii_probe_sock);
2806 (void) close(pii->pii_probe_sock);
2807 pii->pii_probe_sock = -1;
2808 pii->pii_basetime_inited = 0;