Subject: | No 64-bit counters |
Date: | Wed, 11 Jul 2007 15:01:33 -0700 |
To: | "bug-Net-SNMP-Interfaces [...] rt.cpan.org" <bug-Net-SNMP-Interfaces [...] rt.cpan.org> |
From: | "Tanner, Bruce" <Bruce.Tanner [...] Cerritos.edu> |
Problem:
The ifHC* methods return null.
Diagnosis:
Net::SNMP::Interfaces creates a Net::SNMP session with the default version (snmpv1),
which does not support 64-bit counters.
Solution:
Add a Version argument to Net::SNMP::Interfaces->new to pass to Net::SNMP->session.
...
$self->{_hostname} = $args{Hostname} || 'localhost';
$self->{_community} = $args{Community} || 'public';
$self->{_port} = $args{Port} || 161;
$self->{_version} = $args{Version} || 2;
$self->{_raise} = $args{RaiseError} || 0;
my ($session, $error) = Net::SNMP->session(
-hostname => $self->{_hostname},
-community => $self->{_community},
-port => $self->{_port},
-version => $self->{_version}
);
...
-Bruce
--
Bruce Tanner (562) 860-2451 x 2164 Bruce.Tanner@Cerritos.edu
Cerritos College Norwalk, CA