summaryrefslogtreecommitdiffstats
path: root/plugins-root/check_icmp.d/check_icmp_helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins-root/check_icmp.d/check_icmp_helpers.c')
-rw-r--r--plugins-root/check_icmp.d/check_icmp_helpers.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/plugins-root/check_icmp.d/check_icmp_helpers.c b/plugins-root/check_icmp.d/check_icmp_helpers.c
index 2efe6e59..2a521b04 100644
--- a/plugins-root/check_icmp.d/check_icmp_helpers.c
+++ b/plugins-root/check_icmp.d/check_icmp_helpers.c
@@ -10,8 +10,6 @@ unsigned int timeout = DEFAULT_TIMEOUT;
10 10
11check_icmp_config check_icmp_config_init() { 11check_icmp_config check_icmp_config_init() {
12 check_icmp_config tmp = { 12 check_icmp_config tmp = {
13 .source_ip = NULL,
14
15 .order_mode = false, 13 .order_mode = false,
16 .mos_mode = false, 14 .mos_mode = false,
17 .rta_mode = false, 15 .rta_mode = false,
@@ -20,10 +18,6 @@ check_icmp_config check_icmp_config_init() {
20 .score_mode = false, 18 .score_mode = false,
21 19
22 .min_hosts_alive = -1, 20 .min_hosts_alive = -1,
23 .icmp_data_size = DEFAULT_PING_DATA_SIZE,
24 .icmp_pkt_size = DEFAULT_PING_DATA_SIZE + ICMP_MINLEN,
25 .pkt_interval = DEFAULT_PKT_INTERVAL,
26 .target_interval = 0,
27 .crit = {.pl = DEFAULT_CRIT_PL, 21 .crit = {.pl = DEFAULT_CRIT_PL,
28 .rta = DEFAULT_CRIT_RTA, 22 .rta = DEFAULT_CRIT_RTA,
29 .jitter = 50.0, 23 .jitter = 50.0,
@@ -34,11 +28,18 @@ check_icmp_config check_icmp_config_init() {
34 .jitter = 40.0, 28 .jitter = 40.0,
35 .mos = 3.5, 29 .mos = 3.5,
36 .score = 80.0}, 30 .score = 80.0},
37 .pid = {}, 31
38 .mode = MODE_RTA,
39 .ttl = DEFAULT_TTL, 32 .ttl = DEFAULT_TTL,
33 .icmp_data_size = DEFAULT_PING_DATA_SIZE,
34 .icmp_pkt_size = DEFAULT_PING_DATA_SIZE + ICMP_MINLEN,
35 .pkt_interval = DEFAULT_PKT_INTERVAL,
36 .target_interval = 0,
37 .number_of_packets = DEFAULT_NUMBER_OF_PACKETS,
38 .source_ip = NULL,
39
40 .sender_id = {},
40 41
41 .packets = DEFAULT_NUMBER_OF_PACKETS, 42 .mode = MODE_RTA,
42 43
43 .number_of_targets = 0, 44 .number_of_targets = 0,
44 .targets = NULL, 45 .targets = NULL,
@@ -168,10 +169,10 @@ unsigned int ping_target_list_append(ping_target *list, ping_target *elem) {
168 return result; 169 return result;
169} 170}
170 171
171void check_icmp_timeout_handler(int signal, siginfo_t * info, void *ucontext) { 172void check_icmp_timeout_handler(int signal, siginfo_t *info, void *ucontext) {
172 // Ignore unused arguments 173 // Ignore unused arguments
173 (void) info; 174 (void)info;
174 (void) ucontext; 175 (void)ucontext;
175 mp_subcheck timeout_sc = mp_subcheck_init(); 176 mp_subcheck timeout_sc = mp_subcheck_init();
176 timeout_sc = mp_set_subcheck_state(timeout_sc, socket_timeout_state); 177 timeout_sc = mp_set_subcheck_state(timeout_sc, socket_timeout_state);
177 178