Found on chiark.
[adns] / src / adns-internal.h
1 /**/
2
3 #ifndef ADNS_INTERNAL_H_INCLUDED
4 #define ADNS_INTERNAL_H_INCLUDED
5
6 #include "adns.h"
7
8 #define MAXSERVERS 5
9 #define MAXUDPRETRIES 10
10 #define UDPRETRYMS 2000
11 #define TCPMS 20000
12
13 struct adns__query {
14 adns_query next, back;
15 adns_query parent, child;
16 adns_rrtype type;
17 stuct adns_answer *answer;
18 int flags, udpretries, server;
19 struct timeval timeout;
20 void *context;
21 char owner[1];
22 };
23
24 struct adns__state {
25 struct { adns_query head, tail } input, timew, childw, output;
26 int udpsocket;
27 int qbufavail, tcpbufavail, tcpbufused, tcpbufdone;
28 char *qbuf, *tcpbuf;
29 int nservers;
30 struct {
31 struct in_addr addr;
32 int tcpsocket;
33 struct timeval timeout;
34 struct { adns_query head, tail } connw;
35 } servers[MAXSERVERS];
36 };
37
38 #endif