Commit | Line | Data |
---|---|---|
e015f748 CE |
1 | #ifndef _DNS_RESOLV_H |
2 | #define _DNS_RESOLV_H | |
3 | ||
4 | #ifdef USE_DNS /* skip whole file if not using DNS stuff... */ | |
5 | ||
6 | struct dnsRecord { time_t timeStamp; /* Timestamp of resolv data */ | |
7 | int numeric; /* 0: Name, 1: IP-address */ | |
8 | char hostName[1]; }; /* Hostname (var length) */ | |
9 | ||
10 | struct dns_child /* Defines the communication with a DNS child */ | |
11 | { | |
12 | int inpipe[2]; /* Pipe Child -> Father */ | |
13 | int outpipe[2]; /* Pipe Father -> Child */ | |
14 | int pid; /* PID of Child */ | |
15 | int flags; /* see below */ | |
16 | struct dnode *cur; /* Currently processed node */ | |
17 | }; | |
18 | ||
19 | extern void resolve_dns(struct log_struct *); | |
20 | extern DB *dns_db; | |
21 | extern int dns_fd; | |
22 | extern int dns_resolver(void *); | |
23 | extern int open_cache(); | |
24 | extern int close_cache(); | |
25 | ||
26 | extern DB *geo_db; | |
27 | extern DB *geodb_open(char *); | |
28 | extern char *geodb_ver(DB *, char *); | |
29 | extern char *geodb_get_cc(DB *, char *, char *); | |
30 | extern void geodb_close(DB *); | |
31 | ||
32 | #define DNS_CHILD_READY 0x1 /* Our child flags */ | |
33 | #define DNS_CHILD_RUNNING 0x2 | |
34 | ||
35 | #define MAXCHILD 100 /* Maximum number of DNS children */ | |
36 | ||
37 | #ifndef GEODB_LOC | |
38 | #define GEODB_LOC "/usr/share/GeoDB" | |
39 | #endif | |
40 | ||
41 | #endif /* USE_DNS */ | |
42 | #endif /* _DNS_RESOLV_H */ |