diff options
author | Matthias Eble <psychotrahe@gmx.de> | 2009-06-11 15:28:14 (GMT) |
---|---|---|
committer | Matthias Eble <psychotrahe@gmx.de> | 2009-06-11 15:28:14 (GMT) |
commit | 5a6268f72953d7d0aa0f22f278ac929b1f183686 (patch) | |
tree | 2653c52c368a8cee0110265f98ed662698901249 /plugins-root | |
parent | c66d2c6b3b6d948ff36126f5d3a7629279f47878 (diff) | |
parent | 6e5d12b5d0345e61425399aff22c5a54fbebaf9e (diff) | |
download | monitoring-plugins-5a6268f72953d7d0aa0f22f278ac929b1f183686.tar.gz |
Merge branch 'master' of ssh://PsychoTrahe@repo.or.cz/srv/git/nagiosplugins
Diffstat (limited to 'plugins-root')
-rw-r--r-- | plugins-root/check_icmp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c index 845fc95..ecf3d08 100644 --- a/plugins-root/check_icmp.c +++ b/plugins-root/check_icmp.c | |||
@@ -184,14 +184,14 @@ static u_int get_timevar(const char *); | |||
184 | static u_int get_timevaldiff(struct timeval *, struct timeval *); | 184 | static u_int get_timevaldiff(struct timeval *, struct timeval *); |
185 | static in_addr_t get_ip_address(const char *); | 185 | static in_addr_t get_ip_address(const char *); |
186 | static int wait_for_reply(int, u_int); | 186 | static int wait_for_reply(int, u_int); |
187 | static int recvfrom_wto(int, char *, unsigned int, struct sockaddr *, u_int *); | 187 | static int recvfrom_wto(int, void *, unsigned int, struct sockaddr *, u_int *); |
188 | static int send_icmp_ping(int, struct rta_host *); | 188 | static int send_icmp_ping(int, struct rta_host *); |
189 | static int get_threshold(char *str, threshold *th); | 189 | static int get_threshold(char *str, threshold *th); |
190 | static void run_checks(void); | 190 | static void run_checks(void); |
191 | static void set_source_ip(char *); | 191 | static void set_source_ip(char *); |
192 | static int add_target(char *); | 192 | static int add_target(char *); |
193 | static int add_target_ip(char *, struct in_addr *); | 193 | static int add_target_ip(char *, struct in_addr *); |
194 | static int handle_random_icmp(char *, struct sockaddr_in *); | 194 | static int handle_random_icmp(unsigned char *, struct sockaddr_in *); |
195 | static unsigned short icmp_checksum(unsigned short *, int); | 195 | static unsigned short icmp_checksum(unsigned short *, int); |
196 | static void finish(int); | 196 | static void finish(int); |
197 | static void crash(const char *, ...); | 197 | static void crash(const char *, ...); |
@@ -300,7 +300,7 @@ get_icmp_error_msg(unsigned char icmp_type, unsigned char icmp_code) | |||
300 | } | 300 | } |
301 | 301 | ||
302 | static int | 302 | static int |
303 | handle_random_icmp(char *packet, struct sockaddr_in *addr) | 303 | handle_random_icmp(unsigned char *packet, struct sockaddr_in *addr) |
304 | { | 304 | { |
305 | struct icmp p, sent_icmp; | 305 | struct icmp p, sent_icmp; |
306 | struct rta_host *host = NULL; | 306 | struct rta_host *host = NULL; |
@@ -694,7 +694,7 @@ static int | |||
694 | wait_for_reply(int sock, u_int t) | 694 | wait_for_reply(int sock, u_int t) |
695 | { | 695 | { |
696 | int n, hlen; | 696 | int n, hlen; |
697 | static char buf[4096]; | 697 | static unsigned char buf[4096]; |
698 | struct sockaddr_in resp_addr; | 698 | struct sockaddr_in resp_addr; |
699 | struct ip *ip; | 699 | struct ip *ip; |
700 | struct icmp icp; | 700 | struct icmp icp; |
@@ -814,7 +814,7 @@ static int | |||
814 | send_icmp_ping(int sock, struct rta_host *host) | 814 | send_icmp_ping(int sock, struct rta_host *host) |
815 | { | 815 | { |
816 | static union { | 816 | static union { |
817 | char *buf; /* re-use so we prevent leaks */ | 817 | void *buf; /* re-use so we prevent leaks */ |
818 | struct icmp *icp; | 818 | struct icmp *icp; |
819 | u_short *cksum_in; | 819 | u_short *cksum_in; |
820 | } packet = { NULL }; | 820 | } packet = { NULL }; |
@@ -867,7 +867,7 @@ send_icmp_ping(int sock, struct rta_host *host) | |||
867 | } | 867 | } |
868 | 868 | ||
869 | static int | 869 | static int |
870 | recvfrom_wto(int sock, char *buf, unsigned int len, struct sockaddr *saddr, | 870 | recvfrom_wto(int sock, void *buf, unsigned int len, struct sockaddr *saddr, |
871 | u_int *timo) | 871 | u_int *timo) |
872 | { | 872 | { |
873 | u_int slen; | 873 | u_int slen; |