]>
Commit | Line | Data |
---|---|---|
1 | /* authd/dns.h - header for authd DNS functions | |
2 | * Copyright (c) 2016 William Pitcock <nenolod@dereferenced.org> | |
3 | * | |
4 | * Permission to use, copy, modify, and/or distribute this software for any | |
5 | * purpose with or without fee is hereby granted, provided that the above | |
6 | * copyright notice and this permission notice is present in all copies. | |
7 | * | |
8 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | |
9 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
10 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
11 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, | |
12 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
13 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
14 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
15 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
16 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
17 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
18 | * POSSIBILITY OF SUCH DAMAGE. | |
19 | */ | |
20 | ||
21 | #ifndef _AUTHD_H | |
22 | #define _AUTHD_H | |
23 | ||
24 | #include "stdinc.h" | |
25 | #include "rb_lib.h" | |
26 | #include "rb_dictionary.h" | |
27 | ||
28 | #include "setup.h" | |
29 | #include "ircd_defs.h" | |
30 | ||
31 | typedef enum exit_reasons | |
32 | { | |
33 | EX_ERROR = 1, | |
34 | EX_DNS_ERROR = 2, | |
35 | EX_PROVIDER_ERROR = 3, | |
36 | } exit_reasons; | |
37 | ||
38 | typedef void (*provider_opts_handler_t)(const char *, int, const char **); | |
39 | ||
40 | struct auth_opts_handler | |
41 | { | |
42 | const char *option; | |
43 | int min_parc; | |
44 | provider_opts_handler_t handler; | |
45 | }; | |
46 | ||
47 | extern rb_helper *authd_helper; | |
48 | ||
49 | typedef void (*authd_cmd_handler)(int parc, char *parv[]); | |
50 | typedef void (*authd_stat_handler)(uint32_t rid, const char letter); | |
51 | typedef void (*authd_reload_handler)(const char letter); | |
52 | ||
53 | extern authd_cmd_handler authd_cmd_handlers[256]; | |
54 | extern authd_stat_handler authd_stat_handlers[256]; | |
55 | extern authd_reload_handler authd_reload_handlers[256]; | |
56 | ||
57 | extern rb_dictionary *authd_option_handlers; | |
58 | ||
59 | #endif |