23#include <sys/socket.h>
24#include <netinet/in.h>
45static void addr_callback(
void *arg,
int status,
unsigned char *abuf,
89 for (p =
aquery->remaining_lookups; *p; p++)
95 a1 = (addr >> 24) & 0xff;
96 a2 = (addr >> 16) & 0xff;
97 a3 = (addr >> 8) & 0xff;
100 aquery->remaining_lookups = p + 1;
117static void addr_callback(
void *arg,
int status,
unsigned char *abuf,
int alen)
158 if (
memcmp((*host)->h_addr, addr,
sizeof(
struct in_addr)) == 0)
static void callback(void *arg, int status, unsigned char *abuf, int alen)
#define ARES_EDESTRUCTION
void ares_free_hostent(struct hostent *host)
void(* ares_host_callback)(void *arg, int status, struct hostent *hostent)
void ares_query(ares_channel channel, const char *name, int dnsclass, int type, ares_callback callback, void *arg)
int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr, int addrlen, int family, struct hostent **host)
int ares__get_hostent(FILE *fp, struct hostent **host)
void ares_gethostbyaddr(ares_channel channel, const void *addr, int addrlen, int family, ares_host_callback callback, void *arg)
static void next_lookup(struct addr_query *aquery)
static void addr_callback(void *arg, int status, unsigned char *abuf, int alen)
static int file_lookup(struct in_addr *addr, struct hostent **host)
static void end_aquery(struct addr_query *aquery, int status, struct hostent *host)
const char * remaining_lookups
ares_host_callback callback