2007-01-25 06:40:21 +00:00
|
|
|
/*
|
|
|
|
* res.h for referencing functions in res.c, reslib.c
|
|
|
|
*
|
|
|
|
* $Id: res.h 2023 2006-09-02 23:47:27Z jilles $
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _CHARYBDIS_RES_H
|
|
|
|
#define _CHARYBDIS_RES_H
|
|
|
|
|
|
|
|
#include "ircd_defs.h"
|
|
|
|
#include "common.h"
|
|
|
|
#include "reslib.h"
|
|
|
|
#include "irc_string.h"
|
|
|
|
#include "sprintf_irc.h"
|
|
|
|
#include "ircd.h"
|
|
|
|
|
|
|
|
/* Maximum number of nameservers in /etc/resolv.conf we care about
|
|
|
|
* In hybrid, this was 2 -- but in Charybdis, we want to track
|
|
|
|
* a few more than that ;) --nenolod
|
|
|
|
*/
|
|
|
|
#define IRCD_MAXNS 10
|
|
|
|
|
|
|
|
struct DNSReply
|
|
|
|
{
|
|
|
|
char *h_name;
|
2008-04-02 09:32:14 +00:00
|
|
|
struct rb_sockaddr_storage addr;
|
2007-01-25 06:40:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct DNSQuery
|
|
|
|
{
|
|
|
|
void *ptr; /* pointer used by callback to identify request */
|
|
|
|
void (*callback)(void* vptr, struct DNSReply *reply); /* callback to call */
|
|
|
|
};
|
|
|
|
|
2008-04-02 09:32:14 +00:00
|
|
|
extern struct rb_sockaddr_storage irc_nsaddr_list[];
|
2007-01-25 06:40:21 +00:00
|
|
|
extern int irc_nscount;
|
|
|
|
|
|
|
|
extern void init_resolver(void);
|
|
|
|
extern void restart_resolver(void);
|
|
|
|
extern void delete_resolver_queries(const struct DNSQuery *);
|
|
|
|
extern void gethost_byname_type(const char *, struct DNSQuery *, int);
|
2008-04-02 09:32:14 +00:00
|
|
|
extern void gethost_byaddr(const struct rb_sockaddr_storage *, struct DNSQuery *);
|
2007-01-25 06:40:21 +00:00
|
|
|
extern void add_local_domain(char *, size_t);
|
|
|
|
extern void report_dns_servers(struct Client *);
|
|
|
|
|
|
|
|
#endif
|