24#include <sys/socket.h>
26#include <netinet/in.h>
79 const unsigned char *abuf,
int alen);
81 unsigned char *abuf,
int alen);
298#if defined UNDER_CE || defined WIN32
335#if defined UNDER_CE || defined WIN32
390 count = recv(server->
udp_socket, buf,
sizeof(buf), 0);
733#define PORTABLE_INPROGRESS_ERR WSAEWOULDBLOCK
735#define PORTABLE_INPROGRESS_ERR EINPROGRESS
746 sin6.sin6_flowinfo = 0;
747 sin6.sin6_scope_id = 0;
840 sin6.sin6_flowinfo = 0;
841 sin6.sin6_scope_id = 0;
872 const unsigned char* abuf,
int alen)
875 const unsigned char* p;
890 if (
q.qdcount !=
a.qdcount)
895 for (
i = 0;
i <
q.qdcount;
i++)
913 for (
j = 0;
j <
a.qdcount;
j++)
935 &&
q.dnsclass ==
a.dnsclass)
951 unsigned char* abuf,
int alen)
957 for (
q = &channel->
queries; *
q;
q = &(*q)->next)
#define resip_assert(x)
This file needs to work for both C and C++ code.
static const struct nv flags[]
@ ARES_POLLACTION_WRITEOFF
@ ARES_POLLACTION_WRITEON
void() ares_poll_cb_func(void *cb_data, struct ares_channeldata *chan, int sockidx, int fd, int using_tcp, ares_poll_action_t act)
#define DNS_HEADER_QDCOUNT(h)
#define ARES_FLAG_NOCHECKRESP
int ares_expand_name(const unsigned char *encoded, const unsigned char *abuf, int alen, char **s, long *enclen)
#define ARES_FLAG_STAYOPEN
#define ARES_FLAG_TRY_NEXT_SERVER_ON_RCODE3
void ares__close_poll(ares_channel channel, int server_idx)
void ares__close_sockets(struct server_state *server)
#define DNS_QUESTION_CLASS(q)
#define DNS_QUESTION_TYPE(q)
#define DNS_HEADER_QID(h)
#define DNS_HEADER_RCODE(h)
void ares_local_process_requests()
static void read_udp_packets(ares_channel channel, int server_idx, fd_set *read_fds, time_t now)
void ares__kill_socket(int s)
static int same_questions(const unsigned char *qbuf, int qlen, const unsigned char *abuf, int alen)
static void process_timeouts(ares_channel channel, time_t now)
static void process_answer(ares_channel channel, unsigned char *abuf, int alen, int whichserver, int tcp, time_t now)
static int open_tcp_socket(ares_channel channel, struct server_state *server)
static int next_server_new_network(ares_channel channel, struct query *query, time_t now)
void ares_process(ares_channel channel, fd_set *read_fds, fd_set *write_fds)
static void next_server(ares_channel channel, struct query *query, time_t now)
static void handle_error(ares_channel channel, int whichserver, time_t now)
static int make_socket_non_blocking(int s)
static void write_tcp_data_core(ares_channel channel, int server_idx, time_t now)
void ares_process_poll(ares_channel channel, int server_idx, int rdFd, int wrFd, time_t now)
static int would_block(void)
void ares_process_set_poll_cb(ares_channel channel, ares_poll_cb_func *cbf, void *cbd)
#define PORTABLE_INPROGRESS_ERR
static void read_tcp_data(ares_channel channel, int server_idx, fd_set *read_fds, time_t now)
static int connect_udp_ipv4(int s, ares_channel channel, struct server_state *server)
static void write_tcp_data(ares_channel channel, fd_set *write_fds, time_t now)
static void end_query(ares_channel channel, struct query *query, int status, unsigned char *abuf, int alen)
static int open_udp_socket(ares_channel channel, struct server_state *server)
void ares__send_query(ares_channel channel, struct query *query, time_t now)
ares_poll_cb_func * poll_cb_func
socket_function_ptr socket_function
struct server_state * servers
struct send_request * next
unsigned char tcp_lenbuf[2]
struct send_request * qhead
struct send_request * qtail
unsigned char * tcp_buffer
unsigned char physical_addr[MAX_ADAPTER_ADDRESS_LENGTH]