ares_gethostbyname.c
Go to the documentation of this file.
1 
2 /* Copyright 1998, 2011, 2013 by the Massachusetts Institute of Technology.
3  *
4  * Permission to use, copy, modify, and distribute this
5  * software and its documentation for any purpose and without
6  * fee is hereby granted, provided that the above copyright
7  * notice appear in all copies and that both that copyright
8  * notice and this permission notice appear in supporting
9  * documentation, and that the name of M.I.T. not be used in
10  * advertising or publicity pertaining to distribution of the
11  * software without specific, written prior permission.
12  * M.I.T. makes no representations about the suitability of
13  * this software for any purpose. It is provided "as is"
14  * without express or implied warranty.
15  */
16 
17 #include "ares_setup.h"
18 
19 #ifdef HAVE_NETINET_IN_H
20 # include <netinet/in.h>
21 #endif
22 #ifdef HAVE_NETDB_H
23 # include <netdb.h>
24 #endif
25 #ifdef HAVE_ARPA_INET_H
26 # include <arpa/inet.h>
27 #endif
28 
29 #include "ares_nameser.h"
30 
31 #ifdef HAVE_STRINGS_H
32 #include <strings.h>
33 #endif
34 
35 #include "ares.h"
36 #include "ares_inet_net_pton.h"
37 #include "bitncmp.h"
38 #include "ares_platform.h"
39 #include "ares_nowarn.h"
40 #include "ares_private.h"
41 
42 #ifdef WATT32
43 #undef WIN32
44 #endif
45 
46 struct host_query {
47  /* Arguments passed to ares_gethostbyname() */
49  char *name;
51  void *arg;
52  int sent_family; /* this family is what was is being used */
53  int want_family; /* this family is what is asked for in the API */
54  const char *remaining_lookups;
55  int timeouts;
56 };
57 
58 static void next_lookup(struct host_query *hquery, int status_code);
59 static void host_callback(void *arg, int status, int timeouts,
60  unsigned char *abuf, int alen);
61 static void end_hquery(struct host_query *hquery, int status,
62  struct hostent *host);
63 static int fake_hostent(const char *name, int family,
65 static int file_lookup(const char *name, int family, struct hostent **host);
66 static void sort_addresses(struct hostent *host,
67  const struct apattern *sortlist, int nsort);
68 static void sort6_addresses(struct hostent *host,
69  const struct apattern *sortlist, int nsort);
70 static int get_address_index(const struct in_addr *addr,
71  const struct apattern *sortlist, int nsort);
72 static int get6_address_index(const struct ares_in6_addr *addr,
73  const struct apattern *sortlist, int nsort);
74 
75 void ares_gethostbyname(ares_channel channel, const char *name, int family,
77 {
78  struct host_query *hquery;
79 
80  /* Right now we only know how to look up Internet addresses - and unspec
81  means try both basically. */
82  switch (family) {
83  case AF_INET:
84  case AF_INET6:
85  case AF_UNSPEC:
86  break;
87  default:
88  callback(arg, ARES_ENOTIMP, 0, NULL);
89  return;
90  }
91 
92  /* Per RFC 7686, reject queries for ".onion" domain names with NXDOMAIN. */
94  {
95  callback(arg, ARES_ENOTFOUND, 0, NULL);
96  return;
97  }
98 
99  if (fake_hostent(name, family, callback, arg))
100  return;
101 
102  /* Allocate and fill in the host query structure. */
103  hquery = ares_malloc(sizeof(struct host_query));
104  if (!hquery)
105  {
106  callback(arg, ARES_ENOMEM, 0, NULL);
107  return;
108  }
109  hquery->channel = channel;
110  hquery->name = ares_strdup(name);
111  hquery->want_family = family;
112  hquery->sent_family = -1; /* nothing is sent yet */
113  if (!hquery->name) {
114  ares_free(hquery);
115  callback(arg, ARES_ENOMEM, 0, NULL);
116  return;
117  }
118  hquery->callback = callback;
119  hquery->arg = arg;
120  hquery->remaining_lookups = channel->lookups;
121  hquery->timeouts = 0;
122 
123  /* Start performing lookups according to channel->lookups. */
124  next_lookup(hquery, ARES_ECONNREFUSED /* initial error code */);
125 }
126 
127 static void next_lookup(struct host_query *hquery, int status_code)
128 {
129  const char *p;
130  struct hostent *host;
131  int status = status_code;
132 
133  for (p = hquery->remaining_lookups; *p; p++)
134  {
135  switch (*p)
136  {
137  case 'b':
138  /* DNS lookup */
139  hquery->remaining_lookups = p + 1;
140  if ((hquery->want_family == AF_INET6) ||
141  (hquery->want_family == AF_UNSPEC)) {
142  /* if inet6 or unspec, start out with AAAA */
143  hquery->sent_family = AF_INET6;
144  ares_search(hquery->channel, hquery->name, C_IN, T_AAAA,
145  host_callback, hquery);
146  }
147  else {
148  hquery->sent_family = AF_INET;
149  ares_search(hquery->channel, hquery->name, C_IN, T_A,
150  host_callback, hquery);
151  }
152  return;
153 
154  case 'f':
155  /* Host file lookup */
156  status = file_lookup(hquery->name, hquery->want_family, &host);
157 
158  /* this status check below previously checked for !ARES_ENOTFOUND,
159  but we should not assume that this single error code is the one
160  that can occur, as that is in fact no longer the case */
161  if (status == ARES_SUCCESS)
162  {
163  end_hquery(hquery, status, host);
164  return;
165  }
166  status = status_code; /* Use original status code */
167  break;
168  }
169  }
170  end_hquery(hquery, status, NULL);
171 }
172 
173 static void host_callback(void *arg, int status, int timeouts,
174  unsigned char *abuf, int alen)
175 {
176  struct host_query *hquery = (struct host_query *) arg;
177  ares_channel channel = hquery->channel;
178  struct hostent *host = NULL;
179 
180  hquery->timeouts += timeouts;
181  if (status == ARES_SUCCESS)
182  {
183  if (hquery->sent_family == AF_INET)
184  {
185  status = ares_parse_a_reply(abuf, alen, &host, NULL, NULL);
186  if (host && channel->nsort)
187  sort_addresses(host, channel->sortlist, channel->nsort);
188  }
189  else if (hquery->sent_family == AF_INET6)
190  {
191  status = ares_parse_aaaa_reply(abuf, alen, &host, NULL, NULL);
192  if ((status == ARES_ENODATA || status == ARES_EBADRESP ||
193  (status == ARES_SUCCESS && host && host->h_addr_list[0] == NULL)) &&
194  hquery->want_family == AF_UNSPEC) {
195  /* The query returned something but either there were no AAAA
196  records (e.g. just CNAME) or the response was malformed. Try
197  looking up A instead. */
198  if (host)
199  ares_free_hostent(host);
200  hquery->sent_family = AF_INET;
201  ares_search(hquery->channel, hquery->name, C_IN, T_A,
202  host_callback, hquery);
203  return;
204  }
205  if (host && channel->nsort)
206  sort6_addresses(host, channel->sortlist, channel->nsort);
207  }
208  if (status == ARES_SUCCESS && host && host->h_addr_list[0] == NULL)
209  {
210  /* The query returned something but had no A/AAAA record
211  (even after potentially retrying AAAA with A)
212  so we should treat this as an error */
214  }
215  end_hquery(hquery, status, host);
216  }
217  else if ((status == ARES_ENODATA || status == ARES_EBADRESP ||
218  status == ARES_ETIMEOUT) && (hquery->sent_family == AF_INET6 &&
219  hquery->want_family == AF_UNSPEC))
220  {
221  /* The AAAA query yielded no useful result. Now look up an A instead. */
222  hquery->sent_family = AF_INET;
223  ares_search(hquery->channel, hquery->name, C_IN, T_A, host_callback,
224  hquery);
225  }
226  else if (status == ARES_EDESTRUCTION)
227  end_hquery(hquery, status, NULL);
228  else
229  next_lookup(hquery, status);
230 }
231 
232 static void end_hquery(struct host_query *hquery, int status,
233  struct hostent *host)
234 {
235  hquery->callback(hquery->arg, status, hquery->timeouts, host);
236  if (host)
237  ares_free_hostent(host);
238  ares_free(hquery->name);
239  ares_free(hquery);
240 }
241 
242 /* If the name looks like an IP address, fake up a host entry, end the
243  * query immediately, and return true. Otherwise return false.
244  */
245 static int fake_hostent(const char *name, int family,
247 {
248  struct hostent hostent;
249  char *aliases[1] = { NULL };
250  char *addrs[2];
251  int result = 0;
252  struct in_addr in;
253  struct ares_in6_addr in6;
254 
255  if (family == AF_INET || family == AF_UNSPEC)
256  {
257  /* It only looks like an IP address if it's all numbers and dots. */
258  int numdots = 0, valid = 1;
259  const char *p;
260  for (p = name; *p; p++)
261  {
262  if (!ISDIGIT(*p) && *p != '.') {
263  valid = 0;
264  break;
265  } else if (*p == '.') {
266  numdots++;
267  }
268  }
269 
270  /* if we don't have 3 dots, it is illegal
271  * (although inet_pton doesn't think so).
272  */
273  if (numdots != 3 || !valid) {
274  result = 0;
275  } else {
276  result = (ares_inet_pton(AF_INET, name, &in) < 1 ? 0 : 1);
277  }
278 
279  /*
280  * Set address family in case of failure,
281  * as we will try to convert it later afterwards
282  */
283  family = result ? AF_INET : AF_INET6;
284  }
285  if (family == AF_INET6)
286  result = (ares_inet_pton(AF_INET6, name, &in6) < 1 ? 0 : 1);
287 
288  if (!result)
289  return 0;
290 
291  if (family == AF_INET)
292  {
293  hostent.h_length = (int)sizeof(struct in_addr);
294  addrs[0] = (char *)&in;
295  }
296  else if (family == AF_INET6)
297  {
298  hostent.h_length = (int)sizeof(struct ares_in6_addr);
299  addrs[0] = (char *)&in6;
300  }
301  /* Duplicate the name, to avoid a constness violation. */
302  hostent.h_name = ares_strdup(name);
303  if (!hostent.h_name)
304  {
305  callback(arg, ARES_ENOMEM, 0, NULL);
306  return 1;
307  }
308 
309  /* Fill in the rest of the host structure and terminate the query. */
310  addrs[1] = NULL;
311  hostent.h_aliases = aliases;
312  hostent.h_addrtype = aresx_sitoss(family);
313  hostent.h_addr_list = addrs;
314  callback(arg, ARES_SUCCESS, 0, &hostent);
315 
316  ares_free((char *)(hostent.h_name));
317  return 1;
318 }
319 
320 /* This is an API method */
322  int family, struct hostent **host)
323 {
324  int result;
325 
326  /* We only take the channel to ensure that ares_init() been called. */
327  if(channel == NULL)
328  {
329  /* Anything will do, really. This seems fine, and is consistent with
330  other error cases. */
331  *host = NULL;
332  return ARES_ENOTFOUND;
333  }
334 
335  /* Just chain to the internal implementation we use here; it's exactly
336  * what we want.
337  */
338  result = file_lookup(name, family, host);
339  if(result != ARES_SUCCESS)
340  {
341  /* We guarantee a NULL hostent on failure. */
342  *host = NULL;
343  }
344  return result;
345 }
346 
347 static int file_lookup(const char *name, int family, struct hostent **host)
348 {
349  FILE *fp;
350  char **alias;
351  int status;
352  int error;
353 
354 #ifdef WIN32
355  char PATH_HOSTS[MAX_PATH];
356  win_platform platform;
357 
358  PATH_HOSTS[0] = '\0';
359 
360  platform = ares__getplatform();
361 
362  if (platform == WIN_NT) {
363  char tmp[MAX_PATH];
364  HKEY hkeyHosts;
365 
366  if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0, KEY_READ,
367  &hkeyHosts) == ERROR_SUCCESS)
368  {
369  DWORD dwLength = MAX_PATH;
370  RegQueryValueExA(hkeyHosts, DATABASEPATH, NULL, NULL, (LPBYTE)tmp,
371  &dwLength);
372  ExpandEnvironmentStringsA(tmp, PATH_HOSTS, MAX_PATH);
373  RegCloseKey(hkeyHosts);
374  }
375  }
376  else if (platform == WIN_9X)
377  GetWindowsDirectoryA(PATH_HOSTS, MAX_PATH);
378  else
379  return ARES_ENOTFOUND;
380 
381  strcat(PATH_HOSTS, WIN_PATH_HOSTS);
382 
383 #elif defined(WATT32)
384  const char *PATH_HOSTS = _w32_GetHostsFile();
385 
386  if (!PATH_HOSTS)
387  return ARES_ENOTFOUND;
388 #endif
389 
390  /* Per RFC 7686, reject queries for ".onion" domain names with NXDOMAIN. */
392  return ARES_ENOTFOUND;
393 
394 
395  fp = fopen(PATH_HOSTS, "r");
396  if (!fp)
397  {
398  error = ERRNO;
399  switch(error)
400  {
401  case ENOENT:
402  case ESRCH:
403  return ARES_ENOTFOUND;
404  default:
405  DEBUGF(fprintf(stderr, "fopen() failed with error: %d %s\n",
406  error, strerror(error)));
407  DEBUGF(fprintf(stderr, "Error opening file: %s\n",
408  PATH_HOSTS));
409  *host = NULL;
410  return ARES_EFILE;
411  }
412  }
413  while ((status = ares__get_hostent(fp, family, host)) == ARES_SUCCESS)
414  {
415  if (strcasecmp((*host)->h_name, name) == 0)
416  break;
417  for (alias = (*host)->h_aliases; *alias; alias++)
418  {
419  if (strcasecmp(*alias, name) == 0)
420  break;
421  }
422  if (*alias)
423  break;
424  ares_free_hostent(*host);
425  }
426  fclose(fp);
427  if (status == ARES_EOF)
429  if (status != ARES_SUCCESS)
430  *host = NULL;
431  return status;
432 }
433 
434 static void sort_addresses(struct hostent *host,
435  const struct apattern *sortlist, int nsort)
436 {
437  struct in_addr a1, a2;
438  int i1, i2, ind1, ind2;
439 
440  /* This is a simple insertion sort, not optimized at all. i1 walks
441  * through the address list, with the loop invariant that everything
442  * to the left of i1 is sorted. In the loop body, the value at i1 is moved
443  * back through the list (via i2) until it is in sorted order.
444  */
445  for (i1 = 0; host->h_addr_list[i1]; i1++)
446  {
447  memcpy(&a1, host->h_addr_list[i1], sizeof(struct in_addr));
448  ind1 = get_address_index(&a1, sortlist, nsort);
449  for (i2 = i1 - 1; i2 >= 0; i2--)
450  {
451  memcpy(&a2, host->h_addr_list[i2], sizeof(struct in_addr));
452  ind2 = get_address_index(&a2, sortlist, nsort);
453  if (ind2 <= ind1)
454  break;
455  memcpy(host->h_addr_list[i2 + 1], &a2, sizeof(struct in_addr));
456  }
457  memcpy(host->h_addr_list[i2 + 1], &a1, sizeof(struct in_addr));
458  }
459 }
460 
461 /* Find the first entry in sortlist which matches addr. Return nsort
462  * if none of them match.
463  */
464 static int get_address_index(const struct in_addr *addr,
465  const struct apattern *sortlist,
466  int nsort)
467 {
468  int i;
469 
470  for (i = 0; i < nsort; i++)
471  {
472  if (sortlist[i].family != AF_INET)
473  continue;
474  if (sortlist[i].type == PATTERN_MASK)
475  {
476  if ((addr->s_addr & sortlist[i].mask.addr4.s_addr)
477  == sortlist[i].addrV4.s_addr)
478  break;
479  }
480  else
481  {
482  if (!ares__bitncmp(&addr->s_addr, &sortlist[i].addrV4.s_addr,
483  sortlist[i].mask.bits))
484  break;
485  }
486  }
487  return i;
488 }
489 
490 static void sort6_addresses(struct hostent *host,
491  const struct apattern *sortlist, int nsort)
492 {
493  struct ares_in6_addr a1, a2;
494  int i1, i2, ind1, ind2;
495 
496  /* This is a simple insertion sort, not optimized at all. i1 walks
497  * through the address list, with the loop invariant that everything
498  * to the left of i1 is sorted. In the loop body, the value at i1 is moved
499  * back through the list (via i2) until it is in sorted order.
500  */
501  for (i1 = 0; host->h_addr_list[i1]; i1++)
502  {
503  memcpy(&a1, host->h_addr_list[i1], sizeof(struct ares_in6_addr));
504  ind1 = get6_address_index(&a1, sortlist, nsort);
505  for (i2 = i1 - 1; i2 >= 0; i2--)
506  {
507  memcpy(&a2, host->h_addr_list[i2], sizeof(struct ares_in6_addr));
508  ind2 = get6_address_index(&a2, sortlist, nsort);
509  if (ind2 <= ind1)
510  break;
511  memcpy(host->h_addr_list[i2 + 1], &a2, sizeof(struct ares_in6_addr));
512  }
513  memcpy(host->h_addr_list[i2 + 1], &a1, sizeof(struct ares_in6_addr));
514  }
515 }
516 
517 /* Find the first entry in sortlist which matches addr. Return nsort
518  * if none of them match.
519  */
520 static int get6_address_index(const struct ares_in6_addr *addr,
521  const struct apattern *sortlist,
522  int nsort)
523 {
524  int i;
525 
526  for (i = 0; i < nsort; i++)
527  {
528  if (sortlist[i].family != AF_INET6)
529  continue;
530  if (!ares__bitncmp(addr, &sortlist[i].addrV6, sortlist[i].mask.bits))
531  break;
532  }
533  return i;
534 }
_gevent_test_main.result
result
Definition: _gevent_test_main.py:96
get6_address_index
static int get6_address_index(const struct ares_in6_addr *addr, const struct apattern *sortlist, int nsort)
Definition: ares_gethostbyname.c:520
end_hquery
static void end_hquery(struct host_query *hquery, int status, struct hostent *host)
Definition: ares_gethostbyname.c:232
ARES_ENOMEM
#define ARES_ENOMEM
Definition: ares.h:117
ares_inet_pton
CARES_EXTERN int ares_inet_pton(int af, const char *src, void *dst)
Definition: inet_net_pton.c:418
T_A
#define T_A
Definition: ares_nameser.h:310
next_lookup
static void next_lookup(struct host_query *hquery, int status_code)
Definition: ares_gethostbyname.c:127
AF_INET6
#define AF_INET6
Definition: ares_setup.h:208
get_address_index
static int get_address_index(const struct in_addr *addr, const struct apattern *sortlist, int nsort)
Definition: ares_gethostbyname.c:464
ares.h
host_query::callback
ares_host_callback callback
Definition: ares_gethostbyname.c:50
ares__bitncmp
int ares__bitncmp(const void *l, const void *r, int n)
Definition: bitncmp.c:36
ares_strdup
char * ares_strdup(const char *s1)
Definition: ares_strdup.c:23
ISDIGIT
#define ISDIGIT(x)
Definition: setup_once.h:276
ares_inet_net_pton.h
ares_gethostbyname_file
int ares_gethostbyname_file(ares_channel channel, const char *name, int family, struct hostent **host)
Definition: ares_gethostbyname.c:321
error
grpc_error_handle error
Definition: retry_filter.cc:499
ares_host_callback
void(* ares_host_callback)(void *arg, int status, int timeouts, struct hostent *hostent)
Definition: ares.h:296
status
absl::Status status
Definition: rls.cc:251
apattern::mask
union apattern::@388 mask
host_query::sent_family
int sent_family
Definition: ares_getaddrinfo.c:68
setup.name
name
Definition: setup.py:542
ares__is_onion_domain
int ares__is_onion_domain(const char *name)
Definition: ares_getnameinfo.c:438
ARES_ETIMEOUT
#define ARES_ETIMEOUT
Definition: ares.h:114
xds_manager.p
p
Definition: xds_manager.py:60
host_query::channel
ares_channel channel
Definition: ares_getaddrinfo.c:62
host_query::name
char * name
Definition: ares_getaddrinfo.c:63
DEBUGF
#define DEBUGF(x)
Definition: setup_once.h:402
PATTERN_MASK
#define PATTERN_MASK
Definition: ares_private.h:240
python_utils.port_server.stderr
stderr
Definition: port_server.py:51
addrV6
#define addrV6
Definition: ares_private.h:143
apattern::addr4
struct in_addr addr4
Definition: ares_private.h:246
ARES_EBADRESP
#define ARES_EBADRESP
Definition: ares.h:112
ares_free_hostent
CARES_EXTERN void ares_free_hostent(struct hostent *host)
Definition: ares_free_hostent.c:26
memcpy
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
in
const char * in
Definition: third_party/abseil-cpp/absl/strings/internal/str_format/parser_test.cc:391
host_callback
static void host_callback(void *arg, int status, int timeouts, unsigned char *abuf, int alen)
Definition: ares_gethostbyname.c:173
ARES_ENOTFOUND
#define ARES_ENOTFOUND
Definition: ares.h:104
host_query::remaining_lookups
const char * remaining_lookups
Definition: ares_getaddrinfo.c:70
channel
wrapped_grpc_channel * channel
Definition: src/php/ext/grpc/call.h:33
ares_malloc
void *(* ares_malloc)(size_t size)=default_malloc
Definition: ares_library_init.c:58
a2
T::first_type a2
Definition: abseil-cpp/absl/container/internal/hash_function_defaults_test.cc:307
xds_interop_client.int
int
Definition: xds_interop_client.py:113
i1
int i1
Definition: abseil-cpp/absl/container/btree_test.cc:2772
ARES_ENODATA
#define ARES_ENODATA
Definition: ares.h:101
host_query::arg
void * arg
Definition: ares_getaddrinfo.c:66
host_query
Definition: ares_getaddrinfo.c:60
apattern
Definition: ares_private.h:243
valid
@ valid
Definition: base64_test.cc:37
arg
Definition: cmdline.cc:40
T_AAAA
#define T_AAAA
Definition: ares_nameser.h:391
aresx_sitoss
short aresx_sitoss(int sinum)
Definition: ares_nowarn.c:119
ERRNO
#define ERRNO
Definition: fake_udp_and_tcp_server.cc:40
ares_platform.h
callback
static void callback(void *arg, int status, int timeouts, struct hostent *host)
Definition: acountry.c:224
a1
T::first_type a1
Definition: abseil-cpp/absl/container/internal/hash_function_defaults_test.cc:305
ARES_SUCCESS
#define ARES_SUCCESS
Definition: ares.h:98
apattern::bits
unsigned short bits
Definition: ares_private.h:253
host_query::timeouts
int timeouts
Definition: ares_getaddrinfo.c:69
ARES_ECONNREFUSED
#define ARES_ECONNREFUSED
Definition: ares.h:113
ares_setup.h
sort6_addresses
static void sort6_addresses(struct hostent *host, const struct apattern *sortlist, int nsort)
Definition: ares_gethostbyname.c:490
ares_channeldata
Definition: ares_private.h:266
bitncmp.h
ARES_EFILE
#define ARES_EFILE
Definition: ares.h:116
PATH_HOSTS
#define PATH_HOSTS
Definition: ares_private.h:94
benchmark.FILE
FILE
Definition: benchmark.py:21
C_IN
#define C_IN
Definition: ares_nameser.h:292
ares_search
CARES_EXTERN void ares_search(ares_channel channel, const char *name, int dnsclass, int type, ares_callback callback, void *arg)
Definition: ares_search.c:47
ares_in6_addr
Definition: ares.h:514
grpc::fclose
fclose(creds_file)
file_lookup
static int file_lookup(const char *name, int family, struct hostent **host)
Definition: ares_gethostbyname.c:347
ares_parse_a_reply
CARES_EXTERN int ares_parse_a_reply(const unsigned char *abuf, int alen, struct hostent **host, struct ares_addrttl *addrttls, int *naddrttls)
Definition: ares_parse_a_reply.c:44
ares__get_hostent
int ares__get_hostent(FILE *fp, int family, struct hostent **host)
Definition: ares__get_hostent.c:34
host_query::want_family
int want_family
Definition: ares_gethostbyname.c:53
ares_free
void(* ares_free)(void *ptr)=default_free
Definition: ares_library_init.c:60
arg
struct arg arg
sort_addresses
static void sort_addresses(struct hostent *host, const struct apattern *sortlist, int nsort)
Definition: ares_gethostbyname.c:434
ares_gethostbyname
void ares_gethostbyname(ares_channel channel, const char *name, int family, ares_host_callback callback, void *arg)
Definition: ares_gethostbyname.c:75
ares_private.h
i2
int i2
Definition: abseil-cpp/absl/container/btree_test.cc:2773
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37
autogen_x86imm.tmp
tmp
Definition: autogen_x86imm.py:12
ares_nameser.h
host_query::callback
ares_addrinfo_callback callback
Definition: ares_getaddrinfo.c:65
ARES_EOF
#define ARES_EOF
Definition: ares.h:115
ARES_ENOTIMP
#define ARES_ENOTIMP
Definition: ares.h:105
platform
Definition: test_arm_regression.c:18
ares_nowarn.h
addr
struct sockaddr_in addr
Definition: libuv/docs/code/tcp-echo-server/main.c:10
ARES_EDESTRUCTION
#define ARES_EDESTRUCTION
Definition: ares.h:118
strcasecmp
#define strcasecmp(p1, p2)
Definition: ares_private.h:114
i
uint64_t i
Definition: abseil-cpp/absl/container/btree_benchmark.cc:230
fake_hostent
static int fake_hostent(const char *name, int family, ares_host_callback callback, void *arg)
Definition: ares_gethostbyname.c:245
generate_build_files.platform
dictionary platform
Definition: generate_build_files.py:990
ares_parse_aaaa_reply
CARES_EXTERN int ares_parse_aaaa_reply(const unsigned char *abuf, int alen, struct hostent **host, struct ares_addr6ttl *addrttls, int *naddrttls)
Definition: ares_parse_aaaa_reply.c:46


grpc
Author(s):
autogenerated on Fri May 16 2025 02:57:43