]>
Commit | Line | Data |
---|---|---|
212380e3 | 1 | /* |
2 | * res.h for referencing functions in res.c, reslib.c | |
3 | * | |
212380e3 | 4 | */ |
5 | ||
6 | #ifndef _CHARYBDIS_RES_H | |
7 | #define _CHARYBDIS_RES_H | |
8 | ||
9 | #include "ircd_defs.h" | |
10 | #include "common.h" | |
212380e3 | 11 | #include "reslib.h" |
13ae2f4b | 12 | #include "match.h" |
212380e3 | 13 | #include "ircd.h" |
14 | ||
15 | /* Maximum number of nameservers in /etc/resolv.conf we care about | |
16 | * In hybrid, this was 2 -- but in Charybdis, we want to track | |
17 | * a few more than that ;) --nenolod | |
18 | */ | |
19 | #define IRCD_MAXNS 10 | |
20 | ||
21 | struct DNSReply | |
22 | { | |
23 | char *h_name; | |
3ea5fee7 | 24 | struct rb_sockaddr_storage addr; |
212380e3 | 25 | }; |
26 | ||
27 | struct DNSQuery | |
28 | { | |
29 | void *ptr; /* pointer used by callback to identify request */ | |
30 | void (*callback)(void* vptr, struct DNSReply *reply); /* callback to call */ | |
31 | }; | |
32 | ||
3ea5fee7 | 33 | extern struct rb_sockaddr_storage irc_nsaddr_list[]; |
212380e3 | 34 | extern int irc_nscount; |
35 | ||
36 | extern void init_resolver(void); | |
37 | extern void restart_resolver(void); | |
38 | extern void delete_resolver_queries(const struct DNSQuery *); | |
39 | extern void gethost_byname_type(const char *, struct DNSQuery *, int); | |
3ea5fee7 | 40 | extern void gethost_byaddr(const struct rb_sockaddr_storage *, struct DNSQuery *); |
212380e3 | 41 | extern void add_local_domain(char *, size_t); |
42 | extern void report_dns_servers(struct Client *); | |
43 | ||
44 | #endif |