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 adns_query back, next;
28 struct { adns_query head, tail; } children;
29 struct { adns_query back, next; } siblings;
32 size_t ansalloc; ansused;
33 int id, flags, udpretries; /* udpretries==-1 => _f_usevc or too big for UDP */
35 unsigned long sentudp, senttcp; /* bitmaps indexed by server */
36 struct timeval timeout;
38 unsigned char *querymsg;
42 * Queue child id answer nextserver sentudp senttcp
43 * tosend null >=0 null any any any
44 * timew null >=0 null any at least 1 bit set any
45 * childw set >=0 partial any any any
46 * output null -1 set/null any any any
51 adns_initflags iflags;
52 struct { adns_query head, tail; } tosend, timew, childw, output;
53 int nextid, udpsocket;
54 int qbufavail, tcpbufavail, tcpbufused, tcpbufdone;
55 unsigned char *qbuf, *tcpbuf;
56 int nservers, tcpserver;
57 enum { server_disc, server_connecting, server_ok } tcpstate;
59 struct timeval tcptimeout;
60 int opbufavail, opbufused;
64 } servers[MAXSERVERS];