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