Home
last modified time | relevance | path

Searched refs:statp (Results 1 – 9 of 9) sorted by relevance

/bionic/libc/dns/resolv/
Dres_init.c159 res_ninit(res_state statp) { in res_ninit() argument
162 return (__res_vinit(statp, 0)); in res_ninit()
167 __res_vinit(res_state statp, int preinit) { in __res_vinit() argument
190 if ((statp->options & RES_INIT) != 0U) in __res_vinit()
191 res_ndestroy(statp); in __res_vinit()
194 statp->netid = NETID_UNSET; in __res_vinit()
195 statp->retrans = RES_TIMEOUT; in __res_vinit()
196 statp->retry = RES_DFLRETRY; in __res_vinit()
197 statp->options = RES_DEFAULT; in __res_vinit()
198 statp->id = res_randomid(); in __res_vinit()
[all …]
Dres_query.c128 res_nquery(res_state statp, in res_nquery() argument
139 oflags = statp->_flags; in res_nquery()
145 if (statp->options & RES_DEBUG) in res_nquery()
149 n = res_nmkquery(statp, QUERY, name, class, type, NULL, 0, NULL, in res_nquery()
152 if (n > 0 && (statp->_flags & RES_F_EDNS0ERR) == 0 && in res_nquery()
153 (statp->options & (RES_USE_EDNS0|RES_USE_DNSSEC)) != 0U) in res_nquery()
154 n = res_nopt(statp, n, buf, sizeof(buf), anslen); in res_nquery()
158 if (statp->options & RES_DEBUG) in res_nquery()
161 RES_SET_H_ERRNO(statp, NO_RECOVERY); in res_nquery()
164 n = res_nsend(statp, buf, n, answer, anslen); in res_nquery()
[all …]
Dres_send.c232 res_ourserver_p(const res_state statp, const struct sockaddr *sa) { in res_ourserver_p() argument
240 for (ns = 0; ns < statp->nscount; ns++) { in res_ourserver_p()
241 srv = (struct sockaddr_in *)(void *)get_nsaddr(statp, (size_t)ns); in res_ourserver_p()
250 if (EXT(statp).ext == NULL) in res_ourserver_p()
253 for (ns = 0; ns < statp->nscount; ns++) { in res_ourserver_p()
254 srv6 = (struct sockaddr_in6 *)(void *)get_nsaddr(statp, (size_t)ns); in res_ourserver_p()
360 res_nsend(res_state statp, in res_nsend() argument
371 DprintQ((statp->options & RES_DEBUG) || (statp->pfcode & RES_PRF_QUERY), in res_nsend()
373 v_circuit = (statp->options & RES_USEVC) || buflen > PACKETSZ; in res_nsend()
379 statp->netid, buf, buflen, in res_nsend()
[all …]
Dres_debug.h26 # define Aerror(statp, file, string, error, address) /*empty*/ argument
27 # define Perror(statp, file, string, error) /*empty*/ argument
32 res_pquery(statp, query, size, stdout);\
Dres_mkquery.c116 res_nmkquery(res_state statp, in res_nmkquery() argument
134 if (statp->options & RES_DEBUG) in res_nmkquery()
147 hp->rd = (statp->options & RES_RECURSE) != 0U; in res_nmkquery()
230 res_nopt(res_state statp, in res_nopt() argument
241 if ((statp->options & RES_DEBUG) != 0U) in res_nopt()
260 if (statp->options & RES_USE_DNSSEC) { in res_nopt()
262 if (statp->options & RES_DEBUG) in res_nopt()
Dres_debug.c137 fp_resstat(const res_state statp, FILE *file) { in fp_resstat() argument
142 if (statp->options & mask) in fp_resstat()
149 do_section(const res_state statp, in do_section() argument
162 sflag = (int)(statp->pfcode & pflag); in do_section()
163 if (statp->pfcode && !sflag) in do_section()
180 (statp->pfcode & RES_PRF_HEAD1)) in do_section()
184 if (rrnum == 0 && sflag != 0 && (statp->pfcode & RES_PRF_HEAD1)) in do_section()
279 res_pquery(const res_state statp, const u_char *msg, int len, FILE *file) { in res_pquery() argument
299 if ((!statp->pfcode) || (statp->pfcode & RES_PRF_HEADX) || rcode) in res_pquery()
303 if ((!statp->pfcode) || (statp->pfcode & RES_PRF_HEADX)) in res_pquery()
[all …]
Dres_private.h20 res_ourserver_p(const res_state statp, const struct sockaddr *sa);
Dres_cache.c2109 _resolv_populate_res_for_net(res_state statp) in _resolv_populate_res_for_net() argument
2111 if (statp == NULL) { in _resolv_populate_res_for_net()
2118 struct resolv_cache_info* info = _find_cache_info_locked(statp->netid); in _resolv_populate_res_for_net()
2122 XLOG("%s: %u\n", __FUNCTION__, statp->netid); in _resolv_populate_res_for_net()
2129 if ((size_t) ai->ai_addrlen <= sizeof(statp->_u._ext.ext->nsaddrs[0])) { in _resolv_populate_res_for_net()
2130 if (statp->_u._ext.ext != NULL) { in _resolv_populate_res_for_net()
2131 memcpy(&statp->_u._ext.ext->nsaddrs[nserv], ai->ai_addr, ai->ai_addrlen); in _resolv_populate_res_for_net()
2132 statp->nsaddr_list[nserv].sin_family = AF_UNSPEC; in _resolv_populate_res_for_net()
2135 <= sizeof(statp->nsaddr_list[0])) { in _resolv_populate_res_for_net()
2136 memcpy(&statp->nsaddr_list[nserv], ai->ai_addr, in _resolv_populate_res_for_net()
[all …]
/bionic/libc/dns/include/
Dresolv_cache.h40 extern void _resolv_populate_res_for_net(struct __res_state* statp);