Merge pull request #2 from svost/master
[novacoin-seeder.git] / dns.h
1 #ifndef _DNS_H_
2 #define _DNS_H_ 1
3
4 #include <stdint.h>
5
6 typedef struct {
7     int v;
8     union {
9        unsigned char v4[4];
10        unsigned char v6[16];
11     } data;
12 } addr_t;
13
14 typedef struct {
15   int port;
16   int datattl;
17   int nsttl;
18   const char *host;
19   const char *ns;
20   const char *mbox;
21   int (*cb)(void *opt, addr_t *addr, int max, int ipv4, int ipv6);
22   // stats
23   uint64_t nRequests;
24 } dns_opt_t;
25
26 extern int dnsserver(dns_opt_t *opt);
27
28 #endif