]>
Commit | Line | Data |
---|---|---|
fb7d74ef | 1 | /* |
a6f63a82 | 2 | * solanum |
64fae260 | 3 | * authproc.h: A header with the authd functions. |
fb7d74ef AC |
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 | |
3fc0499e | 8 | * Copyright (C) 2016 Ariadne Conill <ariadne@dereferenced.org> |
fb7d74ef AC |
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 | ||
a6f63a82 EK |
26 | #ifndef SOLANUM_AUTHD_H |
27 | #define SOLANUM_AUTHD_H | |
fb7d74ef | 28 | |
d3f6b808 EM |
29 | #include "stdinc.h" |
30 | #include "rb_dictionary.h" | |
31 | #include "client.h" | |
32 | ||
fbc97166 | 33 | struct DNSBLEntry |
d3f6b808 | 34 | { |
4f2b9a4f | 35 | char *host; |
fbc97166 AJ |
36 | char *reason; |
37 | char *filters; | |
d3f6b808 EM |
38 | uint8_t iptype; |
39 | unsigned int hits; | |
40 | }; | |
41 | ||
5e9a3f86 EM |
42 | struct OPMScanner |
43 | { | |
44 | char type[16]; /* Type of proxy */ | |
45 | uint16_t port; /* Port */ | |
46 | ||
47 | rb_dlink_node node; | |
48 | }; | |
49 | ||
50 | struct OPMListener | |
51 | { | |
52 | char ipaddr[HOSTIPLEN]; /* Listener address */ | |
53 | uint16_t port; /* Listener port */ | |
54 | }; | |
55 | ||
56 | enum | |
57 | { | |
58 | LISTEN_IPV4, | |
59 | LISTEN_IPV6, | |
60 | LISTEN_LAST, | |
61 | }; | |
62 | ||
fb7d74ef AC |
63 | extern rb_helper *authd_helper; |
64 | ||
3321eef4 | 65 | extern rb_dictionary *dnsbl_stats; |
5e9a3f86 EM |
66 | extern rb_dlink_list opm_list; |
67 | extern struct OPMListener opm_listeners[LISTEN_LAST]; | |
d3f6b808 | 68 | |
fb7d74ef | 69 | void init_authd(void); |
d3f6b808 | 70 | void configure_authd(void); |
fb7d74ef AC |
71 | void restart_authd(void); |
72 | void rehash_authd(void); | |
73 | void check_authd(void); | |
74 | ||
762468f8 SA |
75 | void authd_initiate_client(struct Client *, bool defer); |
76 | void authd_deferred_client(struct Client *); | |
b1a577f2 EM |
77 | void authd_accept_client(struct Client *client_p, const char *ident, const char *host); |
78 | void authd_reject_client(struct Client *client_p, const char *ident, const char *host, char cause, const char *data, const char *reason); | |
d3f6b808 | 79 | void authd_abort_client(struct Client *); |
d3f6b808 | 80 | |
3321eef4 AC |
81 | void add_dnsbl_entry(const char *host, const char *reason, uint8_t iptype, rb_dlink_list *filters); |
82 | void del_dnsbl_entry(const char *host); | |
83 | void del_dnsbl_entry_all(void); | |
3d2fc110 | 84 | |
4f6119cd | 85 | bool set_authd_timeout(const char *key, int timeout); |
ad043803 | 86 | void ident_check_enable(bool enabled); |
3d2fc110 | 87 | |
5e9a3f86 | 88 | void conf_create_opm_listener(const char *ip, uint16_t port); |
b1a577f2 | 89 | void create_opm_listener(const char *ip, uint16_t port); |
5e9a3f86 | 90 | void conf_create_opm_proxy_scanner(const char *type, uint16_t port); |
51fa2ab8 | 91 | void create_opm_proxy_scanner(const char *type, uint16_t port); |
3d2fc110 EM |
92 | void delete_opm_proxy_scanner(const char *type, uint16_t port); |
93 | void delete_opm_proxy_scanner_all(void); | |
5e9a3f86 EM |
94 | void delete_opm_listener_all(void); |
95 | void opm_check_enable(bool enabled); | |
d3f6b808 | 96 | |
fb7d74ef | 97 | #endif |