Home
last modified time | relevance | path

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

/aosp12/bionic/libc/dns/resolv/
H A Dres_init.c228 statp->ndots = 1; in __res_vinit()
229 statp->pfcode = 0; in __res_vinit()
235 statp->_u._ext.ext = malloc(sizeof(*statp->_u._ext.ext)); in __res_vinit()
238 statp->_u._ext.ext->nsaddrs[0].sin = statp->nsaddr; in __res_vinit()
242 statp->nsort = 0; in __res_vinit()
250 (void)strncpy(statp->defdname, cp, sizeof(statp->defdname) - 1); in __res_vinit()
251 statp->defdname[sizeof(statp->defdname) - 1] = '\0'; in __res_vinit()
308 strncpy(statp->defdname, cp, sizeof(statp->defdname) - 1); in __res_vinit()
309 statp->defdname[sizeof(statp->defdname) - 1] = '\0'; in __res_vinit()
324 strncpy(statp->defdname, cp, sizeof(statp->defdname) - 1); in __res_vinit()
[all …]
H A Dres_send.c398 if (EXT(statp).nscount != statp->nscount) { in res_nsend()
442 EXT(statp).nscount = statp->nscount; in res_nsend()
466 statp->nsaddr_list[ns] = statp->nsaddr_list[ns + 1]; in res_nsend()
467 EXT(statp).nssocks[ns] = EXT(statp).nssocks[ns + 1]; in res_nsend()
468 EXT(statp).nstimes[ns] = EXT(statp).nstimes[ns + 1]; in res_nsend()
706 res_state statp; in get_nsaddr()
710 if (!statp->nsaddr_list[n].sin_family && EXT(statp).ext) {
787 if (statp->_vcsock >= 0 && (statp->_flags & RES_F_VC) != 0) { in send_vc()
802 if (statp->_vcsock < 0 || (statp->_flags & RES_F_VC) == 0) { in send_vc()
825 SO_MARK, &statp->_mark, sizeof(statp->_mark)) < 0) { in send_vc()
[all …]
H A 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()
158 if (statp->options & RES_DEBUG) in res_nquery()
171 if (statp->options & RES_DEBUG) in res_nquery()
177 if (statp->options & RES_DEBUG) in res_nquery()
186 if (statp->options & RES_DEBUG) in res_nquery()
222 res_nsearch(res_state statp, in res_nsearch() argument
318 switch (statp->res_h_errno) { in res_nsearch()
378 res_nquerydomain(res_state statp, in res_nquerydomain() argument
[all …]
H A 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()
148 hp->ad = (statp->options & RES_USE_DNSSEC) != 0U; in res_nmkquery()
231 res_nopt(res_state statp, in res_nopt() argument
242 if ((statp->options & RES_DEBUG) != 0U) in res_nopt()
263 if (statp->options & RES_USE_DNSSEC) { in res_nopt()
265 if (statp->options & RES_DEBUG) in res_nopt()
H A Dres_debug.c155 fp_resstat(const res_state statp, FILE *file) { in fp_resstat() argument
160 if (statp->options & mask) in fp_resstat()
167 do_section(const res_state statp, in do_section() argument
180 sflag = (int)(statp->pfcode & pflag); in do_section()
181 if (statp->pfcode && !sflag) in do_section()
198 (statp->pfcode & RES_PRF_HEAD1)) in do_section()
317 if ((!statp->pfcode) || (statp->pfcode & RES_PRF_HEADX) || rcode) in res_pquery()
321 if ((!statp->pfcode) || (statp->pfcode & RES_PRF_HEADX)) in res_pquery()
323 if ((!statp->pfcode) || (statp->pfcode & RES_PRF_HEAD2)) { in res_pquery()
342 if ((!statp->pfcode) || (statp->pfcode & RES_PRF_HEAD1)) { in res_pquery()
[all …]
H A 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);\
H A Dres_cache.c2166 _resolv_populate_res_for_net(res_state statp) in _resolv_populate_res_for_net() argument
2168 if (statp == NULL) { in _resolv_populate_res_for_net()
2179 XLOG("%s: %u\n", __FUNCTION__, statp->netid); in _resolv_populate_res_for_net()
2187 if (statp->_u._ext.ext != NULL) { in _resolv_populate_res_for_net()
2189 statp->nsaddr_list[nserv].sin_family = AF_UNSPEC; in _resolv_populate_res_for_net()
2192 <= sizeof(statp->nsaddr_list[0])) { in _resolv_populate_res_for_net()
2203 statp->nscount = nserv; in _resolv_populate_res_for_net()
2207 memcpy(statp->defdname, info->defdname, sizeof(statp->defdname)); in _resolv_populate_res_for_net()
2208 register char **pp = statp->dnsrch; in _resolv_populate_res_for_net()
2210 while (pp < statp->dnsrch + MAXDNSRCH && *p != -1) { in _resolv_populate_res_for_net()
[all …]
H A Dres_private.h20 res_ourserver_p(const res_state statp, const struct sockaddr *sa);
/aosp12/packages/modules/DnsResolver/
H A Dres_send.cpp623 statp->closeSockets(); in res_nsend()
687 if (statp->tcp_nssock >= 0 && (statp->_flags & RES_F_VC) != 0) { in send_vc()
700 if (statp->tcp_nssock < 0 || (statp->_flags & RES_F_VC) == 0) { in send_vc()
701 if (statp->tcp_nssock >= 0) statp->closeSockets(); in send_vc()
716 const uid_t uid = statp->enforce_dns_uid ? AID_DNS : statp->uid; in send_vc()
717 resolv_tag_socket(statp->tcp_nssock, uid, statp->pid); in send_vc()
719 if (setsockopt(statp->tcp_nssock, SOL_SOCKET, SO_MARK, &statp->_mark, in send_vc()
763 statp->closeSockets(); in send_vc()
1031 const uid_t uid = statp->enforce_dns_uid ? AID_DNS : statp->uid; in send_dg()
1032 resolv_tag_socket(statp->nssocks[*ns], uid, statp->pid); in send_dg()
[all …]
H A Dres_query.cpp102 int res_nquery(res_state statp, const char* name, // domain name in res_nquery() argument
121 statp->netcontext_flags); in res_nquery()
123 (statp->netcontext_flags & in res_nquery()
126 n = res_nopt(statp, n, buf, sizeof(buf), anslen); in res_nquery()
132 n = res_nsend(statp, buf, n, answer, anslen, &rcode, 0); in res_nquery()
137 if ((statp->netcontext_flags & in res_nquery()
139 (statp->_flags & RES_F_EDNS0ERR) && !retried) { in res_nquery()
204 int res_nsearch(res_state statp, const char* name, /* domain name */ in res_nsearch() argument
231 if (dots >= statp->ndots || trailing_dot) { in res_nsearch()
253 resolv_populate_res_for_net(statp); in res_nsearch()
[all …]
H A DDnsTlsDispatcher.cpp109 res_state statp, const Slice query, in query() argument
112 getOrderedAndUsableServerList(tlsServers, statp->netid, statp->_mark)); in query()
120 statp->event->mutable_dns_query_events()->add_dns_query_event(); in query()
124 code = this->query(server, statp->netid, statp->_mark, query, ans, resplen, in query()
140 resolv_stats_add(statp->netid, IPSockAddr::toIPSockAddr(server.ss), dnsQueryEvent); in query()
144 resolv_stats_add(statp->netid, IPSockAddr::toIPSockAddr(server.ss), dnsQueryEvent); in query()
151 resolv_stats_add(statp->netid, IPSockAddr::toIPSockAddr(server.ss), dnsQueryEvent); in query()
155 resolv_stats_add(statp->netid, IPSockAddr::toIPSockAddr(server.ss), dnsQueryEvent); in query()
H A Dres_mkquery.cpp194 int res_nopt(res_state statp, int n0, /* current offset in buffer */ in res_nopt() argument
221 if (statp->netcontext_flags & NET_CONTEXT_FLAG_USE_DNS_OVER_TLS) { in res_nopt()
H A Dres_cache.cpp1709 void resolv_populate_res_for_net(ResState* statp) { in resolv_populate_res_for_net() argument
1710 if (statp == nullptr) { in resolv_populate_res_for_net()
1713 LOG(INFO) << __func__ << ": netid=" << statp->netid; in resolv_populate_res_for_net()
1716 NetConfig* info = find_netconfig_locked(statp->netid); in resolv_populate_res_for_net()
1720 statp->sort_nameservers = sortNameservers; in resolv_populate_res_for_net()
1721 statp->nsaddrs = sortNameservers ? info->dnsStats.getSortedServers(PROTO_UDP) in resolv_populate_res_for_net()
1723 statp->search_domains = info->search_domains; in resolv_populate_res_for_net()
1724 statp->tc_mode = info->tc_mode; in resolv_populate_res_for_net()
1725 statp->enforce_dns_uid = info->enforceDnsUid; in resolv_populate_res_for_net()
H A Dresolv_cache.h49 void resolv_populate_res_for_net(ResState* statp);
H A DDnsTlsDispatcher.h54 res_state _Nonnull statp, const netdutils::Slice query,
H A Dresolv_private.h176 int res_nsend(res_state statp, const uint8_t* buf, int buflen, uint8_t* ans, int anssiz, int* rcode,
/aosp12/bionic/libc/dns/include/
H A Dresolv_cache.h40 extern void _resolv_populate_res_for_net(struct __res_state* statp);