- PBP compliance via Perl::Critic
- Use bare return to return failure - No code before strictures are enabled
This commit is contained in:
@@ -28,9 +28,8 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::Airespace;
|
||||
$VERSION = '1.09';
|
||||
use strict;
|
||||
|
||||
use strict;
|
||||
use Exporter;
|
||||
use SNMP::Info::Bridge;
|
||||
use SNMP::Info::CDP;
|
||||
@@ -41,6 +40,8 @@ use SNMP::Info::Airespace;
|
||||
|
||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
|
||||
|
||||
$VERSION = '1.09';
|
||||
|
||||
%MIBS = (
|
||||
%SNMP::Info::MIBS,
|
||||
%SNMP::Info::Bridge::MIBS,
|
||||
@@ -80,7 +81,7 @@ sub vendor {
|
||||
sub model {
|
||||
my $airespace = shift;
|
||||
my $model = $airespace->airespace_model();
|
||||
return undef unless defined $model;
|
||||
return unless defined $model;
|
||||
|
||||
return $model;
|
||||
}
|
||||
|
||||
@@ -31,10 +31,8 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::Aironet;
|
||||
$VERSION = '1.09';
|
||||
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
use SNMP::Info::Layer2;
|
||||
use SNMP::Info::Entity;
|
||||
@@ -47,7 +45,9 @@ use SNMP::Info::IEEE802dot11;
|
||||
SNMP::Info::CiscoStats SNMP::Info::CDP Exporter/;
|
||||
@SNMP::Info::Layer2::Aironet::EXPORT_OK = qw//;
|
||||
|
||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/;
|
||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
|
||||
|
||||
$VERSION = '1.09';
|
||||
|
||||
%GLOBALS = (
|
||||
%SNMP::Info::IEEE802dot11::GLOBALS,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# SNMP::Info::Layer2::Allied
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (c) 2004 Max Baker
|
||||
# Copyright (c) 2008 Max Baker
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -29,10 +29,8 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::Allied;
|
||||
$VERSION = '1.09';
|
||||
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
use SNMP::Info::Layer2;
|
||||
use SNMP::Info::Layer1;
|
||||
@@ -40,7 +38,9 @@ use SNMP::Info::Layer1;
|
||||
@SNMP::Info::Layer2::Allied::ISA = qw/SNMP::Info::Layer2 Exporter/;
|
||||
@SNMP::Info::Layer2::Allied::EXPORT_OK = qw//;
|
||||
|
||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/;
|
||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
|
||||
|
||||
$VERSION = '1.09';
|
||||
|
||||
%GLOBALS = (
|
||||
%SNMP::Info::Layer2::GLOBALS
|
||||
@@ -87,7 +87,7 @@ sub model {
|
||||
if ($desc =~ /(AT-80\d{2}\S*)/){
|
||||
return $1;
|
||||
}
|
||||
return undef;
|
||||
return;
|
||||
}
|
||||
|
||||
sub root_ip {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (c) 2008 Eric Miller
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
@@ -28,16 +29,17 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::Aruba;
|
||||
$VERSION = '1.09';
|
||||
use strict;
|
||||
|
||||
use strict;
|
||||
use Exporter;
|
||||
use SNMP::Info::Layer2;
|
||||
|
||||
@SNMP::Info::Layer2::Aruba::ISA = qw/SNMP::Info::Layer2 Exporter/;
|
||||
@SNMP::Info::Layer2::Aruba::EXPORT_OK = qw//;
|
||||
|
||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/;
|
||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
|
||||
|
||||
$VERSION = '1.09';
|
||||
|
||||
%MIBS = (
|
||||
%SNMP::Info::Layer2::MIBS,
|
||||
@@ -90,19 +92,19 @@ sub vendor {
|
||||
sub os_ver {
|
||||
my $aruba = shift;
|
||||
my $descr = $aruba->description();
|
||||
return undef unless defined $descr;
|
||||
return unless defined $descr;
|
||||
|
||||
if ($descr =~ m/Version\s+(\d+\.\d+\.\d+\.\d+)/){
|
||||
return $1;
|
||||
}
|
||||
|
||||
return undef;
|
||||
return;
|
||||
}
|
||||
|
||||
sub model {
|
||||
my $aruba = shift;
|
||||
my $id = $aruba->id();
|
||||
return undef unless defined $id;
|
||||
return unless defined $id;
|
||||
my $model = &SNMP::translateObj($id);
|
||||
return $id unless defined $model;
|
||||
|
||||
|
||||
@@ -32,17 +32,17 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::Bay;
|
||||
$VERSION = '1.09';
|
||||
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
use SNMP::Info::Layer2;
|
||||
|
||||
@SNMP::Info::Layer2::Bay::ISA = qw/SNMP::Info::Layer2 Exporter/;
|
||||
@SNMP::Info::Layer2::Bay::EXPORT_OK = qw//;
|
||||
|
||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/;
|
||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
|
||||
|
||||
$VERSION = '1.09';
|
||||
|
||||
# Set for No CDP
|
||||
%GLOBALS = ( %SNMP::Info::Layer2::GLOBALS,
|
||||
@@ -84,7 +84,7 @@ sub os {
|
||||
sub os_ver {
|
||||
my $bay = shift;
|
||||
my $descr = $bay->description();
|
||||
return undef unless defined $descr;
|
||||
return unless defined $descr;
|
||||
|
||||
# 303 / 304
|
||||
if ($descr =~ m/Rev: \d+\.\d+\.\d+\.\d+-(\d+\.\d+\.\d+\.\d+)/){
|
||||
@@ -95,13 +95,13 @@ sub os_ver {
|
||||
if ($descr =~ m/SW:v(\d+\.\d+\.\d+\.\d+)/){
|
||||
return $1;
|
||||
}
|
||||
return undef;
|
||||
return;
|
||||
}
|
||||
|
||||
sub os_bin {
|
||||
my $bay = shift;
|
||||
my $descr = $bay->description();
|
||||
return undef unless defined $descr;
|
||||
return unless defined $descr;
|
||||
|
||||
# 303 / 304
|
||||
if ($descr =~ m/Rev: \d+\.(\d+\.\d+\.\d+)-\d+\.\d+\.\d+\.\d+/){
|
||||
@@ -112,7 +112,7 @@ sub os_bin {
|
||||
if ($descr =~ m/FW:v(\d+\.\d+\.\d+\.\d+)/){
|
||||
return $1;
|
||||
}
|
||||
return undef;
|
||||
return;
|
||||
}
|
||||
|
||||
sub vendor {
|
||||
@@ -158,7 +158,7 @@ sub i_mac {
|
||||
sub model {
|
||||
my $bay = shift;
|
||||
my $id = $bay->id();
|
||||
return undef unless defined $id;
|
||||
return unless defined $id;
|
||||
my $model = &SNMP::translateObj($id);
|
||||
return $id unless defined $model;
|
||||
$model =~ s/^sreg-//i;
|
||||
|
||||
@@ -29,10 +29,8 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::Baystack;
|
||||
$VERSION = '1.09';
|
||||
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
use SNMP::Info::SONMP;
|
||||
use SNMP::Info::NortelStack;
|
||||
@@ -45,7 +43,9 @@ use SNMP::Info::Layer3;
|
||||
SNMP::Info::Layer3 Exporter/;
|
||||
@SNMP::Info::Layer2::Baystack::EXPORT_OK = qw//;
|
||||
|
||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/;
|
||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
|
||||
|
||||
$VERSION = '1.09';
|
||||
|
||||
%MIBS = (
|
||||
%SNMP::Info::Layer3::MIBS,
|
||||
@@ -101,7 +101,7 @@ sub os {
|
||||
sub os_bin {
|
||||
my $baystack = shift;
|
||||
my $descr = $baystack->description();
|
||||
return undef unless defined $descr;
|
||||
return unless defined $descr;
|
||||
|
||||
# 303 / 304
|
||||
if ($descr =~ m/Rev: \d+\.(\d+\.\d+\.\d+)-\d+\.\d+\.\d+\.\d+/){
|
||||
@@ -116,7 +116,7 @@ sub os_bin {
|
||||
if ($descr =~ m/FW:(\d+\.\d+\.\d+\.\d+)/i){
|
||||
return $1;
|
||||
}
|
||||
return undef;
|
||||
return;
|
||||
}
|
||||
|
||||
sub vendor {
|
||||
@@ -126,7 +126,7 @@ sub vendor {
|
||||
sub model {
|
||||
my $baystack = shift;
|
||||
my $id = $baystack->id();
|
||||
return undef unless defined $id;
|
||||
return unless defined $id;
|
||||
my $model = &SNMP::translateObj($id);
|
||||
return $id unless defined $model;
|
||||
|
||||
|
||||
@@ -31,10 +31,8 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::C1900;
|
||||
$VERSION = '1.09';
|
||||
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
use SNMP::Info::CDP;
|
||||
use SNMP::Info::CiscoStats;
|
||||
@@ -46,7 +44,9 @@ use SNMP::Info::Layer2;
|
||||
Exporter/;
|
||||
@SNMP::Info::Layer2::C1900::EXPORT_OK = qw//;
|
||||
|
||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/;
|
||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
|
||||
|
||||
$VERSION = '1.09';
|
||||
|
||||
%GLOBALS = (
|
||||
%SNMP::Info::Layer2::GLOBALS,
|
||||
@@ -107,12 +107,12 @@ sub os_ver {
|
||||
return $os_ver if defined $os_ver;
|
||||
|
||||
my $c1900_flash_status = $c1900->c1900_flash_status();
|
||||
return undef unless defined $c1900_flash_status;
|
||||
return unless defined $c1900_flash_status;
|
||||
|
||||
if ( $c1900_flash_status =~ m/V(\d+\.\d+(\.\d+)?)/ ) {
|
||||
return $1;
|
||||
}
|
||||
return undef;
|
||||
return;
|
||||
}
|
||||
|
||||
sub interfaces {
|
||||
@@ -207,7 +207,7 @@ sub i_vlan {
|
||||
$c1900->vlanAllowMembershipOverlap() || 'disabled';
|
||||
|
||||
if ($overlap eq 'enabled') {
|
||||
return undef;
|
||||
return;
|
||||
}
|
||||
|
||||
my $member_of = $c1900->bridgeGroupMemberPortOfBridgeGroup() ||
|
||||
|
||||
@@ -31,10 +31,8 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::C2900;
|
||||
$VERSION = '1.09';
|
||||
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
use SNMP::Info::CiscoVTP;
|
||||
use SNMP::Info::CDP;
|
||||
@@ -47,7 +45,9 @@ use SNMP::Info::Layer2;
|
||||
SNMP::Info::Layer2 Exporter/;
|
||||
@SNMP::Info::Layer2::C2900::EXPORT_OK = qw//;
|
||||
|
||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/;
|
||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
|
||||
|
||||
$VERSION = '1.09';
|
||||
|
||||
%GLOBALS = (
|
||||
%SNMP::Info::Layer2::GLOBALS,
|
||||
@@ -157,7 +157,7 @@ sub set_i_speed_admin {
|
||||
|
||||
$speed = lc($speed);
|
||||
|
||||
return undef unless defined $speeds{$speed};
|
||||
return unless defined $speeds{$speed};
|
||||
|
||||
# account for weirdness of c2900 mib
|
||||
$iid = $reverse_2900{$iid};
|
||||
@@ -177,7 +177,7 @@ sub set_i_duplex_admin {
|
||||
|
||||
$duplex = lc($duplex);
|
||||
|
||||
return undef unless defined $duplexes{$duplex};
|
||||
return unless defined $duplexes{$duplex};
|
||||
|
||||
# account for weirdness of c2900 mib
|
||||
$iid = $reverse_2900{$iid};
|
||||
|
||||
@@ -30,10 +30,8 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::Catalyst;
|
||||
$VERSION = '1.09';
|
||||
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
use SNMP::Info::CiscoStack;
|
||||
use SNMP::Info::CiscoVTP;
|
||||
@@ -42,13 +40,16 @@ use SNMP::Info::CiscoStats;
|
||||
use SNMP::Info::CiscoPortSecurity;
|
||||
use SNMP::Info::Layer2;
|
||||
|
||||
use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %MUNGE $INIT/ ;
|
||||
@SNMP::Info::Layer2::Catalyst::ISA = qw/SNMP::Info::CiscoStack SNMP::Info::CiscoVTP
|
||||
SNMP::Info::CDP SNMP::Info::CiscoStats
|
||||
SNMP::Info::CiscoPortSecurity
|
||||
SNMP::Info::Layer2 Exporter/;
|
||||
@SNMP::Info::Layer2::Catalyst::EXPORT_OK = qw//;
|
||||
|
||||
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/ ;
|
||||
|
||||
$VERSION = '1.09';
|
||||
|
||||
%MIBS = (
|
||||
%SNMP::Info::Layer2::MIBS,
|
||||
%SNMP::Info::CiscoPortSecurity::MIBS,
|
||||
@@ -115,11 +116,11 @@ sub os_ver {
|
||||
return $os_ver if defined $os_ver;
|
||||
|
||||
my $m_swver = $cat->m_swver();
|
||||
return undef unless defined $m_swver;
|
||||
return unless defined $m_swver;
|
||||
|
||||
# assume .1 entry is the chassis and the sw version we want.
|
||||
return $m_swver->{1} if defined $m_swver->{1};
|
||||
return undef;
|
||||
return;
|
||||
}
|
||||
|
||||
# Workaround for incomplete bp_index
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (c) 2008 Eric Miller
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
@@ -28,10 +29,8 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::Centillion;
|
||||
$VERSION = '1.09';
|
||||
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
use SNMP::Info;
|
||||
use SNMP::Info::Bridge;
|
||||
@@ -41,7 +40,9 @@ use SNMP::Info::SONMP;
|
||||
@SNMP::Info::Layer2::Centillion::ISA = qw/SNMP::Info SNMP::Info::Bridge SNMP::Info::NortelStack SNMP::Info::SONMP Exporter/;
|
||||
@SNMP::Info::Layer2::Centillion::EXPORT_OK = qw//;
|
||||
|
||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/;
|
||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
|
||||
|
||||
$VERSION = '1.09';
|
||||
|
||||
%MIBS = (
|
||||
%SNMP::Info::MIBS,
|
||||
@@ -201,7 +202,7 @@ sub i_vlan {
|
||||
sub model {
|
||||
my $centillion = shift;
|
||||
my $id = $centillion->id();
|
||||
return undef unless defined $id;
|
||||
return unless defined $id;
|
||||
my $model = &SNMP::translateObj($id);
|
||||
return $id unless defined $model;
|
||||
$model =~ s/^sreg-//i;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (c) 2008 Max Baker
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
@@ -30,7 +31,6 @@
|
||||
package SNMP::Info::Layer2::Cisco;
|
||||
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
use SNMP::Info::CiscoVTP;
|
||||
use SNMP::Info::CDP;
|
||||
@@ -41,8 +41,6 @@ use SNMP::Info::CiscoQOS;
|
||||
use SNMP::Info::CiscoConfig;
|
||||
use SNMP::Info::Layer2;
|
||||
|
||||
use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %MUNGE $INIT/ ;
|
||||
$VERSION = '1.09';
|
||||
@SNMP::Info::Layer2::Cisco::ISA = qw/SNMP::Info::CiscoVTP SNMP::Info::CDP
|
||||
SNMP::Info::CiscoStats SNMP::Info::CiscoImage
|
||||
SNMP::Info::CiscoRTT SNMP::Info::CiscoQOS
|
||||
@@ -50,6 +48,10 @@ $VERSION = '1.09';
|
||||
Exporter/;
|
||||
@SNMP::Info::Layer2::Cisco::EXPORT_OK = qw//;
|
||||
|
||||
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/ ;
|
||||
|
||||
$VERSION = '1.09';
|
||||
|
||||
%MIBS = (
|
||||
%SNMP::Info::Layer2::MIBS,
|
||||
%SNMP::Info::CiscoConfig::MIBS,
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (c) 2008 Max Baker
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
@@ -28,22 +29,22 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::Foundry;
|
||||
$VERSION = '1.09';
|
||||
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
use SNMP::Info::Layer2;
|
||||
use SNMP::Info::FDP;
|
||||
use SNMP::Info::EtherLike;
|
||||
use SNMP::Info::MAU;
|
||||
|
||||
use vars qw/$VERSION $DEBUG %GLOBALS %FUNCS $INIT %MIBS %MUNGE/;
|
||||
|
||||
@SNMP::Info::Layer2::Foundry::ISA = qw/SNMP::Info::Layer2 SNMP::Info::FDP SNMP::Info::EtherLike
|
||||
SNMP::Info::MAU Exporter/;
|
||||
@SNMP::Info::Layer2::Foundry::EXPORT_OK = qw//;
|
||||
|
||||
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
|
||||
|
||||
$VERSION = '1.09';
|
||||
|
||||
%MIBS = ( %SNMP::Info::Layer2::MIBS,
|
||||
%SNMP::Info::FDP::MIBS,
|
||||
%SNMP::Info::EtherLike::MIBS,
|
||||
@@ -150,7 +151,7 @@ sub serial {
|
||||
my $name = $e_name->{$e} || '';
|
||||
$unit_iid = $e if $name eq 'unit.1';
|
||||
}
|
||||
return undef unless defined $unit_iid;
|
||||
return unless defined $unit_iid;
|
||||
|
||||
# Look up serial of found entry.
|
||||
my $e_serial = $foundry->e_serial();
|
||||
|
||||
@@ -31,22 +31,22 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::HP;
|
||||
$VERSION = '1.09';
|
||||
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
use SNMP::Info::Layer3;
|
||||
use SNMP::Info::MAU;
|
||||
use SNMP::Info::LLDP;
|
||||
use SNMP::Info::CDP;
|
||||
|
||||
use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %PORTSTAT %MODEL_MAP %MUNGE $INIT/ ;
|
||||
|
||||
@SNMP::Info::Layer2::HP::ISA = qw/SNMP::Info::Layer3 SNMP::Info::MAU SNMP::Info::LLDP
|
||||
SNMP::Info::CDP Exporter/;
|
||||
@SNMP::Info::Layer2::HP::EXPORT_OK = qw//;
|
||||
|
||||
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %PORTSTAT %MODEL_MAP %MUNGE/ ;
|
||||
|
||||
$VERSION = '1.09';
|
||||
|
||||
%MIBS = ( %SNMP::Info::Layer3::MIBS,
|
||||
%SNMP::Info::MAU::MIBS,
|
||||
%SNMP::Info::LLDP::MIBS,
|
||||
@@ -198,14 +198,14 @@ sub os_ver {
|
||||
if ($descr =~ m/revision ([A-Z]{1}\.\d{2}\.\d{2})/) {
|
||||
return $1;
|
||||
}
|
||||
return undef;
|
||||
return;
|
||||
}
|
||||
|
||||
# Lookup model number, and translate the part number to the common number
|
||||
sub model {
|
||||
my $hp = shift;
|
||||
my $id = $hp->id();
|
||||
return undef unless defined $id;
|
||||
return unless defined $id;
|
||||
my $model = &SNMP::translateObj($id);
|
||||
return $id unless defined $model;
|
||||
|
||||
@@ -316,7 +316,7 @@ sub slots {
|
||||
|
||||
my $e_name = $hp->e_name();
|
||||
|
||||
return undef unless defined $e_name;
|
||||
return unless defined $e_name;
|
||||
|
||||
my $slots;
|
||||
foreach my $slot (keys %$e_name) {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (c) 2008 Eric Miller
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
@@ -28,9 +29,8 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::N2270;
|
||||
$VERSION = '1.09';
|
||||
use strict;
|
||||
|
||||
use strict;
|
||||
use Exporter;
|
||||
use SNMP::Info;
|
||||
use SNMP::Info::Bridge;
|
||||
@@ -42,6 +42,8 @@ use SNMP::Info::Airespace;
|
||||
|
||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/;
|
||||
|
||||
$VERSION = '1.09';
|
||||
|
||||
%MIBS = (
|
||||
%SNMP::Info::MIBS,
|
||||
%SNMP::Info::Bridge::MIBS,
|
||||
@@ -81,7 +83,7 @@ sub vendor {
|
||||
sub model {
|
||||
my $n2270 = shift;
|
||||
my $id = $n2270->id();
|
||||
return undef unless defined $id;
|
||||
return unless defined $id;
|
||||
my $model = &SNMP::translateObj($id);
|
||||
return $id unless defined $model;
|
||||
$model =~ s/^sreg-WLANSecuritySwitch//i;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (c) 2008 Eric Miller
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
@@ -28,9 +29,8 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::NAP222x;
|
||||
$VERSION = '1.09';
|
||||
use strict;
|
||||
|
||||
use strict;
|
||||
use Exporter;
|
||||
use SNMP::Info::SONMP;
|
||||
use SNMP::Info::IEEE802dot11;
|
||||
@@ -41,6 +41,8 @@ use SNMP::Info::Layer2;
|
||||
|
||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
|
||||
|
||||
$VERSION = '1.09';
|
||||
|
||||
%MIBS = (
|
||||
%SNMP::Info::Layer2::MIBS,
|
||||
%SNMP::Info::IEEE802dot11::MIBS,
|
||||
@@ -95,22 +97,22 @@ sub os {
|
||||
sub os_bin {
|
||||
my $nap222x = shift;
|
||||
my $bin = $nap222x->nt_fw_ver();
|
||||
return undef unless defined $bin;
|
||||
return unless defined $bin;
|
||||
|
||||
if ($bin =~ m/(\d+\.\d+\.\d+)/){
|
||||
return $1;
|
||||
}
|
||||
return undef;
|
||||
return;
|
||||
}
|
||||
|
||||
sub model {
|
||||
my $nap222x = shift;
|
||||
my $descr = $nap222x->description();
|
||||
return undef unless defined $descr;
|
||||
return unless defined $descr;
|
||||
|
||||
return 'AP-2220' if ($descr =~ /2220/);
|
||||
return 'AP-2221' if ($descr =~ /2221/);
|
||||
return undef;
|
||||
return;
|
||||
}
|
||||
|
||||
sub mac {
|
||||
@@ -123,7 +125,7 @@ sub mac {
|
||||
next unless $sn;
|
||||
return $sn;
|
||||
}
|
||||
return undef;
|
||||
return;
|
||||
}
|
||||
|
||||
sub serial {
|
||||
@@ -136,7 +138,7 @@ sub serial {
|
||||
next unless $sn;
|
||||
return $sn;
|
||||
}
|
||||
return undef;
|
||||
return;
|
||||
}
|
||||
|
||||
sub interfaces {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (c) 2008 Bill Fenner
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
@@ -30,17 +31,16 @@
|
||||
package SNMP::Info::Layer2::Netgear;
|
||||
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
use SNMP::Info::Layer2;
|
||||
|
||||
|
||||
use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %MUNGE $INIT/;
|
||||
|
||||
$VERSION = '1.09';
|
||||
@SNMP::Info::Layer2::Netgear::ISA = qw/SNMP::Info::Layer2 Exporter/;
|
||||
@SNMP::Info::Layer2::Netgear::EXPORT_OK = qw//;
|
||||
|
||||
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
|
||||
|
||||
$VERSION = '1.09';
|
||||
|
||||
%MIBS = (
|
||||
%SNMP::Info::Layer2::MIBS,
|
||||
);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (c) 2008 Eric Miller
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
@@ -28,9 +29,8 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::Orinoco;
|
||||
$VERSION = '1.09';
|
||||
use strict;
|
||||
|
||||
use strict;
|
||||
use Exporter;
|
||||
use SNMP::Info::IEEE802dot11;
|
||||
use SNMP::Info::Layer2;
|
||||
@@ -40,6 +40,8 @@ use SNMP::Info::Layer2;
|
||||
|
||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
|
||||
|
||||
$VERSION = '1.09';
|
||||
|
||||
%MIBS = (
|
||||
%SNMP::Info::Layer2::MIBS,
|
||||
%SNMP::Info::IEEE802dot11::MIBS,
|
||||
@@ -74,7 +76,7 @@ sub os_ver {
|
||||
my $orinoco = shift;
|
||||
|
||||
my $descr = $orinoco->description();
|
||||
return undef unless defined $descr;
|
||||
return unless defined $descr;
|
||||
|
||||
if ($descr =~ m/V(\d+\.\d+)/){
|
||||
return $1;
|
||||
@@ -83,14 +85,14 @@ sub os_ver {
|
||||
return $1;
|
||||
}
|
||||
|
||||
return undef;
|
||||
return;
|
||||
}
|
||||
|
||||
sub os_bin {
|
||||
my $orinoco = shift;
|
||||
|
||||
my $descr = $orinoco->description();
|
||||
return undef unless defined $descr;
|
||||
return unless defined $descr;
|
||||
|
||||
if ($descr =~ m/V(\d+\.\d+)$/){
|
||||
return $1;
|
||||
@@ -99,7 +101,7 @@ sub os_bin {
|
||||
return $1;
|
||||
}
|
||||
|
||||
return undef;
|
||||
return;
|
||||
}
|
||||
|
||||
sub vendor {
|
||||
@@ -110,18 +112,18 @@ sub model {
|
||||
my $orinoco = shift;
|
||||
|
||||
my $descr = $orinoco->description();
|
||||
return undef unless defined $descr;
|
||||
return unless defined $descr;
|
||||
|
||||
return $1 if ($descr =~ /(AP-\d+)/);
|
||||
return 'WavePOINT-II' if ($descr =~ /WavePOINT-II/);
|
||||
return undef;
|
||||
return;
|
||||
}
|
||||
|
||||
sub serial {
|
||||
my $orinoco = shift;
|
||||
|
||||
my $descr = $orinoco->description();
|
||||
return undef unless defined $descr;
|
||||
return unless defined $descr;
|
||||
|
||||
$descr = $1 if $descr =~ /SN-(\S+)/;
|
||||
return $descr;
|
||||
|
||||
@@ -29,17 +29,17 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::ZyXEL_DSLAM;
|
||||
$VERSION = '1.09';
|
||||
|
||||
use strict;
|
||||
|
||||
use Exporter;
|
||||
use SNMP::Info::Layer2;
|
||||
|
||||
@SNMP::Info::Layer2::ZyXEL_DSLAM::ISA = qw/SNMP::Info::Layer2 Exporter/;
|
||||
@SNMP::Info::Layer2::ZyXEL_DSLAM::EXPORT_OK = qw//;
|
||||
|
||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/;
|
||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
|
||||
|
||||
$VERSION = '1.09';
|
||||
|
||||
# Set for No CDP
|
||||
%GLOBALS = (
|
||||
@@ -85,7 +85,7 @@ sub os_ver {
|
||||
if ($descr =~ m/version (\S+) /){
|
||||
return $1;
|
||||
}
|
||||
return undef;
|
||||
return;
|
||||
}
|
||||
|
||||
sub model {
|
||||
@@ -98,7 +98,7 @@ sub model {
|
||||
} elsif ($desc =~ /8-port ADSL Module\(Annex B\)/){
|
||||
return "AAM1008-63";
|
||||
}
|
||||
return undef;
|
||||
return;
|
||||
}
|
||||
|
||||
sub ip{
|
||||
|
||||
Reference in New Issue
Block a user