summaryrefslogtreecommitdiffstats
path: root/plugins/check_fping.d
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_fping.d')
-rw-r--r--plugins/check_fping.d/config.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/plugins/check_fping.d/config.h b/plugins/check_fping.d/config.h
new file mode 100644
index 00000000..a0697bf3
--- /dev/null
+++ b/plugins/check_fping.d/config.h
@@ -0,0 +1,58 @@
1#pragma once
2
3#include "../../config.h"
4#include <stddef.h>
5
6enum {
7 PACKET_SIZE = 56,
8 PACKET_COUNT = 1,
9};
10
11typedef struct {
12 char *server_name;
13 char *sourceip;
14 char *sourceif;
15 int packet_size;
16 int packet_count;
17 int target_timeout;
18 int packet_interval;
19 bool randomize_packet_data;
20 bool dontfrag;
21 bool alive_p;
22
23 double crta;
24 bool crta_p;
25 double wrta;
26 bool wrta_p;
27
28 int cpl;
29 bool cpl_p;
30 int wpl;
31 bool wpl_p;
32} check_fping_config;
33
34check_fping_config check_fping_config_init() {
35 check_fping_config tmp = {
36 .server_name = NULL,
37 .sourceip = NULL,
38 .sourceif = NULL,
39 .packet_size = PACKET_SIZE,
40 .packet_count = PACKET_COUNT,
41 .target_timeout = 0,
42 .packet_interval = 0,
43 .randomize_packet_data = false,
44 .dontfrag = false,
45 .alive_p = false,
46
47 .crta = 0,
48 .crta_p = false,
49 .wrta = 0,
50 .wrta_p = false,
51
52 .cpl = 0,
53 .cpl_p = false,
54 .wpl = 0,
55 .wpl_p = false,
56 };
57 return tmp;
58}