]> jfr.im git - solanum.git/blob - authd/res.h
cap: allow modules to return client-specific responses for capability inquiries
[solanum.git] / authd / res.h
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 /* Maximum number of nameservers in /etc/resolv.conf we care about
11 * In hybrid, this was 2 -- but in Charybdis, we want to track
12 * a few more than that ;) --nenolod
13 */
14 #define IRCD_MAXNS 10
15 #define RESOLVER_HOSTLEN 255
16
17 struct DNSReply
18 {
19 char *h_name;
20 struct rb_sockaddr_storage addr;
21 };
22
23 struct DNSQuery
24 {
25 void *ptr; /* pointer used by callback to identify request */
26 void (*callback)(void* vptr, struct DNSReply *reply); /* callback to call */
27 };
28
29 extern struct rb_sockaddr_storage irc_nsaddr_list[];
30 extern int irc_nscount;
31
32 extern void init_resolver(void);
33 extern void restart_resolver(void);
34 extern void gethost_byname_type(const char *, struct DNSQuery *, int);
35 extern void gethost_byaddr(const struct rb_sockaddr_storage *, struct DNSQuery *);
36
37 #endif