1 /*
2  * Copyright (C) Tildeslash Ltd. All rights reserved.
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Affero General Public License version 3.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU Affero General Public License
13  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
14  *
15  * In addition, as a special exception, the copyright holders give
16  * permission to link the code of portions of this program with the
17  * OpenSSL library under certain conditions as described in each
18  * individual source file, and distribute linked combinations
19  * including the two.
20  *
21  * You must obey the GNU Affero General Public License in all respects
22  * for all of the code used other than OpenSSL.
23  */
24 
25 
26 #ifndef MONIT_PROTOCOL_H
27 #define MONIT_PROTOCOL_H
28 
29 #include "config.h"
30 
31 #include "monit.h"
32 
33 /* Protocols supported */
34 typedef enum {
35         Protocol_DEFAULT = 0,
36         Protocol_HTTP,
37         Protocol_FTP,
38         Protocol_SMTP,
39         Protocol_POP,
40         Protocol_IMAP,
41         Protocol_NNTP,
42         Protocol_SSH,
43         Protocol_DWP,
44         Protocol_LDAP2,
45         Protocol_LDAP3,
46         Protocol_RDATE,
47         Protocol_RSYNC,
48         Protocol_GENERIC,
49         Protocol_APACHESTATUS,
50         Protocol_NTP3,
51         Protocol_MYSQL,
52         Protocol_DNS,
53         Protocol_POSTFIXPOLICY,
54         Protocol_TNS,
55         Protocol_PGSQL,
56         Protocol_CLAMAV,
57         Protocol_SIP,
58         Protocol_LMTP,
59         Protocol_GPS,
60         Protocol_RADIUS,
61         Protocol_MEMCACHE,
62         Protocol_WEBSOCKET,
63         Protocol_REDIS,
64         Protocol_MONGODB,
65         Protocol_SIEVE,
66         Protocol_SPAMASSASSIN,
67         Protocol_FAIL2BAN,
68         Protocol_MQTT
69 } Protocol_Type;
70 
71 
72 void check_apache_status(Socket_T);
73 void check_default(Socket_T);
74 void check_dns(Socket_T);
75 void check_dwp(Socket_T);
76 void check_fail2ban(Socket_T);
77 void check_ftp(Socket_T);
78 void check_generic(Socket_T);
79 void check_http(Socket_T);
80 void check_imap(Socket_T);
81 void check_clamav(Socket_T);
82 void check_ldap2(Socket_T);
83 void check_ldap3(Socket_T);
84 void check_mongodb(Socket_T);
85 void check_mysql(Socket_T);
86 void check_nntp(Socket_T);
87 void check_ntp3(Socket_T);
88 void check_postfix_policy(Socket_T);
89 void check_pop(Socket_T);
90 void check_sieve(Socket_T);
91 void check_smtp(Socket_T);
92 void check_spamassassin(Socket_T);
93 void check_ssh(Socket_T);
94 void check_redis(Socket_T);
95 void check_rdate(Socket_T);
96 void check_rsync(Socket_T);
97 void check_tns(Socket_T);
98 void check_pgsql(Socket_T);
99 void check_sip(Socket_T);
100 void check_lmtp(Socket_T);
101 void check_gps(Socket_T);
102 void check_radius(Socket_T);
103 void check_memcache(Socket_T);
104 void check_mqtt(Socket_T);
105 void check_websocket(Socket_T);
106 
107 
108 /*
109  * Returns a protocol object for the given protocol type
110  */
111 Protocol_T Protocol_get(Protocol_Type type);
112 
113 
114 #endif
115