summaryrefslogtreecommitdiffstats
path: root/plugins/check_by_ssh.d/config.h
blob: 05435defb7b51493221fd29e15ddda61275773ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#pragma once

#include "../../config.h"
#include <stddef.h>

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;
}