summaryrefslogtreecommitdiffstats
path: root/plugins-root
diff options
context:
space:
mode:
authorMatthias Eble <psychotrahe@gmx.de>2009-06-11 15:28:14 (GMT)
committerMatthias Eble <psychotrahe@gmx.de>2009-06-11 15:28:14 (GMT)
commit5a6268f72953d7d0aa0f22f278ac929b1f183686 (patch)
tree2653c52c368a8cee0110265f98ed662698901249 /plugins-root
parentc66d2c6b3b6d948ff36126f5d3a7629279f47878 (diff)
parent6e5d12b5d0345e61425399aff22c5a54fbebaf9e (diff)
downloadmonitoring-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.c12
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 *);
184static u_int get_timevaldiff(struct timeval *, struct timeval *); 184static u_int get_timevaldiff(struct timeval *, struct timeval *);
185static in_addr_t get_ip_address(const char *); 185static in_addr_t get_ip_address(const char *);
186static int wait_for_reply(int, u_int); 186static int wait_for_reply(int, u_int);
187static int recvfrom_wto(int, char *, unsigned int, struct sockaddr *, u_int *); 187static int recvfrom_wto(int, void *, unsigned int, struct sockaddr *, u_int *);
188static int send_icmp_ping(int, struct rta_host *); 188static int send_icmp_ping(int, struct rta_host *);
189static int get_threshold(char *str, threshold *th); 189static int get_threshold(char *str, threshold *th);
190static void run_checks(void); 190static void run_checks(void);
191static void set_source_ip(char *); 191static void set_source_ip(char *);
192static int add_target(char *); 192static int add_target(char *);
193static int add_target_ip(char *, struct in_addr *); 193static int add_target_ip(char *, struct in_addr *);
194static int handle_random_icmp(char *, struct sockaddr_in *); 194static int handle_random_icmp(unsigned char *, struct sockaddr_in *);
195static unsigned short icmp_checksum(unsigned short *, int); 195static unsigned short icmp_checksum(unsigned short *, int);
196static void finish(int); 196static void finish(int);
197static void crash(const char *, ...); 197static void crash(const char *, ...);
@@ -300,7 +300,7 @@ get_icmp_error_msg(unsigned char icmp_type, unsigned char icmp_code)
300} 300}
301 301
302static int 302static int
303handle_random_icmp(char *packet, struct sockaddr_in *addr) 303handle_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
694wait_for_reply(int sock, u_int t) 694wait_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
814send_icmp_ping(int sock, struct rta_host *host) 814send_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
869static int 869static int
870recvfrom_wto(int sock, char *buf, unsigned int len, struct sockaddr *saddr, 870recvfrom_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;