]> jfr.im git - irc/rqf/shadowircd.git/blame - include/res.h
Replace int fd; in local client object with an fde object.
[irc/rqf/shadowircd.git] / include / res.h
CommitLineData
212380e3 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"
12#include "commio.h"
13#include "reslib.h"
14#include "irc_string.h"
15#include "sprintf_irc.h"
16#include "ircd.h"
17
18/* Maximum number of nameservers in /etc/resolv.conf we care about
19 * In hybrid, this was 2 -- but in Charybdis, we want to track
20 * a few more than that ;) --nenolod
21 */
22#define IRCD_MAXNS 10
23
24struct DNSReply
25{
26 char *h_name;
27 struct irc_sockaddr_storage addr;
28};
29
30struct DNSQuery
31{
32 void *ptr; /* pointer used by callback to identify request */
33 void (*callback)(void* vptr, struct DNSReply *reply); /* callback to call */
34};
35
36extern struct irc_sockaddr_storage irc_nsaddr_list[];
37extern int irc_nscount;
38
39extern void init_resolver(void);
40extern void restart_resolver(void);
41extern void delete_resolver_queries(const struct DNSQuery *);
42extern void gethost_byname_type(const char *, struct DNSQuery *, int);
43extern void gethost_byaddr(const struct irc_sockaddr_storage *, struct DNSQuery *);
44extern void add_local_domain(char *, size_t);
45extern void report_dns_servers(struct Client *);
46
47#endif