summaryrefslogtreecommitdiffstats
path: root/plugins-root/check_icmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins-root/check_icmp.c')
-rw-r--r--plugins-root/check_icmp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c
index 07713257..44c6826c 100644
--- a/plugins-root/check_icmp.c
+++ b/plugins-root/check_icmp.c
@@ -470,13 +470,13 @@ main(int argc, char **argv)
470 /* parse the arguments */ 470 /* parse the arguments */
471 for(i = 1; i < argc; i++) { 471 for(i = 1; i < argc; i++) {
472 while((arg = getopt(argc, argv, "vhVw:c:n:p:t:H:s:i:b:I:l:m:")) != EOF) { 472 while((arg = getopt(argc, argv, "vhVw:c:n:p:t:H:s:i:b:I:l:m:")) != EOF) {
473 long size; 473 unsigned short size;
474 switch(arg) { 474 switch(arg) {
475 case 'v': 475 case 'v':
476 debug++; 476 debug++;
477 break; 477 break;
478 case 'b': 478 case 'b':
479 size = strtol(optarg,NULL,0); 479 size = (unsigned short)strtol(optarg,NULL,0);
480 if (size >= (sizeof(struct icmp) + sizeof(struct icmp_ping_data)) && 480 if (size >= (sizeof(struct icmp) + sizeof(struct icmp_ping_data)) &&
481 size < MAX_PING_DATA) { 481 size < MAX_PING_DATA) {
482 icmp_data_size = size; 482 icmp_data_size = size;
@@ -785,7 +785,7 @@ wait_for_reply(int sock, u_int t)
785 /* this is indeed a valid response */ 785 /* this is indeed a valid response */
786 memcpy(&data, icp.icmp_data, sizeof(data)); 786 memcpy(&data, icp.icmp_data, sizeof(data));
787 if (debug > 2) 787 if (debug > 2)
788 printf("ICMP echo-reply of len %u, id %u, seq %u, cksum 0x%X\n", 788 printf("ICMP echo-reply of len %lu, id %u, seq %u, cksum 0x%X\n",
789 sizeof(data), ntohs(icp.icmp_id), ntohs(icp.icmp_seq), icp.icmp_cksum); 789 sizeof(data), ntohs(icp.icmp_id), ntohs(icp.icmp_seq), icp.icmp_cksum);
790 790
791 host = table[ntohs(icp.icmp_seq)/packets]; 791 host = table[ntohs(icp.icmp_seq)/packets];
@@ -864,7 +864,7 @@ send_icmp_ping(int sock, struct rta_host *host)
864 packet.icp->icmp_cksum = icmp_checksum(packet.cksum_in, icmp_pkt_size); 864 packet.icp->icmp_cksum = icmp_checksum(packet.cksum_in, icmp_pkt_size);
865 865
866 if (debug > 2) 866 if (debug > 2)
867 printf("Sending ICMP echo-request of len %u, id %u, seq %u, cksum 0x%X to host %s\n", 867 printf("Sending ICMP echo-request of len %lu, id %u, seq %u, cksum 0x%X to host %s\n",
868 sizeof(data), ntohs(packet.icp->icmp_id), ntohs(packet.icp->icmp_seq), packet.icp->icmp_cksum, host->name); 868 sizeof(data), ntohs(packet.icp->icmp_id), ntohs(packet.icp->icmp_seq), packet.icp->icmp_cksum, host->name);
869 869
870 memset(&iov, 0, sizeof(iov)); 870 memset(&iov, 0, sizeof(iov));
@@ -1232,7 +1232,7 @@ static u_int
1232get_timevar(const char *str) 1232get_timevar(const char *str)
1233{ 1233{
1234 char p, u, *ptr; 1234 char p, u, *ptr;
1235 unsigned int len; 1235 size_t len;
1236 u_int i, d; /* integer and decimal, respectively */ 1236 u_int i, d; /* integer and decimal, respectively */
1237 u_int factor = 1000; /* default to milliseconds */ 1237 u_int factor = 1000; /* default to milliseconds */
1238 1238