]> jfr.im git - irc/rqf/shadowircd.git/blame_incremental - include/res.h
Add mr_flea (and Taros) to the list of Charybdis contributors.
[irc/rqf/shadowircd.git] / include / res.h
... / ...
CommitLineData
1/*
2 * res.h for referencing functions in res.c, reslib.c
3 *
4 */
5
6#ifndef _CHARYBDIS_RES_H
7#define _CHARYBDIS_RES_H
8
9#include "ircd_defs.h"
10#include "common.h"
11#include "reslib.h"
12#include "match.h"
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
21struct DNSReply
22{
23 char *h_name;
24 struct rb_sockaddr_storage addr;
25};
26
27struct 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
33extern struct rb_sockaddr_storage irc_nsaddr_list[];
34extern int irc_nscount;
35
36extern void init_resolver(void);
37extern void restart_resolver(void);
38extern void delete_resolver_queries(const struct DNSQuery *);
39extern void gethost_byname_type(const char *, struct DNSQuery *, int);
40extern void gethost_byaddr(const struct rb_sockaddr_storage *, struct DNSQuery *);
41extern void add_local_domain(char *, size_t);
42extern void report_dns_servers(struct Client *);
43
44#endif