diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-06-23 10:17:28 +0200 |
---|---|---|
committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-06-23 10:17:28 +0200 |
commit | cd20cc063245523d51013849fa28eb0cac013171 (patch) | |
tree | a573a64c9c6c626b6c04d7eccfc74c62b7fd9b89 /plugins-root/check_icmp.d/config.h | |
parent | 8ae415ee4ceddeed1c1a1e0e6e64175cff6731c3 (diff) | |
download | monitoring-plugins-cd20cc06.tar.gz |
check_icmp: add long options, add output format option
This commit switches check_icmp from getopt to getopt_long
to provide long options too and (most importantly) homogenize
option parsing between the different plugins.
Diffstat (limited to 'plugins-root/check_icmp.d/config.h')
-rw-r--r-- | plugins-root/check_icmp.d/config.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins-root/check_icmp.d/config.h b/plugins-root/check_icmp.d/config.h index fc9dd5a6..8092e343 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 */ |
17 | typedef struct { | 18 | typedef 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 */ |
@@ -77,6 +78,9 @@ typedef struct { | |||
77 | 78 | ||
78 | unsigned short number_of_hosts; | 79 | unsigned short number_of_hosts; |
79 | check_icmp_target_container *hosts; | 80 | check_icmp_target_container *hosts; |
81 | |||
82 | mp_output_format output_format; | ||
83 | bool output_format_is_set; | ||
80 | } check_icmp_config; | 84 | } check_icmp_config; |
81 | 85 | ||
82 | check_icmp_config check_icmp_config_init(); | 86 | check_icmp_config check_icmp_config_init(); |