blob: 87ff2c8e66599f8b7d164318c91e58ff729b8ae8 [file] [log] [blame]
Krzysztof Piotr Oledzki09605412009-09-23 22:09:24 +02001/*
2 * Health-checks.
3 *
4 * Copyright 2008-2009 Krzysztof Piotr Oledzki <ole@ans.pl>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 *
11 */
12
13/* check status */
14enum {
15 HCHK_STATUS_UNKNOWN = 0, /* Unknown */
16 HCHK_STATUS_INI, /* Initializing */
17
18 /* Below we have check finished */
19 HCHK_STATUS_CHECKED, /* DUMMY STATUS */
20 HCHK_STATUS_SOCKERR, /* Socket error */
21
22 HCHK_STATUS_L4OK, /* L4 check passed, for example tcp connect */
23 HCHK_STATUS_L4TOUT, /* L4 timeout */
24 HCHK_STATUS_L4CON, /* L4 connection problem, for example: */
25 /* "Connection refused" (tcp rst) or "No route to host" (icmp) */
26
27 HCHK_STATUS_L6OK, /* L6 check passed */
28 HCHK_STATUS_L6TOUT, /* L6 (SSL) timeout */
29 HCHK_STATUS_L6RSP, /* L6 invalid response - protocol error */
30
31 HCHK_STATUS_L7TOUT, /* L7 (HTTP/SMTP) timeout */
32 HCHK_STATUS_L7RSP, /* L7 invalid response - protocol error */
33
34 /* Below we have layer 5-7 data avaliable */
35 HCHK_STATUS_L57DATA, /* DUMMY STATUS */
36 HCHK_STATUS_L7OKD, /* L7 check passed */
37 HCHK_STATUS_L7OKCD, /* L7 check conditionally passed */
38 HCHK_STATUS_L7STS, /* L7 response error, for example HTTP 5xx */
39
40 HCHK_STATUS_SIZE
41};