This commit is contained in:
Eric Miller
2008-07-20 03:30:56 +00:00
parent 6c7df418af
commit 158596cede
69 changed files with 7547 additions and 6963 deletions

488
Info.pm

File diff suppressed because it is too large Load Diff

View File

@@ -72,6 +72,7 @@ $VERSION = '1.09';
%FUNCS = (
%SNMP::Info::FUNCS,
# AIRESPACE-WIRELESS-MIB::bsnDot11EssTable
'airespace_ess_idx' => 'bsnDot11EssIndex',
'airespace_ess_ssid' => 'bsnDot11EssSsid',
@@ -82,6 +83,7 @@ $VERSION = '1.09';
'airespace_ess_qos' => 'bsnDot11EssQualityOfService',
'airespace_ess_ifname' => 'bsnDot11EssInterfaceName',
'airespace_ess_aclname' => 'bsnDot11EssAclName',
# AIRESPACE-WIRELESS-MIB::bsnAPTable
'airespace_ap_mac' => 'bsnAPDot3MacAddress',
'airespace_ap_name' => 'bsnAPName',
@@ -93,6 +95,7 @@ $VERSION = '1.09';
'airespace_ap_serial' => 'bsnAPSerialNumber',
'airespace_ap_type' => 'bsnAPType',
'airespace_ap_status' => 'bsnAPAdminStatus',
# AIRESPACE-WIRELESS-MIB::bsnAPIfTable
'airespace_apif_slot' => 'bsnAPIfSlotId',
'airespace_apif_type' => 'bsnAPIfType',
@@ -101,6 +104,7 @@ $VERSION = '1.09';
'airespace_apif' => 'bsnAPIfOperStatus',
'airespace_apif_oride' => 'bsnAPIfWlanOverride',
'airespace_apif_admin' => 'bsnAPIfAdminStatus',
# AIRESPACE-WIRELESS-MIB::bsnMobileStationTable
'airespace_sta_mac' => 'bsnMobileStationAPMacAddr',
'fw_mac' => 'bsnMobileStationMacAddress',
@@ -108,6 +112,7 @@ $VERSION = '1.09';
'airespace_sta_ess_idx' => 'bsnMobileStationEssIndex',
'airespace_sta_ssid' => 'bsnMobileStationSsid',
'airespace_sta_delete' => 'bsnMobileStationDeleteAction',
# AIRESPACE-WIRELESS-MIB::bsnUsersTable
'airespace_user_name' => 'bsnUserName',
'airespace_user_pw' => 'bsnUserPassword',
@@ -116,13 +121,16 @@ $VERSION = '1.09';
'airespace_user_type' => 'bsnUserType',
'airespace_user_ifname' => 'bsnUserInterfaceName',
'airespace_user_rstat' => 'bsnUserRowStatus',
# AIRESPACE-WIRELESS-MIB::bsnBlackListClientTable
'airespace_bl_mac' => 'bsnBlackListClientMacAddress',
'airespace_bl_descr' => 'bsnBlackListClientDescription',
'airespace_bl_rstat' => 'bsnBlackListClientRowStatus',
# AIRESPACE-WIRELESS-MIB::bsnAPIfWlanOverrideTable
'airespace_oride_id' => 'bsnAPIfWlanOverrideId',
'airespace_oride_ssid' => 'bsnAPIfWlanOverrideSsid',
# AIRESPACE-SWITCHING-MIB::agentInterfaceConfigTable
'airespace_if_name' => 'agentInterfaceName',
'airespace_if_vlan' => 'agentInterfaceVlanId',
@@ -132,6 +140,7 @@ $VERSION = '1.09';
'airespace_if_mask' => 'agentInterfaceIPNetmask',
'airespace_if_acl' => 'agentInterfaceAclName',
'airespace_if_rstat' => 'agentInterfaceRowStatus',
# AIRESPACE-SWITCHING-MIB::agentPortConfigTable
'airespace_duplex_admin' => 'agentPortPhysicalMode',
'airespace_duplex' => 'agentPortPhysicalStatus',
@@ -181,7 +190,8 @@ sub i_index {
foreach my $ap_id ( keys %$ap_index ) {
if ( $ap_id =~ /(\d+\.\d+\.\d+\.\d+\.\d+\.\d+)\.(\d+)/ ) {
my $mac = join(':',map {sprintf("%02x",$_)} split(/\./,$1));
my $mac = join( ':',
map { sprintf( "%02x", $_ ) } split( /\./, $1 ) );
my $slot = $2;
next unless ( ( defined $mac ) and ( defined $slot ) );
@@ -648,7 +658,6 @@ sub i_80211channel {
return \%i_80211channel;
}
# Pseudo ENTITY-MIB methods
sub e_index {
@@ -657,17 +666,20 @@ sub e_index {
my $ap_model = $airespace->airespace_ap_model() || {};
my %e_index;
# Chassis
$e_index{1} = 1;
# We're going to hack an index to capture APs
foreach my $idx ( keys %$ap_model ) {
# Create the integer index by joining the last three octets of the MAC.
# Hopefully, this will be unique since the manufacturer should be
# limited to Airespace and Cisco. We can't use the entire MAC since
# we would exceed the intger size limit.
if ( $idx =~ /(\d+\.\d+\.\d+)$/ ) {
my $index = int (join('',map { sprintf "%03d",$_ } split /\./, $1));
my $index = int(
join( '', map { sprintf "%03d", $_ } split /\./, $1 ) );
$e_index{$idx} = $index;
}
}
@@ -684,6 +696,7 @@ sub e_class {
if ( $iid eq 1 ) {
$e_class{$iid} = 'chassis';
}
# This isn't a valid PhysicalClass, but we're hacking this anyway
else {
$e_class{$iid} = 'ap';
@@ -698,6 +711,7 @@ sub e_name {
my $ap_name = $airespace->airespace_ap_name() || {};
my %e_name;
# Chassis
$e_name{1} = 'WLAN Controller';
@@ -716,6 +730,7 @@ sub e_descr {
my $ap_loc = $airespace->airespace_ap_loc() || {};
my %e_descr;
# Chassis
$e_descr{1} = $airespace->airespace_prod_name();
@@ -737,6 +752,7 @@ sub e_model {
my $ap_model = $airespace->airespace_ap_model() || {};
my %e_model;
# Chassis
$e_model{1} = $airespace->airespace_model();
@@ -756,6 +772,7 @@ sub e_type {
my $ap_type = $airespace->airespace_ap_type() || {};
my %e_type;
# Chassis
$e_type{1} = $airespace->airespace_type();
@@ -775,6 +792,7 @@ sub e_fwver {
my $ap_fw = $airespace->airespace_ap_fw() || {};
my %e_fwver;
# Chassis
$e_fwver{1} = $airespace->airespace_maint_ver();
@@ -806,6 +824,7 @@ sub e_serial {
my $ap_serial = $airespace->airespace_ap_serial() || {};
my %e_serial;
# Chassis
$e_serial{1} = $airespace->airespace_serial();
@@ -845,6 +864,7 @@ sub e_swver {
my $ap_sw = $airespace->airespace_ap_sw() || {};
my %e_swver;
# Chassis
$e_swver{1} = $airespace->airespace_os();
@@ -998,8 +1018,8 @@ Layer3 mode.
=item $airespace->airespace_ul_mode()
Transfer upload mode configures the mode to use when uploading from the switch.
Normal usage tftp.
Transfer upload mode configures the mode to use when uploading from the
switch. Normal usage tftp.
(C<agentTransferUploadMode>)
@@ -1012,8 +1032,8 @@ valid only when the Transfer Mode is tftp.
=item $airespace->airespace_ul_path()
Transfer upload tftp path configures the directory path where the file is to be
uploaded to. The switch remembers the last file path used.
Transfer upload tftp path configures the directory path where the file is to
be uploaded to. The switch remembers the last file path used.
(C<agentTransferUploadPath>)
@@ -1023,7 +1043,8 @@ uploaded to. The switch remembers the last file path used.
=item $airespace->airespace_ul_type()
Transfer upload datatype configures the type of file to upload from the switch.
Transfer upload datatype configures the type of file to upload from the
switch.
The types for upload are:
config(2)
@@ -1518,8 +1539,8 @@ only.
=item $airespace->i_duplex_admin()
Returns reference to hash of IIDs to admin duplex setting. Ethernet interfaces
only.
Returns reference to hash of IIDs to admin duplex setting. Ethernet
interfaces only.
=item $airespace->ip_index()
@@ -1548,8 +1569,8 @@ airespace_sta_slot() combined to match the interface iid.
=head2 Pseudo F<ENTITY-MIB> information
These methods emulate F<ENTITY-MIB> Physical Table methods using
F<AIRESPACE-SWITCHING-MIB> and F<AIRESPACE-WIRELESS-MIB>. Thin APs are included
as subcomponents of the wireless controller.
F<AIRESPACE-SWITCHING-MIB> and F<AIRESPACE-WIRELESS-MIB>. Thin APs are
included as subcomponents of the wireless controller.
=over

View File

@@ -44,7 +44,8 @@ use vars qw/$VERSION $DEBUG %MIBS %FUNCS %GLOBALS %MUNGE $INIT/;
$VERSION = '1.09';
%MIBS = ('BRIDGE-MIB' => 'dot1dBaseBridgeAddress',
%MIBS = (
'BRIDGE-MIB' => 'dot1dBaseBridgeAddress',
'Q-BRIDGE-MIB' => 'dot1qPvid',
);
@@ -52,10 +53,12 @@ $VERSION = '1.09';
'b_mac' => 'dot1dBaseBridgeAddress',
'b_ports' => 'dot1dBaseNumPorts',
'b_type' => 'dot1dBaseType',
# Spanning Tree Protocol
'stp_ver' => 'dot1dStpProtocolSpecification',
'stp_time' => 'dot1dStpTimeSinceTopologyChange',
'stp_root' => 'dot1dStpDesignatedRoot',
# Q-BRIDGE-MIB
'qb_vlans_max' => 'dot1qMaxSupportedVlans',
'qb_vlans' => 'dot1qNumVlans',
@@ -63,18 +66,22 @@ $VERSION = '1.09';
);
%FUNCS = (
# Forwarding Table: Dot1dTpFdbEntry
'fw_mac' => 'dot1dTpFdbAddress',
'fw_port' => 'dot1dTpFdbPort',
'fw_status' => 'dot1dTpFdbStatus',
# Bridge Port Table: Dot1dBasePortEntry
'bp_index' => 'dot1dBasePortIfIndex',
'bp_port' => 'dot1dBasePortCircuit',
# Bridge Static (Destination-Address Filtering) Database
'bs_mac' => 'dot1dStaticAddress',
'bs_port' => 'dot1dStaticReceivePort',
'bs_to' => 'dot1dStaticAllowedToGoTo',
'bs_status' => 'dot1dStaticStatus',
# Spanning Tree Protocol Table : dot1dStpPortTable
'stp_p_id' => 'dot1dStpPort',
'stp_p_priority' => 'dot1dStpPortPriority',
@@ -83,28 +90,34 @@ $VERSION = '1.09';
'stp_p_root' => 'dot1dStpPortDesignatedRoot',
'stp_p_bridge' => 'dot1dStpPortDesignatedBridge',
'stp_p_port' => 'dot1dStpPortDesignatedPort',
# Q-BRIDGE-MIB : dot1qPortVlanTable
'qb_i_vlan' => 'dot1qPvid',
'qb_i_vlan_type' => 'dot1qPortAcceptableFrameTypes',
'qb_i_vlan_in_flt' => 'dot1qPortIngressFiltering',
# Q-BRIDGE-MIB : dot1qVlanCurrentTable
'qb_cv_egress' => 'dot1qVlanCurrentEgressPorts',
'qb_cv_untagged' => 'dot1qVlanCurrentUntaggedPorts',
'qb_cv_stat' => 'dot1qVlanStatus',
# Q-BRIDGE-MIB : dot1qVlanStaticTable
'v_name' => 'dot1qVlanStaticName',
'qb_v_egress' => 'dot1qVlanStaticEgressPorts',
'qb_v_fbdn_egress' => 'dot1qVlanForbiddenEgressPorts',
'qb_v_untagged' => 'dot1qVlanStaticUntaggedPorts',
'qb_v_stat' => 'dot1qVlanStaticRowStatus',
# VLAN Forwarding Table: Dot1qTpFdbEntry
'qb_fw_port' => 'dot1qTpFdbPort',
'qb_fw_status' => 'dot1qTpFdbStatus',
);
%MUNGE = (
# Inherit all the built in munging
%SNMP::Info::MUNGE,
# Add ones for our class
'b_mac' => \&SNMP::Info::munge_mac,
'fw_mac' => \&SNMP::Info::munge_mac,
@@ -294,7 +307,6 @@ sub i_vlan_membership {
# zero partial for no time filter.
# my $v_ports = $bridge->qb_cv_egress() || $bridge->qb_v_egress();
my $v_ports = $bridge->qb_v_egress() || {};
my $i_vlan_membership = {};
@@ -303,6 +315,7 @@ sub i_vlan_membership {
my $portlist = $v_ports->{$idx};
my $ret = [];
my $vlan;
# Strip TimeFilter if we're using VlanCurrentTable
( $vlan = $idx ) =~ s/^\d+\.//;
@@ -362,8 +375,12 @@ sub _check_forbidden_ports {
my $forbidden_ports = $iv_forbidden->{$vlan_id};
print "Forbidden ports: @$forbidden_ports\n" if $bridge->debug();
if ( defined(@$forbidden_ports[$index-1]) and (@$forbidden_ports[$index-1] eq "1")) {
print "Error: Index: $index in forbidden list for VLAN: $vlan_id unable to add.\n" if $bridge->debug();
if ( defined( @$forbidden_ports[ $index - 1 ] )
and ( @$forbidden_ports[ $index - 1 ] eq "1" ) )
{
print
"Error: Index: $index in forbidden list for VLAN: $vlan_id unable to add.\n"
if $bridge->debug();
return;
}
return 1;
@@ -374,8 +391,11 @@ sub _validate_vlan_param {
my ( $vlan_id, $ifindex ) = @_;
# VID and ifIndex should both be numeric
unless ( defined $vlan_id and defined $ifindex and
$vlan_id =~ /^\d+$/ and $ifindex =~ /^\d+$/ ) {
unless (defined $vlan_id
and defined $ifindex
and $vlan_id =~ /^\d+$/
and $ifindex =~ /^\d+$/ )
{
$bridge->error_throw("Invalid parameter.");
return;
}
@@ -403,7 +423,8 @@ sub _validate_vlan_param {
$vlan_exists = 1 if ( $vlan_id eq $vlan );
}
unless ($vlan_exists) {
$bridge->error_throw("VLAN $vlan_id does not exist or is not operational.");
$bridge->error_throw(
"VLAN $vlan_id does not exist or is not operational.");
return;
}
@@ -457,8 +478,8 @@ Max Baker
F<BRIDGE-MIB> is used by most Layer 2 devices, and holds information like the
MAC Forwarding Table and Spanning Tree Protocol info.
F<Q-BRIDGE-MIB> holds 802.1q information -- VLANs and Trunking. Cisco tends not
to use this MIB, but some proprietary ones. HP and some nicer vendors use
F<Q-BRIDGE-MIB> holds 802.1q information -- VLANs and Trunking. Cisco tends
not to use this MIB, but some proprietary ones. HP and some nicer vendors use
this. This is from C<RFC2674_q>.
Create or use a subclass of SNMP::Info that inherits this class. Do not use

View File

@@ -95,10 +95,10 @@ sub hasCDP {
my $ver = $cdp->{_version};
# SNMP v1 clients dont have the globals
if ( defined $ver and $ver == 1 ) {
my $c_ip = $cdp->c_ip();
# See if anything in cdp cache, if so we have cdp
return 1 if ( defined $c_ip and scalar( keys %$c_ip ) );
return;
@@ -117,7 +117,9 @@ sub c_if {
# Nope, didn't think so. Now we fake it.
my $c_ip = $cdp->c_ip();
unless ( defined $c_ip ) {
$cdp->error_throw("SNMP::Info::CDP:c_if() - Device doesn't have cdp_ip() data. Can't fake cdp_index()");
$cdp->error_throw(
"SNMP::Info::CDP:c_if() - Device doesn't have cdp_ip() data. Can't fake cdp_index()"
);
return;
}
@@ -125,6 +127,7 @@ sub c_if {
foreach my $key ( keys %$c_ip ) {
next unless defined $key;
my $iid = $key;
# Truncate .1 from cdp cache entry
$iid =~ s/\.\d+$//;
$c_if{$key} = $iid;

View File

@@ -48,12 +48,14 @@ $VERSION = '1.09';
);
%GLOBALS = (
# OLD-CISCO-SYS-MIB
'old_write_mem' => 'writeMem',
'old_write_net' => 'writeNet',
);
%FUNCS = (
# CISCO-COPY-CONFIG-MIB::ccCopyTable
'config_protocol' => 'ccCopyProtocol',
'config_source_type' => 'ccCopySourceFileType',
@@ -68,6 +70,7 @@ $VERSION = '1.09';
'config_copy_complete_time' => 'ccCopyTimeCompleted',
'config_fail_cause' => 'ccCopyFailCause',
'config_row_status' => 'ccCopyEntryRowStatus',
# CISCO-FLASH-MIB::ciscoFlashCopyTable
'flash_copy_cmd' => 'ciscoFlashCopyCommand',
'flash_copy_protocol' => 'ciscoFlashCopyProtocol',
@@ -77,8 +80,7 @@ $VERSION = '1.09';
'flash_copy_row_status' => 'ciscoFlashCopyEntryStatus',
);
%MUNGE = (
);
%MUNGE = ();
sub copy_run_tftp {
my $ciscoconfig = shift;
@@ -87,49 +89,62 @@ sub copy_run_tftp {
srand( time() ^ ( $$ + ( $$ << 15 ) ) );
my $rand = int( rand( 1 << 24 ) );
print "Saving running config to $tftphost as $tftpfile\n" if $ciscoconfig->debug();
print "Saving running config to $tftphost as $tftpfile\n"
if $ciscoconfig->debug();
#Try new method first fall back to old method
if ( $ciscoconfig->set_config_protocol( 1, $rand ) ) {
print "Using new method, row iid: $rand\n" if $ciscoconfig->debug();
#Check each set, delete created row if any fail
unless ( $ciscoconfig->set_config_source_type( 4, $rand ) ) {
$ciscoconfig->error_throw("Setting source type failed");
unless ( $ciscoconfig->set_config_row_status( 6, $rand ) ) {
$ciscoconfig->error_throw("Setting source type failed and failed to delete row $rand");
$ciscoconfig->error_throw(
"Setting source type failed and failed to delete row $rand"
);
}
return;
}
unless ( $ciscoconfig->set_config_dest_type( 1, $rand ) ) {
$ciscoconfig->error_throw("Setting destination type failed");
unless ( $ciscoconfig->set_config_row_status( 6, $rand ) ) {
$ciscoconfig->error_throw("Setting dest type failed and failed to delete row $rand");
$ciscoconfig->error_throw(
"Setting dest type failed and failed to delete row $rand"
);
}
return;
}
unless ( $ciscoconfig->set_config_server_addr( $tftphost, $rand ) ) {
$ciscoconfig->error_throw("Setting tftp server failed");
unless ( $ciscoconfig->set_config_row_status( 6, $rand ) ) {
$ciscoconfig->error_throw("Setting tftp server failed and failed to delete row $rand");
$ciscoconfig->error_throw(
"Setting tftp server failed and failed to delete row $rand"
);
}
return;
}
unless ( $ciscoconfig->set_config_filename( $tftpfile, $rand ) ) {
$ciscoconfig->error_throw("Setting file name failed");
unless ( $ciscoconfig->set_config_row_status( 6, $rand ) ) {
$ciscoconfig->error_throw("Setting file name failed and failed to delete row $rand");
$ciscoconfig->error_throw(
"Setting file name failed and failed to delete row $rand"
);
}
return;
}
unless ( $ciscoconfig->set_config_row_status( 1, $rand ) ) {
$ciscoconfig->error_throw("Initiating transfer failed");
unless ( $ciscoconfig->set_config_row_status( 6, $rand ) ) {
$ciscoconfig->error_throw("Initiating transfer failed and failed to delete row $rand");
$ciscoconfig->error_throw(
"Initiating transfer failed and failed to delete row $rand"
);
}
return;
}
my $status = 0;
my $timer = 0;
# Hard-coded timeout of approximately 5 minutes, we can wrap this in an
# option later if needed
my $timeout = 300;
@@ -179,23 +194,28 @@ sub copy_run_start {
if ( $ciscoconfig->set_config_source_type( 4, $rand ) ) {
print "Using new method, row iid: $rand\n" if $ciscoconfig->debug();
#Check each set, delete created row if any fail
unless ( $ciscoconfig->set_config_dest_type( 3, $rand ) ) {
$ciscoconfig->error_throw("Setting dest type failed");
unless ( $ciscoconfig->set_config_row_status( 6, $rand ) ) {
$ciscoconfig->error_throw("Setting dest type failed and failed to delete row $rand");
$ciscoconfig->error_throw(
"Setting dest type failed and failed to delete row $rand"
);
}
return;
}
unless ( $ciscoconfig->set_config_row_status( 1, $rand ) ) {
$ciscoconfig->error_throw("Initiating save failed");
unless ( $ciscoconfig->set_config_row_status( 6, $rand ) ) {
$ciscoconfig->error_throw("Initiating save failed and failed to delete row $rand");
$ciscoconfig->error_throw(
"Initiating save failed and failed to delete row $rand");
}
return;
}
my $status = 0;
my $timer = 0;
# Hard-coded timeout of approximately 5 minutes, we can wrap this in an
# option later if needed
my $timeout = 300;
@@ -408,9 +428,10 @@ Table of Flash copy operation entries.
=head1 SET METHODS
These are methods that provide SNMP set functionality for overridden methods or
provide a simpler interface to complex set operations. See
L<SNMP::Info/"SETTING DATA VIA SNMP"> for general information on set operations.
These are methods that provide SNMP set functionality for overridden methods
or provide a simpler interface to complex set operations. See
L<SNMP::Info/"SETTING DATA VIA SNMP"> for general information on set
operations.
=over
@@ -420,9 +441,9 @@ Store the running configuration on a TFTP server. Equivalent to the CLI
commands "copy running-config tftp" or "write net".
This method attempts to use newer "copy running-config tftp" procedure first
and then the older "write net" procedure if that fails. The newer procedure is
supported Cisco devices with the F<CISCO-CONFIG-COPY-MIB> available, Cisco IOS
software release 12.0 or on some devices as early as release 11.2P. The
and then the older "write net" procedure if that fails. The newer procedure
is supported Cisco devices with the F<CISCO-CONFIG-COPY-MIB> available, Cisco
IOS software release 12.0 or on some devices as early as release 11.2P. The
older procedure has been depreciated by Cisco and is utilized only to support
devices running older code revisions.
@@ -436,11 +457,12 @@ Copy the running configuration to the start up configuration. Equivalent to
the CLI command C<"copy running-config startup-config"> or C<"write mem">.
This method attempts to use newer C<"copy running-config startup-config">
procedure first and then the older C<"write mem"> procedure if that fails. The
newer procedure is supported Cisco devices with the F<CISCO-CONFIG-COPY-MIB>
available, Cisco IOS software release 12.0 or on some devices as early as
release 11.2P. The older procedure has been depreciated by Cisco and is
utilized only to support devices running older code revisions.
procedure first and then the older C<"write mem"> procedure if that fails.
The newer procedure is supported Cisco devices with the
F<CISCO-CONFIG-COPY-MIB> available, Cisco IOS software release 12.0 or on
some devices as early as release 11.2P. The older procedure has been
depreciated by Cisco and is utilized only to support devices running older
code revisions.
Example:
$ciscoconfig->copy_run_start()

View File

@@ -1,4 +1,3 @@
package SNMP::Info::CiscoImage;
# $Id$
#
# Copyright (c) 2005 Matt Tuttle
@@ -28,6 +27,8 @@ package SNMP::Info::CiscoImage;
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
package SNMP::Info::CiscoImage;
use strict;
use Exporter;
use SNMP::Info;
@@ -39,19 +40,13 @@ use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '1.09';
%MIBS = (
'CISCO-IMAGE-MIB' => 'ciscoImageString',
);
%MIBS = ( 'CISCO-IMAGE-MIB' => 'ciscoImageString', );
%GLOBALS = (
);
%GLOBALS = ();
%FUNCS = (
'ci_images' => 'ciscoImageString',
);
%FUNCS = ( 'ci_images' => 'ciscoImageString', );
%MUNGE = (
);
%MUNGE = ();
1;
__END__

View File

@@ -47,6 +47,7 @@ $VERSION = '1.09';
);
%GLOBALS = (
# CISCO-PORT-SECURITY-MIB
'cps_clear' => 'cpsGlobalClearSecureMacAddresses',
'cps_notify' => 'cpsGlobalSNMPNotifControl',
@@ -57,6 +58,7 @@ $VERSION = '1.09';
);
%FUNCS = (
# CISCO-PORT-SECURITY-MIB::cpsIfConfigTable
'cps_i_limit_val' => 'cpsIfInvalidSrcRateLimitValue',
'cps_i_limit' => 'cpsIfInvalidSrcRateLimitEnable',
@@ -75,21 +77,25 @@ $VERSION = '1.09';
'cps_i_mac_max' => 'cpsIfMaxSecureMacAddr',
'cps_i_status' => 'cpsIfPortSecurityStatus',
'cps_i_enable' => 'cpsIfPortSecurityEnable',
# CISCO-PORT-SECURITY-MIB::cpsIfVlanTable
'cps_i_v_mac_count' => 'cpsIfVlanCurSecureMacAddrCount',
'cps_i_v_mac_max' => 'cpsIfVlanMaxSecureMacAddr',
'cps_i_v' => 'cpsIfVlanIndex',
# CISCO-PORT-SECURITY-MIB::cpsIfVlanSecureMacAddrTable
'cps_i_v_mac_status' => 'cpsIfVlanSecureMacAddrRowStatus',
'cps_i_v_mac_age' => 'cpsIfVlanSecureMacAddrRemainAge',
'cps_i_v_mac_type' => 'cpsIfVlanSecureMacAddrType',
'cps_i_v_vlan' => 'cpsIfVlanSecureVlanIndex',
'cps_i_v_mac' => 'cpsIfVlanSecureMacAddress',
# CISCO-PORT-SECURITY-MIB::cpsSecureMacAddressTable
'cps_m_status' => 'cpsSecureMacAddrRowStatus',
'cps_m_age' => 'cpsSecureMacAddrRemainingAge',
'cps_m_type' => 'cpsSecureMacAddrType',
'cps_m_mac' => 'cpsSecureMacAddress',
# IEEE8021-PAE-MIB::dot1xPaePortEntry
'pae_i_capabilities' => 'dot1xPaePortCapabilities',
'pae_i_last_eapol_frame_source' => 'dot1xAuthLastEapolFrameSource',
@@ -103,14 +109,17 @@ $VERSION = '1.09';
'pae_i_capabilities' => \&munge_pae_capabilities,
);
%PAECAPABILITIES = (0 => 'dot1xPaePortAuthCapable',
1 => 'dot1xPaePortSuppCapable');
%PAECAPABILITIES = (
0 => 'dot1xPaePortAuthCapable',
1 => 'dot1xPaePortSuppCapable'
);
sub munge_pae_capabilities {
my $bits = shift;
return unless defined $bits;
my @vals = map($PAECAPABILITIES{$_},sprintf("%x",unpack('b*',$bits)));
my @vals
= map( $PAECAPABILITIES{$_}, sprintf( "%x", unpack( 'b*', $bits ) ) );
return join( ' ', @vals );
}

View File

@@ -43,15 +43,11 @@ $VERSION = '1.09';
%MIBS = ( 'CISCO-POWER-ETHERNET-EXT-MIB' => 'cpeExtPsePortEntPhyIndex' );
%GLOBALS = (
);
%GLOBALS = ();
%FUNCS = (
'cpeth_ent_phy' => 'cpeExtPsePortEntPhyIndex',
);
%FUNCS = ( 'cpeth_ent_phy' => 'cpeExtPsePortEntPhyIndex', );
%MUNGE = (
);
%MUNGE = ();
# Cisco overcame the limitation of the module.port index of the
# pethPsePortTable by adding another mapping table, which maps
@@ -111,7 +107,8 @@ contains.
Create or use a device subclass that inherit this class. Do not use directly.
For debugging purposes you can call this class directly as you would SNMP::Info
For debugging purposes you can call this class directly as you would
SNMP::Info
my $poe = new SNMP::Info::CiscoPower (...);

View File

@@ -41,36 +41,37 @@ use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '1.09';
%MIBS = (
'CISCO-CLASS-BASED-QOS-MIB' => 'cbQosIfIndex',
);
%MIBS = ( 'CISCO-CLASS-BASED-QOS-MIB' => 'cbQosIfIndex', );
%GLOBALS = (
);
%GLOBALS = ();
%FUNCS = (
# CISCO-CLASS-BASED-QOS-MIB::cbQosServicePolicyTable
'qos_i_index' => 'cbQosIfIndex',
'qos_i_type' => 'cbQosIfType',
'qos_pol_direction' => 'cbQosPolicyDirection',
# CISCO-CLASS-BASED-QOS-MIB::cbQosObjectsTable
'qos_obj_conf_index' => 'cbQosConfigIndex',
'qos_obj_type' => 'cbQosObjectsType',
'qos_obj_parent' => 'cbQosParentObjectsIndex',
# CISCO-CLASS-BASED-QOS-MIB::cbQosCMCfgTable
'qos_cm_name' => 'cbQosCMName',
'qos_cm_desc' => 'cbQosCMDesc',
'qos_cm_info' => 'cbQosCMInfo',
# CISCO-CLASS-BASED-QOS-MIB::cbQosCMStatsTable
'qos_octet_pre' => 'cbQosCMPrePolicyByte',
'qos_octet_post' => 'cbQosCMPostPolicyByte',
# CISCO-CLASS-BASED-QOS-MIB::cbQosQueueingCfgTable
'qos_queueingcfg_bw' => 'cbQosQueueingCfgBandwidth',
'qos_queueingcfg_bw_units' => 'cbQosQueueingCfgBandwidthUnits',
);
%MUNGE = (
);
%MUNGE = ();
1;
__END__

View File

@@ -41,21 +41,18 @@ use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '1.09';
%MIBS = (
'CISCO-RTTMON-MIB' => 'rttMonCtrlAdminOwner',
);
%MIBS = ( 'CISCO-RTTMON-MIB' => 'rttMonCtrlAdminOwner', );
%GLOBALS = (
);
%GLOBALS = ();
%FUNCS = (
# CISCO-RTTMON-MIB
'rtt_desc' => 'rttMonCtrlAdminOwner',
'rtt_last' => 'rttMonLatestRttOperCompletionTime',
);
%MUNGE = (
);
%MUNGE = ();
1;
__END__

View File

@@ -41,9 +41,7 @@ use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE %PORTSTAT/;
$VERSION = '1.09';
%MIBS = (
'CISCO-STACK-MIB' => 'ciscoStackMIB',
);
%MIBS = ( 'CISCO-STACK-MIB' => 'ciscoStackMIB', );
%GLOBALS = (
'sysip' => 'sysIpAddr',
@@ -61,6 +59,7 @@ $VERSION = '1.09';
);
%FUNCS = (
# CISCO-STACK-MIB::moduleEntry
# These are blades in a catalyst device
'm_type' => 'moduleType',
@@ -73,10 +72,12 @@ $VERSION = '1.09';
'm_hwver' => 'moduleHwVersion',
'm_fwver' => 'moduleFwVersion',
'm_swver' => 'moduleSwVersion',
# Router Blades :
'm_ip' => 'moduleIPAddress',
'm_sub1' => 'moduleSubType',
'm_sub2' => 'moduleSubType2',
# CISCO-STACK-MIB::portEntry
'p_name' => 'portName',
'p_type' => 'portType',
@@ -90,6 +91,7 @@ $VERSION = '1.09';
'p_rx_flow_control_admin' => 'portAdminRxFlowControl',
'p_tx_flow_control_admin' => 'portAdminTxFlowControl',
'p_oidx' => 'portCrossIndex',
# CISCO-STACK-MIB::PortCpbEntry
'p_speed_admin' => 'portCpbSpeed',
'p_duplex_admin' => 'portCpbDuplex',
@@ -100,10 +102,12 @@ $VERSION = '1.09';
'p_duplex_admin' => \&SNMP::Info::munge_bits,
);
%PORTSTAT = (1 => 'other',
%PORTSTAT = (
1 => 'other',
2 => 'ok',
3 => 'minorFault',
4 => 'majorFault');
4 => 'majorFault'
);
# Changes binary byte describing each port into ascii, and returns
# an ascii list separated by spaces.
@@ -153,10 +157,12 @@ sub i_duplex {
my $iid = $p_port->{$port};
next unless defined $iid;
next if ( defined $partial and $iid !~ /^$partial$/ );
# Test for gigabit
if ( $p_duplex_cap->{$port} == 0 ) {
$i_duplex->{$iid} = 'full';
}
# Auto is not a valid operational state
elsif ( $p_duplex->{$port} eq 'auto' ) {
next;
@@ -186,10 +192,12 @@ sub i_duplex_admin {
my $iid = $p_port->{$port};
next unless defined $iid;
next if ( defined $partial and $iid !~ /^$partial$/ );
# Test for gigabit
if ( $p_duplex_cap->{$port} == 0 ) {
$i_duplex_admin->{$iid} = 'full';
}
# Check admin speed for auto
elsif ( $p_speed->{$port} =~ /auto/ ) {
$i_duplex_admin->{$iid} = 'auto';
@@ -210,7 +218,8 @@ sub i_speed_admin {
my %mapping = reverse %$p_port;
my $p_speed = $stack->p_speed( $mapping{$partial} );
my %speeds = ('autoDetect' => 'auto',
my %speeds = (
'autoDetect' => 'auto',
'autoDetect10100' => 'auto',
's10000000' => '10 Mbps',
's100000000' => '100 Mbps',
@@ -218,12 +227,14 @@ sub i_speed_admin {
's10G' => '10 Gbps',
);
%i_speed_admin = map { $p_port->{$_} => $speeds{$p_speed->{$_}} } keys %$p_port;
%i_speed_admin
= map { $p_port->{$_} => $speeds{ $p_speed->{$_} } } keys %$p_port;
return \%i_speed_admin;
}
sub set_i_speed_admin {
# map speeds to those the switch will understand
my %speeds = qw/auto 1 10 10000000 100 100000000 1000 1000000000/;
@@ -242,16 +253,19 @@ sub set_i_speed_admin {
}
sub set_i_duplex_admin {
# map a textual duplex to an integer one the switch understands
my %duplexes = qw/half 1 full 2 auto 4/;
my $stack = shift;
my ( $duplex, $iid ) = @_;
if ( $duplex eq 'auto' ) {
$stack->error_throw("Software doesn't support setting auto duplex with
$stack->error_throw(
"Software doesn't support setting auto duplex with
set_i_duplex_admin() you must use
set_i_speed_admin() and set both speed and duplex
to auto");
to auto"
);
return 0;
}
@@ -553,9 +567,9 @@ To see the status of port 4 :
Can be either C<on> C<off> or C<disagree>
"Indicates the receive flow control operational status of the port. If the port
could not agree with the far end on a link protocol, its operational status
will be disagree(3)."
"Indicates the receive flow control operational status of the port. If the
port could not agree with the far end on a link protocol, its operational
status will be disagree(3)."
C<portOperRxFlowControl>
@@ -576,8 +590,8 @@ Can be either C<on> C<off> or C<desired>
"Indicates the receive flow control administrative status set on the port. If
the status is set to on(1), the port will require the far end to send flow
control. If the status is set to off(2), the port will not allow far end to
send flow control. If the status is set to desired(3), the port will allow the
far end to send the flow control."
send flow control. If the status is set to desired(3), the port will allow
the far end to send the flow control."
C<portAdminRxFlowControl>
@@ -585,11 +599,11 @@ C<portAdminRxFlowControl>
Can be either C<on> C<off> or C<desired>
"Indicates the transmit flow control administrative status set on the port. If
the status is set to on(1), the port will send flow control to the far end. If
"Indicates the transmit flow control administrative status set on the port.
If the status is set to on(1), the port will send flow control to the far end. If
the status is set to off(2), the port will not send flow control to the far
end. If the status is set to desired(3), the port will send flow control to the
far end if the far end supports it."
end. If the status is set to desired(3), the port will send flow control to
the far end if the far end supports it."
C<portAdminTxFlowControl>

View File

@@ -50,6 +50,7 @@ $VERSION = '1.09';
'CISCO-MEMORY-POOL-MIB' => 'ciscoMemoryPoolUsed',
'OLD-CISCO-SYSTEM-MIB' => 'writeMem',
'CISCO-PRODUCTS-MIB' => 'sysName',
# some older catalysts live here
'CISCO-STACK-MIB' => 'wsc1900sysID',
'CISCO-ENTITY-VENDORTYPE-OID-MIB' => 'cevChassis',
@@ -58,36 +59,41 @@ $VERSION = '1.09';
%GLOBALS = (
'description' => 'sysDescr',
# We will use the numeric OID's so that we don't require people
# to install v1 MIBs, which can conflict.
# OLD-CISCO-CPU-MIB:avgBusyPer
'ios_cpu' => '1.3.6.1.4.1.9.2.1.56.0',
'ios_cpu_1min' => '1.3.6.1.4.1.9.2.1.57.0',
'ios_cpu_5min' => '1.3.6.1.4.1.9.2.1.58.0',
# CISCO-PROCESS-MIB
'cat_cpu' => 'cpmCPUTotal5sec.9',
'cat_cpu_1min' => 'cpmCPUTotal1min.9',
'cat_cpu_5min' => 'cpmCPUTotal5min.9',
# OLD-CISCO-SYSTEM-MIB
'write_mem' => 'writeMem',
);
%FUNCS = (
# CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolTable
'cisco_mem_free' => 'ciscoMemoryPoolFree',
'cisco_mem_used' => 'ciscoMemoryPoolUsed',
# CISCO-FLASH-MIB::ciscoFlashDeviceTable
'cisco_flash_size' => 'ciscoFlashDeviceSize',
);
%MUNGE = (
);
%MUNGE = ();
sub os {
my $l2 = shift;
my $descr = $l2->description() || '';
# order here matters - there are Catalysts that run IOS and have catalyst in their description field.
# order here matters - there are Catalysts that run IOS and have catalyst
# in their description field.
return 'ios' if ( $descr =~ /IOS/ );
return 'catalyst' if ( $descr =~ /catalyst/i );
return;
@@ -99,12 +105,18 @@ sub os_ver {
my $descr = $l2->description();
# Older Catalysts
if (defined $os and $os eq 'catalyst' and defined $descr and $descr =~ m/V(\d{1}\.\d{2}\.\d{2})/){
if ( defined $os
and $os eq 'catalyst'
and defined $descr
and $descr =~ m/V(\d{1}\.\d{2}\.\d{2})/ )
{
return $1;
}
# Newer Catalysts and IOS devices
if (defined $descr and $descr =~ m/Version (\d+\.\d+\([^)]+\)[^,\s]*)(,|\s)+/ ){
if ( defined $descr
and $descr =~ m/Version (\d+\.\d+\([^)]+\)[^,\s]*)(,|\s)+/ )
{
return $1;
}
return;
@@ -197,7 +209,8 @@ __END__
=head1 NAME
SNMP::Info::CiscoStats - Perl5 Interface to CPU and Memory stats for Cisco Devices
SNMP::Info::CiscoStats - Perl5 Interface to CPU and Memory stats for Cisco
Devices
=head1 AUTHOR
@@ -221,8 +234,8 @@ Max Baker
=head1 DESCRIPTION
SNMP::Info::CiscoStats is a subclass of SNMP::Info that provides cpu, memory, os and
version information about Cisco Devices.
SNMP::Info::CiscoStats is a subclass of SNMP::Info that provides cpu, memory,
os and version information about Cisco Devices.
Use or create in a subclass of SNMP::Info. Do not use directly.

View File

@@ -59,6 +59,7 @@ $VERSION = '1.09';
);
%FUNCS = (
# CISCO-VTP-MIB::managementDomainTable
'vtp_d_index' => 'managementDomainIndex',
'vtp_d_name' => 'managementDomainName',
@@ -71,6 +72,7 @@ $VERSION = '1.09';
'vtp_d_tftp_path' => 'managementDomainTftpPathname',
'vtp_d_pruning' => 'managementDomainPruningState',
'vtp_d_ver' => 'managementDomainVersionInUse',
# CISCO-VTP-MIB::vtpVlanTable
'v_state' => 'vtpVlanState',
'v_type' => 'vtpVlanType',
@@ -89,6 +91,7 @@ $VERSION = '1.09';
'v_crf' => 'vtpVlanIsCRFBackup',
'v_type_ext' => 'vtpVlanTypeExt',
'v_if' => 'vtpVlanIfIndex',
# CISCO-VLAN-MEMBERSHIP-MIB::vmMembershipTable
'i_vlan_type' => 'vmVlanType',
'i_vlan2' => 'vmVlan',
@@ -97,10 +100,13 @@ $VERSION = '1.09';
'i_vlan_2' => 'vmVlans2k',
'i_vlan_3' => 'vmVlans3k',
'i_vlan_4' => 'vmVlans4k',
# CISCO-VLAN-MEMBERSHIP-MIB::vmVoiceVlanTable
'i_voice_vlan' => 'vmVoiceVlanId',
# CISCO-VLAN-IFTABLE-RELATIONSHIP-MIB
'v_cvi_if' => 'cviRoutedVlanIfIndex',
# CISCO-VTP-MIB::vlanTrunkPortTable
'vtp_trunk_mgmt_dom' => 'vlanTrunkPortManagementDomain',
'vtp_trunk_encaps_t' => 'vlanTrunkPortEncapsulationType',
@@ -115,14 +121,14 @@ $VERSION = '1.09';
'vtp_trunk_dyn_stat' => 'vlanTrunkPortDynamicStatus',
'vtp_trunk_vtp' => 'vlanTrunkPortVtpEnabled',
'vtp_trunk_encaps' => 'vlanTrunkPortEncapsulationOperType',
# TODO Add these tables if someone wants them..
# vtpEditControlTable
# vtpVlanEditTable
# vtpStatsTable
);
%MUNGE = (
);
%MUNGE = ();
sub v_index {
my $vtp = shift;
@@ -146,6 +152,7 @@ sub i_vlan {
my $trunk_dyn_stat = $vtp->vtp_trunk_dyn_stat($partial) || {};
my %i_vlans;
# Get access ports
foreach my $port ( keys %$i_vlan ) {
my $vlan = $i_vlan->{$port};
@@ -237,7 +244,8 @@ sub i_vlan_membership {
next unless $list;
my $vlanlist = [ split( //, unpack( "B*", $list ) ) ];
foreach my $vlan ( keys %oper_vlans ) {
push(@{$i_vlan_membership->{$port}}, $vlan) if (@$vlanlist[$vlan-$offset]);
push( @{ $i_vlan_membership->{$port} }, $vlan )
if ( @$vlanlist[ $vlan - $offset ] );
}
}
}
@@ -255,11 +263,15 @@ sub set_i_pvid {
my $native_vlan = $vtp->vtp_trunk_native($ifindex);
if ( defined $native_vlan ) {
print "Changing native VLAN from $native_vlan->{$ifindex} to $vlan_id on IfIndex: $ifindex\n" if $vtp->debug();
print
"Changing native VLAN from $native_vlan->{$ifindex} to $vlan_id on IfIndex: $ifindex\n"
if $vtp->debug();
my $rv = $vtp->set_vtp_trunk_native( $vlan_id, $ifindex );
unless ($rv) {
$vtp->error_throw("Unable to change native VLAN to $vlan_id on IfIndex: $ifindex");
$vtp->error_throw(
"Unable to change native VLAN to $vlan_id on IfIndex: $ifindex"
);
return;
}
return $rv;
@@ -277,11 +289,14 @@ sub set_i_vlan {
my $i_vlan = $vtp->i_vlan2($ifindex);
if ( defined $i_vlan ) {
print "Changing VLAN from $i_vlan->{$ifindex} to $vlan_id on IfIndex: $ifindex\n" if $vtp->debug();
print
"Changing VLAN from $i_vlan->{$ifindex} to $vlan_id on IfIndex: $ifindex\n"
if $vtp->debug();
my $rv = $vtp->set_i_vlan2( $vlan_id, $ifindex );
unless ($rv) {
$vtp->error_throw("Unable to change VLAN to $vlan_id on IfIndex: $ifindex");
$vtp->error_throw(
"Unable to change VLAN to $vlan_id on IfIndex: $ifindex");
return;
}
return $rv;
@@ -302,26 +317,34 @@ sub set_add_i_vlan_tagged {
my $trunk_members = $vtp->vtp_trunk_vlans($ifindex);
unless ( defined $trunk_members ) {
$vtp->error_throw("Can't find ifIndex: $ifindex - Is it a trunk port?");
$vtp->error_throw(
"Can't find ifIndex: $ifindex - Is it a trunk port?");
return;
}
my @member_list = split( //, unpack( "B*", $trunk_members->{$ifindex} ) );
print "Original vlan list for ifIndex: $ifindex: @member_list \n" if $vtp->debug();
print "Original vlan list for ifIndex: $ifindex: @member_list \n"
if $vtp->debug();
$member_list[$vlan_id] = '1';
print "Modified vlan list for ifIndex: $ifindex: @member_list \n" if $vtp->debug();
print "Modified vlan list for ifIndex: $ifindex: @member_list \n"
if $vtp->debug();
my $new_list = pack( "B*", join( '', @member_list ) );
#Add VLAN to member list
my $list_rv = $vtp->set_vtp_trunk_vlans( $new_list, $ifindex );
unless ($list_rv) {
$vtp->error_throw("Unable to add VLAN: $vlan_id to ifIndex: $ifindex member list");
$vtp->error_throw(
"Unable to add VLAN: $vlan_id to ifIndex: $ifindex member list");
return;
}
#Make sure no other SNMP manager was making modifications at the same time.
my $serial_rv = $vtp->set_vtp_trunk_set_serial($trunk_serial);
unless ($serial_rv) {
$vtp->error_throw("Unable to increment trunk set serial number - check configuration!");
$vtp->error_throw(
"Unable to increment trunk set serial number - check configuration!"
);
return;
}
return 1;
@@ -339,26 +362,35 @@ sub set_remove_i_vlan_tagged {
my $trunk_members = $vtp->vtp_trunk_vlans($ifindex);
unless ( defined $trunk_members ) {
$vtp->error_throw("Can't find ifIndex: $ifindex - Is it a trunk port?");
$vtp->error_throw(
"Can't find ifIndex: $ifindex - Is it a trunk port?");
return;
}
my @member_list = split( //, unpack( "B*", $trunk_members->{$ifindex} ) );
print "Original vlan list for ifIndex: $ifindex: @member_list \n" if $vtp->debug();
print "Original vlan list for ifIndex: $ifindex: @member_list \n"
if $vtp->debug();
$member_list[$vlan_id] = '0';
print "Modified vlan list for ifIndex: $ifindex: @member_list \n" if $vtp->debug();
print "Modified vlan list for ifIndex: $ifindex: @member_list \n"
if $vtp->debug();
my $new_list = pack( "B*", join( '', @member_list ) );
#Remove VLAN to member list
my $list_rv = $vtp->set_vtp_trunk_vlans( $new_list, $ifindex );
unless ($list_rv) {
$vtp->error_throw("Error: Unable to remove VLAN: $vlan_id from ifIndex: $ifindex member list");
$vtp->error_throw(
"Error: Unable to remove VLAN: $vlan_id from ifIndex: $ifindex member list"
);
return;
}
#Make sure no other manager was making modifications at the same time.
my $serial_rv = $vtp->set_vtp_trunk_set_serial($trunk_serial);
unless ($serial_rv) {
$vtp->error_throw("Error: Unable to increment trunk set serial number - check configuration!");
$vtp->error_throw(
"Error: Unable to increment trunk set serial number - check configuration!"
);
return;
}
return 1;
@@ -372,7 +404,11 @@ sub _validate_vlan_param {
my ( $vlan_id, $ifindex ) = @_;
# VID and ifIndex should both be numeric
unless ( defined $vlan_id and defined $ifindex and $vlan_id =~ /^\d+$/ and $ifindex =~ /^\d+$/ ) {
unless (defined $vlan_id
and defined $ifindex
and $vlan_id =~ /^\d+$/
and $ifindex =~ /^\d+$/ )
{
$vtp->error_throw("Invalid parameter");
return;
}
@@ -403,7 +439,8 @@ sub _validate_vlan_param {
$vlan_exists = 1 if ( $vlan_id eq $vlan );
}
unless ($vlan_exists) {
$vtp->error_throw("VLAN $vlan_id does not exist or is not operational");
$vtp->error_throw(
"VLAN $vlan_id does not exist or is not operational");
return;
}
@@ -769,9 +806,10 @@ Each bit represents a VLAN. This is 3072 through 4095
=head1 SET METHODS
These are methods that provide SNMP set functionality for overridden methods or
provide a simpler interface to complex set operations. See
L<SNMP::Info/"SETTING DATA VIA SNMP"> for general information on set operations.
These are methods that provide SNMP set functionality for overridden methods
or provide a simpler interface to complex set operations. See
L<SNMP::Info/"SETTING DATA VIA SNMP"> for general information on set
operations.
=over

View File

@@ -45,8 +45,7 @@ $VERSION = '1.09';
%MIBS = ( 'ENTITY-MIB' => 'entPhysicalSerialNum' );
%GLOBALS = (
);
%GLOBALS = ();
%FUNCS = (
'e_alias' => 'entPhysicalAlias',
@@ -67,9 +66,7 @@ $VERSION = '1.09';
'e_vendor' => 'entPhysicalMfgName',
);
%MUNGE = (
'e_type' => \&SNMP::Info::munge_e_type,
);
%MUNGE = ( 'e_type' => \&SNMP::Info::munge_e_type, );
# entPhysicalIndex is not-accessible. Create to facilitate emulation methods
# in other classes

View File

@@ -43,13 +43,12 @@ use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '1.09';
%MIBS = (
'ETHERLIKE-MIB' => 'etherMIB'
);
%MIBS = ( 'ETHERLIKE-MIB' => 'etherMIB' );
%GLOBALS = ();
%FUNCS = (
# EtherLike StatsTable
'el_chipset' => 'dot3StatsEtherChipSet',
'el_coll_excess' => 'dot3StatsExcessiveCollisions',
@@ -67,15 +66,13 @@ $VERSION = '1.09';
'el_error_symbol' => 'dot3StatsSymbolErrors',
'el_index' => 'dot3StatsIndex',
'el_xmit_defer' => 'dot3StatsDeferredTransmissions',
# Ethernet-like Collision Statistics Group
'el_coll_count' => 'dot3CollCount',
'el_coll_freq' => 'dot3CollFrequencies'
);
%MUNGE = (
%SNMP::Info::MUNGE,
'el_duplex' => \&munge_el_duplex,
);
%MUNGE = ( %SNMP::Info::MUNGE, 'el_duplex' => \&munge_el_duplex, );
sub munge_el_duplex {
my $duplex = shift;
@@ -85,7 +82,6 @@ sub munge_el_duplex {
return $duplex;
}
1;
__END__
@@ -111,7 +107,8 @@ Max Baker
my $class = $cdp->class();
print " Using device sub class : $class\n";
# Find the duplex setting for a port on a device that implements ETHERLIKE-MIB
# Find the duplex setting for a port on a device that implements
# ETHERLIKE-MIB
my $interfaces = $el->interfaces();
my $el_index = $el->el_index();
my $el_duplex = $el->el_duplex();

View File

@@ -44,15 +44,15 @@ use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '1.09';
%MIBS = (
'FOUNDRY-SN-SWITCH-GROUP-MIB' => 'snFdpGlobalRun'
);
%MIBS = ( 'FOUNDRY-SN-SWITCH-GROUP-MIB' => 'snFdpGlobalRun' );
%GLOBALS = (
# CDP-Compatibility
'cdp_interval' => 'snFdpGlobalMessageInterval',
'cdp_holdtime' => 'snFdpGlobalHoldTime',
'cdp_id' => 'snFdpGlobalDeviceId',
#
'fdp_run' => 'snFdpGlobalRun',
'fdp_interval' => 'snFdpGlobalMessageInterval',
@@ -79,7 +79,6 @@ $VERSION = '1.09';
'c_ip' => \&SNMP::Info::munge_ip
);
sub cdp_run {
my $fdp = shift;
my $fdp_run = $fdp->fdp_run();
@@ -93,11 +92,13 @@ sub hasFDP {
my $fdp = shift;
my $ver = $fdp->{_version};
#my $ver = $fdp->fdp_ver;
# SNMP v1 clients dont have the globals
if ( defined $ver and $ver == 1 ) {
my $fdp_ip = $fdp->fdp_ip();
# See if anything in fdp cache, if so we have fdp
return 1 if ( defined $fdp_ip and scalar( keys %$fdp_ip ) );
return;
@@ -116,7 +117,9 @@ sub c_if {
# Nope, didn't think so. Now we fake it.
my $fdp_ip = $fdp->c_ip();
unless ( defined $fdp_ip ) {
$fdp->error_throw("SNMP::Info::FDP:fdp_if() - Device doesn't have fdp_ip() data. Can't fake fdp_index()");
$fdp->error_throw(
"SNMP::Info::FDP:fdp_if() - Device doesn't have fdp_ip() data. Can't fake fdp_index()"
);
return;
}
@@ -124,6 +127,7 @@ sub c_if {
foreach my $key ( keys %$fdp_ip ) {
next unless defined $key;
my $iid = $key;
# Truncate .1 from fdp cache entry
$iid =~ s/\.\d+$//;
$fdp_if{$key} = $iid;

View File

@@ -40,32 +40,36 @@ use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '1.09';
%MIBS = (
'IEEE802dot11-MIB' => 'dot11DesiredSSID',
);
%MIBS = ( 'IEEE802dot11-MIB' => 'dot11DesiredSSID', );
%GLOBALS = (
);
%GLOBALS = ();
%FUNCS = (
# dot11PhyOFDMTable
'dot11_cur_freq' => 'dot11CurrentFrequency',
# dot11PhyDSSSTable
'dot11_cur_ch' => 'dot11CurrentChannel',
# dot11PhyOperationTable
'dot11_phy_type' => 'dot11PHYType',
'dot11_reg_dom' => 'dot11CurrentRegDomain',
# dot11ResourceInfoTable
'dot11_prod_ver' => 'dot11manufacturerProductVersion',
'dot11_prod_name' => 'dot11manufacturerProductName',
'dot11_man_name' => 'dot11manufacturerName',
# dot11OperationTable
'dot11_mac' => 'dot11MACAddress',
# dot11StationConfigTable
'dot11_bss_type' => 'dot11DesiredBSSType',
'i_ssidlist' => 'dot11DesiredSSID',
'dot11_pwr_mode' => 'dot11PowerManagementMode',
'dot11_sta_id' => 'dot11StationID',
# dot11PhyTxPowerTable
'dot11_cur_tx_pwr' => 'dot11CurrentTxPowerLevel',
'dot11_tx_pwr_level_1' => 'dot11TxPowerLevel1',
@@ -165,10 +169,13 @@ sub dot11_cur_tx_pwr_mw {
foreach my $idx ( keys %$cur ) {
my $pwr = $cur->{$idx};
if ( $pwr >= 1 && $pwr <= 8 ) {
# ToDo - Look at string eval
my $mw = eval "\$dot11->dot11_tx_pwr_level_$pwr(\$idx)"; ## no critic
my $mw
= eval "\$dot11->dot11_tx_pwr_level_$pwr(\$idx)"; ## no critic
$dot11_cur_tx_pwr_mw->{$idx} = $mw->{$idx};
} else {
}
else {
next;
}
}
@@ -204,9 +211,9 @@ Eric Miller
=head1 DESCRIPTION
SNMP::Info::IEEE802dot11 is a subclass of SNMP::Info that provides an interface
to F<IEEE802dot11-MIB>. This MIB is used in standards based 802.11 wireless
devices.
SNMP::Info::IEEE802dot11 is a subclass of SNMP::Info that provides an
interface to F<IEEE802dot11-MIB>. This MIB is used in standards based
802.11 wireless devices.
Use or create a subclass of SNMP::Info that inherits this one.
Do not use directly.
@@ -270,8 +277,8 @@ interface.
=item $dot11->dot11_cur_tx_pwr_mw()
Returns reference to hash. Current transmit power, in milliwatts, of the radio
interface.
Returns reference to hash. Current transmit power, in milliwatts, of the
radio interface.
=back

View File

@@ -54,8 +54,10 @@ $VERSION = '1.09';
);
%FUNCS = (
# LLDP-MIB::lldpLocManAddrTable
'lldp_lman_addr' => 'lldpLocManAddrIfId',
# LLDP-MIB::lldpRemTable
'lldp_rem_id_type' => 'lldpRemChassisIdSubtype',
'lldp_rem_id' => 'lldpRemChassisId',
@@ -65,11 +67,11 @@ $VERSION = '1.09';
'lldp_rem_sysname' => 'lldpRemSysName',
'lldp_rem_sysdesc' => 'lldpRemSysDesc',
'lldp_rem_sys_cap' => 'lldpRemSysCapEnabled',
# LLDP-MIB::lldpRemManAddrTable
'lldp_rman_addr' => 'lldpRemManAddrIfSubtype',
);
%MUNGE = (
'lldp_sysdesc' => \&SNMP::Info::munge_null,
'lldp_sysname' => \&SNMP::Info::munge_null,
@@ -153,9 +155,11 @@ sub lldp_port {
next unless $port;
my $type = $ptype->{$key};
next unless $type;
# May need to format other types in the future, i.e. Network address
if ( $type =~ /mac/ ) {
$port = join(':',map { sprintf "%02x",$_ } unpack('C*',$port));
$port = join( ':',
map { sprintf "%02x", $_ } unpack( 'C*', $port ) );
}
}
@@ -183,6 +187,7 @@ sub lldp_id {
next unless $id;
my $type = $ch_type->{$key};
next unless $type;
# May need to format other types in the future
if ( $type =~ /mac/ ) {
$id = join( ':', map { sprintf "%02x", $_ } unpack( 'C*', $id ) );
@@ -218,14 +223,18 @@ sub _lldp_addr_index {
my $index = join( '.', splice( @oids, 0, 3 ) );
my $proto = shift(@oids);
my $length = shift(@oids);
# IPv4
if ( $proto == 1 ) {
return ( $index, $proto, join( '.', @oids ) );
}
# MAC
elsif ( $proto == 6 ) {
return ($index, $proto, join(':',map { sprintf "%02x",$_ } @oids));
return ( $index, $proto,
join( ':', map { sprintf "%02x", $_ } @oids ) );
}
# TODO - Need to handle other protocols, i.e. IPv6
else {
return;

View File

@@ -43,9 +43,7 @@ use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %PORTSTAT %MUNGE/;
$VERSION = '1.09';
%MIBS = ( %SNMP::Info::MIBS,
'SNMP-REPEATER-MIB' => 'rptrPortGroupIndex'
);
%MIBS = ( %SNMP::Info::MIBS, 'SNMP-REPEATER-MIB' => 'rptrPortGroupIndex' );
%GLOBALS = (
%SNMP::Info::GLOBALS,
@@ -65,6 +63,7 @@ $VERSION = '1.09';
);
%MUNGE = (
# Inherit all the built in munging
%SNMP::Info::MUNGE,
'rptr_last_src' => \&SNMP::Info::munge_mac,

View File

@@ -44,23 +44,17 @@ use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '1.09';
# Set for No CDP
%GLOBALS = (
%SNMP::Info::Layer1::GLOBALS,
'root_ip' => 'actualIPAddr',
);
%GLOBALS = ( %SNMP::Info::Layer1::GLOBALS, 'root_ip' => 'actualIPAddr', );
%FUNCS = (%SNMP::Info::Layer1::FUNCS,
%FUNCS = (
%SNMP::Info::Layer1::FUNCS,
'ati_p_name' => 'portName',
'ati_up' => 'linkTestLED',
);
%MIBS = (
%SNMP::Info::Layer1::MIBS,
'ATI-MIB' => 'atiPortGroupIndex'
);
%MIBS = ( %SNMP::Info::Layer1::MIBS, 'ATI-MIB' => 'atiPortGroupIndex' );
%MUNGE = (%SNMP::Info::Layer1::MUNGE,
);
%MUNGE = ( %SNMP::Info::Layer1::MUNGE, );
sub vendor {
return 'allied';

View File

@@ -44,25 +44,19 @@ use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '1.09';
# Set for No CDP
%GLOBALS = (
%SNMP::Info::Layer1::GLOBALS,
);
%GLOBALS = ( %SNMP::Info::Layer1::GLOBALS, );
%FUNCS = (%SNMP::Info::Layer1::FUNCS,
%FUNCS = (
%SNMP::Info::Layer1::FUNCS,
'asante_port' => 'ePortIndex',
'asante_group' => 'ePortGrpIndex',
'i_type' => 'ePortStateType',
'asante_up' => 'ePortStateLinkStatus',
);
%MIBS = (
%SNMP::Info::Layer1::MIBS,
'ASANTE-HUB1012-MIB' => 'asante'
);
%MIBS = ( %SNMP::Info::Layer1::MIBS, 'ASANTE-HUB1012-MIB' => 'asante' );
%MUNGE = (
%SNMP::Info::Layer1::MUNGE,
);
%MUNGE = ( %SNMP::Info::Layer1::MUNGE, );
sub interfaces {
my $asante = shift;

View File

@@ -36,7 +36,8 @@ use SNMP::Info::SONMP;
use SNMP::Info::NortelStack;
use SNMP::Info::Layer2;
@SNMP::Info::Layer1::Bayhub::ISA = qw/SNMP::Info::SONMP SNMP::Info::NortelStack SNMP::Info::Layer2 Exporter/;
@SNMP::Info::Layer1::Bayhub::ISA
= qw/SNMP::Info::SONMP SNMP::Info::NortelStack SNMP::Info::Layer2 Exporter/;
@SNMP::Info::Layer1::Bayhub::EXPORT_OK = qw//;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
@@ -52,8 +53,7 @@ $VERSION = '1.09';
);
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS,
%SNMP::Info::NortelStack::GLOBALS,
%SNMP::Info::Layer2::GLOBALS, %SNMP::Info::NortelStack::GLOBALS,
%SNMP::Info::SONMP::GLOBALS,
);
@@ -61,15 +61,18 @@ $VERSION = '1.09';
%SNMP::Info::Layer2::FUNCS,
%SNMP::Info::NortelStack::FUNCS,
%SNMP::Info::SONMP::FUNCS,
# S5-ETHERNET-COMMON-MIB::s5EnPortTable
'bayhub_pb_index' => 's5EnPortBrdIndx',
'bayhub_pp_index' => 's5EnPortIndx',
'bayhub_up_admin' => 's5EnPortPartStatus',
'bayhub_up' => 's5EnPortLinkStatus',
# S5-ETHERNET-COMMON-MIB::s5EnPortExtTable
'bayhub_p_speed' => 's5EnPortExtActiveSpeed',
'bayhub_p_cap' => 's5EnPortExtHwCapability',
'bayhub_p_adv' => 's5EnPortExtAutoNegAdv',
# S5-COMMON-STATS-MIB::s5CmSNodeTable
'bayhub_nb_index' => 's5CmSNodeBrdIndx',
'bayhub_np_index' => 's5CmSNodePortIndx',
@@ -77,8 +80,7 @@ $VERSION = '1.09';
);
%MUNGE = (
%SNMP::Info::Layer2::MUNGE,
%SNMP::Info::NortelStack::MUNGE,
%SNMP::Info::Layer2::MUNGE, %SNMP::Info::NortelStack::MUNGE,
%SNMP::Info::SONMP::MUNGE,
);
@@ -129,10 +131,12 @@ sub i_index {
my $comidx = $board;
if ( !( $comidx % 5 ) ) {
$board = ( $board / 5 );
} elsif ($comidx =~ /[16]$/) {
}
elsif ( $comidx =~ /[16]$/ ) {
$board = int( $board / 5 );
$port = 25;
} elsif ($comidx =~ /[27]$/) {
}
elsif ( $comidx =~ /[27]$/ ) {
$board = int( $board / 5 );
$port = 26;
}
@@ -273,6 +277,7 @@ sub i_up_admin {
}
sub set_i_up_admin {
# map setting to those the hub will understand
my %setting = qw/up 2 down 3/;
@@ -310,10 +315,12 @@ sub bp_index {
my $comidx = $board;
if ( !( $comidx % 5 ) ) {
$board = ( $board / 5 );
} elsif ($comidx =~ /[16]$/) {
}
elsif ( $comidx =~ /[16]$/ ) {
$board = int( $board / 5 );
$port = 25;
} elsif ($comidx =~ /[27]$/) {
}
elsif ( $comidx =~ /[27]$/ ) {
$board = int( $board / 5 );
$port = 26;
}
@@ -345,10 +352,12 @@ sub fw_port {
my $comidx = $board;
if ( !( $comidx % 5 ) ) {
$board = ( $board / 5 );
} elsif ($comidx =~ /[16]$/) {
}
elsif ( $comidx =~ /[16]$/ ) {
$board = int( $board / 5 );
$port = 25;
} elsif ($comidx =~ /[27]$/) {
}
elsif ( $comidx =~ /[27]$/ ) {
$board = int( $board / 5 );
$port = 26;
}
@@ -369,7 +378,6 @@ sub slot_offset {
return 0;
}
# Devices do not support ENTITY-MIB use proprietary methods.
sub e_index {

View File

@@ -49,6 +49,7 @@ $VERSION = '1.09';
);
%GLOBALS = (
# CYCLADES-ACS-SYS-MIB
%SNMP::Info::Layer1::GLOBALS,
'os_ver' => 'cyACSversion',
@@ -61,18 +62,18 @@ $VERSION = '1.09';
%FUNCS = (
%SNMP::Info::Layer1::FUNCS,
# CYCLADES-ACS-INFO-MIB::cyInfoSerialTable
'cy_port_tty' => 'cyISPortTty',
'cy_port_name' => 'cyISPortName',
'cy_port_speed' => 'cyISPortSpeed',
'cy_port_cd' => 'cyISPortSigCD',
# CYCLADES-ACS-CONF-MIB::cySerialPortTable
'cy_port_socket' => 'cySPortSocketPort',
);
%MUNGE = (
%SNMP::Info::Layer1::MUNGE,
);
%MUNGE = ( %SNMP::Info::Layer1::MUNGE, );
# These devices don't have a FDB and we probably don't want to poll for ARP
# cache so turn off reported L2/L3.
@@ -373,8 +374,8 @@ These are methods that return scalar value from SNMP
=item $cyclades->layers()
Returns 01000001. These devices don't have a FDB and we probably don't want to
poll for an ARP cache so turn off reported Layer 2 and Layer 3.
Returns 01000001. These devices don't have a FDB and we probably don't want
to poll for an ARP cache so turn off reported Layer 2 and Layer 3.
=item $cyclades->vendor()

View File

@@ -49,6 +49,7 @@ $VERSION = '1.09';
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS,
# From SYNOPTICS-COMMON-MIB
'os_bin' => 's3AgentFwVer',
's3000_major_ver' => 's3AgentSwMajorVer',
@@ -58,23 +59,25 @@ $VERSION = '1.09';
%FUNCS = (
%SNMP::Info::Layer2::FUNCS,
# SYNOPTICS-ETHERNET-MIB::s3EnetPortTable
's3000_pb_index' => 's3EnetPortBoardIndex',
's3000_pp_index' => 's3EnetPortIndex',
's3000_up_admin' => 's3EnetPortPartStatus',
's3000_up' => 's3EnetPortLinkStatus',
# SYNOPTICS-ETHERNET-MIB::s3EnetShowNodesTable
's3000_nb_index' => 's3EnetShowNodesSlotIndex',
's3000_np_index' => 's3EnetShowNodesPortIndex',
'fw_mac' => 's3EnetShowNodesMacAddress',
# SYNOPTICS-ETHERNET-MIB::s3EnetTopNmmTable
's3000_topo_port' => 's3EnetTopNmmPort',
's3000_topo_mac' => 's3EnetTopNmmMacAddr',
);
%MUNGE = (
%SNMP::Info::Layer2::MUNGE,
's3000_topo_mac' => \&SNMP::Info::munge_mac
%SNMP::Info::Layer2::MUNGE, 's3000_topo_mac' => \&SNMP::Info::munge_mac
);
sub layers {
@@ -122,6 +125,7 @@ sub mac {
my $mac = $topo_mac->{$entry};
return $mac;
}
# Topology turned off, not supported.
return;
}
@@ -278,6 +282,7 @@ sub i_up_admin {
}
sub set_i_up_admin {
# map setting to those the hub will understand
my %setting = qw/up 2 down 3/;
@@ -489,7 +494,8 @@ Returns 10000000. The hubs only support 10 Mbs Ethernet.
=item $s3000->i_up()
Returns (C<s3EnetPortLinkStatus>) for each port. Translates on/off to up/down.
Returns (C<s3EnetPortLinkStatus>) for each port. Translates on/off to
up/down.
=item $s3000->i_up_admin()
@@ -522,7 +528,8 @@ C<SYNOPTICS-ETHERNET-MIB::s3EnetShowNodesTable> to the Interface index.
=item $s3000->s3000_topo_port()
Returns reference to hash. Key: Table entry, Value:Port Number (interface iid)
Returns reference to hash. Key: Table entry, Value:Port Number
(interface iid)
(C<s3EnetTopNmmPort>)

View File

@@ -39,17 +39,17 @@ use SNMP::Info::Bridge;
use SNMP::Info::Entity;
use SNMP::Info::PowerEthernet;
@SNMP::Info::Layer2::ISA = qw/SNMP::Info SNMP::Info::Bridge SNMP::Info::Entity SNMP::Info::PowerEthernet Exporter/;
@SNMP::Info::Layer2::ISA
= qw/SNMP::Info SNMP::Info::Bridge SNMP::Info::Entity SNMP::Info::PowerEthernet Exporter/;
@SNMP::Info::Layer2::EXPORT_OK = qw//;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %PORTSTAT %MUNGE/;
$VERSION = '1.09';
%MIBS = ( %SNMP::Info::MIBS,
%SNMP::Info::Bridge::MIBS,
%SNMP::Info::Entity::MIBS,
%SNMP::Info::PowerEthernet::MIBS,
%MIBS = (
%SNMP::Info::MIBS, %SNMP::Info::Bridge::MIBS,
%SNMP::Info::Entity::MIBS, %SNMP::Info::PowerEthernet::MIBS,
);
%GLOBALS = (
@@ -57,17 +57,17 @@ $VERSION = '1.09';
%SNMP::Info::Bridge::GLOBALS,
%SNMP::Info::Entity::GLOBALS,
%SNMP::Info::PowerEthernet::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
);
%FUNCS = (
%SNMP::Info::FUNCS,
%SNMP::Info::Bridge::FUNCS,
%SNMP::Info::Entity::FUNCS,
%SNMP::Info::PowerEthernet::FUNCS,
%SNMP::Info::FUNCS, %SNMP::Info::Bridge::FUNCS,
%SNMP::Info::Entity::FUNCS, %SNMP::Info::PowerEthernet::FUNCS,
);
%MUNGE = (
# Inherit all the built in munging
%SNMP::Info::MUNGE,
%SNMP::Info::Bridge::MUNGE,
@@ -123,7 +123,8 @@ sub serial {
# precedence
# serial2,chassis parse,serial1
return $serial2 if ( defined $serial2 and $serial2 !~ /^\s*$/ );
return $1 if (defined $chassis and $chassis =~ /serial#?:\s*([a-z0-9]+)/i);
return $1
if ( defined $chassis and $chassis =~ /serial#?:\s*([a-z0-9]+)/i );
return $serial1 if ( defined $serial1 and $serial1 !~ /^\s*$/ );
return;
@@ -287,7 +288,8 @@ to a hash.
=item $l2->interfaces()
Creates a map between the interface identifier (iid) and the physical port name.
Creates a map between the interface identifier (iid) and the physical port
name.
Defaults to C<ifDescr> but checks and overrides with C<ifName>

View File

@@ -35,7 +35,8 @@ use SNMP::Info::Bridge;
use SNMP::Info::CDP;
use SNMP::Info::Airespace;
@SNMP::Info::Layer2::Airespace::ISA = qw/SNMP::Info::Airespace SNMP::Info::CDP SNMP::Info::Bridge Exporter/;
@SNMP::Info::Layer2::Airespace::ISA
= qw/SNMP::Info::Airespace SNMP::Info::CDP SNMP::Info::Bridge Exporter/;
@SNMP::Info::Layer2::Airespace::EXPORT_OK = qw//;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
@@ -43,31 +44,23 @@ use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '1.09';
%MIBS = (
%SNMP::Info::MIBS,
%SNMP::Info::Bridge::MIBS,
%SNMP::Info::CDP::MIBS,
%SNMP::Info::Airespace::MIBS,
%SNMP::Info::MIBS, %SNMP::Info::Bridge::MIBS,
%SNMP::Info::CDP::MIBS, %SNMP::Info::Airespace::MIBS,
);
%GLOBALS = (
%SNMP::Info::GLOBALS,
%SNMP::Info::Bridge::GLOBALS,
%SNMP::Info::CDP::GLOBALS,
%SNMP::Info::Airespace::GLOBALS,
%SNMP::Info::GLOBALS, %SNMP::Info::Bridge::GLOBALS,
%SNMP::Info::CDP::GLOBALS, %SNMP::Info::Airespace::GLOBALS,
);
%FUNCS = (
%SNMP::Info::FUNCS,
%SNMP::Info::Bridge::FUNCS,
%SNMP::Info::CDP::FUNCS,
%SNMP::Info::Airespace::FUNCS,
%SNMP::Info::FUNCS, %SNMP::Info::Bridge::FUNCS,
%SNMP::Info::CDP::FUNCS, %SNMP::Info::Airespace::FUNCS,
);
%MUNGE = (
%SNMP::Info::MUNGE,
%SNMP::Info::Bridge::MUNGE,
%SNMP::Info::CDP::MUNGE,
%SNMP::Info::Airespace::MUNGE,
%SNMP::Info::MUNGE, %SNMP::Info::Bridge::MUNGE,
%SNMP::Info::CDP::MUNGE, %SNMP::Info::Airespace::MUNGE,
);
sub os {

View File

@@ -41,7 +41,8 @@ use SNMP::Info::CiscoStats;
use SNMP::Info::CDP;
use SNMP::Info::IEEE802dot11;
@SNMP::Info::Layer2::Aironet::ISA = qw/SNMP::Info::Layer2 SNMP::Info::Entity SNMP::Info::EtherLike
@SNMP::Info::Layer2::Aironet::ISA
= qw/SNMP::Info::Layer2 SNMP::Info::Entity SNMP::Info::EtherLike
SNMP::Info::CiscoStats SNMP::Info::CDP Exporter/;
@SNMP::Info::Layer2::Aironet::EXPORT_OK = qw//;
@@ -108,10 +109,11 @@ $VERSION = '1.09';
);
# Use 802.11 power level without putting IEEE802dot11 in @ISA
*SNMP::Info::Layer2::Aironet::dot11_cur_tx_pwr_mw =
\&SNMP::Info::IEEE802dot11::dot11_cur_tx_pwr_mw;
*SNMP::Info::Layer2::Aironet::dot11_cur_tx_pwr_mw
= \&SNMP::Info::IEEE802dot11::dot11_cur_tx_pwr_mw;
sub vendor {
# Sorry, but it's true.
return 'cisco';
}
@@ -163,7 +165,10 @@ sub i_duplex {
sub _aironet_special {
my $aironet = shift;
my $os_ver = $aironet->os_ver();
if (defined($os_ver) && $os_ver =~ /^(\d+)\.(\d+)(\D|$)/ && (($1 == 12 && $2 >= 3) || $1 > 12)) {
if ( defined($os_ver)
&& $os_ver =~ /^(\d+)\.(\d+)(\D|$)/
&& ( ( $1 == 12 && $2 >= 3 ) || $1 > 12 ) )
{
return 1;
}
}
@@ -316,6 +321,7 @@ sub cd11_mac {
# to get the right overrides.
sub i_mac {
my $aironet = shift;
# no partial is possible due to the levels
# of indirection.
@@ -357,7 +363,6 @@ sub i_mac {
return $mbss_mac;
}
1;
__END__

View File

@@ -42,9 +42,7 @@ use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '1.09';
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS
);
%GLOBALS = ( %SNMP::Info::Layer2::GLOBALS );
%FUNCS = (
%SNMP::Info::Layer2::FUNCS,
@@ -58,9 +56,7 @@ $VERSION = '1.09';
'AtiStackInfo-MIB' => 'atiswitchEnhancedStacking',
);
%MUNGE = (
%SNMP::Info::Layer2::MUNGE,
);
%MUNGE = ( %SNMP::Info::Layer2::MUNGE, );
sub vendor {
return 'allied';

View File

@@ -47,12 +47,11 @@ $VERSION = '1.09';
'WLSR-AP-MIB' => 'wlsrHideSSID',
);
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS,
);
%GLOBALS = ( %SNMP::Info::Layer2::GLOBALS, );
%FUNCS = (
%SNMP::Info::Layer2::FUNCS,
# WLSX-SWITCH-MIB::wlsxSwitchAccessPointTable
# Table index leafs do not return information
# therefore unable to use apBSSID. We extract
@@ -61,8 +60,10 @@ $VERSION = '1.09';
'aruba_ap_ip' => 'apIpAddress',
'aruba_ap_essid' => 'apESSID',
'aruba_ap_ssidbcast' => 'wlsrHideSSID',
# WLSR-AP-MIB::wlsrConfigTable
'aruba_ap_channel' => 'apCurrentChannel',
# WLSX-SWITCH-MIB::wlsxSwitchStationMgmtTable
# Table index leafs do not return information
# therefore unable to use staAccessPointBSSID
@@ -73,9 +74,7 @@ $VERSION = '1.09';
'fw_user' => 'staUserName',
);
%MUNGE = (
%SNMP::Info::Layer2::MUNGE,
);
%MUNGE = ( %SNMP::Info::Layer2::MUNGE, );
sub layers {
return '00000011';
@@ -130,8 +129,10 @@ sub i_index {
# Get Attached APs as Interfaces
foreach my $ap_id ( keys %$ap_index ) {
# Convert the 0.254.123.456 index entry to a MAC address.
my $mac = join(':',map {sprintf("%02x",$_)} split(/\./,$ap_id));
my $mac = join( ':',
map { sprintf( "%02x", $_ ) } split( /\./, $ap_id ) );
$if_index{$ap_id} = $mac;
}
@@ -151,6 +152,7 @@ sub interfaces {
next unless defined $index;
if ( $index =~ /^\d+$/ ) {
# Replace the Index with the ifDescr field.
my $port = $i_descr->{$iid};
next unless defined $port;
@@ -272,7 +274,6 @@ sub i_ssidbcast {
return \%i_bc;
}
# Wireless switches do not support the standard Bridge MIB
sub bp_index {
my $aruba = shift;
@@ -291,8 +292,10 @@ sub bp_index {
# Get Attached APs as Interfaces
foreach my $ap_id ( keys %$ap_index ) {
# Convert the 0.254.123.456 index entry to a MAC address.
my $mac = join(':',map {sprintf("%02x",$_)} split(/\./,$ap_id));
my $mac = join( ':',
map { sprintf( "%02x", $_ ) } split( /\./, $ap_id ) );
$bp_index{$mac} = $mac;
}
@@ -307,8 +310,12 @@ sub fw_port {
my %fw_port;
foreach my $iid ( keys %$fw_idx ) {
if ($iid =~ /(\d+\.\d+\.\d+\.\d+\.\d+\.\d+).(\d+\.\d+\.\d+\.\d+\.\d+\.\d+)/) {
my $port = join(':',map {sprintf("%02x",$_)} split(/\./,$2));
if ( $iid
=~ /(\d+\.\d+\.\d+\.\d+\.\d+\.\d+).(\d+\.\d+\.\d+\.\d+\.\d+\.\d+)/
)
{
my $port = join( ':',
map { sprintf( "%02x", $_ ) } split( /\./, $2 ) );
$fw_port{$iid} = $port;
}
else {
@@ -326,8 +333,12 @@ sub fw_mac {
my %fw_mac;
foreach my $iid ( keys %$fw_idx ) {
if ($iid =~ /(\d+\.\d+\.\d+\.\d+\.\d+\.\d+).(\d+\.\d+\.\d+\.\d+\.\d+\.\d+)/) {
my $mac = join(':',map {sprintf("%02x",$_)} split(/\./,$1));
if ( $iid
=~ /(\d+\.\d+\.\d+\.\d+\.\d+\.\d+).(\d+\.\d+\.\d+\.\d+\.\d+\.\d+)/
)
{
my $mac = join( ':',
map { sprintf( "%02x", $_ ) } split( /\./, $1 ) );
$fw_mac{$iid} = $mac;
}
else {
@@ -366,10 +377,10 @@ Eric Miller
=head1 DESCRIPTION
SNMP::Info::Layer2::Aruba is a subclass of SNMP::Info that provides an interface
to Aruba wireless switches. The Aruba platform utilizes intelligent wireless
switches which control thin access points. The thin access points themselves
are unable to be polled for end station information.
SNMP::Info::Layer2::Aruba is a subclass of SNMP::Info that provides an
interface to Aruba wireless switches. The Aruba platform utilizes
intelligent wireless switches which control thin access points. The thin
access points themselves are unable to be polled for end station information.
This class emulates bridge functionality for the wireless switch. This enables
end station MAC addresses collection and correlation to the thin access point
@@ -464,8 +475,8 @@ interfaces. The thin AP MAC address is used as the port identifier.
=item $aruba->i_name()
Interface name. Returns (C<ifName>) for Ethernet interfaces and (C<apLocation>)
for thin AP interfaces.
Interface name. Returns (C<ifName>) for Ethernet interfaces and
(C<apLocation>) for thin AP interfaces.
=item $aruba->bp_index()

View File

@@ -45,13 +45,16 @@ use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '1.09';
# Set for No CDP
%GLOBALS = ( %SNMP::Info::Layer2::GLOBALS,
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS,
'cdp_id' => 's5EnMsTopIpAddr',
'cdp_run' => 's5EnMsTopStatus',
);
%FUNCS = (%SNMP::Info::Layer2::FUNCS,
%FUNCS = (
%SNMP::Info::Layer2::FUNCS,
'imac2' => 'ifPhysAddress',
# S5-ETH-MULTISEG-TOPOLOGY-MIB::s5EnMsTopNmmTable
'bay_topo_slot' => 's5EnMsTopNmmSlot',
'bay_topo_port' => 's5EnMsTopNmmPort',
@@ -69,13 +72,12 @@ $VERSION = '1.09';
);
delete $MIBS{'CISCO-CDP-MIB'};
# 450's report full duplex as speed = 20mbps?!
$SNMP::Info::SPEED_MAP{20_000_000} = '10 Mbps';
$SNMP::Info::SPEED_MAP{200_000_000} = '100 Mbps';
%MUNGE = (%SNMP::Info::Layer2::MUNGE,
'i_mac2' => \&SNMP::Info::munge_mac ,
);
%MUNGE = ( %SNMP::Info::Layer2::MUNGE, 'i_mac2' => \&SNMP::Info::munge_mac, );
sub os {
return 'bay';
@@ -116,6 +118,7 @@ sub os_bin {
}
sub vendor {
# or nortel, or synopsis?
return 'bay';
}
@@ -154,7 +157,6 @@ sub i_mac {
return $i_mac;
}
sub model {
my $bay = shift;
my $id = $bay->id();
@@ -210,7 +212,8 @@ sub c_ip {
my $ips = $ip_port{$port};
if ( scalar @$ips == 1 ) {
$c_ip{"$port.1"} = $ips->[0];
} else {
}
else {
$c_ip{"$port.1"} = $ips;
}
}
@@ -248,7 +251,6 @@ sub c_platform {
my $bay_topo_port = $bay->bay_topo_port();
my $bay_topo_platform = $bay->bay_topo_platform();
my %c_platform;
foreach my $entry ( keys %$bay_topo_platform ) {
my $port = $bay_topo_port->{$entry} || 0;
@@ -446,7 +448,8 @@ Returns reference to hash. Key: Table entry, Value:slot number
=item $bay->bay_topo_port()
Returns reference to hash. Key: Table entry, Value:Port Number (interface iid)
Returns reference to hash. Key: Table entry, Value:Port Number
(interface iid)
(C<s5EnMsTopNmmPort>)

View File

@@ -38,7 +38,8 @@ 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::Layer2::Baystack::ISA
= qw/SNMP::Info::SONMP SNMP::Info::NortelStack
SNMP::Info::RapidCity SNMP::Info::LLDP
SNMP::Info::Layer3 Exporter/;
@SNMP::Info::Layer2::Baystack::EXPORT_OK = qw//;
@@ -48,26 +49,20 @@ use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '1.09';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
%SNMP::Info::LLDP::MIBS,
%SNMP::Info::RapidCity::MIBS,
%SNMP::Info::NortelStack::MIBS,
%SNMP::Info::Layer3::MIBS, %SNMP::Info::LLDP::MIBS,
%SNMP::Info::RapidCity::MIBS, %SNMP::Info::NortelStack::MIBS,
%SNMP::Info::SONMP::MIBS,
);
%GLOBALS = (
%SNMP::Info::Layer3::GLOBALS,
%SNMP::Info::LLDP::GLOBALS,
%SNMP::Info::RapidCity::GLOBALS,
%SNMP::Info::NortelStack::GLOBALS,
%SNMP::Info::Layer3::GLOBALS, %SNMP::Info::LLDP::GLOBALS,
%SNMP::Info::RapidCity::GLOBALS, %SNMP::Info::NortelStack::GLOBALS,
%SNMP::Info::SONMP::GLOBALS,
);
%FUNCS = (
%SNMP::Info::Layer3::FUNCS,
%SNMP::Info::LLDP::FUNCS,
%SNMP::Info::RapidCity::FUNCS,
%SNMP::Info::NortelStack::FUNCS,
%SNMP::Info::Layer3::FUNCS, %SNMP::Info::LLDP::FUNCS,
%SNMP::Info::RapidCity::FUNCS, %SNMP::Info::NortelStack::FUNCS,
%SNMP::Info::SONMP::FUNCS,
);
@@ -77,10 +72,8 @@ $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::RapidCity::MUNGE,
%SNMP::Info::NortelStack::MUNGE,
%SNMP::Info::Layer3::MUNGE, %SNMP::Info::LLDP::MUNGE,
%SNMP::Info::RapidCity::MUNGE, %SNMP::Info::NortelStack::MUNGE,
%SNMP::Info::SONMP::MUNGE,
);
@@ -89,10 +82,17 @@ sub os {
my $descr = $baystack->description();
my $model = $baystack->model();
if ((defined $model and $model =~ /(325|420|425|470|460|BPS|2500|3510|4524|4526|4548|4550|5510|5520|5530)/) and (defined $descr and $descr =~ m/SW:v[3-5]/i)) {
if (( defined $model
and $model
=~ /(325|420|425|470|460|BPS|2500|3510|4524|4526|4548|4550|5510|5520|5530)/
)
and ( defined $descr and $descr =~ m/SW:v[3-5]/i )
)
{
return 'boss';
}
if ((defined $descr and $descr =~ /Business Ethernet Switch.*SW:v/i)) {
if ( ( defined $descr and $descr =~ /Business Ethernet Switch.*SW:v/i ) )
{
return 'bes';
}
return 'baystack';
@@ -135,7 +135,9 @@ sub model {
return '303' if ( defined $descr and $descr =~ /\D303\D/ );
return '304' if ( defined $descr and $descr =~ /\D304\D/ );
return 'BPS' if ( $model =~ /BPS2000/i );
return $2 if ($model =~ /(ES|ERS|BayStack|EthernetRoutingSwitch|EthernetSwitch)-?(\d+)/);
return $2
if ( $model
=~ /(ES|ERS|BayStack|EthernetRoutingSwitch|EthernetSwitch)-?(\d+)/ );
return $model;
}
@@ -152,6 +154,7 @@ sub interfaces {
foreach my $iid ( keys %$i_index ) {
my $index = $i_index->{$iid};
next unless defined $index;
# Ignore cascade ports
next if $index > 513;
@@ -171,6 +174,7 @@ sub i_mac {
my $i_mac = $baystack->orig_i_mac($partial) || {};
my %i_mac;
# Baystack 303's with a hw rev < 2.11.4.5 report the mac as all zeros
foreach my $iid ( keys %$i_mac ) {
my $mac = $i_mac->{$iid};
@@ -193,9 +197,10 @@ sub i_name {
foreach my $iid ( keys %$i_name2 ) {
my $name = $i_name2->{$iid};
my $alias = $i_alias->{$iid};
$i_name{$iid} = (defined $alias and $alias !~ /^\s*$/) ?
$alias :
$name;
$i_name{$iid}
= ( defined $alias and $alias !~ /^\s*$/ )
? $alias
: $name;
}
return \%i_name;
@@ -210,7 +215,9 @@ sub index_factor {
$op_mode = 'pure' unless defined $op_mode;
my $index_factor = 32;
$index_factor = 64 if ((defined $model and $model =~ /(470)/) or ($os =~ m/(boss|bes)/) and ($op_mode eq 'pure'));
$index_factor = 64
if ( ( defined $model and $model =~ /(470)/ )
or ( $os =~ m/(boss|bes)/ ) and ( $op_mode eq 'pure' ) );
return $index_factor;
}
@@ -251,7 +258,7 @@ sub c_if {
my $baystack = shift;
my $partial = shift;
my $lldp = $baystack->lldp_if($partial) || {};;
my $lldp = $baystack->lldp_if($partial) || {};
my $cdp = $baystack->SUPER::c_if($partial) || {};
my %c_if;
@@ -582,7 +589,8 @@ to a hash.
Returns reference to the map between IID and physical Port.
Slot and port numbers on the Baystack switches are determined by the formula:
Slot and port numbers on the Baystack switches are determined by the
formula:
port = (Interface index % Index factor)
slot = (int(Interface index / Index factor)) + Slot offset
@@ -602,7 +610,8 @@ revisions of Baystack firmware report all zeros for each port mac.
=item $baystack->i_name()
Crosses C<ifName> with C<ifAlias> and returns the human set port name if exists.
Crosses C<ifName> with C<ifAlias> and returns the human set port name if
exists.
=back
@@ -701,8 +710,8 @@ Returns reference to hash. Key: iid Value: remote IPv4 address
If multiple entries exist with the same local port, c_if(), with the same IPv4
address, c_ip(), it may be a duplicate entry.
If multiple entries exist with the same local port, c_if(), with different IPv4
addresses, c_ip(), there is either a non-SONMP/LLDP device in between two or
If multiple entries exist with the same local port, c_if(), with different
IPv4 addresses, c_ip(), there is either a non-SONMP/LLDP device in between two or
more devices or multiple devices which are not directly connected.
Use the data from the Layer2 Topology Table below to dig deeper.

View File

@@ -61,6 +61,7 @@ $VERSION = '1.09';
%SNMP::Info::CiscoConfig::FUNCS,
%SNMP::Info::CiscoStats::FUNCS,
%SNMP::Info::CDP::FUNCS,
# ESSWITCH-MIB
'c1900_p_index' => 'swPortIndex',
'c1900_p_ifindex' => 'swPortIfIndex',
@@ -77,15 +78,14 @@ $VERSION = '1.09';
%SNMP::Info::CiscoConfig::MIBS,
%SNMP::Info::CiscoStats::MIBS,
%SNMP::Info::CDP::MIBS,
# Also known as the ESSWITCH-MIB
'STAND-ALONE-ETHERNET-SWITCH-MIB' => 'series2000'
);
%MUNGE = (
%SNMP::Info::Layer2::MUNGE,
%SNMP::Info::CiscoConfig::MUNGE,
%SNMP::Info::CiscoStats::MUNGE,
%SNMP::Info::CDP::MUNGE,
%SNMP::Info::Layer2::MUNGE, %SNMP::Info::CiscoConfig::MUNGE,
%SNMP::Info::CiscoStats::MUNGE, %SNMP::Info::CDP::MUNGE,
);
sub bulkwalk_no { return 1; }
@@ -203,15 +203,16 @@ sub i_vlan {
my $partial = shift;
# Overlap allows more than one VLAN per port. Unable to determine default
my $overlap = $c1900->bridgeGroupAllowMembershipOverlap() ||
$c1900->vlanAllowMembershipOverlap() || 'disabled';
my $overlap = $c1900->bridgeGroupAllowMembershipOverlap()
|| $c1900->vlanAllowMembershipOverlap()
|| 'disabled';
if ( $overlap eq 'enabled' ) {
return;
}
my $member_of = $c1900->bridgeGroupMemberPortOfBridgeGroup() ||
$c1900->vlanMemberPortOfVlan();
my $member_of = $c1900->bridgeGroupMemberPortOfBridgeGroup()
|| $c1900->vlanMemberPortOfVlan();
my $i_pvid = {};
foreach my $idx ( keys %$member_of ) {
@@ -232,8 +233,8 @@ sub i_vlan_membership {
my $c1900 = shift;
my $partial = shift;
my $member_of = $c1900->bridgeGroupMemberPortOfBridgeGroup() ||
$c1900->vlanMemberPortOfVlan();
my $member_of = $c1900->bridgeGroupMemberPortOfBridgeGroup()
|| $c1900->vlanMemberPortOfVlan();
my $i_vlan_membership = {};
foreach my $idx ( keys %$member_of ) {
@@ -499,9 +500,10 @@ See L<SNMP::Info::Layer2/"TABLE METHODS"> for details.
=head1 SET METHODS
These are methods that provide SNMP set functionality for overridden methods or
provide a simpler interface to complex set operations. See
L<SNMP::Info/"SETTING DATA VIA SNMP"> for general information on set operations.
These are methods that provide SNMP set functionality for overridden methods
or provide a simpler interface to complex set operations. See
L<SNMP::Info/"SETTING DATA VIA SNMP"> for general information on set
operations.
=over

View File

@@ -50,10 +50,8 @@ use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '1.09';
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS,
%SNMP::Info::CiscoConfig::GLOBALS,
%SNMP::Info::CiscoStats::GLOBALS,
%SNMP::Info::CDP::GLOBALS,
%SNMP::Info::Layer2::GLOBALS, %SNMP::Info::CiscoConfig::GLOBALS,
%SNMP::Info::CiscoStats::GLOBALS, %SNMP::Info::CDP::GLOBALS,
%SNMP::Info::CiscoVTP::GLOBALS,
);
@@ -64,6 +62,7 @@ $VERSION = '1.09';
%SNMP::Info::CDP::FUNCS,
%SNMP::Info::CiscoVTP::FUNCS,
'i_name' => 'ifAlias',
# C2900PortEntry
'c2900_p_index' => 'c2900PortIfIndex',
'c2900_p_duplex' => 'c2900PortDuplexStatus',
@@ -72,19 +71,14 @@ $VERSION = '1.09';
);
%MIBS = (
%SNMP::Info::Layer2::MIBS,
%SNMP::Info::CiscoConfig::MIBS,
%SNMP::Info::CiscoStats::MIBS,
%SNMP::Info::CDP::MIBS,
%SNMP::Info::CiscoVTP::MIBS,
'CISCO-C2900-MIB' => 'ciscoC2900MIB',
%SNMP::Info::Layer2::MIBS, %SNMP::Info::CiscoConfig::MIBS,
%SNMP::Info::CiscoStats::MIBS, %SNMP::Info::CDP::MIBS,
%SNMP::Info::CiscoVTP::MIBS, 'CISCO-C2900-MIB' => 'ciscoC2900MIB',
);
%MUNGE = (
%SNMP::Info::Layer2::MUNGE,
%SNMP::Info::CiscoConfig::MUNGE,
%SNMP::Info::CiscoStats::MUNGE,
%SNMP::Info::CDP::MUNGE,
%SNMP::Info::Layer2::MUNGE, %SNMP::Info::CiscoConfig::MUNGE,
%SNMP::Info::CiscoStats::MUNGE, %SNMP::Info::CDP::MUNGE,
%SNMP::Info::CiscoVTP::MUNGE,
);
@@ -204,7 +198,7 @@ sub interfaces {
$if{$iid} = $port;
}
return \%if
return \%if;
}
1;
@@ -409,9 +403,10 @@ See L<SNMP::Info::Layer2/"TABLE METHODS"> for details.
=head1 SET METHODS
These are methods that provide SNMP set functionality for overridden methods or
provide a simpler interface to complex set operations. See
L<SNMP::Info/"SETTING DATA VIA SNMP"> for general information on set operations.
These are methods that provide SNMP set functionality for overridden methods
or provide a simpler interface to complex set operations. See
L<SNMP::Info/"SETTING DATA VIA SNMP"> for general information on set
operations.
=over

View File

@@ -40,7 +40,8 @@ use SNMP::Info::CiscoStats;
use SNMP::Info::CiscoPortSecurity;
use SNMP::Info::Layer2;
@SNMP::Info::Layer2::Catalyst::ISA = qw/SNMP::Info::CiscoStack SNMP::Info::CiscoVTP
@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/;
@@ -51,12 +52,9 @@ use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/ ;
$VERSION = '1.09';
%MIBS = (
%SNMP::Info::Layer2::MIBS,
%SNMP::Info::CiscoPortSecurity::MIBS,
%SNMP::Info::CiscoStats::MIBS,
%SNMP::Info::CDP::MIBS,
%SNMP::Info::CiscoVTP::MIBS,
%SNMP::Info::CiscoStack::MIBS,
%SNMP::Info::Layer2::MIBS, %SNMP::Info::CiscoPortSecurity::MIBS,
%SNMP::Info::CiscoStats::MIBS, %SNMP::Info::CDP::MIBS,
%SNMP::Info::CiscoVTP::MIBS, %SNMP::Info::CiscoStack::MIBS,
);
%GLOBALS = (
@@ -69,21 +67,15 @@ $VERSION = '1.09';
);
%FUNCS = (
%SNMP::Info::Layer2::FUNCS,
%SNMP::Info::CiscoPortSecurity::FUNCS,
%SNMP::Info::CiscoStats::FUNCS,
%SNMP::Info::CDP::FUNCS,
%SNMP::Info::CiscoVTP::FUNCS,
%SNMP::Info::CiscoStack::FUNCS,
%SNMP::Info::Layer2::FUNCS, %SNMP::Info::CiscoPortSecurity::FUNCS,
%SNMP::Info::CiscoStats::FUNCS, %SNMP::Info::CDP::FUNCS,
%SNMP::Info::CiscoVTP::FUNCS, %SNMP::Info::CiscoStack::FUNCS,
);
%MUNGE = (
%SNMP::Info::Layer2::MUNGE,
%SNMP::Info::CiscoPortSecurity::MUNGE,
%SNMP::Info::CiscoStats::MUNGE,
%SNMP::Info::CDP::MUNGE,
%SNMP::Info::CiscoVTP::MUNGE,
%SNMP::Info::CiscoStack::MUNGE,
%SNMP::Info::Layer2::MUNGE, %SNMP::Info::CiscoPortSecurity::MUNGE,
%SNMP::Info::CiscoStats::MUNGE, %SNMP::Info::CDP::MUNGE,
%SNMP::Info::CiscoVTP::MUNGE, %SNMP::Info::CiscoStack::MUNGE,
);
# Overidden Methods
@@ -211,7 +203,8 @@ Max Baker
SNMP::Info subclass to provide information for Cisco Catalyst series switches
running CatOS.
This class includes the Catalyst 2920, 4000, 5000, 6000 (hybrid mode) families.
This class includes the Catalyst 2920, 4000, 5000, 6000 (hybrid mode)
families.
This subclass is not for all devices that have the name Catalyst. Note that
some Catalyst switches run IOS, like the 2900 and 3550 families. Cisco
@@ -330,7 +323,8 @@ to a hash.
=item $cat->interfaces()
Returns the map between SNMP Interface Identifier (iid) and physical port name.
Returns the map between SNMP Interface Identifier (iid) and physical port
name.
=item $cat->i_name()
@@ -347,8 +341,8 @@ Returns a map to IID for ports that are physical ports, not vlans, etc.
Returns reference to hash of bridge port table entries map back to interface
identifier (iid)
Crosses (C<portCrossIndex>) to (C<portIfIndex>) since some devices seem to have
problems with F<BRIDGE-MIB>
Crosses (C<portCrossIndex>) to (C<portIfIndex>) since some devices seem to
have problems with F<BRIDGE-MIB>
=back

View File

@@ -37,7 +37,8 @@ use SNMP::Info::Bridge;
use SNMP::Info::NortelStack;
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::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/;
@@ -72,13 +73,16 @@ $VERSION = '1.09';
%SNMP::Info::Bridge::FUNCS,
%SNMP::Info::NortelStack::FUNCS,
%SNMP::Info::SONMP::FUNCS,
# CENTILLION-DOT3-EXTENSIONS-MIB::cnDot3ExtnTable
'centillion_p_index' => 'cnDot3ExtnIfIndex',
'centillion_p_duplex' => 'cnDot3ExtnIfOperConnectionType',
'centillion_p_duplex_admin' => 'cnDot3ExtnIfAdminConnectionType',
# S5-COMMON-STATS-MIB::s5CmSNodeTable
'fw_mac' => 's5CmSNodeMacAddr',
'fw_port' => 's5CmSNodeIfIndx',
# CENTILLION-VLAN-MIB::cnVlanPortMemberTable
'centillion_i_vlan_index' => 'cnVlanPortMemberIfIndex',
'centillion_i_vlan' => 'cnVlanPortMemberVID',
@@ -86,6 +90,7 @@ $VERSION = '1.09';
);
%MUNGE = (
# Inherit all the built in munging
%SNMP::Info::MUNGE,
%SNMP::Info::Bridge::MUNGE,
@@ -108,6 +113,7 @@ sub i_ignore {
my %i_ignore;
foreach my $if ( keys %$descr ) {
my $type = $descr->{$if};
# Skip virtual interfaces
$i_ignore{$if}++ if $type =~ /(VE|VID|vc|lp)/i;
}
@@ -124,6 +130,7 @@ sub interfaces {
my $index = $i_index->{$iid};
next unless defined $index;
my $descr = $i_descr->{$iid};
# Skip ATM and virtual interfaces
next if $descr =~ /(VE|VID|vc|lp)/i;
@@ -239,7 +246,6 @@ sub slot_offset {
return 0;
}
1;
__END__
@@ -411,7 +417,8 @@ to a hash.
Returns reference to the map between IID and physical Port.
Slot and port numbers on the Passport switches are determined by the formula:
Slot and port numbers on the Passport switches are determined by the
formula:
port = index % 256
slot = int(index / 256)

View File

@@ -53,47 +53,31 @@ use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/ ;
$VERSION = '1.09';
%MIBS = (
%SNMP::Info::Layer2::MIBS,
%SNMP::Info::CiscoConfig::MIBS,
%SNMP::Info::CiscoQOS::MIBS,
%SNMP::Info::CiscoRTT::MIBS,
%SNMP::Info::CiscoImage::MIBS,
%SNMP::Info::CiscoStats::MIBS,
%SNMP::Info::CDP::MIBS,
%SNMP::Info::CiscoVTP::MIBS,
%SNMP::Info::Layer2::MIBS, %SNMP::Info::CiscoConfig::MIBS,
%SNMP::Info::CiscoQOS::MIBS, %SNMP::Info::CiscoRTT::MIBS,
%SNMP::Info::CiscoImage::MIBS, %SNMP::Info::CiscoStats::MIBS,
%SNMP::Info::CDP::MIBS, %SNMP::Info::CiscoVTP::MIBS,
);
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS,
%SNMP::Info::CiscoConfig::GLOBALS,
%SNMP::Info::CiscoQOS::GLOBALS,
%SNMP::Info::CiscoRTT::GLOBALS,
%SNMP::Info::CiscoImage::GLOBALS,
%SNMP::Info::CiscoStats::GLOBALS,
%SNMP::Info::CDP::GLOBALS,
%SNMP::Info::CiscoVTP::GLOBALS,
%SNMP::Info::Layer2::GLOBALS, %SNMP::Info::CiscoConfig::GLOBALS,
%SNMP::Info::CiscoQOS::GLOBALS, %SNMP::Info::CiscoRTT::GLOBALS,
%SNMP::Info::CiscoImage::GLOBALS, %SNMP::Info::CiscoStats::GLOBALS,
%SNMP::Info::CDP::GLOBALS, %SNMP::Info::CiscoVTP::GLOBALS,
);
%FUNCS = (
%SNMP::Info::Layer2::FUNCS,
%SNMP::Info::CiscoConfig::FUNCS,
%SNMP::Info::CiscoQOS::FUNCS,
%SNMP::Info::CiscoRTT::FUNCS,
%SNMP::Info::CiscoImage::FUNCS,
%SNMP::Info::CiscoStats::FUNCS,
%SNMP::Info::CDP::FUNCS,
%SNMP::Info::CiscoVTP::FUNCS,
%SNMP::Info::Layer2::FUNCS, %SNMP::Info::CiscoConfig::FUNCS,
%SNMP::Info::CiscoQOS::FUNCS, %SNMP::Info::CiscoRTT::FUNCS,
%SNMP::Info::CiscoImage::FUNCS, %SNMP::Info::CiscoStats::FUNCS,
%SNMP::Info::CDP::FUNCS, %SNMP::Info::CiscoVTP::FUNCS,
);
%MUNGE = (
%SNMP::Info::Layer2::MUNGE,
%SNMP::Info::CiscoConfig::MUNGE,
%SNMP::Info::CiscoQOS::MUNGE,
%SNMP::Info::CiscoRTT::MUNGE,
%SNMP::Info::CiscoImage::MUNGE,
%SNMP::Info::CiscoStats::MUNGE,
%SNMP::Info::CDP::MUNGE,
%SNMP::Info::CiscoVTP::MUNGE,
%SNMP::Info::Layer2::MUNGE, %SNMP::Info::CiscoConfig::MUNGE,
%SNMP::Info::CiscoQOS::MUNGE, %SNMP::Info::CiscoRTT::MUNGE,
%SNMP::Info::CiscoImage::MUNGE, %SNMP::Info::CiscoStats::MUNGE,
%SNMP::Info::CDP::MUNGE, %SNMP::Info::CiscoVTP::MUNGE,
);
1;

View File

@@ -37,7 +37,8 @@ use SNMP::Info::FDP;
use SNMP::Info::EtherLike;
use SNMP::Info::MAU;
@SNMP::Info::Layer2::Foundry::ISA = qw/SNMP::Info::Layer2 SNMP::Info::FDP SNMP::Info::EtherLike
@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//;
@@ -45,42 +46,35 @@ use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '1.09';
%MIBS = ( %SNMP::Info::Layer2::MIBS,
%SNMP::Info::FDP::MIBS,
%SNMP::Info::EtherLike::MIBS,
%SNMP::Info::MAU::MIBS,
%MIBS = (
%SNMP::Info::Layer2::MIBS, %SNMP::Info::FDP::MIBS,
%SNMP::Info::EtherLike::MIBS, %SNMP::Info::MAU::MIBS,
'FOUNDRY-SN-ROOT-MIB' => 'foundry',
);
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS,
%SNMP::Info::FDP::GLOBALS,
%SNMP::Info::EtherLike::GLOBALS,
%SNMP::Info::MAU::GLOBALS,
%SNMP::Info::Layer2::GLOBALS, %SNMP::Info::FDP::GLOBALS,
%SNMP::Info::EtherLike::GLOBALS, %SNMP::Info::MAU::GLOBALS,
);
%FUNCS = (
%SNMP::Info::Layer2::FUNCS,
%SNMP::Info::FDP::FUNCS,
%SNMP::Info::EtherLike::FUNCS,
%SNMP::Info::MAU::FUNCS,
%SNMP::Info::Layer2::FUNCS, %SNMP::Info::FDP::FUNCS,
%SNMP::Info::EtherLike::FUNCS, %SNMP::Info::MAU::FUNCS,
'test' => 'dot1dStpPortState',
);
%MUNGE = (
%SNMP::Info::Layer2::MUNGE,
%SNMP::Info::FDP::MUNGE,
%SNMP::Info::EtherLike::MUNGE,
%SNMP::Info::MAU::MUNGE,
%SNMP::Info::Layer2::MUNGE, %SNMP::Info::FDP::MUNGE,
%SNMP::Info::EtherLike::MUNGE, %SNMP::Info::MAU::MUNGE,
);
# Method OverRides
#sub bulkwalk_no { 1;}
*SNMP::Info::Layer2::Foundry::i_duplex = \&SNMP::Info::MAU::mau_i_duplex;
*SNMP::Info::Layer2::Foundry::i_duplex_admin = \&SNMP::Info::MAU::mau_i_duplex_admin;
*SNMP::Info::Layer2::Foundry::i_duplex_admin
= \&SNMP::Info::MAU::mau_i_duplex_admin;
*SNMP::Info::Layer2::Foundry::i_vlan = \&SNMP::Info::Bridge::qb_i_vlan_t;
# todo doc these
@@ -187,13 +181,13 @@ sub i_ignore {
foreach my $iid ( keys %$i_type ) {
my $type = $i_type->{$iid} || '';
$i_ignore{$iid}++
# 33 is the console port
if $type =~ /(loopback|propvirtual|other|cpu|33)/i;
}
return \%i_ignore;
}
sub os {
return 'foundry';
}
@@ -211,7 +205,8 @@ __END__
=head1 NAME
SNMP::Info::Layer2::Foundry - SNMP Interface to Foundry FastIron Network Devices
SNMP::Info::Layer2::Foundry - SNMP Interface to Foundry FastIron Network
Devices
=head1 AUTHOR

View File

@@ -39,7 +39,8 @@ use SNMP::Info::MAU;
use SNMP::Info::LLDP;
use SNMP::Info::CDP;
@SNMP::Info::Layer2::HP::ISA = qw/SNMP::Info::Layer3 SNMP::Info::MAU SNMP::Info::LLDP
@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//;
@@ -47,7 +48,8 @@ use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %PORTSTAT %MODEL_MAP %MUNGE/ ;
$VERSION = '1.09';
%MIBS = ( %SNMP::Info::Layer3::MIBS,
%MIBS = (
%SNMP::Info::Layer3::MIBS,
%SNMP::Info::MAU::MIBS,
%SNMP::Info::LLDP::MIBS,
%SNMP::Info::CDP::MIBS,
@@ -85,8 +87,10 @@ $VERSION = '1.09';
%SNMP::Info::CDP::FUNCS,
'bp_index2' => 'dot1dBasePortIfIndex',
'i_type2' => 'ifType',
# RFC1271
'l_descr' => 'logDescription',
# HP-VLAN-MIB
'hp_v_index' => 'hpVlanDot1QID',
'hp_v_name' => 'hpVlanIdentName',
@@ -96,9 +100,11 @@ $VERSION = '1.09';
'hp_v_mac' => 'hpVlanAddrPhysAddress',
'hp_v_if_index' => 'hpVlanMemberIndex',
'hp_v_if_tag' => 'hpVlanMemberTagged2',
# CONFIG-MIB::hpSwitchPortTable
'hp_duplex' => 'hpSwitchPortEtherMode',
'hp_duplex_admin' => 'hpSwitchPortFastEtherMode',
# HP-ICF-CHASSIS
'hp_s_oid' => 'hpicfSensorObjectId',
'hp_s_name' => 'hpicfSensorDescr',
@@ -106,6 +112,7 @@ $VERSION = '1.09';
);
%MUNGE = (
# Inherit all the built in munging
%SNMP::Info::Layer3::MUNGE,
%SNMP::Info::MAU::MUNGE,
@@ -189,10 +196,12 @@ sub mem_total {
sub os {
return 'hp';
}
sub os_ver {
my $hp = shift;
my $os_version = $hp->os_version();
return $os_version if defined $os_version;
# Some older ones don't have this value,so we cull it from the description
my $descr = $hp->description();
if ( $descr =~ m/revision ([A-Z]{1}\.\d{2}\.\d{2})/ ) {
@@ -333,12 +342,14 @@ sub fan {
sub ps1_status {
my $hp = shift;
return &_sensor($hp, 'power', '^power supply 1') || &_sensor($hp, 'power', '^power supply sensor');
return &_sensor( $hp, 'power', '^power supply 1' )
|| &_sensor( $hp, 'power', '^power supply sensor' );
}
sub ps2_status {
my $hp = shift;
return &_sensor($hp, 'power', '^power supply 2') || &_sensor($hp, 'power', '^redundant');
return &_sensor( $hp, 'power', '^power supply 2' )
|| &_sensor( $hp, 'power', '^redundant' );
}
sub _sensor {
@@ -504,7 +515,7 @@ sub c_if {
my $hp = shift;
my $partial = shift;
my $lldp = $hp->lldp_if($partial) || {};;
my $lldp = $hp->lldp_if($partial) || {};
my $cdp = $hp->SUPER::c_if($partial) || {};
my %c_if;
@@ -923,9 +934,9 @@ Returns reference to hash. Key: iid Value: remote IPv4 address
If multiple entries exist with the same local port, c_if(), with the same IPv4
address, c_ip(), it may be a duplicate entry.
If multiple entries exist with the same local port, c_if(), with different IPv4
addresses, c_ip(), there is either a non-CDP/LLDP device in between two or
more devices or multiple devices which are not directly connected.
If multiple entries exist with the same local port, c_if(), with different
IPv4 addresses, c_ip(), there is either a non-CDP/LLDP device in between two
or more devices or multiple devices which are not directly connected.
Use the data from the Layer2 Topology Table below to dig deeper.

View File

@@ -37,7 +37,8 @@ use SNMP::Info::Bridge;
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/;
@SNMP::Info::Layer2::N2270::ISA
= qw/SNMP::Info SNMP::Info::Bridge SNMP::Info::SONMP SNMP::Info::Airespace Exporter/;
@SNMP::Info::Layer2::N2270::EXPORT_OK = qw//;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/;
@@ -45,31 +46,23 @@ use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/;
$VERSION = '1.09';
%MIBS = (
%SNMP::Info::MIBS,
%SNMP::Info::Bridge::MIBS,
%SNMP::Info::SONMP::MIBS,
%SNMP::Info::Airespace::MIBS,
%SNMP::Info::MIBS, %SNMP::Info::Bridge::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::GLOBALS, %SNMP::Info::Bridge::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::FUNCS, %SNMP::Info::Bridge::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::MUNGE, %SNMP::Info::Bridge::MUNGE,
%SNMP::Info::SONMP::MUNGE, %SNMP::Info::Airespace::MUNGE,
);
sub os {
@@ -104,7 +97,8 @@ __END__
=head1 NAME
SNMP::Info::Layer2::N2270 - SNMP Interface to Nortel 2270 Series Wireless Switch
SNMP::Info::Layer2::N2270 - SNMP Interface to Nortel 2270 Series Wireless
Switch
=head1 AUTHOR

View File

@@ -36,7 +36,8 @@ use SNMP::Info::SONMP;
use SNMP::Info::IEEE802dot11;
use SNMP::Info::Layer2;
@SNMP::Info::Layer2::NAP222x::ISA = qw/SNMP::Info::SONMP SNMP::Info::IEEE802dot11 SNMP::Info::Layer2 Exporter/;
@SNMP::Info::Layer2::NAP222x::ISA
= qw/SNMP::Info::SONMP SNMP::Info::IEEE802dot11 SNMP::Info::Layer2 Exporter/;
@SNMP::Info::Layer2::NAP222x::EXPORT_OK = qw//;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
@@ -44,10 +45,8 @@ use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '1.09';
%MIBS = (
%SNMP::Info::Layer2::MIBS,
%SNMP::Info::IEEE802dot11::MIBS,
%SNMP::Info::SONMP::MIBS,
'NORTEL-WLAN-AP-MIB' => 'ntWlanSwHardwareVer',
%SNMP::Info::Layer2::MIBS, %SNMP::Info::IEEE802dot11::MIBS,
%SNMP::Info::SONMP::MIBS, 'NORTEL-WLAN-AP-MIB' => 'ntWlanSwHardwareVer',
);
%GLOBALS = (
@@ -73,20 +72,22 @@ $VERSION = '1.09';
%SNMP::Info::Layer2::FUNCS,
%SNMP::Info::IEEE802dot11::FUNCS,
%SNMP::Info::SONMP::FUNCS,
# From ntWlanPortTable
'nt_prt_name' => 'ntWlanPortName',
'nt_dpx_admin' => 'ntWlanPortCapabilities',
'nt_auto' => 'ntWlanPortAutonegotiation',
'nt_dpx' => 'ntWlanPortSpeedDpxStatus',
# From ntWlanDot11PhyOperationTable
'nt_i_broadcast' => 'ntWlanDot11ClosedSystem',
# From ntWlanApVlanTable
'nt_i_vlan' => 'ntWlanApVlanDefaultVid',
);
%MUNGE = (
%SNMP::Info::Layer2::MUNGE,
%SNMP::Info::IEEE802dot11::MUNGE,
%SNMP::Info::Layer2::MUNGE, %SNMP::Info::IEEE802dot11::MUNGE,
%SNMP::Info::SONMP::MUNGE,
);
@@ -206,8 +207,10 @@ sub i_duplex_admin {
my $auto = $nt_auto->{$idx};
$duplex = 'other' unless defined $duplex;
$duplex = 'half' if ($duplex =~ /half/i and $auto =~ /disabled/i);
$duplex = 'full' if ($duplex =~ /full/i and $auto =~ /disabled/i);
$duplex = 'half'
if ( $duplex =~ /half/i and $auto =~ /disabled/i );
$duplex = 'full'
if ( $duplex =~ /full/i and $auto =~ /disabled/i );
$duplex = 'auto' if $auto =~ /enabled/i;
$i_duplex_admin{$if} = $duplex;
@@ -363,7 +366,8 @@ __END__
=head1 NAME
SNMP::Info::Layer2::NAP222x - SNMP Interface to Nortel 2220 Series Access Points
SNMP::Info::Layer2::NAP222x - SNMP Interface to Nortel 2220 Series Access
Points
=head1 AUTHOR

View File

@@ -41,21 +41,13 @@ use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '1.09';
%MIBS = (
%SNMP::Info::Layer2::MIBS,
);
%MIBS = ( %SNMP::Info::Layer2::MIBS, );
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS,
);
%GLOBALS = ( %SNMP::Info::Layer2::GLOBALS, );
%FUNCS = (
%SNMP::Info::Layer2::FUNCS,
);
%FUNCS = ( %SNMP::Info::Layer2::FUNCS, );
%MUNGE = (
%SNMP::Info::Layer2::MUNGE,
);
%MUNGE = ( %SNMP::Info::Layer2::MUNGE, );
sub vendor {
return 'netgear';
@@ -141,7 +133,8 @@ inherited methods.
=item Inherited Classes' MIBs
MIBs listed in L<SNMP::Info::Layer2/"Required MIBs"> and its inherited classes.
MIBs listed in L<SNMP::Info::Layer2/"Required MIBs"> and its inherited
classes.
=back

View File

@@ -35,7 +35,8 @@ use Exporter;
use SNMP::Info::IEEE802dot11;
use SNMP::Info::Layer2;
@SNMP::Info::Layer2::Orinoco::ISA = qw/SNMP::Info::IEEE802dot11 SNMP::Info::Layer2 Exporter/;
@SNMP::Info::Layer2::Orinoco::ISA
= qw/SNMP::Info::IEEE802dot11 SNMP::Info::Layer2 Exporter/;
@SNMP::Info::Layer2::Orinoco::EXPORT_OK = qw//;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
@@ -45,17 +46,17 @@ $VERSION = '1.09';
%MIBS = (
%SNMP::Info::Layer2::MIBS,
%SNMP::Info::IEEE802dot11::MIBS,
#'ORiNOCO-MIB' => 'orinoco',
);
%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,
# ORiNOCO-MIB:oriWirelessIfPropertiesTable
#'ori_ssid' => 'oriWirelessIfNetworkName',
#'ori_channel' => 'oriWirelessIfChannel',
@@ -63,10 +64,7 @@ $VERSION = '1.09';
# ORiNOCO-MIB:oriSystemInvMgmtComponentTable
);
%MUNGE = (
%SNMP::Info::Layer2::MUNGE,
%SNMP::Info::IEEE802dot11::MUNGE,
);
%MUNGE = ( %SNMP::Info::Layer2::MUNGE, %SNMP::Info::IEEE802dot11::MUNGE, );
sub os {
return 'orinoco';
@@ -138,6 +136,7 @@ sub i_ignore {
my %i_ignore;
foreach my $if ( keys %$descr ) {
my $type = $descr->{$if};
# Skip virtual interfaces
$i_ignore{$if}++ if $type =~ /(lo|empty|PCMCIA)/i;
}
@@ -208,9 +207,9 @@ Eric Miller
=head1 DESCRIPTION
Provides abstraction to the configuration information obtainable from a Orinoco
Access Point through SNMP. Orinoco devices have been manufactured by Proxim,
Agere, and Lucent.
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.

View File

@@ -42,24 +42,19 @@ use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '1.09';
# Set for No CDP
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS
);
%GLOBALS = ( %SNMP::Info::Layer2::GLOBALS );
%FUNCS = (%SNMP::Info::Layer2::FUNCS,
%FUNCS = (
%SNMP::Info::Layer2::FUNCS,
'ip_adresses' => 'ipAdEntAddr',
'i_name' => 'ifDescr',
'i_description' => 'adslLineConfProfile',
);
%MIBS = (
%SNMP::Info::Layer2::MIBS,
'ADSL-LINE-MIB' => 'adslLineConfProfile'
);
%MUNGE = (%SNMP::Info::Layer2::MUNGE
);
%MIBS
= ( %SNMP::Info::Layer2::MIBS, 'ADSL-LINE-MIB' => 'adslLineConfProfile' );
%MUNGE = ( %SNMP::Info::Layer2::MUNGE );
sub layers {
my $zyxel = shift;
@@ -95,7 +90,8 @@ sub model {
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;
@@ -107,7 +103,9 @@ sub ip{
my $found_ip;
foreach my $ip ( keys %{$ip_hash} ) {
$found_ip = $ip if (defined $ip and $ip =~ /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/);
$found_ip = $ip
if ( defined $ip
and $ip =~ /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/ );
}
return $found_ip;
}

View File

@@ -49,7 +49,8 @@ use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '1.09';
%MIBS = ( %SNMP::Info::MIBS,
%MIBS = (
%SNMP::Info::MIBS,
%SNMP::Info::Bridge::MIBS,
%SNMP::Info::EtherLike::MIBS,
%SNMP::Info::Entity::MIBS,
@@ -60,6 +61,7 @@ $VERSION = '1.09';
);
%GLOBALS = (
# Inherit the super class ones
%SNMP::Info::GLOBALS,
%SNMP::Info::Bridge::GLOBALS,
@@ -67,7 +69,8 @@ $VERSION = '1.09';
%SNMP::Info::Entity::GLOBALS,
%SNMP::Info::PowerEthernet::GLOBALS,
'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',
'bgp_id' => 'bgpIdentifier.0',
'bgp_local_as' => 'bgpLocalAs.0',
@@ -79,14 +82,17 @@ $VERSION = '1.09';
%SNMP::Info::EtherLike::FUNCS,
%SNMP::Info::Entity::FUNCS,
%SNMP::Info::PowerEthernet::FUNCS,
# Obsolete Address Translation Table (ARP Cache)
'old_at_index' => 'atIfIndex',
'old_at_paddr' => 'atPhysAddress',
'old_at_netaddr' => 'atNetAddress',
# IP-MIB IP Net to Media Table (ARP Cache)
'at_index' => 'ipNetToMediaIfIndex',
'at_paddr' => 'ipNetToMediaPhysAddress',
'at_netaddr' => 'ipNetToMediaNetAddress',
# OSPF-MIB::ospfIfTable
'ospf_if_ip' => 'ospfIfIpAddress',
'ospf_if_area' => 'ospfIfAreaId',
@@ -95,11 +101,13 @@ $VERSION = '1.09';
'ospf_if_dead' => 'ospfIfRtrDeadInterval',
'ospf_if_admin' => 'ospfIfAdminStat',
'ospf_if_state' => 'ospfIfState',
# OSPF-MIB::ospfNbrTable
'ospf_ip' => 'ospfHostIpAddress',
'ospf_peers' => 'ospfNbrIpAddr',
'ospf_peer_id' => 'ospfNbrRtrId',
'ospf_peer_state' => 'ospfNbrState',
# BGP4-MIB::bgpPeerTable
'bgp_peers' => 'bgpPeerLocalAddr',
'bgp_peer_id' => 'bgpPeerIdentifier',
@@ -115,6 +123,7 @@ $VERSION = '1.09';
);
%MUNGE = (
# Inherit all the built in munging
%SNMP::Info::MUNGE,
%SNMP::Info::Bridge::MUNGE,
@@ -125,7 +134,6 @@ $VERSION = '1.09';
'at_paddr' => \&SNMP::Info::munge_mac,
);
# Method OverRides
sub root_ip {
@@ -145,7 +153,10 @@ sub root_ip {
}
}
return $router_ip if ( (defined $router_ip) and ($router_ip ne '0.0.0.0') and ($l3->snmp_connect_ip($router_ip)) );
return $router_ip
if (( defined $router_ip )
and ( $router_ip ne '0.0.0.0' )
and ( $l3->snmp_connect_ip($router_ip) ) );
return;
}
@@ -157,6 +168,7 @@ sub i_ignore {
my %i_ignore;
foreach my $if ( keys %$interfaces ) {
# lo -> cisco aironet 350 loopback
if ( $interfaces->{$if} =~ /(tunnel|loopback|\blo\b|null)/i ) {
$i_ignore{$if}++;
@@ -178,7 +190,8 @@ sub serial {
# precedence
# serial2,chassis parse,serial1
return $serial2 if ( defined $serial2 and $serial2 !~ /^\s*$/ );
return $1 if (defined $chassis and $chassis =~ /serial#?:\s*([a-z0-9]+)/i);
return $1
if ( defined $chassis and $chassis =~ /serial#?:\s*([a-z0-9]+)/i );
return $serial1 if ( defined $serial1 and $serial1 !~ /^\s*$/ );
return;
@@ -191,7 +204,9 @@ sub model {
my $id = $l3->id();
unless ( defined $id ) {
print " SNMP::Info::Layer3::model() - Device does not support sysObjectID\n" if $l3->debug();
print
" SNMP::Info::Layer3::model() - Device does not support sysObjectID\n"
if $l3->debug();
return;
}
@@ -217,9 +232,10 @@ sub i_name {
foreach my $iid ( keys %$i_name2 ) {
my $name = $i_name2->{$iid};
my $alias = $i_alias->{$iid};
$i_name{$iid} = (defined $alias and $alias !~ /^\s*$/) ?
$alias :
$name;
$i_name{$iid}
= ( defined $alias and $alias !~ /^\s*$/ )
? $alias
: $name;
}
return \%i_name;
@@ -472,7 +488,8 @@ to a hash.
=item $l3->interfaces()
Returns the map between SNMP Interface Identifier (iid) and physical port name.
Returns the map between SNMP Interface Identifier (iid) and physical port
name.
Only returns those iids that have a description listed in $l3->i_description()
@@ -623,8 +640,8 @@ received on this connection
=item $l3->bgp_peer_out_tot_msgs()
Returns reference to hash of BGP peer to the total number of messages transmitted
to the remote peer on this connection
Returns reference to hash of BGP peer to the total number of messages
transmitted to the remote peer on this connection
(C<bgpPeerOutTotalMessages>)

View File

@@ -52,6 +52,7 @@ $VERSION = '1.09';
%GLOBALS = (
%SNMP::Info::Layer3::GLOBALS,
'mac' => 'dot11StationID.2',
# AWC Ethernet Table
'awc_duplex' => 'awcEtherDuplex.0',
);
@@ -61,10 +62,12 @@ $VERSION = '1.09';
'i_mac2' => 'ifPhysAddress',
'i_mtu2' => 'ifMtu',
'i_ssid' => 'dot11DesiredSSID',
# Bridge-mib overrides
'fw_mac2' => 'dot1dTpFdbAddress',
'fw_port2' => 'dot1dTpFdbPort',
'bp_index2' => 'dot1dBasePortIfIndex',
# AWC Interface Table (awcIfTable)
'awc_default_mac' => 'awcIfDefaultPhyAddress',
'awc_mac' => 'awcIfPhyAddress',
@@ -74,6 +77,7 @@ $VERSION = '1.09';
);
%MUNGE = (
# Inherit all the built in munging
%SNMP::Info::Layer3::MUNGE,
'i_mac2' => \&SNMP::Info::munge_mac,
@@ -148,7 +152,6 @@ sub fw_port {
my $fw_port = $aironet->fw_port2();
my $bs_port = $aironet->bs_port();
foreach my $bs ( keys %$bs_port ) {
my $entry = $bs;
$entry =~ s/\.0$//;
@@ -158,7 +161,6 @@ sub fw_port {
return $fw_port;
}
sub i_duplex {
my $aironet = shift;
my $interfaces = $aironet->interfaces();
@@ -213,8 +215,8 @@ __END__
=head1 NAME
SNMP::Info::Layer3::Aironet - Perl5 Interface to Cisco Aironet Wireless Devices
running Aironet software, not IOS
SNMP::Info::Layer3::Aironet - Perl5 Interface to Cisco Aironet Wireless
Devices running Aironet software, not IOS
=head1 AUTHOR

View File

@@ -70,6 +70,7 @@ $VERSION = '1.09';
%FUNCS = (
%SNMP::Info::Layer3::FUNCS,
# From agPortCurCfgTable
'old_ag_p_cfg_idx' => 'ALTEON_TS_PHYSICAL_MIB__agPortCurCfgIndx',
'new_ag_p_cfg_idx' => 'ALTEON_CHEETAH_SWITCH_MIB__agPortCurCfgIndx',
@@ -77,22 +78,31 @@ $VERSION = '1.09';
'new_ag_p_cfg_pref' => 'agPortCurCfgPreferred',
'old_ag_p_cfg_pvid' => 'ALTEON_TS_PHYSICAL_MIB__agPortCurCfgPVID',
'new_ag_p_cfg_pvid' => 'ALTEON_CHEETAH_SWITCH_MIB__agPortCurCfgPVID',
'old_ag_p_cfg_fe_auto' => 'ALTEON_TS_PHYSICAL_MIB__agPortCurCfgFastEthAutoNeg',
'new_ag_p_cfg_fe_auto' => 'ALTEON_CHEETAH_SWITCH_MIB__agPortCurCfgFastEthAutoNeg',
'old_ag_p_cfg_fe_mode' => 'ALTEON_TS_PHYSICAL_MIB__agPortCurCfgFastEthMode',
'new_ag_p_cfg_fe_mode' => 'ALTEON_CHEETAH_SWITCH_MIB__agPortCurCfgFastEthMode',
'old_ag_p_cfg_ge_auto' => 'ALTEON_TS_PHYSICAL_MIB__agPortCurCfgGigEthAutoNeg',
'new_ag_p_cfg_ge_auto' => 'ALTEON_CHEETAH_SWITCH_MIB__agPortCurCfgGigEthAutoNeg',
'old_ag_p_cfg_fe_auto' =>
'ALTEON_TS_PHYSICAL_MIB__agPortCurCfgFastEthAutoNeg',
'new_ag_p_cfg_fe_auto' =>
'ALTEON_CHEETAH_SWITCH_MIB__agPortCurCfgFastEthAutoNeg',
'old_ag_p_cfg_fe_mode' =>
'ALTEON_TS_PHYSICAL_MIB__agPortCurCfgFastEthMode',
'new_ag_p_cfg_fe_mode' =>
'ALTEON_CHEETAH_SWITCH_MIB__agPortCurCfgFastEthMode',
'old_ag_p_cfg_ge_auto' =>
'ALTEON_TS_PHYSICAL_MIB__agPortCurCfgGigEthAutoNeg',
'new_ag_p_cfg_ge_auto' =>
'ALTEON_CHEETAH_SWITCH_MIB__agPortCurCfgGigEthAutoNeg',
'old_ag_p_cfg_name' => 'ALTEON_TS_PHYSICAL_MIB__agPortCurCfgPortName',
'new_ag_p_cfg_name' => 'ALTEON_CHEETAH_SWITCH_MIB__agPortCurCfgPortName',
# From portInfoTable
'old_p_info_idx' => 'ALTEON_TS_PHYSICAL_MIB__portInfoIndx',
'new_p_info_idx' => 'ALTEON_CHEETAH_SWITCH_MIB__portInfoIndx',
'old_p_info_mode' => 'ALTEON_TS_PHYSICAL_MIB__portInfoMode',
'new_p_info_mode' => 'ALTEON_CHEETAH_SWITCH_MIB__portInfoMode',
# From ipCurCfgIntfTable
'old_ip_cfg_vlan' => 'ALTEON_TS_NETWORK_MIB__ipCurCfgIntfVlan',
'new_ip_cfg_vlan' => 'ALTEON_CHEETAH_NETWORK_MIB__ipCurCfgIntfVlan',
# From vlanCurCfgTable
'old_vlan_id' => 'ALTEON_TS_PHYSICAL_MIB__vlanCurCfgVlanId',
'new_vlan_id' => 'ALTEON_CS_PHYSICAL_MIB__vlanCurCfgVlanId',
@@ -104,9 +114,7 @@ $VERSION = '1.09';
'new_vlan_ports' => 'ALTEON_CS_PHYSICAL_MIB__vlanCurCfgPorts',
);
%MUNGE = (
%SNMP::Info::Layer3::MUNGE,
);
%MUNGE = ( %SNMP::Info::Layer3::MUNGE, );
sub model {
my $alteon = shift;
@@ -114,7 +122,9 @@ sub model {
my $id = $alteon->id();
unless ( defined $id ) {
print " SNMP::Info::Layer3::AlteonAD::model() - Device does not support sysObjectID\n" if $alteon->debug();
print
" SNMP::Info::Layer3::AlteonAD::model() - Device does not support sysObjectID\n"
if $alteon->debug();
return;
}
@@ -159,6 +169,7 @@ sub interfaces {
if ( $desc =~ /(^net\d+)/ ) {
$desc = $1;
}
# IP interfaces are first followed by physical, number possible
# varies by switch model
elsif ( defined $ip_max and $iid > $ip_max ) {
@@ -172,7 +183,9 @@ sub interfaces {
sub i_duplex {
my $alteon = shift;
my $p_mode = $alteon->new_p_info_mode() || $alteon->old_p_info_mode() || {};
my $p_mode = $alteon->new_p_info_mode()
|| $alteon->old_p_info_mode()
|| {};
my $ip_max = $alteon->new_ip_max() || $alteon->old_ip_max();
my %i_duplex;
@@ -194,10 +207,18 @@ sub i_duplex {
sub i_duplex_admin {
my $alteon = shift;
my $ag_pref = $alteon->new_ag_p_cfg_pref() || $alteon->old_ag_p_cfg_pref() || {};
my $ag_fe_auto = $alteon->new_ag_p_cfg_fe_auto() || $alteon->old_ag_p_cfg_fe_auto() || {};
my $ag_fe_mode = $alteon->new_ag_p_cfg_fe_mode() || $alteon->old_ag_p_cfg_fe_mode() || {};
my $ag_ge_auto = $alteon->new_ag_p_cfg_ge_auto() || $alteon->old_ag_p_cfg_ge_auto() || {};
my $ag_pref = $alteon->new_ag_p_cfg_pref()
|| $alteon->old_ag_p_cfg_pref()
|| {};
my $ag_fe_auto = $alteon->new_ag_p_cfg_fe_auto()
|| $alteon->old_ag_p_cfg_fe_auto()
|| {};
my $ag_fe_mode = $alteon->new_ag_p_cfg_fe_mode()
|| $alteon->old_ag_p_cfg_fe_mode()
|| {};
my $ag_ge_auto = $alteon->new_ag_p_cfg_ge_auto()
|| $alteon->old_ag_p_cfg_ge_auto()
|| {};
my $ip_max = $alteon->new_ip_max() || $alteon->old_ip_max();
my %i_duplex_admin;
@@ -214,8 +235,10 @@ sub i_duplex_admin {
elsif ( $pref =~ /fast/i ) {
my $fe_auto = $ag_fe_auto->{$if};
my $fe_mode = $ag_fe_mode->{$if};
$string = 'half' if ($fe_mode =~ /half/i and $fe_auto =~ /off/i);
$string = 'full' if ($fe_mode =~ /full/i and $fe_auto =~ /off/i);
$string = 'half'
if ( $fe_mode =~ /half/i and $fe_auto =~ /off/i );
$string = 'full'
if ( $fe_mode =~ /full/i and $fe_auto =~ /off/i );
$string = 'auto' if $fe_auto =~ /on/i;
}
@@ -230,7 +253,9 @@ sub i_duplex_admin {
sub i_name {
my $alteon = shift;
my $p_name = $alteon->new_ag_p_cfg_name() || $alteon->old_ag_p_cfg_name() || {};
my $p_name = $alteon->new_ag_p_cfg_name()
|| $alteon->old_ag_p_cfg_name()
|| {};
my $ip_max = $alteon->new_ip_max() || $alteon->old_ip_max();
my %i_name;
@@ -255,14 +280,19 @@ sub v_name {
my $alteon = shift;
my $partial = shift;
return $alteon->new_vlan_name($partial) || $alteon->old_vlan_name($partial);
return $alteon->new_vlan_name($partial)
|| $alteon->old_vlan_name($partial);
}
sub i_vlan {
my $alteon = shift;
my $ag_vlans = $alteon->new_ag_p_cfg_pvid() || $alteon->old_ag_p_cfg_pvid() || {};
my $ip_vlans = $alteon->new_ip_cfg_vlan() || $alteon->old_ip_cfg_vlan() || {};
my $ag_vlans = $alteon->new_ag_p_cfg_pvid()
|| $alteon->old_ag_p_cfg_pvid()
|| {};
my $ip_vlans = $alteon->new_ip_cfg_vlan()
|| $alteon->old_ip_cfg_vlan()
|| {};
my $ip_max = $alteon->new_ip_max() || $alteon->old_ip_max();
my %i_vlan;
@@ -286,7 +316,9 @@ sub i_vlan {
sub i_vlan_membership {
my $alteon = shift;
my $v_ports = $alteon->old_vlan_ports() || $alteon->new_vlan_ports() || {};
my $v_ports = $alteon->old_vlan_ports()
|| $alteon->new_vlan_ports()
|| {};
my $ip_max = $alteon->new_ip_max() || $alteon->old_ip_max();
my $i_vlan_membership = {};
@@ -357,8 +389,8 @@ Eric Miller
=head1 DESCRIPTION
Abstraction subclass for Nortel Alteon Series Layer 2-7 load balancing switches
and Nortel BladeCenter Layer2-3 GbE Switch Modules.
Abstraction subclass for Nortel Alteon Series Layer 2-7 load balancing
switches and Nortel BladeCenter Layer2-3 GbE Switch Modules.
For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above.

View File

@@ -69,6 +69,7 @@ $VERSION = '1.09';
%SNMP::Info::FUNCS,
%SNMP::Info::Layer3::FUNCS,
%SNMP::Info::Bridge::FUNCS,
# From Wellfleet-CSMACD-MIB::wfCSMACDTable
'wf_csmacd_cct' => 'wfCSMACDCct',
'wf_csmacd_slot' => 'wfCSMACDSlot',
@@ -76,13 +77,16 @@ $VERSION = '1.09';
'wf_csmacd_mtu' => 'wfCSMACDMtu',
'wf_duplex' => 'wfCSMACDLineCapability',
'wf_csmacd_line' => 'wfCSMACDLineNumber',
# From Wellfleet-CSMACD-MIB::wfCSMACDAutoNegTable
'wf_auto' => 'wfCSMACDAutoNegSpeedSelect',
# From Wellfleet-DOT1QTAG-CONFIG-MIB::wfDot1qTagConfigTable
'wf_vlan_name' => 'wfDot1qTagCfgVlanName',
'wf_local_vlan_id' => 'wfDot1qTagCfgLocalVlanId',
'wf_global_vlan_id' => 'wfDot1qTagCfgGlobalVlanId',
'wf_vlan_port' => 'wfDot1qTagCfgPhysicalPortId',
# From Wellfleet-HARDWARE-MIB::wfHwTable
'wf_hw_slot' => 'wfHwSlot',
'wf_hw_mod_id' => 'wfHwModIdOpt',
@@ -171,21 +175,23 @@ $VERSION = '1.09';
197 => 'SINGLEMODE FDDI PHY-B,FDDI CAM DAUGHTER CARD',
198 => 'SINGLEMODE FDDI PHY-A/B,FDDI CAM DAUGHTER CARD',
199 => 'SINGLEMODE FDDI PHY-A,FDDI CAM DAUGHTER CARD',
208 =>
{
0 => 'AFNes - V.35,AFNes - X.21,AFNes - CCITT V.35,AFNes - RS449/RS422,AFNes - V.35 w/FLASH,AFNes - X.21 w/FLASH,AFNes-CCITT V.35 w/FL,AFNes - RS422 w/FLASH AFNes 16M - V.35,AFNes 16M - X.21,AFNes 16M - CCITT V.35,AFNes 16M - RS449/RS422,AFNes 16M V.35 w/Flash,AFNes 16M X.21 w/Flash,AFNes 16M CCITT V.35 w/Flash,AFNes 16M RS449/RS422 w/Flash',
4096 => 'AFNes - V.35,AFNes - X.21,AFNes - CCITT V.35,AFNes - RS449/RS422,AFNes - V.35 w/FLASH,AFNes - X.21 w/FLASH,AFNes-CCITT V.35 w/FL,AFNes - RS422 w/FLASH',
16384 => 'AFNes 16M - V.35,AFNes 16M - X.21,AFNes 16M - CCITT V.35,AFNes 16M - RS449/RS422,AFNes 16M V.35 w/Flash,AFNes 16M X.21 w/Flash,AFNes 16M CCITT V.35 w/Flash,AFNes 16M RS449/RS422 w/Flash',
208 => {
0 =>
'AFNes - V.35,AFNes - X.21,AFNes - CCITT V.35,AFNes - RS449/RS422,AFNes - V.35 w/FLASH,AFNes - X.21 w/FLASH,AFNes-CCITT V.35 w/FL,AFNes - RS422 w/FLASH AFNes 16M - V.35,AFNes 16M - X.21,AFNes 16M - CCITT V.35,AFNes 16M - RS449/RS422,AFNes 16M V.35 w/Flash,AFNes 16M X.21 w/Flash,AFNes 16M CCITT V.35 w/Flash,AFNes 16M RS449/RS422 w/Flash',
4096 =>
'AFNes - V.35,AFNes - X.21,AFNes - CCITT V.35,AFNes - RS449/RS422,AFNes - V.35 w/FLASH,AFNes - X.21 w/FLASH,AFNes-CCITT V.35 w/FL,AFNes - RS422 w/FLASH',
16384 =>
'AFNes 16M - V.35,AFNes 16M - X.21,AFNes 16M - CCITT V.35,AFNes 16M - RS449/RS422,AFNes 16M V.35 w/Flash,AFNes 16M X.21 w/Flash,AFNes 16M CCITT V.35 w/Flash,AFNes 16M RS449/RS422 w/Flash',
},
216 =>
{
0 => 'AFNts 2x2,AFNts 2x2 - w/FLASH,AFNTS 2X2 16MB,AFNTS 2X2 16MB FLASH',
216 => {
0 =>
'AFNts 2x2,AFNts 2x2 - w/FLASH,AFNTS 2X2 16MB,AFNTS 2X2 16MB FLASH',
4096 => 'AFNts 2x2,AFNts 2x2 - w/FLASH',
16384 => 'AFNTS 2X2 16MB,AFNTS 2X2 16MB FLASH',
},
217 =>
{
0 => 'AFNts 1x2,AFNts 1x2 - w/FLASH,AFNTS 1X2 16MB,AFNTS 1X2 16MB FLASH',
217 => {
0 =>
'AFNts 1x2,AFNts 1x2 - w/FLASH,AFNTS 1X2 16MB,AFNTS 1X2 16MB FLASH',
4096 => 'AFNts 1x2,AFNts 1x2 - w/FLASH',
16384 => 'AFNTS 1X2 16MB,AFNTS 1X2 16MB FLASH',
},
@@ -195,203 +201,212 @@ $VERSION = '1.09';
256 => 'QUAD TOKEN',
512 => 'SPX NET MODULE',
769 => 'HOT SWAP SPEX NET MOD',
1024 =>
{
1024 => {
4096 => 'AN-ENET 1X2 SPARE 4F/8D,BAYSTACK AN-ES 8MB',
8192 => 'AN-ENET 1X2 SPARE 4F/8D,BAYSTACK AN-ES 8MB',
16384 => 'AN-ENET 1X2 SPARE 4F/16D,BAYSTACK AN-ES 16MB',
},
1025 =>
{
1025 => {
4096 => 'AN-ENET/TOK 1X1X2 SPARE 4F/8D,BAYSTACK AN-ETS 8MB',
8192 => 'AN-ENET/TOK 1X1X2 SPARE 4F/8D,BAYSTACK AN-ETS 8MB',
16384 => 'AN-ENET/TOK 1X1X2 SPARE 4F/16D,BAYSTACK AN-ETS 16MB',
},
1026 =>
{
1026 => {
4096 => 'AN-HUB SPARE 4F/8D,BAYSTACK ANH-12 8MB',
8192 => 'AN-HUB SPARE 4F/8D,BAYSTACK ANH-12 8MB',
16384 => 'AN - HUB SPARE 4F/16D,BAYSTACK ANH-12 16MB',
},
1027 =>
{
1027 => {
4096 => 'AN-ENET 1X2 SPARE 4F/8D,AN ISDN BRI DAUGHTER CARD',
8192 => 'AN-ENET 1X2 SPARE 4F/8D,AN ISDN BRI DAUGHTER CARD',
16384 => 'AN-ENET 1X2 SPARE 4F/16D,AN ISDN BRI DAUGHTER CARD',
},
1028 =>
{
1028 => {
4096 => 'AN-ENET/TOK 1X1X2 SPARE 4F/8D,AN ISDN BRI DAUGHTER CARD',
8192 => 'AN-ENET/TOK 1X1X2 SPARE 4F/8D,AN ISDN BRI DAUGHTER CARD',
16384 => 'AN-ENET/TOK 1X1X2 SPARE 4F/16D,AN ISDN BRI DAUGHTER CARD',
},
1029 =>
{
1029 => {
4096 => 'AN-HUB SPARE 4F/8D,AN ISDN BRI DAUGHTER CARD',
8192 => 'AN-HUB SPARE 4F/8D,AN ISDN BRI DAUGHTER CARD',
16384 => 'AN - HUB SPARE 4F/16D,AN ISDN BRI DAUGHTER CARD',
},
1030 =>
{
4096 => 'AN 3RD SYNC DAUGHTER CARD,AN-ENET 1X2 SPARE 4F/8D,BAYSTACK AN-ES 8MB',
8192 => 'AN 3RD SYNC DAUGHTER CARD,AN-ENET 1X2 SPARE 4F/8D,BAYSTACK AN-ES 8MB',
16384 => 'AN 3RD SYNC DAUGHTER CARD,AN-ENET 1X2 SPARE 4F/16D,BAYSTACK AN-ES 16MB',
1030 => {
4096 =>
'AN 3RD SYNC DAUGHTER CARD,AN-ENET 1X2 SPARE 4F/8D,BAYSTACK AN-ES 8MB',
8192 =>
'AN 3RD SYNC DAUGHTER CARD,AN-ENET 1X2 SPARE 4F/8D,BAYSTACK AN-ES 8MB',
16384 =>
'AN 3RD SYNC DAUGHTER CARD,AN-ENET 1X2 SPARE 4F/16D,BAYSTACK AN-ES 16MB',
},
1031 =>
{
4096 => 'AN 3RD SYNC DAUGHTER CARD,AN-ENET/TOK 1X1X2 SPARE 4F/8D,BAYSTACK AN-ETS 8MB',
8192 => 'AN 3RD SYNC DAUGHTER CARD,AN-ENET/TOK 1X1X2 SPARE 4F/8D,BAYSTACK AN-ETS 8MB',
16384 => 'AN 3RD SYNC DAUGHTER CARD,AN-ENET/TOK 1X1X2 SPARE 4F/16D,BAYSTACK AN-ETS 16MB',
1031 => {
4096 =>
'AN 3RD SYNC DAUGHTER CARD,AN-ENET/TOK 1X1X2 SPARE 4F/8D,BAYSTACK AN-ETS 8MB',
8192 =>
'AN 3RD SYNC DAUGHTER CARD,AN-ENET/TOK 1X1X2 SPARE 4F/8D,BAYSTACK AN-ETS 8MB',
16384 =>
'AN 3RD SYNC DAUGHTER CARD,AN-ENET/TOK 1X1X2 SPARE 4F/16D,BAYSTACK AN-ETS 16MB',
},
1032 =>
{
4096 => 'AN 3RD SYNC DAUGHTER CARD,AN-HUB SPARE 4F/8D,BAYSTACK ANH-12 8MB',
8192 => 'AN 3RD SYNC DAUGHTER CARD,AN-HUB SPARE 4F/8D,BAYSTACK ANH-12 8MB',
16384 => 'AN 3RD SYNC DAUGHTER CARD,AN - HUB SPARE 4F/16D,BAYSTACK ANH-12 16MB',
1032 => {
4096 =>
'AN 3RD SYNC DAUGHTER CARD,AN-HUB SPARE 4F/8D,BAYSTACK ANH-12 8MB',
8192 =>
'AN 3RD SYNC DAUGHTER CARD,AN-HUB SPARE 4F/8D,BAYSTACK ANH-12 8MB',
16384 =>
'AN 3RD SYNC DAUGHTER CARD,AN - HUB SPARE 4F/16D,BAYSTACK ANH-12 16MB',
},
1033 =>
{
4096 => 'AN 2ND ENET DAUGHTER CARD,AN-ENET 1X2 SPARE 4F/8D,BAYSTACK AN-ES 8MB',
8192 => 'AN 2ND ENET DAUGHTER CARD,AN-ENET 1X2 SPARE 4F/8D,BAYSTACK AN-ES 8MB',
16384 => 'AN 2ND ENET DAUGHTER CARD,AN-ENET 1X2 SPARE 4F/16D,BAYSTACK AN-ES 16MB',
1033 => {
4096 =>
'AN 2ND ENET DAUGHTER CARD,AN-ENET 1X2 SPARE 4F/8D,BAYSTACK AN-ES 8MB',
8192 =>
'AN 2ND ENET DAUGHTER CARD,AN-ENET 1X2 SPARE 4F/8D,BAYSTACK AN-ES 8MB',
16384 =>
'AN 2ND ENET DAUGHTER CARD,AN-ENET 1X2 SPARE 4F/16D,BAYSTACK AN-ES 16MB',
},
1035 =>
{
4096 => 'AN 2ND ENET DAUGHTER CARD,AN-HUB SPARE 4F/8D,BAYSTACK ANH-12 8MB',
8192 => 'AN 2ND ENET DAUGHTER CARD,AN-HUB SPARE 4F/8D,BAYSTACK ANH-12 8MB',
16384 => 'AN 2ND ENET DAUGHTER CARD,AN - HUB SPARE 4F/16D,BAYSTACK ANH-12 16MB',
1035 => {
4096 =>
'AN 2ND ENET DAUGHTER CARD,AN-HUB SPARE 4F/8D,BAYSTACK ANH-12 8MB',
8192 =>
'AN 2ND ENET DAUGHTER CARD,AN-HUB SPARE 4F/8D,BAYSTACK ANH-12 8MB',
16384 =>
'AN 2ND ENET DAUGHTER CARD,AN - HUB SPARE 4F/16D,BAYSTACK ANH-12 16MB',
},
1037 =>
{
1037 => {
4096 => 'AN-TOK 1X2 SPARE 4F/8D,BAYSTACK AN-TS 8MB',
8192 => 'AN-TOK 1X2 SPARE 4F/8D,BAYSTACK AN-TS 8MB',
16384 => 'AN-TOK 1X2 SPARE 4F/16D,BAYSTACK AN-TS 16MB',
},
1038 =>
{
1038 => {
4096 => 'AN-TOK 1X2 SPARE 4F/8D,AN ISDN BRI DAUGHTER CARD',
8192 => 'AN-TOK 1X2 SPARE 4F/8D,AN ISDN BRI DAUGHTER CARD',
16384 => 'AN-TOK 1X2 SPARE 4F/16D,AN ISDN BRI DAUGHTER CARD',
},
1039 =>
{
4096 => 'AN 3RD SYNC DAUGHTER CARD,AN-TOK 1X2 SPARE 4F/8D,BAYSTACK AN-TS 8MB',
8192 => 'AN 3RD SYNC DAUGHTER CARD,AN-TOK 1X2 SPARE 4F/8D,BAYSTACK AN-TS 8MB',
16384 => 'AN 3RD SYNC DAUGHTER CARD,AN-TOK 1X2 SPARE 4F/16D,BAYSTACK AN-TS 16MB',
1039 => {
4096 =>
'AN 3RD SYNC DAUGHTER CARD,AN-TOK 1X2 SPARE 4F/8D,BAYSTACK AN-TS 8MB',
8192 =>
'AN 3RD SYNC DAUGHTER CARD,AN-TOK 1X2 SPARE 4F/8D,BAYSTACK AN-TS 8MB',
16384 =>
'AN 3RD SYNC DAUGHTER CARD,AN-TOK 1X2 SPARE 4F/16D,BAYSTACK AN-TS 16MB',
},
1042 =>
{
1042 => {
4096 => 'BAYSTACK AN-ETS 8MB,BAYSTACK AN N11 DCM',
8192 => 'BAYSTACK AN-ETS 8MB,BAYSTACK AN N11 DCM',
16384 => 'BAYSTACK AN-ETS 16MB,BAYSTACK AN N11 DCM',
},
1043 =>
{
1043 => {
4096 => 'BAYSTACK AN-ES 8MB,AN ISDN BRI DAUGHTER CARD',
8192 => 'BAYSTACK AN-ES 8MB,AN ISDN BRI DAUGHTER CARD',
16384 => 'BAYSTACK AN-ES 16MB,AN ISDN BRI DAUGHTER CARD',
},
1044 =>
{
1044 => {
4096 => 'BAYSTACK AN-ETS 8MB,AN ISDN BRI DAUGHTER CARD',
8192 => 'BAYSTACK AN-ETS 8MB,AN ISDN BRI DAUGHTER CARD',
16384 => 'BAYSTACK AN-ETS 16MB,AN ISDN BRI DAUGHTER CARD',
},
1045 =>
{
1045 => {
4096 => 'BAYSTACK ANH-12 8MB,AN ISDN BRI DAUGHTER CARD',
8192 => 'BAYSTACK ANH-12 8MB,AN ISDN BRI DAUGHTER CARD',
16384 => 'BAYSTACK ANH-12 16MB,AN ISDN BRI DAUGHTER CARD',
},
1046 =>
{
1046 => {
4096 => 'BAYSTACK AN-TS 8MB,AN ISDN BRI DAUGHTER CARD',
8192 => 'BAYSTACK AN-TS 8MB,AN ISDN BRI DAUGHTER CARD',
16384 => 'BAYSTACK AN-TS 16MB,AN ISDN BRI DAUGHTER CARD',
},
1047 =>
{
1047 => {
4096 => 'BAYSTACK ANH-8 8MB',
8192 => 'BAYSTACK ANH-8 8MB',
16384 => 'BAYSTACK ANH-8 16MB',
},
1048 =>
{
1048 => {
4096 => 'BAYSTACK ANH-8 8MB,BAYSTACK ANH-8 N11 DCM',
8192 => 'BAYSTACK ANH-8 8MB,BAYSTACK ANH-8 N11 DCM',
16384 => 'BAYSTACK ANH-8 16MB,BAYSTACK ANH-8 N11 DCM',
},
1049 =>
{
1049 => {
4096 => 'BAYSTACK ANH-8 8MB,BAYSTACK ANH-8 3RD SYNC DAUGHTER CARD',
8192 => 'BAYSTACK ANH-8 8MB,BAYSTACK ANH-8 3RD SYNC DAUGHTER CARD',
16384 => 'BAYSTACK ANH-8 16MB,BAYSTACK ANH-8 3RD SYNC DAUGHTER CARD',
},
1050 =>
{
1050 => {
4096 => 'BAYSTACK ANH-8 8MB,BAYSTACK ANH-8 2ND ENET DAUGHTER CARD',
8192 => 'BAYSTACK ANH-8 8MB,BAYSTACK ANH-8 2ND ENET DAUGHTER CARD',
16384 => 'BAYSTACK ANH-8 16MB,BAYSTACK ANH-8 2ND ENET DAUGHTER CARD',
},
1051 =>
{
1051 => {
4096 => 'BAYSTACK ANH-8 8MB,BAYSTACK ANH-8 ISDN BRI DAUGHTER CARD',
8192 => 'BAYSTACK ANH-8 8MB,BAYSTACK ANH-8 ISDN BRI DAUGHTER CARD',
16384 => 'BAYSTACK ANH-8 16MB,BAYSTACK ANH-8 ISDN BRI DAUGHTER CARD',
},
1052 =>
{
4096 => 'BAYSTACK ANH-8 8MB,BAYSTACK ANH-8 3RD SYNC DAUGHTER CARD,BAYSTACK ANH-8 N11 DCM',
8192 => 'BAYSTACK ANH-8 8MB,BAYSTACK ANH-8 3RD SYNC DAUGHTER CARD,BAYSTACK ANH-8 N11 DCM',
16384 => 'BAYSTACK ANH-8 16MB,BAYSTACK ANH-8 3RD SYNC DAUGHTER CARD,BAYSTACK ANH-8 N11 DCM',
1052 => {
4096 =>
'BAYSTACK ANH-8 8MB,BAYSTACK ANH-8 3RD SYNC DAUGHTER CARD,BAYSTACK ANH-8 N11 DCM',
8192 =>
'BAYSTACK ANH-8 8MB,BAYSTACK ANH-8 3RD SYNC DAUGHTER CARD,BAYSTACK ANH-8 N11 DCM',
16384 =>
'BAYSTACK ANH-8 16MB,BAYSTACK ANH-8 3RD SYNC DAUGHTER CARD,BAYSTACK ANH-8 N11 DCM',
},
1053 =>
{
4096 => 'BAYSTACK ANH-8 8MB,BAYSTACK ANH-8 2ND ENET DAUGHTER CARD,BAYSTACK ANH-8 N11 DCM',
8192 => 'BAYSTACK ANH-8 8MB,BAYSTACK ANH-8 2ND ENET DAUGHTER CARD,BAYSTACK ANH-8 N11 DCM',
16384 => 'BAYSTACK ANH-8 16MB,BAYSTACK ANH-8 2ND ENET DAUGHTER CARD,BAYSTACK ANH-8 N11 DCM',
1053 => {
4096 =>
'BAYSTACK ANH-8 8MB,BAYSTACK ANH-8 2ND ENET DAUGHTER CARD,BAYSTACK ANH-8 N11 DCM',
8192 =>
'BAYSTACK ANH-8 8MB,BAYSTACK ANH-8 2ND ENET DAUGHTER CARD,BAYSTACK ANH-8 N11 DCM',
16384 =>
'BAYSTACK ANH-8 16MB,BAYSTACK ANH-8 2ND ENET DAUGHTER CARD,BAYSTACK ANH-8 N11 DCM',
},
1054 =>
{
4096 => 'BAYSTACK ANH-8 8MB,BAYSTACK ANH-8 ISDN BRI DAUGHTER CARD,BAYSTACK ANH-8 N11 DCM',
8192 => 'BAYSTACK ANH-8 8MB,BAYSTACK ANH-8 ISDN BRI DAUGHTER CARD,BAYSTACK ANH-8 N11 DCM',
16384 => 'BAYSTACK ANH-8 16MB,BAYSTACK ANH-8 ISDN BRI DAUGHTER CARD,BAYSTACK ANH-8 N11 DCM',
1054 => {
4096 =>
'BAYSTACK ANH-8 8MB,BAYSTACK ANH-8 ISDN BRI DAUGHTER CARD,BAYSTACK ANH-8 N11 DCM',
8192 =>
'BAYSTACK ANH-8 8MB,BAYSTACK ANH-8 ISDN BRI DAUGHTER CARD,BAYSTACK ANH-8 N11 DCM',
16384 =>
'BAYSTACK ANH-8 16MB,BAYSTACK ANH-8 ISDN BRI DAUGHTER CARD,BAYSTACK ANH-8 N11 DCM',
},
1055 =>
{
1055 => {
4096 => 'BAYSTACK AN-ES 8MB,BAYSTACK AN N11 DCM',
8192 => 'BAYSTACK AN-ES 8MB,BAYSTACK AN N11 DCM',
16384 => 'BAYSTACK AN-ES 16MB,BAYSTACK AN N11 DCM',
},
1056 =>
{
4096 => 'BAYSTACK AN-ES 8MB,AN 3RD SYNC DAUGHTER CARD,BAYSTACK AN N11 DCM',
8192 => 'BAYSTACK AN-ES 8MB,AN 3RD SYNC DAUGHTER CARD,BAYSTACK AN N11 DCM',
16384 => 'BAYSTACK AN-ES 16MB,AN 3RD SYNC DAUGHTER CARD,BAYSTACK AN N11 DCM',
1056 => {
4096 =>
'BAYSTACK AN-ES 8MB,AN 3RD SYNC DAUGHTER CARD,BAYSTACK AN N11 DCM',
8192 =>
'BAYSTACK AN-ES 8MB,AN 3RD SYNC DAUGHTER CARD,BAYSTACK AN N11 DCM',
16384 =>
'BAYSTACK AN-ES 16MB,AN 3RD SYNC DAUGHTER CARD,BAYSTACK AN N11 DCM',
},
1057 =>
{
4096 => 'BAYSTACK AN-ES 8MB,AN 2ND ENET DAUGHTER CARD,BAYSTACK AN N11 DCM',
8192 => 'BAYSTACK AN-ES 8MB,AN 2ND ENET DAUGHTER CARD,BAYSTACK AN N11 DCM',
16384 => 'BAYSTACK AN-ES 16MB,AN 2ND ENET DAUGHTER CARD,BAYSTACK AN N11 DCM',
1057 => {
4096 =>
'BAYSTACK AN-ES 8MB,AN 2ND ENET DAUGHTER CARD,BAYSTACK AN N11 DCM',
8192 =>
'BAYSTACK AN-ES 8MB,AN 2ND ENET DAUGHTER CARD,BAYSTACK AN N11 DCM',
16384 =>
'BAYSTACK AN-ES 16MB,AN 2ND ENET DAUGHTER CARD,BAYSTACK AN N11 DCM',
},
1059 =>
{
4096 => 'BAYSTACK AN-ETS 8MB,AN 3RD SYNC DAUGHTER CARD,BAYSTACK AN N11 DCM',
8192 => 'BAYSTACK AN-ETS 8MB,AN 3RD SYNC DAUGHTER CARD,BAYSTACK AN N11 DCM',
16384 => 'BAYSTACK AN-ETS 16MB,AN 3RD SYNC DAUGHTER CARD,BAYSTACK AN N11 DCM',
1059 => {
4096 =>
'BAYSTACK AN-ETS 8MB,AN 3RD SYNC DAUGHTER CARD,BAYSTACK AN N11 DCM',
8192 =>
'BAYSTACK AN-ETS 8MB,AN 3RD SYNC DAUGHTER CARD,BAYSTACK AN N11 DCM',
16384 =>
'BAYSTACK AN-ETS 16MB,AN 3RD SYNC DAUGHTER CARD,BAYSTACK AN N11 DCM',
},
1062 =>
{
4096 => 'BAYSTACK AN-ES 8MB,AN ISDN BRI DAUGHTER CARD,BAYSTACK AN N11 DCM',
8192 => 'BAYSTACK AN-ES 8MB,AN ISDN BRI DAUGHTER CARD,BAYSTACK AN N11 DCM',
16384 => 'BAYSTACK AN-ES 16MB,AN ISDN BRI DAUGHTER CARD,BAYSTACK AN N11 DCM',
1062 => {
4096 =>
'BAYSTACK AN-ES 8MB,AN ISDN BRI DAUGHTER CARD,BAYSTACK AN N11 DCM',
8192 =>
'BAYSTACK AN-ES 8MB,AN ISDN BRI DAUGHTER CARD,BAYSTACK AN N11 DCM',
16384 =>
'BAYSTACK AN-ES 16MB,AN ISDN BRI DAUGHTER CARD,BAYSTACK AN N11 DCM',
},
1063 =>
{
4096 => 'BAYSTACK AN-ETS 8MB,AN ISDN BRI DAUGHTER CARD,BAYSTACK AN N11 DCM',
8192 => 'BAYSTACK AN-ETS 8MB,AN ISDN BRI DAUGHTER CARD,BAYSTACK AN N11 DCM',
16384 => 'BAYSTACK AN-ETS 16MB,AN ISDN BRI DAUGHTER CARD,BAYSTACK AN N11 DCM',
1063 => {
4096 =>
'BAYSTACK AN-ETS 8MB,AN ISDN BRI DAUGHTER CARD,BAYSTACK AN N11 DCM',
8192 =>
'BAYSTACK AN-ETS 8MB,AN ISDN BRI DAUGHTER CARD,BAYSTACK AN N11 DCM',
16384 =>
'BAYSTACK AN-ETS 16MB,AN ISDN BRI DAUGHTER CARD,BAYSTACK AN N11 DCM',
},
1280 => 'DUAL ENET NET MODULE',
1536 => 'DUAL SYNC NET MODULE',
@@ -424,8 +439,10 @@ $VERSION = '1.09';
4098 => 'ATM LINK - OC3 MULTIMODE',
4099 => 'ATM LINK - OC3 SINGLEMODE',
4352 => 'OCTAL SYNC LINK MODULE',
4353 => 'OCTAL SYNC LINK MODULE,32 CONTEXTS HARDWARE COMPRESSION DGHTR. CARD',
4354 => 'OCTAL SYNC LINK MODULE,128 CONTEXTS HARDWARE COMPRESSION DGHTR. CARD',
4353 =>
'OCTAL SYNC LINK MODULE,32 CONTEXTS HARDWARE COMPRESSION DGHTR. CARD',
4354 =>
'OCTAL SYNC LINK MODULE,128 CONTEXTS HARDWARE COMPRESSION DGHTR. CARD',
4608 => 'SONET/SDH MMF LINK',
4609 => 'SONET/SDH SMF LINK',
4864 => '100 BASE-Tx ETHERNET',
@@ -462,13 +479,11 @@ $VERSION = '1.09';
%PROCID_MAP = (
1 => 'SYSTEM CONTROLLER',
2 => '5MEG ACE25',
3 =>
{
3 => {
5120 => '5MEG ACE25',
8192 => '8MEG ACE25',
},
4 =>
{
4 => {
4096 => 'ACE32',
8192 => '8MEG ACE32',
16384 => '16MEG ACE32',
@@ -477,42 +492,36 @@ $VERSION = '1.09';
6 => 'LN',
7 => 'FLASH SYSTEM CTRL.',
16384 => 'AN',
32 =>
{
32 => {
4096 => 'ARN Ethernet - 4 MEG',
8192 => 'ARN Ethernet - 8 MEG',
16384 => 'ARN Ethernet - 16 MEG',
32768 => 'ARN Ethernet - 32 MEG',
},
256 => 'FAST ROUTING ENGINE',
768 =>
{
768 => {
8192 => 'FRE2 - 8MEG',
16384 => 'FRE2 - 16MEG',
24576 => 'FRE2 - 24MEG',
32768 => 'FRE2 - 32MEG',
},
769 =>
{
769 => {
8192 => 'FRE2 060 - 8MEG',
16384 => 'FRE2 060 - 16MEG',
32768 => 'FRE2 060 - 32MEG',
65536 => 'FRE2 060 - 64MEG',
},
1024 =>
{
1024 => {
8192 => 'ASN MOTHER BOARD - 8MB,ASN TRAY / POWER SUPPLY ASSEMBLY',
16384 => 'ASN MOTHER BOARD - 16MB,ASN TRAY / POWER SUPPLY ASSEMBLY',
32768 => 'ASN MOTHER BOARD - 32MB,ASN TRAY / POWER SUPPLY ASSEMBLY',
},
1025 =>
{
1025 => {
8192 => 'ASN2 MOTHER BOARD - 8MB,ASN TRAY / POWER SUPPLY ASSEMBLY',
16384 => 'ASN2 MOTHER BOARD - 16MB,ASN TRAY / POWER SUPPLY ASSEMBLY',
32768 => 'ASN2 MOTHER BOARD - 32MB,ASN TRAY / POWER SUPPLY ASSEMBLY',
},
1280 =>
{
1280 => {
9216 => 'ARE - 8MB DRAM & 1MB VBM',
19456 => 'ARE - 16MB DRAM & 3MB VBM',
38912 => 'ARE -32MB DRAM & 6MB VBM',
@@ -521,15 +530,13 @@ $VERSION = '1.09';
8704 => 'SRM-F',
1536 => 'ARE5000',
1792 => 'ASN500',
6656 =>
{
6656 => {
49152 => 'FRE4-PPC - 32MEG',
81920 => 'FRE4-PPC - 64MEG',
147456 => 'FRE4-PPC - 128MEG',
},
);
sub model {
my $bayrs = shift;
my $bp_id = $bayrs->bp_id();
@@ -559,7 +566,10 @@ sub os_ver {
sub serial {
my $bayrs = shift;
my $serialnum = $bayrs->bp_serial();
$serialnum = hex(join('','0x',map{sprintf "%02X", $_}unpack("C*",$serialnum)));
$serialnum = hex(
join( '',
'0x', map { sprintf "%02X", $_ } unpack( "C*", $serialnum ) )
);
return $serialnum if defined $serialnum;
return;
@@ -606,6 +616,7 @@ sub i_name {
next unless defined $name;
$i_name{$iid} = $name;
}
# Get VLAN Virtual Router Interfaces
foreach my $vid ( keys %$v_name ) {
my $v_name = $v_name->{$vid};
@@ -686,10 +697,12 @@ sub i_vlan {
my $wf_vport = $bayrs->wf_vlan_port();
my %i_vlan;
# Look for VLANs on Ethernet Interfaces
foreach my $if ( keys %$wf_cct ) {
my $idx = $wf_cct->{$if};
next unless defined $idx;
# Check MTU size, if unable to carry VLAN tag skip.
my $mtu = $wf_mtu->{$if};
next if ( ( $mtu =~ /default/i ) or ( $mtu < 1522 ) );
@@ -706,6 +719,7 @@ sub i_vlan {
my $vlans = join( ',', @vlans );
$i_vlan{$idx} = $vlans;
}
# Add VLAN on VLAN Interfaces
foreach my $idx ( keys %$wf_global_vid ) {
my $v_if = $wf_local_vid->{$idx};
@@ -729,14 +743,23 @@ sub root_ip {
my $idx = $ip_index->{$entry};
next unless $idx == 0;
my $clip = $ip_table->{$entry};
next unless ( (defined $clip) and ($clip ne '0.0.0.0') and ($bayrs->snmp_connect_ip($clip)) );
print " SNMP::Layer3::BayRS::root_ip() using $clip\n" if $bayrs->debug();
next
unless ( ( defined $clip )
and ( $clip ne '0.0.0.0' )
and ( $bayrs->snmp_connect_ip($clip) ) );
print " SNMP::Layer3::BayRS::root_ip() using $clip\n"
if $bayrs->debug();
return $clip;
}
# Check for OSPF Router ID
my $ospf_ip = $bayrs->ospf_rtr_id();
if ((defined $ospf_ip) and ($ospf_ip ne '0.0.0.0') and ($bayrs->snmp_connect_ip($ospf_ip)) ) {
print " SNMP::Layer3::BayRS::root_ip() using $ospf_ip\n" if $bayrs->debug();
if ( ( defined $ospf_ip )
and ( $ospf_ip ne '0.0.0.0' )
and ( $bayrs->snmp_connect_ip($ospf_ip) ) )
{
print " SNMP::Layer3::BayRS::root_ip() using $ospf_ip\n"
if $bayrs->debug();
return $ospf_ip;
}
@@ -770,6 +793,7 @@ sub e_index {
$wf_mod1 = $bayrs->wfHwModDaughterBd1IdOpt() || {};
$wf_mod2 = $bayrs->wfHwModDaughterBd2IdOpt() || {};
}
# Hardware Module
if ( $bp_id =~ /arn|asn/ ) {
$wf_mm = $bayrs->wfHwModuleModIdOpt() || {};
@@ -781,10 +805,12 @@ sub e_index {
# We're going to hack an index: Slot/Module/Postion
my %wf_e_index;
# Chassis on BN types
if ( $bp_id !~ /an|arn|asn/ ) {
$wf_e_index{1} = 1;
}
# Handle Processor / Link Modules first
foreach my $idx ( keys %$wf_mb ) {
my $index = "$idx" . "0000";
@@ -796,6 +822,7 @@ sub e_index {
$wf_e_index{$index} = $index if $slot->{$idx};
}
}
# Handle Hardware Modules
foreach my $iid ( keys %$wf_mm ) {
my $main_mod = $wf_mm->{$iid};
@@ -843,6 +870,7 @@ sub e_name {
my $wf_e_idx = $bayrs->e_index() || {};
my %wf_e_name;
# Chassis
foreach my $iid ( keys %$wf_e_idx ) {
if ( $iid == 1 ) {
@@ -933,53 +961,70 @@ sub e_descr {
my $wf_mb_mem = $bayrs->wfHwMotherBdMemorySize() || {};
my ( $wf_mod, $wf_mm ) = {};
# Link Module
if ( $bp_id !~ /arn|asn/ ) {
$wf_mod = $bayrs->wfHwModIdOpt() || {};
}
# Hardware Module
if ( $bp_id =~ /arn|asn/ ) {
$wf_mm = $bayrs->wfHwModuleModIdOpt() || {};
}
my %wf_e_descr;
# Chassis
if ( $bp_id !~ /an|arn|asn/ ) {
$wf_e_descr{1} = $bayrs->model();
}
# Handle Processor / Link Modules first
foreach my $idx ( keys %$wf_mb ) {
unless ( $bp_id =~ /an|arn|asn/ ) {
$wf_e_descr{ "$idx" . "0000" } = 'Slot ' . $idx;
}
my $mb_id;
$mb_id = &SNMP::mapEnum('wfHwMotherBdIdOpt',$wf_mb->{$idx}) if $wf_mb->{$idx};
$mb_id = &SNMP::mapEnum( 'wfHwMotherBdIdOpt', $wf_mb->{$idx} )
if $wf_mb->{$idx};
my $mb_mem = $wf_mb_mem->{$idx};
my $mod_id;
$mod_id = &SNMP::mapEnum('wfHwModIdOpt',$wf_mod->{$idx})if $wf_mod->{$idx};
$mod_id = &SNMP::mapEnum( 'wfHwModIdOpt', $wf_mod->{$idx} )
if $wf_mod->{$idx};
# Processor
if ($mb_id) {
if ( ref( $PROCID_MAP{$mb_id} ) =~ /HASH/ ) {
$wf_e_descr{"$idx"."0001"} = defined $PROCID_MAP{$mb_id}{$mb_mem} ?
$PROCID_MAP{$mb_id}{$mb_mem} : $mb_id;
$wf_e_descr{ "$idx" . "0001" }
= defined $PROCID_MAP{$mb_id}{$mb_mem}
? $PROCID_MAP{$mb_id}{$mb_mem}
: $mb_id;
}
else {
$wf_e_descr{"$idx"."0001"} = defined $PROCID_MAP{$mb_id} ?
$PROCID_MAP{$mb_id} : $mb_id;
$wf_e_descr{ "$idx" . "0001" }
= defined $PROCID_MAP{$mb_id}
? $PROCID_MAP{$mb_id}
: $mb_id;
}
}
# Link Module
if ($mod_id) {
if ( ref( $MODID_MAP{$mod_id} ) =~ /HASH/ ) {
$wf_e_descr{"$idx"."0004"} = defined $MODID_MAP{$mod_id}{$mb_mem} ?
$MODID_MAP{$mod_id}{$mb_mem} : $mod_id;
$wf_e_descr{ "$idx" . "0004" }
= defined $MODID_MAP{$mod_id}{$mb_mem}
? $MODID_MAP{$mod_id}{$mb_mem}
: $mod_id;
}
else {
$wf_e_descr{"$idx"."0004"} = defined $MODID_MAP{$mod_id} ?
$MODID_MAP{$mod_id} : $mod_id;
$wf_e_descr{ "$idx" . "0004" }
= defined $MODID_MAP{$mod_id}
? $MODID_MAP{$mod_id}
: $mod_id;
}
}
}
# Handle Hardware Modules
foreach my $iid ( keys %$wf_mm ) {
next unless ( $wf_mm->{$iid} );
@@ -999,8 +1044,8 @@ sub e_descr {
}
my $mm_id = &SNMP::mapEnum( 'wfHwModuleModIdOpt', $wf_mm->{$iid} );
my $index = join( '', map { sprintf "%02d", $_ } split /\./, $iid );
$wf_e_descr{"$index"."01"} =
defined $MODID_MAP{$mm_id} ? $MODID_MAP{$mm_id} : $mm_id;
$wf_e_descr{ "$index" . "01" }
= defined $MODID_MAP{$mm_id} ? $MODID_MAP{$mm_id} : $mm_id;
}
return \%wf_e_descr;
}
@@ -1024,6 +1069,7 @@ sub e_type {
$wf_mod1 = $bayrs->wfHwModDaughterBd1IdOpt() || {};
$wf_mod2 = $bayrs->wfHwModDaughterBd2IdOpt() || {};
}
# Hardware Module
if ( $bp_id =~ /arn|asn/ ) {
$wf_mm = $bayrs->wfHwModuleModIdOpt() || {};
@@ -1034,10 +1080,12 @@ sub e_type {
my @mods = ( $wf_mm, $wf_dm );
my %wf_e_type;
# Chassis
if ( $bp_id !~ /an|arn|asn/ ) {
$wf_e_type{1} = $bayrs->bp_id();
}
# Handle Processor / Link Modules first
foreach my $idx ( keys %$wf_mb ) {
my $index = "$idx" . "0000";
@@ -1049,6 +1097,7 @@ sub e_type {
$wf_e_type{$index} = $slot->{$idx} if $slot->{$idx};
}
}
# Handle Hardware Modules
foreach my $iid ( keys %$wf_mm ) {
my $main_mod = $wf_mm->{$iid};
@@ -1083,6 +1132,7 @@ sub e_hwver {
$wf_mod1 = $bayrs->wfHwModDaughterBd1Rev() || {};
$wf_mod2 = $bayrs->wfHwModDaughterBd2Rev() || {};
}
# Hardware Module
if ( $bp_id =~ /arn|asn/ ) {
$wf_mm = $bayrs->wfHwModuleModRev() || {};
@@ -1091,13 +1141,18 @@ sub e_hwver {
my @slots = ( $wf_mb, $wf_db, $wf_bb, $wf_mod, $wf_mod1, $wf_mod2 );
my %wf_e_hwver;
# Chassis
if ( $bp_id !~ /an|arn|asn/ ) {
my $bp_rev = $bayrs->wfHwBpRev();
$bp_rev = hex(join('','0x',map{sprintf "%02X", $_}unpack("C*",$bp_rev)));
$bp_rev = hex(
join( '',
'0x', map { sprintf "%02X", $_ } unpack( "C*", $bp_rev ) )
);
$wf_e_hwver{1} = $bp_rev;
}
# Handle Processor / Link Modules first
foreach my $idx ( keys %$wf_mb ) {
my $index = "$idx" . "0000";
@@ -1105,14 +1160,22 @@ sub e_hwver {
$index++;
next unless ( $slot->{$idx} );
my $mod;
$mod = hex(join('','0x',map{sprintf "%02X", $_}unpack("C*",$slot->{$idx}))) if $slot->{$idx};
$mod = hex(
join( '',
'0x',
map { sprintf "%02X", $_ } unpack( "C*", $slot->{$idx} ) )
) if $slot->{$idx};
$wf_e_hwver{$index} = $mod if $mod;
}
}
foreach my $iid ( keys %$wf_mm ) {
my $index = join( '', map { sprintf "%02d", $_ } split /\./, $iid );
my $mod;
$mod = hex(join('','0x',map{sprintf "%02X", $_}unpack("C*",$wf_mm->{$iid}))) if $wf_mm->{$iid};
$mod = hex(
join( '',
'0x',
map { sprintf "%02X", $_ } unpack( "C*", $wf_mm->{$iid} ) )
) if $wf_mm->{$iid};
$index = "$index" . "00";
$index++;
next unless ( $wf_mm->{$iid} );
@@ -1151,6 +1214,7 @@ sub e_serial {
$wf_mod1 = $bayrs->wf_hw_md1_ser() || {};
$wf_mod2 = $bayrs->wf_hw_md2_ser() || {};
}
# Hardware Module
if ( $bp_id =~ /arn|asn/ ) {
$wf_mm = $bayrs->wf_hw_mm_ser() || {};
@@ -1159,10 +1223,12 @@ sub e_serial {
my @slots = ( $wf_mb, $wf_db, $wf_bb, $wf_mod, $wf_mod1, $wf_mod2 );
my %wf_e_serial;
# Chassis
if ( $bp_id !~ /an|arn|asn/ ) {
$wf_e_serial{1} = $bayrs->serial();
}
# Handle Processor / Link Modules first
foreach my $idx ( keys %$wf_mb ) {
my $index = "$idx" . "0000";
@@ -1173,6 +1239,7 @@ sub e_serial {
$wf_e_serial{$index} = $mod if $mod;
}
}
# Handle Hardware Modules
foreach my $iid ( keys %$wf_mm ) {
my $index = join( '', map { sprintf "%02d", $_ } split /\./, $iid );
@@ -1297,7 +1364,10 @@ sub munge_hw_rev {
sub munge_wf_serial {
my $wf_serial = shift;
my $serial = hex(join('','0x',map{sprintf "%02X", $_}unpack("C*",$wf_serial)));
my $serial = hex(
join( '',
'0x', map { sprintf "%02X", $_ } unpack( "C*", $wf_serial ) )
);
return $serial if defined($serial);
return;
@@ -1382,8 +1452,8 @@ These are methods that return scalar value from SNMP
=item $bayrs->model()
Returns the model of the BayRS router. Will translate between the MIB model and
the common model with this map :
Returns the model of the BayRS router. Will translate between the MIB model
and the common model with this map :
C<%MODEL_MAP = (
'acefn' => 'FN',
@@ -1466,8 +1536,8 @@ interfaces.
=item $bayrs->i_duplex()
Returns reference to hash. Maps port operational duplexes to IIDs for Ethernet
interfaces.
Returns reference to hash. Maps port operational duplexes to IIDs for
Ethernet interfaces.
=item $bayrs->i_duplex_admin()
@@ -1532,13 +1602,13 @@ F<Wellfleet-MODULE-MIB> for hardware modules.
=item $bayrs->e_fwver()
Returns reference to hash. Key: IID, Value: Firmware revision. Only available
on processors.
Returns reference to hash. Key: IID, Value: Firmware revision. Only
available on processors.
=item $bayrs->e_swver()
Returns reference to hash. Key: IID, Value: Software revision. Only available
on processors.
Returns reference to hash. Key: IID, Value: Software revision. Only
available on processors.
=item $bayrs->e_parent()

View File

@@ -42,7 +42,8 @@ use SNMP::Info::CiscoPortSecurity;
use SNMP::Info::CiscoPower;
use SNMP::Info::Layer3;
@SNMP::Info::Layer3::C3550::ISA = qw/SNMP::Info::CiscoVTP SNMP::Info::CiscoStack
@SNMP::Info::Layer3::C3550::ISA
= qw/SNMP::Info::CiscoVTP SNMP::Info::CiscoStack
SNMP::Info::CDP SNMP::Info::CiscoStats
SNMP::Info::CiscoPortSecurity
SNMP::Info::CiscoImage SNMP::Info::CiscoPower
@@ -55,14 +56,10 @@ use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/ ;
$VERSION = '1.09';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
%SNMP::Info::CiscoPower::MIBS,
%SNMP::Info::CiscoPortSecurity::MIBS,
%SNMP::Info::CiscoImage::MIBS,
%SNMP::Info::CiscoStats::MIBS,
%SNMP::Info::CDP::MIBS,
%SNMP::Info::CiscoStack::MIBS,
%SNMP::Info::CiscoVTP::MIBS,
%SNMP::Info::Layer3::MIBS, %SNMP::Info::CiscoPower::MIBS,
%SNMP::Info::CiscoPortSecurity::MIBS, %SNMP::Info::CiscoImage::MIBS,
%SNMP::Info::CiscoStats::MIBS, %SNMP::Info::CDP::MIBS,
%SNMP::Info::CiscoStack::MIBS, %SNMP::Info::CiscoVTP::MIBS,
);
%GLOBALS = (
@@ -78,17 +75,14 @@ $VERSION = '1.09';
);
%FUNCS = (
%SNMP::Info::Layer3::FUNCS,
%SNMP::Info::CiscoPower::FUNCS,
%SNMP::Info::CiscoPortSecurity::FUNCS,
%SNMP::Info::CiscoImage::FUNCS,
%SNMP::Info::CiscoStats::FUNCS,
%SNMP::Info::CDP::FUNCS,
%SNMP::Info::CiscoStack::FUNCS,
%SNMP::Info::CiscoVTP::FUNCS,
%SNMP::Info::Layer3::FUNCS, %SNMP::Info::CiscoPower::FUNCS,
%SNMP::Info::CiscoPortSecurity::FUNCS, %SNMP::Info::CiscoImage::FUNCS,
%SNMP::Info::CiscoStats::FUNCS, %SNMP::Info::CDP::FUNCS,
%SNMP::Info::CiscoStack::FUNCS, %SNMP::Info::CiscoVTP::FUNCS,
);
%MUNGE = (
# Inherit all the built in munging
%SNMP::Info::Layer3::MUNGE,
%SNMP::Info::CiscoPower::MUNGE,
@@ -153,6 +147,7 @@ sub i_duplex {
}
return \%i_duplex;
}
# Fall back to CiscoStack method
else {
return $c3550->SUPER::i_duplex($partial);
@@ -182,6 +177,7 @@ sub i_duplex_admin {
}
return $i_duplex_admin;
}
# Fall back to CiscoStack method
else {
return $c3550->SUPER::i_duplex_admin($partial);
@@ -189,6 +185,7 @@ sub i_duplex_admin {
}
sub set_i_duplex_admin {
# map a textual duplex to an integer one the switch understands
my %duplexes = qw/half 1 full 2 auto 4/;

View File

@@ -93,20 +93,18 @@ $VERSION = '1.09';
);
%MUNGE = (
%SNMP::Info::Layer3::MUNGE,
%SNMP::Info::MAU::MUNGE,
%SNMP::Info::CiscoConfig::MUNGE,
%SNMP::Info::CiscoPortSecurity::MUNGE,
%SNMP::Info::CiscoImage::MUNGE,
%SNMP::Info::CiscoStats::MUNGE,
%SNMP::Info::CDP::MUNGE,
%SNMP::Info::CiscoVTP::MUNGE,
%SNMP::Info::Layer3::MUNGE, %SNMP::Info::MAU::MUNGE,
%SNMP::Info::CiscoConfig::MUNGE, %SNMP::Info::CiscoPortSecurity::MUNGE,
%SNMP::Info::CiscoImage::MUNGE, %SNMP::Info::CiscoStats::MUNGE,
%SNMP::Info::CDP::MUNGE, %SNMP::Info::CiscoVTP::MUNGE,
);
# Override Inheritance for these specific methods
# use MAU-MIB for admin. duplex and admin. speed
*SNMP::Info::Layer3::C4000::i_duplex_admin = \&SNMP::Info::MAU::mau_i_duplex_admin;
*SNMP::Info::Layer3::C4000::i_speed_admin = \&SNMP::Info::MAU::mau_i_speed_admin;
*SNMP::Info::Layer3::C4000::i_duplex_admin
= \&SNMP::Info::MAU::mau_i_duplex_admin;
*SNMP::Info::Layer3::C4000::i_speed_admin
= \&SNMP::Info::MAU::mau_i_speed_admin;
sub fan {
my $c4000 = shift;

View File

@@ -42,7 +42,8 @@ use SNMP::Info::CiscoConfig;
use SNMP::Info::CiscoPower;
use SNMP::Info::Layer3;
@SNMP::Info::Layer3::C6500::ISA = qw/SNMP::Info::CiscoVTP SNMP::Info::CiscoStack
@SNMP::Info::Layer3::C6500::ISA
= qw/SNMP::Info::CiscoVTP SNMP::Info::CiscoStack
SNMP::Info::CDP SNMP::Info::CiscoStats
SNMP::Info::CiscoImage
SNMP::Info::CiscoPortSecurity
@@ -57,14 +58,10 @@ use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/ ;
$VERSION = '1.09';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
%SNMP::Info::CiscoPower::MIBS,
%SNMP::Info::CiscoConfig::MIBS,
%SNMP::Info::CiscoPortSecurity::MIBS,
%SNMP::Info::CiscoImage::MIBS,
%SNMP::Info::CiscoStats::MIBS,
%SNMP::Info::CDP::MIBS,
%SNMP::Info::CiscoStack::MIBS,
%SNMP::Info::Layer3::MIBS, %SNMP::Info::CiscoPower::MIBS,
%SNMP::Info::CiscoConfig::MIBS, %SNMP::Info::CiscoPortSecurity::MIBS,
%SNMP::Info::CiscoImage::MIBS, %SNMP::Info::CiscoStats::MIBS,
%SNMP::Info::CDP::MIBS, %SNMP::Info::CiscoStack::MIBS,
%SNMP::Info::CiscoVTP::MIBS,
);
@@ -81,26 +78,18 @@ $VERSION = '1.09';
);
%FUNCS = (
%SNMP::Info::Layer3::FUNCS,
%SNMP::Info::CiscoPower::FUNCS,
%SNMP::Info::CiscoConfig::FUNCS,
%SNMP::Info::CiscoPortSecurity::FUNCS,
%SNMP::Info::CiscoImage::FUNCS,
%SNMP::Info::CiscoStats::FUNCS,
%SNMP::Info::CDP::FUNCS,
%SNMP::Info::CiscoStack::FUNCS,
%SNMP::Info::Layer3::FUNCS, %SNMP::Info::CiscoPower::FUNCS,
%SNMP::Info::CiscoConfig::FUNCS, %SNMP::Info::CiscoPortSecurity::FUNCS,
%SNMP::Info::CiscoImage::FUNCS, %SNMP::Info::CiscoStats::FUNCS,
%SNMP::Info::CDP::FUNCS, %SNMP::Info::CiscoStack::FUNCS,
%SNMP::Info::CiscoVTP::FUNCS,
);
%MUNGE = (
%SNMP::Info::Layer3::MUNGE,
%SNMP::Info::CiscoPower::MUNGE,
%SNMP::Info::CiscoConfig::MUNGE,
%SNMP::Info::CiscoPortSecurity::MUNGE,
%SNMP::Info::CiscoImage::MUNGE,
%SNMP::Info::CiscoStats::MUNGE,
%SNMP::Info::CDP::MUNGE,
%SNMP::Info::CiscoStack::MUNGE,
%SNMP::Info::Layer3::MUNGE, %SNMP::Info::CiscoPower::MUNGE,
%SNMP::Info::CiscoConfig::MUNGE, %SNMP::Info::CiscoPortSecurity::MUNGE,
%SNMP::Info::CiscoImage::MUNGE, %SNMP::Info::CiscoStats::MUNGE,
%SNMP::Info::CDP::MUNGE, %SNMP::Info::CiscoStack::MUNGE,
%SNMP::Info::CiscoVTP::MUNGE,
);
@@ -130,6 +119,7 @@ sub i_duplex {
}
return \%i_duplex;
}
# Fall back to CiscoStack method
else {
return $c6500->SUPER::i_duplex($partial);
@@ -159,6 +149,7 @@ sub i_duplex_admin {
}
return $i_duplex_admin;
}
# Fall back to CiscoStack method
else {
return $c6500->SUPER::i_duplex_admin($partial);
@@ -166,6 +157,7 @@ sub i_duplex_admin {
}
sub set_i_duplex_admin {
# map a textual duplex to an integer one the switch understands
my %duplexes = qw/half 1 full 2 auto 4/;
@@ -224,9 +216,9 @@ Max Baker
Abstraction subclass for Cisco Catalyst 6500 Layer 2/3 Switches.
These devices run IOS but have some of the same characteristics as the Catalyst
WS-C family (5xxx). For example, forwarding tables are held in VLANs, and
extended interface information is gleaned from F<CISCO-SWITCH-MIB>.
These devices run IOS but have some of the same characteristics as the
Catalyst WS-C family (5xxx). For example, forwarding tables are held in
VLANs, and extended interface information is gleaned from F<CISCO-SWITCH-MIB>.
For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above.

View File

@@ -68,16 +68,11 @@ $VERSION = '1.09';
);
%GLOBALS = (
%SNMP::Info::Layer3::GLOBALS,
%SNMP::Info::CiscoPower::GLOBALS,
%SNMP::Info::CiscoConfig::GLOBALS,
%SNMP::Info::CiscoQOS::GLOBALS,
%SNMP::Info::CiscoRTT::GLOBALS,
%SNMP::Info::CiscoImage::GLOBALS,
%SNMP::Info::CiscoStats::GLOBALS,
%SNMP::Info::CDP::GLOBALS,
%SNMP::Info::CiscoVTP::GLOBALS,
'eigrp_id' => 'cEigrpAsRouterId',
%SNMP::Info::Layer3::GLOBALS, %SNMP::Info::CiscoPower::GLOBALS,
%SNMP::Info::CiscoConfig::GLOBALS, %SNMP::Info::CiscoQOS::GLOBALS,
%SNMP::Info::CiscoRTT::GLOBALS, %SNMP::Info::CiscoImage::GLOBALS,
%SNMP::Info::CiscoStats::GLOBALS, %SNMP::Info::CDP::GLOBALS,
%SNMP::Info::CiscoVTP::GLOBALS, 'eigrp_id' => 'cEigrpAsRouterId',
);
%FUNCS = (
@@ -90,6 +85,7 @@ $VERSION = '1.09';
%SNMP::Info::CiscoStats::FUNCS,
%SNMP::Info::CDP::FUNCS,
%SNMP::Info::CiscoVTP::FUNCS,
# EIGRP
'eigrp_peers' => 'cEigrpPeerAddr',
);

View File

@@ -36,7 +36,8 @@ use SNMP::Info;
use SNMP::Info::Layer3;
use SNMP::Info::Entity;
@SNMP::Info::Layer3::Contivity::ISA = qw/SNMP::Info SNMP::Info::Layer3 SNMP::Info::Entity Exporter/;
@SNMP::Info::Layer3::Contivity::ISA
= qw/SNMP::Info SNMP::Info::Layer3 SNMP::Info::Entity Exporter/;
@SNMP::Info::Layer3::Contivity::EXPORT_OK = qw//;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
@@ -44,26 +45,21 @@ use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '1.09';
%MIBS = (
%SNMP::Info::MIBS,
%SNMP::Info::Layer3::MIBS,
%SNMP::Info::Entity::MIBS,
%SNMP::Info::MIBS, %SNMP::Info::Layer3::MIBS, %SNMP::Info::Entity::MIBS,
);
%GLOBALS = (
%SNMP::Info::GLOBALS,
%SNMP::Info::Layer3::GLOBALS,
%SNMP::Info::GLOBALS, %SNMP::Info::Layer3::GLOBALS,
%SNMP::Info::Entity::GLOBALS,
);
%FUNCS = (
%SNMP::Info::FUNCS,
%SNMP::Info::Layer3::FUNCS,
%SNMP::Info::FUNCS, %SNMP::Info::Layer3::FUNCS,
%SNMP::Info::Entity::FUNCS,
);
%MUNGE = (
%SNMP::Info::MUNGE,
%SNMP::Info::Layer3::MUNGE,
%SNMP::Info::MUNGE, %SNMP::Info::Layer3::MUNGE,
%SNMP::Info::Entity::MUNGE,
);
@@ -123,7 +119,6 @@ sub serial {
return;
}
sub interfaces {
my $contivity = shift;
my $partial = shift;
@@ -133,6 +128,7 @@ sub interfaces {
my %interfaces = ();
foreach my $iid ( keys %$description ) {
my $desc = $description->{$iid};
# Skip everything except Ethernet interfaces
next unless ( defined $desc and $desc =~ /fe/i );
@@ -150,6 +146,7 @@ sub i_name {
my %i_name;
foreach my $iid ( keys %$i_name2 ) {
my $name = $i_name2->{$iid};
#Skip everything except Ethernet interfaces
next unless ( defined $name and $name =~ /fe/i );
@@ -165,8 +162,8 @@ __END__
=head1 NAME
SNMP::Info::Layer3::Contivity - SNMP Interface to Nortel VPN Routers (Contivity
Extranet Switches).
SNMP::Info::Layer3::Contivity - SNMP Interface to Nortel VPN Routers
(Contivity Extranet Switches).
=head1 AUTHOR

View File

@@ -41,7 +41,8 @@ use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '1.09';
%MIBS = ( %SNMP::Info::Layer3::MIBS,
%MIBS = (
%SNMP::Info::Layer3::MIBS,
'RADLAN-Physicaldescription-MIB' => 'rlPhdStackReorder',
'RADLAN-rlInterfaces' => 'rlIfNumOfLoopbackPorts',
'RADLAN-HWENVIROMENT' => 'rlEnvPhysicalDescription',
@@ -56,6 +57,7 @@ $VERSION = '1.09';
%FUNCS = (
%SNMP::Info::Layer3::FUNCS,
# RADLAN-rlInterfaces:swIfTable
'dell_duplex_admin' => 'swIfDuplexAdminMode',
'dell_duplex' => 'swIfDuplexOperMode',
@@ -65,6 +67,7 @@ $VERSION = '1.09';
'dell_speed_admin' => 'swIfSpeedAdminMode',
'dell_auto' => 'swIfSpeedDuplexAutoNegotiation',
'dell_fc' => 'swIfOperFlowControlMode',
# RADLAN-Physicaldescription-MIB:rlPhdUnitGenParamTable
'dell_unit' => 'rlPhdUnitGenParamStackUnit',
'dell_sw_ver' => 'rlPhdUnitGenParamSoftwareVersion',
@@ -72,6 +75,7 @@ $VERSION = '1.09';
'dell_hw_ver' => 'rlPhdUnitGenParamHardwareVersion',
'dell_serial_no' => 'rlPhdUnitGenParamSerialNum',
'dell_asset_no' => 'rlPhdUnitGenParamAssetTag',
# RADLAN-COPY-MIB:rlCopyTable
'dell_cp_idx' => 'rlCopyIndex',
'dell_cp_sloc' => 'rlCopySourceLocation',
@@ -87,19 +91,18 @@ $VERSION = '1.09';
'dell_cp_state' => 'rlCopyOperationState',
'dell_cp_bkgnd' => 'rlCopyInBackground',
'dell_cp_rstatus' => 'rlCopyRowStatus',
# RADLAN-HWENVIROMENT:rlEnvMonSupplyStatusTable
'dell_pwr_src' => 'rlEnvMonSupplySource',
'dell_pwr_state' => 'rlEnvMonSupplyState',
'dell_pwr_desc' => 'rlEnvMonSupplyStatusDescr',
# RADLAN-HWENVIROMENT:rlEnvMonFanStatusTable
'dell_fan_state' => 'rlEnvMonFanState',
'dell_fan_desc' => 'rlEnvMonFanStatusDescr',
);
%MUNGE = (
%SNMP::Info::Layer3::MUNGE,
);
%MUNGE = ( %SNMP::Info::Layer3::MUNGE, );
# Method OverRides
@@ -112,6 +115,7 @@ sub model {
if ( defined $name and $name =~ m/(\d+)/ ) {
return $1;
}
# Don't have a vendor MIB for D-Link
else {
return $descr;
@@ -229,7 +233,8 @@ __END__
=head1 NAME
SNMP::Info::Layer3::Dell - SNMP Interface to Dell Power Connect Network Devices
SNMP::Info::Layer3::Dell - SNMP Interface to Dell Power Connect Network
Devices
=head1 AUTHOR
@@ -304,8 +309,9 @@ These are methods that return scalar value from SNMP
=item $dell->model()
Returns model type. Returns numeric from (C<productIdentificationDisplayName>)
if available, otherwise if returns description().
Returns model type. Returns numeric from
(C<productIdentificationDisplayName>) if available, otherwise if returns
description().
=item $dell->vendor()
@@ -383,13 +389,14 @@ to a hash.
=item $dell->interfaces()
Returns the map between SNMP Interface Identifier (iid) and physical port name.
Uses name if available instead of description since descriptions are
Returns the map between SNMP Interface Identifier (iid) and physical port
name. Uses name if available instead of description since descriptions are
sometimes not unique.
=item $dell->i_duplex_admin()
Returns reference to hash of iid to current link administrative duplex setting.
Returns reference to hash of iid to current link administrative duplex
setting.
=item $dell->fw_mac()

View File

@@ -47,33 +47,25 @@ use vars qw/$VERSION $DEBUG %GLOBALS %FUNCS $INIT %MIBS %MUNGE/;
$VERSION = '1.09';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
%SNMP::Info::CDP::MIBS,
%SNMP::Info::LLDP::MIBS,
%SNMP::Info::MAU::MIBS,
%SNMP::Info::Layer3::MIBS, %SNMP::Info::CDP::MIBS,
%SNMP::Info::LLDP::MIBS, %SNMP::Info::MAU::MIBS,
'ENTERASYS-OIDS-MIB' => 'etsysOidDevice',
);
%GLOBALS = (
%SNMP::Info::Layer3::GLOBALS,
%SNMP::Info::CDP::GLOBALS,
%SNMP::Info::LLDP::GLOBALS,
%SNMP::Info::MAU::GLOBALS,
%SNMP::Info::Layer3::GLOBALS, %SNMP::Info::CDP::GLOBALS,
%SNMP::Info::LLDP::GLOBALS, %SNMP::Info::MAU::GLOBALS,
'mac' => 'dot1dBaseBridgeAddress',
);
%FUNCS = (
%SNMP::Info::Layer3::FUNCS,
%SNMP::Info::CDP::FUNCS,
%SNMP::Info::LLDP::FUNCS,
%SNMP::Info::MAU::FUNCS,
%SNMP::Info::Layer3::FUNCS, %SNMP::Info::CDP::FUNCS,
%SNMP::Info::LLDP::FUNCS, %SNMP::Info::MAU::FUNCS,
);
%MUNGE = (
%SNMP::Info::Layer3::MUNGE,
%SNMP::Info::CDP::MUNGE,
%SNMP::Info::LLDP::MUNGE,
%SNMP::Info::MAU::MUNGE,
%SNMP::Info::Layer3::MUNGE, %SNMP::Info::CDP::MUNGE,
%SNMP::Info::LLDP::MUNGE, %SNMP::Info::MAU::MUNGE,
);
sub model {
@@ -81,7 +73,9 @@ sub model {
my $id = $enterasys->id();
unless ( defined $id ) {
print " SNMP::Info::Layer3::Enterasys::model() - Device does not support sysObjectID\n" if $enterasys->debug();
print
" SNMP::Info::Layer3::Enterasys::model() - Device does not support sysObjectID\n"
if $enterasys->debug();
return;
}
@@ -122,7 +116,8 @@ sub interfaces {
# We need the original ifName, SUPER:: would give us a method definition
# in a higher class, we could use orig_ but just call the MIB leaf since
# that's what we really want anyway.
return $enterasys->ifName($partial) || $enterasys->i_description($partial);
return $enterasys->ifName($partial)
|| $enterasys->i_description($partial);
}
sub i_ignore {
@@ -172,10 +167,11 @@ sub fw_port {
# Use CDP and/or LLDP
#
# LLDP table timefilter implementation continuously increments when walked and
# we may never reach the end of the table. This behavior can be modified with
# the "set snmp timefilter break disable" command, unfortunately it is not
# the default. Query with a partial value of zero which means no time filter.
# LLDP table timefilter implementation continuously increments when walked
# and we may never reach the end of the table. This behavior can be
# modified with the "set snmp timefilter break disable" command,
# unfortunately it is not the default. Query with a partial value of zero
# which means no time filter.
sub hasCDP {
my $enterasys = shift;
@@ -211,7 +207,7 @@ sub c_if {
my $enterasys = shift;
my $partial = shift;
my $lldp = $enterasys->lldp_if(0) || {};;
my $lldp = $enterasys->lldp_if(0) || {};
my $cdp = $enterasys->SUPER::c_if($partial) || {};
my %c_if;
@@ -380,7 +376,8 @@ These are methods that return scalar value from SNMP
=item $enterasys->model()
Returns model type. Checks $enterasys->id() against the F<ENTERASYS-OIDS-MIB>.
Returns model type. Checks $enterasys->id() against the
F<ENTERASYS-OIDS-MIB>.
=item $enterasys->vendor()

View File

@@ -37,14 +37,16 @@ use Exporter;
use SNMP::Info::Layer3;
use SNMP::Info::MAU;
@SNMP::Info::Layer3::Extreme::ISA = qw/SNMP::Info::Layer3 SNMP::Info::MAU Exporter/;
@SNMP::Info::Layer3::Extreme::ISA
= qw/SNMP::Info::Layer3 SNMP::Info::MAU Exporter/;
@SNMP::Info::Layer3::Extreme::EXPORT_OK = qw//;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '1.09';
%MIBS = ( %SNMP::Info::Layer3::MIBS,
%MIBS = (
%SNMP::Info::Layer3::MIBS,
%SNMP::Info::MAU::MIBS,
'EXTREME-BASE-MIB' => 'extremeAgent',
'EXTREME-SYSTEM-MIB' => 'extremeSystem',
@@ -68,18 +70,22 @@ $VERSION = '1.09';
%SNMP::Info::Layer3::FUNCS,
%SNMP::Info::MAU::FUNCS,
'fan_state' => 'extremeFanOperational',
# EXTREME-FDB-MIB:extremeFdbMacFdbTable
'ex_fw_mac' => 'extremeFdbMacFdbMacAddress',
'ex_fw_port' => 'extremeFdbMacFdbPortIfIndex',
'ex_fw_status' => 'extremeFdbMacFdbStatus',
# EXTREME-VLAN-MIB:extremeVlanIfTable
'ex_vlan_descr' => 'extremeVlanIfDescr',
'ex_vlan_global_id' => 'extremeVlanIfGlobalIdentifier',
# EXTREME-VLAN-MIB:extremeVlanEncapsIfTable
'ex_vlan_encap_tag' => 'extremeVlanEncapsIfTag',
);
%MUNGE = (
# Inherit all the built in munging
%SNMP::Info::Layer3::MUNGE,
%SNMP::Info::MAU::MUNGE,
@@ -94,14 +100,17 @@ $VERSION = '1.09';
# Method OverRides
*SNMP::Info::Layer3::Extreme::i_duplex = \&SNMP::Info::MAU::mau_i_duplex;
*SNMP::Info::Layer3::Extreme::i_duplex_admin = \&SNMP::Info::MAU::mau_i_duplex_admin;
*SNMP::Info::Layer3::Extreme::i_duplex_admin
= \&SNMP::Info::MAU::mau_i_duplex_admin;
sub model {
my $extreme = shift;
my $id = $extreme->id();
unless ( defined $id ) {
print " SNMP::Info::Layer3::Extreme::model() - Device does not support sysObjectID\n" if $extreme->debug();
print
" SNMP::Info::Layer3::Extreme::model() - Device does not support sysObjectID\n"
if $extreme->debug();
return;
}
@@ -147,7 +156,8 @@ sub interfaces {
foreach my $idx ( keys %$i_name ) {
if ( $i_name->{$idx} =~ /\([0-9.]+\)/ ) {
$interfaces->{$idx} = $i_description->{$idx};
} else {
}
else {
$interfaces->{$idx} = $i_name->{$idx};
}
}
@@ -164,7 +174,9 @@ sub i_ignore {
my %i_ignore;
foreach my $if ( keys %$i_description ) {
if ($i_description->{$if} =~ /^(802.1Q Encapsulation Tag \d+|VLAN \d+|lo\d+)/i){
if ( $i_description->{$if}
=~ /^(802.1Q Encapsulation Tag \d+|VLAN \d+|lo\d+)/i )
{
$i_ignore{$if}++;
}
}
@@ -277,7 +289,9 @@ sub _if2tag {
foreach my $if ( keys %$vlan_descr ) {
$if2tag{$if} = -1;
foreach my $tagif ( keys %$encap_tag ) {
if (defined($stackmap->{$if}->{$tagif}) && $stackmap->{$if}->{$tagif} eq 'active') {
if ( defined( $stackmap->{$if}->{$tagif} )
&& $stackmap->{$if}->{$tagif} eq 'active' )
{
$if2tag{$if} = $encap_tag->{$tagif};
}
}
@@ -288,7 +302,8 @@ sub _if2tag {
if ($missed) {
my $global_id = $extreme->ex_vlan_global_id();
foreach my $if ( keys %if2tag ) {
$if2tag{$if} = -$global_id->{$if} if ($if2tag{$if} == -1 && defined($global_id->{$if}));
$if2tag{$if} = -$global_id->{$if}
if ( $if2tag{$if} == -1 && defined( $global_id->{$if} ) );
}
}
return \%if2tag;
@@ -319,6 +334,7 @@ sub i_vlan {
$stackmap->{$higher}->{$lower} = $stack->{$idx};
}
my $if2tag = $extreme->_if2tag( $partial, $stack );
#
# Now that we've done all that mapping work, we can map the
# ifStack indexes.
@@ -343,6 +359,7 @@ sub i_vlan_membership {
$stackmap->{$higher}->{$lower} = $stack->{$idx};
}
my $if2tag = $extreme->_if2tag( $partial, $stack );
#
# Now that we've done all that mapping work, we can map the
# ifStack indexes.
@@ -352,6 +369,7 @@ sub i_vlan_membership {
push( @{ $i_vlan_membership{$lowif} }, $if2tag->{$if} );
}
}
#
# Now add all the tagged ports.
foreach my $if ( keys %$encap_tag ) {
@@ -386,10 +404,12 @@ sub _extreme_set_i_vlan {
my $extreme = shift;
my ( $is_pvid, $vlan_id, $ifindex ) = @_;
my $encap_tag = $extreme->ex_vlan_encap_tag();
# The inverted stack MIB would make this easier, since
# we need to find the vlan interface
# that's stacked above $ifindex.
my $cur_stack = $extreme->ifStackStatus();
#
# create inverted stack
my $invstack;
@@ -397,39 +417,52 @@ sub _extreme_set_i_vlan {
my ( $higher, $lower ) = split( /\./, $idx );
$invstack->{$lower}->{$higher} = $cur_stack->{$idx};
}
# create vlan tag -> encap interface map
my %encapif = reverse %$encap_tag;
# now find encap interface from tag
my $encapidx = $encapif{$vlan_id};
if ( !defined($encapidx) ) {
$extreme->error_throw("can't map $vlan_id to encapsulation interface");
$extreme->error_throw(
"can't map $vlan_id to encapsulation interface");
return;
}
# now find vlan interface stacked above encap
my @abovevlan = keys %{ $invstack->{$encapidx} };
if ( @abovevlan != 1 ) {
$extreme->error_throw("can't map encap interface $encapidx for $vlan_id to encapsulation interface");
$extreme->error_throw(
"can't map encap interface $encapidx for $vlan_id to encapsulation interface"
);
return;
}
my $vlanidx = $abovevlan[0];
my $rv;
# Delete old VLAN mapping
foreach my $oldidx ( keys %{ $invstack->{$ifindex} } ) {
if ( $is_pvid && defined( $encap_tag->{$oldidx} ) ) {
next; # Don't delete tagged mappings
}
$rv = $extreme->set_ifStackStatus("destroy", $oldidx . "." . $ifindex);
$rv = $extreme->set_ifStackStatus( "destroy",
$oldidx . "." . $ifindex );
unless ($rv) {
$extreme->error_throw("Unable to remove $ifindex from old VLAN index $oldidx");
$extreme->error_throw(
"Unable to remove $ifindex from old VLAN index $oldidx");
return;
}
}
# Add new VLAN mapping
$rv = $extreme->set_ifStackStatus("createAndGo", $vlanidx . "." . $ifindex);
$rv = $extreme->set_ifStackStatus( "createAndGo",
$vlanidx . "." . $ifindex );
unless ($rv) {
$extreme->error_throw("Unable to add new VLAN index $vlanidx to ifIndex $ifindex");
$extreme->error_throw(
"Unable to add new VLAN index $vlanidx to ifIndex $ifindex");
return;
}
# XXX invalidate cache of ifstack?
# XXX Info.pm library function for this?
# XXX set_ should do invalidation?
@@ -442,19 +475,26 @@ sub set_remove_i_vlan_tagged {
my $extreme = shift;
my ( $vlan_id, $ifindex ) = @_;
my $encap_tag = $extreme->ex_vlan_encap_tag();
# create vlan tag -> encap interface map
my %encapif = reverse %$encap_tag;
# now find encap interface from tag
my $encapidx = $encapif{$vlan_id};
if ( !defined($encapidx) ) {
$extreme->error_throw("can't map $vlan_id to encapsulation interface");
$extreme->error_throw(
"can't map $vlan_id to encapsulation interface");
return;
}
my $rv = $extreme->set_ifStackStatus("destroy", $encapidx . "." . $ifindex);
my $rv = $extreme->set_ifStackStatus( "destroy",
$encapidx . "." . $ifindex );
unless ($rv) {
$extreme->error_throw("Unable to delete VLAN encap ifIndex $encapidx for VLAN $vlan_id from ifIndex $ifindex");
$extreme->error_throw(
"Unable to delete VLAN encap ifIndex $encapidx for VLAN $vlan_id from ifIndex $ifindex"
);
return;
}
# invalidate cache of ifstack?
return $rv;
}
@@ -463,19 +503,26 @@ sub set_add_i_vlan_tagged {
my $extreme = shift;
my ( $vlan_id, $ifindex ) = @_;
my $encap_tag = $extreme->ex_vlan_encap_tag();
# create vlan tag -> encap interface map
my %encapif = reverse %$encap_tag;
# now find encap interface from tag
my $encapidx = $encapif{$vlan_id};
if ( !defined($encapidx) ) {
$extreme->error_throw("can't map $vlan_id to encapsulation interface");
$extreme->error_throw(
"can't map $vlan_id to encapsulation interface");
return;
}
my $rv = $extreme->set_ifStackStatus("createAndGo", $encapidx . "." . $ifindex);
my $rv = $extreme->set_ifStackStatus( "createAndGo",
$encapidx . "." . $ifindex );
unless ($rv) {
$extreme->error_throw("Unable to add VLAN encap ifIndex $encapidx for VLAN $vlan_id to ifIndex $ifindex");
$extreme->error_throw(
"Unable to add VLAN encap ifIndex $encapidx for VLAN $vlan_id to ifIndex $ifindex"
);
return;
}
# invalidate cache of ifstack?
return $rv;
}
@@ -698,8 +745,8 @@ Returns VLAN names
Returns reference to hash of bridge port table entries map back to interface
identifier (iid)
Returns (C<ifIndex>) for both key and value since we're using F<EXTREME-FDB-MIB>
rather than F<BRIDGE-MIB>.
Returns (C<ifIndex>) for both key and value since we're using
F<EXTREME-FDB-MIB> rather than F<BRIDGE-MIB>.
=back

View File

@@ -46,7 +46,8 @@ use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '1.09';
%MIBS = ( %SNMP::Info::Layer3::MIBS,
%MIBS = (
%SNMP::Info::Layer3::MIBS,
%SNMP::Info::LLDP::MIBS,
%SNMP::Info::FDP::MIBS,
'FOUNDRY-SN-ROOT-MIB' => 'foundry',
@@ -71,6 +72,7 @@ $VERSION = '1.09';
%SNMP::Info::Layer3::FUNCS,
%SNMP::Info::LLDP::FUNCS,
%SNMP::Info::FDP::FUNCS,
# FOUNDRY-SN-SWITCH-GROUP-MIB
# snSwPortInfoTable - Switch Port Information Group
'sw_index' => 'snSwPortIfIndex',
@@ -80,8 +82,7 @@ $VERSION = '1.09';
);
%MUNGE = (
%SNMP::Info::Layer3::MUNGE,
%SNMP::Info::LLDP::MUNGE,
%SNMP::Info::Layer3::MUNGE, %SNMP::Info::LLDP::MUNGE,
%SNMP::Info::FDP::MUNGE,
);
@@ -222,6 +223,7 @@ sub serial {
}
if ( defined $unit_iid ) {
# Look up serial of found entry.
my $e_serial = $foundry->e_serial();
return $e_serial->{$unit_iid} if defined $e_serial->{$unit_iid};
@@ -299,7 +301,7 @@ sub c_if {
my $foundry = shift;
my $partial = shift;
my $lldp = $foundry->lldp_if($partial) || {};;
my $lldp = $foundry->lldp_if($partial) || {};
my $cdp = $foundry->SUPER::c_if($partial) || {};
my %c_if;
@@ -629,9 +631,9 @@ Returns reference to hash. Key: iid Value: remote IPv4 address
If multiple entries exist with the same local port, c_if(), with the same IPv4
address, c_ip(), it may be a duplicate entry.
If multiple entries exist with the same local port, c_if(), with different IPv4
addresses, c_ip(), there is either a non-FDP/LLDP device in between two or
more devices or multiple devices which are not directly connected.
If multiple entries exist with the same local port, c_if(), with different
IPv4 addresses, c_ip(), there is either a non-FDP/LLDP device in between two
or more devices or multiple devices which are not directly connected.
Use the data from the Layer2 Topology Table below to dig deeper.

View File

@@ -44,7 +44,8 @@ use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '1.09';
%MIBS = ( %SNMP::Info::Layer3::MIBS,
%MIBS = (
%SNMP::Info::Layer3::MIBS,
%SNMP::Info::LLDP::MIBS,
%SNMP::Info::FDP::MIBS,
'HP-SN-ROOT-MIB' => 'hp',
@@ -69,6 +70,7 @@ $VERSION = '1.09';
%SNMP::Info::Layer3::FUNCS,
%SNMP::Info::LLDP::FUNCS,
%SNMP::Info::FDP::FUNCS,
# HP-SN-SWITCH-GROUP-MIB
# snSwPortInfoTable - Switch Port Information Group
# Fully qualify these since FDP class will load
@@ -80,8 +82,7 @@ $VERSION = '1.09';
);
%MUNGE = (
%SNMP::Info::Layer3::MUNGE,
%SNMP::Info::LLDP::MUNGE,
%SNMP::Info::Layer3::MUNGE, %SNMP::Info::LLDP::MUNGE,
%SNMP::Info::FDP::MUNGE,
);
@@ -231,7 +232,7 @@ sub c_if {
my $hp9300 = shift;
my $partial = shift;
my $lldp = $hp9300->lldp_if($partial) || {};;
my $lldp = $hp9300->lldp_if($partial) || {};
my $cdp = $hp9300->SUPER::c_if($partial) || {};
my %c_if;
@@ -553,9 +554,9 @@ Returns reference to hash. Key: iid Value: remote IPv4 address
If multiple entries exist with the same local port, c_if(), with the same IPv4
address, c_ip(), it may be a duplicate entry.
If multiple entries exist with the same local port, c_if(), with different IPv4
addresses, c_ip(), there is either a non-FDP/LLDP device in between two or
more devices or multiple devices which are not directly connected.
If multiple entries exist with the same local port, c_if(), with different
IPv4 addresses, c_ip(), there is either a non-FDP/LLDP device in between two
or more devices or multiple devices which are not directly connected.
Use the data from the Layer2 Topology Table below to dig deeper.

View File

@@ -47,18 +47,11 @@ $VERSION = '1.09';
'JUNIPER-MIB' => 'jnxBoxAnatomy',
);
%GLOBALS = (
%SNMP::Info::Layer3::GLOBALS,
'serial' => 'jnxBoxSerialNo.0',
);
%GLOBALS = ( %SNMP::Info::Layer3::GLOBALS, 'serial' => 'jnxBoxSerialNo.0', );
%FUNCS = (
%SNMP::Info::Layer3::FUNCS,
);
%FUNCS = ( %SNMP::Info::Layer3::FUNCS, );
%MUNGE = (
%SNMP::Info::Layer3::MUNGE,
);
%MUNGE = ( %SNMP::Info::Layer3::MUNGE, );
sub vendor {
return 'juniper';
@@ -84,7 +77,9 @@ sub model {
my $id = $l3->id();
unless ( defined $id ) {
print " SNMP::Info::Layer3::Juniper::model() - Device does not support sysObjectID\n" if $l3->debug();
print
" SNMP::Info::Layer3::Juniper::model() - Device does not support sysObjectID\n"
if $l3->debug();
return;
}

View File

@@ -41,21 +41,13 @@ use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/ ;
$VERSION = '1.09';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
);
%MIBS = ( %SNMP::Info::Layer3::MIBS, );
%GLOBALS = (
%SNMP::Info::Layer3::GLOBALS,
);
%GLOBALS = ( %SNMP::Info::Layer3::GLOBALS, );
%FUNCS = (
%SNMP::Info::Layer3::FUNCS,
);
%FUNCS = ( %SNMP::Info::Layer3::FUNCS, );
%MUNGE = (
%SNMP::Info::Layer3::MUNGE,
);
%MUNGE = ( %SNMP::Info::Layer3::MUNGE, );
sub vendor {
return 'microsoft';
@@ -70,11 +62,13 @@ sub os_ver {
}
sub model {
return 'Windows Router'
return 'Windows Router';
}
sub serial {
return '';
}
# $l3->interfaces() - Map the Interfaces to their physical names
# Add interface number to interface name because if MS Win
# have identical interface cards ("HP NC7782 Gigabit Server Adapter"

View File

@@ -35,35 +35,37 @@ use Exporter;
use SNMP::Info::Layer3;
use SNMP::Info::SONMP;
@SNMP::Info::Layer3::N1600::ISA = qw/SNMP::Info::Layer3 SNMP::Info::SONMP Exporter/;
@SNMP::Info::Layer3::N1600::ISA
= qw/SNMP::Info::Layer3 SNMP::Info::SONMP Exporter/;
@SNMP::Info::Layer3::N1600::EXPORT_OK = qw//;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '1.09';
%MIBS = ( %SNMP::Info::Layer3::MIBS,
%MIBS = (
%SNMP::Info::Layer3::MIBS,
%SNMP::Info::SONMP::MIBS,
'SWL2MGMT-MIB' => 'swL2MgmtMIB',
'RAPID-CITY' => 'rapidCity',
);
%GLOBALS = (
%SNMP::Info::Layer3::GLOBALS,
%SNMP::Info::SONMP::GLOBALS,
);
%GLOBALS = ( %SNMP::Info::Layer3::GLOBALS, %SNMP::Info::SONMP::GLOBALS, );
%FUNCS = (
%SNMP::Info::Layer3::FUNCS,
%SNMP::Info::SONMP::FUNCS,
# SWL2MGMT-MIB
# swL2PortInfoTable
'n1600_nway_status' => 'swL2PortInfoNwayStatus',
# swL2PortCtrlTable
'n1600_nway_state' => 'swL2PortCtrlNwayState',
);
%MUNGE = (
# Inherit all the built in munging
%SNMP::Info::Layer3::MUNGE,
%SNMP::Info::SONMP::MUNGE,
@@ -76,7 +78,9 @@ sub model {
my $id = $n1600->id();
unless ( defined $id ) {
print " SNMP::Info::Layer3::N1600::model() - Device does not support sysObjectID\n" if $n1600->debug();
print
" SNMP::Info::Layer3::N1600::model() - Device does not support sysObjectID\n"
if $n1600->debug();
return;
}

View File

@@ -54,13 +54,9 @@ $VERSION = '1.09';
'hrSystemUptime' => 'hrSystemUptime',
);
%FUNCS = (
%SNMP::Info::Layer3::FUNCS,
);
%FUNCS = ( %SNMP::Info::Layer3::FUNCS, );
%MUNGE = (
%SNMP::Info::Layer3::MUNGE,
);
%MUNGE = ( %SNMP::Info::Layer3::MUNGE, );
sub vendor {
return 'Net-SNMP';
@@ -116,6 +112,7 @@ sub i_ignore {
my %i_ignore;
foreach my $if ( keys %$interfaces ) {
# lo0 etc
if ( $interfaces->{$if} =~ /\blo\d*\b/i ) {
$i_ignore{$if}++;

View File

@@ -49,18 +49,11 @@ $VERSION = '1.09';
'NETSCREEN-SET-GEN-MIB' => 'nsSetGenSwVer',
);
%GLOBALS = (
%SNMP::Info::Layer3::GLOBALS,
'os_version' => 'nsSetGenSwVer',
);
%GLOBALS = ( %SNMP::Info::Layer3::GLOBALS, 'os_version' => 'nsSetGenSwVer', );
%FUNCS = (
%SNMP::Info::Layer3::FUNCS,
);
%FUNCS = ( %SNMP::Info::Layer3::FUNCS, );
%MUNGE = (
%SNMP::Info::Layer3::MUNGE,
);
%MUNGE = ( %SNMP::Info::Layer3::MUNGE, );
sub layers {
return '01001100';

View File

@@ -36,7 +36,8 @@ use SNMP::Info::SONMP;
use SNMP::Info::RapidCity;
use SNMP::Info::Layer3;
@SNMP::Info::Layer3::Passport::ISA = qw/SNMP::Info::SONMP SNMP::Info::RapidCity
@SNMP::Info::Layer3::Passport::ISA
= qw/SNMP::Info::SONMP SNMP::Info::RapidCity
SNMP::Info::Layer3 Exporter/;
@SNMP::Info::Layer3::Passport::EXPORT_OK = qw//;
@@ -45,26 +46,22 @@ use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '1.09';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
%SNMP::Info::RapidCity::MIBS,
%SNMP::Info::Layer3::MIBS, %SNMP::Info::RapidCity::MIBS,
%SNMP::Info::SONMP::MIBS,
);
%GLOBALS = (
%SNMP::Info::Layer3::GLOBALS,
%SNMP::Info::RapidCity::GLOBALS,
%SNMP::Info::Layer3::GLOBALS, %SNMP::Info::RapidCity::GLOBALS,
%SNMP::Info::SONMP::GLOBALS,
);
%FUNCS = (
%SNMP::Info::Layer3::FUNCS,
%SNMP::Info::RapidCity::FUNCS,
%SNMP::Info::Layer3::FUNCS, %SNMP::Info::RapidCity::FUNCS,
%SNMP::Info::SONMP::FUNCS,
);
%MUNGE = (
%SNMP::Info::Layer3::MUNGE,
%SNMP::Info::RapidCity::MUNGE,
%SNMP::Info::Layer3::MUNGE, %SNMP::Info::RapidCity::MUNGE,
%SNMP::Info::SONMP::MUNGE,
);
@@ -73,7 +70,9 @@ sub model {
my $id = $passport->id();
unless ( defined $id ) {
print " SNMP::Info::Layer3::Passport::model() - Device does not support sysObjectID\n" if $passport->debug();
print
" SNMP::Info::Layer3::Passport::model() - Device does not support sysObjectID\n"
if $passport->debug();
return;
}
@@ -102,6 +101,7 @@ sub os_ver {
if ( $descr =~ m/(\d+\.\d+\.\d+\.\d+)/ ) {
return $1;
}
#Accelar
if ( $descr =~ m/(\d+\.\d+\.\d+)/ ) {
return $1;
@@ -125,9 +125,13 @@ sub i_index {
}
# Get VLAN Virtual Router Interfaces
if (!defined $partial or (defined $model and
(($partial > 2000 and $model =~ /(86|83|81|16)/) or
($partial > 256 and $model =~ /(105|11[05]0|12[05])/)))) {
if (!defined $partial
or (defined $model
and ( ( $partial > 2000 and $model =~ /(86|83|81|16)/ )
or ( $partial > 256 and $model =~ /(105|11[05]0|12[05])/ ) )
)
)
{
my $vlan_index = $passport->rc_vlan_if() || {};
@@ -157,6 +161,7 @@ sub i_index {
# Check for Virtual Mgmt Interface
unless ( $virt_ip eq '0.0.0.0' ) {
# Make up an index number, 1 is not reserved AFAIK
$if_index{1} = 1;
}
@@ -176,9 +181,13 @@ sub interfaces {
my %reverse_vlan;
my $vlan_id = {};
if (!defined $partial or (defined $model and
(($partial > 2000 and $model =~ /(86|83|81|16)/) or
($partial > 256 and $model =~ /(105|11[05]0|12[05])/)))) {
if (!defined $partial
or (defined $model
and ( ( $partial > 2000 and $model =~ /(86|83|81|16)/ )
or ( $partial > 256 and $model =~ /(105|11[05]0|12[05])/ ) )
)
)
{
$vlan_index = $passport->rc_vlan_if();
%reverse_vlan = reverse %$vlan_index;
$vlan_id = $passport->rc_vlan_id();
@@ -205,8 +214,9 @@ sub interfaces {
$if{$index} = 'Cpu.6';
}
elsif (($index > 2000 and $model =~ /(86|83|81|16)/) or
($index > 256 and $model =~ /(105|11[05]0|12[05])/)) {
elsif (( $index > 2000 and $model =~ /(86|83|81|16)/ )
or ( $index > 256 and $model =~ /(105|11[05]0|12[05])/ ) )
{
my $v_index = $reverse_vlan{$iid};
my $v_id = $vlan_id->{$v_index};
@@ -244,9 +254,13 @@ sub i_mac {
}
# Get VLAN Virtual Router Interfaces
if (!defined $partial or (defined $model and
(($partial > 2000 and $model =~ /(86|83|81|16)/) or
($partial > 256 and $model =~ /(105|11[05]0|12[05])/)))) {
if (!defined $partial
or (defined $model
and ( ( $partial > 2000 and $model =~ /(86|83|81|16)/ )
or ( $partial > 256 and $model =~ /(105|11[05]0|12[05])/ ) )
)
)
{
my $vlan_index = $passport->rc_vlan_if() || {};
my $vlan_mac = $passport->rc_vlan_mac() || {};
@@ -276,7 +290,9 @@ sub i_mac {
}
# Check for Virtual Mgmt Interface
unless (($virt_ip eq '0.0.0.0') or (defined $partial and $partial ne "1")) {
unless ( ( $virt_ip eq '0.0.0.0' )
or ( defined $partial and $partial ne "1" ) )
{
my $chassis_base_mac = $passport->rc_base_mac();
if ( defined $chassis_base_mac ) {
my @virt_mac = split /:/, $chassis_base_mac;
@@ -312,9 +328,13 @@ sub i_description {
}
# Get VLAN Virtual Router Interfaces
if (!defined $partial or (defined $model and
(($partial > 2000 and $model =~ /(86|83|81|16)/) or
($partial > 256 and $model =~ /(105|11[05]0|12[05])/)))) {
if (!defined $partial
or (defined $model
and ( ( $partial > 2000 and $model =~ /(86|83|81|16)/ )
or ( $partial > 256 and $model =~ /(105|11[05]0|12[05])/ ) )
)
)
{
my $v_descr = $passport->v_name();
my $vlan_index = $passport->rc_vlan_if();
@@ -344,9 +364,13 @@ sub i_name {
my $vlan_index = {};
my %reverse_vlan;
if (!defined $partial or (defined $model and
(($partial > 2000 and $model =~ /(86|83|81|16)/) or
($partial > 256 and $model =~ /(105|11[05]0|12[05])/)))) {
if (!defined $partial
or (defined $model
and ( ( $partial > 2000 and $model =~ /(86|83|81|16)/ )
or ( $partial > 256 and $model =~ /(105|11[05]0|12[05])/ ) )
)
)
{
$v_name = $passport->v_name() || {};
$vlan_index = $passport->rc_vlan_if() || {};
%reverse_vlan = reverse %$vlan_index;
@@ -371,8 +395,13 @@ sub i_name {
$i_name{$iid} = 'CPU 6 Ethernet Port';
}
elsif (($iid > 2000 and defined $model and $model =~ /(86|83|81|16)/) or
($iid > 256 and defined $model and $model =~ /(105|11[05]0|12[05])/)) {
elsif (
( $iid > 2000 and defined $model and $model =~ /(86|83|81|16)/ )
or ( $iid > 256
and defined $model
and $model =~ /(105|11[05]0|12[05])/ )
)
{
my $vlan_index = $reverse_vlan{$iid};
my $vlan_name = $v_name->{$vlan_index};
next unless defined $vlan_name;
@@ -383,9 +412,10 @@ sub i_name {
else {
my $name = $i_name2->{$iid};
my $alias = $rc_alias->{$iid};
$i_name{$iid} = (defined $alias and $alias !~ /^\s*$/) ?
$alias :
$name;
$i_name{$iid}
= ( defined $alias and $alias !~ /^\s*$/ )
? $alias
: $name;
}
}
@@ -462,7 +492,8 @@ sub ip_netmask {
}
# Get Virtual Mgmt IP
$ip_index{$virt_ip} = $virt_mask if (defined $virt_mask and defined $virt_ip);
$ip_index{$virt_ip} = $virt_mask
if ( defined $virt_mask and defined $virt_ip );
}
return \%ip_index;
@@ -480,10 +511,13 @@ sub root_ip {
# Only 8600 and 1600 have CLIP or Management Virtual IP
if ( defined $model and $model =~ /(86|16)/ ) {
# Return CLIP (CircuitLess IP)
foreach my $iid ( keys %$rc_ip_type ) {
my $ip_type = $rc_ip_type->{$iid};
next unless ((defined $ip_type) and ($ip_type =~ /circuitLess/i));
next
unless ( ( defined $ip_type )
and ( $ip_type =~ /circuitLess/i ) );
my $ip = $rc_ip_addr->{$iid};
next unless defined $ip;
@@ -510,7 +544,10 @@ sub root_ip {
my $port = $sonmp_topo_port->{$entry};
next unless $port == 0;
my $ip = $sonmp_topo_ip->{$entry};
return $ip if ( (defined $ip) and ($ip ne '0.0.0.0') and ($passport->snmp_connect_ip($ip)) );
return $ip
if (( defined $ip )
and ( $ip ne '0.0.0.0' )
and ( $passport->snmp_connect_ip($ip) ) );
}
return;
}
@@ -520,8 +557,10 @@ sub index_factor {
my $passport = shift;
my $model = $passport->model();
my $index_factor = 64;
# Older Accelar models use base 16 instead of 64
$index_factor = 16 if (defined $model and $model =~ /(105|11[05]0|12[05])/);
$index_factor = 16
if ( defined $model and $model =~ /(105|11[05]0|12[05])/ );
return $index_factor;
}
@@ -566,11 +605,13 @@ sub e_index {
# Power supplies are common, handle them first
foreach my $idx ( keys %$rc_ps_t ) {
next unless $idx;
# We should never have 90 slots, they will also
# sort numerically at the bottom
my $index = $idx + 90 . "0000";
$rc_e_index{$index} = $index;
}
# Older Accelars use RAPID-CITY::rcCardTable
if ( defined $model and $model =~ /(105|11[05]0|12[05])/ ) {
my $rc_c_t = $passport->rc_c_type() || {};
@@ -583,6 +624,7 @@ sub e_index {
$rc_e_index{$index} = $index;
}
}
# All newer models use RAPID-CITY::rc2kCardTable
else {
my $rc2_c_t = $passport->rc2k_c_ftype() || {};
@@ -657,6 +699,7 @@ sub e_descr {
my $index = $idx + 90 . "0000";
$rc_e_descr{$index} = $ps;
}
# Older Accelars use RAPID-CITY::rcCardTable
if ( defined $model and $model =~ /(105|11[05]0|12[05])/ ) {
my $rc_c_t = $passport->rc_c_type() || {};
@@ -670,6 +713,7 @@ sub e_descr {
$rc_e_descr{$index} = $type;
}
}
# All newer models use RAPID-CITY::rc2kCardTable
else {
my $rc2_cf = $passport->rc2k_c_fdesc() || {};
@@ -723,6 +767,7 @@ sub e_type {
my $index = $idx + 90 . "0000";
$rc_e_type{$index} = $ps;
}
# Older Accelars use RAPID-CITY::rcCardTable
if ( defined $model and $model =~ /(105|11[05]0|12[05])/ ) {
my $rc_c_t = $passport->rc_c_type() || {};
@@ -736,6 +781,7 @@ sub e_type {
$rc_e_type{$index} = $type;
}
}
# All newer models use RAPID-CITY::rc2kCardTable
else {
my $rc2_cf = $passport->rc2k_c_ftype() || {};
@@ -795,7 +841,10 @@ sub e_name {
elsif ( $iid =~ /(00){1}$/ ) {
$rc_e_name{$iid} = "Card $slot, MDA $mod";
}
elsif (defined $model and $model =~ /(105|11[05]0|12[05])/ and $iid =~ /1$/) {
elsif ( defined $model
and $model =~ /(105|11[05]0|12[05])/
and $iid =~ /1$/ )
{
$rc_e_name{$iid} = "Card $slot";
}
elsif ( $iid =~ /1$/ ) {
@@ -827,6 +876,7 @@ sub e_hwver {
my $index = $idx + 90 . "0000";
$rc_e_hwver{$index} = $ps;
}
# Older Accelars use RAPID-CITY::rcCardTable
if ( defined $model and $model =~ /(105|11[05]0|12[05])/ ) {
my $rc_c_t = $passport->rc_c_rev() || {};
@@ -838,6 +888,7 @@ sub e_hwver {
$rc_e_hwver{$index} = $type;
}
}
# All newer models use RAPID-CITY::rc2kCardTable
else {
my $rc2_cf = $passport->rc2k_c_frev() || {};
@@ -900,6 +951,7 @@ sub e_serial {
my $index = $idx + 90 . "0000";
$rc_e_serial{$index} = $ps;
}
# Older Accelars use RAPID-CITY::rcCardTable
if ( defined $model and $model =~ /(105|11[05]0|12[05])/ ) {
my $rc_c_t = $passport->rc_c_serial() || {};
@@ -911,6 +963,7 @@ sub e_serial {
$rc_e_serial{$index} = $type;
}
}
# All newer models use RAPID-CITY::rc2kCardTable
else {
my $rc2_cf = $passport->rc2k_c_fserial() || {};
@@ -1148,13 +1201,14 @@ Slot and port numbers on the Passport switches are determined by the formula:
port = (C<ifIndex % index_factor>) + port_offset,
slot = int(C<ifIndex / index_factor>).
The physical port name is returned as slot.port. CPU Ethernet ports are prefixed
with CPU and VLAN interfaces are returned as the VLAN ID prefixed with Vlan.
The physical port name is returned as slot.port. CPU Ethernet ports are
prefixed with CPU and VLAN interfaces are returned as the VLAN ID prefixed
with Vlan.
=item $passport->i_mac()
MAC address of the interface. Note this is just the MAC of the port, not anything
connected to it.
MAC address of the interface. Note this is just the MAC of the port, not
anything connected to it.
=item $passport->i_description()
@@ -1163,8 +1217,8 @@ human and machine friendly. Not always.
=item $passport->i_name()
Crosses rc_alias() (C<rcPortName>) with ifAlias() and returns the human set port
name if exists.
Crosses rc_alias() (C<rcPortName>) with ifAlias() and returns the human set
port name if exists.
=item $passport->ip_index()

View File

@@ -41,9 +41,7 @@ use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/ ;
$VERSION = '1.09';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
);
%MIBS = ( %SNMP::Info::Layer3::MIBS, );
%GLOBALS = (
%SNMP::Info::Layer3::GLOBALS,
@@ -51,13 +49,9 @@ $VERSION = '1.09';
'motd' => '.1.3.6.1.4.1.42.3.1.3.0',
);
%FUNCS = (
%SNMP::Info::Layer3::FUNCS,
);
%FUNCS = ( %SNMP::Info::Layer3::FUNCS, );
%MUNGE = (
%SNMP::Info::Layer3::MUNGE,
);
%MUNGE = ( %SNMP::Info::Layer3::MUNGE, );
sub vendor {
return 'sun';
@@ -79,8 +73,9 @@ sub os_ver {
}
sub model {
return 'Solaris Router'
return 'Solaris Router';
}
sub serial {
my $sun = shift;
my $serial = unpack( "H*", $sun->sun_hostid() );
@@ -95,6 +90,7 @@ sub i_ignore {
my %i_ignore;
foreach my $if ( keys %$interfaces ) {
# lo0
if ( $interfaces->{$if} =~ /\blo0\b/i ) {
$i_ignore{$if}++;

View File

@@ -45,10 +45,10 @@ $VERSION = '1.09';
%MIBS = ( 'MAU-MIB' => 'mauMod' );
%GLOBALS = (
);
%GLOBALS = ();
%FUNCS = (
# Interface MAU Table
'mau_index' => 'ifMauIfIndex',
'mau_link' => 'ifMauType',
@@ -56,6 +56,7 @@ $VERSION = '1.09';
'mau_up' => 'ifMauMediaAvailable',
'mau_type' => 'ifMauTypeList',
'mau_type_admin' => 'ifMauDefaultType',
# Interface Auto-Negotiation Table
'mau_auto' => 'ifMauAutoNegSupported',
'mau_autostat' => 'ifMauAutoNegAdminStatus',
@@ -64,15 +65,16 @@ $VERSION = '1.09';
);
%MUNGE = (
# Inherit all the built in munging
%SNMP::Info::MUNGE,
# Add ones for our class
'mau_type' => \&munge_int2bin,
'mau_autosent' => \&munge_int2bin,
'mau_autorec' => \&munge_int2bin,
);
sub munge_int2bin {
my $int = shift;
return unless defined $int;
@@ -85,7 +87,7 @@ sub _isfullduplex{
my @full_types = qw/11 13 16 18 20/;
foreach my $type (@full_types) {
return 1 if (substr($mautype,32-$type,1) eq '1')
return 1 if ( substr( $mautype, 32 - $type, 1 ) eq '1' );
}
return 0;
}
@@ -96,7 +98,7 @@ sub _ishalfduplex{
my @half_types = qw/10 12 15 17 19/;
foreach my $type (@half_types) {
return 1 if (substr($mautype,32-$type,1) eq '1')
return 1 if ( substr( $mautype, 32 - $type, 1 ) eq '1' );
}
return 0;
}
@@ -125,7 +127,10 @@ sub mau_i_speed_admin {
if ( $type_adminoid eq '.0.0' ) {
$i_speed_admin{$iid} = 'auto';
} elsif ($type_admin =~ /^dot3MauType(.*)Base/ && $_mau_i_speed_map{$1}) {
}
elsif ($type_admin =~ /^dot3MauType(.*)Base/
&& $_mau_i_speed_map{$1} )
{
$i_speed_admin{$iid} = $_mau_i_speed_map{$1};
}
}
@@ -151,7 +156,8 @@ sub mau_i_duplex {
if ( $link =~ /fd$/i ) {
$duplex = 'full';
} elsif ($link =~ /hd$/i){
}
elsif ( $link =~ /hd$/i ) {
$duplex = 'half';
}
@@ -166,15 +172,22 @@ sub mau_i_duplex_admin {
my $mau_index = $mau->mau_index();
my %rev_mau_index = reverse %$mau_index;
my $mau_autostat = defined $partial ? $mau->mau_autostat($rev_mau_index{$partial}) : $mau->mau_autostat();
my $mau_type_admin = defined $partial ? $mau->mau_type_admin($rev_mau_index{$partial}) : $mau->mau_type_admin();
my $mau_autostat
= defined $partial
? $mau->mau_autostat( $rev_mau_index{$partial} )
: $mau->mau_autostat();
my $mau_type_admin
= defined $partial
? $mau->mau_type_admin( $rev_mau_index{$partial} )
: $mau->mau_type_admin();
# Older HP4000's don't implement ifMauDefaultType, but we can
# figure out from ifMauAutoNegCapAdvertised what we'd like.
if ( !defined($mau_type_admin) ) {
if ( defined($mau_index) ) {
return mau_i_duplex_admin_old( $mau, $mau_index, $mau_autostat );
} else {
}
else {
return;
}
}
@@ -198,9 +211,11 @@ sub mau_i_duplex_admin {
if ( $type_admin =~ /fd$/i ) {
$duplex = 'full';
} elsif ($type_admin =~ /hd$/i){
}
elsif ( $type_admin =~ /hd$/i ) {
$duplex = 'half';
} elsif ($type_admin eq 'zeroDotZero') {
}
elsif ( $type_admin eq 'zeroDotZero' ) {
$duplex = 'auto';
}
@@ -246,7 +261,8 @@ sub mau_i_duplex_admin_old {
if ( $full and !$half ) {
$i_duplex_admin{$iid} = 'full';
} elsif ($half) {
}
elsif ($half) {
$i_duplex_admin{$iid} = 'half';
}
}
@@ -289,8 +305,8 @@ devices like HP Switches. MAU = Media Access Unit.
The MAU table contains link and duplex info for the port itself and the device
connected to that port.
Normally you use or create a subclass of SNMP::Info that inherits this one. Do
not use directly.
Normally you use or create a subclass of SNMP::Info that inherits this one.
Do not use directly.
For debugging purposes call the class directly as you would SNMP::Info
@@ -450,13 +466,13 @@ capabilities of the device on the other end.
=item $mau->_isfullduplex(bitstring)
Boolean. Checks to see if any of the full_duplex types from mau_type() are
high. Currently bits 11,13,16,18,20.
Boolean. Checks to see if any of the full_duplex types from mau_type()
are high. Currently bits 11,13,16,18,20.
=item $mau->_ishalfduplex(bitstring)
Boolean. Checks to see if any of the half_duplex types from mau_type() are
high. Currently bits 10,12,15,17,19.
Boolean. Checks to see if any of the half_duplex types from mau_type()
are high. Currently bits 10,12,15,17,19.
=back

View File

@@ -42,6 +42,7 @@ use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '1.09';
%MIBS = (
# S5-ROOT-MIB and S5-TCS-MIB required by the MIBs below
'S5-AGENT-MIB' => 's5AgMyGrpIndx',
'S5-CHASSIS-MIB' => 's5ChasType',
@@ -49,6 +50,7 @@ $VERSION = '1.09';
);
%GLOBALS = (
# From S5-AGENT-MIB
'ns_ag_ver' => 's5AgInfoVer',
'ns_op_mode' => 's5AgSysCurrentOperationalMode',
@@ -58,6 +60,7 @@ $VERSION = '1.09';
'tftp_action' => 's5AgInfoFileAction',
'tftp_result' => 's5AgInfoFileStatus',
'vlan' => 's5AgSysManagementVlanId',
# From S5-CHASSIS-MIB
'ns_serial' => 's5ChasSerNum',
'ns_ch_type' => 's5ChasType',
@@ -66,11 +69,14 @@ $VERSION = '1.09';
);
%FUNCS = (
# From S5-AGENT-MIB::s5AgMyIfTable
'i_cfg_file' => 's5AgMyIfCfgFname',
'i_cfg_host' => 's5AgMyIfLdSvrAddr',
# From S5-CHASSIS-MIB::s5ChasGrpTable
'ns_grp_type' => 's5ChasGrpType',
# From S5-CHASSIS-MIB::s5ChasComTable
'ns_com_grp_idx' => 's5ChasComGrpIndx',
'ns_com_idx' => 's5ChasComIndx',
@@ -79,6 +85,7 @@ $VERSION = '1.09';
'ns_com_descr' => 's5ChasComDescr',
'ns_com_ver' => 's5ChasComVer',
'ns_com_serial' => 's5ChasComSerNum',
# From S5-CHASSIS-MIB::s5ChasStoreTable
'ns_store_grp_idx' => 's5ChasStoreGrpIndx',
'ns_store_com_idx' => 's5ChasStoreComIndx',
@@ -143,8 +150,8 @@ sub serial {
sub _ns_e_is_virtual {
my $stack = shift;
# We really only need one value, but we want this cached since most methods
# call it at least via ns_e_index()
# We really only need one value, but we want this cached since most
# methods call it at least via ns_e_index()
my $v_test = $stack->s5ChasComRelPos() || {};
return $v_test->{'8.1.0'};
}
@@ -172,10 +179,12 @@ sub ns_e_index {
my %ns_e_index;
foreach my $iid ( keys %$ns_e_idx ) {
# Skip backplane, power, sensor, fan, clock - these aren't in the
# newer devices ENTITY-MIB we're emulating
next if ( $iid =~ /^[24567]/ );
next if ( ($is_virtual) and ( $iid =~ /^8/ or $iid eq '1.0.0' ) );
# Format into consistent integer format so that numeric sorting works
my $index = join( '', map { sprintf "%02d", $_ } split /\./, $iid );
$ns_e_index{$iid} = $index;
@@ -501,7 +510,8 @@ sub ns_e_parent {
else {
my $parent = $iid;
$parent =~ s/\.\d+$/\.00/;
$parent = join('',map { sprintf "%02d",$_ } split /\./, $parent);
$parent = join( '', map { sprintf "%02d", $_ } split /\./,
$parent );
$ns_e_parent{$iid} = $parent;
}
}
@@ -712,8 +722,8 @@ server
=item $stack->ns_com_grp_idx()
Returns reference to hash. Key: Table entry, Value: Index of the chassis level
group which contains this component.
Returns reference to hash. Key: Table entry, Value: Index of the chassis
level group which contains this component.
(C<s5ChasComGrpIndx>)

View File

@@ -43,14 +43,15 @@ $VERSION = '1.09';
%MIBS = ( 'POWER-ETHERNET-MIB' => 'pethPsePortDetectionStatus' );
%GLOBALS = (
);
%GLOBALS = ();
%FUNCS = (
# parts of pethPsePortTable
'peth_port_admin' => 'pethPsePortAdminEnable',
'peth_port_status' => 'pethPsePortDetectionStatus',
'peth_port_class' => 'pethPsePortPowerClassifications',
# pethMainPseTable
'peth_power_watts' => 'pethMainPsePower',
'peth_power_status' => 'pethMainPseOperStatus',
@@ -58,8 +59,7 @@ $VERSION = '1.09';
'peth_power_threshold' => 'pethMainPseUsageThreshold',
);
%MUNGE = (
);
%MUNGE = ();
# POWER-ETHERNET-MIB doesn't define a mapping of its
# "module"/"port" index to ifIndex. Different vendors
@@ -78,6 +78,7 @@ sub peth_port_ifindex {
foreach my $i ( keys %$peth_port_status ) {
my ( $module, $port ) = split( /\./, $i );
if ( $module != 1 ) {
# This heuristic won't work, so say that we got nothing.
# If you have this case, you have to write a device-specific
# version of this function.
@@ -122,7 +123,8 @@ F<POWER-ETHERNET-MIB> is used to describe PoE (IEEE 802.3af)
Create or use a device subclass that inherit this class. Do not use directly.
For debugging purposes you can call this class directly as you would SNMP::Info
For debugging purposes you can call this class directly as you would
SNMP::Info
my $poe = new SNMP::Info::PowerEthernet (...);

View File

@@ -41,9 +41,7 @@ use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '1.09';
%MIBS = (
'RAPID-CITY' => 'rapidCity',
);
%MIBS = ( 'RAPID-CITY' => 'rapidCity', );
%GLOBALS = (
'rc_serial' => 'rcChasSerialNumber',
@@ -60,6 +58,7 @@ $VERSION = '1.09';
);
%FUNCS = (
# From RAPID-CITY::rcPortTable
'rc_index' => 'rcPortIndex',
'rc_duplex' => 'rcPortOperDuplex',
@@ -67,6 +66,7 @@ $VERSION = '1.09';
'rc_speed_admin' => 'rcPortAdminSpeed',
'rc_auto' => 'rcPortAutoNegotiate',
'rc_alias' => 'rcPortName',
# From RAPID-CITY::rc2kCpuEthernetPortTable
'rc_cpu_ifindex' => 'rc2kCpuEthernetPortIfIndex',
'rc_cpu_admin' => 'rc2kCpuEthernetPortAdminStatus',
@@ -79,6 +79,7 @@ $VERSION = '1.09';
'rc_cpu_speed_admin' => 'rc2kCpuEthernetPortAdminSpeed',
'rc_cpu_speed_oper' => 'rc2kCpuEthernetPortOperSpeed',
'rc_cpu_mac' => 'rc2kCpuEthernetPortMgmtMacAddr',
# From RAPID-CITY::rcVlanPortTable
'rc_i_vlan_if' => 'rcVlanPortIndex',
'rc_i_vlan_num' => 'rcVlanPortNumVlanIds',
@@ -86,6 +87,7 @@ $VERSION = '1.09';
'rc_i_vlan_type' => 'rcVlanPortType',
'rc_i_vlan_pvid' => 'rcVlanPortDefaultVlanId',
'rc_i_vlan_tag' => 'rcVlanPortPerformTagging',
# From RAPID-CITY::rcVlanTable
'rc_vlan_id' => 'rcVlanId',
'v_name' => 'rcVlanName',
@@ -97,25 +99,31 @@ $VERSION = '1.09';
'rc_vlan_no_join' => 'rcVlanNotAllowToJoin',
'rc_vlan_mac' => 'rcVlanMacAddress',
'rc_vlan_rstatus' => 'rcVlanRowStatus',
# From RAPID-CITY::rcIpAddrTable
'rc_ip_index' => 'rcIpAdEntIfIndex',
'rc_ip_addr' => 'rcIpAdEntAddr',
'rc_ip_type' => 'rcIpAdEntIfType',
# From RAPID-CITY::rcChasFanTable
'rc_fan_op' => 'rcChasFanOperStatus',
# From RAPID-CITY::rcChasPowerSupplyTable
'rc_ps_op' => 'rcChasPowerSupplyOperStatus',
# From RAPID-CITY::rcChasPowerSupplyDetailTable
'rc_ps_type' => 'rcChasPowerSupplyDetailType',
'rc_ps_serial' => 'rcChasPowerSupplyDetailSerialNumber',
'rc_ps_rev' => 'rcChasPowerSupplyDetailHardwareRevision',
'rc_ps_part' => 'rcChasPowerSupplyDetailPartNumber',
'rc_ps_detail' => 'rcChasPowerSupplyDetailDescription',
# From RAPID-CITY::rcCardTable
'rc_c_type' => 'rcCardType',
'rc_c_serial' => 'rcCardSerialNumber',
'rc_c_rev' => 'rcCardHardwareRevision',
'rc_c_part' => 'rcCardPartNumber',
# From RAPID-CITY::rc2kCardTable
'rc2k_c_ftype' => 'rc2kCardFrontType',
'rc2k_c_fdesc' => 'rc2kCardFrontDescription',
@@ -131,6 +139,7 @@ $VERSION = '1.09';
'rc2k_c_bpart' => 'rc2kCardBackPartNumber',
'rc2k_c_bdate' => 'rc2kCardBackDateCode',
'rc2k_c_bdev' => 'rc2kCardBackDeviations',
# From RAPID-CITY::rc2kMdaCardTable
'rc2k_mda_type' => 'rc2kMdaCardType',
'rc2k_mda_desc' => 'rc2kMdaCardDescription',
@@ -320,7 +329,8 @@ sub set_i_pvid {
return unless ( $rapidcity->_validate_vlan_param( $vlan_id, $ifindex ) );
unless ( $rapidcity->set_rc_i_vlan_pvid( $vlan_id, $ifindex ) ) {
$rapidcity->error_throw("Unable to change PVID to $vlan_id on IfIndex: $ifindex");
$rapidcity->error_throw(
"Unable to change PVID to $vlan_id on IfIndex: $ifindex");
return;
}
return 1;
@@ -330,7 +340,8 @@ sub set_i_vlan {
my $rapidcity = shift;
my ( $new_vlan_id, $ifindex ) = @_;
return unless ( $rapidcity->_validate_vlan_param ($new_vlan_id, $ifindex) );
return
unless ( $rapidcity->_validate_vlan_param( $new_vlan_id, $ifindex ) );
my $vlan_p_type = $rapidcity->rc_i_vlan_type($ifindex);
unless ( $vlan_p_type->{$ifindex} =~ /access/ ) {
@@ -342,9 +353,12 @@ sub set_i_vlan {
# Store current untagged VLAN to remove it from the port list later
my $old_vlan_id = $i_pvid->{$ifindex};
# Check that haven't been given the same VLAN we are currently using
if ( $old_vlan_id eq $new_vlan_id ) {
$rapidcity->error_throw("Current PVID: $old_vlan_id and New VLAN: $new_vlan_id the same, no change.");
$rapidcity->error_throw(
"Current PVID: $old_vlan_id and New VLAN: $new_vlan_id the same, no change."
);
return;
}
@@ -353,32 +367,38 @@ sub set_i_vlan {
# Check if port in forbidden list for the VLAN, haven't seen this used,
# but we'll check anyway
return unless
($rapidcity->_check_forbidden_ports($new_vlan_id, $ifindex));
return
unless (
$rapidcity->_check_forbidden_ports( $new_vlan_id, $ifindex ) );
my $old_vlan_members = $rapidcity->rc_vlan_members($old_vlan_id);
my $new_vlan_members = $rapidcity->rc_vlan_members($new_vlan_id);
print "Modifying egress list for VLAN: $new_vlan_id \n" if $rapidcity->debug();
my $new_egress = $rapidcity->modify_port_list($new_vlan_members->{$new_vlan_id},$ifindex,'1');
print "Modifying egress list for VLAN: $new_vlan_id \n"
if $rapidcity->debug();
my $new_egress
= $rapidcity->modify_port_list( $new_vlan_members->{$new_vlan_id},
$ifindex, '1' );
print "Modifying egress list for VLAN: $old_vlan_id \n" if $rapidcity->debug();
my $old_egress = $rapidcity->modify_port_list($old_vlan_members->{$old_vlan_id},$ifindex,'0');
print "Modifying egress list for VLAN: $old_vlan_id \n"
if $rapidcity->debug();
my $old_egress
= $rapidcity->modify_port_list( $old_vlan_members->{$old_vlan_id},
$ifindex, '0' );
my $vlan_set = [
[ 'rc_vlan_members', "$new_vlan_id", "$new_egress" ],
# ['rc_vlan_members',"$old_vlan_id","$old_egress"],
];
return unless
($rapidcity->set_multi($vlan_set));
return
unless ( $rapidcity->set_multi($vlan_set) );
my $vlan_set2 = [
['rc_vlan_members',"$old_vlan_id","$old_egress"],
];
my $vlan_set2 = [ [ 'rc_vlan_members', "$old_vlan_id", "$old_egress" ], ];
return unless
($rapidcity->set_multi($vlan_set2));
return
unless ( $rapidcity->set_multi($vlan_set2) );
# Set new untagged / native VLAN
# Some models/versions do this for us also, so check to see if we need to set
@@ -390,7 +410,9 @@ sub set_i_vlan {
return unless ( $rapidcity->set_i_pvid( $new_vlan_id, $ifindex ) );
}
print "Successfully changed VLAN: $old_vlan_id to $new_vlan_id on IfIndex: $ifindex\n" if $rapidcity->debug();
print
"Successfully changed VLAN: $old_vlan_id to $new_vlan_id on IfIndex: $ifindex\n"
if $rapidcity->debug();
return 1;
}
@@ -400,22 +422,31 @@ sub set_add_i_vlan_tagged {
return unless ( $rapidcity->_validate_vlan_param( $vlan_id, $ifindex ) );
print "Adding VLAN: $vlan_id to IfIndex: $ifindex\n" if $rapidcity->debug();
print "Adding VLAN: $vlan_id to IfIndex: $ifindex\n"
if $rapidcity->debug();
# Check if port in forbidden list for the VLAN, haven't seen this used, but we'll check anyway
return unless ($rapidcity->_check_forbidden_ports($vlan_id, $ifindex));
return
unless ( $rapidcity->_check_forbidden_ports( $vlan_id, $ifindex ) );
my $iv_members = $rapidcity->rc_vlan_members($vlan_id);
print "Modifying egress list for VLAN: $vlan_id \n" if $rapidcity->debug();
my $new_egress = $rapidcity->modify_port_list($iv_members->{$vlan_id},$ifindex,'1');
print "Modifying egress list for VLAN: $vlan_id \n"
if $rapidcity->debug();
my $new_egress
= $rapidcity->modify_port_list( $iv_members->{$vlan_id}, $ifindex,
'1' );
unless ( $rapidcity->set_qb_v_egress( $new_egress, $vlan_id ) ) {
print "Error: Unable to add VLAN: $vlan_id to Index: $ifindex egress list.\n" if $rapidcity->debug();
print
"Error: Unable to add VLAN: $vlan_id to Index: $ifindex egress list.\n"
if $rapidcity->debug();
return;
}
print "Successfully added IfIndex: $ifindex to VLAN: $vlan_id egress list\n" if $rapidcity->debug();
print
"Successfully added IfIndex: $ifindex to VLAN: $vlan_id egress list\n"
if $rapidcity->debug();
return 1;
}
@@ -425,23 +456,30 @@ sub set_remove_i_vlan_tagged {
return unless ( $rapidcity->_validate_vlan_param( $vlan_id, $ifindex ) );
print "Removing VLAN: $vlan_id from IfIndex: $ifindex\n" if $rapidcity->debug();
print "Removing VLAN: $vlan_id from IfIndex: $ifindex\n"
if $rapidcity->debug();
my $iv_members = $rapidcity->rc_vlan_members($vlan_id);
print "Modifying egress list for VLAN: $vlan_id \n" if $rapidcity->debug();
my $new_egress = $rapidcity->modify_port_list($iv_members->{$vlan_id},$ifindex,'0');
print "Modifying egress list for VLAN: $vlan_id \n"
if $rapidcity->debug();
my $new_egress
= $rapidcity->modify_port_list( $iv_members->{$vlan_id}, $ifindex,
'0' );
unless ( $rapidcity->set_qb_v_egress( $new_egress, $vlan_id ) ) {
print "Error: Unable to add VLAN: $vlan_id to Index: $ifindex egress list.\n" if $rapidcity->debug();
print
"Error: Unable to add VLAN: $vlan_id to Index: $ifindex egress list.\n"
if $rapidcity->debug();
return;
}
print "Successfully removed IfIndex: $ifindex from VLAN: $vlan_id egress list\n" if $rapidcity->debug();
print
"Successfully removed IfIndex: $ifindex from VLAN: $vlan_id egress list\n"
if $rapidcity->debug();
return 1;
}
sub set_create_vlan {
my $rapidcity = shift;
my ( $name, $vlan_id ) = @_;
@@ -453,7 +491,8 @@ sub set_create_vlan {
];
unless ( $rapidcity->set_multi($vlan_set) ) {
print "Error: Unable to create VLAN: $vlan_id\n" if $rapidcity->debug();
print "Error: Unable to create VLAN: $vlan_id\n"
if $rapidcity->debug();
return;
}
@@ -481,10 +520,15 @@ sub _check_forbidden_ports {
my $iv_forbidden = $rapidcity->rc_vlan_no_join($vlan_id);
my @forbidden_ports = split(//, unpack("B*", $iv_forbidden->{$vlan_id}));
my @forbidden_ports
= split( //, unpack( "B*", $iv_forbidden->{$vlan_id} ) );
print "Forbidden ports: @forbidden_ports\n" if $rapidcity->debug();
if ( defined($forbidden_ports[$ifindex]) and ($forbidden_ports[$ifindex] eq "1")) {
$rapidcity->error_throw("IfIndex: $ifindex in forbidden list for VLAN: $vlan_id unable to add");
if ( defined( $forbidden_ports[$ifindex] )
and ( $forbidden_ports[$ifindex] eq "1" ) )
{
$rapidcity->error_throw(
"IfIndex: $ifindex in forbidden list for VLAN: $vlan_id unable to add"
);
return;
}
return 1;
@@ -495,7 +539,11 @@ sub _validate_vlan_param {
my ( $vlan_id, $ifindex ) = @_;
# VID and ifIndex should both be numeric
unless ( defined $vlan_id and defined $ifindex and $vlan_id =~ /^\d+$/ and $ifindex =~ /^\d+$/ ) {
unless (defined $vlan_id
and defined $ifindex
and $vlan_id =~ /^\d+$/
and $ifindex =~ /^\d+$/ )
{
$rapidcity->error_throw("Invalid parameter");
return;
}
@@ -510,7 +558,8 @@ sub _validate_vlan_param {
#Check that VLAN exists on device
unless ( $rapidcity->rc_vlan_id($vlan_id) ) {
$rapidcity->error_throw("VLAN $vlan_id does not exist or is not operational");
$rapidcity->error_throw(
"VLAN $vlan_id does not exist or is not operational");
return;
}
@@ -1002,16 +1051,17 @@ Returns VLAN IDs
=head1 SET METHODS
These are methods that provide SNMP set functionality for overridden methods or
provide a simpler interface to complex set operations. See
L<SNMP::Info/"SETTING DATA VIA SNMP"> for general information on set operations.
These are methods that provide SNMP set functionality for overridden methods
or provide a simpler interface to complex set operations. See
L<SNMP::Info/"SETTING DATA VIA SNMP"> for general information on set
operations.
=over
=item $rapidcity->set_i_speed_admin(speed, ifIndex)
Sets port speed, must be supplied with speed and port C<ifIndex>. Speed choices
are 'auto', '10', '100', '1000'.
Sets port speed, must be supplied with speed and port C<ifIndex>. Speed
choices are 'auto', '10', '100', '1000'.
Example:
my %if_map = reverse %{$rapidcity->interfaces()};
@@ -1031,9 +1081,9 @@ choices are 'auto', 'half', 'full'.
=item $rapidcity->set_i_vlan(vlan, ifIndex)
Changes an access (untagged) port VLAN, must be supplied with the numeric
VLAN ID and port C<ifIndex>. This method will modify the port's VLAN membership
and PVID (default VLAN). This method should only be used on end station
(non-trunk) ports.
VLAN ID and port C<ifIndex>. This method will modify the port's VLAN
membership and PVID (default VLAN). This method should only be used on end
station (non-trunk) ports.
Example:
my %if_map = reverse %{$rapidcity->interfaces()};
@@ -1053,8 +1103,8 @@ port C<ifIndex>. This method only changes the PVID, to modify an access
=item $rapidcity->set_add_i_vlan_tagged(vlan, ifIndex)
Adds the port to the egress list of the VLAN, must be supplied with the numeric
VLAN ID and port C<ifIndex>.
Adds the port to the egress list of the VLAN, must be supplied with the
numeric VLAN ID and port C<ifIndex>.
Example:
my %if_map = reverse %{$rapidcity->interfaces()};

View File

@@ -52,6 +52,7 @@ $VERSION = '1.09';
);
%FUNCS = (
# From S5-ETH-MULTISEG-TOPOLOGY-MIB::TopNmmTable
'sonmp_topo_slot' => 's5EnMsTopNmmSlot',
'sonmp_topo_port' => 's5EnMsTopNmmPort',
@@ -62,9 +63,7 @@ $VERSION = '1.09';
'sonmp_topo_localseg' => 's5EnMsTopNmmLocalSeg',
);
%MUNGE = (
'sonmp_topo_mac' => \&SNMP::Info::munge_mac
);
%MUNGE = ( 'sonmp_topo_mac' => \&SNMP::Info::munge_mac );
sub index_factor {
return 32;
@@ -105,16 +104,19 @@ sub c_if {
my $comidx = $slot;
if ( !( $comidx % 5 ) ) {
$slot = ( $slot / 5 );
} elsif ($comidx =~ /[16]$/) {
}
elsif ( $comidx =~ /[16]$/ ) {
$slot = int( $slot / 5 );
$port = 25;
} elsif ($comidx =~ /[27]$/) {
}
elsif ( $comidx =~ /[27]$/ ) {
$slot = int( $slot / 5 );
$port = 26;
}
}
my $index = (($slot-$slot_offset)*$index_factor) + ($port-$port_offset);
my $index = ( ( $slot - $slot_offset ) * $index_factor )
+ ( $port - $port_offset );
$c_if{$entry} = $index;
}
@@ -156,15 +158,18 @@ sub c_port {
my $seg = $sonmp_topo_seg->{$entry};
my $platform = $sonmp_topo_platform->{$entry};
# AP-222x Series does not adhere to port numbering
if ( $platform =~ /AccessPoint/i ) {
$c_port{$entry} = 'dp0';
}
# BayHubs send the lower three bytes of the MAC not the slot/port
elsif ( $seg > 4000 ) {
$c_port{$entry} = 'unknown';
}
else {
# Segment id is (256 * remote slot_num) + (remote_port)
my $remote_port = $seg % 256;
my $remote_slot = int( $seg / 256 );
@@ -207,6 +212,7 @@ sub mac {
my $mac = $sonmp_topo_mac->{$entry};
return $mac;
}
# Topology turned off, not supported.
return;
}
@@ -259,11 +265,13 @@ interface to the SynOptics Network Management Protocol (SONMP) information
through SNMP.
SONMP is a Layer 2 protocol that supplies topology information of devices that
also speak SONMP, mostly switches and hubs. SONMP is implemented in SynOptics,
Bay, and Nortel devices. SONMP has been rebranded by Bay then Nortel and is
know by several different names, most recently Nortel Discovery Protocol (NDP).
also speak SONMP, mostly switches and hubs. SONMP is implemented in
SynOptics, Bay, and Nortel devices. SONMP has been rebranded by Bay then
Nortel and is know by several different names, most recently Nortel
Discovery Protocol (NDP).
Create or use a device subclass that inherits this class. Do not use directly.
Create or use a device subclass that inherits this class. Do not use
directly.
Each device implements a subset of the global and cache entries.
Check the return value to see if that data is held by the device.
@@ -340,7 +348,8 @@ Returns reference to hash. Key: Table entry, Value:slot number
=item $sonmp->sonmp_topo_port()
Returns reference to hash. Key: Table entry, Value:Port Number (interface iid)
Returns reference to hash. Key: Table entry, Value:Port Number
(interface iid)
(C<s5EnMsTopNmmPort>)
@@ -370,8 +379,8 @@ Returns reference to hash. Key: Table entry, Value:Remote Device Type
=item $sonmp->sonmp_topo_localseg
Returns reference to hash. Key: Table entry, Value: Boolean, if bay_topo_seg()
is local.
Returns reference to hash. Key: Table entry, Value: Boolean, if
bay_topo_seg() is local.
(C<s5EnMsTopNmmLocalSeg>)
@@ -391,8 +400,8 @@ Returns reference to hash. Key: IID, Value: Local port (interfaces)
Returns reference to hash. Key: IID, Value: Remote IP address
If multiple entries exist with the same local port, c_if(), with different IPv4
addresses, c_ip(), there is either a non SONMP device in between two or
If multiple entries exist with the same local port, c_if(), with different
IPv4 addresses, c_ip(), there is either a non SONMP device in between two or
more devices or multiple devices which are not directly connected.
Use the data from the Layer2 Topology Table below to dig deeper.