]>
Commit | Line | Data |
---|---|---|
7d2852b4 AC |
1 | /* |
2 | * charybdis | |
3 | * dns.h: A header with the DNS functions. | |
4 | * | |
5 | * Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center | |
6 | * Copyright (C) 1996-2002 Hybrid Development Team | |
7 | * Copyright (C) 2002-2012 ircd-ratbox development team | |
8 | * Copyright (C) 2016 William Pitcock <nenolod@dereferenced.org> | |
9 | * | |
10 | * This program is free software; you can redistribute it and/or modify | |
11 | * it under the terms of the GNU General Public License as published by | |
12 | * the Free Software Foundation; either version 2 of the License, or | |
13 | * (at your option) any later version. | |
14 | * | |
15 | * This program is distributed in the hope that it will be useful, | |
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | * GNU General Public License for more details. | |
19 | * | |
20 | * You should have received a copy of the GNU General Public License | |
21 | * along with this program; if not, write to the Free Software | |
22 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 | |
23 | * USA | |
24 | */ | |
25 | ||
26 | #ifndef CHARYBDIS_DNS_H | |
27 | #define CHARYBDIS_DNS_H | |
28 | ||
394b8dde EM |
29 | #include "stdinc.h" |
30 | #include "authd.h" | |
fb7d74ef | 31 | |
8a26cd19 EM |
32 | extern rb_dlink_list nameservers; |
33 | ||
394b8dde EM |
34 | typedef void (*DNSCB)(const char *res, int status, int aftype, void *data); |
35 | typedef void (*DNSLISTCB)(int resc, const char *resv[], int status, void *data); | |
7d2852b4 AC |
36 | |
37 | uint16_t lookup_hostname(const char *hostname, int aftype, DNSCB callback, void *data); | |
38 | uint16_t lookup_ip(const char *hostname, int aftype, DNSCB callback, void *data); | |
39 | void cancel_lookup(uint16_t xid); | |
fb7d74ef | 40 | void dns_results_callback(const char *callid, const char *status, const char *aftype, const char *results); |
394b8dde | 41 | void dns_stats_results_callback(const char *callid, const char *status, int resc, const char *resv[]); |
8a26cd19 | 42 | void init_nameserver_cache(void); |
6445c1cf | 43 | bool reload_nameservers(void); |
7d2852b4 AC |
44 | |
45 | #endif |