08a29488ab6c638fe8a7b078b6404b8794dbe2c7
3 #ifndef ADNS_INTERNAL_H_INCLUDED
4 #define ADNS_INTERNAL_H_INCLUDED
11 #define MAXUDPRETRIES 15
12 #define UDPRETRYMS 2000
14 #define LOCALRESOURCEMS 20
26 /* FIXME: make sure this is all init'd properly */
27 adns_query back
, next
;
29 struct { adns_query head
, tail
; } children
;
30 struct { adns_query back
, next
; } siblings
;
33 size_t ansalloc
; ansused
;
34 int id
, flags
, udpretries
; /* udpretries==-1 => _f_usevc or too big for UDP */
36 unsigned long sentudp
, senttcp
; /* bitmaps indexed by server */
37 struct timeval timeout
;
39 unsigned char *querymsg
;
43 * Queue child id answer nextserver sentudp senttcp
44 * tosend null >=0 null any any any
45 * timew null >=0 null any at least 1 bit set any
46 * childw set >=0 partial any any any
47 * output null -1 set/null any any any
57 /* FIXME: make sure this is all init'd properly */
58 adns_initflags iflags
;
59 struct { adns_query head
, tail
; } tosend
, timew
, childw
, output
;
60 int nextid
, udpsocket
;
61 adns_vbuf rqbuf
, tcpsend
, tcprecv
;
62 int nservers
, tcpserver
;
63 enum adns__tcpstate
{ server_disc
, server_connecting
, server_ok
} tcpstate
;
65 struct timeval tcptimeout
;
68 } servers
[MAXSERVERS
];