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