|
Posted by Hans =?iso-8859-1?Q?J=F8rgen?= on October 1, 2006, 11:09 am
Please log in for more thread options
I am using the perl bindings that is part of Net-snmp package.
(http://www.net-snmp.org/)
I have a problem with bulkwalk used from perl.
It works in (FreeBSD 5.4, perl 5.8.6, net-snmp 5.2.1)
It dosnt work in (FreeBSD 6.1, perl 5.8.8, net-snmp 5.2.3)
Upgrading to net-snmp 5.3.1 dont help.
The command line snmpbulkwalk works.
The problems can be recontructed with the example program bulkwalk.pl that
is part of the package.
The snmp is send to the agent and data is returned. But there is returned
garbage from the call. Instead of the array(refs) there is returned something
looking like the parameter passed to bulkwalk.
Ofcourse the program blows up when trying to use this data.
(If community is wrong, this is handled correct)
%./bulkwalk.pl
Not an ARRAY reference at ./bulkwalk.pl line 65.
(65: $num = scalar @$vbarr;)
I have tried to modify and print what is returned:
%./bulkwalk.pl
@resp dump:
$VAR1 = bless( {
'UseLongNames' => 2,
'UseEnums' => 0,
'UseNumeric' => 1,
'BestGuess' => 0,
'SessPtr' => bless( do{\(my $o = 136253952)}, 'SnmpSessionPtr'
),
'LocalPort' => 0,
'ErrorStr' => '',
'UseSprintValue' => 0,
'Community' => 'public',
'ErrorNum' => 0,
'RetryNoSuch' => 0,
'Retries' => 3,
'RemotePort' => '161',
'Version' => '2c',
'ErrorInd' => 0,
'DestHost' => 'localhost:161',
'Timeout' => 300000
}, 'SNMP::Session' );
$VAR2 = 2;
$VAR3 = 8;
$VAR4 = bless( [
bless( [
'sysUpTime'
], 'SNMP::Varbind' ),
bless( [
'ifNumber'
], 'SNMP::Varbind' ),
bless( [
'ifSpeed'
], 'SNMP::Varbind' ),
bless( [
'ifDescr'
], 'SNMP::Varbind' )
], 'SNMP::VarList' );
Not an ARRAY reference at ./bulkwalk.pl line 67.
%
This looks more or less as the parameters passed to $sess->bulkwalk
Any idea of where the problem are?
I have not tried to downgrade, yet.
/hjj
|
| Similar Threads | Posted | | Broken Perl | October 29, 2006, 12:37 pm |
| Looking for SNMP-5.1.1/NetSNMP-5.1.1 | April 29, 2005, 3:48 pm |
| Curses::UI::Widget - binding function keys | July 18, 2006, 1:53 am |
| Is Conway's NEXT.pm broken? | January 13, 2005, 5:29 pm |
| ANNOUNCE: Initial release of WSF/Perl (Perl bindings for a WS-* framework) | October 4, 2007, 1:37 am |
| PLJava - Perl embeded into Java (calling Perl from Java) - 1sr release - call for tests and review, please. | July 13, 2004, 4:06 am |
| Perl MakeMaker - how to force Perl linking with the static C library (libcrt.lib) instead of dynamic C library (msvcrt.lib) | April 17, 2007, 5:22 pm |
| MFC with Perl | July 19, 2005, 9:38 pm |
| Net::SSH::Perl | October 23, 2005, 11:16 pm |
| perl with ASP | November 9, 2005, 10:19 am |
|