diff --git a/Info/Layer2/C2900.pm b/Info/Layer2/C2900.pm index 70d2a287..3def4b73 100644 --- a/Info/Layer2/C2900.pm +++ b/Info/Layer2/C2900.pm @@ -34,36 +34,35 @@ use strict; use Exporter; use SNMP::Info::Layer2; +use SNMP::Info::CiscoVTP; -@SNMP::Info::Layer2::C2900::ISA = qw/SNMP::Info::Layer2 Exporter/; +@SNMP::Info::Layer2::C2900::ISA = qw/SNMP::Info::Layer2 SNMP::Info::CiscoVTP Exporter/; @SNMP::Info::Layer2::C2900::EXPORT_OK = qw//; use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/; # Set for No CDP %GLOBALS = ( - %SNMP::Info::Layer2::GLOBALS + %SNMP::Info::Layer2::GLOBALS, + %SNMP::Info::CiscoVTP::GLOBALS, ); %FUNCS = (%SNMP::Info::Layer2::FUNCS, + %SNMP::Info::CiscoVTP::FUNCS, # C2900PortEntry 'c2900_p_index' => 'c2900PortIfIndex', 'c2900_p_duplex' => 'c2900PortDuplexStatus', 'c2900_p_duplex_admin' => 'c2900PortDuplexState', 'c2900_p_speed_admin' => 'c2900PortAdminSpeed', - # CISCO-VTP-MIB::VtpVlanEntry - 'v_state' => 'vtpVlanState', - 'v_type' => 'vtpVlanType', - 'v_name' => 'vtpVlanName', - 'v_mtu' => 'vtpVlanMtu', ); %MIBS = ( %SNMP::Info::Layer2::MIBS, + %SNMP::Info::CiscoVTP::MIBS, 'CISCO-C2900-MIB' => 'ciscoC2900MIB', - 'CISCO-VTP-MIB' => 'vtpVlanIndex', ); %MUNGE = (%SNMP::Info::Layer2::MUNGE, + %SNMP::Info::CiscoVTP::MUNGE, ); sub vendor { @@ -182,6 +181,8 @@ a more specific class using the method above. =item SNMP::Info::Layer2 +=item SNMP::Info::CiscoVTP + =back =head2 Required MIBs @@ -192,6 +193,12 @@ a more specific class using the method above. Part of the v2 MIBs from Cisco. +=item Inherited Classes' MIBs + +See SNMP::Info::Layer2 for its own MIB requirements. + +See SNMP::Info::CiscoVTP for its own MIB requirements. + =back =head1 GLOBALS @@ -212,6 +219,10 @@ These are methods that return scalar value from SNMP See documentation in SNMP::Info::Layer2 for details. +=head2 Global Methods imported from SNMP::Info::CiscoVTP + +See documentation in SNMP::Info::CiscoVTP for details. + =head1 TABLE ENTRIES These are methods that return tables of information in the form of a reference @@ -279,33 +290,12 @@ to a hash. =back -=head2 VLAN Entry Table - -See ftp://ftp.cisco.com/pub/mibs/supportlists/wsc5000/wsc5000-communityIndexing.html -for a good treaty of how to connect to the VLANs - -=over - -=item $c2900->v_state() - -(B) - -=item $c2900->v_type() - -(B) - -=item $c2900->v_name() - -(B) - -=item $c2900->v_mtu() - -(B) - -=back - =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. + =cut diff --git a/Info/Layer2/Catalyst.pm b/Info/Layer2/Catalyst.pm index 65297969..c118e806 100644 --- a/Info/Layer2/Catalyst.pm +++ b/Info/Layer2/Catalyst.pm @@ -28,16 +28,17 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. package SNMP::Info::Layer2::Catalyst; -$VERSION = 0.6; +$VERSION = 0.7; # $Id$ use strict; use Exporter; use SNMP::Info::Layer2; +use SNMP::Info::CiscoVTP; use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %PORTSTAT %MUNGE $INIT/ ; -@SNMP::Info::Layer2::Catalyst::ISA = qw/SNMP::Info::Layer2 Exporter/; +@SNMP::Info::Layer2::Catalyst::ISA = qw/SNMP::Info::Layer2 SNMP::Info::CiscoVTP Exporter/; @SNMP::Info::Layer2::Catalyst::EXPORT_OK = qw//; $DEBUG=0; @@ -47,12 +48,13 @@ $DEBUG=0; $INIT = 0; %MIBS = ( %SNMP::Info::Layer2::MIBS, + %SNMP::Info::CiscoVTP::MIBS, 'CISCO-STACK-MIB' => 'moduleType', - 'CISCO-VTP-MIB' => 'vtpVlanIndex' ); %GLOBALS = ( %SNMP::Info::Layer2::GLOBALS, + %SNMP::Info::CiscoVTP::GLOBALS, # these are in CISCO-STACK-MIB 'sysip' => 'sysIpAddr', 'netmask' => 'sysNetMask', @@ -69,6 +71,7 @@ $INIT = 0; %FUNCS = ( %SNMP::Info::Layer2::FUNCS, + %SNMP::Info::CiscoVTP::FUNCS, 'i_type2' => 'ifType', # CISCO-STACK-MIB::moduleEntry # These are blades in a catalyst device @@ -97,15 +100,11 @@ $INIT = 0; # CISCO-STACK-MIB::PortCpbEntry 'p_speed_admin' => 'portCpbSpeed', 'p_duplex_admin' => 'portCpbDuplex', - # CISCO-VTP-MIB::VtpVlanEntry - 'v_state' => 'vtpVlanState', - 'v_type' => 'vtpVlanType', - 'v_name' => 'vtpVlanName', - 'v_mtu' => 'vtpVlanMtu', ); %MUNGE = ( %SNMP::Info::Layer2::MUNGE, + %SNMP::Info::CiscoVTP::MUNGE, 'm_ports_status' => \&munge_port_status, 'p_duplex_admin' => \&SNMP::Info::munge_bits, ); @@ -302,6 +301,8 @@ a more specific class using the method above. =item SNMP::Info::Layer2 +=item SNMP::Info::CiscoVTP + =back =head2 Required MIBs @@ -310,12 +311,12 @@ a more specific class using the method above. =item CISCO-STACK-MIB -=item CISCO-VTP-MIB - =item Inherited Classes' MIBs See SNMP::Info::Layer2 for its own MIB requirements. +See SNMP::Info::CiscoVTP for its own MIB requirements. + =back These MIBs are found in the standard v2 MIBs from Cisco. @@ -385,6 +386,10 @@ Returns 'cisco' See documentation in SNMP::Info::Layer2 for details. +=head2 Global Methods imported from SNMP::Info::CiscoVTP + +See documentation in SNMP::Info::CiscoVTP for details. + =head1 TABLE ENTRIES These are methods that return tables of information in the form of a reference @@ -558,30 +563,9 @@ To see the status of port 4 : =back -=head2 VLAN Entry Table +=head2 Table Methods imported from SNMP::Info::CiscoVTP -See ftp://ftp.cisco.com/pub/mibs/supportlists/wsc5000/wsc5000-communityIndexing.html -for a good treaty of how to connect to the VLANs - -=over - -=item $cat->v_state() - -(B) - -=item $cat->v_type() - -(B) - -=item $cat->v_name() - -(B) - -=item $cat->v_mtu() - -(B) - -=back +See documentation in SNMP::Info::CiscoVTP for details. =head2 Table Methods imported from SNMP::Info::Layer2 diff --git a/Info/Layer3/C3550.pm b/Info/Layer3/C3550.pm index f85ebb58..b434c1b9 100644 --- a/Info/Layer3/C3550.pm +++ b/Info/Layer3/C3550.pm @@ -28,16 +28,17 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. package SNMP::Info::Layer3::C3550; -$VERSION = 0.6; +$VERSION = 0.7; # $Id$ use strict; use Exporter; use SNMP::Info::Layer3; +use SNMP::Info::CiscoVTP; use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %PORTSTAT %MUNGE $INIT/ ; -@SNMP::Info::Layer3::C3550::ISA = qw/SNMP::Info::Layer3 Exporter/; +@SNMP::Info::Layer3::C3550::ISA = qw/SNMP::Info::Layer3 SNMP::Info::CiscoVTP Exporter/; @SNMP::Info::Layer3::C3550::EXPORT_OK = qw//; $DEBUG=0; @@ -48,12 +49,13 @@ $INIT = 0; %MIBS = ( %SNMP::Info::Layer3::MIBS, + %SNMP::Info::CiscoVTP::MIBS, 'CISCO-STACK-MIB' => 'moduleType', - 'CISCO-VTP-MIB' => 'vtpVlanIndex' ); %GLOBALS = ( %SNMP::Info::Layer3::GLOBALS, + %SNMP::Info::CiscoVTP::GLOBALS, 'ports2' => 'ifNumber', # these are in CISCO-STACK-MIB 'serial' => 'chassisSerialNumberString', @@ -66,6 +68,7 @@ $INIT = 0; %FUNCS = ( %SNMP::Info::Layer3::FUNCS, + %SNMP::Info::CiscoVTP::FUNCS, 'i_type2' => 'ifType', # CISCO-STACK-MIB::portEntry 'p_name' => 'portName', @@ -78,15 +81,11 @@ $INIT = 0; # CISCO-STACK-MIB::PortCpbEntry 'p_speed_admin' => 'portCpbSpeed', 'p_duplex_admin' => 'portCpbDuplex', - # CISCO-VTP-MIB::VtpVlanEntry - 'v_state' => 'vtpVlanState', - 'v_type' => 'vtpVlanType', - 'v_name' => 'vtpVlanName', - 'v_mtu' => 'vtpVlanMtu', ); %MUNGE = ( # Inherit all the built in munging + %SNMP::Info::CiscoVTP::MUNGE, %SNMP::Info::Layer3::MUNGE, 'm_ports_status' => \&munge_port_status, 'p_duplex_admin' => \&SNMP::Info::munge_bits, @@ -248,7 +247,11 @@ a more specific class using the method above. =item CISCO-STACK-MIB -=item CISCO-VTP-MIB +=item Inherited Classes' MIBs + +See SNMP::Info::Layer3 for its own MIB requirements. + +See SNMP::Info::CiscoVTP for its own MIB requirements. =back @@ -292,6 +295,10 @@ These are methods that return scalar value from SNMP See documentation in SNMP::Info::Layer3 for details. +=head2 Global Methods imported from SNMP::Info::CiscoVTP + +See documentation in SNMP::Info::CiscoVTP for details. + =head1 TABLE ENTRIES These are methods that return tables of information in the form of a reference @@ -371,33 +378,12 @@ Munges bit_string returned from p_duplex_admin to get duplex settings. =back -=head2 VLAN Entry Table - -See ftp://ftp.cisco.com/pub/mibs/supportlists/wsc5000/wsc5000-communityIndexing.html -for a good treaty of how to connect to the VLANs - -=over - -=item $c3550->v_state() - -(B) - -=item $c3550->v_type() - -(B) - -=item $c3550->v_name() - -(B) - -=item $c3550->v_mtu() - -(B) - -=back - =head2 Table Methods imported from SNMP::Info::Layer3 See documentation in SNMP::Info::Layer3 for details. +=head2 Table Methods imported from SNMP::Info::CiscoVTP + +See documentation in SNMP::Info::CiscoVTP for details. + =cut