ares_private.h
Go to the documentation of this file.
1 #ifndef __ARES_PRIVATE_H
2 #define __ARES_PRIVATE_H
3 
4 
5 /* Copyright 1998 by the Massachusetts Institute of Technology.
6  * Copyright (C) 2004-2010 by Daniel Stenberg
7  *
8  * Permission to use, copy, modify, and distribute this
9  * software and its documentation for any purpose and without
10  * fee is hereby granted, provided that the above copyright
11  * notice appear in all copies and that both that copyright
12  * notice and this permission notice appear in supporting
13  * documentation, and that the name of M.I.T. not be used in
14  * advertising or publicity pertaining to distribution of the
15  * software without specific, written prior permission.
16  * M.I.T. makes no representations about the suitability of
17  * this software for any purpose. It is provided "as is"
18  * without express or implied warranty.
19  */
20 
21 /*
22  * Define WIN32 when build target is Win32 API
23  */
24 
25 #if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
26 #define WIN32
27 #endif
28 
29 #ifdef HAVE_NETINET_IN_H
30 #include <netinet/in.h>
31 #endif
32 
33 #ifdef WATT32
34 #include <tcp.h>
35 #include <sys/ioctl.h>
36 #define writev(s,v,c) writev_s(s,v,c)
37 #define HAVE_WRITEV 1
38 #endif
39 
40 #define DEFAULT_TIMEOUT 5000 /* milliseconds */
41 #define DEFAULT_TRIES 4
42 #ifndef INADDR_NONE
43 #define INADDR_NONE 0xffffffff
44 #endif
45 
46 #ifdef CARES_EXPOSE_STATICS
47 /* Make some internal functions visible for testing */
48 #define STATIC_TESTABLE
49 #else
50 #define STATIC_TESTABLE static
51 #endif
52 
53 /* By using a double cast, we can get rid of the bogus warning of
54  * warning: cast from 'const struct sockaddr *' to 'const struct sockaddr_in6 *' increases required alignment from 1 to 4 [-Wcast-align]
55  */
56 #define CARES_INADDR_CAST(type, var) ((type)((void *)var))
57 
58 #if defined(WIN32) && !defined(WATT32)
59 
60 #define WIN_NS_9X "System\\CurrentControlSet\\Services\\VxD\\MSTCP"
61 #define WIN_NS_NT_KEY "System\\CurrentControlSet\\Services\\Tcpip\\Parameters"
62 #define WIN_DNSCLIENT "Software\\Policies\\Microsoft\\System\\DNSClient"
63 #define WIN_NT_DNSCLIENT "Software\\Policies\\Microsoft\\Windows NT\\DNSClient"
64 #define NAMESERVER "NameServer"
65 #define DHCPNAMESERVER "DhcpNameServer"
66 #define DATABASEPATH "DatabasePath"
67 #define WIN_PATH_HOSTS "\\hosts"
68 #define SEARCHLIST_KEY "SearchList"
69 #define PRIMARYDNSSUFFIX_KEY "PrimaryDNSSuffix"
70 #define INTERFACES_KEY "Interfaces"
71 #define DOMAIN_KEY "Domain"
72 #define DHCPDOMAIN_KEY "DhcpDomain"
73 
74 #elif defined(WATT32)
75 
76 #define PATH_RESOLV_CONF "/dev/ENV/etc/resolv.conf"
77 W32_FUNC const char *_w32_GetHostsFile (void);
78 
79 #elif defined(NETWARE)
80 
81 #define PATH_RESOLV_CONF "sys:/etc/resolv.cfg"
82 #define PATH_HOSTS "sys:/etc/hosts"
83 
84 #elif defined(__riscos__)
85 
86 #define PATH_HOSTS "InetDBase:Hosts"
87 
88 #else
89 
90 #define PATH_RESOLV_CONF "/etc/resolv.conf"
91 #ifdef ETC_INET
92 #define PATH_HOSTS "/etc/inet/hosts"
93 #else
94 #define PATH_HOSTS "/etc/hosts"
95 #endif
96 
97 #endif
98 
99 #define ARES_ID_KEY_LEN 31
100 
101 #include "ares_ipv6.h"
102 #include "ares_llist.h"
103 
104 #ifndef HAVE_GETENV
105 # include "ares_getenv.h"
106 # define getenv(ptr) ares_getenv(ptr)
107 #endif
108 
109 #include "ares_strdup.h"
110 #include "ares_strsplit.h"
111 
112 #ifndef HAVE_STRCASECMP
113 # include "ares_strcasecmp.h"
114 # define strcasecmp(p1,p2) ares_strcasecmp(p1,p2)
115 #endif
116 
117 #ifndef HAVE_STRNCASECMP
118 # include "ares_strcasecmp.h"
119 # define strncasecmp(p1,p2,n) ares_strncasecmp(p1,p2,n)
120 #endif
121 
122 #ifndef HAVE_WRITEV
123 # include "ares_writev.h"
124 # define writev(s,ptr,cnt) ares_writev(s,ptr,cnt)
125 #endif
126 
127 /********* EDNS defines section ******/
128 #define EDNSPACKETSZ 1280 /* Reasonable UDP payload size, as suggested
129  in RFC2671 */
130 #define MAXENDSSZ 4096 /* Maximum (local) limit for edns packet size */
131 #define EDNSFIXEDSZ 11 /* Size of EDNS header */
132 /********* EDNS defines section ******/
133 
134 struct ares_addr {
135  int family;
136  union {
137  struct in_addr addr4;
138  struct ares_in6_addr addr6;
139  } addr;
140  int udp_port; /* stored in network order */
141  int tcp_port; /* stored in network order */
142 };
143 #define addrV4 addr.addr4
144 #define addrV6 addr.addr6
145 
146 struct query;
147 
148 struct send_request {
149  /* Remaining data to send */
150  const unsigned char *data;
151  size_t len;
152 
153  /* The query for which we're sending this data */
154  struct query* owner_query;
155  /* The buffer we're using, if we have our own copy of the packet */
156  unsigned char *data_storage;
157 
158  /* Next request in queue */
159  struct send_request *next;
160 };
161 
162 struct server_state {
163  struct ares_addr addr;
166 
167  /* Mini-buffer for reading the length word */
168  unsigned char tcp_lenbuf[2];
170  int tcp_length;
171 
172  /* Buffer for reading actual TCP data */
173  unsigned char *tcp_buffer;
174  int tcp_buffer_pos;
175 
176  /* TCP output queue */
178  struct send_request *qtail;
179 
180  /* Which incarnation of this connection is this? We don't want to
181  * retransmit requests into the very same socket, but if the server
182  * closes on us and we re-open the connection, then we do want to
183  * re-send. */
185 
186  /* Circular, doubly-linked list of outstanding queries to this server */
188 
189  /* Link back to owning channel */
191 
192  /* Is this server broken? We mark connections as broken when a
193  * request that is queued for sending times out.
194  */
195  int is_broken;
196 };
197 
198 /* State to represent a DNS query */
199 struct query {
200  /* Query ID from qbuf, for faster lookup, and current timeout */
201  unsigned short qid;
202  struct timeval timeout;
203 
204  /*
205  * Links for the doubly-linked lists in which we insert a query.
206  * These circular, doubly-linked lists that are hash-bucketed based
207  * the attributes we care about, help making most important
208  * operations O(1).
209  */
210  struct list_node queries_by_qid; /* hopefully in same cache line as qid */
213  struct list_node all_queries;
214 
215  /* Query buf with length at beginning, for TCP transmission */
216  unsigned char *tcpbuf;
217  int tcplen;
218 
219  /* Arguments passed to ares_send() (qbuf points into tcpbuf) */
220  const unsigned char *qbuf;
221  int qlen;
223  void *arg;
224 
225  /* Query status */
226  int try_count; /* Number of times we tried this query already. */
227  int server; /* Server this query has last been sent to. */
228  struct query_server_info *server_info; /* per-server state */
231  int timeouts; /* number of timeouts we saw for this request */
232 };
233 
234 /* Per-server state for a query */
236  int skip_server; /* should we skip server, due to errors, etc? */
237  int tcp_connection_generation; /* into which TCP connection did we send? */
238 };
239 
240 /* An IP address pattern; matches an IP address X if X & mask == addr */
241 #define PATTERN_MASK 0x1
242 #define PATTERN_CIDR 0x2
243 
244 struct apattern {
245  union
246  {
247  struct in_addr addr4;
248  struct ares_in6_addr addr6;
249  } addr;
250  union
251  {
252  struct in_addr addr4;
254  unsigned short bits;
255  } mask;
256  int family;
257  unsigned short type;
258 };
259 
260 typedef struct rc4_key
261 {
262  unsigned char state[256];
263  unsigned char x;
264  unsigned char y;
265 } rc4_key;
266 
267 struct ares_channeldata {
268  /* Configuration data */
269  int flags;
270  int timeout; /* in milliseconds */
271  int tries;
272  int ndots;
273  int rotate; /* if true, all servers specified are used */
274  int udp_port; /* stored in network order */
275  int tcp_port; /* stored in network order */
278  char **domains;
279  int ndomains;
281  int nsort;
282  char *lookups;
283  int ednspsz;
284 
285  /* For binding to local devices and/or IP addresses. Leave
286  * them null/zero for no binding.
287  */
288  char local_dev_name[32];
289  unsigned int local_ip4;
290  unsigned char local_ip6[16];
291 
292  int optmask; /* the option bitfield passed in at init time */
293 
294  /* Server addresses and communications state */
296  int nservers;
297 
298  /* ID to use for next query */
299  unsigned short next_id;
300  /* key to use when generating new ids */
301  rc4_key id_key;
302 
303  /* Generation number to use for the next TCP socket open/close */
305 
306  /* The time at which we last called process_timeouts(). Uses integer seconds
307  just to draw the line somewhere. */
308  time_t last_timeout_processed;
309 
310  /* Last server we sent a query to. */
311  int last_server;
312 
313  /* Circular, doubly-linked list of queries, bucketed various ways.... */
314  /* All active queries in a single list: */
315  struct list_node all_queries;
316  /* Queries bucketed by qid, for quickly dispatching DNS responses: */
317 #define ARES_QID_TABLE_SIZE 2048
319  /* Queries bucketed by timeout, for quickly handling timeouts: */
320 #define ARES_TIMEOUT_TABLE_SIZE 1024
322 
324  void *sock_state_cb_data;
325 
327  void *sock_create_cb_data;
328 
330  void *sock_config_cb_data;
331 
333  void *sock_func_cb_data;
334 
335  /* Path for resolv.conf file, configurable via ares_options */
336  char *resolvconf_path;
337 };
338 
339 /* Does the domain end in ".onion" or ".onion."? Case-insensitive. */
340 int ares__is_onion_domain(const char *name);
341 
342 /* Memory management functions */
343 extern void *(*ares_malloc)(size_t size);
344 extern void *(*ares_realloc)(void *ptr, size_t size);
345 extern void (*ares_free)(void *ptr);
346 
347 /* return true if now is exactly check time or later */
348 int ares__timedout(struct timeval *now,
349  struct timeval *check);
350 
352  struct timeval *now);
354 int ares__get_hostent(FILE *fp, int family, struct hostent **host);
355 int ares__read_line(FILE *fp, char **buf, size_t *bufsize);
356 void ares__free_query(struct query *query);
357 unsigned short ares__generate_new_id(rc4_key* key);
358 struct timeval ares__tvnow(void);
359 int ares__expand_name_validated(const unsigned char *encoded,
360  const unsigned char *abuf,
361  int alen, char **s, long *enclen,
362  int is_hostname);
363 int ares__expand_name_for_response(const unsigned char *encoded,
364  const unsigned char *abuf, int alen,
365  char **s, long *enclen, int is_hostname);
368 int ares__parse_qtype_reply(const unsigned char* abuf, int alen, int* qtype);
369 int ares__single_domain(ares_channel channel, const char *name, char **s);
370 int ares__cat_domain(const char *name, const char *domain, char **s);
372 int ares__readaddrinfo(FILE *fp, const char *name, unsigned short port,
373  const struct ares_addrinfo_hints *hints,
374  struct ares_addrinfo *ai);
375 
377 
379 void ares__freeaddrinfo_nodes(struct ares_addrinfo_node *ai_node);
380 
383  struct ares_addrinfo_node *tail);
384 
386 void ares__freeaddrinfo_cnames(struct ares_addrinfo_cname *ai_cname);
387 
389 
391  struct ares_addrinfo_cname *tail);
392 
393 int ares__parse_into_addrinfo(const unsigned char *abuf,
394  int alen,
395  struct ares_addrinfo *ai);
396 
397 int ares__parse_into_addrinfo2(const unsigned char *abuf,
398  int alen,
399  char **question_hostname,
400  struct ares_addrinfo *ai);
401 
402 #if 0 /* Not used */
403 long ares__tvdiff(struct timeval t1, struct timeval t2);
404 #endif
405 
407  int af, int type, int protocol);
410  ares_socket_t sockfd,
411  const struct sockaddr *addr,
412  ares_socklen_t addrlen);
413 
414 #define ARES_SWAP_BYTE(a,b) \
415  { unsigned char swapByte = *(a); *(a) = *(b); *(b) = swapByte; }
416 
417 #define SOCK_STATE_CALLBACK(c, s, r, w) \
418  do { \
419  if ((c)->sock_state_cb) \
420  (c)->sock_state_cb((c)->sock_state_cb_data, (s), (r), (w)); \
421  } WHILE_FALSE
422 
423 #endif /* __ARES_PRIVATE_H */
query::queries_by_qid
struct list_node queries_by_qid
Definition: ares_private.h:209
ares_free
void(* ares_free)(void *ptr)
Definition: ares_library_init.c:60
ptr
char * ptr
Definition: abseil-cpp/absl/base/internal/low_level_alloc_test.cc:45
ares_sock_state_cb
void(* ares_sock_state_cb)(void *data, ares_socket_t socket_fd, int readable, int writable)
Definition: ares.h:235
ares_sock_config_callback
int(* ares_sock_config_callback)(ares_socket_t socket_fd, int type, void *data)
Definition: ares.h:311
ares_addr::addr6
struct ares_in6_addr addr6
Definition: ares_private.h:137
query_server_info::skip_server
int skip_server
Definition: ares_private.h:235
ares_channeldata::ednspsz
int ednspsz
Definition: ares_private.h:282
ares_channeldata::sock_state_cb_data
void * sock_state_cb_data
Definition: ares_private.h:323
server_state
Definition: ares_private.h:161
ares__get_hostent
int ares__get_hostent(FILE *fp, int family, struct hostent **host)
Definition: ares__get_hostent.c:34
now
static double now(void)
Definition: test/core/fling/client.cc:130
ares_addrinfo_node
Definition: ares.h:593
ares__append_addrinfo_node
struct ares_addrinfo_node * ares__append_addrinfo_node(struct ares_addrinfo_node **ai_node)
Definition: ares_getaddrinfo.c:182
ares_channeldata::sock_state_cb
ares_sock_state_cb sock_state_cb
Definition: ares_private.h:322
rc4_key::x
unsigned char x
Definition: ares_private.h:262
ares_addrinfo
Definition: ares.h:616
ares_addr
Definition: ares_private.h:133
ares__send_query
void ares__send_query(ares_channel channel, struct query *query, struct timeval *now)
Definition: ares_process.c:799
ares_channeldata::next_id
unsigned short next_id
Definition: ares_private.h:298
ares_llist.h
query::queries_to_server
struct list_node queries_to_server
Definition: ares_private.h:211
send_request
Definition: ares_private.h:147
ares_addrinfo_hints
Definition: ares.h:621
ares_writev.h
ares_channeldata::servers
struct server_state * servers
Definition: ares_private.h:294
buf
voidpf void * buf
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136
ares_callback
void(* ares_callback)(void *arg, int status, int timeouts, unsigned char *abuf, int alen)
Definition: ares.h:290
ares_addr::udp_port
int udp_port
Definition: ares_private.h:139
rc4_key::y
unsigned char y
Definition: ares_private.h:263
ares__is_onion_domain
int ares__is_onion_domain(const char *name)
Definition: ares_getnameinfo.c:438
query::queries_by_timeout
struct list_node queries_by_timeout
Definition: ares_private.h:210
protocol
Protocol protocol
Definition: client_callback_end2end_test.cc:67
server_state::qtail
struct send_request * qtail
Definition: ares_private.h:177
apattern::mask
union apattern::@388 mask
ares__generate_new_id
unsigned short ares__generate_new_id(rc4_key *key)
Definition: ares_query.c:98
setup.name
name
Definition: setup.py:542
ares_strdup.h
ares_channeldata::optmask
int optmask
Definition: ares_private.h:291
ares__parse_into_addrinfo2
int ares__parse_into_addrinfo2(const unsigned char *abuf, int alen, char **question_hostname, struct ares_addrinfo *ai)
Definition: ares__parse_into_addrinfo.c:42
query::error_status
int error_status
Definition: ares_private.h:229
ares_channeldata::last_server
int last_server
Definition: ares_private.h:310
ares__open_socket
ares_socket_t ares__open_socket(ares_channel channel, int af, int type, int protocol)
Definition: ares_process.c:1516
query::tcplen
int tcplen
Definition: ares_private.h:216
query_server_info::tcp_connection_generation
int tcp_connection_generation
Definition: ares_private.h:236
ARES_TIMEOUT_TABLE_SIZE
#define ARES_TIMEOUT_TABLE_SIZE
Definition: ares_private.h:319
server_state::qhead
struct send_request * qhead
Definition: ares_private.h:176
server_state::channel
ares_channel channel
Definition: ares_private.h:189
ares__read_line
int ares__read_line(FILE *fp, char **buf, size_t *bufsize)
Definition: ares__read_line.c:31
ares_channeldata::last_timeout_processed
time_t last_timeout_processed
Definition: ares_private.h:307
ares__parse_qtype_reply
int ares__parse_qtype_reply(const unsigned char *abuf, int alen, int *qtype)
ares__destroy_servers_state
void ares__destroy_servers_state(ares_channel channel)
Definition: ares_destroy.c:96
send_request::next
struct send_request * next
Definition: ares_private.h:158
ares_channeldata::socket_send_buffer_size
int socket_send_buffer_size
Definition: ares_private.h:275
apattern::addr4
struct in_addr addr4
Definition: ares_private.h:246
send_request::data
const unsigned char * data
Definition: ares_private.h:149
query::tcpbuf
unsigned char * tcpbuf
Definition: ares_private.h:215
ares_channeldata::id_key
rc4_key id_key
Definition: ares_private.h:300
ares_addr::tcp_port
int tcp_port
Definition: ares_private.h:140
query
Definition: ares_private.h:198
ares_channeldata::nsort
int nsort
Definition: ares_private.h:280
channel
wrapped_grpc_channel * channel
Definition: src/php/ext/grpc/call.h:33
server_state::addr
struct ares_addr addr
Definition: ares_private.h:162
ares_channeldata::timeout
int timeout
Definition: ares_private.h:269
ares_strcasecmp.h
ares_channeldata::sock_config_cb
ares_sock_config_callback sock_config_cb
Definition: ares_private.h:328
ares__close_sockets
void ares__close_sockets(ares_channel channel, struct server_state *server)
Definition: ares__close_sockets.c:22
server_state::is_broken
int is_broken
Definition: ares_private.h:194
query::qlen
int qlen
Definition: ares_private.h:220
query_server_info
Definition: ares_private.h:234
ares__malloc_addrinfo
struct ares_addrinfo * ares__malloc_addrinfo(void)
Definition: ares_getaddrinfo.c:160
ares__init_servers_state
void ares__init_servers_state(ares_channel channel)
Definition: ares_init.c:2633
ares__malloc_addrinfo_node
struct ares_addrinfo_node * ares__malloc_addrinfo_node(void)
Definition: ares_getaddrinfo.c:170
ares_channeldata::sock_create_cb_data
void * sock_create_cb_data
Definition: ares_private.h:326
ares_channeldata::flags
int flags
Definition: ares_private.h:268
query::qbuf
const unsigned char * qbuf
Definition: ares_private.h:219
ares_channeldata::local_ip4
unsigned int local_ip4
Definition: ares_private.h:288
ares_channeldata::tries
int tries
Definition: ares_private.h:270
ares__append_addrinfo_cname
struct ares_addrinfo_cname * ares__append_addrinfo_cname(struct ares_addrinfo_cname **ai_cname)
Definition: ares_getaddrinfo.c:123
ares_strsplit.h
apattern::addr
union apattern::@387 addr
apattern
Definition: ares_private.h:243
query::arg
void * arg
Definition: ares_private.h:222
ares_channeldata::tcp_port
int tcp_port
Definition: ares_private.h:274
send_request::data_storage
unsigned char * data_storage
Definition: ares_private.h:155
server_state::tcp_socket
ares_socket_t tcp_socket
Definition: ares_private.h:164
query::timeouts
int timeouts
Definition: ares_private.h:230
ARES_QID_TABLE_SIZE
#define ARES_QID_TABLE_SIZE
Definition: ares_private.h:316
ares_channeldata::sock_create_cb
ares_sock_create_callback sock_create_cb
Definition: ares_private.h:325
ares__parse_into_addrinfo
int ares__parse_into_addrinfo(const unsigned char *abuf, int alen, struct ares_addrinfo *ai)
Definition: ares__parse_into_addrinfo.c:251
ares__connect_socket
int ares__connect_socket(ares_channel channel, ares_socket_t sockfd, const struct sockaddr *addr, ares_socklen_t addrlen)
Definition: ares_process.c:1528
server_state::tcp_length
int tcp_length
Definition: ares_private.h:169
apattern::bits
unsigned short bits
Definition: ares_private.h:253
ares_channeldata::resolvconf_path
char * resolvconf_path
Definition: ares_private.h:335
ares_channeldata::ndots
int ndots
Definition: ares_private.h:271
ares_addr::addr4
struct in_addr addr4
Definition: ares_private.h:136
server_state::tcp_buffer_pos
int tcp_buffer_pos
Definition: ares_private.h:173
ares_channeldata::sock_config_cb_data
void * sock_config_cb_data
Definition: ares_private.h:329
tests.unit._exit_scenarios.port
port
Definition: _exit_scenarios.py:179
send_request::len
size_t len
Definition: ares_private.h:150
ares_channeldata::all_queries
struct list_node all_queries
Definition: ares_private.h:314
ares_channeldata::queries_by_qid
struct list_node queries_by_qid[ARES_QID_TABLE_SIZE]
Definition: ares_private.h:317
query::all_queries
struct list_node all_queries
Definition: ares_private.h:212
ares_channeldata::socket_receive_buffer_size
int socket_receive_buffer_size
Definition: ares_private.h:276
ares_channeldata
Definition: ares_private.h:266
server_state::tcp_lenbuf
unsigned char tcp_lenbuf[2]
Definition: ares_private.h:167
ares_addrinfo_cname
Definition: ares.h:609
ares_channeldata::local_dev_name
char local_dev_name[32]
Definition: ares_private.h:287
ares__close_socket
void ares__close_socket(ares_channel, ares_socket_t)
Definition: ares_process.c:1542
ares_ipv6.h
key
const char * key
Definition: hpack_parser_table.cc:164
benchmark.FILE
FILE
Definition: benchmark.py:21
server_state::udp_socket
ares_socket_t udp_socket
Definition: ares_private.h:163
ares__readaddrinfo
int ares__readaddrinfo(FILE *fp, const char *name, unsigned short port, const struct ares_addrinfo_hints *hints, struct ares_addrinfo *ai)
Definition: ares__readaddrinfo.c:35
ares_channeldata::rotate
int rotate
Definition: ares_private.h:272
server
Definition: examples/python/async_streaming/server.py:1
ares__timedout
int ares__timedout(struct timeval *now, struct timeval *check)
Definition: ares_process.c:89
ares_in6_addr
Definition: ares.h:514
ares_addr::family
int family
Definition: ares_private.h:134
ares_channeldata::ndomains
int ndomains
Definition: ares_private.h:278
timeval
Definition: setup_once.h:113
server_state::tcp_connection_generation
int tcp_connection_generation
Definition: ares_private.h:183
ares_channeldata::nservers
int nservers
Definition: ares_private.h:295
ares_socket_t
int ares_socket_t
Definition: ares.h:229
ares__freeaddrinfo_cnames
void ares__freeaddrinfo_cnames(struct ares_addrinfo_cname *ai_cname)
Definition: ares_freeaddrinfo.c:27
ares__free_query
void ares__free_query(struct query *query)
Definition: ares_process.c:1500
apattern::type
unsigned short type
Definition: ares_private.h:256
ares_channeldata::local_ip6
unsigned char local_ip6[16]
Definition: ares_private.h:289
state
Definition: bloaty/third_party/zlib/contrib/blast/blast.c:41
list_node
Definition: ares_llist.h:22
ares__expand_name_for_response
int ares__expand_name_for_response(const unsigned char *encoded, const unsigned char *abuf, int alen, char **s, long *enclen, int is_hostname)
Definition: ares_expand_name.c:291
ares__addrinfo_cat_cnames
void ares__addrinfo_cat_cnames(struct ares_addrinfo_cname **head, struct ares_addrinfo_cname *tail)
Definition: ares_getaddrinfo.c:142
check
static void check(upb_inttable *t)
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/upb.c:1715
ares_sock_create_callback
int(* ares_sock_create_callback)(ares_socket_t socket_fd, int type, void *data)
Definition: ares.h:307
rc4_key
Definition: ares_private.h:259
ares_channeldata::sortlist
struct apattern * sortlist
Definition: ares_private.h:279
ares_channeldata::domains
char ** domains
Definition: ares_private.h:277
ares__expand_name_validated
int ares__expand_name_validated(const unsigned char *encoded, const unsigned char *abuf, int alen, char **s, long *enclen, int is_hostname)
Definition: ares_expand_name.c:107
ares__addrinfo_cat_nodes
void ares__addrinfo_cat_nodes(struct ares_addrinfo_node **head, struct ares_addrinfo_node *tail)
Definition: ares_getaddrinfo.c:201
ares_addr::addr
union ares_addr::@386 addr
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37
rc4_key
struct rc4_key rc4_key
ares__single_domain
int ares__single_domain(ares_channel channel, const char *name, char **s)
Definition: ares_search.c:233
ares__tvnow
struct timeval ares__tvnow(void)
Definition: ares__timeval.c:85
server_state::tcp_buffer
unsigned char * tcp_buffer
Definition: ares_private.h:172
query::try_count
int try_count
Definition: ares_private.h:225
size
voidpf void uLong size
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136
ares_getenv.h
ares_channeldata::sock_func_cb_data
void * sock_func_cb_data
Definition: ares_private.h:332
ares__cat_domain
int ares__cat_domain(const char *name, const char *domain, char **s)
Definition: ares_search.c:214
server_state::tcp_lenbuf_pos
int tcp_lenbuf_pos
Definition: ares_private.h:168
query::server
int server
Definition: ares_private.h:226
t1
Table t1
Definition: abseil-cpp/absl/container/internal/raw_hash_set_allocator_test.cc:185
query::timeout
struct timeval timeout
Definition: ares_private.h:201
ares__sortaddrinfo
int ares__sortaddrinfo(ares_channel channel, struct ares_addrinfo_node *ai_node)
Definition: ares__sortaddrinfo.c:443
ares_channeldata::sock_funcs
const struct ares_socket_functions * sock_funcs
Definition: ares_private.h:331
query::callback
ares_callback callback
Definition: ares_private.h:221
send_request::owner_query
struct query * owner_query
Definition: ares_private.h:153
addr
struct sockaddr_in addr
Definition: libuv/docs/code/tcp-echo-server/main.c:10
query::using_tcp
int using_tcp
Definition: ares_private.h:228
query::qid
unsigned short qid
Definition: ares_private.h:200
ares__freeaddrinfo_nodes
void ares__freeaddrinfo_nodes(struct ares_addrinfo_node *ai_node)
Definition: ares_freeaddrinfo.c:40
ares_channeldata::tcp_connection_generation
int tcp_connection_generation
Definition: ares_private.h:303
query::server_info
struct query_server_info * server_info
Definition: ares_private.h:227
apattern::addr6
struct ares_in6_addr addr6
Definition: ares_private.h:247
ares_channeldata::queries_by_timeout
struct list_node queries_by_timeout[ARES_TIMEOUT_TABLE_SIZE]
Definition: ares_private.h:320
server_state::queries_to_server
struct list_node queries_to_server
Definition: ares_private.h:186
ares_channeldata::lookups
char * lookups
Definition: ares_private.h:281
ares_channeldata::udp_port
int udp_port
Definition: ares_private.h:273
ares__malloc_addrinfo_cname
struct ares_addrinfo_cname * ares__malloc_addrinfo_cname(void)
Definition: ares_getaddrinfo.c:113
ares_socket_functions
Definition: ares.h:401
apattern::family
int family
Definition: ares_private.h:255


grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:33