|
|
|
@ -120,34 +120,34 @@ extern "C" { |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#ifdef __GNUC__ |
|
|
|
|
#define CARES_GCC_VERSION (__GNUC__ * 10000 \ |
|
|
|
|
+ __GNUC_MINOR__ * 100 \
|
|
|
|
|
+ __GNUC_PATCHLEVEL__) |
|
|
|
|
# define CARES_GCC_VERSION \ |
|
|
|
|
(__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) |
|
|
|
|
#else |
|
|
|
|
#define CARES_GCC_VERSION 0 |
|
|
|
|
# define CARES_GCC_VERSION 0 |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#ifndef __has_attribute |
|
|
|
|
#define __has_attribute(x) 0 |
|
|
|
|
# define __has_attribute(x) 0 |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#ifdef CARES_NO_DEPRECATED |
|
|
|
|
#define CARES_DEPRECATED |
|
|
|
|
#define CARES_DEPRECATED_FOR(f) |
|
|
|
|
# define CARES_DEPRECATED |
|
|
|
|
# define CARES_DEPRECATED_FOR(f) |
|
|
|
|
#else |
|
|
|
|
#if CARES_GCC_VERSION >= 30200 || __has_attribute (__deprecated__) |
|
|
|
|
#define CARES_DEPRECATED __attribute__((__deprecated__)) |
|
|
|
|
#else |
|
|
|
|
#define CARES_DEPRECATED |
|
|
|
|
#endif |
|
|
|
|
# if CARES_GCC_VERSION >= 30200 || __has_attribute(__deprecated__) |
|
|
|
|
# define CARES_DEPRECATED __attribute__((__deprecated__)) |
|
|
|
|
# else |
|
|
|
|
# define CARES_DEPRECATED |
|
|
|
|
# endif |
|
|
|
|
|
|
|
|
|
#if CARES_GCC_VERSION >= 40500 || defined(__clang__) |
|
|
|
|
#define CARES_DEPRECATED_FOR(f) __attribute__((deprecated("Use " #f " instead"))) |
|
|
|
|
#elif defined(_MSC_VER) |
|
|
|
|
#define CARES_DEPRECATED_FOR(f) __declspec(deprecated("Use " #f " instead")) |
|
|
|
|
#else |
|
|
|
|
#define CARES_DEPRECATED_FOR(f) CARES_DEPRECATED |
|
|
|
|
#endif |
|
|
|
|
# if CARES_GCC_VERSION >= 40500 || defined(__clang__) |
|
|
|
|
# define CARES_DEPRECATED_FOR(f) \ |
|
|
|
|
__attribute__((deprecated("Use " #f " instead"))) |
|
|
|
|
# elif defined(_MSC_VER) |
|
|
|
|
# define CARES_DEPRECATED_FOR(f) __declspec(deprecated("Use " #f " instead")) |
|
|
|
|
# else |
|
|
|
|
# define CARES_DEPRECATED_FOR(f) CARES_DEPRECATED |
|
|
|
|
# endif |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
typedef enum { |
|
|
|
@ -408,32 +408,32 @@ struct ares_addr { |
|
|
|
|
/* DNS record parser, writer, and helpers */ |
|
|
|
|
#include "ares_dns_record.h" |
|
|
|
|
|
|
|
|
|
typedef void (*ares_callback)(void *arg, int status, int timeouts, |
|
|
|
|
typedef void (*ares_callback)(void *arg, int status, int timeouts, |
|
|
|
|
unsigned char *abuf, int alen); |
|
|
|
|
|
|
|
|
|
typedef void (*ares_callback_dnsrec)(void *arg, ares_status_t status, |
|
|
|
|
size_t timeouts, |
|
|
|
|
typedef void (*ares_callback_dnsrec)(void *arg, ares_status_t status, |
|
|
|
|
size_t timeouts, |
|
|
|
|
const ares_dns_record_t *dnsrec); |
|
|
|
|
|
|
|
|
|
typedef void (*ares_host_callback)(void *arg, int status, int timeouts, |
|
|
|
|
typedef void (*ares_host_callback)(void *arg, int status, int timeouts, |
|
|
|
|
struct hostent *hostent); |
|
|
|
|
|
|
|
|
|
typedef void (*ares_nameinfo_callback)(void *arg, int status, int timeouts, |
|
|
|
|
typedef void (*ares_nameinfo_callback)(void *arg, int status, int timeouts, |
|
|
|
|
char *node, char *service); |
|
|
|
|
|
|
|
|
|
typedef int (*ares_sock_create_callback)(ares_socket_t socket_fd, int type, |
|
|
|
|
typedef int (*ares_sock_create_callback)(ares_socket_t socket_fd, int type, |
|
|
|
|
void *data); |
|
|
|
|
|
|
|
|
|
typedef int (*ares_sock_config_callback)(ares_socket_t socket_fd, int type, |
|
|
|
|
typedef int (*ares_sock_config_callback)(ares_socket_t socket_fd, int type, |
|
|
|
|
void *data); |
|
|
|
|
|
|
|
|
|
typedef void (*ares_addrinfo_callback)(void *arg, int status, int timeouts, |
|
|
|
|
typedef void (*ares_addrinfo_callback)(void *arg, int status, int timeouts, |
|
|
|
|
struct ares_addrinfo *res); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN int ares_library_init(int flags); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN int ares_library_init_mem(int flags, void *(*amalloc)(size_t size), |
|
|
|
|
void (*afree)(void *ptr), |
|
|
|
|
void (*afree)(void *ptr), |
|
|
|
|
void *(*arealloc)(void *ptr, |
|
|
|
|
size_t size)); |
|
|
|
|
|
|
|
|
@ -443,14 +443,14 @@ CARES_EXTERN int ares_library_init_android(jobject connectivity_manager); |
|
|
|
|
CARES_EXTERN int ares_library_android_initialized(void); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
CARES_EXTERN int ares_library_initialized(void); |
|
|
|
|
CARES_EXTERN int ares_library_initialized(void); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN void ares_library_cleanup(void); |
|
|
|
|
CARES_EXTERN void ares_library_cleanup(void); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN const char *ares_version(int *version); |
|
|
|
|
CARES_EXTERN const char *ares_version(int *version); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_init_options) |
|
|
|
|
int ares_init(ares_channel_t **channelptr); |
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_init_options) int ares_init( |
|
|
|
|
ares_channel_t **channelptr); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN int ares_init_options(ares_channel_t **channelptr, |
|
|
|
|
const struct ares_options *options, |
|
|
|
@ -513,7 +513,7 @@ struct iovec; |
|
|
|
|
|
|
|
|
|
struct ares_socket_functions { |
|
|
|
|
ares_socket_t (*asocket)(int, int, int, void *); |
|
|
|
|
int (*aclose)(ares_socket_t, void *); |
|
|
|
|
int (*aclose)(ares_socket_t, void *); |
|
|
|
|
int (*aconnect)(ares_socket_t, const struct sockaddr *, ares_socklen_t, |
|
|
|
|
void *); |
|
|
|
|
ares_ssize_t (*arecvfrom)(ares_socket_t, void *, size_t, int, |
|
|
|
@ -522,13 +522,13 @@ struct ares_socket_functions { |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
CARES_EXTERN void |
|
|
|
|
ares_set_socket_functions(ares_channel_t *channel, |
|
|
|
|
const struct ares_socket_functions *funcs, |
|
|
|
|
void *user_data); |
|
|
|
|
ares_set_socket_functions(ares_channel_t *channel, |
|
|
|
|
const struct ares_socket_functions *funcs, |
|
|
|
|
void *user_data); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_send_dnsrec) |
|
|
|
|
void ares_send(ares_channel_t *channel, const unsigned char *qbuf, |
|
|
|
|
int qlen, ares_callback callback, void *arg); |
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_send_dnsrec) void ares_send( |
|
|
|
|
ares_channel_t *channel, const unsigned char *qbuf, int qlen, |
|
|
|
|
ares_callback callback, void *arg); |
|
|
|
|
|
|
|
|
|
/*! Send a DNS query as an ares_dns_record_t with a callback containing the
|
|
|
|
|
* parsed DNS record. |
|
|
|
@ -541,15 +541,14 @@ CARES_EXTERN CARES_DEPRECATED_FOR(ares_send_dnsrec) |
|
|
|
|
* \param[out] qid Query ID |
|
|
|
|
* \return One of the c-ares status codes. |
|
|
|
|
*/ |
|
|
|
|
CARES_EXTERN ares_status_t ares_send_dnsrec(ares_channel_t *channel, |
|
|
|
|
CARES_EXTERN ares_status_t ares_send_dnsrec(ares_channel_t *channel, |
|
|
|
|
const ares_dns_record_t *dnsrec, |
|
|
|
|
ares_callback_dnsrec callback, |
|
|
|
|
ares_callback_dnsrec callback, |
|
|
|
|
void *arg, unsigned short *qid); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_query_dnsrec) |
|
|
|
|
void ares_query(ares_channel_t *channel, const char *name, |
|
|
|
|
int dnsclass, int type, ares_callback callback, |
|
|
|
|
void *arg); |
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_query_dnsrec) void ares_query( |
|
|
|
|
ares_channel_t *channel, const char *name, int dnsclass, int type, |
|
|
|
|
ares_callback callback, void *arg); |
|
|
|
|
|
|
|
|
|
/*! Perform a DNS query with a callback containing the parsed DNS record.
|
|
|
|
|
* |
|
|
|
@ -568,13 +567,11 @@ CARES_EXTERN ares_status_t ares_query_dnsrec(ares_channel_t *channel, |
|
|
|
|
ares_dns_class_t dnsclass, |
|
|
|
|
ares_dns_rec_type_t type, |
|
|
|
|
ares_callback_dnsrec callback, |
|
|
|
|
void *arg, |
|
|
|
|
unsigned short *qid); |
|
|
|
|
void *arg, unsigned short *qid); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_search_dnsrec) |
|
|
|
|
void ares_search(ares_channel_t *channel, const char *name, |
|
|
|
|
int dnsclass, int type, ares_callback callback, |
|
|
|
|
void *arg); |
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_search_dnsrec) void ares_search( |
|
|
|
|
ares_channel_t *channel, const char *name, int dnsclass, int type, |
|
|
|
|
ares_callback callback, void *arg); |
|
|
|
|
|
|
|
|
|
/*! Search for a complete DNS message.
|
|
|
|
|
* |
|
|
|
@ -587,15 +584,14 @@ CARES_EXTERN CARES_DEPRECATED_FOR(ares_search_dnsrec) |
|
|
|
|
* ARES_EFORMERR due to misuse, this error code will also be sent |
|
|
|
|
* to the provided callback. |
|
|
|
|
*/ |
|
|
|
|
CARES_EXTERN ares_status_t ares_search_dnsrec(ares_channel_t *channel, |
|
|
|
|
CARES_EXTERN ares_status_t ares_search_dnsrec(ares_channel_t *channel, |
|
|
|
|
const ares_dns_record_t *dnsrec, |
|
|
|
|
ares_callback_dnsrec callback, |
|
|
|
|
void *arg); |
|
|
|
|
ares_callback_dnsrec callback, |
|
|
|
|
void *arg); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_getaddrinfo) |
|
|
|
|
void ares_gethostbyname(ares_channel_t *channel, const char *name, |
|
|
|
|
int family, ares_host_callback callback, |
|
|
|
|
void *arg); |
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_getaddrinfo) void ares_gethostbyname( |
|
|
|
|
ares_channel_t *channel, const char *name, int family, |
|
|
|
|
ares_host_callback callback, void *arg); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN int ares_gethostbyname_file(ares_channel_t *channel, |
|
|
|
|
const char *name, int family, |
|
|
|
@ -610,42 +606,42 @@ CARES_EXTERN void ares_getnameinfo(ares_channel_t *channel, |
|
|
|
|
ares_socklen_t salen, int flags, |
|
|
|
|
ares_nameinfo_callback callback, void *arg); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ARES_OPT_EVENT_THREAD or ARES_OPT_SOCK_STATE_CB) |
|
|
|
|
int ares_fds(ares_channel_t *channel, fd_set *read_fds, fd_set *write_fds); |
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR( |
|
|
|
|
ARES_OPT_EVENT_THREAD or |
|
|
|
|
ARES_OPT_SOCK_STATE_CB) int ares_fds(ares_channel_t *channel, |
|
|
|
|
fd_set *read_fds, fd_set *write_fds); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ARES_OPT_EVENT_THREAD or ARES_OPT_SOCK_STATE_CB) |
|
|
|
|
int ares_getsock(ares_channel_t *channel, ares_socket_t *socks, int numsocks); |
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR( |
|
|
|
|
ARES_OPT_EVENT_THREAD or |
|
|
|
|
ARES_OPT_SOCK_STATE_CB) int ares_getsock(ares_channel_t *channel, |
|
|
|
|
ares_socket_t *socks, int numsocks); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN struct timeval *ares_timeout(ares_channel_t *channel, |
|
|
|
|
struct timeval *maxtv, |
|
|
|
|
struct timeval *tv); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_process_fd) |
|
|
|
|
void ares_process(ares_channel_t *channel, fd_set *read_fds, |
|
|
|
|
fd_set *write_fds); |
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_process_fd) void ares_process( |
|
|
|
|
ares_channel_t *channel, fd_set *read_fds, fd_set *write_fds); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN void ares_process_fd(ares_channel_t *channel, |
|
|
|
|
ares_socket_t read_fd, |
|
|
|
|
ares_socket_t write_fd); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_record_create) |
|
|
|
|
int ares_create_query(const char *name, int dnsclass, int type, |
|
|
|
|
unsigned short id, int rd, |
|
|
|
|
unsigned char **buf, int *buflen, |
|
|
|
|
int max_udp_size); |
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_record_create) int ares_create_query( |
|
|
|
|
const char *name, int dnsclass, int type, unsigned short id, int rd, |
|
|
|
|
unsigned char **buf, int *buflen, int max_udp_size); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_record_create) |
|
|
|
|
int ares_mkquery(const char *name, int dnsclass, int type, |
|
|
|
|
unsigned short id, int rd, unsigned char **buf, |
|
|
|
|
int *buflen); |
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_record_create) int ares_mkquery( |
|
|
|
|
const char *name, int dnsclass, int type, unsigned short id, int rd, |
|
|
|
|
unsigned char **buf, int *buflen); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN int ares_expand_name(const unsigned char *encoded, |
|
|
|
|
const unsigned char *abuf, int alen, char **s, |
|
|
|
|
long *enclen); |
|
|
|
|
CARES_EXTERN int ares_expand_name(const unsigned char *encoded, |
|
|
|
|
const unsigned char *abuf, int alen, char **s, |
|
|
|
|
long *enclen); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN int ares_expand_string(const unsigned char *encoded, |
|
|
|
|
const unsigned char *abuf, int alen, |
|
|
|
|
unsigned char **s, long *enclen); |
|
|
|
|
CARES_EXTERN int ares_expand_string(const unsigned char *encoded, |
|
|
|
|
const unsigned char *abuf, int alen, |
|
|
|
|
unsigned char **s, long *enclen); |
|
|
|
|
|
|
|
|
|
struct ares_addrttl { |
|
|
|
|
struct in_addr ipaddr; |
|
|
|
@ -772,64 +768,50 @@ struct ares_addrinfo_hints { |
|
|
|
|
** so written. |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) |
|
|
|
|
int ares_parse_a_reply(const unsigned char *abuf, int alen, |
|
|
|
|
struct hostent **host, |
|
|
|
|
struct ares_addrttl *addrttls, |
|
|
|
|
int *naddrttls); |
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_a_reply( |
|
|
|
|
const unsigned char *abuf, int alen, struct hostent **host, |
|
|
|
|
struct ares_addrttl *addrttls, int *naddrttls); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) |
|
|
|
|
int ares_parse_aaaa_reply(const unsigned char *abuf, int alen, |
|
|
|
|
struct hostent **host, |
|
|
|
|
struct ares_addr6ttl *addrttls, |
|
|
|
|
int *naddrttls); |
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_aaaa_reply( |
|
|
|
|
const unsigned char *abuf, int alen, struct hostent **host, |
|
|
|
|
struct ares_addr6ttl *addrttls, int *naddrttls); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) |
|
|
|
|
int ares_parse_caa_reply(const unsigned char *abuf, int alen, |
|
|
|
|
struct ares_caa_reply **caa_out); |
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_caa_reply( |
|
|
|
|
const unsigned char *abuf, int alen, struct ares_caa_reply **caa_out); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) |
|
|
|
|
int ares_parse_ptr_reply(const unsigned char *abuf, int alen, |
|
|
|
|
const void *addr, int addrlen, int family, |
|
|
|
|
struct hostent **host); |
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_ptr_reply( |
|
|
|
|
const unsigned char *abuf, int alen, const void *addr, int addrlen, |
|
|
|
|
int family, struct hostent **host); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) |
|
|
|
|
int ares_parse_ns_reply(const unsigned char *abuf, int alen, |
|
|
|
|
struct hostent **host); |
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_ns_reply( |
|
|
|
|
const unsigned char *abuf, int alen, struct hostent **host); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) |
|
|
|
|
int ares_parse_srv_reply(const unsigned char *abuf, int alen, |
|
|
|
|
struct ares_srv_reply **srv_out); |
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_srv_reply( |
|
|
|
|
const unsigned char *abuf, int alen, struct ares_srv_reply **srv_out); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) |
|
|
|
|
int ares_parse_mx_reply(const unsigned char *abuf, int alen, |
|
|
|
|
struct ares_mx_reply **mx_out); |
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_mx_reply( |
|
|
|
|
const unsigned char *abuf, int alen, struct ares_mx_reply **mx_out); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) |
|
|
|
|
int ares_parse_txt_reply(const unsigned char *abuf, int alen, |
|
|
|
|
struct ares_txt_reply **txt_out); |
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_txt_reply( |
|
|
|
|
const unsigned char *abuf, int alen, struct ares_txt_reply **txt_out); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) |
|
|
|
|
int ares_parse_txt_reply_ext(const unsigned char *abuf, int alen, |
|
|
|
|
struct ares_txt_ext **txt_out); |
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_txt_reply_ext( |
|
|
|
|
const unsigned char *abuf, int alen, struct ares_txt_ext **txt_out); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) |
|
|
|
|
int ares_parse_naptr_reply(const unsigned char *abuf, int alen, |
|
|
|
|
struct ares_naptr_reply **naptr_out); |
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_naptr_reply( |
|
|
|
|
const unsigned char *abuf, int alen, struct ares_naptr_reply **naptr_out); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) |
|
|
|
|
int ares_parse_soa_reply(const unsigned char *abuf, int alen, |
|
|
|
|
struct ares_soa_reply **soa_out); |
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_soa_reply( |
|
|
|
|
const unsigned char *abuf, int alen, struct ares_soa_reply **soa_out); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) |
|
|
|
|
int ares_parse_uri_reply(const unsigned char *abuf, int alen, |
|
|
|
|
struct ares_uri_reply **uri_out); |
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_uri_reply( |
|
|
|
|
const unsigned char *abuf, int alen, struct ares_uri_reply **uri_out); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN void ares_free_string(void *str); |
|
|
|
|
CARES_EXTERN void ares_free_string(void *str); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN void ares_free_hostent(struct hostent *host); |
|
|
|
|
CARES_EXTERN void ares_free_hostent(struct hostent *host); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN void ares_free_data(void *dataptr); |
|
|
|
|
CARES_EXTERN void ares_free_data(void *dataptr); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN const char *ares_strerror(int code); |
|
|
|
|
|
|
|
|
@ -856,28 +838,26 @@ struct ares_addr_port_node { |
|
|
|
|
int tcp_port; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_set_servers_csv) |
|
|
|
|
int ares_set_servers(ares_channel_t *channel, |
|
|
|
|
const struct ares_addr_node *servers); |
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_set_servers_csv) int ares_set_servers( |
|
|
|
|
ares_channel_t *channel, const struct ares_addr_node *servers); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_set_servers_ports_csv) |
|
|
|
|
int ares_set_servers_ports(ares_channel_t *channel, |
|
|
|
|
const struct ares_addr_port_node *servers); |
|
|
|
|
CARES_EXTERN |
|
|
|
|
CARES_DEPRECATED_FOR(ares_set_servers_ports_csv) int ares_set_servers_ports( |
|
|
|
|
ares_channel_t *channel, const struct ares_addr_port_node *servers); |
|
|
|
|
|
|
|
|
|
/* Incoming string format: host[:port][,host[:port]]... */ |
|
|
|
|
CARES_EXTERN int ares_set_servers_csv(ares_channel_t *channel, |
|
|
|
|
const char *servers); |
|
|
|
|
CARES_EXTERN int ares_set_servers_ports_csv(ares_channel_t *channel, |
|
|
|
|
const char *servers); |
|
|
|
|
CARES_EXTERN char *ares_get_servers_csv(ares_channel_t *channel); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_get_servers_csv) |
|
|
|
|
int ares_get_servers(ares_channel_t *channel, |
|
|
|
|
struct ares_addr_node **servers); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_get_servers_ports_csv) |
|
|
|
|
int ares_get_servers_ports(ares_channel_t *channel, |
|
|
|
|
struct ares_addr_port_node **servers); |
|
|
|
|
CARES_EXTERN int ares_set_servers_csv(ares_channel_t *channel, |
|
|
|
|
const char *servers); |
|
|
|
|
CARES_EXTERN int ares_set_servers_ports_csv(ares_channel_t *channel, |
|
|
|
|
const char *servers); |
|
|
|
|
CARES_EXTERN char *ares_get_servers_csv(ares_channel_t *channel); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN CARES_DEPRECATED_FOR(ares_get_servers_csv) int ares_get_servers( |
|
|
|
|
ares_channel_t *channel, struct ares_addr_node **servers); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN |
|
|
|
|
CARES_DEPRECATED_FOR(ares_get_servers_ports_csv) int ares_get_servers_ports( |
|
|
|
|
ares_channel_t *channel, struct ares_addr_port_node **servers); |
|
|
|
|
|
|
|
|
|
CARES_EXTERN const char *ares_inet_ntop(int af, const void *src, char *dst, |
|
|
|
|
ares_socklen_t size); |
|
|
|
|