doc change

This commit is contained in:
Max Baker
2003-04-29 17:42:07 +00:00
parent ff9cab9fe7
commit e127beb2d7

21
Info.pm
View File

@@ -49,6 +49,9 @@ SNMP::Info was created for Netdisco (www.netdisco.org) at UCSC
Version => 2 Version => 2
) or die "Can't connect to device.\n" ) or die "Can't connect to device.\n"
my $err = $info->error();
die "SNMP Community or Version probably wrong connecting to device. $err\n" if defined $err;
$name = $info->name(); $name = $info->name();
$class = $info->class() $class = $info->class()
print "SNMP::Info is using this device class : $class\n"; print "SNMP::Info is using this device class : $class\n";
@@ -394,6 +397,24 @@ All other arguments are passed to SNMP::Session.
See SNMP::Session for a list of other possible arguments. See SNMP::Session for a list of other possible arguments.
A Note about the wrong Community string or wrong SNMP Version :
If a connection is using the wrong community string or the wrong SNMP version,
the creation of the object will not fail. The device still answers the call on the
SNMP port, but will not return information. Check the error() method after you create
the device object to see if there was a problem in connecting.
A note about SNMP Versions :
Some older devices don't support SNMP version 2, and will not return anything when a
connection under Version 2 is attempted.
Some newer devices will support Version 1, but will not return all the data they might have
if you had connected under Version 1
When trying to get info from a new device, you may have to try version 2 and then fallback to
version 1.
=cut =cut
sub new { sub new {
my $proto = shift; my $proto = shift;