summaryrefslogtreecommitdiffstats
path: root/plugins/check_fping.d/config.h
blob: a0697bf3bf3eeb1ce1a99bfcc8eb4c24cf87bd70 (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
57
58
#pragma once

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

enum {
	PACKET_SIZE = 56,
	PACKET_COUNT = 1,
};

typedef struct {
	char *server_name;
	char *sourceip;
	char *sourceif;
	int packet_size;
	int packet_count;
	int target_timeout;
	int packet_interval;
	bool randomize_packet_data;
	bool dontfrag;
	bool alive_p;

	double crta;
	bool crta_p;
	double wrta;
	bool wrta_p;

	int cpl;
	bool cpl_p;
	int wpl;
	bool wpl_p;
} check_fping_config;

check_fping_config check_fping_config_init() {
	check_fping_config tmp = {
		.server_name = NULL,
		.sourceip = NULL,
		.sourceif = NULL,
		.packet_size = PACKET_SIZE,
		.packet_count = PACKET_COUNT,
		.target_timeout = 0,
		.packet_interval = 0,
		.randomize_packet_data = false,
		.dontfrag = false,
		.alive_p = false,

		.crta = 0,
		.crta_p = false,
		.wrta = 0,
		.wrta_p = false,

		.cpl = 0,
		.cpl_p = false,
		.wpl = 0,
		.wpl_p = false,
	};
	return tmp;
}