added entity-mib to l2 and l3 classes. abstracted non cisco stuff from L3 to L3::Cisco and CiscoStats
This commit is contained in:
@@ -5,6 +5,11 @@ version 0.10 ()
|
|||||||
+ Added BulkWalk and BulkRepeaters options to new()
|
+ Added BulkWalk and BulkRepeaters options to new()
|
||||||
* Added check for bulkwalk_no() method
|
* Added check for bulkwalk_no() method
|
||||||
* Added more error checking in _load_attr() around bulkwalk code
|
* Added more error checking in _load_attr() around bulkwalk code
|
||||||
|
* Minor warning fix in L3::Aironet::os_ver()
|
||||||
|
* Abstracted remaining Cisco stuff from L3 to L3::Cisco
|
||||||
|
* Added CISCO-ENTITY-VENDORTYPE-OID-MIB,CISCO-PRODUCTS-MIB,CISCO-STACK-MIB to CiscoStats.pm for model()
|
||||||
|
* Added Entity.pm to L3 and L2 classes per N. Petri's suggestion.
|
||||||
|
|
||||||
|
|
||||||
verison 0.9 (11/15/04)
|
verison 0.9 (11/15/04)
|
||||||
+ ** Added full Nortel/Bay/BayStack support
|
+ ** Added full Nortel/Bay/BayStack support
|
||||||
|
|||||||
28
Info.pm
28
Info.pm
@@ -29,7 +29,7 @@ SNMP::Info - Object Oriented Perl5 Interface to Network devices and MIBs through
|
|||||||
|
|
||||||
=head1 VERSION
|
=head1 VERSION
|
||||||
|
|
||||||
SNMP::Info - Version 0.9
|
SNMP::Info - Version 0.10
|
||||||
|
|
||||||
=head1 AUTHOR
|
=head1 AUTHOR
|
||||||
|
|
||||||
@@ -534,6 +534,8 @@ Return Math::BigInt objects for 64 bit counters. Sets on a global scope, not ob
|
|||||||
|
|
||||||
Set to C<0> to turn off BULKWALK commands for SNMPv2 connections.
|
Set to C<0> to turn off BULKWALK commands for SNMPv2 connections.
|
||||||
|
|
||||||
|
Note that BULKWALK is turned off for Net-SNMP versions 5.1.x because of a bug.
|
||||||
|
|
||||||
(default on)
|
(default on)
|
||||||
|
|
||||||
=item BulkRepeaters
|
=item BulkRepeaters
|
||||||
@@ -617,6 +619,13 @@ sub new {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# SNMP::Info specific args :
|
# SNMP::Info specific args :
|
||||||
|
if (defined $args{Debug}){
|
||||||
|
$new_obj->debug($args{Debug});
|
||||||
|
delete $args{Debug};
|
||||||
|
} else {
|
||||||
|
$new_obj->debug($DEBUG);
|
||||||
|
}
|
||||||
|
|
||||||
my $auto_specific = 0;
|
my $auto_specific = 0;
|
||||||
if (defined $args{AutoSpecify}){
|
if (defined $args{AutoSpecify}){
|
||||||
$auto_specific = $args{AutoSpecify} || 0;
|
$auto_specific = $args{AutoSpecify} || 0;
|
||||||
@@ -628,17 +637,17 @@ sub new {
|
|||||||
delete $args{BulkRepeaters};
|
delete $args{BulkRepeaters};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined $args{BulkWalk}){
|
# Net-SNMP 5.1.x has a bug in BULKWALK.
|
||||||
|
if ($SNMP::VERSION =~ /^5\.1\.\d/) {
|
||||||
|
$new_obj->{BulkWalk} = 0;
|
||||||
|
print "SNMP::Info::new() BULKWALK disabled because of bug in Net-SNMP 5.1.x. Upgrade Net-SNMP.\n"
|
||||||
|
if $new_obj->debug();
|
||||||
|
delete $args{BulkWalk} if exists $args{BulkWalk};
|
||||||
|
} elsif (defined $args{BulkWalk}){
|
||||||
$new_obj->{BulkWalk} = $args{BulkWalk};
|
$new_obj->{BulkWalk} = $args{BulkWalk};
|
||||||
delete $args{BulkWalk};
|
delete $args{BulkWalk};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined $args{Debug}){
|
|
||||||
$new_obj->debug($args{Debug});
|
|
||||||
delete $args{Debug};
|
|
||||||
} else {
|
|
||||||
$new_obj->debug($DEBUG);
|
|
||||||
}
|
|
||||||
my $sess = undef;
|
my $sess = undef;
|
||||||
if (defined $args{Session}){
|
if (defined $args{Session}){
|
||||||
$sess = $args{Session};
|
$sess = $args{Session};
|
||||||
@@ -2302,7 +2311,8 @@ sub _load_attr {
|
|||||||
|
|
||||||
my $vars = [];
|
my $vars = [];
|
||||||
my $bulkwalk_no = $self->can('bulkwalk_no') ? $self->bulkwalk_no() : 0;
|
my $bulkwalk_no = $self->can('bulkwalk_no') ? $self->bulkwalk_no() : 0;
|
||||||
my $can_bulkwalk = (!$bulkwalk_no || 0) && ($self->{BulkWalk} || 1);
|
my $bulkwalk_on = defined $self->{BulkWalk} ? $self->{BulkWalk} : 1;
|
||||||
|
my $can_bulkwalk = $bulkwalk_on && !$bulkwalk_no;
|
||||||
my $repeaters = $self->{BulkRepeaters} || $REPEATERS;
|
my $repeaters = $self->{BulkRepeaters} || $REPEATERS;
|
||||||
my $bulkwalk = $can_bulkwalk && $ver != 1;
|
my $bulkwalk = $can_bulkwalk && $ver != 1;
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,11 @@ $INIT = 0;
|
|||||||
%MIBS = (
|
%MIBS = (
|
||||||
'RFC1213-MIB' => 'sysDescr',
|
'RFC1213-MIB' => 'sysDescr',
|
||||||
'CISCO-PROCESS-MIB' => 'cpmCPUTotal5sec',
|
'CISCO-PROCESS-MIB' => 'cpmCPUTotal5sec',
|
||||||
'CISCO-MEMORY-POOL-MIB' => 'ciscoMemoryPoolUsed'
|
'CISCO-MEMORY-POOL-MIB' => 'ciscoMemoryPoolUsed',
|
||||||
|
'OLD-CISCO-SYSTEM-MIB' => 'writeMem',
|
||||||
|
'CISCO-PRODUCTS-MIB' => 'sysName',
|
||||||
|
'CISCO-STACK-MIB' => 'wsc1900sysID', # some older catalysts live here
|
||||||
|
'CISCO-ENTITY-VENDORTYPE-OID-MIB' => 'cevChassis',
|
||||||
);
|
);
|
||||||
|
|
||||||
%GLOBALS = (
|
%GLOBALS = (
|
||||||
@@ -68,6 +72,8 @@ $INIT = 0;
|
|||||||
# CISCO-MEMORY-POOL-MIB
|
# CISCO-MEMORY-POOL-MIB
|
||||||
'mem_free' => 'ciscoMemoryPoolFree.1',
|
'mem_free' => 'ciscoMemoryPoolFree.1',
|
||||||
'mem_used' => 'ciscoMemoryPoolUsed.1',
|
'mem_used' => 'ciscoMemoryPoolUsed.1',
|
||||||
|
# OLD-CISCO-SYSTEM-MIB
|
||||||
|
'write_mem' => 'writeMem',
|
||||||
);
|
);
|
||||||
|
|
||||||
%FUNCS = (
|
%FUNCS = (
|
||||||
@@ -177,6 +183,8 @@ none.
|
|||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
|
=item CISCO-PRODUCTS-MIB
|
||||||
|
|
||||||
=item CISCO-PROCESS-MIB
|
=item CISCO-PROCESS-MIB
|
||||||
|
|
||||||
=item CISCO-MEMORY-POOL-MIB
|
=item CISCO-MEMORY-POOL-MIB
|
||||||
|
|||||||
@@ -40,10 +40,12 @@ use SNMP::Info;
|
|||||||
use SNMP::Info::Bridge;
|
use SNMP::Info::Bridge;
|
||||||
use SNMP::Info::CDP;
|
use SNMP::Info::CDP;
|
||||||
use SNMP::Info::CiscoStats;
|
use SNMP::Info::CiscoStats;
|
||||||
|
use SNMP::Info::Entity;
|
||||||
|
|
||||||
use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %PORTSTAT %MUNGE $INIT/;
|
use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %PORTSTAT %MUNGE $INIT/;
|
||||||
|
|
||||||
@SNMP::Info::Layer2::ISA = qw/SNMP::Info SNMP::Info::Bridge SNMP::Info::CDP SNMP::Info::CiscoStats Exporter/;
|
@SNMP::Info::Layer2::ISA = qw/SNMP::Info SNMP::Info::Bridge SNMP::Info::CDP
|
||||||
|
SNMP::Info::Entity SNMP::Info::CiscoStats Exporter/;
|
||||||
@SNMP::Info::Layer2::EXPORT_OK = qw//;
|
@SNMP::Info::Layer2::EXPORT_OK = qw//;
|
||||||
|
|
||||||
$DEBUG=0;
|
$DEBUG=0;
|
||||||
@@ -57,9 +59,7 @@ $INIT = 0;
|
|||||||
%SNMP::Info::Bridge::MIBS,
|
%SNMP::Info::Bridge::MIBS,
|
||||||
%SNMP::Info::CDP::MIBS,
|
%SNMP::Info::CDP::MIBS,
|
||||||
%SNMP::Info::CiscoStats::MIBS,
|
%SNMP::Info::CiscoStats::MIBS,
|
||||||
'CISCO-PRODUCTS-MIB' => 'sysName', # for model()
|
%SNMP::Info::Entity::MIBS,
|
||||||
'CISCO-STACK-MIB' => 'wsc1900sysID', # some older catalysts live here
|
|
||||||
'ENTITY-MIB' => 'entPhysicalName', # for serial stuff
|
|
||||||
);
|
);
|
||||||
|
|
||||||
%GLOBALS = (
|
%GLOBALS = (
|
||||||
@@ -67,6 +67,7 @@ $INIT = 0;
|
|||||||
%SNMP::Info::Bridge::GLOBALS,
|
%SNMP::Info::Bridge::GLOBALS,
|
||||||
%SNMP::Info::CDP::GLOBALS,
|
%SNMP::Info::CDP::GLOBALS,
|
||||||
%SNMP::Info::CiscoStats::GLOBALS,
|
%SNMP::Info::CiscoStats::GLOBALS,
|
||||||
|
%SNMP::Info::Entity::GLOBALS,
|
||||||
'serial1' => '.1.3.6.1.4.1.9.3.6.3.0', # OLD-CISCO-CHASSIS-MIB::chassisId.0
|
'serial1' => '.1.3.6.1.4.1.9.3.6.3.0', # OLD-CISCO-CHASSIS-MIB::chassisId.0
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -75,8 +76,7 @@ $INIT = 0;
|
|||||||
%SNMP::Info::Bridge::FUNCS,
|
%SNMP::Info::Bridge::FUNCS,
|
||||||
%SNMP::Info::CDP::FUNCS,
|
%SNMP::Info::CDP::FUNCS,
|
||||||
%SNMP::Info::CiscoStats::FUNCS,
|
%SNMP::Info::CiscoStats::FUNCS,
|
||||||
'ent_serial' => 'entPhysicalSerialNum',
|
%SNMP::Info::Entity::FUNCS,
|
||||||
'ent_chassis'=> 'entPhysicalDescr',
|
|
||||||
);
|
);
|
||||||
|
|
||||||
%MUNGE = (
|
%MUNGE = (
|
||||||
@@ -85,6 +85,7 @@ $INIT = 0;
|
|||||||
%SNMP::Info::Bridge::MUNGE,
|
%SNMP::Info::Bridge::MUNGE,
|
||||||
%SNMP::Info::CDP::MUNGE,
|
%SNMP::Info::CDP::MUNGE,
|
||||||
%SNMP::Info::CiscoStats::MUNGE,
|
%SNMP::Info::CiscoStats::MUNGE,
|
||||||
|
%SNMP::Info::Entity::MUNGE,
|
||||||
);
|
);
|
||||||
|
|
||||||
# Method OverRides
|
# Method OverRides
|
||||||
@@ -126,11 +127,11 @@ sub serial {
|
|||||||
my $l2 = shift;
|
my $l2 = shift;
|
||||||
|
|
||||||
my $serial1 = $l2->serial1();
|
my $serial1 = $l2->serial1();
|
||||||
my $ent_chassis = $l2->ent_chassis() || {};
|
my $e_descr = $l2->e_descr() || {};
|
||||||
my $ent_serial = $l2->ent_serial() || {};
|
my $e_serial = $l2->e_serial() || {};
|
||||||
|
|
||||||
my $serial2 = $ent_serial->{1} || undef;
|
my $serial2 = $e_serial->{1} || undef;
|
||||||
my $chassis = $ent_chassis->{1} || undef;
|
my $chassis = $e_descr->{1} || undef;
|
||||||
|
|
||||||
# precedence
|
# precedence
|
||||||
# serial2,chassis parse,serial1
|
# serial2,chassis parse,serial1
|
||||||
@@ -247,27 +248,21 @@ a more specific class using the method above.
|
|||||||
|
|
||||||
=item SNMP::Info::CiscoStats
|
=item SNMP::Info::CiscoStats
|
||||||
|
|
||||||
|
=item SNMP::Info::Entity
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
=head2 Required MIBs
|
=head2 Required MIBs
|
||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item CISCO-PRODUCTS-MIB
|
|
||||||
|
|
||||||
Needed for ID of Cisco Products
|
|
||||||
|
|
||||||
=item CISCO-STACK-MIB
|
|
||||||
|
|
||||||
Needed for ID of Cisco Products
|
|
||||||
|
|
||||||
=item Inherited Classes
|
=item Inherited Classes
|
||||||
|
|
||||||
MIBs required by the inherited classes listed above.
|
MIBs required by the inherited classes listed above.
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
MIBs can be found at ftp://ftp.cisco.com/pub/mibs/v2/v2.tar.gz
|
MIBs can be found in netdisco-mibs package.
|
||||||
|
|
||||||
=head1 GLOBALS
|
=head1 GLOBALS
|
||||||
|
|
||||||
@@ -308,6 +303,10 @@ See documentation in SNMP::Info::CDP for details.
|
|||||||
|
|
||||||
See documentation in SNMP::Info::CiscoStats for details.
|
See documentation in SNMP::Info::CiscoStats for details.
|
||||||
|
|
||||||
|
=head2 Globals imported from SNMP::Info::Entity
|
||||||
|
|
||||||
|
See documentation in SNMP::Info::Entity for details.
|
||||||
|
|
||||||
=head1 TABLE METHODS
|
=head1 TABLE METHODS
|
||||||
|
|
||||||
These are methods that return tables of information in the form of a reference
|
These are methods that return tables of information in the form of a reference
|
||||||
@@ -347,4 +346,8 @@ See documentation in SNMP::Info::CDP for details.
|
|||||||
|
|
||||||
See documentation in SNMP::Info::CiscoStats for details.
|
See documentation in SNMP::Info::CiscoStats for details.
|
||||||
|
|
||||||
|
=head2 Table Methods imported from SNMP::Info::Entity
|
||||||
|
|
||||||
|
See documentation in SNMP::Info::Entity for details.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
@@ -37,15 +37,14 @@ use strict;
|
|||||||
|
|
||||||
use Exporter;
|
use Exporter;
|
||||||
use SNMP::Info;
|
use SNMP::Info;
|
||||||
use SNMP::Info::CDP;
|
|
||||||
use SNMP::Info::CiscoStats;
|
|
||||||
use SNMP::Info::Bridge;
|
use SNMP::Info::Bridge;
|
||||||
use SNMP::Info::EtherLike;
|
use SNMP::Info::EtherLike;
|
||||||
|
use SNMP::Info::Entity;
|
||||||
|
|
||||||
use vars qw/$VERSION $DEBUG %GLOBALS %FUNCS $INIT %MIBS %MUNGE/;
|
use vars qw/$VERSION $DEBUG %GLOBALS %FUNCS $INIT %MIBS %MUNGE/;
|
||||||
|
|
||||||
@SNMP::Info::Layer3::ISA = qw/SNMP::Info SNMP::Info::CDP SNMP::Info::Bridge
|
@SNMP::Info::Layer3::ISA = qw/SNMP::Info SNMP::Info::Bridge SNMP::Info::EtherLike
|
||||||
SNMP::Info::EtherLike SNMP::Info::CiscoStats Exporter/;
|
SNMP::Info::Entity Exporter/;
|
||||||
@SNMP::Info::Layer3::EXPORT_OK = qw//;
|
@SNMP::Info::Layer3::EXPORT_OK = qw//;
|
||||||
|
|
||||||
$DEBUG=0;
|
$DEBUG=0;
|
||||||
@@ -55,21 +54,18 @@ $INIT = 0;
|
|||||||
|
|
||||||
%MIBS = ( %SNMP::Info::MIBS,
|
%MIBS = ( %SNMP::Info::MIBS,
|
||||||
%SNMP::Info::Bridge::MIBS,
|
%SNMP::Info::Bridge::MIBS,
|
||||||
%SNMP::Info::CDP::MIBS,
|
|
||||||
%SNMP::Info::CiscoStats::MIBS,
|
|
||||||
%SNMP::Info::EtherLike::MIBS,
|
%SNMP::Info::EtherLike::MIBS,
|
||||||
|
%SNMP::Info::Entity::MIBS,
|
||||||
'ENTITY-MIB' => 'entPhysicalName',
|
'ENTITY-MIB' => 'entPhysicalName',
|
||||||
'CISCO-PRODUCTS-MIB' => 'sysName',
|
|
||||||
'OSPF-MIB' => 'ospfRouterId',
|
'OSPF-MIB' => 'ospfRouterId',
|
||||||
);
|
);
|
||||||
|
|
||||||
%GLOBALS = (
|
%GLOBALS = (
|
||||||
# Inherit the super class ones
|
# Inherit the super class ones
|
||||||
%SNMP::Info::GLOBALS,
|
%SNMP::Info::GLOBALS,
|
||||||
%SNMP::Info::CDP::GLOBALS,
|
|
||||||
%SNMP::Info::CiscoStats::GLOBALS,
|
|
||||||
%SNMP::Info::Bridge::GLOBALS,
|
%SNMP::Info::Bridge::GLOBALS,
|
||||||
%SNMP::Info::EtherLike::GLOBALS,
|
%SNMP::Info::EtherLike::GLOBALS,
|
||||||
|
%SNMP::Info::Entity::GLOBALS,
|
||||||
'mac' => 'ifPhysAddress.1',
|
'mac' => 'ifPhysAddress.1',
|
||||||
'serial1' => '.1.3.6.1.4.1.9.3.6.3.0', # OLD-CISCO-CHASSIS-MIB::chassisId.0
|
'serial1' => '.1.3.6.1.4.1.9.3.6.3.0', # OLD-CISCO-CHASSIS-MIB::chassisId.0
|
||||||
'router_ip' => 'ospfRouterId.0',
|
'router_ip' => 'ospfRouterId.0',
|
||||||
@@ -77,10 +73,9 @@ $INIT = 0;
|
|||||||
|
|
||||||
%FUNCS = (
|
%FUNCS = (
|
||||||
%SNMP::Info::FUNCS,
|
%SNMP::Info::FUNCS,
|
||||||
%SNMP::Info::CDP::FUNCS,
|
|
||||||
%SNMP::Info::CiscoStats::FUNCS,
|
|
||||||
%SNMP::Info::Bridge::FUNCS,
|
%SNMP::Info::Bridge::FUNCS,
|
||||||
%SNMP::Info::EtherLike::FUNCS,
|
%SNMP::Info::EtherLike::FUNCS,
|
||||||
|
%SNMP::Info::Entity::FUNCS,
|
||||||
# IFMIB
|
# IFMIB
|
||||||
'i_name2' => 'ifName',
|
'i_name2' => 'ifName',
|
||||||
# Address Translation Table (ARP Cache)
|
# Address Translation Table (ARP Cache)
|
||||||
@@ -88,17 +83,14 @@ $INIT = 0;
|
|||||||
'at_paddr' => 'atPhysAddress',
|
'at_paddr' => 'atPhysAddress',
|
||||||
'at_netaddr' => 'atNetAddress',
|
'at_netaddr' => 'atNetAddress',
|
||||||
'ospf_ip' => 'ospfHostIpAddress',
|
'ospf_ip' => 'ospfHostIpAddress',
|
||||||
'ent_serial' => 'entPhysicalSerialNum',
|
|
||||||
'ent_chassis'=> 'entPhysicalDescr',
|
|
||||||
);
|
);
|
||||||
|
|
||||||
%MUNGE = (
|
%MUNGE = (
|
||||||
# Inherit all the built in munging
|
# Inherit all the built in munging
|
||||||
%SNMP::Info::MUNGE,
|
%SNMP::Info::MUNGE,
|
||||||
%SNMP::Info::CDP::MUNGE,
|
|
||||||
%SNMP::Info::CiscoStats::MUNGE,
|
|
||||||
%SNMP::Info::Bridge::MUNGE,
|
%SNMP::Info::Bridge::MUNGE,
|
||||||
%SNMP::Info::EtherLike::MUNGE,
|
%SNMP::Info::EtherLike::MUNGE,
|
||||||
|
%SNMP::Info::Entity::MUNGE,
|
||||||
'at_paddr' => \&SNMP::Info::munge_mac,
|
'at_paddr' => \&SNMP::Info::munge_mac,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -133,7 +125,7 @@ sub i_ignore {
|
|||||||
my %i_ignore;
|
my %i_ignore;
|
||||||
foreach my $if (keys %$interfaces) {
|
foreach my $if (keys %$interfaces) {
|
||||||
# lo -> cisco aironet 350 loopback
|
# lo -> cisco aironet 350 loopback
|
||||||
if ($interfaces->{$if} =~ /(tunnel|loopback|lo|null)/i){
|
if ($interfaces->{$if} =~ /(tunnel|loopback|\blo\b|null)/i){
|
||||||
$i_ignore{$if}++;
|
$i_ignore{$if}++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -144,11 +136,11 @@ sub serial {
|
|||||||
my $l3 = shift;
|
my $l3 = shift;
|
||||||
|
|
||||||
my $serial1 = $l3->serial1();
|
my $serial1 = $l3->serial1();
|
||||||
my $ent_chassis = $l3->ent_chassis() || {};
|
my $e_descr = $l3->e_descr() || {};
|
||||||
my $ent_serial = $l3->ent_serial() || {};
|
my $e_serial = $l3->e_serial() || {};
|
||||||
|
|
||||||
my $serial2 = $ent_serial->{1} || undef;
|
my $serial2 = $e_serial->{1} || undef;
|
||||||
my $chassis = $ent_chassis->{1} || undef;
|
my $chassis = $e_descr->{1} || undef;
|
||||||
|
|
||||||
# precedence
|
# precedence
|
||||||
# serial2,chassis parse,serial1
|
# serial2,chassis parse,serial1
|
||||||
@@ -241,7 +233,7 @@ sub vendor {
|
|||||||
|
|
||||||
my $descr = $l3->description();
|
my $descr = $l3->description();
|
||||||
|
|
||||||
return 'cisco' if ($descr =~ /(cisco|ios)/i);
|
return 'cisco' if ($descr =~ /(cisco|\bios\b)/i);
|
||||||
return 'foundry' if ($descr =~ /foundry/i);
|
return 'foundry' if ($descr =~ /foundry/i);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -304,9 +296,7 @@ a more specific class using the method above.
|
|||||||
|
|
||||||
=item SNMP::Info::Bridge
|
=item SNMP::Info::Bridge
|
||||||
|
|
||||||
=item SNMP::Info::CDP
|
For L2/L3 devices.
|
||||||
|
|
||||||
=item SNMP::Info::CiscoStats
|
|
||||||
|
|
||||||
=item SNMP::Info::EtherLike
|
=item SNMP::Info::EtherLike
|
||||||
|
|
||||||
@@ -316,8 +306,6 @@ a more specific class using the method above.
|
|||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item CISCO-PRODUCTS-MIB
|
|
||||||
|
|
||||||
=item ENTITY-MIB
|
=item ENTITY-MIB
|
||||||
|
|
||||||
=item OSPF-MIB
|
=item OSPF-MIB
|
||||||
@@ -328,7 +316,7 @@ MIBs required by the inherited classes listed above.
|
|||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
MIBs can be found at ftp://ftp.cisco.com/pub/mibs/v2/v2.tar.gz
|
MIBs can be found in the netdisco-mibs package.
|
||||||
|
|
||||||
=head1 GLOBALS
|
=head1 GLOBALS
|
||||||
|
|
||||||
@@ -382,18 +370,14 @@ See documentation in SNMP::Info for details.
|
|||||||
|
|
||||||
See documentation in SNMP::Info::Bridge for details.
|
See documentation in SNMP::Info::Bridge 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::EtherLike
|
=head2 Globals imported from SNMP::Info::EtherLike
|
||||||
|
|
||||||
See documentation in SNMP::Info::EtherLike for details.
|
See documentation in SNMP::Info::EtherLike for details.
|
||||||
|
|
||||||
|
=head2 Globals imported from SNMP::Info::Entity
|
||||||
|
|
||||||
|
See documentation in SNMP::Info::Entity for details.
|
||||||
|
|
||||||
=head1 TABLE ENTRIES
|
=head1 TABLE ENTRIES
|
||||||
|
|
||||||
These are methods that return tables of information in the form of a reference
|
These are methods that return tables of information in the form of a reference
|
||||||
@@ -464,16 +448,12 @@ See documentation in SNMP::Info for details.
|
|||||||
|
|
||||||
See documentation in SNMP::Info::Bridge for details.
|
See documentation in SNMP::Info::Bridge 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::EtherLike
|
=head2 Table Methods imported from SNMP::Info::EtherLike
|
||||||
|
|
||||||
See documentation in SNMP::Info::EtherLike for details.
|
See documentation in SNMP::Info::EtherLike for details.
|
||||||
|
|
||||||
|
=head2 Table Methods imported from SNMP::Info::Entity
|
||||||
|
|
||||||
|
See documentation in SNMP::Info::Entity for details.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
@@ -35,9 +35,13 @@ use strict;
|
|||||||
use Exporter;
|
use Exporter;
|
||||||
use SNMP::Info::Layer3;
|
use SNMP::Info::Layer3;
|
||||||
use SNMP::Info::CiscoVTP;
|
use SNMP::Info::CiscoVTP;
|
||||||
|
use SNMP::Info::CDP;
|
||||||
|
use SNMP::Info::CiscoStats;
|
||||||
|
|
||||||
use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %MUNGE $INIT/ ;
|
use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %MUNGE $INIT/ ;
|
||||||
@SNMP::Info::Layer3::Cisco::ISA = qw/SNMP::Info::Layer3 SNMP::Info::CiscoVTP Exporter/;
|
@SNMP::Info::Layer3::Cisco::ISA = qw/SNMP::Info::Layer3 SNMP::Info::CiscoVTP
|
||||||
|
SNMP::Info::CDP SNMP::Info::CiscoStats
|
||||||
|
Exporter/;
|
||||||
@SNMP::Info::Layer3::Cisco::EXPORT_OK = qw//;
|
@SNMP::Info::Layer3::Cisco::EXPORT_OK = qw//;
|
||||||
|
|
||||||
$DEBUG=0;
|
$DEBUG=0;
|
||||||
@@ -49,31 +53,38 @@ $INIT = 0;
|
|||||||
%MIBS = (
|
%MIBS = (
|
||||||
%SNMP::Info::Layer3::MIBS,
|
%SNMP::Info::Layer3::MIBS,
|
||||||
%SNMP::Info::CiscoVTP::MIBS,
|
%SNMP::Info::CiscoVTP::MIBS,
|
||||||
|
%SNMP::Info::CDP::MIBS,
|
||||||
|
%SNMP::Info::CiscoStats::MIBS,
|
||||||
);
|
);
|
||||||
|
|
||||||
%GLOBALS = (
|
%GLOBALS = (
|
||||||
%SNMP::Info::Layer3::GLOBALS,
|
%SNMP::Info::Layer3::GLOBALS,
|
||||||
%SNMP::Info::CiscoVTP::GLOBALS,
|
%SNMP::Info::CiscoVTP::GLOBALS,
|
||||||
|
%SNMP::Info::CDP::GLOBALS,
|
||||||
|
%SNMP::Info::CiscoStats::GLOBALS,
|
||||||
);
|
);
|
||||||
|
|
||||||
%FUNCS = (
|
%FUNCS = (
|
||||||
%SNMP::Info::Layer3::FUNCS,
|
%SNMP::Info::Layer3::FUNCS,
|
||||||
%SNMP::Info::CiscoVTP::FUNCS,
|
%SNMP::Info::CiscoVTP::FUNCS,
|
||||||
|
%SNMP::Info::CDP::FUNCS,
|
||||||
|
%SNMP::Info::CiscoStats::FUNCS,
|
||||||
);
|
);
|
||||||
|
|
||||||
%MUNGE = (
|
%MUNGE = (
|
||||||
# Inherit all the built in munging
|
|
||||||
%SNMP::Info::Layer3::MUNGE,
|
%SNMP::Info::Layer3::MUNGE,
|
||||||
%SNMP::Info::CiscoVTP::MUNGE,
|
%SNMP::Info::CiscoVTP::MUNGE,
|
||||||
|
%SNMP::Info::CDP::MUNGE,
|
||||||
|
%SNMP::Info::CiscoStats::MUNGE,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
1;
|
1;
|
||||||
__END__
|
__END__
|
||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
||||||
SNMP::Info::Layer3::Cisco - Perl5 Interface to Generic L3 Cisco Device
|
SNMP::Info::Layer3::Cisco - Perl5 Interface to L3 and L2+L3 IOS Cisco Device
|
||||||
|
that are not covered in other classes.
|
||||||
|
|
||||||
=head1 AUTHOR
|
=head1 AUTHOR
|
||||||
|
|
||||||
@@ -107,6 +118,10 @@ Subclass for Generic Cisco Routers running IOS
|
|||||||
|
|
||||||
=item SNMP::Info::CiscoVTP
|
=item SNMP::Info::CiscoVTP
|
||||||
|
|
||||||
|
=item SNMP::Info::CDP
|
||||||
|
|
||||||
|
=item SNMP::Info::CiscoStats
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
=head2 Required MIBs
|
=head2 Required MIBs
|
||||||
@@ -141,6 +156,13 @@ See documentation in SNMP::Info::Layer3 for details.
|
|||||||
|
|
||||||
See documentation in SNMP::Info::CiscoVTP for details.
|
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.
|
||||||
|
|
||||||
=head1 TABLE ENTRIES
|
=head1 TABLE ENTRIES
|
||||||
|
|
||||||
@@ -155,4 +177,12 @@ See documentation in SNMP::Info::Layer3 for details.
|
|||||||
|
|
||||||
See documentation in SNMP::Info::CiscoVTP for details.
|
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.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
Reference in New Issue
Block a user