Compare commits
30 Commits
ver_1_0_1_
...
ver_1_0_4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8015e59161 | ||
|
|
7a94ddcc26 | ||
|
|
4e73ff2bae | ||
|
|
257eb48e70 | ||
|
|
cf1564d598 | ||
|
|
e83380c7c5 | ||
|
|
799a06b63a | ||
|
|
b55e15a568 | ||
|
|
6b3edc3232 | ||
|
|
f65332f9cc | ||
|
|
3416928233 | ||
|
|
4d262872c8 | ||
|
|
795ae41d68 | ||
|
|
2e17b5c64a | ||
|
|
ddca296e2a | ||
|
|
af5d1d6c03 | ||
|
|
2f07667560 | ||
|
|
1fac4cb13c | ||
|
|
aa8c86ddcd | ||
|
|
83751acf91 | ||
|
|
01dc21e338 | ||
|
|
0b8f6db97a | ||
|
|
23dd87c294 | ||
|
|
9a19d3a6f6 | ||
|
|
ba6e02ea5e | ||
|
|
1426f7656d | ||
|
|
53ebeacc09 | ||
|
|
bd6cc8d7f4 | ||
|
|
19018f364e | ||
|
|
be0391bfa8 |
13
ChangeLog
13
ChangeLog
@@ -1,6 +1,19 @@
|
||||
SNMP::Info - Friendly OO-style interface to Network devices using SNMP.
|
||||
ChangeLog $Id$
|
||||
|
||||
version 1.04 (07/08/06)
|
||||
+ Added C1130 and C1240 to L2::Aironet (Ralf Gross)
|
||||
+ Added detection for Cisco 2960, 2940, 3400 w/ MetroBase
|
||||
+ Added generic L2::Cisco Class
|
||||
* Corrected detection for Cisco Supervisor Engine 2 and 32 (IOS).
|
||||
* Fixed warnings in CiscoStack
|
||||
* Updated ProCurve HP device detection for newer firmwares
|
||||
|
||||
version 1.03 (04/14/06) - Beta/developer release
|
||||
* Use ipNetToMedia table instead of atTable for ARP
|
||||
* Remove CiscoStack from Layer3::C4000
|
||||
* Fixed bug in MAU class when polling devices without MAU-MIB support
|
||||
|
||||
version 1.01 (04/08/06) - Beta/developer release
|
||||
+ Change version numbers to X.XX format. Odd releases are beta
|
||||
or developer only releases. Even are official releases.
|
||||
|
||||
@@ -63,7 +63,7 @@ device-family: Aironet
|
||||
note: IOS and Aironet OS versions
|
||||
class: Layer3::Aironet
|
||||
|
||||
device: AIRAP1100, AP1200, C1100
|
||||
device: AIRAP1100, AP1200, C1100, C1130, C1240
|
||||
note: IOS based device
|
||||
class: Layer2::Aironet
|
||||
|
||||
@@ -76,12 +76,12 @@ note: Aironet based device
|
||||
device-family: 1000
|
||||
duplex: no
|
||||
ver: 1
|
||||
class: Layer3
|
||||
class: Layer3::Cisco
|
||||
|
||||
device: 1003
|
||||
|
||||
device-family: 1700
|
||||
class: Layer3
|
||||
class: Layer3::Cisco
|
||||
|
||||
device: 1710
|
||||
duplex: link
|
||||
@@ -91,7 +91,7 @@ duplex: no
|
||||
macsuck: yes
|
||||
arpnip: yes
|
||||
ver: 1
|
||||
class: Layer3
|
||||
class: Layer3::Cisco
|
||||
|
||||
device: 2501
|
||||
|
||||
@@ -109,7 +109,7 @@ device-family: 2600
|
||||
duplex: link
|
||||
arpnip: yes
|
||||
macsuck: yes
|
||||
class: Layer3
|
||||
class: Layer3::Cisco
|
||||
|
||||
device:2610,2610XM,2611,2620,2620XM,2621
|
||||
|
||||
@@ -120,7 +120,7 @@ device:2651XM
|
||||
device:2691
|
||||
|
||||
device-family: 3600
|
||||
class: Layer3
|
||||
class: Layer3::Cisco
|
||||
|
||||
device: 3620
|
||||
|
||||
@@ -128,7 +128,7 @@ device: 3640
|
||||
duplex: no
|
||||
|
||||
device-family: 7500
|
||||
class: Layer3
|
||||
class: Layer3::Cisco
|
||||
|
||||
device: 7507
|
||||
duplex: no
|
||||
@@ -136,7 +136,7 @@ note: !Duplex settings are falsely reported in older IOS versions
|
||||
|
||||
device-family: AS5000
|
||||
duplex: no
|
||||
class: Layer3
|
||||
class: Layer3::Cisco
|
||||
|
||||
device: AS5300
|
||||
|
||||
@@ -205,7 +205,7 @@ vlan: write
|
||||
note: Acts just like IOS Catalyst 6500 series
|
||||
class: Layer3::C6500
|
||||
|
||||
device: 2970G-24T-E
|
||||
device: 2960, 2970G-24T-E
|
||||
|
||||
device-family: Catalyst 3500 XL
|
||||
portmac: yes
|
||||
@@ -234,6 +234,8 @@ note: Comes in flavors that support L2, L3 or combo.
|
||||
|
||||
device: 3550-12T
|
||||
|
||||
device: 3400 w/ MetroBase Image
|
||||
|
||||
device: 3550
|
||||
note: L2/L3 Switch
|
||||
arpnip: yes
|
||||
@@ -244,25 +246,38 @@ macsuck: vlan
|
||||
device-family: Catalyst 3750
|
||||
class: Layer3::C6500
|
||||
|
||||
device: 3750
|
||||
|
||||
device-family: Catalyst 4000
|
||||
duplex: both
|
||||
duplex: write
|
||||
macsuck: vlan
|
||||
vlan: write
|
||||
class: Layer3::C4000
|
||||
class: Layer2::Catalyst
|
||||
note: Comes in IOS and CatOS versions like the 6k series.
|
||||
note: CatOS versions like L2::Catalyst just fine.
|
||||
note: !Reported problems with SNMP taking up all the CPU. Requests take significantly longer.
|
||||
note: !IOS Version 12.1.8a reported not to respond to BRIDGE-MIB calls.
|
||||
|
||||
device: wsc4006
|
||||
device: wsc4003, wsc4006
|
||||
|
||||
device: 4507
|
||||
class: Layer3::C6500
|
||||
note: !Has serious slowdown/timeout problems with SNMP
|
||||
device: wsc4503, wsc4506
|
||||
|
||||
device: wsc4912g
|
||||
note: Dedicated 12 port gig-e switch
|
||||
|
||||
device: 4006
|
||||
duplex: both
|
||||
class: Layer3::C4000
|
||||
note: !Has serious slowdown/timeout problems with SNMP
|
||||
note: !IOS Software Release 12.2(20)EW or higher required for duplex support
|
||||
|
||||
device: 4503, 4506, 4507, 4510
|
||||
duplex: both
|
||||
class: Layer3::C4000
|
||||
note: !Has serious slowdown/timeout problems with SNMP
|
||||
note: !IOS Software Release 12.2(20)EW or higher required for duplex support
|
||||
|
||||
|
||||
device-family: Catalyst 5000
|
||||
duplex: write
|
||||
vlan: write
|
||||
|
||||
42
Info.pm
42
Info.pm
@@ -9,7 +9,7 @@
|
||||
# $Id$
|
||||
|
||||
package SNMP::Info;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
@@ -29,7 +29,7 @@ SNMP::Info - Object Oriented Perl5 Interface to Network devices and MIBs through
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
SNMP::Info - Version 1.0
|
||||
SNMP::Info - Version 1.04
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
@@ -38,7 +38,7 @@ and was orginally written by Max Baker.
|
||||
|
||||
Currently being maintained by team of Open Source authors headed by Eric Miller
|
||||
and Bill Fenner.
|
||||
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use SNMP::Info;
|
||||
@@ -372,6 +372,11 @@ does not support everything that has the name Catalyst.
|
||||
|
||||
Subclass for Nortel/Bay Centillion and 5000BH ATM switches.
|
||||
|
||||
=item SNMP::Info::Layer2::Cisco
|
||||
|
||||
Generic Cisco subclass for layer2 devices that are not yet supported
|
||||
in more specific subclasses.
|
||||
|
||||
=item SNMP::Info::Layer2::Foundry
|
||||
|
||||
Subclass for Foundry Switches. Tested on EdgeIron 24G.
|
||||
@@ -811,10 +816,13 @@ Algorithm for Subclass Detection:
|
||||
Elsif Layer2 (no Layer3) -> SNMP::Info::Layer2
|
||||
Aironet - IOS Devices -> SNMP::Info::Layer2::Aironet
|
||||
Catalyst 1900 -> SNMP::Info::Layer2::C1900
|
||||
Catalyst 2900XL,2950,3500XL -> SNMP::Info::Layer2::C2900
|
||||
Catalyst 2970 -> SNMP::Info::Layer3::C6500
|
||||
Catalyst 2900XL,2940,2950,
|
||||
3500XL -> SNMP::Info::Layer2::C2900
|
||||
Catalyst 2960, 2970 -> SNMP::Info::Layer3::C6500
|
||||
Catalyst 3550/3548 -> SNMP::Info::Layer3::C3550
|
||||
Cisco 3400 w/ MetroBase -> SNMP::Info::Layer3::C3550
|
||||
Catalyst WS-C 2926,5xxx -> SNMP::Info::Layer2::Catalyst
|
||||
Cisco (not covered by above) -> SNMP::Info::Layer2::Cisco
|
||||
Extreme -> SNMP::Info::Layer3::Extreme
|
||||
Foundry (EdgeIron,????) -> SNMP::Info::Layer2::Foundry
|
||||
HP Procurve -> SNMP::Info::Layer2::HP
|
||||
@@ -846,7 +854,9 @@ sub device_type {
|
||||
|
||||
my $desc = $info->description() || 'undef';
|
||||
$desc =~ s/[\r\n\l]+/ /g;
|
||||
$info->debug() and print "SNMP::Info::device_type() layers:$layers sysDescr: \"$desc\".\n";
|
||||
my $id = $info->id() || 'undef';
|
||||
|
||||
$info->debug() and print "SNMP::Info::device_type() layers:$layers id:$id sysDescr:\"$desc\"\n";
|
||||
|
||||
# Layer 3 Supported
|
||||
# (usually has layer2 as well, so we check for 3 first)
|
||||
@@ -866,7 +876,7 @@ sub device_type {
|
||||
$objtype = 'SNMP::Info::Layer3::C6500' if $desc =~ /(c6sup2|c6sup1)/;
|
||||
# Next one untested. Reported working by DA
|
||||
$objtype = 'SNMP::Info::Layer3::C6500' if ($desc =~ /cisco/i and $desc =~ /3750/);
|
||||
$objtype = 'SNMP::Info::Layer3::C6500' if $desc =~ /s72033_rp/;
|
||||
$objtype = 'SNMP::Info::Layer3::C6500' if $desc =~ /(s72033_rp|s3223_rp|s222_rp)/;
|
||||
# Extreme Networks
|
||||
$objtype = 'SNMP::Info::Layer3::Extreme' if $desc =~ /Alpine38/;
|
||||
$objtype = 'SNMP::Info::Layer3::Extreme' if $desc =~ /Summit\s*\d/;
|
||||
@@ -882,7 +892,7 @@ sub device_type {
|
||||
# Nortel Contivity
|
||||
$objtype = 'SNMP::Info::Layer3::Contivity' if $desc =~ /\bCES\b/;
|
||||
# Nortel BayRS
|
||||
$objtype = 'SNMP::Info::Layer3::BayRS' if $desc =~ /^\s*Image:\s+rel\//;
|
||||
$objtype = 'SNMP::Info::Layer3::BayRS' if $desc =~ /^\s*Image:\s+re[lv]\/(\d+\.){1,3}\d+\//;
|
||||
|
||||
# Allied Telesyn Layer2 managed switches. They report they have L3 support
|
||||
$objtype = 'SNMP::Info::Layer2::Allied' if ($desc =~ /Allied.*AT-80\d{2}\S*/i);
|
||||
@@ -908,23 +918,24 @@ sub device_type {
|
||||
$objtype = 'SNMP::Info::Layer2::C1900' if ($desc =~ /catalyst/i and $desc =~ /\D19\d{2}/);
|
||||
|
||||
# Catalyst 2900 and 3500XL (IOS) series override
|
||||
$objtype = 'SNMP::Info::Layer2::C2900' if ($desc =~ /(C2900XL|C2950|C3500XL)/i );
|
||||
$objtype = 'SNMP::Info::Layer2::C2900' if ($desc =~ /(C2900XL|C2950|C3500XL|C2940)/i );
|
||||
|
||||
# Catalyst WS-C series override 2926,4k,5k,6k in Hybrid
|
||||
$objtype = 'SNMP::Info::Layer2::Catalyst' if ($desc =~ /WS-C\d{4}/);
|
||||
|
||||
# Catalyst 3550 / 3548 Layer2 only switches
|
||||
$objtype = 'SNMP::Info::Layer3::C3550' if ($desc =~ /C3550/);
|
||||
# Cisco 3400 w/ MetroBase Image
|
||||
$objtype = 'SNMP::Info::Layer3::C3550' if ($desc =~ /(C3550|ME340x)/);
|
||||
|
||||
# Cisco 2970
|
||||
$objtype = 'SNMP::Info::Layer3::C6500' if ($desc =~ /C2970/);
|
||||
$objtype = 'SNMP::Info::Layer3::C6500' if ($desc =~ /(C2970|C2960)/);
|
||||
|
||||
# Extreme Networks
|
||||
$objtype = 'SNMP::Info::Layer3::Extreme' if $desc =~ /Alpine38/;
|
||||
$objtype = 'SNMP::Info::Layer3::Extreme' if $desc =~ /Summit\s*\d/;
|
||||
|
||||
# HP
|
||||
$objtype = 'SNMP::Info::Layer2::HP' if ($desc =~ /HP.*ProCurve/);
|
||||
$objtype = 'SNMP::Info::Layer2::HP' if ($desc =~ /\bProCurve\b/);
|
||||
|
||||
# Centillion ATM
|
||||
$objtype = 'SNMP::Info::Layer2::Centillion' if ($desc =~ /MCP/);
|
||||
@@ -943,10 +954,10 @@ sub device_type {
|
||||
$objtype = 'SNMP::Info::Layer2::NAP222x' if ($desc =~ /Access\s+Point\s+222/);
|
||||
|
||||
# Orinco
|
||||
$objtype = 'SNMP::Info::Layer2::Orinoco' if ($desc =~ /AP-\d{3}|WavePOINT/);
|
||||
$objtype = 'SNMP::Info::Layer2::Orinoco' if ($desc =~ /(AP-\d{3}|WavePOINT)/);
|
||||
|
||||
# Aironet - IOS
|
||||
$objtype = 'SNMP::Info::Layer2::Aironet' if ($desc =~ /\b(C1100|AP1200|C350|C1200)\b/ and $desc =~ /\bIOS\b/);
|
||||
$objtype = 'SNMP::Info::Layer2::Aironet' if ($desc =~ /\b(C1100|C1130|AP1200|C350|C1200|C1240)\b/ and $desc =~ /\bIOS\b/);
|
||||
|
||||
# Aironet - non IOS
|
||||
$objtype = 'SNMP::Info::Layer3::Aironet' if ($desc =~ /Cisco/ and $desc =~ /\D(BR500)\D/) ;
|
||||
@@ -954,6 +965,9 @@ sub device_type {
|
||||
#Nortel 2270
|
||||
$objtype = 'SNMP::Info::Layer2::N2270' if ($desc =~ /Nortel\s+(Networks\s+)??WLAN\s+-\s+Security\s+Switch/) ;
|
||||
|
||||
# Default generic cisco
|
||||
$objtype = 'SNMP::Info::Layer2::Cisco' if ($objtype eq 'SNMP::Info::Layer2' and $desc =~ /\bCisco\b/);
|
||||
|
||||
} elsif ($info->has_layer(1)) {
|
||||
$objtype = 'SNMP::Info::Layer1';
|
||||
# Allied crap-o-hub
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Airespace;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Bridge;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
# $Id$
|
||||
|
||||
use strict;
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::CDP;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
# $Id$
|
||||
|
||||
use strict;
|
||||
|
||||
@@ -32,7 +32,7 @@ use Exporter;
|
||||
use SNMP::Info;
|
||||
|
||||
use vars qw/$VERSION $DEBUG %MIBS %FUNCS %GLOBALS %MUNGE $INIT/;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
|
||||
@SNMP::Info::CiscoImage::ISA = qw/SNMP::Info Exporter/;
|
||||
@SNMP::Info::CiscoImage::EXPORT_OK = qw//;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::CiscoQOS;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::CiscoRTT;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
|
||||
use strict;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# SNMP::Info::CiscoStack
|
||||
# Max Baker
|
||||
#
|
||||
# Copyright (c)2003,2004 Max Baker
|
||||
# Copyright (c)2003,2004,2006 Max Baker
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -28,7 +28,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::CiscoStack;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
# $Id$
|
||||
|
||||
use strict;
|
||||
@@ -170,15 +170,16 @@ sub serial {
|
||||
sub i_type {
|
||||
my $stack = shift;
|
||||
|
||||
my $p_port = $stack->p_port();
|
||||
my $p_type = $stack->p_type();
|
||||
my $p_port = $stack->p_port() || {};
|
||||
my $p_type = $stack->p_type() || {};
|
||||
|
||||
# Get more generic port types from IF-MIB
|
||||
my $i_type = $stack->i_type2();
|
||||
my $i_type = $stack->i_type2() || {};
|
||||
|
||||
# Now Override w/ port entries
|
||||
foreach my $port (keys %$p_type) {
|
||||
my $iid = $p_port->{$port};
|
||||
next unless defined $iid;
|
||||
$i_type->{$iid} = $p_type->{$port};
|
||||
}
|
||||
|
||||
@@ -190,8 +191,8 @@ sub i_type {
|
||||
sub i_name {
|
||||
my $stack = shift;
|
||||
|
||||
my $p_port = $stack->p_port();
|
||||
my $p_name = $stack->p_name();
|
||||
my $p_port = $stack->p_port() || {};
|
||||
my $p_name = $stack->p_name() || {};
|
||||
|
||||
my %i_name;
|
||||
foreach my $port (keys %$p_name) {
|
||||
@@ -206,12 +207,13 @@ sub i_duplex {
|
||||
my $stack = shift;
|
||||
|
||||
#my $i_duplex = $stack->SUPER::i_duplex();
|
||||
my $p_port = $stack->p_port();
|
||||
my $p_duplex = $stack->p_duplex();
|
||||
my $p_port = $stack->p_port() || {};
|
||||
my $p_duplex = $stack->p_duplex() || {};
|
||||
|
||||
my $i_duplex = {};
|
||||
foreach my $port (keys %$p_duplex) {
|
||||
my $iid = $p_port->{$port};
|
||||
next unless defined $iid;
|
||||
$i_duplex->{$iid} = $p_duplex->{$port};
|
||||
}
|
||||
return $i_duplex;
|
||||
@@ -220,8 +222,8 @@ sub i_duplex {
|
||||
sub i_duplex_admin {
|
||||
my $stack = shift;
|
||||
|
||||
my $p_port = $stack->p_port();
|
||||
my $p_duplex_admin = $stack->p_duplex_admin();
|
||||
my $p_port = $stack->p_port() || {};
|
||||
my $p_duplex_admin = $stack->p_duplex_admin() || {};
|
||||
|
||||
my %i_duplex_admin;
|
||||
foreach my $port (keys %$p_duplex_admin) {
|
||||
@@ -250,7 +252,7 @@ sub set_i_speed_admin {
|
||||
|
||||
my $stack = shift;
|
||||
my ($speed, $iid) = @_;
|
||||
my $p_port = $stack->p_port();
|
||||
my $p_port = $stack->p_port() || {};
|
||||
my %reverse_p_port = reverse %$p_port;
|
||||
|
||||
$speed = lc($speed);
|
||||
@@ -268,7 +270,7 @@ sub set_i_duplex_admin {
|
||||
|
||||
my $stack = shift;
|
||||
my ($duplex, $iid) = @_;
|
||||
my $p_port = $stack->p_port();
|
||||
my $p_port = $stack->p_port() || {};
|
||||
my %reverse_p_port = reverse %$p_port;
|
||||
|
||||
$duplex = lc($duplex);
|
||||
@@ -285,11 +287,12 @@ sub set_i_duplex_admin {
|
||||
sub interfaces {
|
||||
my $self = shift;
|
||||
my $i_index = $self->i_index();
|
||||
my $portnames = $self->p_port();
|
||||
my $portnames = $self->p_port() || {};
|
||||
my %portmap = reverse %$portnames;
|
||||
|
||||
my %interfaces = ();
|
||||
foreach my $iid (keys %$i_index) {
|
||||
next unless defined $iid;
|
||||
my $if = $i_index->{$iid};
|
||||
my $port = $portmap{$iid};
|
||||
$interfaces{$iid} = $port || $if;
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::CiscoStats;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
# $Id$
|
||||
|
||||
use strict;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::CiscoVTP;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
# $Id$
|
||||
|
||||
use strict;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Entity;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
# $Id$
|
||||
|
||||
use strict;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::EtherLike;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
# $Id$
|
||||
|
||||
use strict;
|
||||
|
||||
@@ -42,7 +42,7 @@ use SNMP::Info;
|
||||
@SNMP::Info::FDP::EXPORT_OK = qw//;
|
||||
|
||||
use vars qw/$VERSION $DEBUG %FUNCS %GLOBALS %MIBS %MUNGE $INIT/;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
|
||||
%MIBS = ( 'FOUNDRY-SN-SWITCH-GROUP-MIB' => 'snFdpGlobalRun' );
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer1;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
# $Id$
|
||||
|
||||
use strict;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer1::Allied;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
# $Id$
|
||||
use strict;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer1::Asante;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
# $Id$
|
||||
use strict;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer1::Bayhub;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer1::S3000;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
# $Id$
|
||||
|
||||
use strict;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::Aironet;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
# $Id$
|
||||
use strict;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::Allied;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
# $Id$
|
||||
use strict;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::Aruba;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::Bay;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
# $Id$
|
||||
use strict;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::Baystack;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::C1900;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
# $Id$
|
||||
use strict;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::C2900;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
# $Id$
|
||||
use strict;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::Catalyst;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
# $Id$
|
||||
|
||||
use strict;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::Centillion;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
|
||||
use strict;
|
||||
|
||||
|
||||
214
Info/Layer2/Cisco.pm
Normal file
214
Info/Layer2/Cisco.pm
Normal file
@@ -0,0 +1,214 @@
|
||||
# SNMP::Info::Layer2::Cisco
|
||||
# Max Baker
|
||||
#
|
||||
# Copyright (c) 2006 Max Baker
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
# * Neither the name of the University of California, Santa Cruz nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::Cisco;
|
||||
# $Id$
|
||||
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
use SNMP::Info::Layer2;
|
||||
use SNMP::Info::CiscoVTP;
|
||||
use SNMP::Info::CDP;
|
||||
use SNMP::Info::CiscoStats;
|
||||
use SNMP::Info::CiscoImage;
|
||||
use SNMP::Info::CiscoRTT;
|
||||
use SNMP::Info::CiscoQOS;
|
||||
|
||||
use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %MUNGE $INIT/ ;
|
||||
$VERSION = 1.04;
|
||||
@SNMP::Info::Layer2::Cisco::ISA = qw/SNMP::Info::Layer2 SNMP::Info::CiscoVTP
|
||||
SNMP::Info::CDP SNMP::Info::CiscoStats
|
||||
SNMP::Info::CiscoImage SNMP::Info::CiscoRTT
|
||||
SNMP::Info::CiscoQOS Exporter/;
|
||||
@SNMP::Info::Layer2::Cisco::EXPORT_OK = qw//;
|
||||
|
||||
%MIBS = (
|
||||
%SNMP::Info::Layer2::MIBS,
|
||||
%SNMP::Info::CiscoVTP::MIBS,
|
||||
%SNMP::Info::CDP::MIBS,
|
||||
%SNMP::Info::CiscoStats::MIBS,
|
||||
%SNMP::Info::CiscoImage::MIBS,
|
||||
%SNMP::Info::CiscoRTT::MIBS,
|
||||
%SNMP::Info::CiscoQOS::MIBS,
|
||||
);
|
||||
|
||||
%GLOBALS = (
|
||||
%SNMP::Info::Layer2::GLOBALS,
|
||||
%SNMP::Info::CiscoVTP::GLOBALS,
|
||||
%SNMP::Info::CDP::GLOBALS,
|
||||
%SNMP::Info::CiscoStats::GLOBALS,
|
||||
%SNMP::Info::CiscoImage::GLOBALS,
|
||||
%SNMP::Info::CiscoRTT::GLOBALS,
|
||||
%SNMP::Info::CiscoQOS::GLOBALS,
|
||||
);
|
||||
|
||||
%FUNCS = (
|
||||
%SNMP::Info::Layer2::FUNCS,
|
||||
%SNMP::Info::CiscoVTP::FUNCS,
|
||||
%SNMP::Info::CDP::FUNCS,
|
||||
%SNMP::Info::CiscoStats::FUNCS,
|
||||
%SNMP::Info::CiscoImage::FUNCS,
|
||||
%SNMP::Info::CiscoRTT::FUNCS,
|
||||
%SNMP::Info::CiscoQOS::FUNCS,
|
||||
);
|
||||
|
||||
%MUNGE = (
|
||||
%SNMP::Info::Layer2::MUNGE,
|
||||
%SNMP::Info::CiscoVTP::MUNGE,
|
||||
%SNMP::Info::CDP::MUNGE,
|
||||
%SNMP::Info::CiscoStats::MUNGE,
|
||||
%SNMP::Info::CiscoImage::MUNGE,
|
||||
%SNMP::Info::CiscoRTT::MUNGE,
|
||||
%SNMP::Info::CiscoQOS::MUNGE,
|
||||
);
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SNMP::Info::Layer2::Cisco - Perl5 Interface to L3 and L2+L3 IOS Cisco Device
|
||||
that are not covered in other classes.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Max Baker
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
# Let SNMP::Info determine the correct subclass for you.
|
||||
my $cisco = new SNMP::Info(
|
||||
AutoSpecify => 1,
|
||||
Debug => 1,
|
||||
# These arguments are passed directly on to SNMP::Session
|
||||
DestHost => 'myswitch',
|
||||
Community => 'public',
|
||||
Version => 2
|
||||
)
|
||||
or die "Can't connect to DestHost.\n";
|
||||
|
||||
my $class = $cisco->class();
|
||||
print "SNMP::Info determined this device to fall under subclass : $class\n";
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Subclass for Generic Cisco Routers running IOS
|
||||
|
||||
=head2 Inherited Classes
|
||||
|
||||
=over
|
||||
|
||||
=item SNMP::Info::Layer2
|
||||
|
||||
=item SNMP::Info::CiscoVTP
|
||||
|
||||
=item SNMP::Info::CDP
|
||||
|
||||
=item SNMP::Info::CiscoStats
|
||||
|
||||
=item SNMP::Info::CiscoImage
|
||||
|
||||
=back
|
||||
|
||||
=head2 Required MIBs
|
||||
|
||||
=over
|
||||
|
||||
=item Inherited Classes' MIBs
|
||||
|
||||
See SNMP::Info::Layer2 for its own MIB requirements.
|
||||
|
||||
See SNMP::Info::CiscoVTP for its own MIB requirements.
|
||||
|
||||
See SNMP::Info::CiscoStats for its own MIB requirements.
|
||||
|
||||
See SNMP::Info::CDP for its own MIB requirements.
|
||||
|
||||
See SNMP::Info::CiscoImage for its own MIB requirements.
|
||||
|
||||
=back
|
||||
|
||||
=head1 GLOBALS
|
||||
|
||||
These are methods that return scalar value from SNMP
|
||||
|
||||
=over
|
||||
|
||||
=item $cisco->vendor()
|
||||
|
||||
Returns 'cisco'
|
||||
|
||||
=back
|
||||
|
||||
=head2 Globals imported from SNMP::Info::Layer2
|
||||
|
||||
See documentation in SNMP::Info::Layer2 for details.
|
||||
|
||||
=head2 Global Methods imported from SNMP::Info::CiscoVTP
|
||||
|
||||
See documentation in SNMP::Info::CiscoVTP for details.
|
||||
|
||||
=head2 Globals imported from SNMP::Info::CDP
|
||||
|
||||
See documentation in SNMP::Info::CDP for details.
|
||||
|
||||
=head2 Globals imported from SNMP::Info::CiscoStats
|
||||
|
||||
See documentation in SNMP::Info::CiscoStats for details.
|
||||
|
||||
=head2 Globals imported from SNMP::Info::CiscoImage
|
||||
|
||||
See documentation in SNMP::Info::CiscoImage for details.
|
||||
|
||||
=head1 TABLE ENTRIES
|
||||
|
||||
These are methods that return tables of information in the form of a reference
|
||||
to a hash.
|
||||
|
||||
=head2 Table Methods imported from SNMP::Info::Layer2
|
||||
|
||||
See documentation in SNMP::Info::Layer2 for details.
|
||||
|
||||
=head2 Table Methods imported from SNMP::Info::CiscoVTP
|
||||
|
||||
See documentation in SNMP::Info::CiscoVTP for details.
|
||||
|
||||
=head2 Table Methods imported from SNMP::Info::CDP
|
||||
|
||||
See documentation in SNMP::Info::CDP for details.
|
||||
|
||||
=head2 Table Methods imported from SNMP::Info::CiscoStats
|
||||
|
||||
See documentation in SNMP::Info::CiscoStats for details.
|
||||
|
||||
=head2 Table Methods imported from SNMP::Info::CiscoImage
|
||||
|
||||
See documentation in SNMP::Info::CiscoImage for details.
|
||||
|
||||
=cut
|
||||
@@ -26,7 +26,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::Foundry;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
# $Id$
|
||||
|
||||
use strict;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::HP;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
# $Id$
|
||||
|
||||
use strict;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::N2270;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::NAP222x;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::Orinoco;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::ZyXEL_DSLAM;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
# $Id$
|
||||
use strict;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer3;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
# $Id$
|
||||
|
||||
use strict;
|
||||
@@ -51,6 +51,7 @@ use vars qw/$VERSION $DEBUG %GLOBALS %FUNCS $INIT %MIBS %MUNGE/;
|
||||
%SNMP::Info::Bridge::MIBS,
|
||||
%SNMP::Info::EtherLike::MIBS,
|
||||
%SNMP::Info::Entity::MIBS,
|
||||
'IP-MIB' => 'ipNetToMediaIfIndex',
|
||||
'OSPF-MIB' => 'ospfRouterId',
|
||||
'BGP4-MIB' => 'bgpIdentifier',
|
||||
);
|
||||
@@ -75,10 +76,15 @@ use vars qw/$VERSION $DEBUG %GLOBALS %FUNCS $INIT %MIBS %MUNGE/;
|
||||
%SNMP::Info::Entity::FUNCS,
|
||||
# IFMIB
|
||||
'i_name2' => 'ifName',
|
||||
# Address Translation Table (ARP Cache)
|
||||
'at_index' => 'atIfIndex',
|
||||
'at_paddr' => 'atPhysAddress',
|
||||
'at_netaddr' => 'atNetAddress',
|
||||
# Obsolete Address Translation Table (ARP Cache)
|
||||
'old_at_index' => 'atIfIndex',
|
||||
'old_at_paddr' => 'atPhysAddress',
|
||||
'old_at_netaddr' => 'atNetAddress',
|
||||
# IP-MIB IP Net to Media Table (ARP Cache)
|
||||
'at_index' => 'ipNetToMediaIfIndex',
|
||||
'at_paddr' => 'ipNetToMediaPhysAddress',
|
||||
'at_netaddr' => 'ipNetToMediaNetAddress',
|
||||
# OSPF
|
||||
'ospf_ip' => 'ospfHostIpAddress',
|
||||
# BGP Peer Table
|
||||
'bgp_peers' => 'bgpPeerLocalAddr',
|
||||
@@ -100,6 +106,7 @@ use vars qw/$VERSION $DEBUG %GLOBALS %FUNCS $INIT %MIBS %MUNGE/;
|
||||
%SNMP::Info::Bridge::MUNGE,
|
||||
%SNMP::Info::EtherLike::MUNGE,
|
||||
%SNMP::Info::Entity::MUNGE,
|
||||
'old_at_paddr' => \&SNMP::Info::munge_mac,
|
||||
'at_paddr' => \&SNMP::Info::munge_mac,
|
||||
);
|
||||
|
||||
@@ -248,6 +255,25 @@ sub vendor {
|
||||
|
||||
}
|
||||
|
||||
sub at_index {
|
||||
my $l3 = shift;
|
||||
|
||||
return $l3->orig_at_index() || $l3->old_at_index();
|
||||
}
|
||||
|
||||
sub at_paddr {
|
||||
my $l3 = shift;
|
||||
|
||||
return $l3->orig_at_paddr() || $l3->old_at_paddr();
|
||||
}
|
||||
|
||||
sub at_netaddr {
|
||||
my $l3 = shift;
|
||||
|
||||
return $l3->orig_at_netaddr() || $l3->old_at_netaddr();
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
@@ -434,23 +460,59 @@ see SNMP::Info::Etherlike for the el_index() and el_duplex() methods.
|
||||
|
||||
=back
|
||||
|
||||
=head2 ARP Cache Entries
|
||||
=head2 IP-MIB Arp Cache Table (B<ipNetToMediaTable>)
|
||||
|
||||
=over
|
||||
|
||||
=item $l3->at_index()
|
||||
|
||||
Returns reference to hash. Maps ARP table entries to Interface IIDs
|
||||
|
||||
(B<ipNetToMediaIfIndex>)
|
||||
|
||||
If the device doesn't support B<ipNetToMediaIfIndex>, this will try
|
||||
the deprecated B<atIfIndex>.
|
||||
|
||||
=item $l3->at_paddr()
|
||||
|
||||
Returns reference to hash. Maps ARP table entries to MAC addresses.
|
||||
|
||||
(B<ipNetToMediaPhysAddress>)
|
||||
|
||||
If the device doesn't support B<ipNetToMediaPhysAddress>, this will try
|
||||
the deprecated B<atPhysAddress>.
|
||||
|
||||
=item $l3->at_netaddr()
|
||||
|
||||
Returns reference to hash. Maps ARP table entries to IPs
|
||||
|
||||
(B<ipNetToMediaNetAddress>)
|
||||
|
||||
If the device doesn't support B<ipNetToMediaNetAddress>, this will try
|
||||
the deprecated B<atNetAddress>.
|
||||
|
||||
=back
|
||||
|
||||
=head2 ARP Cache Entries
|
||||
|
||||
The B<atTable> has been deprecated since 1991. You should never need
|
||||
to use these methods. See B<ipNetToMediaTable> above.
|
||||
|
||||
=over
|
||||
|
||||
=item $l3->old_at_index()
|
||||
|
||||
Returns reference to map of IID to Arp Cache Entry
|
||||
|
||||
(B<atIfIndex>)
|
||||
|
||||
=item $l3->at_paddr()
|
||||
=item $l3->old_at_paddr()
|
||||
|
||||
Returns reference to hash of Arp Cache Entries to MAC address
|
||||
|
||||
(B<atPhysAddress>)
|
||||
|
||||
=item $l3->at_netaddr()
|
||||
=item $l3->old_at_netaddr()
|
||||
|
||||
Returns reference to hash of Arp Cache Entries to IP Address
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer3::Aironet;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
# $Id$
|
||||
|
||||
use strict;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer3::AlteonAD;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
|
||||
use strict;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer3::BayRS;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
|
||||
use strict;
|
||||
|
||||
@@ -138,7 +138,7 @@ sub os_ver {
|
||||
my $descr = $bayrs->description();
|
||||
return undef unless defined $descr;
|
||||
|
||||
if ($descr =~ m/rel\/(\d+\.\d+\.\d+\.\d+)/){
|
||||
if ($descr =~ m/^\s*Image:\s+re[lv]\/((\d+\.){1,3}\d+)/){
|
||||
return $1;
|
||||
}
|
||||
return undef;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer3::C3550;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
# $Id$
|
||||
|
||||
use strict;
|
||||
|
||||
@@ -35,15 +35,14 @@ use strict;
|
||||
use Exporter;
|
||||
use SNMP::Info::Layer3;
|
||||
use SNMP::Info::CiscoVTP;
|
||||
use SNMP::Info::CiscoStack;
|
||||
use SNMP::Info::CDP;
|
||||
use SNMP::Info::CiscoStats;
|
||||
use SNMP::Info::CiscoImage;
|
||||
use SNMP::Info::MAU;
|
||||
|
||||
use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %MUNGE $INIT/ ;
|
||||
$VERSION = '1.01';
|
||||
@SNMP::Info::Layer3::C4000::ISA = qw/ SNMP::Info::Layer3 SNMP::Info::CiscoStack SNMP::Info::CiscoVTP
|
||||
$VERSION = '1.04';
|
||||
@SNMP::Info::Layer3::C4000::ISA = qw/ SNMP::Info::Layer3 SNMP::Info::CiscoVTP
|
||||
SNMP::Info::CiscoStats SNMP::Info::CDP
|
||||
SNMP::Info::CiscoImage SNMP::Info::MAU Exporter/;
|
||||
@SNMP::Info::Layer3::C4000::EXPORT_OK = qw//;
|
||||
@@ -51,7 +50,6 @@ $VERSION = '1.01';
|
||||
%MIBS = (
|
||||
%SNMP::Info::Layer3::MIBS,
|
||||
%SNMP::Info::CiscoVTP::MIBS,
|
||||
%SNMP::Info::CiscoStack::MIBS,
|
||||
%SNMP::Info::CDP::MIBS,
|
||||
%SNMP::Info::CiscoStats::MIBS,
|
||||
%SNMP::Info::CiscoImage::MIBS,
|
||||
@@ -62,7 +60,6 @@ $VERSION = '1.01';
|
||||
%GLOBALS = (
|
||||
%SNMP::Info::Layer3::GLOBALS,
|
||||
%SNMP::Info::CiscoVTP::GLOBALS,
|
||||
%SNMP::Info::CiscoStack::GLOBALS,
|
||||
%SNMP::Info::CDP::GLOBALS,
|
||||
%SNMP::Info::CiscoStats::GLOBALS,
|
||||
%SNMP::Info::CiscoImage::GLOBALS,
|
||||
@@ -76,7 +73,6 @@ $VERSION = '1.01';
|
||||
%FUNCS = (
|
||||
%SNMP::Info::Layer3::FUNCS,
|
||||
%SNMP::Info::CiscoVTP::FUNCS,
|
||||
%SNMP::Info::CiscoStack::FUNCS,
|
||||
%SNMP::Info::CDP::FUNCS,
|
||||
%SNMP::Info::CiscoStats::FUNCS,
|
||||
%SNMP::Info::CiscoImage::FUNCS,
|
||||
@@ -88,7 +84,6 @@ $VERSION = '1.01';
|
||||
%MUNGE = (
|
||||
%SNMP::Info::Layer3::MUNGE,
|
||||
%SNMP::Info::CiscoVTP::MUNGE,
|
||||
%SNMP::Info::CiscoStack::MUNGE,
|
||||
%SNMP::Info::CDP::MUNGE,
|
||||
%SNMP::Info::CiscoStats::MUNGE,
|
||||
%SNMP::Info::CiscoImage::MUNGE,
|
||||
@@ -159,8 +154,6 @@ a more specific class using the method above.
|
||||
|
||||
=item SNMP::Info::CiscoVTP
|
||||
|
||||
=item SNMP::Info::CiscoStack
|
||||
|
||||
=item SNMP::Info::CiscoStats
|
||||
|
||||
=item SNMP::Info::CDP
|
||||
@@ -181,8 +174,6 @@ See SNMP::Info::Layer3 for its own MIB requirements.
|
||||
|
||||
See SNMP::Info::CiscoVTP for its own MIB requirements.
|
||||
|
||||
See SNMP::Info::CiscoStack for its own MIB requirements.
|
||||
|
||||
See SNMP::Info::CiscoStats for its own MIB requirements.
|
||||
|
||||
See SNMP::Info::CDP for its own MIB requirements.
|
||||
@@ -205,10 +196,6 @@ See documentation in SNMP::Info::Layer3 for details.
|
||||
|
||||
See documentation in SNMP::Info::CiscoVTP for details.
|
||||
|
||||
=head2 Global Methods imported from SNMP::Info::CiscoStack
|
||||
|
||||
See documentation in SNMP::Info::CiscoStack for details.
|
||||
|
||||
=head2 Globals imported from SNMP::Info::CDP
|
||||
|
||||
See documentation in SNMP::Info::CDP for details.
|
||||
@@ -238,10 +225,6 @@ See documentation in SNMP::Info::Layer3 for details.
|
||||
|
||||
See documentation in SNMP::Info::CiscoVTP for details.
|
||||
|
||||
=head2 Table Methods imported from SNMP::Info::CiscoStack
|
||||
|
||||
See documentation in SNMP::Info::CiscoStack for details.
|
||||
|
||||
=head2 Table Methods imported from SNMP::Info::CDP
|
||||
|
||||
See documentation in SNMP::Info::CDP for details.
|
||||
|
||||
@@ -41,7 +41,7 @@ use SNMP::Info::CiscoStats;
|
||||
use SNMP::Info::CiscoImage;
|
||||
|
||||
use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %MUNGE $INIT/ ;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
@SNMP::Info::Layer3::C6500::ISA = qw/ SNMP::Info::Layer3 SNMP::Info::CiscoStack SNMP::Info::CiscoVTP
|
||||
SNMP::Info::CiscoStats SNMP::Info::CDP Exporter
|
||||
SNMP::Info::CiscoImage/;
|
||||
|
||||
@@ -41,7 +41,7 @@ use SNMP::Info::CiscoRTT;
|
||||
use SNMP::Info::CiscoQOS;
|
||||
|
||||
use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %MUNGE $INIT/ ;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
@SNMP::Info::Layer3::Cisco::ISA = qw/SNMP::Info::Layer3 SNMP::Info::CiscoVTP
|
||||
SNMP::Info::CDP SNMP::Info::CiscoStats
|
||||
SNMP::Info::CiscoImage SNMP::Info::CiscoRTT
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer3::Contivity;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
|
||||
use strict;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ use SNMP::Info::MAU;
|
||||
|
||||
use vars qw/$VERSION $DEBUG %GLOBALS %FUNCS $INIT %MIBS %MUNGE/;
|
||||
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
|
||||
@SNMP::Info::Layer3::Extreme::ISA = qw/SNMP::Info::Layer3 SNMP::Info::MAU Exporter/;
|
||||
@SNMP::Info::Layer3::Extreme::EXPORT_OK = qw//;
|
||||
|
||||
@@ -40,7 +40,7 @@ use SNMP::Info::FDP;
|
||||
|
||||
use vars qw/$VERSION $DEBUG %GLOBALS %FUNCS $INIT %MIBS %MUNGE/;
|
||||
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
|
||||
@SNMP::Info::Layer3::Foundry::ISA = qw/SNMP::Info::Layer3 SNMP::Info::FDP Exporter/;
|
||||
@SNMP::Info::Layer3::Foundry::EXPORT_OK = qw//;
|
||||
|
||||
@@ -31,6 +31,8 @@ package SNMP::Info::Layer3::Juniper;
|
||||
use Exporter;
|
||||
use SNMP::Info::Layer3;
|
||||
|
||||
use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %MUNGE $INIT/ ;
|
||||
$VERSION = '1.04';
|
||||
@SNMP::Info::Layer3::Juniper::ISA = qw/SNMP::Info::Layer3 Exporter/;
|
||||
@SNMP::Info::Layer3::Juniper::EXPORT_OK = qw//;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ use SNMP::Info::SONMP;
|
||||
|
||||
use vars qw/$VERSION $DEBUG %GLOBALS %FUNCS $INIT %MIBS %MUNGE/;
|
||||
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
|
||||
@SNMP::Info::Layer3::N1600::ISA = qw/SNMP::Info::Layer3 SNMP::Info::SONMP Exporter/;
|
||||
@SNMP::Info::Layer3::N1600::EXPORT_OK = qw//;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer3::Passport;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
|
||||
use strict;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::MAU;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
# $Id$
|
||||
|
||||
use strict;
|
||||
@@ -169,7 +169,11 @@ sub mau_i_duplex_admin {
|
||||
# Older HP4000's don't implement ifMauDefaultType, but we can
|
||||
# figure out from ifMauAutoNegCapAdvertised what we'd like.
|
||||
if (!defined($mau_type_admin)) {
|
||||
return mau_i_duplex_admin_old($mau,$mau_index,$mau_autostat);
|
||||
if (defined($mau_index)) {
|
||||
return mau_i_duplex_admin_old($mau,$mau_index,$mau_autostat);
|
||||
} else {
|
||||
return undef;
|
||||
}
|
||||
}
|
||||
|
||||
my %i_duplex_admin;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::NortelStack;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
|
||||
use strict;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::RapidCity;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::SONMP;
|
||||
$VERSION = '1.01';
|
||||
$VERSION = '1.04';
|
||||
|
||||
use strict;
|
||||
|
||||
|
||||
1
MANIFEST
1
MANIFEST
@@ -29,6 +29,7 @@ Info/Layer2/C1900.pm
|
||||
Info/Layer2/C2900.pm
|
||||
Info/Layer2/Catalyst.pm
|
||||
Info/Layer2/Centillion.pm
|
||||
Info/Layer2/Cisco.pm
|
||||
Info/Layer2/Foundry.pm
|
||||
Info/Layer2/HP.pm
|
||||
Info/Layer2/N2270.pm
|
||||
|
||||
13
README
13
README
@@ -5,7 +5,7 @@ NAME
|
||||
|
||||
VERSION
|
||||
|
||||
SNMP::Info - Version 1.0
|
||||
SNMP::Info - Version 1.04
|
||||
|
||||
AUTHOR
|
||||
|
||||
@@ -316,6 +316,10 @@ SUBCLASSES
|
||||
SNMP::Info::Layer2::Centillion
|
||||
Subclass for Nortel/Bay Centillion and 5000BH ATM switches.
|
||||
|
||||
SNMP::Info::Layer2::Cisco
|
||||
Generic Cisco subclass for layer2 devices that are not yet
|
||||
supported in more specific subclasses.
|
||||
|
||||
SNMP::Info::Layer2::Foundry
|
||||
Subclass for Foundry Switches. Tested on EdgeIron 24G.
|
||||
|
||||
@@ -565,10 +569,13 @@ USAGE
|
||||
Elsif Layer2 (no Layer3) -> SNMP::Info::Layer2
|
||||
Aironet - IOS Devices -> SNMP::Info::Layer2::Aironet
|
||||
Catalyst 1900 -> SNMP::Info::Layer2::C1900
|
||||
Catalyst 2900XL,2950,3500XL -> SNMP::Info::Layer2::C2900
|
||||
Catalyst 2970 -> SNMP::Info::Layer3::C6500
|
||||
Catalyst 2900XL,2940,2950,
|
||||
3500XL -> SNMP::Info::Layer2::C2900
|
||||
Catalyst 2960, 2970 -> SNMP::Info::Layer3::C6500
|
||||
Catalyst 3550/3548 -> SNMP::Info::Layer3::C3550
|
||||
Cisco 3400 w/ MetroBase -> SNMP::Info::Layer3::C3550
|
||||
Catalyst WS-C 2926,5xxx -> SNMP::Info::Layer2::Catalyst
|
||||
Cisco (not covered by above) -> SNMP::Info::Layer2::Cisco
|
||||
Extreme -> SNMP::Info::Layer3::Extreme
|
||||
Foundry (EdgeIron,????) -> SNMP::Info::Layer2::Foundry
|
||||
HP Procurve -> SNMP::Info::Layer2::HP
|
||||
|
||||
@@ -13,7 +13,7 @@ use lib '/usr/local/netdisco';
|
||||
use SNMP::Info;
|
||||
use Getopt::Long;
|
||||
use strict;
|
||||
use vars qw/$Class $Dev $Comm $Ver @Dump %Dumped/;
|
||||
use vars qw/$Class $Dev $Comm $Ver @Dump %Dumped $Debug/;
|
||||
|
||||
# Default Values
|
||||
$Class = '';
|
||||
@@ -21,6 +21,7 @@ $Dev = '';
|
||||
$Comm = '';
|
||||
$Ver = 2;
|
||||
@Dump = ();
|
||||
$Debug = 0;
|
||||
|
||||
GetOptions ('c|class=s' => \$Class,
|
||||
'd|dev=s' => \$Dev,
|
||||
@@ -28,6 +29,7 @@ GetOptions ('c|class=s' => \$Class,
|
||||
'v|ver=i' => \$Ver,
|
||||
'h|help' => \&usage,
|
||||
'p|print=s' => \@Dump,
|
||||
'x|debug' => \$Debug,
|
||||
);
|
||||
|
||||
&usage unless ($Dev and $Comm);
|
||||
@@ -45,7 +47,7 @@ print "Dumping : ",join(',',@Dump),"\n" if scalar @Dump;
|
||||
my $dev = new $Class( 'AutoSpecify' => 0,
|
||||
'AutoVerBack' => 0,
|
||||
'Version' => $Ver,
|
||||
'Debug' => 0,
|
||||
'Debug' => $Debug,
|
||||
'DestHost' => $Dev,
|
||||
'Community' => $Comm
|
||||
) or die "\n";
|
||||
|
||||
Reference in New Issue
Block a user