From 7c05e52c7486b782ea8fe83f61eda56f05fd2613 Mon Sep 17 00:00:00 2001 From: Niko Tyni Date: Wed, 27 Jul 2005 11:45:20 +0000 Subject: * 2.0/lib/Smokeping/probes/CiscoRTTMonEchoICMP.pm, 2.0/CHANGES: + bugfix for CiscoRTTMonEchoICMP packetsize variable -- niko, from Sam Stickland --- lib/Smokeping/probes/CiscoRTTMonEchoICMP.pm | 41 ++++++++++++----------------- 1 file changed, 17 insertions(+), 24 deletions(-) (limited to 'lib/Smokeping') diff --git a/lib/Smokeping/probes/CiscoRTTMonEchoICMP.pm b/lib/Smokeping/probes/CiscoRTTMonEchoICMP.pm index f763fde..c542ed1 100644 --- a/lib/Smokeping/probes/CiscoRTTMonEchoICMP.pm +++ b/lib/Smokeping/probes/CiscoRTTMonEchoICMP.pm @@ -92,8 +92,7 @@ sub new($$$) sub ProbeDesc($){ my $self = shift; - my $bytes = $self->{properties}{packetsize}; - return "CiscoRTTMonEchoICMP ($bytes Bytes)"; + return "CiscoRTTMonEchoICMP"; } sub pingone ($$) { @@ -102,7 +101,7 @@ sub pingone ($$) { my $pings = $self->pings($target) || 20; my $tos = $target->{vars}{tos}; - my $bytes = $target->{properties}{packetsize}; + my $bytes = $target->{vars}{packetsize}; # use the proces ID as as row number to make this poll distinct on the router; my $row=$$; @@ -260,27 +259,6 @@ sub DestroyData ($$) { &snmpset($host, "rttMonCtrlAdminStatus.$row", 'integer', 6); } -sub probevars { - my $class = shift; - return $class->_makevars($class->SUPER::probevars, { - packetsize => { - _doc => < 56, - _re => '\d+', - _sub => sub { - my $val = shift; - return "ERROR: packetsize must be between 8 and 16392" - unless $val >= 8 and $val <= 16392; - return undef; - }, - }, - }); -} - sub targetvars { my $class = shift; return $class->_makevars($class->SUPER::targetvars, { @@ -315,6 +293,21 @@ corresponds to a DSCP value 40 and a Precedence value of 5. The RTTMon MIB versions before IOS 12.0(3)T didn't support this parameter. DOC }, + packetsize => { + _doc => < 56, + _re => '\d+', + _sub => sub { + my $val = shift; + return "ERROR: packetsize must be between 8 and 16392" + unless $val >= 8 and $val <= 16392; + return undef; + }, + }, }); } -- cgit v1.2.3-24-g4f1b