Lines Matching refs:res

48 	struct __res_state *	res;  member
65 struct __res_state *res,
114 if (pvt->res && pvt->free_res) in ho_close()
115 (*pvt->free_res)(pvt->res); in ho_close()
134 RES_SET_H_ERRNO(pvt->res, NETDB_INTERNAL); in ho_byname()
140 pvt->res->res_h_errno != HOST_NOT_FOUND && in ho_byname()
141 pvt->res->res_h_errno != NETDB_INTERNAL) { in ho_byname()
143 therrno = pvt->res->res_h_errno; in ho_byname()
155 if (pvt->res->res_h_errno != TRY_AGAIN || errno != ECONNREFUSED) in ho_byname()
158 if (softerror != 0 && pvt->res->res_h_errno == HOST_NOT_FOUND) in ho_byname()
159 RES_SET_H_ERRNO(pvt->res, therrno); in ho_byname()
177 RES_SET_H_ERRNO(pvt->res, NETDB_INTERNAL); in ho_byname2()
183 pvt->res->res_h_errno != HOST_NOT_FOUND && in ho_byname2()
184 pvt->res->res_h_errno != NETDB_INTERNAL) { in ho_byname2()
186 therrno = pvt->res->res_h_errno; in ho_byname2()
194 if (pvt->res->res_h_errno != TRY_AGAIN || errno != ECONNREFUSED) in ho_byname2()
197 if (softerror != 0 && pvt->res->res_h_errno == HOST_NOT_FOUND) in ho_byname2()
198 RES_SET_H_ERRNO(pvt->res, therrno); in ho_byname2()
217 RES_SET_H_ERRNO(pvt->res, NETDB_INTERNAL); in ho_byaddr()
223 pvt->res->res_h_errno != HOST_NOT_FOUND && in ho_byaddr()
224 pvt->res->res_h_errno != NETDB_INTERNAL) { in ho_byaddr()
226 therrno = pvt->res->res_h_errno; in ho_byaddr()
235 if (pvt->res->res_h_errno != TRY_AGAIN || errno != ECONNREFUSED) in ho_byaddr()
238 if (softerror != 0 && pvt->res->res_h_errno == HOST_NOT_FOUND) in ho_byaddr()
239 RES_SET_H_ERRNO(pvt->res, therrno); in ho_byaddr()
282 if (pvt->res) in ho_minimize()
283 res_nclose(pvt->res); in ho_minimize()
295 if (!pvt->res) { in ho_res_get()
296 struct __res_state *res; in ho_res_get() local
297 res = (struct __res_state *)malloc(sizeof *res); in ho_res_get()
298 if (!res) { in ho_res_get()
302 memset(res, 0, sizeof *res); in ho_res_get()
303 ho_res_set(this, res, free); in ho_res_get()
306 return (pvt->res); in ho_res_get()
310 ho_res_set(struct irs_ho *this, struct __res_state *res, in ho_res_set() argument
315 if (pvt->res && pvt->free_res) { in ho_res_set()
316 res_nclose(pvt->res); in ho_res_set()
317 (*pvt->free_res)(pvt->res); in ho_res_set()
320 pvt->res = res; in ho_res_set()
326 (*ho->res_set)(ho, pvt->res, NULL); in ho_res_set()
345 RES_SET_H_ERRNO(pvt->res, NETDB_INTERNAL); in ho_addrinfo()
353 pvt->res->res_h_errno != HOST_NOT_FOUND && in ho_addrinfo()
354 pvt->res->res_h_errno != NETDB_INTERNAL) { in ho_addrinfo()
356 therrno = pvt->res->res_h_errno; in ho_addrinfo()
364 if (pvt->res->res_h_errno != TRY_AGAIN || in ho_addrinfo()
368 if (softerror != 0 && pvt->res->res_h_errno == HOST_NOT_FOUND) in ho_addrinfo()
369 RES_SET_H_ERRNO(pvt->res, therrno); in ho_addrinfo()
377 if (!pvt->res && !ho_res_get(this)) in init()
380 if (((pvt->res->options & RES_INIT) == 0U) && in init()
381 (res_ninit(pvt->res) == -1)) in init()