and more whitespace cleanup

This commit is contained in:
inphobia
2019-01-19 05:02:41 +01:00
parent 93787c4c45
commit ca48defd24
13 changed files with 75 additions and 75 deletions

View File

@@ -224,14 +224,14 @@ Max Baker
=head1 SYNOPSIS =head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you. # Let SNMP::Info determine the correct subclass for you.
my $aironet = new SNMP::Info( my $aironet = new SNMP::Info(
AutoSpecify => 1, AutoSpecify => 1,
Debug => 1, Debug => 1,
DestHost => 'myswitch', DestHost => 'myswitch',
Community => 'public', Community => 'public',
Version => 2 Version => 2
) )
or die "Can't connect to DestHost.\n"; or die "Can't connect to DestHost.\n";
my $class = $aironet->class(); my $class = $aironet->class();
@@ -257,7 +257,7 @@ This class is for devices running Cisco IOS software (newer)
=back =back
For speed or debugging purposes you can call the subclass directly, but not For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above. after determining a more specific class using the method above.
my $aironet = new SNMP::Info::Layer3::Aironet(...); my $aironet = new SNMP::Info::Layer3::Aironet(...);
@@ -280,7 +280,7 @@ after determining a more specific class using the method above.
=back =back
These MIBs are now included in the v2.tar.gz archive available from These MIBs are now included in the v2.tar.gz archive available from
ftp.cisco.com. Make sure you have a current version. ftp.cisco.com. Make sure you have a current version.
=head1 GLOBALS =head1 GLOBALS
@@ -296,7 +296,7 @@ C<awcEtherDuplex.0>
=item $aironet->mac() =item $aironet->mac()
Gives the MAC Address of the wireless side Gives the MAC Address of the wireless side
C<dot11StationID.2> C<dot11StationID.2>

View File

@@ -306,7 +306,7 @@ Bill Fenner
=head1 SYNOPSIS =head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you. # Let SNMP::Info determine the correct subclass for you.
my $alu = new SNMP::Info( my $alu = new SNMP::Info(
AutoSpecify => 1, AutoSpecify => 1,
Debug => 1, Debug => 1,
@@ -314,7 +314,7 @@ Bill Fenner
DestHost => 'myswitch', DestHost => 'myswitch',
Community => 'public', Community => 'public',
Version => 2 Version => 2
) )
or die "Can't connect to DestHost.\n"; or die "Can't connect to DestHost.\n";
my $class = $alu->class(); my $class = $alu->class();

View File

@@ -163,14 +163,14 @@ sub ps1_status {
my $alteon = shift; my $alteon = shift;
my $old_ps = $alteon->old_ps1_stat(); my $old_ps = $alteon->old_ps1_stat();
my $new_ps = $alteon->new_ps_stat(); my $new_ps = $alteon->new_ps_stat();
return $old_ps if $old_ps; return $old_ps if $old_ps;
if ($new_ps) { if ($new_ps) {
return 'ok' if ($new_ps eq 'singlePowerSupplyOk'); return 'ok' if ($new_ps eq 'singlePowerSupplyOk');
return 'failed' if ($new_ps eq 'firstPowerSupplyFailed'); return 'failed' if ($new_ps eq 'firstPowerSupplyFailed');
} }
return; return;
} }
@@ -178,9 +178,9 @@ sub ps2_status {
my $alteon = shift; my $alteon = shift;
my $old_ps = $alteon->old_ps2_stat(); my $old_ps = $alteon->old_ps2_stat();
my $new_ps = $alteon->new_ps_stat(); my $new_ps = $alteon->new_ps_stat();
return $old_ps if $old_ps; return $old_ps if $old_ps;
if ($new_ps) { if ($new_ps) {
return 'ok' if ($new_ps eq 'doublePowerSupplyOk'); return 'ok' if ($new_ps eq 'doublePowerSupplyOk');
return 'failed' if ($new_ps eq 'secondPowerSupplyFailed'); return 'failed' if ($new_ps eq 'secondPowerSupplyFailed');
@@ -242,19 +242,19 @@ sub i_duplex {
sub i_duplex_admin { sub i_duplex_admin {
my $alteon = shift; my $alteon = shift;
my $ag_pref my $ag_pref
= $alteon->new_ag_p_cfg_pref() = $alteon->new_ag_p_cfg_pref()
|| $alteon->old_ag_p_cfg_pref() || $alteon->old_ag_p_cfg_pref()
|| {}; || {};
my $ag_fe_auto my $ag_fe_auto
= $alteon->new_ag_p_cfg_fe_auto() = $alteon->new_ag_p_cfg_fe_auto()
|| $alteon->old_ag_p_cfg_fe_auto() || $alteon->old_ag_p_cfg_fe_auto()
|| {}; || {};
my $ag_fe_mode my $ag_fe_mode
= $alteon->new_ag_p_cfg_fe_mode() = $alteon->new_ag_p_cfg_fe_mode()
|| $alteon->old_ag_p_cfg_fe_mode() || $alteon->old_ag_p_cfg_fe_mode()
|| {}; || {};
my $ag_ge_auto my $ag_ge_auto
= $alteon->new_ag_p_cfg_ge_auto() = $alteon->new_ag_p_cfg_ge_auto()
|| $alteon->old_ag_p_cfg_ge_auto() || $alteon->old_ag_p_cfg_ge_auto()
|| {}; || {};
@@ -395,7 +395,7 @@ sub i_vlan_membership_untagged {
my $vlan = $vlans->{$port}; my $vlan = $vlans->{$port};
push( @{ $i_vlan_membership->{$port} }, $vlan ); push( @{ $i_vlan_membership->{$port} }, $vlan );
} }
return $i_vlan_membership; return $i_vlan_membership;
} }
@@ -432,14 +432,14 @@ Eric Miller
=head1 SYNOPSIS =head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you. # Let SNMP::Info determine the correct subclass for you.
my $alteon = new SNMP::Info( my $alteon = new SNMP::Info(
AutoSpecify => 1, AutoSpecify => 1,
Debug => 1, Debug => 1,
DestHost => 'myswitch', DestHost => 'myswitch',
Community => 'public', Community => 'public',
Version => 2 Version => 2
) )
or die "Can't connect to DestHost.\n"; or die "Can't connect to DestHost.\n";
my $class = $alteon->class(); my $class = $alteon->class();
@@ -451,7 +451,7 @@ Abstraction subclass for Radware Alteon Series ADC switches and
Nortel BladeCenter Layer2-3 GbE Switch Modules. Nortel BladeCenter Layer2-3 GbE Switch Modules.
For speed or debugging purposes you can call the subclass directly, but not For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above. after determining a more specific class using the method above.
my $alteon = new SNMP::Info::Layer3::AlteonAD(...); my $alteon = new SNMP::Info::Layer3::AlteonAD(...);
@@ -581,7 +581,7 @@ IDs. These are the VLANs which are members of the egress list for the port.
Example: Example:
my $interfaces = $alteon->interfaces(); my $interfaces = $alteon->interfaces();
my $vlans = $alteon->i_vlan_membership(); my $vlans = $alteon->i_vlan_membership();
foreach my $iid (sort keys %$interfaces) { foreach my $iid (sort keys %$interfaces) {
my $port = $interfaces->{$iid}; my $port = $interfaces->{$iid};
my $vlan = join(',', sort(@{$vlans->{$iid}})); my $vlan = join(',', sort(@{$vlans->{$iid}}));

View File

@@ -4,20 +4,20 @@
# Copyright (c) 2008 Jeroen van Ingen Schenau # Copyright (c) 2008 Jeroen van Ingen Schenau
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met: # modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice, # * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer. # this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright # * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the # notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution. # documentation and/or other materials provided with the distribution.
# * Neither the name of the University of California, Santa Cruz nor the # * Neither the name of the University of California, Santa Cruz nor the
# names of its contributors may be used to endorse or promote products # names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission. # derived from this software without specific prior written permission.
# #
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
@@ -37,7 +37,7 @@ use SNMP::Info::Layer3;
@SNMP::Info::Layer3::Altiga::ISA = qw/SNMP::Info::Layer3 Exporter/; @SNMP::Info::Layer3::Altiga::ISA = qw/SNMP::Info::Layer3 Exporter/;
@SNMP::Info::Layer3::Altiga::EXPORT_OK = qw//; @SNMP::Info::Layer3::Altiga::EXPORT_OK = qw//;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE
$int_include_vpn $fake_idx $type_class/; $int_include_vpn $fake_idx $type_class/;
$VERSION = '3.64'; $VERSION = '3.64';
@@ -46,7 +46,7 @@ $VERSION = '3.64';
%SNMP::Info::Layer3::MIBS, %SNMP::Info::Layer3::MIBS,
'ALTIGA-VERSION-STATS-MIB' => 'alVersionString', 'ALTIGA-VERSION-STATS-MIB' => 'alVersionString',
'ALTIGA-SESSION-STATS-MIB' => 'alActiveSessionCount', 'ALTIGA-SESSION-STATS-MIB' => 'alActiveSessionCount',
'ALTIGA-HARDWARE-STATS-MIB' => 'alHardwarePs1Type', 'ALTIGA-HARDWARE-STATS-MIB' => 'alHardwarePs1Type',
); );
%GLOBALS = ( %GLOBALS = (
@@ -70,7 +70,7 @@ $VERSION = '3.64';
'fan1_alarm' => 'alHardwareFan1RpmAlarm', 'fan1_alarm' => 'alHardwareFan1RpmAlarm',
'fan2_alarm' => 'alHardwareFan2RpmAlarm', 'fan2_alarm' => 'alHardwareFan2RpmAlarm',
'fan3_alarm' => 'alHardwareFan3RpmAlarm', 'fan3_alarm' => 'alHardwareFan3RpmAlarm',
); );
%FUNCS = ( %FUNCS = (
@@ -189,7 +189,7 @@ sub interfaces {
if ($int_include_vpn) { if ($int_include_vpn) {
my $tun_type = $altiga->vpn_sess_protocol(); my $tun_type = $altiga->vpn_sess_protocol();
my $peer = $altiga->vpn_sess_peer_ip(); my $peer = $altiga->vpn_sess_peer_ip();
my $remote = $altiga->vpn_sess_rem_ip(); my $remote = $altiga->vpn_sess_rem_ip();
my $group = $altiga->vpn_sess_gid(); my $group = $altiga->vpn_sess_gid();
foreach my $tunnel (keys %$tun_type) { foreach my $tunnel (keys %$tun_type) {
if ($type_class->{$tun_type->{$tunnel}} eq 1) { if ($type_class->{$tun_type->{$tunnel}} eq 1) {
@@ -197,7 +197,7 @@ sub interfaces {
} }
} }
} }
return \%interfaces; return \%interfaces;
} }
@@ -275,14 +275,14 @@ Jeroen van Ingen Schenau
=head1 SYNOPSIS =head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you. # Let SNMP::Info determine the correct subclass for you.
my $altiga = new SNMP::Info( my $altiga = new SNMP::Info(
AutoSpecify => 1, AutoSpecify => 1,
Debug => 1, Debug => 1,
DestHost => 'my_vpn_host', DestHost => 'my_vpn_host',
Community => 'public', Community => 'public',
Version => 1 Version => 1
) )
or die "Can't connect to DestHost.\n"; or die "Can't connect to DestHost.\n";
my $class = $altiga->class(); my $class = $altiga->class();
@@ -366,7 +366,7 @@ to a hash.
=item $altiga->interfaces() =item $altiga->interfaces()
This method overrides the interfaces() method inherited from SNMP::Info. This method overrides the interfaces() method inherited from SNMP::Info.
It provides a mapping between the Interface Table Index (iid) and the physical It provides a mapping between the Interface Table Index (iid) and the physical
port name, adding a port number to the port name to prevent duplicate names. port name, adding a port number to the port name to prevent duplicate names.
=item $altiga->i_lastchange() =item $altiga->i_lastchange()

View File

@@ -146,7 +146,7 @@ Bill Fenner
=head1 SYNOPSIS =head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you. # Let SNMP::Info determine the correct subclass for you.
my $arista = new SNMP::Info( my $arista = new SNMP::Info(
AutoSpecify => 1, AutoSpecify => 1,
Debug => 1, Debug => 1,
@@ -154,7 +154,7 @@ Bill Fenner
DestHost => 'myswitch', DestHost => 'myswitch',
Community => 'public', Community => 'public',
Version => 2 Version => 2
) )
or die "Can't connect to DestHost.\n"; or die "Can't connect to DestHost.\n";
my $class = $arista->class(); my $class = $arista->class();

View File

@@ -1403,7 +1403,7 @@ Eric Miller
DestHost => 'myswitch', DestHost => 'myswitch',
Community => 'public', Community => 'public',
Version => 2 Version => 2
) )
or die "Can't connect to DestHost.\n"; or die "Can't connect to DestHost.\n";
@@ -1422,7 +1422,7 @@ end station MAC addresses collection and correlation to the thin access point
the end station is using for communication. the end station is using for communication.
For speed or debugging purposes you can call the subclass directly, but not For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above. after determining a more specific class using the method above.
my $aruba = new SNMP::Info::Layer3::Aruba(...); my $aruba = new SNMP::Info::Layer3::Aruba(...);
@@ -1466,7 +1466,7 @@ These are methods that return scalar value from SNMP
=item $aruba->model() =item $aruba->model()
Returns model type. Cross references $aruba->id() with product IDs in the Returns model type. Cross references $aruba->id() with product IDs in the
Aruba MIB. Aruba MIB.
=item $aruba->vendor() =item $aruba->vendor()
@@ -1540,7 +1540,7 @@ false.
=item $aruba->i_ssidmac() =item $aruba->i_ssidmac()
With the same keys as i_ssidlist, returns the Basic service set With the same keys as i_ssidlist, returns the Basic service set
identification (BSSID), MAC address, the AP is using for the SSID. identification (BSSID), MAC address, the AP is using for the SSID.
=item $aruba->cd11_mac() =item $aruba->cd11_mac()
@@ -1578,7 +1578,7 @@ Total packets transmitted by the wireless client.
=item $aruba->i_index() =item $aruba->i_index()
Returns reference to map of IIDs to Interface index. Returns reference to map of IIDs to Interface index.
Extends C<ifIndex> to support APs as device interfaces. Extends C<ifIndex> to support APs as device interfaces.
@@ -1614,7 +1614,7 @@ interfaces.
=item $aruba->i_up_admin() =item $aruba->i_up_admin()
Returns reference to map of IIDs to administrative status of the interface. Returns reference to map of IIDs to administrative status of the interface.
Returns C<ifAdminStatus> for Ethernet interfaces and C<wlanAPStatus> Returns C<ifAdminStatus> for Ethernet interfaces and C<wlanAPStatus>
for AP interfaces. for AP interfaces.
=item $aruba->i_mac() =item $aruba->i_mac()

View File

@@ -1389,14 +1389,14 @@ Eric Miller
=head1 SYNOPSIS =head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you. # Let SNMP::Info determine the correct subclass for you.
my $bayrs = new SNMP::Info( my $bayrs = new SNMP::Info(
AutoSpecify => 1, AutoSpecify => 1,
Debug => 1, Debug => 1,
DestHost => 'myswitch', DestHost => 'myswitch',
Community => 'public', Community => 'public',
Version => 2 Version => 2
) )
or die "Can't connect to DestHost.\n"; or die "Can't connect to DestHost.\n";
my $class = $bayrs->class(); my $class = $bayrs->class();
@@ -1404,10 +1404,10 @@ Eric Miller
=head1 DESCRIPTION =head1 DESCRIPTION
Abstraction subclass for routers running Avaya/Nortel BayRS. Abstraction subclass for routers running Avaya/Nortel BayRS.
For speed or debugging purposes you can call the subclass directly, but not For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above. after determining a more specific class using the method above.
my $bayrs = new SNMP::Info::Layer3::BayRS(...); my $bayrs = new SNMP::Info::Layer3::BayRS(...);
@@ -1458,7 +1458,7 @@ These are methods that return scalar value from SNMP
Returns the model of the BayRS router. Will translate between the MIB model Returns the model of the BayRS router. Will translate between the MIB model
and the common model with this map : and the common model with this map :
C<%MODEL_MAP = ( C<%MODEL_MAP = (
'acefn' => 'FN', 'acefn' => 'FN',
'aceln' => 'LN', 'aceln' => 'LN',
'acecn' => 'CN', 'acecn' => 'CN',
@@ -1529,8 +1529,8 @@ passed but the entire table will be returned.
Returns reference to the map between IID and physical Port. Returns reference to the map between IID and physical Port.
The physical port name is stripped to letter and numbers to signify The physical port name is stripped to letter and numbers to signify
port type and slot port (S11) if the default platform naming was port type and slot port (S11) if the default platform naming was
maintained. Otherwise the port is the interface description. maintained. Otherwise the port is the interface description.
=item $bayrs->i_name() =item $bayrs->i_name()
@@ -1540,7 +1540,7 @@ interfaces.
=item $bayrs->i_duplex() =item $bayrs->i_duplex()
Returns reference to hash. Maps port operational duplexes to IIDs for Returns reference to hash. Maps port operational duplexes to IIDs for
Ethernet interfaces. Ethernet interfaces.
=item $bayrs->i_duplex_admin() =item $bayrs->i_duplex_admin()

View File

@@ -206,7 +206,7 @@ Max Baker
=head1 SYNOPSIS =head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you. # Let SNMP::Info determine the correct subclass for you.
my $c3550 = new SNMP::Info( my $c3550 = new SNMP::Info(
AutoSpecify => 1, AutoSpecify => 1,
Debug => 1, Debug => 1,
@@ -214,7 +214,7 @@ Max Baker
DestHost => 'myswitch', DestHost => 'myswitch',
Community => 'public', Community => 'public',
Version => 2 Version => 2
) )
or die "Can't connect to DestHost.\n"; or die "Can't connect to DestHost.\n";
my $class = $c3550->class(); my $class = $c3550->class();
@@ -222,14 +222,14 @@ Max Baker
=head1 DESCRIPTION =head1 DESCRIPTION
Abstraction subclass for Cisco Catalyst 3550 Layer 2/3 Switches. Abstraction subclass for Cisco Catalyst 3550 Layer 2/3 Switches.
These devices run IOS but have some of the same characteristics as the These devices run IOS but have some of the same characteristics as the
Catalyst WS-C family (5xxx,6xxx). For example, forwarding tables are held in Catalyst WS-C family (5xxx,6xxx). For example, forwarding tables are held in
VLANs, and extended interface information is gleaned from F<CISCO-SWITCH-MIB>. 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 For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above. after determining a more specific class using the method above.
my $c3550 = new SNMP::Info::Layer3::C3550(...); my $c3550 = new SNMP::Info::Layer3::C3550(...);
@@ -327,7 +327,7 @@ Crosses $c3550->p_port() with $c3550->p_duplex() to utilize port C<ifIndex>.
Example: Example:
my %if_map = reverse %{$c3550->interfaces()}; my %if_map = reverse %{$c3550->interfaces()};
$c3550->set_i_duplex_admin('auto', $if_map{'FastEthernet0/1'}) $c3550->set_i_duplex_admin('auto', $if_map{'FastEthernet0/1'})
or die "Couldn't change port duplex. ",$c3550->error(1); or die "Couldn't change port duplex. ",$c3550->error(1);
=back =back

View File

@@ -111,7 +111,7 @@ Bill Fenner
=head1 SYNOPSIS =head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you. # Let SNMP::Info determine the correct subclass for you.
my $c4000 = new SNMP::Info( my $c4000 = new SNMP::Info(
AutoSpecify => 1, AutoSpecify => 1,
Debug => 1, Debug => 1,
@@ -119,7 +119,7 @@ Bill Fenner
DestHost => 'myswitch', DestHost => 'myswitch',
Community => 'public', Community => 'public',
Version => 2 Version => 2
) )
or die "Can't connect to DestHost.\n"; or die "Can't connect to DestHost.\n";
my $class = $c4000->class(); my $class = $c4000->class();
@@ -127,10 +127,10 @@ Bill Fenner
=head1 DESCRIPTION =head1 DESCRIPTION
Abstraction subclass for Cisco Catalyst 4000 Layer 2/3 Switches. Abstraction subclass for Cisco Catalyst 4000 Layer 2/3 Switches.
For speed or debugging purposes you can call the subclass directly, but not For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above. after determining a more specific class using the method above.
my $c4000 = new SNMP::Info::Layer3::C4000(...); my $c4000 = new SNMP::Info::Layer3::C4000(...);

View File

@@ -179,7 +179,7 @@ sub set_i_duplex_admin {
my $c6500 = shift; my $c6500 = shift;
my ( $duplex, $iid ) = @_; my ( $duplex, $iid ) = @_;
if ( $c6500->is_virtual_switch() ) { if ( $c6500->is_virtual_switch() ) {
# VSS -> MAU # VSS -> MAU
@@ -252,7 +252,7 @@ Max Baker
=head1 SYNOPSIS =head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you. # Let SNMP::Info determine the correct subclass for you.
my $c6500 = new SNMP::Info( my $c6500 = new SNMP::Info(
AutoSpecify => 1, AutoSpecify => 1,
Debug => 1, Debug => 1,
@@ -260,7 +260,7 @@ Max Baker
DestHost => 'myswitch', DestHost => 'myswitch',
Community => 'public', Community => 'public',
Version => 2 Version => 2
) )
or die "Can't connect to DestHost.\n"; or die "Can't connect to DestHost.\n";
my $class = $c6500->class(); my $class = $c6500->class();
@@ -268,14 +268,14 @@ Max Baker
=head1 DESCRIPTION =head1 DESCRIPTION
Abstraction subclass for Cisco Catalyst 6500 Layer 2/3 Switches. Abstraction subclass for Cisco Catalyst 6500 Layer 2/3 Switches.
These devices run IOS but have some of the same characteristics as the 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 Catalyst WS-C family (5xxx). For example, forwarding tables are held in
VLANs, and extended interface information is gleaned from F<CISCO-SWITCH-MIB>. 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 For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above. after determining a more specific class using the method above.
my $c6500 = new SNMP::Info::Layer3::C6500(...); my $c6500 = new SNMP::Info::Layer3::C6500(...);
@@ -382,7 +382,7 @@ Crosses $c6500->p_port() with $c6500->p_duplex() to utilize port C<ifIndex>.
Example: Example:
my %if_map = reverse %{$c6500->interfaces()}; my %if_map = reverse %{$c6500->interfaces()};
$c6500->set_i_duplex_admin('auto', $if_map{'FastEthernet0/1'}) $c6500->set_i_duplex_admin('auto', $if_map{'FastEthernet0/1'})
or die "Couldn't change port duplex. ",$c6500->error(1); or die "Couldn't change port duplex. ",$c6500->error(1);
=item $c6500->set_i_speed_admin(speed, ifIndex) =item $c6500->set_i_speed_admin(speed, ifIndex)

View File

@@ -57,7 +57,7 @@ $VERSION = '3.64';
%SNMP::Info::LLDP::GLOBALS, %SNMP::Info::LLDP::GLOBALS,
'netsnmp_vers' => 'versionTag', 'netsnmp_vers' => 'versionTag',
'hrSystemUptime' => 'hrSystemUptime', 'hrSystemUptime' => 'hrSystemUptime',
); );
%FUNCS = ( %FUNCS = (
@@ -109,7 +109,7 @@ sub os_ver {
return $1 if ($extend_table->{$ex} =~ /^This is Check Point's software version (.*)$/); return $1 if ($extend_table->{$ex} =~ /^This is Check Point's software version (.*)$/);
last; last;
} }
} }
$os_ver = $1 if ( $descr =~ /^\S+\s+\S+\s+(\S+)\s+/ ); $os_ver = $1 if ( $descr =~ /^\S+\s+\S+\s+(\S+)\s+/ );
if ($vers) { if ($vers) {
@@ -184,14 +184,14 @@ Ambroise Rosset
=head1 SYNOPSIS =head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you. # Let SNMP::Info determine the correct subclass for you.
my $ckp = new SNMP::Info( my $ckp = new SNMP::Info(
AutoSpecify => 1, AutoSpecify => 1,
Debug => 1, Debug => 1,
DestHost => 'myrouter', DestHost => 'myrouter',
Community => 'public', Community => 'public',
Version => 2 Version => 2
) )
or die "Can't connect to DestHost.\n"; or die "Can't connect to DestHost.\n";
my $class = $ckp->class(); my $class = $ckp->class();

View File

@@ -189,7 +189,7 @@ Max Baker
=head1 SYNOPSIS =head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you. # Let SNMP::Info determine the correct subclass for you.
my $cisco = new SNMP::Info( my $cisco = new SNMP::Info(
AutoSpecify => 1, AutoSpecify => 1,
Debug => 1, Debug => 1,
@@ -197,7 +197,7 @@ Max Baker
DestHost => 'myswitch', DestHost => 'myswitch',
Community => 'public', Community => 'public',
Version => 2 Version => 2
) )
or die "Can't connect to DestHost.\n"; or die "Can't connect to DestHost.\n";
my $class = $cisco->class(); my $class = $cisco->class();

View File

@@ -141,7 +141,7 @@ Brian De Wolf
=head1 SYNOPSIS =head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you. # Let SNMP::Info determine the correct subclass for you.
my $fwsm = new SNMP::Info( my $fwsm = new SNMP::Info(
AutoSpecify => 1, AutoSpecify => 1,
Debug => 1, Debug => 1,
@@ -149,7 +149,7 @@ Brian De Wolf
DestHost => 'myswitch', DestHost => 'myswitch',
Community => 'public', Community => 'public',
Version => 2 Version => 2
) )
or die "Can't connect to DestHost.\n"; or die "Can't connect to DestHost.\n";
my $class = $fwsm->class(); my $class = $fwsm->class();