Lines Matching refs:ialp

173 	iscsi_addr_list_t   *ialp;  in SUN_IMA_GetDiscoveryAddressPropertiesList()  local
181 ialp = (iscsi_addr_list_t *)calloc(1, sizeof (iscsi_addr_list_t)); in SUN_IMA_GetDiscoveryAddressPropertiesList()
182 if (ialp == NULL) { in SUN_IMA_GetDiscoveryAddressPropertiesList()
187 ialp->al_vers = ISCSI_INTERFACE_VERSION; in SUN_IMA_GetDiscoveryAddressPropertiesList()
188 ialp->al_in_cnt = ialp->al_out_cnt = 1; in SUN_IMA_GetDiscoveryAddressPropertiesList()
195 if (ioctl(fd, ISCSI_DISCOVERY_ADDR_LIST_GET, ialp) != 0) { in SUN_IMA_GetDiscoveryAddressPropertiesList()
203 if (ialp->al_out_cnt > 1) { in SUN_IMA_GetDiscoveryAddressPropertiesList()
208 out_cnt = ialp->al_out_cnt; in SUN_IMA_GetDiscoveryAddressPropertiesList()
209 free(ialp); in SUN_IMA_GetDiscoveryAddressPropertiesList()
214 ialp = (iscsi_addr_list_t *)calloc(1, discovery_addr_list_size); in SUN_IMA_GetDiscoveryAddressPropertiesList()
215 if (ialp == NULL) { in SUN_IMA_GetDiscoveryAddressPropertiesList()
219 ialp->al_vers = ISCSI_INTERFACE_VERSION; in SUN_IMA_GetDiscoveryAddressPropertiesList()
220 ialp->al_in_cnt = out_cnt; in SUN_IMA_GetDiscoveryAddressPropertiesList()
226 if (ioctl(fd, ISCSI_DISCOVERY_ADDR_LIST_GET, ialp) != 0) { in SUN_IMA_GetDiscoveryAddressPropertiesList()
228 free(ialp); in SUN_IMA_GetDiscoveryAddressPropertiesList()
240 ialp->al_out_cnt * sizeof (IMA_DISCOVERY_ADDRESS_PROPERTIES)); in SUN_IMA_GetDiscoveryAddressPropertiesList()
242 free(ialp); in SUN_IMA_GetDiscoveryAddressPropertiesList()
246 (*ppList)->discAddrCount = ialp->al_out_cnt; in SUN_IMA_GetDiscoveryAddressPropertiesList()
248 for (i = 0; i < ialp->al_out_cnt; i++) { in SUN_IMA_GetDiscoveryAddressPropertiesList()
249 if (ialp->al_addrs[i].a_addr.i_insize == in SUN_IMA_GetDiscoveryAddressPropertiesList()
255 } else if (ialp->al_addrs[i].a_addr.i_insize == in SUN_IMA_GetDiscoveryAddressPropertiesList()
269 bcopy(&ialp->al_addrs[i].a_addr.i_addr, in SUN_IMA_GetDiscoveryAddressPropertiesList()
275 ialp->al_addrs[i].a_port; in SUN_IMA_GetDiscoveryAddressPropertiesList()
278 free(ialp); in SUN_IMA_GetDiscoveryAddressPropertiesList()
2665 iscsi_addr_list_t *ialp; in SUN_IMA_GetISNSServerAddressPropertiesList() local
2673 ialp = (iscsi_addr_list_t *)calloc(1, sizeof (iscsi_addr_list_t)); in SUN_IMA_GetISNSServerAddressPropertiesList()
2674 if (ialp == NULL) { in SUN_IMA_GetISNSServerAddressPropertiesList()
2678 ialp->al_vers = ISCSI_INTERFACE_VERSION; in SUN_IMA_GetISNSServerAddressPropertiesList()
2679 ialp->al_in_cnt = ialp->al_out_cnt = 1; in SUN_IMA_GetISNSServerAddressPropertiesList()
2686 if (ioctl(fd, ISCSI_ISNS_SERVER_ADDR_LIST_GET, ialp) != 0) { in SUN_IMA_GetISNSServerAddressPropertiesList()
2695 if (ialp->al_out_cnt > 1) { in SUN_IMA_GetISNSServerAddressPropertiesList()
2696 out_cnt = ialp->al_out_cnt; in SUN_IMA_GetISNSServerAddressPropertiesList()
2697 free(ialp); in SUN_IMA_GetISNSServerAddressPropertiesList()
2701 ialp = (iscsi_addr_list_t *)calloc(1, in SUN_IMA_GetISNSServerAddressPropertiesList()
2703 if (ialp == NULL) { in SUN_IMA_GetISNSServerAddressPropertiesList()
2707 ialp->al_vers = ISCSI_INTERFACE_VERSION; in SUN_IMA_GetISNSServerAddressPropertiesList()
2708 ialp->al_in_cnt = out_cnt; in SUN_IMA_GetISNSServerAddressPropertiesList()
2714 if (ioctl(fd, ISCSI_ISNS_SERVER_ADDR_LIST_GET, ialp) != 0) { in SUN_IMA_GetISNSServerAddressPropertiesList()
2715 free(ialp); in SUN_IMA_GetISNSServerAddressPropertiesList()
2727 ialp->al_out_cnt * sizeof (IMA_DISCOVERY_ADDRESS_PROPERTIES)); in SUN_IMA_GetISNSServerAddressPropertiesList()
2729 free(ialp); in SUN_IMA_GetISNSServerAddressPropertiesList()
2733 (*ppList)->discAddrCount = ialp->al_out_cnt; in SUN_IMA_GetISNSServerAddressPropertiesList()
2735 for (i = 0; i < ialp->al_out_cnt; i++) { in SUN_IMA_GetISNSServerAddressPropertiesList()
2736 if (ialp->al_addrs[i].a_addr.i_insize == in SUN_IMA_GetISNSServerAddressPropertiesList()
2740 } else if (ialp->al_addrs[i].a_addr.i_insize == in SUN_IMA_GetISNSServerAddressPropertiesList()
2751 bcopy(&ialp->al_addrs[i].a_addr.i_addr, in SUN_IMA_GetISNSServerAddressPropertiesList()
2756 ialp->al_addrs[i].a_port; in SUN_IMA_GetISNSServerAddressPropertiesList()
2759 free(ialp); in SUN_IMA_GetISNSServerAddressPropertiesList()