summaryrefslogtreecommitdiffstats
path: root/plugins-root/check_icmp.d
diff options
context:
space:
mode:
Diffstat (limited to 'plugins-root/check_icmp.d')
-rw-r--r--plugins-root/check_icmp.d/check_icmp_helpers.c4
-rw-r--r--plugins-root/check_icmp.d/config.h12
2 files changed, 10 insertions, 6 deletions
diff --git a/plugins-root/check_icmp.d/check_icmp_helpers.c b/plugins-root/check_icmp.d/check_icmp_helpers.c
index ec786305..d56fbd8b 100644
--- a/plugins-root/check_icmp.d/check_icmp_helpers.c
+++ b/plugins-root/check_icmp.d/check_icmp_helpers.c
@@ -34,8 +34,6 @@ check_icmp_config check_icmp_config_init() {
34 34
35 .ttl = DEFAULT_TTL, 35 .ttl = DEFAULT_TTL,
36 .icmp_data_size = DEFAULT_PING_DATA_SIZE, 36 .icmp_data_size = DEFAULT_PING_DATA_SIZE,
37 .icmp_pkt_size = DEFAULT_PING_DATA_SIZE + ICMP_MINLEN,
38 .pkt_interval = DEFAULT_PKT_INTERVAL,
39 .target_interval = 0, 37 .target_interval = 0,
40 .number_of_packets = DEFAULT_NUMBER_OF_PACKETS, 38 .number_of_packets = DEFAULT_NUMBER_OF_PACKETS,
41 39
@@ -52,6 +50,8 @@ check_icmp_config check_icmp_config_init() {
52 50
53 .number_of_hosts = 0, 51 .number_of_hosts = 0,
54 .hosts = NULL, 52 .hosts = NULL,
53
54 .output_format_is_set = false,
55 }; 55 };
56 return tmp; 56 return tmp;
57} 57}
diff --git a/plugins-root/check_icmp.d/config.h b/plugins-root/check_icmp.d/config.h
index fc9dd5a6..c348bef5 100644
--- a/plugins-root/check_icmp.d/config.h
+++ b/plugins-root/check_icmp.d/config.h
@@ -12,11 +12,12 @@
12#include <arpa/inet.h> 12#include <arpa/inet.h>
13#include <stdint.h> 13#include <stdint.h>
14#include "./check_icmp_helpers.h" 14#include "./check_icmp_helpers.h"
15#include "output.h"
15 16
16/* threshold structure. all values are maximum allowed, exclusive */ 17/* threshold structure. all values are maximum allowed, exclusive */
17typedef struct { 18typedef struct {
18 unsigned char pl; /* max allowed packet loss in percent */ 19 unsigned char pl; /* max allowed packet loss in percent */
19 time_t rta; /* roundtrip time average, microseconds */ 20 time_t rta; /* roundtrip time average, microseconds */
20 double jitter; /* jitter time average, microseconds */ 21 double jitter; /* jitter time average, microseconds */
21 double mos; /* MOS */ 22 double mos; /* MOS */
22 double score; /* Score */ 23 double score; /* Score */
@@ -59,8 +60,6 @@ typedef struct {
59 60
60 unsigned long ttl; 61 unsigned long ttl;
61 unsigned short icmp_data_size; 62 unsigned short icmp_data_size;
62 unsigned short icmp_pkt_size;
63 time_t pkt_interval;
64 time_t target_interval; 63 time_t target_interval;
65 unsigned short number_of_packets; 64 unsigned short number_of_packets;
66 65
@@ -77,6 +76,9 @@ typedef struct {
77 76
78 unsigned short number_of_hosts; 77 unsigned short number_of_hosts;
79 check_icmp_target_container *hosts; 78 check_icmp_target_container *hosts;
79
80 mp_output_format output_format;
81 bool output_format_is_set;
80} check_icmp_config; 82} check_icmp_config;
81 83
82check_icmp_config check_icmp_config_init(); 84check_icmp_config check_icmp_config_init();
@@ -94,7 +96,9 @@ typedef struct icmp_ping_data {
94#define DEFAULT_PING_DATA_SIZE (MIN_PING_DATA_SIZE + 44) 96#define DEFAULT_PING_DATA_SIZE (MIN_PING_DATA_SIZE + 44)
95 97
96/* 80 msec packet interval by default */ 98/* 80 msec packet interval by default */
97#define DEFAULT_PKT_INTERVAL 80000 99// DEPRECATED, remove when removing the option
100#define DEFAULT_PKT_INTERVAL 80000
101
98#define DEFAULT_TARGET_INTERVAL 0 102#define DEFAULT_TARGET_INTERVAL 0
99 103
100#define DEFAULT_WARN_RTA 200000 104#define DEFAULT_WARN_RTA 200000