Compare commits

...

9 Commits
3.28 ... 3.30

Author SHA1 Message Date
Oliver Gorwits
e6ad08733d release 3.30 2015-11-16 21:35:59 +00:00
Eric A. Miller
a8d83b5e1c Statistics in the sysIfxStatTable are 64-bit counters, so they should override the 64-bit methods. See documentation at https://metacpan.org/pod/SNMP::Info#Interface-Statistics for implications. The proprietary MIB does not have 32-bit counters, as a result 32-bit counter methods are not overridden. 2015-11-10 23:05:47 -05:00
Eric A. Miller
9392b74cbc Correct port indexing of newer VSP 4K and 8K in L3::Passport 2015-11-10 22:42:15 -05:00
Eric A. Miller
e09624efd0 RT #106254: Add new sysObjectID mapping for Ubiquiti 2015-11-10 22:21:21 -05:00
Alexander Hartmaier
d4d7429de4 Correct link to MIB tarball 2015-11-10 10:26:31 +01:00
Oliver Gorwits
b97cef86a3 release 3.29 2015-10-13 22:31:16 +01:00
Jeroen van Ingen
70615a172b IPv6 related updated to Info::LLDP
- LLDP::lldp_addr() may now also return neighbor IPv6 addresses
- Make more clear in POD that lldp_addr() will not return all management addresses reported by neighbor, it's a kind of roulette
- Add LLDP::lldp_ipv6() and LLDP::lldp_mac() methods for remote management addresses of types IPv6 and MAC, respectively
2015-09-04 16:15:08 +02:00
Jeroen van Ingen
d399ca90d3 Add IPv6::ipv6_addr() method for decoding table instances to actual addresses 2015-09-01 14:53:34 +02:00
Jeroen van Ingen
bbc9695075 Report L2 capability on PacketFront devices if they have bridge ports 2015-06-29 17:02:48 +02:00
112 changed files with 268 additions and 128 deletions

View File

@@ -1,5 +1,27 @@
SNMP::Info - Friendly OO-style interface to Network devices using SNMP.
version 3.30 (2015-11-16)
[ENHANCEMENTS]
* RT #106254: Add new sysObjectID mapping for Ubiquiti
[BUG FIXES]
* Correct link to MIB tarball
* Correct port indexing of newer VSP 4K and 8K in L3::Passport
* Statistics in the sysIfxStatTable are 64-bit counters, so they should
override the 64-bit methods.
version 3.29 (2015-10-13)
[ENHANCEMENTS]
* Add IPv6::ipv6_addr() method to map IPv6 interface address indexes to actual addresses
* Add support for (remote) IPv6 addresses to LLDP::lldp_addr()
* Add LLDP::lldp_ipv6() and LLDP::lldp_mac() so that remote management
addresses of specific types can be requested
version 3.28 (2015-06-18)
[ENHANCEMENTS]

View File

@@ -24,7 +24,7 @@ use vars
qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG %SPEED_MAP
$NOSUCH $BIGINT $REPEATERS/;
$VERSION = '3.28';
$VERSION = '3.30';
=head1 NAME
@@ -32,7 +32,7 @@ SNMP::Info - OO Interface to Network devices and MIBs through SNMP
=head1 VERSION
SNMP::Info - Version 3.28
SNMP::Info - Version 3.30
=head1 AUTHOR
@@ -168,7 +168,7 @@ install by hand.
SNMP::Info operates on textual descriptors found in MIBs.
If you are using SNMP::Info separate from Netdisco,
download the Netdisco MIB package at L<http://sourceforge.net/project/showfiles.php?group_id=80033&package_id=135517>
download the Netdisco MIB package at L<http://sourceforge.net/projects/netdisco/files/netdisco-mibs/latest-snapshot/>
Make sure that your snmp.conf is updated to point to your MIB directory
and that the MIBs are world-readable.
@@ -1539,6 +1539,7 @@ sub device_type {
26543 => 'SNMP::Info::Layer3::IBMGbTor',
30065 => 'SNMP::Info::Layer3::Arista',
35098 => 'SNMP::Info::Layer3::Pica8',
41112 => 'SNMP::Info::Layer2::Ubiquiti',
);
my %l2sysoidmap = (
@@ -1560,6 +1561,7 @@ sub device_type {
4526 => 'SNMP::Info::Layer2::Netgear',
5624 => 'SNMP::Info::Layer3::Enterasys',
6486 => 'SNMP::Info::Layer3::AlcatelLucent',
9303 => 'SNMP::Info::Layer3::PacketFront',
11898 => 'SNMP::Info::Layer2::Orinoco',
14179 => 'SNMP::Info::Layer2::Airespace',
14525 => 'SNMP::Info::Layer2::Trapeze',

View File

@@ -38,7 +38,7 @@ use SNMP::Info;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS
= ( 'ALCATEL-IND1-INTERSWITCH-PROTOCOL-MIB' => 'aipAMAPRemDeviceType', );

View File

@@ -38,7 +38,7 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = ( 'ADSL-LINE-MIB' => 'adslLineType' );

View File

@@ -38,7 +38,7 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (); # IF-MIB

View File

@@ -39,7 +39,7 @@ use SNMP::Info;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::MIBS,

View File

@@ -42,7 +42,7 @@ use SNMP::Info;
use vars qw/$VERSION $DEBUG %MIBS %FUNCS %GLOBALS %MUNGE $INIT/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
'BRIDGE-MIB' => 'dot1dBaseBridgeAddress',

View File

@@ -43,7 +43,7 @@ use SNMP::Info;
use vars
qw/$VERSION $DEBUG %FUNCS %GLOBALS %MIBS %MUNGE $INIT %CDP_CAPABILITIES/;
$VERSION = '3.28';
$VERSION = '3.30';
# Five data structures required by SNMP::Info
%MIBS = ( 'CISCO-CDP-MIB' => 'cdpGlobalRun' );

View File

@@ -43,7 +43,7 @@ use SNMP::Info::IEEE802dot3ad 'agg_ports_lag';
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::IEEE802dot3ad::MIBS,

View File

@@ -39,7 +39,7 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
'CISCO-CONFIG-COPY-MIB' => 'ccCopyTable',

View File

@@ -38,7 +38,7 @@ use Exporter;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE %PAECAPABILITIES/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
'CISCO-PORT-SECURITY-MIB' => 'ciscoPortSecurityMIB',

View File

@@ -39,7 +39,7 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = ( 'CISCO-POWER-ETHERNET-EXT-MIB' => 'cpeExtPsePortEntPhyIndex',
'CISCO-CDP-MIB' => 'cdpCachePowerConsumption' );

View File

@@ -39,7 +39,7 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = ( 'CISCO-CLASS-BASED-QOS-MIB' => 'cbQosIfIndex', );

View File

@@ -39,7 +39,7 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = ( 'CISCO-RTTMON-MIB' => 'rttMonCtrlAdminOwner', );

View File

@@ -38,7 +38,7 @@ use Exporter;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE %PORTSTAT/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = ( 'CISCO-STACK-MIB' => 'ciscoStackMIB', );

View File

@@ -42,7 +42,7 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
'SNMPv2-MIB' => 'sysDescr',

View File

@@ -36,7 +36,7 @@ use SNMP::Info::Bridge;
use vars qw/$VERSION $DEBUG %MIBS %FUNCS %GLOBALS %MUNGE %PORTSTAT $INIT/;
$VERSION = '3.28';
$VERSION = '3.30';
@SNMP::Info::CiscoStpExtensions::ISA = qw/SNMP::Info::Bridge SNMP::Info Exporter/;
@SNMP::Info::CiscoStpExtensions::EXPORT_OK = qw//;

View File

@@ -41,7 +41,7 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
'CISCO-VTP-MIB' => 'vtpVlanName',

View File

@@ -39,7 +39,7 @@ use SNMP::Info;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
'EXTREME-EDP-MIB' => 'extremeEdpPortIfIndex',

View File

@@ -41,7 +41,7 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = ( 'ENTITY-MIB' => 'entPhysicalSerialNum' );

View File

@@ -41,7 +41,7 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = ( 'EtherLike-MIB' => 'etherMIB' );

View File

@@ -42,7 +42,7 @@ use SNMP::Info;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = ( 'FOUNDRY-SN-SWITCH-GROUP-MIB' => 'snFdpGlobalRun' );

View File

@@ -38,7 +38,7 @@ use Exporter;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = ( 'IEEE802dot11-MIB' => 'dot11DesiredSSID', );

View File

@@ -43,7 +43,7 @@ use SNMP::Info::Aggregate;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Aggregate::MIBS,

View File

@@ -44,7 +44,7 @@ use constant {
IPV6MIB => 3,
};
$VERSION = '3.28';
$VERSION = '3.30';
@@ -321,6 +321,29 @@ sub ipv6_addr_prefix {
return $return;
}
sub ipv6_addr {
my $info = shift;
my $return;
my $indexes = $info->ipv6_index();
foreach my $row (keys %$indexes) {
my @parts = split(/\./, $row);
my $is_valid = 0;
if (scalar @parts == 18) {
my $addrtype = shift @parts;
$is_valid = 1;
} elsif (scalar @parts == 17) {
$is_valid = 1;
}
my $addrsize = shift @parts; # First element now is addrsize, should be 16
if ($is_valid && $addrsize == 16) {
$return->{$row} = join(':', unpack('(H4)*', pack('C*', @parts)));
} else {
warn sprintf("%s: unable to decode table index to IPv6 address. Raw data is [%s].\n", &_my_sub_name, $row);
}
}
return $return;
}
sub _method_used {
my $info = shift;
my $return = 'none of the MIBs';
@@ -459,6 +482,10 @@ Maps an IPv6 prefix with its origin (manual, well-known, dhcp, etc.)
Maps IPv6 addresses with their prefixes
=item $info->ipv6_addr()
Maps a table instance to an IPv6 address
=back
=head2 Internet Address Translation Table

View File

@@ -39,7 +39,7 @@ use SNMP::Info;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
'LLDP-MIB' => 'lldpLocSysCapEnabled',
@@ -149,6 +149,38 @@ sub lldp_ip {
return \%lldp_ip;
}
sub lldp_ipv6 {
my $lldp = shift;
my $partial = shift;
my $rman_addr = $lldp->lldp_rman_addr($partial) || {};
my %lldp_ipv6;
foreach my $key ( keys %$rman_addr ) {
my ( $index, $proto, $addr ) = _lldp_addr_index($key);
next unless defined $index;
next unless $proto == 2;
$lldp_ipv6{$index} = $addr;
}
return \%lldp_ipv6;
}
sub lldp_mac {
my $lldp = shift;
my $partial = shift;
my $rman_addr = $lldp->lldp_rman_addr($partial) || {};
my %lldp_ipv6;
foreach my $key ( keys %$rman_addr ) {
my ( $index, $proto, $addr ) = _lldp_addr_index($key);
next unless defined $index;
next unless $proto == 6;
$lldp_ipv6{$index} = $addr;
}
return \%lldp_ipv6;
}
sub lldp_addr {
my $lldp = shift;
my $partial = shift;
@@ -323,13 +355,19 @@ sub _lldp_addr_index {
return ( $index, $proto, join( '.', @oids ) );
}
# IPv6
elsif ( $proto == 2 ) {
return ( $index, $proto,
join(':', unpack('(H4)*', pack('C*', @oids)) ) );
}
# MAC
elsif ( $proto == 6 ) {
return ( $index, $proto,
join( ':', map { sprintf "%02x", $_ } @oids ) );
}
# TODO - Need to handle other protocols, i.e. IPv6
# TODO - Other protocols may be used as well; implement when needed?
else {
return;
}
@@ -495,10 +533,24 @@ if unable defaults to (C<lldpRemLocalPortNum>).
Returns remote IPv4 address. Returns for all other address types, use
lldp_addr if you want any return address type.
=item $lldp->lldp_ipv6()
Returns remote IPv6 address, if known. Returns for all other address types,
use lldp_addr if you don't care about return address type.
=item $lldp->lldp_mac()
Returns remote (management) MAC address, if known. Returns for all other
address types, use lldp_addr if you don't care about return address type.
=item $lldp->lldp_addr()
Returns remote address. Type may be any IANA Address Family Number.
Currently only returns IPv4 or MAC addresses.
Currently only returns IPv4, IPv6 or MAC addresses. If the remote device
returns more than one address type, this method will give only one. Which one
is returned is decided by chance, phase of the moon and Perl hash ordering.
Use lldp_mac, lldp_ip or lldp_ipv6 if you want a specific address type.
=item $lldp->lldp_port()
@@ -530,7 +582,7 @@ the remote system.
=item $lldp->lldp_rem_id()
Returns the string value used to identify the chassis component associated
Returns the string value used to identify the chassis component associated
with the remote system.
(C<lldpRemChassisId>)

View File

@@ -41,7 +41,7 @@ use SNMP::Info;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %PORTSTAT %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = ( %SNMP::Info::MIBS, 'SNMP-REPEATER-MIB' => 'rptrPortGroupIndex' );

View File

@@ -41,7 +41,7 @@ use SNMP::Info::Layer1;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
# Set for No CDP
%GLOBALS = ( %SNMP::Info::Layer1::GLOBALS, 'root_ip' => 'actualIPAddr', );

View File

@@ -41,7 +41,7 @@ use SNMP::Info::Layer1;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
# Set for No CDP
%GLOBALS = ( %SNMP::Info::Layer1::GLOBALS, );

View File

@@ -42,7 +42,7 @@ use SNMP::Info::Layer2;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer2::MIBS,

View File

@@ -39,7 +39,7 @@ use SNMP::Info::Layer1;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer1::MIBS,

View File

@@ -39,7 +39,7 @@ use SNMP::Info::Layer2;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer2::MIBS,

View File

@@ -46,7 +46,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %PORTSTAT %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::MIBS, %SNMP::Info::Bridge::MIBS,

View File

@@ -11,7 +11,7 @@ use SNMP::Info::CDP;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::LLDP::MIBS,

View File

@@ -40,7 +40,7 @@ use SNMP::Info::Airespace;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::MIBS, %SNMP::Info::Bridge::MIBS,

View File

@@ -49,7 +49,7 @@ use SNMP::Info::IEEE802dot11;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%GLOBALS = (
%SNMP::Info::IEEE802dot11::GLOBALS,

View File

@@ -40,7 +40,7 @@ use SNMP::Info::Layer1;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%GLOBALS = ( %SNMP::Info::Layer2::GLOBALS );

View File

@@ -46,7 +46,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS, %SNMP::Info::LLDP::MIBS,

View File

@@ -48,7 +48,7 @@ use SNMP::Info::Layer2;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS,

View File

@@ -41,7 +41,7 @@ use SNMP::Info::Layer2::Cisco;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%GLOBALS = (
%SNMP::Info::Layer2::Cisco::GLOBALS,

View File

@@ -42,7 +42,7 @@ use SNMP::Info::Layer2::Cisco;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer2::Cisco::MIBS,

View File

@@ -43,7 +43,7 @@ use SNMP::Info::SONMP;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::MIBS,

View File

@@ -52,7 +52,7 @@ use SNMP::Info::Layer2;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer2::MIBS,

View File

@@ -50,7 +50,7 @@ use SNMP::Info::CDP;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
# This will be filled in with the device's index into the EntPhysicalEntry
# table by the serial() function.

View File

@@ -50,7 +50,7 @@ use SNMP::Info::Aggregate;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %PORTSTAT %MODEL_MAP %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -44,7 +44,7 @@ use SNMP::Info::CDP;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %PORTSTAT %MODEL_MAP %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -41,7 +41,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer2::MIBS,

View File

@@ -36,7 +36,7 @@ use SNMP::Info::Layer2;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer2::MIBS,

View File

@@ -43,7 +43,7 @@ use SNMP::Info::Airespace;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::MIBS, %SNMP::Info::Bridge::MIBS,

View File

@@ -42,7 +42,7 @@ use SNMP::Info::Layer2;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer2::MIBS, %SNMP::Info::IEEE802dot11::MIBS,

View File

@@ -39,7 +39,7 @@ use SNMP::Info::Bridge;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::MIBS,

View File

@@ -40,7 +40,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
# This will be filled in with the device's index into the EntPhysicalEntry
# table by the serial() function.

View File

@@ -41,7 +41,7 @@ use SNMP::Info::Layer2;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer2::MIBS,

View File

@@ -40,7 +40,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::MIBS,

View File

@@ -15,7 +15,7 @@ use SNMP::Info::Layer2;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer2::MIBS,

View File

@@ -39,7 +39,7 @@ use SNMP::Info::Layer2;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
# Set for No CDP
%GLOBALS = ( %SNMP::Info::Layer2::GLOBALS );

View File

@@ -53,7 +53,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::MIBS,

View File

@@ -41,7 +41,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -49,7 +49,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -39,7 +39,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -40,7 +40,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE
$int_include_vpn $fake_idx $type_class/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -48,7 +48,7 @@ use SNMP::Info::Aggregate;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -40,7 +40,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -43,7 +43,7 @@ use SNMP::Info::Bridge;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE %MODEL_MAP
%MODID_MAP %PROCID_MAP/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::MIBS,

View File

@@ -36,7 +36,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer2::MIBS, %SNMP::Info::Layer3::MIBS,

View File

@@ -47,7 +47,7 @@ use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
@SNMP::Info::Layer3::C3550::EXPORT_OK = qw//;
$VERSION = '3.28';
$VERSION = '3.30';
# NOTE: Order creates precedence
# Example: v_name exists in Bridge.pm and CiscoVTP.pm

View File

@@ -44,7 +44,7 @@ use SNMP::Info::MAU;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::MAU::MIBS,

View File

@@ -51,7 +51,7 @@ use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
# NOTE: Order creates precedence
# Example: v_name exists in Bridge.pm and CiscoVTP.pm

View File

@@ -55,7 +55,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -45,7 +45,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = ( %SNMP::Info::Layer3::MIBS, %SNMP::Info::CiscoStats::MIBS, );

View File

@@ -43,7 +43,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = ( %SNMP::Info::Layer3::MIBS, %SNMP::Info::CiscoStats::MIBS, );

View File

@@ -50,7 +50,7 @@ use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::Cisco::MIBS,

View File

@@ -42,7 +42,7 @@ use SNMP::Info::Entity;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::MIBS, %SNMP::Info::Layer3::MIBS, %SNMP::Info::Entity::MIBS,

View File

@@ -40,7 +40,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -44,7 +44,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION $DEBUG %GLOBALS %FUNCS $INIT %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS, %SNMP::Info::CDP::MIBS,

View File

@@ -46,7 +46,7 @@ use SNMP::Info::EDP;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -38,7 +38,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
@@ -72,10 +72,14 @@ $VERSION = '3.28';
'i_up' => 'sysInterfaceStatus',
# sysIfxStatTable
'i_octet_in' => 'sysIfxStatHcInOctets',
'i_octet_out' => 'sysIfxStatHcOutOctets',
'i_pkts_ucast_in' => 'sysIfxStatHcInUcastPkts',
'i_pkts_ucast_out' => 'sysIfxStatHcOutUcastPkts',
'i_octet_in64' => 'sysIfxStatHcInOctets',
'i_octet_out64' => 'sysIfxStatHcOutOctets',
'i_pkts_ucast_in64' => 'sysIfxStatHcInUcastPkts',
'i_pkts_ucast_out64' => 'sysIfxStatHcOutUcastPkts',
'i_pkts_mutli_in64' => 'sysIfxStatInMulticastPkts',
'i_pkts_multi_out64' => 'sysIfxStatOutMulticastPkts',
'i_pkts_bcast_in64' => 'sysIfxStatInBroadcastPkts',
'i_pkts_bcast_out64' => 'sysIfxStatOutBroadcastPkts',
# sysInterfaceStatTable
'i_discards_in' => 'sysInterfaceStatDropsIn',
@@ -115,8 +119,8 @@ sub fan {
my $ret = "";
my $s = "";
foreach my $i ( sort { $a <=> $b } keys %$fan_state ) {
$ret .= $s . $i . ": " . $fan_state->{$i};
$s = ", ";
$ret .= $s . $i . ': ' . $fan_state->{$i};
$s = ', ';
}
return if ( $s eq "" );
return $ret;

View File

@@ -43,7 +43,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -39,7 +39,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -48,7 +48,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -47,7 +47,7 @@ use SNMP::Info::IEEE802dot3ad 'agg_ports_lag';
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -42,7 +42,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -47,7 +47,7 @@ use SNMP::Info::IEEE802dot3ad 'agg_ports_lag';
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -41,7 +41,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -40,7 +40,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -41,7 +41,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -39,7 +39,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = ( %SNMP::Info::Layer3::MIBS, );

View File

@@ -39,7 +39,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -41,7 +41,7 @@ use SNMP::Info::SONMP;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -40,7 +40,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -40,7 +40,7 @@ use SNMP::Info::IEEE802dot11;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -46,7 +46,7 @@ use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
# NOTE: Order creates precedence
# Example: v_name exists in Bridge.pm and CiscoVTP.pm

View File

@@ -39,7 +39,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
@@ -108,6 +108,21 @@ sub i_ignore {
return \%i_ignore;
}
sub layers {
my $pfront = shift;
my $layers = $pfront->SUPER::layers();
# Some models or softwware versions don't report L2 properly
# so add L2 capability to the output if the device has bridge ports.
my $bports = $pfront->b_ports();
if ($bports) {
my $l = substr $layers, 6, 1, "1";
}
return $layers;
}
1;
__END__
@@ -210,6 +225,11 @@ Returns reference to hash. Increments value of IID if port is to be ignored.
Ignores loopback
=item $pfront->layers()
L2 capability isn't always reported correctly by the device itself; what the
device reports is augmented with L2 capability if the device has bridge ports.
=back
=head2 Table Methods imported from SNMP::Info::Layer3

View File

@@ -43,7 +43,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS, %SNMP::Info::RapidCity::MIBS,
@@ -177,6 +177,7 @@ sub interfaces {
my $model = $passport->model();
my $index_factor = $passport->index_factor();
my $port_offset = $passport->port_offset();
my $slot_offset = $passport->slot_offset();
my $vlan_index = {};
my %reverse_vlan;
my $vlan_id = {};
@@ -202,6 +203,10 @@ sub interfaces {
$if{$index} = 'Cpu.Virtual';
}
elsif ( ( $iid == 64 ) and ( $model =~ /^VSP[48]/ ) ) {
$if{$index} = 'Mgmt.1';
}
elsif ( ( $index == 192 ) and ( $model =~ /^8[86]03/ ) ) {
$if{$index} = 'Cpu.3';
}
@@ -227,7 +232,7 @@ sub interfaces {
else {
my $port = ( $index % $index_factor ) + $port_offset;
my $slot = int( $index / $index_factor );
my $slot = int( $index / $index_factor ) + $slot_offset;
my $slotport = "$slot.$port";
$if{$iid} = $slotport;
@@ -383,6 +388,10 @@ sub i_name {
$i_name{$iid} = 'CPU Virtual Management IP';
}
elsif ( ( $iid == 64 ) and ( $model =~ /^VSP[48]/ ) ) {
$i_name{$iid} = 'Mgmt Port';
}
elsif ( ( $iid == 192 ) and ( $model =~ /^8[86]03/ ) ) {
$i_name{$iid} = 'CPU 3 Ethernet Port';
}
@@ -573,13 +582,17 @@ sub index_factor {
# Older Accelar models use base 16 instead of 64
$index_factor = 16
if ( defined $model and $model =~ /^1[012][05]0/ );
# Newer VSP 4K uses 192?
$index_factor = 192
if ( defined $model and $model =~ /^VSP4/ );
return $index_factor;
}
sub slot_offset {
my $passport = shift;
my $model = $passport->model();
# Newer VSP 4K and 8K start at an index of 192 ~ slot 3 but really slot 1
return -2
if ( defined $model and $model =~ /^VSP[48]/ );
return 0;
}

View File

@@ -41,7 +41,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -39,7 +39,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -36,7 +36,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer2::MIBS, %SNMP::Info::Layer3::MIBS,

View File

@@ -39,7 +39,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -39,7 +39,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = ( %SNMP::Info::Layer3::MIBS, );

View File

@@ -42,7 +42,7 @@ use SNMP::Info::MAU;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.28';
$VERSION = '3.30';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

Some files were not shown because too many files have changed in this diff Show More