diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-05-18 18:10:25 +0200 |
---|---|---|
committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-05-18 18:10:25 +0200 |
commit | b5de682309589ddb230e04beaaa54d74f2fe70d5 (patch) | |
tree | 70c2557e7ad1605ef216a7cb6e1a5e8eb843a016 /plugins-root/check_icmp.d/check_icmp_helpers.h | |
parent | 8f08e7ab3ecc03ea38062fe4442668fbea30bb73 (diff) | |
download | monitoring-plugins-b5de682309589ddb230e04beaaa54d74f2fe70d5.tar.gz |
WIP - check_icmp refactor 8
Diffstat (limited to 'plugins-root/check_icmp.d/check_icmp_helpers.h')
-rw-r--r-- | plugins-root/check_icmp.d/check_icmp_helpers.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/plugins-root/check_icmp.d/check_icmp_helpers.h b/plugins-root/check_icmp.d/check_icmp_helpers.h index 5f771635..713dd8ce 100644 --- a/plugins-root/check_icmp.d/check_icmp_helpers.h +++ b/plugins-root/check_icmp.d/check_icmp_helpers.h | |||
@@ -10,10 +10,10 @@ | |||
10 | #include <arpa/inet.h> | 10 | #include <arpa/inet.h> |
11 | 11 | ||
12 | typedef struct rta_host { | 12 | typedef struct rta_host { |
13 | unsigned short id; /* id in **table, and icmp pkts */ | 13 | unsigned short id; /* id in **table, and icmp pkts */ |
14 | char *name; /* arg used for adding this host */ | 14 | char *msg; /* icmp error message, if any */ |
15 | char *msg; /* icmp error message, if any */ | 15 | |
16 | struct sockaddr_storage saddr_in; /* the address of this host */ | 16 | struct sockaddr_storage address; /* the address of this host */ |
17 | struct sockaddr_storage error_addr; /* stores address of error replies */ | 17 | struct sockaddr_storage error_addr; /* stores address of error replies */ |
18 | time_t time_waited; /* total time waited, in usecs */ | 18 | time_t time_waited; /* total time waited, in usecs */ |
19 | unsigned int icmp_sent, icmp_recv, icmp_lost; /* counters */ | 19 | unsigned int icmp_sent, icmp_recv, icmp_lost; /* counters */ |
@@ -59,7 +59,12 @@ typedef struct { | |||
59 | ping_target host; | 59 | ping_target host; |
60 | } ping_target_create_wrapper; | 60 | } ping_target_create_wrapper; |
61 | 61 | ||
62 | ping_target_create_wrapper ping_target_create(char *name, struct sockaddr_storage *address); | 62 | typedef struct { |
63 | int socket4; | ||
64 | int socket6; | ||
65 | } check_icmp_socket_set; | ||
66 | |||
67 | ping_target_create_wrapper ping_target_create(struct sockaddr_storage address); | ||
63 | unsigned int ping_target_list_append(ping_target *list, ping_target *elem); | 68 | unsigned int ping_target_list_append(ping_target *list, ping_target *elem); |
64 | 69 | ||
65 | void check_icmp_timeout_handler(int, siginfo_t *, void *); | 70 | void check_icmp_timeout_handler(int, siginfo_t *, void *); |