From bd3ec036c77fe88a63af365cfc0d8e525394489d Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Mon, 10 Mar 2025 15:02:46 +0100 Subject: Refactor check_by_ssh --- plugins/check_by_ssh.d/config.h | 56 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 plugins/check_by_ssh.d/config.h (limited to 'plugins/check_by_ssh.d/config.h') 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 @@ +#pragma once + +#include "../../config.h" +#include + +typedef struct { + int commargc; + char **commargv; +} command_construct; + +typedef struct { + char *hostname; + char *host_shortname; + + char **service; + unsigned int number_of_services; + + unsigned int commands; // Not needed during actual test run + char *remotecmd; + + command_construct cmd; + + bool unknown_timeout; + bool warn_on_stderr; + int skip_stdout; + int skip_stderr; + bool passive; + char *outputfile; +} check_by_ssh_config; + +check_by_ssh_config check_by_ssh_config_init() { + check_by_ssh_config tmp = { + .hostname = NULL, + .host_shortname = NULL, + + .service = NULL, + .number_of_services = 0, + + .commands = 0, + .remotecmd = "", + + .cmd = + { + .commargc = 0, + .commargv = NULL, + }, + + .unknown_timeout = false, + .warn_on_stderr = false, + .skip_stderr = 0, + .skip_stdout = 0, + .passive = false, + .outputfile = NULL, + }; + return tmp; +} -- cgit v1.2.3-74-g34f1