]> jfr.im git - solanum.git/blame - include/authproc.h
Make 5614c9e6f0b (opmod as fake statusmsg) optional
[solanum.git] / include / authproc.h
CommitLineData
fb7d74ef
AC
1/*
2 * charybdis
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
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_AUTHD_H
27#define CHARYBDIS_AUTHD_H
28
d3f6b808
EM
29#include "stdinc.h"
30#include "rb_dictionary.h"
31#include "client.h"
32
5e9a3f86 33struct BlacklistStats
d3f6b808 34{
4f2b9a4f 35 char *host;
d3f6b808
EM
36 uint8_t iptype;
37 unsigned int hits;
38};
39
5e9a3f86
EM
40struct OPMScanner
41{
42 char type[16]; /* Type of proxy */
43 uint16_t port; /* Port */
44
45 rb_dlink_node node;
46};
47
48struct OPMListener
49{
50 char ipaddr[HOSTIPLEN]; /* Listener address */
51 uint16_t port; /* Listener port */
52};
53
54enum
55{
56 LISTEN_IPV4,
57 LISTEN_IPV6,
58 LISTEN_LAST,
59};
60
fb7d74ef
AC
61extern rb_helper *authd_helper;
62
d3f6b808 63extern rb_dictionary *bl_stats;
5e9a3f86
EM
64extern rb_dlink_list opm_list;
65extern struct OPMListener opm_listeners[LISTEN_LAST];
d3f6b808 66
fb7d74ef 67void init_authd(void);
d3f6b808 68void configure_authd(void);
fb7d74ef
AC
69void restart_authd(void);
70void rehash_authd(void);
71void check_authd(void);
72
762468f8
SA
73void authd_initiate_client(struct Client *, bool defer);
74void authd_deferred_client(struct Client *);
b1a577f2
EM
75void authd_accept_client(struct Client *client_p, const char *ident, const char *host);
76void authd_reject_client(struct Client *client_p, const char *ident, const char *host, char cause, const char *data, const char *reason);
d3f6b808 77void authd_abort_client(struct Client *);
d3f6b808
EM
78
79void add_blacklist(const char *host, const char *reason, uint8_t iptype, rb_dlink_list *filters);
80void del_blacklist(const char *host);
81void del_blacklist_all(void);
3d2fc110 82
4f6119cd 83bool set_authd_timeout(const char *key, int timeout);
ad043803 84void ident_check_enable(bool enabled);
3d2fc110 85
5e9a3f86 86void conf_create_opm_listener(const char *ip, uint16_t port);
b1a577f2 87void create_opm_listener(const char *ip, uint16_t port);
5e9a3f86 88void conf_create_opm_proxy_scanner(const char *type, uint16_t port);
51fa2ab8 89void create_opm_proxy_scanner(const char *type, uint16_t port);
3d2fc110
EM
90void delete_opm_proxy_scanner(const char *type, uint16_t port);
91void delete_opm_proxy_scanner_all(void);
5e9a3f86
EM
92void delete_opm_listener_all(void);
93void opm_check_enable(bool enabled);
d3f6b808 94
fb7d74ef 95#endif