summaryrefslogtreecommitdiffstats
path: root/plugins/check_by_ssh.d/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_by_ssh.d/config.h')
-rw-r--r--plugins/check_by_ssh.d/config.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/plugins/check_by_ssh.d/config.h b/plugins/check_by_ssh.d/config.h
new file mode 100644
index 00000000..b6a57964
--- /dev/null
+++ b/plugins/check_by_ssh.d/config.h
@@ -0,0 +1,71 @@
1#pragma once
2
3#include "../../config.h"
4#include "output.h"
5#include <stddef.h>
6
7typedef struct {
8 int commargc;
9 char **commargv;
10} command_construct;
11
12typedef struct {
13 char *hostname;
14 char *host_shortname;
15
16 char **service;
17 unsigned int number_of_services;
18
19 unsigned int commands; // Not needed during actual test run
20 char *remotecmd;
21
22 command_construct cmd;
23
24 bool unknown_timeout;
25 bool unknown_on_stderr;
26 bool warn_on_stderr;
27 bool skip_stdout;
28 size_t stdout_lines_to_ignore;
29 bool skip_stderr;
30 size_t sterr_lines_to_ignore;
31
32 bool passive;
33 char *outputfile;
34
35 bool output_format_is_set;
36 mp_output_format output_format;
37} check_by_ssh_config;
38
39check_by_ssh_config check_by_ssh_config_init() {
40 check_by_ssh_config tmp = {
41 .hostname = NULL,
42 .host_shortname = NULL,
43
44 .service = NULL,
45 .number_of_services = 0,
46
47 .commands = 0,
48 .remotecmd = "",
49
50 .cmd =
51 {
52 .commargc = 0,
53 .commargv = NULL,
54 },
55
56 .unknown_timeout = false,
57 .unknown_on_stderr = false,
58 .warn_on_stderr = false,
59
60 .skip_stderr = false,
61 .stdout_lines_to_ignore = 0,
62 .skip_stdout = false,
63 .sterr_lines_to_ignore = 0,
64
65 .passive = false,
66 .outputfile = NULL,
67
68 .output_format_is_set = false,
69 };
70 return tmp;
71}