Lines Matching refs:ai_state
122 struct getaddrinfo_state *ai_state) in exec_query() argument
140 ret = dns_get_addr_info(host, qtype, &ai_state->dns_id, in exec_query()
141 dns_resolve_cb, ai_state, timeout_ms); in exec_query()
149 ret = k_sem_take(&ai_state->sem, K_MSEC(timeout_ms + 100)); in exec_query()
156 (void)dns_cancel_addr_info(ai_state->dns_id); in exec_query()
159 if (ai_state->status == DNS_EAI_CANCELED) { in exec_query()
166 st = ai_state->status; in exec_query()
227 struct getaddrinfo_state ai_state; in z_impl_z_zsock_getaddrinfo_internal() local
262 ai_state.hints = hints; in z_impl_z_zsock_getaddrinfo_internal()
263 ai_state.idx = 0U; in z_impl_z_zsock_getaddrinfo_internal()
264 ai_state.port = htons(port); in z_impl_z_zsock_getaddrinfo_internal()
265 ai_state.ai_arr = res; in z_impl_z_zsock_getaddrinfo_internal()
266 ai_state.dns_id = 0; in z_impl_z_zsock_getaddrinfo_internal()
267 k_sem_init(&ai_state.sem, 0, K_SEM_MAX_LIMIT); in z_impl_z_zsock_getaddrinfo_internal()
273 st1 = exec_query(host, AF_INET, &ai_state); in z_impl_z_zsock_getaddrinfo_internal()
283 st2 = exec_query(host, AF_INET6, &ai_state); in z_impl_z_zsock_getaddrinfo_internal()
289 for (uint16_t idx = 0; idx < ai_state.idx; idx++) { in z_impl_z_zsock_getaddrinfo_internal()
290 ai_addr = &ai_state.ai_arr[idx]._ai_addr; in z_impl_z_zsock_getaddrinfo_internal()
303 ai_state.ai_arr[ai_state.idx - 1].ai_next = NULL; in z_impl_z_zsock_getaddrinfo_internal()