1#![allow(non_camel_case_types, non_snake_case)]
3use libc::fd_set;
4use libc::hostent;
5use libc::in_addr;
6use libc::iovec;
7use libc::sockaddr;
8use libc::socklen_t;
9use libc::timeval;
10
11#[cfg(windows)]
12pub type ares_socket_t = ::std::os::windows::io::RawSocket;
13#[cfg(unix)]
14pub type ares_socket_t = ::std::os::unix::io::RawFd;
15
16pub type ares_socklen_t = socklen_t;
17pub type ares_ssize_t = isize;
18pub type ares_sock_state_cb = ::std::option::Option<
19 unsafe extern "C" fn(
20 data: *mut ::std::os::raw::c_void,
21 socket_fd: ares_socket_t,
22 readable: ::std::os::raw::c_int,
23 writable: ::std::os::raw::c_int,
24 ),
25>;
26#[repr(C)]
27#[derive(Debug, Copy, Clone)]
28pub struct apattern {
29 _unused: [u8; 0],
30}
31#[repr(C)]
32#[derive(Debug, Copy, Clone)]
33pub struct ares_options {
34 pub flags: ::std::os::raw::c_int,
35 pub timeout: ::std::os::raw::c_int,
36 pub tries: ::std::os::raw::c_int,
37 pub ndots: ::std::os::raw::c_int,
38 pub udp_port: ::std::os::raw::c_ushort,
39 pub tcp_port: ::std::os::raw::c_ushort,
40 pub socket_send_buffer_size: ::std::os::raw::c_int,
41 pub socket_receive_buffer_size: ::std::os::raw::c_int,
42 pub servers: *mut in_addr,
43 pub nservers: ::std::os::raw::c_int,
44 pub domains: *mut *mut ::std::os::raw::c_char,
45 pub ndomains: ::std::os::raw::c_int,
46 pub lookups: *mut ::std::os::raw::c_char,
47 pub sock_state_cb: ares_sock_state_cb,
48 pub sock_state_cb_data: *mut ::std::os::raw::c_void,
49 pub sortlist: *mut apattern,
50 pub nsort: ::std::os::raw::c_int,
51 pub ednspsz: ::std::os::raw::c_int,
52 pub resolvconf_path: *mut ::std::os::raw::c_char,
53 pub hosts_path: *mut ::std::os::raw::c_char,
54}
55#[repr(C)]
56#[derive(Debug, Copy, Clone)]
57pub struct ares_channeldata {
58 _unused: [u8; 0],
59}
60pub type ares_channel = *mut ares_channeldata;
61pub type ares_callback = ::std::option::Option<
62 unsafe extern "C" fn(
63 arg: *mut ::std::os::raw::c_void,
64 status: ::std::os::raw::c_int,
65 timeouts: ::std::os::raw::c_int,
66 abuf: *mut ::std::os::raw::c_uchar,
67 alen: ::std::os::raw::c_int,
68 ),
69>;
70pub type ares_host_callback = ::std::option::Option<
71 unsafe extern "C" fn(
72 arg: *mut ::std::os::raw::c_void,
73 status: ::std::os::raw::c_int,
74 timeouts: ::std::os::raw::c_int,
75 hostent: *mut hostent,
76 ),
77>;
78pub type ares_nameinfo_callback = ::std::option::Option<
79 unsafe extern "C" fn(
80 arg: *mut ::std::os::raw::c_void,
81 status: ::std::os::raw::c_int,
82 timeouts: ::std::os::raw::c_int,
83 node: *mut ::std::os::raw::c_char,
84 service: *mut ::std::os::raw::c_char,
85 ),
86>;
87pub type ares_sock_create_callback = ::std::option::Option<
88 unsafe extern "C" fn(
89 socket_fd: ares_socket_t,
90 type_: ::std::os::raw::c_int,
91 data: *mut ::std::os::raw::c_void,
92 ) -> ::std::os::raw::c_int,
93>;
94pub type ares_sock_config_callback = ::std::option::Option<
95 unsafe extern "C" fn(
96 socket_fd: ares_socket_t,
97 type_: ::std::os::raw::c_int,
98 data: *mut ::std::os::raw::c_void,
99 ) -> ::std::os::raw::c_int,
100>;
101pub type ares_addrinfo_callback = ::std::option::Option<
102 unsafe extern "C" fn(
103 arg: *mut ::std::os::raw::c_void,
104 status: ::std::os::raw::c_int,
105 timeouts: ::std::os::raw::c_int,
106 res: *mut ares_addrinfo,
107 ),
108>;
109extern "C" {
110 pub fn ares_library_init(flags: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
111}
112extern "C" {
113 pub fn ares_library_init_mem(
114 flags: ::std::os::raw::c_int,
115 amalloc: ::std::option::Option<
116 unsafe extern "C" fn(size: usize) -> *mut ::std::os::raw::c_void,
117 >,
118 afree: ::std::option::Option<unsafe extern "C" fn(ptr: *mut ::std::os::raw::c_void)>,
119 arealloc: ::std::option::Option<
120 unsafe extern "C" fn(
121 ptr: *mut ::std::os::raw::c_void,
122 size: usize,
123 ) -> *mut ::std::os::raw::c_void,
124 >,
125 ) -> ::std::os::raw::c_int;
126}
127extern "C" {
128 pub fn ares_library_initialized() -> ::std::os::raw::c_int;
129}
130extern "C" {
131 pub fn ares_library_cleanup();
132}
133extern "C" {
134 pub fn ares_version(version: *mut ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
135}
136extern "C" {
137 pub fn ares_init(channelptr: *mut ares_channel) -> ::std::os::raw::c_int;
138}
139extern "C" {
140 pub fn ares_init_options(
141 channelptr: *mut ares_channel,
142 options: *mut ares_options,
143 optmask: ::std::os::raw::c_int,
144 ) -> ::std::os::raw::c_int;
145}
146extern "C" {
147 pub fn ares_save_options(
148 channel: *const ares_channeldata,
149 options: *mut ares_options,
150 optmask: *mut ::std::os::raw::c_int,
151 ) -> ::std::os::raw::c_int;
152}
153extern "C" {
154 pub fn ares_destroy_options(options: *mut ares_options);
155}
156extern "C" {
157 pub fn ares_dup(dest: *mut ares_channel, src: *const ares_channeldata)
158 -> ::std::os::raw::c_int;
159}
160extern "C" {
161 pub fn ares_destroy(channel: ares_channel);
162}
163extern "C" {
164 pub fn ares_cancel(channel: ares_channel);
165}
166extern "C" {
167 pub fn ares_set_local_ip4(channel: ares_channel, local_ip: ::std::os::raw::c_uint);
168}
169extern "C" {
170 pub fn ares_set_local_ip6(channel: ares_channel, local_ip6: *const ::std::os::raw::c_uchar);
171}
172extern "C" {
173 pub fn ares_set_local_dev(channel: ares_channel, local_dev_name: *const ::std::os::raw::c_char);
174}
175extern "C" {
176 pub fn ares_set_socket_callback(
177 channel: ares_channel,
178 callback: ares_sock_create_callback,
179 user_data: *mut ::std::os::raw::c_void,
180 );
181}
182extern "C" {
183 pub fn ares_set_socket_configure_callback(
184 channel: ares_channel,
185 callback: ares_sock_config_callback,
186 user_data: *mut ::std::os::raw::c_void,
187 );
188}
189extern "C" {
190 pub fn ares_set_sortlist(
191 channel: ares_channel,
192 sortstr: *const ::std::os::raw::c_char,
193 ) -> ::std::os::raw::c_int;
194}
195extern "C" {
196 pub fn ares_getaddrinfo(
197 channel: ares_channel,
198 node: *const ::std::os::raw::c_char,
199 service: *const ::std::os::raw::c_char,
200 hints: *const ares_addrinfo_hints,
201 callback: ares_addrinfo_callback,
202 arg: *mut ::std::os::raw::c_void,
203 );
204}
205extern "C" {
206 pub fn ares_freeaddrinfo(ai: *mut ares_addrinfo);
207}
208#[repr(C)]
209#[derive(Debug, Copy, Clone)]
210pub struct ares_socket_functions {
211 pub asocket: ::std::option::Option<
212 unsafe extern "C" fn(
213 arg1: ::std::os::raw::c_int,
214 arg2: ::std::os::raw::c_int,
215 arg3: ::std::os::raw::c_int,
216 arg4: *mut ::std::os::raw::c_void,
217 ) -> ares_socket_t,
218 >,
219 pub aclose: ::std::option::Option<
220 unsafe extern "C" fn(
221 arg1: ares_socket_t,
222 arg2: *mut ::std::os::raw::c_void,
223 ) -> ::std::os::raw::c_int,
224 >,
225 pub aconnect: ::std::option::Option<
226 unsafe extern "C" fn(
227 arg1: ares_socket_t,
228 arg2: *const sockaddr,
229 arg3: ares_socklen_t,
230 arg4: *mut ::std::os::raw::c_void,
231 ) -> ::std::os::raw::c_int,
232 >,
233 pub arecvfrom: ::std::option::Option<
234 unsafe extern "C" fn(
235 arg1: ares_socket_t,
236 arg2: *mut ::std::os::raw::c_void,
237 arg3: usize,
238 arg4: ::std::os::raw::c_int,
239 arg5: *mut sockaddr,
240 arg6: *mut ares_socklen_t,
241 arg7: *mut ::std::os::raw::c_void,
242 ) -> ares_ssize_t,
243 >,
244 pub asendv: ::std::option::Option<
245 unsafe extern "C" fn(
246 arg1: ares_socket_t,
247 arg2: *const iovec,
248 arg3: ::std::os::raw::c_int,
249 arg4: *mut ::std::os::raw::c_void,
250 ) -> ares_ssize_t,
251 >,
252}
253extern "C" {
254 pub fn ares_set_socket_functions(
255 channel: ares_channel,
256 funcs: *const ares_socket_functions,
257 user_data: *mut ::std::os::raw::c_void,
258 );
259}
260extern "C" {
261 pub fn ares_send(
262 channel: ares_channel,
263 qbuf: *const ::std::os::raw::c_uchar,
264 qlen: ::std::os::raw::c_int,
265 callback: ares_callback,
266 arg: *mut ::std::os::raw::c_void,
267 );
268}
269extern "C" {
270 pub fn ares_query(
271 channel: ares_channel,
272 name: *const ::std::os::raw::c_char,
273 dnsclass: ::std::os::raw::c_int,
274 type_: ::std::os::raw::c_int,
275 callback: ares_callback,
276 arg: *mut ::std::os::raw::c_void,
277 );
278}
279extern "C" {
280 pub fn ares_search(
281 channel: ares_channel,
282 name: *const ::std::os::raw::c_char,
283 dnsclass: ::std::os::raw::c_int,
284 type_: ::std::os::raw::c_int,
285 callback: ares_callback,
286 arg: *mut ::std::os::raw::c_void,
287 );
288}
289extern "C" {
290 pub fn ares_gethostbyname(
291 channel: ares_channel,
292 name: *const ::std::os::raw::c_char,
293 family: ::std::os::raw::c_int,
294 callback: ares_host_callback,
295 arg: *mut ::std::os::raw::c_void,
296 );
297}
298extern "C" {
299 pub fn ares_gethostbyname_file(
300 channel: ares_channel,
301 name: *const ::std::os::raw::c_char,
302 family: ::std::os::raw::c_int,
303 host: *mut *mut hostent,
304 ) -> ::std::os::raw::c_int;
305}
306extern "C" {
307 pub fn ares_gethostbyaddr(
308 channel: ares_channel,
309 addr: *const ::std::os::raw::c_void,
310 addrlen: ::std::os::raw::c_int,
311 family: ::std::os::raw::c_int,
312 callback: ares_host_callback,
313 arg: *mut ::std::os::raw::c_void,
314 );
315}
316extern "C" {
317 pub fn ares_getnameinfo(
318 channel: ares_channel,
319 sa: *const sockaddr,
320 salen: ares_socklen_t,
321 flags: ::std::os::raw::c_int,
322 callback: ares_nameinfo_callback,
323 arg: *mut ::std::os::raw::c_void,
324 );
325}
326extern "C" {
327 pub fn ares_fds(
328 channel: *const ares_channeldata,
329 read_fds: *mut fd_set,
330 write_fds: *mut fd_set,
331 ) -> ::std::os::raw::c_int;
332}
333extern "C" {
334 pub fn ares_getsock(
335 channel: *const ares_channeldata,
336 socks: *mut ares_socket_t,
337 numsocks: ::std::os::raw::c_int,
338 ) -> ::std::os::raw::c_int;
339}
340extern "C" {
341 pub fn ares_timeout(
342 channel: *const ares_channeldata,
343 maxtv: *mut timeval,
344 tv: *mut timeval,
345 ) -> *mut timeval;
346}
347extern "C" {
348 pub fn ares_process(channel: ares_channel, read_fds: *mut fd_set, write_fds: *mut fd_set);
349}
350extern "C" {
351 pub fn ares_process_fd(channel: ares_channel, read_fd: ares_socket_t, write_fd: ares_socket_t);
352}
353extern "C" {
354 pub fn ares_create_query(
355 name: *const ::std::os::raw::c_char,
356 dnsclass: ::std::os::raw::c_int,
357 type_: ::std::os::raw::c_int,
358 id: ::std::os::raw::c_ushort,
359 rd: ::std::os::raw::c_int,
360 buf: *mut *mut ::std::os::raw::c_uchar,
361 buflen: *mut ::std::os::raw::c_int,
362 max_udp_size: ::std::os::raw::c_int,
363 ) -> ::std::os::raw::c_int;
364}
365extern "C" {
366 pub fn ares_mkquery(
367 name: *const ::std::os::raw::c_char,
368 dnsclass: ::std::os::raw::c_int,
369 type_: ::std::os::raw::c_int,
370 id: ::std::os::raw::c_ushort,
371 rd: ::std::os::raw::c_int,
372 buf: *mut *mut ::std::os::raw::c_uchar,
373 buflen: *mut ::std::os::raw::c_int,
374 ) -> ::std::os::raw::c_int;
375}
376extern "C" {
377 pub fn ares_expand_name(
378 encoded: *const ::std::os::raw::c_uchar,
379 abuf: *const ::std::os::raw::c_uchar,
380 alen: ::std::os::raw::c_int,
381 s: *mut *mut ::std::os::raw::c_char,
382 enclen: *mut ::std::os::raw::c_long,
383 ) -> ::std::os::raw::c_int;
384}
385extern "C" {
386 pub fn ares_expand_string(
387 encoded: *const ::std::os::raw::c_uchar,
388 abuf: *const ::std::os::raw::c_uchar,
389 alen: ::std::os::raw::c_int,
390 s: *mut *mut ::std::os::raw::c_uchar,
391 enclen: *mut ::std::os::raw::c_long,
392 ) -> ::std::os::raw::c_int;
393}
394#[repr(C)]
395#[derive(Copy, Clone)]
396pub struct ares_in6_addr {
397 pub _S6_un: ares_in6_addr__bindgen_ty_1,
398}
399#[repr(C)]
400#[derive(Copy, Clone)]
401pub union ares_in6_addr__bindgen_ty_1 {
402 pub _S6_u8: [::std::os::raw::c_uchar; 16usize],
403}
404#[repr(C)]
405#[derive(Copy, Clone)]
406pub struct ares_addrttl {
407 pub ipaddr: in_addr,
408 pub ttl: ::std::os::raw::c_int,
409}
410#[repr(C)]
411#[derive(Copy, Clone)]
412pub struct ares_addr6ttl {
413 pub ip6addr: ares_in6_addr,
414 pub ttl: ::std::os::raw::c_int,
415}
416#[repr(C)]
417#[derive(Debug, Copy, Clone)]
418pub struct ares_caa_reply {
419 pub next: *mut ares_caa_reply,
420 pub critical: ::std::os::raw::c_int,
421 pub property: *mut ::std::os::raw::c_uchar,
422 pub plength: usize,
423 pub value: *mut ::std::os::raw::c_uchar,
424 pub length: usize,
425}
426#[repr(C)]
427#[derive(Debug, Copy, Clone)]
428pub struct ares_srv_reply {
429 pub next: *mut ares_srv_reply,
430 pub host: *mut ::std::os::raw::c_char,
431 pub priority: ::std::os::raw::c_ushort,
432 pub weight: ::std::os::raw::c_ushort,
433 pub port: ::std::os::raw::c_ushort,
434}
435#[repr(C)]
436#[derive(Debug, Copy, Clone)]
437pub struct ares_mx_reply {
438 pub next: *mut ares_mx_reply,
439 pub host: *mut ::std::os::raw::c_char,
440 pub priority: ::std::os::raw::c_ushort,
441}
442#[repr(C)]
443#[derive(Debug, Copy, Clone)]
444pub struct ares_txt_reply {
445 pub next: *mut ares_txt_reply,
446 pub txt: *mut ::std::os::raw::c_uchar,
447 pub length: usize,
448}
449#[repr(C)]
450#[derive(Debug, Copy, Clone)]
451pub struct ares_txt_ext {
452 pub next: *mut ares_txt_ext,
453 pub txt: *mut ::std::os::raw::c_uchar,
454 pub length: usize,
455 pub record_start: ::std::os::raw::c_uchar,
456}
457#[repr(C)]
458#[derive(Debug, Copy, Clone)]
459pub struct ares_naptr_reply {
460 pub next: *mut ares_naptr_reply,
461 pub flags: *mut ::std::os::raw::c_uchar,
462 pub service: *mut ::std::os::raw::c_uchar,
463 pub regexp: *mut ::std::os::raw::c_uchar,
464 pub replacement: *mut ::std::os::raw::c_char,
465 pub order: ::std::os::raw::c_ushort,
466 pub preference: ::std::os::raw::c_ushort,
467}
468#[repr(C)]
469#[derive(Debug, Copy, Clone)]
470pub struct ares_soa_reply {
471 pub nsname: *mut ::std::os::raw::c_char,
472 pub hostmaster: *mut ::std::os::raw::c_char,
473 pub serial: ::std::os::raw::c_uint,
474 pub refresh: ::std::os::raw::c_uint,
475 pub retry: ::std::os::raw::c_uint,
476 pub expire: ::std::os::raw::c_uint,
477 pub minttl: ::std::os::raw::c_uint,
478}
479#[repr(C)]
480#[derive(Debug, Copy, Clone)]
481pub struct ares_uri_reply {
482 pub next: *mut ares_uri_reply,
483 pub priority: ::std::os::raw::c_ushort,
484 pub weight: ::std::os::raw::c_ushort,
485 pub uri: *mut ::std::os::raw::c_char,
486 pub ttl: ::std::os::raw::c_int,
487}
488#[repr(C)]
489pub struct ares_addrinfo_node {
490 pub ai_ttl: ::std::os::raw::c_int,
491 pub ai_flags: ::std::os::raw::c_int,
492 pub ai_family: ::std::os::raw::c_int,
493 pub ai_socktype: ::std::os::raw::c_int,
494 pub ai_protocol: ::std::os::raw::c_int,
495 pub ai_addrlen: ares_socklen_t,
496 pub ai_addr: *mut sockaddr,
497 pub ai_next: *mut ares_addrinfo_node,
498}
499#[repr(C)]
500#[derive(Debug, Copy, Clone)]
501pub struct ares_addrinfo_cname {
502 pub ttl: ::std::os::raw::c_int,
503 pub alias: *mut ::std::os::raw::c_char,
504 pub name: *mut ::std::os::raw::c_char,
505 pub next: *mut ares_addrinfo_cname,
506}
507#[repr(C)]
508#[derive(Debug, Copy, Clone)]
509pub struct ares_addrinfo {
510 pub cnames: *mut ares_addrinfo_cname,
511 pub nodes: *mut ares_addrinfo_node,
512 pub name: *mut ::std::os::raw::c_char,
513}
514#[repr(C)]
515#[derive(Debug, Copy, Clone)]
516pub struct ares_addrinfo_hints {
517 pub ai_flags: ::std::os::raw::c_int,
518 pub ai_family: ::std::os::raw::c_int,
519 pub ai_socktype: ::std::os::raw::c_int,
520 pub ai_protocol: ::std::os::raw::c_int,
521}
522extern "C" {
523 pub fn ares_parse_a_reply(
524 abuf: *const ::std::os::raw::c_uchar,
525 alen: ::std::os::raw::c_int,
526 host: *mut *mut hostent,
527 addrttls: *mut ares_addrttl,
528 naddrttls: *mut ::std::os::raw::c_int,
529 ) -> ::std::os::raw::c_int;
530}
531extern "C" {
532 pub fn ares_parse_aaaa_reply(
533 abuf: *const ::std::os::raw::c_uchar,
534 alen: ::std::os::raw::c_int,
535 host: *mut *mut hostent,
536 addrttls: *mut ares_addr6ttl,
537 naddrttls: *mut ::std::os::raw::c_int,
538 ) -> ::std::os::raw::c_int;
539}
540extern "C" {
541 pub fn ares_parse_caa_reply(
542 abuf: *const ::std::os::raw::c_uchar,
543 alen: ::std::os::raw::c_int,
544 caa_out: *mut *mut ares_caa_reply,
545 ) -> ::std::os::raw::c_int;
546}
547extern "C" {
548 pub fn ares_parse_ptr_reply(
549 abuf: *const ::std::os::raw::c_uchar,
550 alen: ::std::os::raw::c_int,
551 addr: *const ::std::os::raw::c_void,
552 addrlen: ::std::os::raw::c_int,
553 family: ::std::os::raw::c_int,
554 host: *mut *mut hostent,
555 ) -> ::std::os::raw::c_int;
556}
557extern "C" {
558 pub fn ares_parse_ns_reply(
559 abuf: *const ::std::os::raw::c_uchar,
560 alen: ::std::os::raw::c_int,
561 host: *mut *mut hostent,
562 ) -> ::std::os::raw::c_int;
563}
564extern "C" {
565 pub fn ares_parse_srv_reply(
566 abuf: *const ::std::os::raw::c_uchar,
567 alen: ::std::os::raw::c_int,
568 srv_out: *mut *mut ares_srv_reply,
569 ) -> ::std::os::raw::c_int;
570}
571extern "C" {
572 pub fn ares_parse_mx_reply(
573 abuf: *const ::std::os::raw::c_uchar,
574 alen: ::std::os::raw::c_int,
575 mx_out: *mut *mut ares_mx_reply,
576 ) -> ::std::os::raw::c_int;
577}
578extern "C" {
579 pub fn ares_parse_txt_reply(
580 abuf: *const ::std::os::raw::c_uchar,
581 alen: ::std::os::raw::c_int,
582 txt_out: *mut *mut ares_txt_reply,
583 ) -> ::std::os::raw::c_int;
584}
585extern "C" {
586 pub fn ares_parse_txt_reply_ext(
587 abuf: *const ::std::os::raw::c_uchar,
588 alen: ::std::os::raw::c_int,
589 txt_out: *mut *mut ares_txt_ext,
590 ) -> ::std::os::raw::c_int;
591}
592extern "C" {
593 pub fn ares_parse_naptr_reply(
594 abuf: *const ::std::os::raw::c_uchar,
595 alen: ::std::os::raw::c_int,
596 naptr_out: *mut *mut ares_naptr_reply,
597 ) -> ::std::os::raw::c_int;
598}
599extern "C" {
600 pub fn ares_parse_soa_reply(
601 abuf: *const ::std::os::raw::c_uchar,
602 alen: ::std::os::raw::c_int,
603 soa_out: *mut *mut ares_soa_reply,
604 ) -> ::std::os::raw::c_int;
605}
606extern "C" {
607 pub fn ares_parse_uri_reply(
608 abuf: *const ::std::os::raw::c_uchar,
609 alen: ::std::os::raw::c_int,
610 uri_out: *mut *mut ares_uri_reply,
611 ) -> ::std::os::raw::c_int;
612}
613extern "C" {
614 pub fn ares_free_string(str_: *mut ::std::os::raw::c_void);
615}
616extern "C" {
617 pub fn ares_free_hostent(host: *mut hostent);
618}
619extern "C" {
620 pub fn ares_free_data(dataptr: *mut ::std::os::raw::c_void);
621}
622extern "C" {
623 pub fn ares_strerror(code: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
624}
625#[repr(C)]
626#[derive(Copy, Clone)]
627pub struct ares_addr_node {
628 pub next: *mut ares_addr_node,
629 pub family: ::std::os::raw::c_int,
630 pub addr: ares_addr_node__bindgen_ty_1,
631}
632#[repr(C)]
633#[derive(Copy, Clone)]
634pub union ares_addr_node__bindgen_ty_1 {
635 pub addr4: in_addr,
636 pub addr6: ares_in6_addr,
637}
638#[repr(C)]
639#[derive(Copy, Clone)]
640pub struct ares_addr_port_node {
641 pub next: *mut ares_addr_port_node,
642 pub family: ::std::os::raw::c_int,
643 pub addr: ares_addr_port_node__bindgen_ty_1,
644 pub udp_port: ::std::os::raw::c_int,
645 pub tcp_port: ::std::os::raw::c_int,
646}
647#[repr(C)]
648#[derive(Copy, Clone)]
649pub union ares_addr_port_node__bindgen_ty_1 {
650 pub addr4: in_addr,
651 pub addr6: ares_in6_addr,
652}
653extern "C" {
654 pub fn ares_set_servers(
655 channel: ares_channel,
656 servers: *mut ares_addr_node,
657 ) -> ::std::os::raw::c_int;
658}
659extern "C" {
660 pub fn ares_set_servers_ports(
661 channel: ares_channel,
662 servers: *mut ares_addr_port_node,
663 ) -> ::std::os::raw::c_int;
664}
665extern "C" {
666 pub fn ares_set_servers_csv(
667 channel: ares_channel,
668 servers: *const ::std::os::raw::c_char,
669 ) -> ::std::os::raw::c_int;
670}
671extern "C" {
672 pub fn ares_set_servers_ports_csv(
673 channel: ares_channel,
674 servers: *const ::std::os::raw::c_char,
675 ) -> ::std::os::raw::c_int;
676}
677extern "C" {
678 pub fn ares_get_servers(
679 channel: *const ares_channeldata,
680 servers: *mut *mut ares_addr_node,
681 ) -> ::std::os::raw::c_int;
682}
683extern "C" {
684 pub fn ares_get_servers_ports(
685 channel: *const ares_channeldata,
686 servers: *mut *mut ares_addr_port_node,
687 ) -> ::std::os::raw::c_int;
688}
689extern "C" {
690 pub fn ares_inet_ntop(
691 af: ::std::os::raw::c_int,
692 src: *const ::std::os::raw::c_void,
693 dst: *mut ::std::os::raw::c_char,
694 size: ares_socklen_t,
695 ) -> *const ::std::os::raw::c_char;
696}
697extern "C" {
698 pub fn ares_inet_pton(
699 af: ::std::os::raw::c_int,
700 src: *const ::std::os::raw::c_char,
701 dst: *mut ::std::os::raw::c_void,
702 ) -> ::std::os::raw::c_int;
703}