3 #ifndef ADNS_INTERNAL_H_INCLUDED
4 #define ADNS_INTERNAL_H_INCLUDED
11 #define MAXUDPRETRIES 10
12 #define UDPRETRYMS 2000
16 adns_query next
, back
;
17 adns_query parent
, child
;
20 int id
, flags
, udpretries
, nextserver
;
21 unsigned long sentudp
, senttcp
; /* bitmaps indexed by server */
22 struct timeval timeout
;
26 * Queue child answer nextserver sentudp senttcp
27 * input null null 0 all bits zero all bits zero
28 * timew null null any at least 1 bit set any
29 * childw set partial any any any
30 * output null set any any any
35 adns_initflags iflags
;
36 struct { adns_query head
, tail
; } input
, timew
, childw
, output
;
37 int nextid
, udpsocket
;
38 int qbufavail
, tcpbufavail
, tcpbufused
, tcpbufdone
;
43 enum { server_disc
, server_connecting
, server_ok
} state
;
45 struct timeval timeout
;
46 struct { adns_query head
, tail
; } connw
;
47 } servers
[MAXSERVERS
];