Lines Matching refs:wa
443 struct nwamd_ipaddr_condition_walk_arg *wa = arg; in check_ipaddr() local
453 &(wa->sockaddr))->sin_addr.s_addr); in check_ipaddr()
458 &(wa->sockaddr))->sin6_addr.s6_addr); in check_ipaddr()
461 match = prefixmatch(addr1, addr2, wa->prefixlen); in check_ipaddr()
464 switch (wa->condition) { in check_ipaddr()
467 wa->res = match; in check_ipaddr()
473 wa->res = !match; in check_ipaddr()
486 struct nwamd_ipaddr_condition_walk_arg wa; in test_condition_ip_address() local
499 if (nwamd_str2sockaddr(AF_INET, ip_address, &wa.sockaddr) != NULL) { in test_condition_ip_address()
501 wa.prefixlen = IP_ABITS; in test_condition_ip_address()
502 } else if (nwamd_str2sockaddr(AF_INET6, ip_address, &wa.sockaddr) in test_condition_ip_address()
505 wa.prefixlen = IPV6_ABITS; in test_condition_ip_address()
515 wa.prefixlen = atoi(prefixlen_string); in test_condition_ip_address()
517 wa.condition = condition; in test_condition_ip_address()
522 wa.res = B_FALSE; in test_condition_ip_address()
526 wa.res = B_TRUE; in test_condition_ip_address()
537 return (wa.res); in test_condition_ip_address()
542 if (check_ipaddr(family, ifap, &wa) == 1) in test_condition_ip_address()
547 return (wa.res); in test_condition_ip_address()
561 struct nwamd_wlan_condition_walk_arg *wa = arg; in check_wlan() local
587 wa->num_connected++; in check_wlan()
589 if (wa->exp_essid != NULL) { in check_wlan()
593 switch (wa->condition) { in check_wlan()
595 wa->res = strcmp(cur_essid, wa->exp_essid) == 0; in check_wlan()
596 if (wa->res) in check_wlan()
600 wa->res = strcmp(cur_essid, wa->exp_essid) != 0; in check_wlan()
601 if (!wa->res) in check_wlan()
605 wa->res = strstr(cur_essid, wa->exp_essid) != NULL; in check_wlan()
606 if (wa->res) in check_wlan()
610 wa->res = strstr(cur_essid, wa->exp_essid) == NULL; in check_wlan()
611 if (!wa->res) in check_wlan()
619 if (wa->exp_bssid != NULL) { in check_wlan()
623 switch (wa->condition) { in check_wlan()
625 wa->res = strcmp(cur_bssid, wa->exp_bssid) == 0; in check_wlan()
626 if (wa->res) in check_wlan()
630 wa->res = strcmp(cur_bssid, wa->exp_bssid) != 0; in check_wlan()
631 if (!wa->res) in check_wlan()
643 switch (wa->condition) { in check_wlan()
645 wa->res = B_TRUE; in check_wlan()
648 wa->res = B_FALSE; in check_wlan()
659 struct nwamd_wlan_condition_walk_arg wa; in test_condition_wireless_essid() local
661 wa.condition = condition; in test_condition_wireless_essid()
662 wa.exp_essid = essid; in test_condition_wireless_essid()
663 wa.exp_bssid = NULL; in test_condition_wireless_essid()
664 wa.num_connected = 0; in test_condition_wireless_essid()
665 wa.res = B_FALSE; in test_condition_wireless_essid()
667 (void) dladm_walk(check_wlan, dld_handle, &wa, DATALINK_CLASS_PHYS, in test_condition_wireless_essid()
670 return (wa.num_connected > 0 && wa.res == B_TRUE); in test_condition_wireless_essid()
677 struct nwamd_wlan_condition_walk_arg wa; in test_condition_wireless_bssid() local
679 wa.condition = condition; in test_condition_wireless_bssid()
680 wa.exp_bssid = bssid; in test_condition_wireless_bssid()
681 wa.exp_essid = NULL; in test_condition_wireless_bssid()
682 wa.num_connected = 0; in test_condition_wireless_bssid()
683 wa.res = B_FALSE; in test_condition_wireless_bssid()
685 (void) dladm_walk(check_wlan, dld_handle, &wa, DATALINK_CLASS_PHYS, in test_condition_wireless_bssid()
688 return (wa.num_connected > 0 && wa.res == B_TRUE); in test_condition_wireless_bssid()