From d78e5d665637e662d3027b046ca6473f32ee68e2 Mon Sep 17 00:00:00 2001 From: Max Baker <> Date: Tue, 2 Mar 2004 05:46:14 +0000 Subject: [PATCH] added cisco_comm_indexing() method for clarification/customization purposed. --- ChangeLog | 5 ++++- Info.pm | 15 ++++++++++++++- Info/Layer2/C1900.pm | 4 ++++ Info/Layer2/C2900.pm | 8 ++++++++ Info/Layer2/Catalyst.pm | 4 ++++ Info/Layer3/C3550.pm | 4 ++++ Info/Layer3/C6500.pm | 5 +++++ 7 files changed, 43 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6ca33c00..9e710c96 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,15 @@ -SNMP::Info - Perl5 OO Interface to Network Devices and SNMP MIBs +SNMP::Info - Friendly OO-style interface to Network devices using SNMP. ChangeLog $Id$ version 0.8 () + + Added Q-BRIDGE-MIB support to SNMP::Info::Bridge + Added Aironet AP4800 to Layer3::Aironet class + Added C3500XL devices to the Layer2::C2900 class + Added Cisco 3750 (37xxstack) to Layer3::C6500 class + Added Cisco Catalyst 4000 to Layer3::C6500 class + Added Cisco Catalyst 2970 to Layer3::C6500 Class + * Made Cisco Commuinty string indexing a boolean method for clarification + * Added VLAN info for HP devices using Q-BRIDGE-MIB * Fixed warning about uninitialized value in CiscoStats line 92 * Added for more serial# checking for L2 and L3 * Fixed warning in Layer2::Bay about non numeric port line 199 diff --git a/Info.pm b/Info.pm index db09d531..fe9195e0 100644 --- a/Info.pm +++ b/Info.pm @@ -771,7 +771,6 @@ Usually this method is called internally from new(AutoSpecify => 1) See device_type() entry for how a subclass is chosen. -=back =cut sub specify { @@ -805,6 +804,20 @@ sub specify { return $sub_obj; } +=item $info->cisco_comm_indexing() + +Returns 0. Is an overridable method used for vlan indexing for +snmp calls on certain Cisco devices. + +See L + +=cut +sub cisco_comm_indexing{ + 0; +} + +=back + =head2 Globals (Scalar Methods) These are methods to return scalar data from RFC1213. diff --git a/Info/Layer2/C1900.pm b/Info/Layer2/C1900.pm index 43bce809..786a0570 100644 --- a/Info/Layer2/C1900.pm +++ b/Info/Layer2/C1900.pm @@ -99,6 +99,10 @@ sub os_ver { return undef; } +sub cisco_comm_indexing { + 1; +} + sub interfaces { my $c1900 = shift; my $i_descr = $c1900->i_description(); diff --git a/Info/Layer2/C2900.pm b/Info/Layer2/C2900.pm index e1d41c78..d8c2f19e 100644 --- a/Info/Layer2/C2900.pm +++ b/Info/Layer2/C2900.pm @@ -72,6 +72,14 @@ sub vendor { return 'cisco'; } +sub os { + return 'catalyst'; +} + +sub cisco_comm_indexing { + 1; +} + sub i_duplex { my $c2900 = shift; diff --git a/Info/Layer2/Catalyst.pm b/Info/Layer2/Catalyst.pm index cc1bcdf2..13d1abe8 100644 --- a/Info/Layer2/Catalyst.pm +++ b/Info/Layer2/Catalyst.pm @@ -110,6 +110,10 @@ sub os_ver { return undef; } +sub cisco_comm_indexing { + 1; +} + 1; __END__ diff --git a/Info/Layer3/C3550.pm b/Info/Layer3/C3550.pm index c547e97b..1a846755 100644 --- a/Info/Layer3/C3550.pm +++ b/Info/Layer3/C3550.pm @@ -115,6 +115,10 @@ sub ports { return $ports2; } +sub cisco_comm_indexing { + 1; +} + 1; __END__ diff --git a/Info/Layer3/C6500.pm b/Info/Layer3/C6500.pm index 8de5a8c9..dce22fbe 100644 --- a/Info/Layer3/C6500.pm +++ b/Info/Layer3/C6500.pm @@ -93,6 +93,11 @@ sub vendor { return 'cisco'; } +sub cisco_comm_indexing { + 1; +} + + 1; __END__