diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-03-12 17:22:17 +0100 |
---|---|---|
committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-03-12 17:22:17 +0100 |
commit | 97e65dddbda048f10b58ef8d190f2c0146a164a0 (patch) | |
tree | 1236da278c9dcc0ccaa7a1294a158bc572f1d172 /plugins/check_real.d | |
parent | a8b7df88113ae08d1b34f6efcd7d6d971e2b7c22 (diff) | |
download | monitoring-plugins-97e65dddbda048f10b58ef8d190f2c0146a164a0.tar.gz |
Refactor check_real
Diffstat (limited to 'plugins/check_real.d')
-rw-r--r-- | plugins/check_real.d/config.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/plugins/check_real.d/config.h b/plugins/check_real.d/config.h new file mode 100644 index 00000000..c4663cf9 --- /dev/null +++ b/plugins/check_real.d/config.h | |||
@@ -0,0 +1,37 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include "../../config.h" | ||
4 | #include <stddef.h> | ||
5 | |||
6 | enum { | ||
7 | PORT = 554 | ||
8 | }; | ||
9 | |||
10 | typedef struct { | ||
11 | char *server_address; | ||
12 | char *host_name; | ||
13 | int server_port; | ||
14 | char *server_url; | ||
15 | |||
16 | char *server_expect; | ||
17 | int warning_time; | ||
18 | bool check_warning_time; | ||
19 | int critical_time; | ||
20 | bool check_critical_time; | ||
21 | } check_real_config; | ||
22 | |||
23 | check_real_config check_real_config_init() { | ||
24 | check_real_config tmp = { | ||
25 | .server_address = NULL, | ||
26 | .host_name = NULL, | ||
27 | .server_port = PORT, | ||
28 | .server_url = NULL, | ||
29 | |||
30 | .server_expect = NULL, | ||
31 | .warning_time = 0, | ||
32 | .check_warning_time = false, | ||
33 | .critical_time = 0, | ||
34 | .check_critical_time = false, | ||
35 | }; | ||
36 | return tmp; | ||
37 | } | ||