documentation overhaul (#353)

* ident
* remove $Id$ tags from rcs software which has been retired
* make an effort to sync required mib docs with actual code
* sync even more docs with what code actually does
* some whitespace nits
* fixup example to use snmpv2 for all but the most ancient devices
* remove blurb to find more specific snmp::info classes for classes
  which alrdy are as specific as they can get (eg snmp::info::layer3::vmware
  doesn't need info on to find a specific module since there ain't none)
* rename all sub {vendor} strings to lowercase vendor, if cisco, juniper
  and arista can be lowercase, so can be all the rest.
* fix tests
* spread some use warnings around
* use $ instead of @
* remove defines that are included via parent classes
* use strict + warnings
* remove alrdy included modules
* add comma after last list item
* typos
* mibs are found in our mib repo, not on the cisco site
* documentation fixes
This commit is contained in:
nick n
2019-08-25 06:47:10 +02:00
committed by GitHub
parent 6c8d39d746
commit 3bcc522590
149 changed files with 630 additions and 1168 deletions

View File

@@ -29,12 +29,12 @@
package SNMP::Info::Layer2::3Com;
use strict;
use warnings;
use Exporter;
use SNMP::Info::Layer2;
use SNMP::Info::LLDP;
use SNMP::Info::CDP;
@SNMP::Info::Layer2::3Com::ISA = qw/SNMP::Info::LLDP SNMP::Info::Layer2 Exporter/;
@SNMP::Info::Layer2::3Com::ISA = qw/SNMP::Info::Layer2 Exporter/;
@SNMP::Info::Layer2::3Com::EXPORT_OK = qw//;
our ($VERSION, %FUNCS, %GLOBALS, %MIBS, %MUNGE, $AUTOLOAD);
@@ -42,27 +42,22 @@ our ($VERSION, %FUNCS, %GLOBALS, %MIBS, %MUNGE, $AUTOLOAD);
$VERSION = '3.68';
%MIBS = (
%SNMP::Info::LLDP::MIBS,
%SNMP::Info::Layer2::MIBS,
'A3Com-products-MIB' => 'wlanAP7760',
);
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS,
%SNMP::Info::LLDP::GLOBALS,
);
%FUNCS = (
%SNMP::Info::Layer2::FUNCS,
%SNMP::Info::LLDP::FUNCS,
);
%MUNGE = (
%SNMP::Info::Layer2::MUNGE,
%SNMP::Info::LLDP::MUNGE,
);
sub os {
return '3Com';
}
@@ -94,17 +89,19 @@ sub os_ver {
}
sub vendor {
return '3Com';
return '3com';
}
sub model {
my $dsmodel = shift;
my $descr = $dsmodel->description();
if ( $descr =~ /^([\S ]+) Software.*/){
if (defined ($descr)) {
if ($descr =~ /^([\S ]+) Software.*/) {
return $1;
} else {
} else {
return $descr;
}
}
return;
}
@@ -128,7 +125,7 @@ Max Kosmach
Debug => 1,
DestHost => 'myrouter',
Community => 'public',
Version => 1
Version => 2
)
or die "Can't connect to DestHost.\n";
@@ -169,7 +166,7 @@ These are methods that return scalar value from SNMP
=item $device->vendor()
Returns '3Com'
Returns '3com'
=item $device->os()

View File

@@ -29,12 +29,12 @@
package SNMP::Info::Layer2::Adtran;
use strict;
use warnings;
use Exporter;
use SNMP::Info::LLDP;
use SNMP::Info::Layer2;
use SNMP::Info::Layer3;
@SNMP::Info::Layer2::Adtran::ISA = qw/SNMP::Info::LLDP SNMP::Info::Layer2 Exporter/;
@SNMP::Info::Layer2::Adtran::ISA = qw/SNMP::Info::Layer2 Exporter/;
@SNMP::Info::Layer2::Adtran::EXPORT_OK = qw//;
our ($VERSION, %GLOBALS, %MIBS, %FUNCS, %MUNGE);
@@ -58,14 +58,12 @@ our $index = undef;
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS,
%SNMP::Info::Layer3::GLOBALS,
%SNMP::Info::LLDP::GLOBALS,
'serial' => 'adProdSerialNumber',
'ad_mgmtevcvid' => 'adGenEVCSysMgmtEVCSTagVID',
);
%FUNCS = ( %SNMP::Info::Layer2::FUNCS,
%SNMP::Info::Layer3::FUNCS,
%SNMP::Info::LLDP::FUNCS,
'ad_evcstag' => 'adGenEVCLookupName',
'ad_menport' => 'adGenMenPortRowStatus',
'ad_evcnamevid' => 'adGenEVCSTagVID',
@@ -75,7 +73,7 @@ our $index = undef;
'ad_genportcustuse' => 'adGenPortCustomerUse',
);
%MUNGE = ( %SNMP::Info::Layer2::MUNGE, %SNMP::Info::LLDP::MUNGE, %SNMP::Info::Layer3::MUNGE );
%MUNGE = ( %SNMP::Info::Layer2::MUNGE, %SNMP::Info::Layer3::MUNGE );
sub vendor {
return 'adtran';
@@ -130,8 +128,8 @@ sub i_name {
my $adname = $adtran->ad_genportcustuse() || undef;
if (defined $adname) {
foreach my $port (keys %$adname) {
my @split = split(/\./,$port);
$i_name->{@split[1]} = $adname->{$port};
my @splitout = split(/\./,$port);
$i_name->{$splitout[1]} = $adname->{$port};
}
}
return $i_name;
@@ -170,9 +168,9 @@ sub i_vlan_membership {
}
my $if_vlans = {};
foreach my $entry (keys %$i_vlan) {
my @split = split(/(\.0)+\./,$entry);
my $name = pack("C*", split(/\./,@split[0]));
push @{$if_vlans->{@split[2]}}, $vlans->{$name};
my @splitout = split(/(\.0)+\./,$entry);
my $name = pack("C*", split(/\./,$splitout[0]));
push @{$if_vlans->{$splitout[2]}}, $vlans->{$name};
}
my $mgmtevcports = $adtran->ad_mgmtevcports();
my $mgmtevcid = $adtran->ad_mgmtevcvid();
@@ -223,17 +221,17 @@ Subclass for adtran Devices running JUNOS
=over
=item SNMP::Info::Layer3
=item SNMP::Info::Layer2
=item SNMP::Info::LLDP
=item SNMP::Info::Layer3
=back
=head2 Inherited Classes' MIBs
See L<SNMP::Info::Layer3/"Required MIBs"> for its own MIB requirements.
See L<SNMP::Info::Layer2/"Required MIBs"> for its own MIB requirements.
See L<SNMP::Info::LLDP/"Required MIBs"> for its own MIB requirements.
See L<SNMP::Info::Layer3/"Required MIBs"> for its own MIB requirements.
=head1 GLOBALS
@@ -273,10 +271,6 @@ Returns serial number.
See documentation in L<SNMP::Info::Layer3/"GLOBALS"> for details.
=head2 Global Methods imported from SNMP::Info::LLDP
See documentation in L<SNMP::Info::LLDP/"GLOBALS"> for details.
=head1 TABLE METHODS
These are methods that return tables of information in the form of a reference
@@ -303,12 +297,12 @@ IDs. These are the VLANs which are members of the egress list for the port.
=back
=head2 Table Methods imported from SNMP::Info::Layer2
See documentation in L<SNMP::Info::Layer2/"TABLE METHODS"> for details.
=head2 Table Methods imported from SNMP::Info::Layer3
See documentation in L<SNMP::Info::Layer3/"TABLE METHODS"> for details.
=head2 Table Methods imported from SNMP::Info::LLDP
See documentation in L<SNMP::Info::LLDP/"TABLE METHODS"> for details.
=cut

View File

@@ -30,6 +30,7 @@
package SNMP::Info::Layer2::Aerohive;
use strict;
use warnings;
use Exporter;
use SNMP::Info::Layer2;
@@ -107,13 +108,12 @@ sub os_ver {
my $aerohive = shift;
my $descr = $aerohive->description();
if ( $descr =~ m/\bHiveOS\s(\d\.\w+)\b/ix ) {
if ( defined ($descr) && $descr =~ m/\bHiveOS\s(\d\.\w+)\b/ix ) {
return $1;
}
return;
}
sub mac {
my $aerohive = shift;
my $ahmac = $aerohive->ah_mac();
@@ -137,12 +137,11 @@ sub mac {
return $macs[0];
}
sub model {
my $aerohive = shift;
my $descr = $aerohive->description();
if ( $descr =~ m/\b(?:Hive|)(AP\d+)\b/ix ) {
if ( defined ($descr) && $descr =~ m/\b(?:Hive|)(AP\d+)\b/ix ) {
return $1;
}
return;
@@ -345,11 +344,6 @@ Eric Miller
Provides abstraction to the configuration information obtainable from an
Aerohive wireless Access Point through SNMP.
For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above.
my $aerohive = new SNMP::Info::Layer2::Aerohive(...);
=head2 Inherited Classes
=over

View File

@@ -29,8 +29,8 @@
package SNMP::Info::Layer2::Airespace;
use strict;
use warnings;
use Exporter;
use SNMP::Info::Bridge;
use SNMP::Info::CDP;
use SNMP::Info::Airespace;
@@ -272,11 +272,6 @@ Eric Miller
Provides abstraction to the configuration information obtainable from
Cisco (Airespace) Wireless Controllers through SNMP.
For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above.
my $airespace = new SNMP::Info::Layer2::Airespace(...);
=head2 Inherited Classes
=over

View File

@@ -1,5 +1,4 @@
# SNMP::Info::Layer2::Aironet
# $Id$
#
# Copyright (c) 2008-2009 Max Baker changes from version 0.8 and beyond.
#
@@ -33,9 +32,9 @@
package SNMP::Info::Layer2::Aironet;
use strict;
use warnings;
use Exporter;
use SNMP::Info::Layer2;
use SNMP::Info::Entity;
use SNMP::Info::EtherLike;
use SNMP::Info::CiscoStats;
use SNMP::Info::CiscoConfig;
@@ -43,7 +42,7 @@ use SNMP::Info::CDP;
use SNMP::Info::IEEE802dot11;
@SNMP::Info::Layer2::Aironet::ISA
= qw/SNMP::Info::Layer2 SNMP::Info::Entity SNMP::Info::EtherLike
= qw/SNMP::Info::Layer2 SNMP::Info::EtherLike
SNMP::Info::CiscoStats SNMP::Info::CiscoConfig SNMP::Info::CDP Exporter/;
@SNMP::Info::Layer2::Aironet::EXPORT_OK = qw//;
@@ -54,19 +53,17 @@ $VERSION = '3.68';
%GLOBALS = (
%SNMP::Info::IEEE802dot11::GLOBALS,
%SNMP::Info::Layer2::GLOBALS,
%SNMP::Info::Entity::GLOBALS,
%SNMP::Info::EtherLike::GLOBALS,
%SNMP::Info::CiscoStats::GLOBALS,
%SNMP::Info::CiscoConfig::GLOBALS,
%SNMP::Info::CDP::GLOBALS,
'serial' => 'entPhysicalSerialNum.1',
'ps1_type' => 'cpoePdCurrentPowerSource'
'ps1_type' => 'cpoePdCurrentPowerSource',
);
%FUNCS = (
%SNMP::Info::IEEE802dot11::FUNCS,
%SNMP::Info::Layer2::FUNCS,
%SNMP::Info::Entity::FUNCS,
%SNMP::Info::EtherLike::FUNCS,
%SNMP::Info::CiscoStats::FUNCS,
%SNMP::Info::CiscoConfig::FUNCS,
@@ -88,7 +85,6 @@ $VERSION = '3.68';
%MIBS = (
%SNMP::Info::IEEE802dot11::MIBS,
%SNMP::Info::Layer2::MIBS,
%SNMP::Info::Entity::MIBS,
%SNMP::Info::EtherLike::MIBS,
%SNMP::Info::CiscoStats::MIBS,
%SNMP::Info::CiscoConfig::MIBS,
@@ -103,7 +99,6 @@ $VERSION = '3.68';
%MUNGE = (
%SNMP::Info::IEEE802dot11::MUNGE,
%SNMP::Info::Layer2::MUNGE,
%SNMP::Info::Entity::MUNGE,
%SNMP::Info::EtherLike::MUNGE,
%SNMP::Info::CiscoStats::MUNGE,
%SNMP::Info::CiscoConfig::MUNGE,
@@ -118,7 +113,6 @@ $VERSION = '3.68';
= \&SNMP::Info::IEEE802dot11::dot11_cur_tx_pwr_mw;
sub vendor {
# Sorry, but it's true.
return 'cisco';
}
@@ -138,8 +132,13 @@ sub description {
my $descr = $aironet->SUPER::description();
my $e_descr = $aironet->e_descr();
$descr = "$e_descr->{1} $descr" if defined $e_descr->{1};
if (defined $e_descr->{1}) {
if (defined $descr) {
$descr = "$e_descr->{1} $descr"
} else {
$descr = "$e_descr->{1}"
}
}
return $descr;
}
@@ -527,8 +526,6 @@ my $aironet = new SNMP::Info::Layer2::Aironet(...);
=item SNMP::Info::Layer2
=item SNMP::Info::Entity
=item SNMP::Info::EtherLike
=item SNMP::Info::CiscoStats
@@ -541,6 +538,16 @@ my $aironet = new SNMP::Info::Layer2::Aironet(...);
=over
=item F<CISCO-DOT11-ASSOCIATION-MIB>
=item F<CISCO-DOT11-IF-MIB>
=item F<CISCO-DOT11-SSID-SECURITY-MIB>
=item F<CISCO-POE-PD-MIB>
=item F<CISCO-VLAN-IFTABLE-RELATIONSHIP-MIB>
=item Inherited Classes
MIBs required by the inherited classes listed above.
@@ -567,10 +574,6 @@ System description. Adds info from method e_descr() from SNMP::Info::Entity
See documentation in L<SNMP::Info::Layer2/"GLOBALS"> for details.
=head2 Globals imported from SNMP::Info::Entity
See documentation in L<SNMP::Info::Entity/"GLOBALS"> for details.
=head2 Globals imported from SNMP::Info::EtherLike
See documentation in L<SNMP::Info::EtherLike/"GLOBALS"> for details.
@@ -668,10 +671,6 @@ C<cpoePdSupportedPowerMode>.
See documentation in L<SNMP::Info::Layer2/"TABLE METHODS"> for details.
=head2 Table Methods imported from SNMP::Info::Entity
See documentation in L<SNMP::Info::Entity/"TABLE METHODS"> for details.
=head2 Table Methods imported from SNMP::Info::EtherLike
See documentation in L<SNMP::Info::EtherLike/"TABLE METHODS"> for details.

View File

@@ -1,5 +1,4 @@
# SNMP::Info::Layer2::Allied
# $Id$
#
# Copyright (c) 2008 Max Baker
# All rights reserved.
@@ -31,6 +30,7 @@
package SNMP::Info::Layer2::Allied;
use strict;
use warnings;
use Exporter;
use SNMP::Info::Layer2;
use SNMP::Info::Layer1;
@@ -70,7 +70,7 @@ sub os_ver {
my $allied = shift;
my $descr = $allied->description();
if ( $descr =~ m/version (\d+\.\d+)/ ) {
if ( defined ($descr) && $descr =~ m/version (\d+\.\d+)/ ) {
return $1;
}
return;
@@ -78,10 +78,9 @@ sub os_ver {
sub model {
my $allied = shift;
my $desc = $allied->description();
if ( $desc =~ /(AT-80\d{2}\S*)/ ) {
if ( defined ($desc) && $desc =~ /(AT-80\d{2}\S*)/ ) {
return $1;
}
return;
@@ -191,7 +190,7 @@ These are methods that return scalar value from SNMP
=item $allied->vendor()
Returns 'allied' :)
Returns 'allied'
=item $allied->os()

View File

@@ -30,6 +30,7 @@
package SNMP::Info::Layer2::Atmedia;
use strict;
use warnings;
use Exporter;
use SNMP::Info::Layer2;
@@ -68,10 +69,12 @@ sub model {
my $atmedia = shift;
my $atmedia_model = $atmedia->atm_model();
$atmedia_model =~ s/\<|\>//g;
$atmedia_model =~ s/\//_/g;
return $atmedia_model;
if (defined $atmedia_model) {
$atmedia_model =~ s/\<|\>//g;
$atmedia_model =~ s/\//_/g;
return $atmedia_model;
}
return;
}
sub vendor {

View File

@@ -1,5 +1,4 @@
# SNMP::Info::Layer2::Baystack
# $Id$
#
# Copyright (c) 2008 Max Baker changes from version 0.8 and beyond.
# All rights reserved.
@@ -31,16 +30,16 @@
package SNMP::Info::Layer2::Baystack;
use strict;
use warnings;
use Exporter;
use SNMP::Info::SONMP;
use SNMP::Info::NortelStack;
use SNMP::Info::RapidCity;
use SNMP::Info::LLDP;
use SNMP::Info::Layer3;
@SNMP::Info::Layer2::Baystack::ISA
= qw/SNMP::Info::SONMP SNMP::Info::NortelStack
SNMP::Info::RapidCity SNMP::Info::LLDP
SNMP::Info::RapidCity
SNMP::Info::Layer3 Exporter/;
@SNMP::Info::Layer2::Baystack::EXPORT_OK = qw//;
@@ -49,20 +48,20 @@ our ($VERSION, %FUNCS, %GLOBALS, %MIBS, %MUNGE);
$VERSION = '3.68';
%MIBS = (
%SNMP::Info::Layer3::MIBS, %SNMP::Info::LLDP::MIBS,
%SNMP::Info::Layer3::MIBS,
%SNMP::Info::RapidCity::MIBS, %SNMP::Info::NortelStack::MIBS,
%SNMP::Info::SONMP::MIBS,
'BAY-STACK-PETH-EXT-MIB' => 'bspePethPsePortExtMeasuredPower',
);
%GLOBALS = (
%SNMP::Info::Layer3::GLOBALS, %SNMP::Info::LLDP::GLOBALS,
%SNMP::Info::Layer3::GLOBALS,
%SNMP::Info::RapidCity::GLOBALS, %SNMP::Info::NortelStack::GLOBALS,
%SNMP::Info::SONMP::GLOBALS,
);
%FUNCS = (
%SNMP::Info::Layer3::FUNCS, %SNMP::Info::LLDP::FUNCS,
%SNMP::Info::Layer3::FUNCS,
%SNMP::Info::RapidCity::FUNCS, %SNMP::Info::NortelStack::FUNCS,
%SNMP::Info::SONMP::FUNCS,
'peth_port_power' => 'bspePethPsePortExtMeasuredPower',
@@ -74,7 +73,7 @@ $SNMP::Info::SPEED_MAP{200_000_000} = '100 Mbps';
$SNMP::Info::SPEED_MAP{2_000_000_000} = '1.0 Gbps';
%MUNGE = (
%SNMP::Info::Layer3::MUNGE, %SNMP::Info::LLDP::MUNGE,
%SNMP::Info::Layer3::MUNGE,
%SNMP::Info::RapidCity::MUNGE, %SNMP::Info::NortelStack::MUNGE,
%SNMP::Info::SONMP::MUNGE,
);
@@ -429,11 +428,6 @@ Provides abstraction to the configuration information obtainable from an
Avaya Ethernet Switch (formerly Nortel/Bay Baystack) and VSP 7000 series
through SNMP.
For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above.
my $baystack = new SNMP::Info::Layer2::Baystack(...);
=head2 Inherited Classes
=over
@@ -444,8 +438,6 @@ my $baystack = new SNMP::Info::Layer2::Baystack(...);
=item SNMP::Info::RapidCity
=item SNMP::Info::LLDP
=item SNMP::Info::Layer3
=back
@@ -454,7 +446,7 @@ my $baystack = new SNMP::Info::Layer2::Baystack(...);
=over
=item F<BAY-STACK-PETH-EXT-MIBB>
=item F<BAY-STACK-PETH-EXT-MIB>
=back
@@ -466,8 +458,6 @@ See L<SNMP::Info::NortelStack/"Required MIBs"> for its MIB requirements.
See L<SNMP::Info::RapidCity/"Required MIBs"> for its MIB requirements.
See L<SNMP::Info::LLDP/"Required MIBs"> for its MIB requirements.
See L<SNMP::Info::Layer3/"Required MIBs"> for its MIB requirements.
=head1 GLOBALS
@@ -537,10 +527,6 @@ See L<SNMP::Info::NortelStack/"GLOBALS"> for details.
See L<SNMP::Info::RapidCity/"GLOBALS"> for details.
=head2 Globals imported from SNMP::Info::LLDP
See documentation in L<SNMP::Info::LLDP/"GLOBALS"> for details.
=head2 Globals imported from SNMP::Info::Layer3
See L<SNMP::Info::Layer3/"GLOBALS"> for details.
@@ -700,10 +686,6 @@ See L<SNMP::Info::NortelStack/"TABLE METHODS"> for details.
See L<SNMP::Info::RapidCity/"TABLE METHODS"> for details.
=head2 Table Methods imported from SNMP::Info::LLDP
See documentation in L<SNMP::Info::LLDP/"TABLE METHODS"> for details.
=head2 Table Methods imported from SNMP::Info::Layer3
See L<SNMP::Info::Layer3/"TABLE METHODS"> for details.

View File

@@ -1,5 +1,4 @@
# SNMP::Info::Layer2::C1900
# $Id$
#
# Copyright (c) 2008 Max Baker changes from version 0.8 and beyond.
#
@@ -33,6 +32,7 @@
package SNMP::Info::Layer2::C1900;
use strict;
use warnings;
use Exporter;
use SNMP::Info::CDP;
use SNMP::Info::CiscoStats;
@@ -311,11 +311,6 @@ Catalyst 1900 device through SNMP. See SNMP::Info for full documentation
Note that most of these devices only talk SNMP version 1, but not all.
For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above.
my $c1900 = new SNMP::Info::Layer2::C1900(...);
=head2 Inherited classes
=over
@@ -342,8 +337,6 @@ after determining a more specific class using the method above.
F<ESSWITCH-MIB> is included in the Version 1 MIBs from Cisco.
They can be found at ftp://ftp.cisco.com/pub/mibs/v1/v1.tar.gz
=back
=head2 Inherited MIBs
@@ -386,7 +379,7 @@ the version from there.
=item $c1900->vendor()
Returns 'cisco' :)
Returns 'cisco'
=back
@@ -420,10 +413,6 @@ See L<SNMP::Info::CiscoConfig/"GLOBALS"> for details.
See L<SNMP::Info::CiscoStpExtensions/"GLOBALS"> for details.
=head2 Globals imported from SNMP::Info::CiscoAgg
See L<SNMP::Info::CiscoAgg/"GLOBALS"> for details.
=head2 Globals imported from SNMP::Info::Layer2
See L<SNMP::Info::Layer2/"GLOBALS"> for details.

View File

@@ -1,5 +1,4 @@
# SNMP::Info::Layer2::C2900
# $Id$
#
# Copyright (c) 2008 Max Baker changes from version 0.8 and beyond.
#
@@ -33,6 +32,7 @@
package SNMP::Info::Layer2::C2900;
use strict;
use warnings;
use Exporter;
use SNMP::Info::Layer2::Cisco;
@@ -244,11 +244,6 @@ Max Baker
Provides abstraction to the configuration information obtainable from a
C2900 device through SNMP.
For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above.
my $c2900 = new SNMP::Info::Layer2::C2900(...);
=head2 Inherited Classes
=over
@@ -281,7 +276,7 @@ These are methods that return scalar value from SNMP
=item $c2900->vendor()
Returns 'cisco' :)
Returns 'cisco'
=item $c2900->cisco_comm_indexing()

View File

@@ -1,5 +1,4 @@
# SNMP::Info::Layer2::Catalyst
# $Id$
#
# Copyright (c) 2002,2003 Regents of the University of California
# Copyright (c) 2008 Max Baker changes from version 0.8 and beyond
@@ -32,6 +31,7 @@
package SNMP::Info::Layer2::Catalyst;
use strict;
use warnings;
use Exporter;
use SNMP::Info::CiscoStack;
use SNMP::Info::Layer2::Cisco;
@@ -64,7 +64,7 @@ $VERSION = '3.68';
%SNMP::Info::CiscoStack::MUNGE,
);
# Overidden Methods
# Overridden Methods
# i_physical sets a hash entry as true if the iid is a physical port
sub i_physical {

View File

@@ -1,5 +1,4 @@
# SNMP::Info::Layer2::Centillion
# $Id$
#
# Copyright (c) 2008 Eric Miller
# All rights reserved.
@@ -31,9 +30,9 @@
package SNMP::Info::Layer2::Centillion;
use strict;
use warnings;
use Exporter;
use SNMP::Info;
use SNMP::Info::Bridge;
use SNMP::Info::NortelStack;
use SNMP::Info::SONMP;
@@ -292,11 +291,6 @@ Eric Miller
Provides abstraction to the configuration information obtainable from a
Centillion device through SNMP.
For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above.
my $centillion = new SNMP::Info::Layer2::centillion(...);
Note: This class supports version 4.X and 5.X which are VLAN based rather
than bridge group based.
@@ -328,7 +322,7 @@ than bridge group based.
=item Inherited Classes' MIBs
See L<SNMP::Info/"Required MIBs"> for its own MIB requirements.
See L<SNMP::Info/"REQUIREMENTS"> for its own MIB requirements.
See L<SNMP::Info::Bridge/"Required MIBs"> for its own MIB requirements.
@@ -346,7 +340,7 @@ These are methods that return scalar value from SNMP
=item $centillion->vendor()
Returns 'Nortel'
Returns 'nortel'
=item $centillion->model()
@@ -357,7 +351,7 @@ Removes C<sreg-> from the model name
=item $centillion->os()
Returns 'Centillion'
Returns 'centillion'
=item $centillion->tftp_action()
@@ -399,7 +393,7 @@ start at 0. Returns 0.
=head2 Globals imported from SNMP::Info
See documentation in L<SNMP::Info/"GLOBALS"> for details.
See documentation in L<SNMP::Info/"USAGE"> for details.
=head2 Globals imported from SNMP::Info::Bridge
@@ -513,7 +507,7 @@ Returns reference to hash. Key: Table entry, Value: VLAN Type
=head2 Table Methods imported from SNMP::Info
See documentation in L<SNMP::Info/"TABLE METHODS"> for details.
See documentation in L<SNMP::Info/"USAGE"> for details.
=head2 Table Methods imported from SNMP::Info::Bridge

View File

@@ -1,5 +1,4 @@
# SNMP::Info::Layer2::Cisco
# $Id$
#
# Copyright (c) 2008 Max Baker
# All rights reserved.
@@ -31,6 +30,7 @@
package SNMP::Info::Layer2::Cisco;
use strict;
use warnings;
use Exporter;
use SNMP::Info::CiscoVTP;
use SNMP::Info::CDP;
@@ -194,7 +194,7 @@ These are methods that return scalar value from SNMP
=item $cisco->vendor()
Returns 'cisco'
Returns 'cisco'
=back
@@ -226,10 +226,6 @@ See documentation in L<SNMP::Info::CiscoPortSecurity/"GLOBALS"> for details.
See documentation in L<SNMP::Info::CiscoStpExtensions/"GLOBALS"> for details.
=head2 Globals imported from SNMP::Info::CiscoAgg
See documentation in L<SNMP::Info::CiscoAgg/"GLOBALS"> for details.
=head2 Globals imported from SNMP::Info::Layer2
See documentation in L<SNMP::Info::Layer2/"GLOBALS"> for details.

View File

@@ -37,14 +37,13 @@ use strict;
use warnings;
use Exporter;
use SNMP::Info::Layer2;
use SNMP::Info::Entity;
use SNMP::Info::EtherLike;
use SNMP::Info::CiscoStats;
use SNMP::Info::CiscoConfig;
use SNMP::Info::CDP;
@SNMP::Info::Layer2::CiscoSB::ISA
= qw/SNMP::Info::Layer2 SNMP::Info::Entity SNMP::Info::EtherLike
= qw/SNMP::Info::Layer2 SNMP::Info::EtherLike
SNMP::Info::CiscoStats SNMP::Info::CiscoConfig SNMP::Info::CDP Exporter/;
@SNMP::Info::Layer2::CiscoSB::EXPORT_OK = qw//;
@@ -54,17 +53,15 @@ $VERSION = '3.68';
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS,
%SNMP::Info::Entity::GLOBALS,
%SNMP::Info::EtherLike::GLOBALS,
%SNMP::Info::CiscoStats::GLOBALS,
%SNMP::Info::CiscoConfig::GLOBALS,
%SNMP::Info::CDP::GLOBALS,
'descr' => 'sysDescr'
'descr' => 'sysDescr',
);
%FUNCS = (
%SNMP::Info::Layer2::FUNCS,
%SNMP::Info::Entity::FUNCS,
%SNMP::Info::EtherLike::FUNCS,
%SNMP::Info::CiscoStats::FUNCS,
%SNMP::Info::CiscoConfig::FUNCS,
@@ -73,7 +70,6 @@ $VERSION = '3.68';
%MIBS = (
%SNMP::Info::Layer2::MIBS,
%SNMP::Info::Entity::MIBS,
%SNMP::Info::EtherLike::MIBS,
%SNMP::Info::CiscoStats::MIBS,
%SNMP::Info::CiscoConfig::MIBS,
@@ -82,14 +78,12 @@ $VERSION = '3.68';
%MUNGE = (
%SNMP::Info::Layer2::MUNGE,
%SNMP::Info::Entity::MUNGE,
%SNMP::Info::EtherLike::MUNGE,
%SNMP::Info::CiscoStats::MUNGE,
%SNMP::Info::CiscoConfig::MUNGE,
%SNMP::Info::CDP::MUNGE,
);
sub vendor {
return 'cisco';
}
@@ -210,8 +204,6 @@ managed switches. [i.e. those matching enterprises(1).cisco(9).otherEnterprises(
=item SNMP::Info::CiscoStats
=item SNMP::Info::Entity
=item SNMP::Info::EtherLike
=item SNMP::Info::Layer2
@@ -267,10 +259,6 @@ Returns 'ros'.
See documentation in L<SNMP::Info::Layer2/"GLOBALS"> for details.
=head2 Globals imported from SNMP::Info::Entity
See documentation in L<SNMP::Info::Entity/"GLOBALS"> for details.
=head2 Globals imported from SNMP::Info::EtherLike
See documentation in L<SNMP::Info::EtherLike/"GLOBALS"> for details.
@@ -299,10 +287,6 @@ Uses the i_name() field.
See documentation in L<SNMP::Info::Layer2/"TABLE METHODS"> for details.
=head2 Table Methods imported from SNMP::Info::Entity
See documentation in L<SNMP::Info::Entity/"TABLE METHODS"> for details.
=head2 Table Methods imported from SNMP::Info::EtherLike
See documentation in L<SNMP::Info::EtherLike/"TABLE METHODS"> for details.

View File

@@ -1,5 +1,4 @@
# SNMP::Info::Layer2::HP - SNMP Interface to HP ProCurve Switches
# $Id$
#
# Copyright (c) 2008-2009 Max Baker changes from version 0.8 and beyond.
#
@@ -33,6 +32,7 @@
package SNMP::Info::Layer2::HP;
use strict;
use warnings;
use Exporter;
use SNMP::Info::Layer3;
use SNMP::Info::MAU;

View File

@@ -32,6 +32,7 @@
package SNMP::Info::Layer2::HP4000;
use strict;
use warnings;
use Exporter;
use SNMP::Info::Layer3;
use SNMP::Info::MAU;
@@ -49,7 +50,6 @@ $VERSION = '3.68';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
%SNMP::Info::MAU::MIBS,
%SNMP::Info::LLDP::MIBS,
%SNMP::Info::CDP::MIBS,
'RFC1271-MIB' => 'logDescription',
'HP-ICF-OID' => 'hpSwitch4000',
@@ -427,7 +427,7 @@ sub set_i_vlan {
$hp->error_throw("Error removing previous untagged vlan from port, should never happen...\n") unless defined $rv;
}
} else {
# If vlan change was not succesful, try to revert to the old situation.
# If vlan change was not successful, try to revert to the old situation.
if (defined $old_untagged) {
$rv = $hp->set_hp_v_if_tag(2, $old_untagged) if defined $old_untagged;
if (defined $rv) {
@@ -504,11 +504,6 @@ Note: Some HP Switches will connect via SNMP version 1, but a lot of config
data will not be available. Make sure you try and connect with Version 2
first, and then fail back to version 1.
For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above.
my $hp = new SNMP::Info::Layer2::HP4000(...);
=head2 Inherited Classes
=over

View File

@@ -31,12 +31,12 @@
package SNMP::Info::Layer2::HPVC;
use strict;
use warnings;
use Exporter;
use SNMP::Info::Layer2;
use SNMP::Info::LLDP;
@SNMP::Info::Layer2::HPVC::ISA
= qw/SNMP::Info::Layer2 SNMP::Info::LLDP Exporter/;
= qw/SNMP::Info::Layer2 Exporter/;
@SNMP::Info::Layer2::HPVC::EXPORT_OK = qw//;
our ($VERSION, %GLOBALS, %MIBS, %FUNCS, %MUNGE);
@@ -45,7 +45,6 @@ $VERSION = '3.68';
%MIBS = (
%SNMP::Info::Layer2::MIBS,
%SNMP::Info::LLDP::MIBS,
'HPVC-MIB' => 'vcDomainName',
'CPQSINFO-MIB' => 'cpqSiSysSerialNum',
'HPVCMODULE-MIB' => 'vcModuleDomainName',
@@ -53,7 +52,6 @@ $VERSION = '3.68';
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS,
%SNMP::Info::LLDP::GLOBALS,
'serial1' => 'cpqSiSysSerialNum.0',
'os_ver' => 'cpqHoSWRunningVersion.1',
'os_bin' => 'cpqHoFwVerVersion.1',
@@ -62,17 +60,13 @@ $VERSION = '3.68';
%FUNCS = (
%SNMP::Info::Layer2::FUNCS,
%SNMP::Info::LLDP::FUNCS,
);
%MUNGE = (
# Inherit all the built in munging
%SNMP::Info::Layer2::MUNGE,
%SNMP::Info::LLDP::MUNGE,
);
# Method Overrides
sub os {
@@ -120,11 +114,6 @@ Jeroen van Ingen
Provides abstraction to the configuration information obtainable from a
HP Virtual Connect Switch via SNMP.
For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above.
my $hp = new SNMP::Info::Layer2::HPVC(...);
=head2 Inherited Classes
=over

View File

@@ -28,6 +28,7 @@ package SNMP::Info::Layer2::Kentrox;
# POSSIBILITY OF SUCH DAMAGE.
use strict;
use warnings;
use Exporter;
use SNMP::Info::Layer2;
@@ -57,13 +58,13 @@ $VERSION = '3.68';
%MUNGE = ( %SNMP::Info::Layer2::MUNGE, );
sub os {
return 'Kentrox';
return 'kentrox';
}
sub os_ver {
my $dsver = shift;
my $descr = $dsver->description();
if ( $descr =~ /^\S+\s\S+\s\S+\s(\S+)/){
if ( defined ($descr) && $descr =~ /^\S+\s\S+\s\S+\s(\S+)/){
return $1;
}
return;
@@ -72,20 +73,20 @@ sub os_ver {
sub serial {
my $dsserial = shift;
my $serial = $dsserial->ds_sysinfo();
if ( $serial =~ /SERIAL\s(\S+)/){
if ( defined ($serial) && $serial =~ /SERIAL\s(\S+)/){
my $str = substr($1,8,10);
return $str;
}
return;
}
sub vendor {
return 'Kentrox';
return 'kentrox';
}
sub model {
my $dsmodel = shift;
my $descr = $dsmodel->description();
if ( $descr =~ /^(\S+\s\S+)/){
if ( defined ($descr) && $descr =~ /^(\S+\s\S+)/){
return $1;
}
return;
@@ -110,7 +111,7 @@ phishphreek@gmail.com
Debug => 1,
DestHost => 'myrouter',
Community => 'public',
Version => 1
Version => 2
)
or die "Can't connect to DestHost.\n";

View File

@@ -1,5 +1,4 @@
# SNMP::Info::Layer2::N2270
# $Id$
#
# Copyright (c) 2008 Eric Miller
# All rights reserved.
@@ -31,14 +30,14 @@
package SNMP::Info::Layer2::N2270;
use strict;
use warnings;
use Exporter;
use SNMP::Info;
use SNMP::Info::Bridge;
use SNMP::Info::Layer2;
use SNMP::Info::SONMP;
use SNMP::Info::Airespace;
@SNMP::Info::Layer2::N2270::ISA
= qw/SNMP::Info SNMP::Info::Bridge SNMP::Info::SONMP SNMP::Info::Airespace Exporter/;
= qw/SNMP::Info::Layer2 SNMP::Info::SONMP SNMP::Info::Airespace Exporter/;
@SNMP::Info::Layer2::N2270::EXPORT_OK = qw//;
our ($VERSION, %FUNCS, %GLOBALS, %MIBS, %MUNGE, $AUTOLOAD, $INIT, $DEBUG);
@@ -46,23 +45,27 @@ our ($VERSION, %FUNCS, %GLOBALS, %MIBS, %MUNGE, $AUTOLOAD, $INIT, $DEBUG);
$VERSION = '3.68';
%MIBS = (
%SNMP::Info::MIBS, %SNMP::Info::Bridge::MIBS,
%SNMP::Info::SONMP::MIBS, %SNMP::Info::Airespace::MIBS,
%SNMP::Info::Layer2::MIBS,
%SNMP::Info::SONMP::MIBS,
%SNMP::Info::Airespace::MIBS,
);
%GLOBALS = (
%SNMP::Info::GLOBALS, %SNMP::Info::Bridge::GLOBALS,
%SNMP::Info::SONMP::GLOBALS, %SNMP::Info::Airespace::GLOBALS,
%SNMP::Info::Layer2::GLOBALS,
%SNMP::Info::SONMP::GLOBALS,
%SNMP::Info::Airespace::GLOBALS,
);
%FUNCS = (
%SNMP::Info::FUNCS, %SNMP::Info::Bridge::FUNCS,
%SNMP::Info::SONMP::FUNCS, %SNMP::Info::Airespace::FUNCS,
%SNMP::Info::Layer2::FUNCS,
%SNMP::Info::SONMP::FUNCS,
%SNMP::Info::Airespace::FUNCS,
);
%MUNGE = (
%SNMP::Info::MUNGE, %SNMP::Info::Bridge::MUNGE,
%SNMP::Info::SONMP::MUNGE, %SNMP::Info::Airespace::MUNGE,
%SNMP::Info::Layer2::MUNGE,
%SNMP::Info::SONMP::MUNGE,
%SNMP::Info::Airespace::MUNGE,
);
sub os {
@@ -126,18 +129,11 @@ Eric Miller
Provides abstraction to the configuration information obtainable from a
Nortel 2270 Series Wireless Switch through SNMP.
For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above.
my $n2270 = new SNMP::Info::Layer2::N2270(...);
=head2 Inherited Classes
=over
=item SNMP::Info
=item SNMP::Info::Bridge
=item SNMP::Info::Layer2
=item SNMP::Info::SONMP
@@ -151,9 +147,7 @@ my $n2270 = new SNMP::Info::Layer2::N2270(...);
=item Inherited Classes' MIBs
See L<SNMP::Info/"Required MIBs"> for its own MIB requirements.
See L<SNMP::Info::Bridge/"Required MIBs"> for its own MIB requirements.
See L<SNMP::Info::Layer2/"Required MIBs"> for its own MIB requirements.
See L<SNMP::Info::SONMP/"Required MIBs"> for its own MIB requirements.
@@ -200,13 +194,9 @@ start at 0. Returns 0.
=back
=head2 Globals imported from SNMP::Info
=head2 Globals imported from SNMP::Info::Layer2
See documentation in L<SNMP::Info/"GLOBALS"> for details.
=head2 Globals imported from SNMP::Info::Bridge
See documentation in L<SNMP::Info::Bridge/"GLOBALS"> for details.
See documentation in L<SNMP::Info::Layer2/"GLOBALS"> for details.
=head2 Global Methods imported from SNMP::Info::SONMP
@@ -229,13 +219,9 @@ to a hash.
=back
=head2 Table Methods imported from SNMP::Info
=head2 Table Methods imported from SNMP::Info::Layer2
See documentation in L<SNMP::Info/"TABLE METHODS"> for details.
=head2 Table Methods imported from SNMP::Info::Bridge
See documentation in L<SNMP::Info::Bridge/"TABLE METHODS"> for details.
See documentation in L<SNMP::Info::Layer2/"TABLE METHODS"> for details.
=head2 Table Methods imported from SNMP::Info::SONMP

View File

@@ -1,5 +1,4 @@
# SNMP::Info::Layer2::NAP222x
# $Id$
#
# Copyright (c) 2008 Eric Miller
# All rights reserved.
@@ -31,6 +30,7 @@
package SNMP::Info::Layer2::NAP222x;
use strict;
use warnings;
use Exporter;
use SNMP::Info::SONMP;
use SNMP::Info::IEEE802dot11;
@@ -393,11 +393,6 @@ Eric Miller
Provides abstraction to the configuration information obtainable from a Nortel
2220 series wireless Access Points through SNMP.
For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above.
my $nap222x = new SNMP::Info::Layer2::NAP222x(...);
=head2 Inherited Classes
=over

View File

@@ -29,12 +29,12 @@
package SNMP::Info::Layer2::NWSS2300;
use strict;
use warnings;
use Exporter;
use SNMP::Info;
use SNMP::Info::Bridge;
use SNMP::Info::Layer2;
@SNMP::Info::Layer2::NWSS2300::ISA
= qw/SNMP::Info SNMP::Info::Bridge Exporter/;
= qw/SNMP::Info::Layer2 Exporter/;
@SNMP::Info::Layer2::NWSS2300::EXPORT_OK = qw//;
our ($VERSION, %FUNCS, %GLOBALS, %MIBS, %MUNGE);
@@ -42,8 +42,7 @@ our ($VERSION, %FUNCS, %GLOBALS, %MIBS, %MUNGE);
$VERSION = '3.68';
%MIBS = (
%SNMP::Info::MIBS,
%SNMP::Info::Bridge::MIBS,
%SNMP::Info::Layer2::MIBS,
'NTWS-REGISTRATION-DEVICES-MIB' => 'ntwsSwitch2380',
'NTWS-AP-STATUS-MIB' => 'ntwsApStatNumAps',
'NTWS-CLIENT-SESSION-MIB' => 'ntwsClSessTotalSessions',
@@ -53,16 +52,14 @@ $VERSION = '3.68';
);
%GLOBALS = (
%SNMP::Info::GLOBALS,
%SNMP::Info::Bridge::GLOBALS,
%SNMP::Info::Layer2::GLOBALS,
'os_ver' => 'ntwsVersionString',
'serial' => 'ntwsSerialNumber',
'mac' => 'dot1dBaseBridgeAddress',
);
%FUNCS = (
%SNMP::Info::FUNCS,
%SNMP::Info::Bridge::FUNCS,
%SNMP::Info::Layer2::FUNCS,
# NTWS-AP-STATUS-MIB::ntwsApStatApStatusTable
'nwss2300_ap_mac' => 'ntwsApStatApStatusBaseMac',
@@ -125,8 +122,7 @@ $VERSION = '3.68';
);
%MUNGE = (
%SNMP::Info::MUNGE,
%SNMP::Info::Bridge::MUNGE,
%SNMP::Info::Layer2::MUNGE,
'nwss2300_apif_mac' => \&SNMP::Info::munge_mac,
'nwss2300_apif_bssid' => \&SNMP::Info::munge_mac,
);
@@ -813,18 +809,11 @@ This class emulates bridge functionality for the wireless switch. This enables
end station MAC addresses collection and correlation to the thin access point
the end station is using for communication.
For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above.
my $nwss2300 = new SNMP::Info::Layer2::NWSS2300(...);
=head2 Inherited Classes
=over
=item SNMP::Info
=item SNMP::Info::Bridge
=item SNMP::Info::Layer2
=back
@@ -846,9 +835,7 @@ my $nwss2300 = new SNMP::Info::Layer2::NWSS2300(...);
=head2 Inherited Classes' MIBs
See L<SNMP::Info/"Required MIBs"> for its own MIB requirements.
See L<SNMP::Info::Bridge/"Required MIBs"> for its own MIB requirements.
See L<SNMP::Info::Layer2/"Required MIBs"> for its own MIB requirements.
=head1 GLOBALS
@@ -895,13 +882,9 @@ proprietary MIBs.
=back
=head2 Global Methods imported from SNMP::Info
=head2 Global Methods imported from SNMP::Info::Layer2
See documentation in L<SNMP::Info/"GLOBALS"> for details.
=head2 Globals imported from SNMP::Info::Bridge
See documentation in L<SNMP::Info::Bridge/"GLOBALS"> for details.
See documentation in L<SNMP::Info::Layer2/"GLOBALS"> for details.
=head1 TABLE METHODS
@@ -1141,13 +1124,9 @@ These emulate the F<CISCO-DOT11-MIB>
=back
=head2 Table Methods imported from SNMP::Info
=head2 Table Methods imported from SNMP::Info::Layer2
See documentation in L<SNMP::Info/"TABLE METHODS"> for details.
=head2 Table Methods imported from SNMP::Info::Bridge
See documentation in L<SNMP::Info::Bridge/"TABLE METHODS"> for details.
See documentation in L<SNMP::Info::Layer2/"TABLE METHODS"> for details.
=head2 Overrides

View File

@@ -1,5 +1,4 @@
# SNMP::Info::Layer2::Netgear
# $Id$
#
# Copyright (c) 2008 Bill Fenner
# All rights reserved.
@@ -31,11 +30,11 @@
package SNMP::Info::Layer2::Netgear;
use strict;
use warnings;
use Exporter;
use SNMP::Info::Layer2;
use SNMP::Info::LLDP;
@SNMP::Info::Layer2::Netgear::ISA = qw/SNMP::Info::LLDP SNMP::Info::Layer2 Exporter/;
@SNMP::Info::Layer2::Netgear::ISA = qw/SNMP::Info::Layer2 Exporter/;
@SNMP::Info::Layer2::Netgear::EXPORT_OK = qw//;
our ($VERSION, %GLOBALS, %MIBS, %FUNCS, %MUNGE);
@@ -46,18 +45,18 @@ $VERSION = '3.68';
# table by the serial() function.
our $index = undef;
%MIBS = ( %SNMP::Info::Layer2::MIBS, %SNMP::Info::LLDP::MIBS, );
%MIBS = ( %SNMP::Info::Layer2::MIBS, );
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS, %SNMP::Info::LLDP::GLOBALS,
%SNMP::Info::Layer2::GLOBALS,
ng_fsosver => '.1.3.6.1.4.1.4526.11.11.1.0',
ng_gsmserial => '.1.3.6.1.4.1.4526.10.1.1.1.4.0',
ng_gsmosver => '.1.3.6.1.4.1.4526.10.1.1.1.13.0',
);
%FUNCS = ( %SNMP::Info::Layer2::FUNCS, %SNMP::Info::LLDP::FUNCS, );
%FUNCS = ( %SNMP::Info::Layer2::FUNCS, );
%MUNGE = ( %SNMP::Info::Layer2::MUNGE, %SNMP::Info::LLDP::MUNGE, );
%MUNGE = ( %SNMP::Info::Layer2::MUNGE, );
sub vendor {
return 'netgear';
@@ -87,7 +86,7 @@ sub serial {
return $e_serial->{$index} if defined $index;
}
# Without Enitity-MIB, we've got to work our way through a bunch of
# Without Entity-MIB, we've got to work our way through a bunch of
# different locales...
return $netgear->ng_gsmserial() if defined $netgear->model and $netgear->model =~ m/[FG]SM\d/i;;
return 'none';
@@ -109,7 +108,7 @@ sub model {
# ifDescr is the same for all interfaces in a class, but the ifName is
# unique, so let's use that for port name. If all else fails,
# concatentate ifDesc and ifIndex.
# concatenate ifDesc and ifIndex.
sub interfaces {
my $netgear = shift;
my $partial = shift;
@@ -192,8 +191,6 @@ inherited methods.
=over
=item SNMP::Info::Layer2
=item SNMP::Info::Entity
=item SNMP::Info::LLDP
=back
@@ -206,10 +203,6 @@ inherited methods.
MIBs listed in L<SNMP::Info::Layer2/"Required MIBs"> and its inherited
classes.
See L<SNMP::Info::Entity/"Required MIBs"> for its MIB requirements.
See L<SNMP::Info::LLDP/"Required MIBs"> for its MIB requirements.
=back
=head1 GLOBALS
@@ -248,14 +241,6 @@ serial number).
See documentation in L<SNMP::Info::Layer2/"GLOBALS"> for details.
=head2 Globals imported from SNMP::Info::Entity
See documentation in L<SNMP::Info::Entity/"GLOBALS"> for details.
=head2 Globals imported from SNMP::Info::LLDP
See documentation in L<SNMP::Info::LLDP/"GLOBALS"> for details.
=head1 TABLE METHODS
These are methods that return tables of information in the form of
@@ -275,12 +260,4 @@ Uses the i_name() field.
See documentation in L<SNMP::Info::Layer2/"TABLE METHODS"> for details.
=head2 Table Methods imported from SNMP::Info::Entity
See documentation in L<SNMP::Info::Entity/"TABLE METHODS"> for details.
=head2 Table Methods imported from SNMP::Info::LLDP
See documentation in L<SNMP::Info::LLDP/"TABLE METHODS"> for details.
=cut

View File

@@ -30,6 +30,7 @@
package SNMP::Info::Layer2::Nexans;
use strict;
use warnings;
use Exporter;
use SNMP::Info::Layer2;
@@ -157,11 +158,6 @@ tested devices:
gigaSwitch641DeskSfpTp version 3.68, 4.14W
gigaSwitchV3d2SfpSfp version 3.68, 4.02, 4.02B, 4.10C, 4,14W
For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above.
my $nexans = new SNMP::Info::Layer2::Nexans(...);
=head2 Inherited Classes
=over

View File

@@ -1,5 +1,4 @@
# SNMP::Info::Layer2::Orinoco
# $Id$
#
# Copyright (c) 2008 Eric Miller
# All rights reserved.
@@ -31,6 +30,7 @@
package SNMP::Info::Layer2::Orinoco;
use strict;
use warnings;
use Exporter;
use SNMP::Info::IEEE802dot11;
use SNMP::Info::Layer2;
@@ -189,11 +189,6 @@ Provides abstraction to the configuration information obtainable from
Orinoco Access Point through SNMP. Orinoco devices have been manufactured
by Proxim, Agere, and Lucent.
For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above.
my $orinoco = new SNMP::Info::Layer2::Orinoco(...);
=head2 Inherited Classes
=over
@@ -234,7 +229,7 @@ Returns the model extracted from C<sysDescr>.
=item $orinoco->os()
Returns 'Orinoco'
Returns 'orinoco'
=item $orinoco->os_ver()

View File

@@ -30,6 +30,7 @@
package SNMP::Info::Layer2::Sixnet;
use strict;
use warnings;
use Exporter;
use SNMP::Info::Layer2;
@@ -108,11 +109,6 @@ Eric Miller
SNMP::Info::Layer2::Sixnet is a subclass of SNMP::Info that provides an
interface to Sixnet industrial switches.
For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above.
my $sixnet = new SNMP::Info::Layer2::Sixnet(...);
=head2 Inherited Classes
=over

View File

@@ -29,13 +29,12 @@
package SNMP::Info::Layer2::Trapeze;
use strict;
use warnings;
use Exporter;
use SNMP::Info;
use SNMP::Info::Bridge;
use SNMP::Info::LLDP;
use SNMP::Info::Layer2;
@SNMP::Info::Layer2::Trapeze::ISA
= qw/SNMP::Info SNMP::Info::Bridge SNMP::Info::LLDP Exporter/;
= qw/SNMP::Info::Layer2 Exporter/;
@SNMP::Info::Layer2::Trapeze::EXPORT_OK = qw//;
our ($VERSION, %FUNCS, %GLOBALS, %MIBS, %MUNGE);
@@ -43,9 +42,7 @@ our ($VERSION, %FUNCS, %GLOBALS, %MIBS, %MUNGE);
$VERSION = '3.68';
%MIBS = (
%SNMP::Info::MIBS,
%SNMP::Info::Bridge::MIBS,
%SNMP::Info::LLDP::MIBS,
%SNMP::Info::Layer2::MIBS,
'TRAPEZE-NETWORKS-REGISTRATION-DEVICES-MIB' => 'wirelessLANController',
'TRAPEZE-NETWORKS-AP-STATUS-MIB' => 'trpzApStatNumAps',
'TRAPEZE-NETWORKS-CLIENT-SESSION-MIB' => 'trpzClSessTotalSessions',
@@ -55,18 +52,14 @@ $VERSION = '3.68';
);
%GLOBALS = (
%SNMP::Info::GLOBALS,
%SNMP::Info::Bridge::GLOBALS,
%SNMP::Info::LLDP::GLOBALS,
%SNMP::Info::Layer2::GLOBALS,
'os_ver' => 'trpzVersionString',
'serial' => 'trpzSerialNumber',
'mac' => 'dot1dBaseBridgeAddress',
);
%FUNCS = (
%SNMP::Info::FUNCS,
%SNMP::Info::Bridge::FUNCS,
%SNMP::Info::LLDP::FUNCS,
%SNMP::Info::Layer2::FUNCS,
# TRAPEZE-NETWORKS-AP-STATUS-MIB::trpzApStatApStatusTable
'trapeze_ap_mac' => 'trpzApStatApStatusBaseMac',
'trapeze_ap_name' => 'trpzApStatApStatusApName',
@@ -128,9 +121,7 @@ $VERSION = '3.68';
);
%MUNGE = (
%SNMP::Info::MUNGE,
%SNMP::Info::Bridge::MUNGE,
%SNMP::Info::LLDP::MUNGE,
%SNMP::Info::Layer2::MUNGE,
'trapeze_apif_mac' => \&SNMP::Info::munge_mac,
'trapeze_apif_bssid' => \&SNMP::Info::munge_mac,
);
@@ -817,18 +808,11 @@ This class emulates bridge functionality for the wireless switch. This enables
end station MAC addresses collection and correlation to the thin access point
the end station is using for communication.
For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above.
my $trapeze = new SNMP::Info::Layer2::Trapeze(...);
=head2 Inherited Classes
=over
=item SNMP::Info
=item SNMP::Info::Bridge
=item SNMP::Info::Layer2
=back
@@ -850,9 +834,7 @@ my $trapeze = new SNMP::Info::Layer2::Trapeze(...);
=head2 Inherited Classes' MIBs
See L<SNMP::Info/"Required MIBs"> for its own MIB requirements.
See L<SNMP::Info::Bridge/"Required MIBs"> for its own MIB requirements.
See L<SNMP::Info::Layer2/"Required MIBs"> for its own MIB requirements.
=head1 GLOBALS
@@ -899,13 +881,9 @@ proprietary MIBs.
=back
=head2 Global Methods imported from SNMP::Info
=head2 Global Methods imported from SNMP::Info::Layer2
See documentation in L<SNMP::Info/"GLOBALS"> for details.
=head2 Globals imported from SNMP::Info::Bridge
See documentation in L<SNMP::Info::Bridge/"GLOBALS"> for details.
See documentation in L<SNMP::Info::Layer2/"GLOBALS"> for details.
=head1 TABLE METHODS
@@ -1147,11 +1125,7 @@ These emulate the F<CISCO-DOT11-MIB>
=head2 Table Methods imported from SNMP::Info
See documentation in L<SNMP::Info/"TABLE METHODS"> for details.
=head2 Table Methods imported from SNMP::Info::Bridge
See documentation in L<SNMP::Info::Bridge/"TABLE METHODS"> for details.
See documentation in L<SNMP::Info::Layer2/"TABLE METHODS"> for details.
=head2 Overrides

View File

@@ -29,6 +29,7 @@
package SNMP::Info::Layer2::Ubiquiti;
use strict;
use warnings;
use Exporter;
use SNMP::Info::IEEE802dot11;
use SNMP::Info::Layer2;
@@ -47,16 +48,16 @@ $VERSION = '3.68';
%MIBS = (
%SNMP::Info::Layer2::MIBS,
%SNMP::Info::IEEE802dot11::MIBS,
);
%GLOBALS
= ( %SNMP::Info::Layer2::GLOBALS, %SNMP::Info::IEEE802dot11::GLOBALS, );
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS,
%SNMP::Info::IEEE802dot11::GLOBALS,
);
%FUNCS = (
%SNMP::Info::Layer2::FUNCS,
%SNMP::Info::IEEE802dot11::FUNCS,
);
%MUNGE = ( %SNMP::Info::Layer2::MUNGE, %SNMP::Info::IEEE802dot11::MUNGE, );
@@ -136,7 +137,7 @@ sub os_ver {
}
sub vendor {
return 'Ubiquiti Networks, Inc.';
return 'ubiquiti';
}
sub model {
@@ -323,11 +324,6 @@ Max Kosmach
Provides abstraction to the configuration information obtainable from
Ubiquiti Access Point through SNMP.
For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above.
my $ubnt = new SNMP::Info::Layer2::Ubiquiti(...);
=head2 Inherited Classes
=over
@@ -356,11 +352,11 @@ These are methods that return scalar value from SNMP
=item $ubnt->vendor()
Returns 'Ubiquiti Networks, Inc.'
Returns 'ubiquiti'
=item $ubnt->model()
Returns the model extracted from C<dot11manufacturerProductName>, with failback to some complex logic for EdgeMax devices
Returns the model extracted from C<dot11manufacturerProductName>, with fallback to some complex logic for EdgeMax devices
=item $ubnt->serial()

View File

@@ -1,5 +1,4 @@
# SNMP::Info::Layer2::ZyXEL_DSLAM
# $Id$
#
# Copyright (c) 2008 Max Baker
# All rights reserved.
@@ -31,6 +30,7 @@
package SNMP::Info::Layer2::ZyXEL_DSLAM;
use strict;
use warnings;
use Exporter;
use SNMP::Info::Layer2;
@@ -77,7 +77,7 @@ sub os_ver {
my $zyxel = shift;
my $descr = $zyxel->description();
if ( $descr =~ m/version (\S+) / ) {
if ( defined ($descr) && $descr =~ m/version (\S+) / ) {
return $1;
}
return;
@@ -88,11 +88,13 @@ sub model {
my $desc = $zyxel->description();
if ( $desc =~ /8-port ADSL Module\(Annex A\)/ ) {
if (defined $desc) {
if ($desc =~ /8-port ADSL Module\(Annex A\)/) {
return "AAM1008-61";
}
elsif ( $desc =~ /8-port ADSL Module\(Annex B\)/ ) {
}
elsif ($desc =~ /8-port ADSL Module\(Annex B\)/) {
return "AAM1008-63";
}
}
return;
}
@@ -130,11 +132,11 @@ Dmitry Sergienko (C<dmitry@trifle.net>)
Debug => 1,
DestHost => 'myhub',
Community => 'public',
Version => 1
Version => 2
)
or die "Can't connect to DestHost.\n";
my $class = $l2->class();
my $class = $zyxel->class();
print "SNMP::Info determined this device to fall under subclass : $class\n";
=head1 DESCRIPTION
@@ -174,11 +176,11 @@ These are methods that return scalar value from SNMP
=item $zyxel->vendor()
Returns 'ZyXEL' :)
Returns 'zyxel'
=item $zyxel->os()
Returns 'ZyXEL'
Returns 'zyxel'
=item $zyxel->os_ver()