summaryrefslogtreecommitdiffstats
path: root/plugins/check_by_ssh.d/config.h
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-03-10 21:07:55 +0100
committerLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-03-10 21:07:55 +0100
commit3420d88a9c7436965f22a52790ffb8c793e2990f (patch)
tree6c65af59151e64282f9f5925be69162adad994d6 /plugins/check_by_ssh.d/config.h
parent5cf53de34fa410702ca59437cdf3f304366c3c55 (diff)
parentf930f1745b350903efa42933c04f8a2362d66d74 (diff)
downloadmonitoring-plugins-3420d88a9c7436965f22a52790ffb8c793e2990f.tar.gz
Merge branch 'master' into refactor/check_smtp
Diffstat (limited to 'plugins/check_by_ssh.d/config.h')
-rw-r--r--plugins/check_by_ssh.d/config.h56
1 files changed, 56 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..05435def
--- /dev/null
+++ b/plugins/check_by_ssh.d/config.h
@@ -0,0 +1,56 @@
1#pragma once
2
3#include "../../config.h"
4#include <stddef.h>
5
6typedef struct {
7 int commargc;
8 char **commargv;
9} command_construct;
10
11typedef struct {
12 char *hostname;
13 char *host_shortname;
14
15 char **service;
16 unsigned int number_of_services;
17
18 unsigned int commands; // Not needed during actual test run
19 char *remotecmd;
20
21 command_construct cmd;
22
23 bool unknown_timeout;
24 bool warn_on_stderr;
25 int skip_stdout;
26 int skip_stderr;
27 bool passive;
28 char *outputfile;
29} check_by_ssh_config;
30
31check_by_ssh_config check_by_ssh_config_init() {
32 check_by_ssh_config tmp = {
33 .hostname = NULL,
34 .host_shortname = NULL,
35
36 .service = NULL,
37 .number_of_services = 0,
38
39 .commands = 0,
40 .remotecmd = "",
41
42 .cmd =
43 {
44 .commargc = 0,
45 .commargv = NULL,
46 },
47
48 .unknown_timeout = false,
49 .warn_on_stderr = false,
50 .skip_stderr = 0,
51 .skip_stdout = 0,
52 .passive = false,
53 .outputfile = NULL,
54 };
55 return tmp;
56}