Lines Matching full:statp
128 res_nquery(res_state statp,
139 oflags = statp->_flags;
145 if (statp->options & RES_DEBUG)
149 n = res_nmkquery(statp, QUERY, name, class, type, NULL, 0, NULL,
152 if (n > 0 && (statp->_flags & RES_F_EDNS0ERR) == 0 &&
153 (statp->options & (RES_USE_EDNS0|RES_USE_DNSSEC)) != 0U)
154 n = res_nopt(statp, n, buf, sizeof(buf), anslen);
158 if (statp->options & RES_DEBUG)
161 RES_SET_H_ERRNO(statp, NO_RECOVERY);
164 n = res_nsend(statp, buf, n, answer, anslen);
168 if ((statp->options & (RES_USE_EDNS0|RES_USE_DNSSEC)) != 0U &&
169 ((oflags ^ statp->_flags) & RES_F_EDNS0ERR) != 0) {
170 statp->_flags |= RES_F_EDNS0ERR;
171 if (statp->options & RES_DEBUG)
177 if (statp->options & RES_DEBUG)
180 RES_SET_H_ERRNO(statp, TRY_AGAIN);
186 if (statp->options & RES_DEBUG)
195 RES_SET_H_ERRNO(statp, HOST_NOT_FOUND);
198 RES_SET_H_ERRNO(statp, TRY_AGAIN);
201 RES_SET_H_ERRNO(statp, NO_DATA);
207 RES_SET_H_ERRNO(statp, NO_RECOVERY);
222 res_nsearch(res_state statp,
238 RES_SET_H_ERRNO(statp, HOST_NOT_FOUND); /* True if we never query. */
248 if (!dots && (cp = res_hostalias(statp, name, tmp, sizeof tmp))!= NULL)
249 return (res_nquery(statp, cp, class, type, answer, anslen));
257 if (dots >= statp->ndots || trailing_dot) {
258 ret = res_nquerydomain(statp, name, NULL, class, type,
262 saved_herrno = statp->res_h_errno;
272 if ((!dots && (statp->options & RES_DEFNAMES) != 0U) ||
273 (dots && !trailing_dot && (statp->options & RES_DNSRCH) != 0U)) {
283 _resolv_populate_res_for_net(statp);
285 for (domain = (const char * const *)statp->dnsrch;
294 ret = res_nquerydomain(statp, name, *domain,
314 RES_SET_H_ERRNO(statp, TRY_AGAIN);
318 switch (statp->res_h_errno) {
340 if ((statp->options & RES_DNSRCH) == 0U)
349 if ((dots || !searched || (statp->options & RES_NOTLDQUERY) == 0U) &&
351 ret = res_nquerydomain(statp, name, NULL, class, type,
365 RES_SET_H_ERRNO(statp, saved_herrno);
367 RES_SET_H_ERRNO(statp, NO_DATA);
369 RES_SET_H_ERRNO(statp, TRY_AGAIN);
378 res_nquerydomain(res_state statp,
390 if (statp->options & RES_DEBUG)
401 RES_SET_H_ERRNO(statp, NO_RECOVERY);
414 RES_SET_H_ERRNO(statp, NO_RECOVERY);
419 return (res_nquery(statp, longname, class, type, answer, anslen));
423 res_hostalias(const res_state statp, const char *name, char *dst, size_t siz) {