Revision: 2027
http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=2027&view=rev
Author: psychotrahe
Date: 2008-07-28 20:15:52 +0000 (Mon, 28 Jul 2008)
Log Message:
-----------
-b option now specifies ICMP data bytes instead of packet size
Modified Paths:
--------------
nagiosplug/trunk/plugins-root/check_icmp.c
Modified: nagiosplug/trunk/plugins-root/check_icmp.c
===================================================================
--- nagiosplug/trunk/plugins-root/check_icmp.c 2008-07-17 07:06:33 UTC (rev 2026)
+++ nagiosplug/trunk/plugins-root/check_icmp.c 2008-07-28 20:15:52 UTC (rev 2027)
@@ -463,13 +463,13 @@
case 'b':
size = strtol(optarg,NULL,0);
if (size >= (sizeof(struct icmp) + sizeof(struct icmp_ping_data)) &&
- size <= MAX_PING_DATA + ICMP_MINLEN) {
- icmp_pkt_size = size;
- icmp_data_size = icmp_pkt_size - ICMP_MINLEN;
+ size < MAX_PING_DATA) {
+ icmp_data_size = size;
+ icmp_pkt_size = size + ICMP_MINLEN;
} else
- usage_va("ICMP packet size must be between: %d and %d",
+ usage_va("ICMP data length must be between: %d and %d",
sizeof(struct icmp) + sizeof(struct icmp_ping_data),
- MAX_PING_DATA + ICMP_MINLEN);
+ MAX_PING_DATA - 1);
break;
case 'i':
@@ -1301,8 +1301,8 @@
printf (" %s",_("timeout value (seconds, currently "));
printf ("%u)\n", timeout);
printf (" %s\n", "-b");
- printf (" %s", _("icmp packet size (bytes, currently "));
- printf ("%u)\n", icmp_pkt_size);
+ printf (" %s\n", _("Number of icmp data bytes to send"));
+ printf (" %s %u + %d)\n", _("Packet size will be data bytes + icmp header (currently"),icmp_data_size, ICMP_MINLEN);
printf (" %s\n", "-v");
printf (" %s\n", _("verbose"));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.