#define DNS_HDRSIZE 12
#define DNS_CLASS_IN 1
+#define DNS_INADDR_ARPA "in-addr", "arpa"
+
typedef enum {
rcode_noerror,
rcode_formaterror,
byte *buf;
} vbuf;
-typedef union {
- void *ext;
- struct {
- void (*callback)(adns_query parent, adns_query child);
- union {
- adns_rr_hostaddr *hostaddr;
- } info;
- } intern;
-} qcontext;
-
typedef struct {
adns_state ads;
adns_query qu;
union maxalign *up;
} data;
+typedef struct {
+ void *ext;
+ void (*callback)(adns_query parent, adns_query child);
+ union {
+ adns_rr_addr ptr_parent_addr;
+ adns_rr_hostaddr *hostaddr;
+ } info;
+} qcontext;
+
struct adns__query {
adns_state ads;
enum { query_udp, query_tcpwait, query_tcpsent, query_child, query_done } state;
int udpnextserver;
unsigned long udpsent, tcpfailed; /* bitmap indexed by server */
struct timeval timeout;
- qcontext context;
+
+ qcontext ctx;
/* Possible states:
*