Initial import
[ratbox-ambernet.git] / include / res.h
blob4a2a4f5d0b8e15a40a2c652ce18c4fdc0f100b46
1 /*
2 * ircd-ratbox: A slightly useful ircd.
3 * res.h: A header with the DNS functions.
5 * Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center
6 * Copyright (C) 1996-2002 Hybrid Development Team
7 * Copyright (C) 2002-2004 ircd-ratbox development team
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 * USA
24 * $Id: res.h 22395 2006-05-07 10:23:50Z leeh $
27 #ifndef _RES_H_INCLUDED
28 #define _RES_H_INCLUDED 1
30 #include "config.h"
31 #include "ircd_defs.h"
32 #include "adns.h"
34 struct DNSQuery
36 void *ptr;
37 adns_query query;
38 adns_answer answer;
39 void (*callback) (void *vptr, adns_answer * reply);
42 void init_resolver(void);
43 void restart_resolver(void);
44 void timeout_adns(void *);
45 void dns_writeable(int fd, void *ptr);
46 void dns_readable(int fd, void *ptr);
47 void dns_do_callbacks(void);
48 void dns_select(void);
49 int adns_gethost(const char *name, int aftype, struct DNSQuery *req);
50 int adns_getaddr(struct sockaddr *addr, int aftype, struct DNSQuery *req);
51 void delete_adns_queries(struct DNSQuery *q);
52 void report_adns_servers(struct Client *);
53 #endif