more whitespace cleanup
This commit is contained in:
		| @@ -45,7 +45,7 @@ $VERSION = '3.64'; | ||||
| # table by the serial() function. | ||||
| our $index = undef; | ||||
|  | ||||
| %MIBS = (  | ||||
| %MIBS = ( | ||||
|     %SNMP::Info::Layer2::MIBS, | ||||
|     %SNMP::Info::Layer3::MIBS, | ||||
| #    'ADTRAN-GENEVC-MIB'     => 'adGenEVCMIB', | ||||
| @@ -53,11 +53,11 @@ our $index = undef; | ||||
| #    'ADTRAN-GENPORT-MIB'    => 'adGenPort', | ||||
|     'ADTRAN-MIB'            => 'adtran', | ||||
|     'ADTRAN-AOSUNIT'     => 'adGenAOSUnitMib', | ||||
|  ); | ||||
| ); | ||||
|  | ||||
| %GLOBALS = ( | ||||
|     %SNMP::Info::Layer2::GLOBALS,  | ||||
|     %SNMP::Info::Layer3::GLOBALS,  | ||||
|     %SNMP::Info::Layer2::GLOBALS, | ||||
|     %SNMP::Info::Layer3::GLOBALS, | ||||
|     %SNMP::Info::LLDP::GLOBALS, | ||||
|     'serial'    => 'adProdSerialNumber', | ||||
|     'ad_mgmtevcvid' => 'adGenEVCSysMgmtEVCSTagVID', | ||||
| @@ -65,7 +65,7 @@ our $index = undef; | ||||
|  | ||||
| %FUNCS = ( %SNMP::Info::Layer2::FUNCS, | ||||
|            %SNMP::Info::Layer3::FUNCS, | ||||
|            %SNMP::Info::LLDP::FUNCS,  | ||||
|            %SNMP::Info::LLDP::FUNCS, | ||||
|            'ad_evcstag' => 'adGenEVCLookupName', | ||||
|            'ad_menport' => 'adGenMenPortRowStatus', | ||||
|            'ad_evcnamevid' => 'adGenEVCSTagVID', | ||||
| @@ -86,11 +86,11 @@ sub os { | ||||
|  | ||||
| sub layers { | ||||
|     my $adtran = shift; | ||||
|      | ||||
|  | ||||
|     my $layers = $adtran->SUPER::layers(); | ||||
|     # Some netvantas don't report L2 properly  | ||||
|     # Some netvantas don't report L2 properly | ||||
|     my $macs   = $adtran->fw_mac(); | ||||
|      | ||||
|  | ||||
|     if (keys %$macs) { | ||||
|         my $l = substr $layers, 6, 1, "1"; | ||||
|     } | ||||
| @@ -105,7 +105,7 @@ sub os_ver { | ||||
|     my $aos_ver = $adtran->adAOSDeviceVersion(); | ||||
|     return $aos_ver; | ||||
| } | ||||
| sub model {  | ||||
| sub model { | ||||
|     my $adtran = shift; | ||||
|     my $id = $adtran->id(); | ||||
|     my $mod = $adtran->adProdName() || undef; | ||||
| @@ -113,7 +113,7 @@ sub model { | ||||
|     my $model = $adtran->adAOSDeviceProductName() || undef; | ||||
|     return $model; | ||||
| } | ||||
| sub serial {  | ||||
| sub serial { | ||||
|     my $adtran = shift; | ||||
|     my $e_serial = $adtran->e_serial() || {}; | ||||
|     my $serial2 = $e_serial->{1} || undef; | ||||
| @@ -124,19 +124,19 @@ sub serial { | ||||
| sub i_name { | ||||
|     my $adtran = shift; | ||||
|     my $partial = shift; | ||||
|     my $i_name = $adtran->SUPER::i_alias() || undef;  | ||||
|     my $i_name = $adtran->SUPER::i_alias() || undef; | ||||
|     return $i_name if (defined $i_name); | ||||
|     $i_name = {}; | ||||
|     my $adname = $adtran->ad_genportcustuse() || undef; | ||||
|     if (defined $adname) {   | ||||
|         foreach my $port (keys %$adname) {  | ||||
|     if (defined $adname) { | ||||
|         foreach my $port (keys %$adname) { | ||||
|             my @split = split(/\./,$port); | ||||
|             $i_name->{@split[1]} = $adname->{$port}; | ||||
|         } | ||||
|     } | ||||
|     return $i_name; | ||||
| } | ||||
| sub i_vlan {  | ||||
| sub i_vlan { | ||||
|     my $adtran = shift; | ||||
|     my $partial = shift; | ||||
|     my $uniports = $adtran->ad_evcmapuniport() || undef; | ||||
| @@ -155,14 +155,14 @@ sub i_vlan { | ||||
|         return $i_vlan; | ||||
|     } | ||||
|     return {}; | ||||
|          | ||||
|  | ||||
| } | ||||
|          | ||||
| sub i_vlan_membership {          | ||||
|  | ||||
| sub i_vlan_membership { | ||||
|     my $adtran  = shift; | ||||
|     my $partial = shift; | ||||
|     my $i_vlan = $adtran->ad_menport(); | ||||
|     if (defined $i_vlan) {  | ||||
|     if (defined $i_vlan) { | ||||
|         my $vlans = {}; | ||||
|         my $v_name = $adtran->v_name(); | ||||
|         foreach my $vid (keys %$v_name) { | ||||
| @@ -202,14 +202,14 @@ SNMP::Info::Layer2::Adtran - SNMP Interface to Adtran Devices | ||||
|  | ||||
| =head1 SYNOPSIS | ||||
|  | ||||
|  # Let SNMP::Info determine the correct subclass for you.  | ||||
|  # Let SNMP::Info determine the correct subclass for you. | ||||
|  my $adtran = new SNMP::Info( | ||||
|                           AutoSpecify => 1, | ||||
|                           Debug       => 1, | ||||
|                           DestHost    => 'myrouter', | ||||
|                           Community   => 'public', | ||||
|                           Version     => 2 | ||||
|                         )  | ||||
|                         ) | ||||
|     or die "Can't connect to DestHost.\n"; | ||||
|  | ||||
|  my $class      = $adtran->class(); | ||||
|   | ||||
| @@ -132,7 +132,7 @@ sub mac { | ||||
|         push( @macs, $macs->{$iid} ); | ||||
|       } | ||||
|       @macs = sort(@macs); | ||||
|     }  | ||||
|     } | ||||
|     return $macs[0]; | ||||
| } | ||||
|  | ||||
| @@ -323,14 +323,14 @@ Eric Miller | ||||
|  | ||||
| =head1 SYNOPSIS | ||||
|  | ||||
|  # Let SNMP::Info determine the correct subclass for you.  | ||||
|  # Let SNMP::Info determine the correct subclass for you. | ||||
|  my $aerohive = new SNMP::Info( | ||||
|                           AutoSpecify => 1, | ||||
|                           Debug       => 1, | ||||
|                           DestHost    => 'myswitch', | ||||
|                           Community   => 'public', | ||||
|                           Version     => 2 | ||||
|                         )  | ||||
|                         ) | ||||
|     or die "Can't connect to DestHost.\n"; | ||||
|  | ||||
|  my $class = $aerohive->class(); | ||||
| @@ -339,10 +339,10 @@ Eric Miller | ||||
| =head1 DESCRIPTION | ||||
|  | ||||
| Provides abstraction to the configuration information obtainable from an | ||||
| Aerohive wireless Access Point through SNMP.  | ||||
| Aerohive wireless Access Point through SNMP. | ||||
|  | ||||
| For speed or debugging purposes you can call the subclass directly, but not | ||||
| after determining a more specific class using the method above.  | ||||
| after determining a more specific class using the method above. | ||||
|  | ||||
|  my $aerohive = new SNMP::Info::Layer2::Aerohive(...); | ||||
|  | ||||
|   | ||||
| @@ -166,11 +166,11 @@ sub cd11_mac { | ||||
|  | ||||
| sub cd11_txrate { | ||||
|     my $airespace = shift; | ||||
|      | ||||
|  | ||||
|     my $rates  = $airespace->client_txrate() || {}; | ||||
|     my $protos = $airespace->cd11_proto()    || {}; | ||||
|     my $bws    = $airespace->cd11n_ch_bw()   || {}; | ||||
|      | ||||
|  | ||||
|     my $cd11_txrate = {}; | ||||
|     foreach my $idx ( keys %$rates ) { | ||||
| 	my $rate = $rates->{$idx} || '0.0'; | ||||
| @@ -193,7 +193,7 @@ sub cd11_txrate { | ||||
|  | ||||
| sub munge_cd11n_ch_bw { | ||||
|     my $bw = shift; | ||||
|      | ||||
|  | ||||
|     if ( $bw =~ /forty/ ) { | ||||
| 	return 40; | ||||
|     } | ||||
| @@ -202,7 +202,7 @@ sub munge_cd11n_ch_bw { | ||||
|  | ||||
| sub munge_cd11_proto { | ||||
|     my $bw = shift; | ||||
|      | ||||
|  | ||||
|     return 2 if ( $bw eq 'dot11n5' ); | ||||
|  | ||||
|     return 1; | ||||
| @@ -260,7 +260,7 @@ Eric Miller | ||||
|                           DestHost    => 'myswitch', | ||||
|                           Community   => 'public', | ||||
|                           Version     => 2 | ||||
|                         )  | ||||
|                         ) | ||||
|  | ||||
|     or die "Can't connect to DestHost.\n"; | ||||
|  | ||||
| @@ -269,11 +269,11 @@ Eric Miller | ||||
|  | ||||
| =head1 DESCRIPTION | ||||
|  | ||||
| Provides abstraction to the configuration information obtainable from  | ||||
| Provides abstraction to the configuration information obtainable from | ||||
| Cisco (Airespace) Wireless Controllers through SNMP. | ||||
|  | ||||
| For speed or debugging purposes you can call the subclass directly, but not | ||||
| after determining a more specific class using the method above.  | ||||
| after determining a more specific class using the method above. | ||||
|  | ||||
| my $airespace = new SNMP::Info::Layer2::Airespace(...); | ||||
|  | ||||
| @@ -346,7 +346,7 @@ See documentation in L<SNMP::Info::Bridge/"GLOBALS"> for details. | ||||
| These are methods that return tables of information in the form of a reference | ||||
| to a hash. | ||||
|  | ||||
| =over  | ||||
| =over | ||||
|  | ||||
| =item cd11_mac() | ||||
|  | ||||
| @@ -356,7 +356,7 @@ Returns client radio interface MAC addresses. | ||||
|  | ||||
| Returns client transmission speed in Mbs. | ||||
|  | ||||
| =back  | ||||
| =back | ||||
|  | ||||
| =head2 Overrides | ||||
|  | ||||
|   | ||||
| @@ -443,7 +443,7 @@ sub i_ssidmac { | ||||
|     my $partial    = shift; | ||||
|     my $mbss_mac_addr = $aironet->mbss_mac_addr(); | ||||
|  | ||||
|     # Same logic as i_ssidbcast to return same indexes as i_ssidlist  | ||||
|     # Same logic as i_ssidbcast to return same indexes as i_ssidlist | ||||
|     my $map = {}; | ||||
|     foreach my $key ( keys %$mbss_mac_addr ) { | ||||
|         my ( $interface, @idx ) = split( /\./, $key ); | ||||
| @@ -484,14 +484,14 @@ Max Baker | ||||
|  | ||||
| =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( | ||||
|                           AutoSpecify => 1, | ||||
|                           Debug       => 1, | ||||
|                           DestHost    => 'myswitch', | ||||
|                           Community   => 'public', | ||||
|                           Version     => 2 | ||||
|                         )  | ||||
|                         ) | ||||
|     or die "Can't connect to DestHost.\n"; | ||||
|  | ||||
|  my $class      = $aironet->class(); | ||||
| @@ -517,7 +517,7 @@ This class is for devices running Cisco IOS software (newer) | ||||
| =back | ||||
|  | ||||
| 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::Layer2::Aironet(...); | ||||
|  | ||||
| @@ -655,11 +655,11 @@ being broadcast. | ||||
| =item $aironet->i_ssidmac() | ||||
|  | ||||
| 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 $aironet ps1_status() | ||||
|  | ||||
| Returns the PoE injector status based on C<cpoePdSupportedPower> and  | ||||
| Returns the PoE injector status based on C<cpoePdSupportedPower> and | ||||
| C<cpoePdSupportedPowerMode>. | ||||
|  | ||||
| =back | ||||
|   | ||||
| @@ -138,14 +138,14 @@ Max Baker, Dmitry Sergienko <dmitry@trifle.net> | ||||
|  | ||||
| =head1 SYNOPSIS | ||||
|  | ||||
|  # Let SNMP::Info determine the correct subclass for you.  | ||||
|  # Let SNMP::Info determine the correct subclass for you. | ||||
|  my $allied = new SNMP::Info( | ||||
|                           AutoSpecify => 1, | ||||
|                           Debug       => 1, | ||||
|                           DestHost    => 'myhub', | ||||
|                           Community   => 'public', | ||||
|                           Version     => 1 | ||||
|                         )  | ||||
|                         ) | ||||
|     or die "Can't connect to DestHost.\n"; | ||||
|  | ||||
|  my $class = $allied->class(); | ||||
| @@ -153,8 +153,8 @@ Max Baker, Dmitry Sergienko <dmitry@trifle.net> | ||||
|  | ||||
| =head1 DESCRIPTION | ||||
|  | ||||
| Provides abstraction to the configuration information obtainable from a  | ||||
| Allied device through SNMP. See inherited classes' documentation for  | ||||
| Provides abstraction to the configuration information obtainable from a | ||||
| Allied device through SNMP. See inherited classes' documentation for | ||||
| inherited methods. | ||||
|  | ||||
| =head2 Inherited Classes | ||||
| @@ -195,7 +195,7 @@ Returns 'allied' :) | ||||
|  | ||||
| =item $allied->os() | ||||
|  | ||||
| Returns 'allied'  | ||||
| Returns 'allied' | ||||
|  | ||||
| =item $allied->os_ver() | ||||
|  | ||||
| @@ -213,7 +213,7 @@ Tries to cull out C<AT-nnnnX> out of the description field. | ||||
|  | ||||
| =item $allied->mac() | ||||
|  | ||||
| Returns device MAC.  | ||||
| Returns device MAC. | ||||
|  | ||||
| =back | ||||
|  | ||||
|   | ||||
| @@ -92,14 +92,14 @@ Netdisco Developers | ||||
|  | ||||
| =head1 SYNOPSIS | ||||
|  | ||||
|  # Let SNMP::Info determine the correct subclass for you.  | ||||
|  # Let SNMP::Info determine the correct subclass for you. | ||||
|  my $atmedia = new SNMP::Info( | ||||
|                           AutoSpecify => 1, | ||||
|                           Debug       => 1, | ||||
|                           DestHost    => 'myhub', | ||||
|                           Community   => 'public', | ||||
|                           Version     => 1 | ||||
|                         )  | ||||
|                         ) | ||||
|     or die "Can't connect to DestHost.\n"; | ||||
|  | ||||
|  my $class = $atmedia->class(); | ||||
|   | ||||
| @@ -225,7 +225,7 @@ Max Baker | ||||
|  | ||||
| =head1 SYNOPSIS | ||||
|  | ||||
|  # Let SNMP::Info determine the correct subclass for you.  | ||||
|  # Let SNMP::Info determine the correct subclass for you. | ||||
|  my $c2900 = new SNMP::Info( | ||||
|                         AutoSpecify => 1, | ||||
|                         Debug       => 1, | ||||
| @@ -233,7 +233,7 @@ Max Baker | ||||
|                         DestHost    => 'myswitch', | ||||
|                         Community   => 'public', | ||||
|                         Version     => 2 | ||||
|                         )  | ||||
|                         ) | ||||
|     or die "Can't connect to DestHost.\n"; | ||||
|  | ||||
|  my $class = $c2900->class(); | ||||
| @@ -241,11 +241,11 @@ Max Baker | ||||
|  | ||||
| =head1 DESCRIPTION | ||||
|  | ||||
| Provides abstraction to the configuration information obtainable from a  | ||||
| C2900 device through SNMP.  | ||||
| Provides abstraction to the configuration information obtainable from a | ||||
| C2900 device through SNMP. | ||||
|  | ||||
| For speed or debugging purposes you can call the subclass directly, but not | ||||
| after determining a more specific class using the method above.  | ||||
| after determining a more specific class using the method above. | ||||
|  | ||||
|  my $c2900 = new SNMP::Info::Layer2::C2900(...); | ||||
|  | ||||
| @@ -309,8 +309,8 @@ Returns reference to the map between IID and physical Port. | ||||
| On the 2900 devices i_name isn't reliable, so we override to just the | ||||
| description. | ||||
|  | ||||
| Next all dots are changed for forward slashes so that the physical port name  | ||||
| is the same as the broad-casted CDP port name.  | ||||
| Next all dots are changed for forward slashes so that the physical port name | ||||
| is the same as the broad-casted CDP port name. | ||||
|     (Ethernet0.1 -> Ethernet0/1) | ||||
|  | ||||
| Also, any weird characters are removed, as I saw a few pop up. | ||||
| @@ -333,7 +333,7 @@ Returns reference to hash of IIDs to admin speed setting. | ||||
|  | ||||
| =back | ||||
|  | ||||
| =head2 F<C2900-MIB> Port Entry Table  | ||||
| =head2 F<C2900-MIB> Port Entry Table | ||||
|  | ||||
| =over | ||||
|  | ||||
| @@ -357,7 +357,7 @@ Gives admin setting for Duplex Info | ||||
|  | ||||
| =item $c2900->c2900_p_speed_admin() | ||||
|  | ||||
| Gives Admin speed of port  | ||||
| Gives Admin speed of port | ||||
|  | ||||
| (C<c2900PortAdminSpeed>) | ||||
|  | ||||
| @@ -372,7 +372,7 @@ See L<SNMP::Info::Layer2::Cisco/"TABLE METHODS"> for details. | ||||
| 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.  | ||||
| operations. | ||||
|  | ||||
| =over | ||||
|  | ||||
| @@ -387,7 +387,7 @@ port C<ifIndex>. | ||||
|  | ||||
|     Example: | ||||
|     my %if_map = reverse %{$c2900->interfaces()}; | ||||
|     $c2900->set_i_speed_admin('auto', $if_map{'FastEthernet0/1'})  | ||||
|     $c2900->set_i_speed_admin('auto', $if_map{'FastEthernet0/1'}) | ||||
|         or die "Couldn't change port speed. ",$c2900->error(1); | ||||
|  | ||||
| =item $c2900->set_i_duplex_admin(duplex, ifIndex) | ||||
| @@ -401,7 +401,7 @@ port C<ifIndex>. | ||||
|  | ||||
|     Example: | ||||
|     my %if_map = reverse %{$c2900->interfaces()}; | ||||
|     $c2900->set_i_duplex_admin('auto', $if_map{'FastEthernet0/1'})  | ||||
|     $c2900->set_i_duplex_admin('auto', $if_map{'FastEthernet0/1'}) | ||||
|         or die "Couldn't change port duplex. ",$c2900->error(1); | ||||
|  | ||||
| =back | ||||
|   | ||||
| @@ -173,14 +173,14 @@ Max Baker | ||||
|  | ||||
| =head1 SYNOPSIS | ||||
|  | ||||
|  # Let SNMP::Info determine the correct subclass for you.  | ||||
|  # Let SNMP::Info determine the correct subclass for you. | ||||
|  my $cat = new SNMP::Info( | ||||
|                           AutoSpecify => 1, | ||||
|                           Debug       => 1, | ||||
|                           DestHost    => 'myswitch', | ||||
|                           Community   => 'public', | ||||
|                           Version     => 2 | ||||
|                         )  | ||||
|                         ) | ||||
|     or die "Can't connect to DestHost.\n"; | ||||
|  | ||||
|  my $class      = $cat->class(); | ||||
| @@ -206,7 +206,7 @@ Note:  Some older Catalyst switches will only talk SNMP version 1.  Some | ||||
| newer ones will not return all their data if connected via Version 1. | ||||
|  | ||||
| For speed or debugging purposes you can call the subclass directly, but not | ||||
| after determining a more specific class using the method above.  | ||||
| after determining a more specific class using the method above. | ||||
|  | ||||
|  my $cat = new SNMP::Info::Layer2::Catalyst(...); | ||||
|  | ||||
| @@ -246,7 +246,7 @@ Returns 'catalyst' | ||||
|  | ||||
| =item $cat->os_ver() | ||||
|  | ||||
| Tries to use the value from SNMP::Info::CiscoStats->os_ver() and if it fails  | ||||
| Tries to use the value from SNMP::Info::CiscoStats->os_ver() and if it fails | ||||
| it grabs $cat->m_swver()->{1} and uses that. | ||||
|  | ||||
| =item $cat->vendor() | ||||
| @@ -279,11 +279,11 @@ to a hash. | ||||
| =item $cat->interfaces() | ||||
|  | ||||
| Returns the map between SNMP Interface Identifier (iid) and physical port | ||||
| name.  | ||||
| name. | ||||
|  | ||||
| =item $cat->i_name() | ||||
|  | ||||
| Returns reference to hash of iid to human set name.  | ||||
| Returns reference to hash of iid to human set name. | ||||
|  | ||||
| C<portName> | ||||
|  | ||||
|   | ||||
| @@ -274,14 +274,14 @@ Eric Miller | ||||
|  | ||||
| =head1 SYNOPSIS | ||||
|  | ||||
|  # Let SNMP::Info determine the correct subclass for you.  | ||||
|  # Let SNMP::Info determine the correct subclass for you. | ||||
|  my $centillion = new SNMP::Info( | ||||
|                           AutoSpecify => 1, | ||||
|                           Debug       => 1, | ||||
|                           DestHost    => 'myswitch', | ||||
|                           Community   => 'public', | ||||
|                           Version     => 2 | ||||
|                         )  | ||||
|                         ) | ||||
|     or die "Can't connect to DestHost.\n"; | ||||
|  | ||||
|  my $class      = $centillion->class(); | ||||
| @@ -289,14 +289,14 @@ Eric Miller | ||||
|  | ||||
| =head1 DESCRIPTION | ||||
|  | ||||
| Provides abstraction to the configuration information obtainable from a  | ||||
| Centillion device through SNMP.  | ||||
| Provides abstraction to the configuration information obtainable from a | ||||
| Centillion device through SNMP. | ||||
|  | ||||
| For speed or debugging purposes you can call the subclass directly, but not | ||||
| after determining a more specific class using the method above.  | ||||
| after determining a more specific class using the method above. | ||||
|  | ||||
|  my $centillion = new SNMP::Info::Layer2::centillion(...); | ||||
|   | ||||
|  | ||||
| Note:  This class supports version 4.X and 5.X which are VLAN based rather | ||||
| than bridge group based. | ||||
|  | ||||
| @@ -430,7 +430,7 @@ to a hash. | ||||
|     formula: | ||||
|       port = index % 256 | ||||
|       slot = int(index / 256) | ||||
|   | ||||
|  | ||||
|     The physical port name is returned as slot.port. | ||||
|  | ||||
| =item $centillion->i_duplex() | ||||
| @@ -469,13 +469,13 @@ Returns a mapping between C<ifIndex> and the VLAN. | ||||
|  | ||||
| =item $centillion->centillion_p_index() | ||||
|  | ||||
| Returns reference to hash.  Maps table IIDs to Interface IIDs  | ||||
| Returns reference to hash.  Maps table IIDs to Interface IIDs | ||||
|  | ||||
| (C<cnDot3ExtnIfIndex>) | ||||
|  | ||||
| =item $centillion->centillion_p_duplex() | ||||
|  | ||||
| Returns reference to hash.  Maps port operational duplexes to IIDs  | ||||
| Returns reference to hash.  Maps port operational duplexes to IIDs | ||||
|  | ||||
| (C<cnDot3ExtnIfOperConnectionType>) | ||||
|  | ||||
| @@ -493,19 +493,19 @@ Returns reference to hash.  Maps port admin duplexes to IIDs | ||||
|  | ||||
| =item $centillion->centillion_i_vlan_index() | ||||
|  | ||||
| Returns reference to hash.  Key: Table entry, Value: Index  | ||||
| Returns reference to hash.  Key: Table entry, Value: Index | ||||
|  | ||||
| (C<cnVlanPortMemberIfIndex>) | ||||
|  | ||||
| =item $centillion->centillion_i_vlan() | ||||
|  | ||||
| Returns reference to hash.  Key: Table entry, Value: VLAN ID  | ||||
| Returns reference to hash.  Key: Table entry, Value: VLAN ID | ||||
|  | ||||
| (C<cnVlanPortMemberVID>) | ||||
|  | ||||
| =item $centillion->centillion_i_vlan_type() | ||||
|  | ||||
| Returns reference to hash.  Key: Table entry, Value: VLAN Type  | ||||
| Returns reference to hash.  Key: Table entry, Value: VLAN Type | ||||
|  | ||||
| (C<cnVlanPortMemberIngressType>) | ||||
|  | ||||
|   | ||||
| @@ -117,7 +117,7 @@ Max Baker | ||||
|  | ||||
| =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( | ||||
|                         AutoSpecify => 1, | ||||
|                         Debug       => 1, | ||||
| @@ -125,7 +125,7 @@ Max Baker | ||||
|                         DestHost    => 'myswitch', | ||||
|                         Community   => 'public', | ||||
|                         Version     => 2 | ||||
|                         )  | ||||
|                         ) | ||||
|     or die "Can't connect to DestHost.\n"; | ||||
|  | ||||
|  my $class      = $cisco->class(); | ||||
|   | ||||
| @@ -41,9 +41,9 @@ use SNMP::Info::Aggregate 'agg_ports_ifstack'; | ||||
|  | ||||
| @SNMP::Info::Layer2::HP::ISA = qw/ | ||||
|     SNMP::Info::Aggregate | ||||
|     SNMP::Info::Layer3  | ||||
|     SNMP::Info::MAU  | ||||
|     SNMP::Info::CDP  | ||||
|     SNMP::Info::Layer3 | ||||
|     SNMP::Info::MAU | ||||
|     SNMP::Info::CDP | ||||
|     Exporter | ||||
| /; | ||||
| @SNMP::Info::Layer2::HP::EXPORT_OK = qw//; | ||||
| @@ -107,7 +107,7 @@ $VERSION = '3.64'; | ||||
|     'hp_s_oid'    => 'hpicfSensorObjectId', | ||||
|     'hp_s_name'   => 'hpicfSensorDescr', | ||||
|     'hp_s_status' => 'hpicfSensorStatus', | ||||
|      | ||||
|  | ||||
|     # HP-ICF-POE-MIB | ||||
|     'peth_port_power'   => 'hpicfPoePethPsePortPower', | ||||
| ); | ||||
| @@ -123,7 +123,7 @@ $VERSION = '3.64'; | ||||
|  | ||||
|  | ||||
| # Model map, reverse sorted by common model name (sort -k2 -r) | ||||
| # Potential sources for model information: http://www.hp.com/rnd/software/switches.htm or HP-ICF-OID MIB  | ||||
| # Potential sources for model information: http://www.hp.com/rnd/software/switches.htm or HP-ICF-OID MIB | ||||
| %MODEL_MAP = ( | ||||
|     'J8131A' => 'WAP-420-WW', | ||||
|     'J8130A' => 'WAP-420-NA', | ||||
| @@ -315,7 +315,7 @@ sub os_ver { | ||||
|     return; | ||||
| } | ||||
|  | ||||
| # Regular managed ProCurve switches have the serial num in entity mib,  | ||||
| # Regular managed ProCurve switches have the serial num in entity mib, | ||||
| # the web-managed models in the semi mib (hphttpmanageable). | ||||
| sub serial { | ||||
|     my $hp = shift; | ||||
| @@ -595,14 +595,14 @@ Max Baker | ||||
|  | ||||
| =head1 SYNOPSIS | ||||
|  | ||||
|  # Let SNMP::Info determine the correct subclass for you.  | ||||
|  # Let SNMP::Info determine the correct subclass for you. | ||||
|  my $hp = new SNMP::Info( | ||||
|                           AutoSpecify => 1, | ||||
|                           Debug       => 1, | ||||
|                           DestHost    => 'myswitch', | ||||
|                           Community   => 'public', | ||||
|                           Version     => 2 | ||||
|                         )  | ||||
|                         ) | ||||
|     or die "Can't connect to DestHost.\n"; | ||||
|  | ||||
|  my $class      = $hp->class(); | ||||
| @@ -610,15 +610,15 @@ Max Baker | ||||
|  | ||||
| =head1 DESCRIPTION | ||||
|  | ||||
| Provides abstraction to the configuration information obtainable from a  | ||||
| HP ProCurve Switch via SNMP.  | ||||
| Provides abstraction to the configuration information obtainable from a | ||||
| HP ProCurve Switch via SNMP. | ||||
|  | ||||
| Note:  Some HP Switches will connect via SNMP version 1, but a lot of config | ||||
| data will not be available.  Make sure you try and connect with Version 2 | ||||
| first, and then fail back to version 1. | ||||
|  | ||||
| For speed or debugging purposes you can call the subclass directly, but not | ||||
| after determining a more specific class using the method above.  | ||||
| after determining a more specific class using the method above. | ||||
|  | ||||
|  my $hp = new SNMP::Info::Layer2::HP(...); | ||||
|  | ||||
| @@ -874,7 +874,7 @@ to a hash. | ||||
|  | ||||
| =over 4 | ||||
|  | ||||
| =item $hp->interfaces()  | ||||
| =item $hp->interfaces() | ||||
|  | ||||
| Uses $hp->i_description() | ||||
|  | ||||
| @@ -931,7 +931,7 @@ Munge for c_id which handles CDP and LLDP. | ||||
| 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.  | ||||
| operations. | ||||
|  | ||||
| =over | ||||
|  | ||||
|   | ||||
| @@ -386,7 +386,7 @@ sub i_vlan_membership_untagged { | ||||
|         my $vlan = $vlans->{$port}; | ||||
|         push( @{ $i_vlan_membership->{$port} }, $vlan ); | ||||
|     } | ||||
|      | ||||
|  | ||||
|     return $i_vlan_membership; | ||||
| } | ||||
|  | ||||
| @@ -482,14 +482,14 @@ Max Baker | ||||
|  | ||||
| =head1 SYNOPSIS | ||||
|  | ||||
|  # Let SNMP::Info determine the correct subclass for you.  | ||||
|  # Let SNMP::Info determine the correct subclass for you. | ||||
|  my $hp = new SNMP::Info( | ||||
|                           AutoSpecify => 1, | ||||
|                           Debug       => 1, | ||||
|                           DestHost    => 'myswitch', | ||||
|                           Community   => 'public', | ||||
|                           Version     => 2 | ||||
|                         )  | ||||
|                         ) | ||||
|     or die "Can't connect to DestHost.\n"; | ||||
|  | ||||
|  my $class      = $hp->class(); | ||||
| @@ -497,15 +497,15 @@ Max Baker | ||||
|  | ||||
| =head1 DESCRIPTION | ||||
|  | ||||
| Provides abstraction to the configuration information obtainable from a  | ||||
| HP ProCurve Switch via SNMP.  | ||||
| Provides abstraction to the configuration information obtainable from a | ||||
| HP ProCurve Switch via SNMP. | ||||
|  | ||||
| Note:  Some HP Switches will connect via SNMP version 1, but a lot of config | ||||
| data will not be available.  Make sure you try and connect with Version 2 | ||||
| first, and then fail back to version 1. | ||||
|  | ||||
| For speed or debugging purposes you can call the subclass directly, but not | ||||
| after determining a more specific class using the method above.  | ||||
| after determining a more specific class using the method above. | ||||
|  | ||||
|  my $hp = new SNMP::Info::Layer2::HP4000(...); | ||||
|  | ||||
| @@ -583,7 +583,7 @@ Returns bytes of used memory | ||||
| Returns the model number of the HP Switch.  Will translate between the HP Part | ||||
| number and the common model number with this map : | ||||
|  | ||||
|  %MODEL_MAP = (  | ||||
|  %MODEL_MAP = ( | ||||
|                 'J4093A' => '2424M', | ||||
|                 'J4110A' => '8000M', | ||||
|                 'J4120A' => '1600M', | ||||
| @@ -652,7 +652,7 @@ to a hash. | ||||
|  | ||||
| =over | ||||
|  | ||||
| =item $hp->interfaces()  | ||||
| =item $hp->interfaces() | ||||
|  | ||||
| Uses $hp->i_description() | ||||
|  | ||||
| @@ -687,7 +687,7 @@ It is the union of tagged, untagged, and auto ports. | ||||
|   Example: | ||||
|   my $interfaces = $hp->interfaces(); | ||||
|   my $vlans      = $hp->i_vlan_membership(); | ||||
|    | ||||
|  | ||||
|   foreach my $iid (sort keys %$interfaces) { | ||||
|     my $port = $interfaces->{$iid}; | ||||
|     my $vlan = join(',', sort(@{$vlans->{$iid}})); | ||||
| @@ -731,7 +731,7 @@ See documentation in L<SNMP::Info::MAU/"TABLE METHODS"> for details. | ||||
| 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.  | ||||
| operations. | ||||
|  | ||||
| =over | ||||
|  | ||||
|   | ||||
| @@ -63,7 +63,7 @@ $VERSION = '3.64'; | ||||
| %FUNCS = ( | ||||
|     %SNMP::Info::Layer2::FUNCS, | ||||
|     %SNMP::Info::LLDP::FUNCS, | ||||
|      | ||||
|  | ||||
| ); | ||||
|  | ||||
| %MUNGE = ( | ||||
| @@ -102,14 +102,14 @@ Jeroen van Ingen | ||||
|  | ||||
| =head1 SYNOPSIS | ||||
|  | ||||
|  # Let SNMP::Info determine the correct subclass for you.  | ||||
|  # Let SNMP::Info determine the correct subclass for you. | ||||
|  my $hp = new SNMP::Info( | ||||
|                           AutoSpecify => 1, | ||||
|                           Debug       => 1, | ||||
|                           DestHost    => 'myswitch', | ||||
|                           Community   => 'public', | ||||
|                           Version     => 2 | ||||
|                         )  | ||||
|                         ) | ||||
|     or die "Can't connect to DestHost.\n"; | ||||
|  | ||||
|  my $class      = $hp->class(); | ||||
| @@ -117,11 +117,11 @@ Jeroen van Ingen | ||||
|  | ||||
| =head1 DESCRIPTION | ||||
|  | ||||
| Provides abstraction to the configuration information obtainable from a  | ||||
| HP Virtual Connect Switch via SNMP.  | ||||
| Provides abstraction to the configuration information obtainable from a | ||||
| HP Virtual Connect Switch via SNMP. | ||||
|  | ||||
| For speed or debugging purposes you can call the subclass directly, but not | ||||
| after determining a more specific class using the method above.  | ||||
| after determining a more specific class using the method above. | ||||
|  | ||||
|  my $hp = new SNMP::Info::Layer2::HPVC(...); | ||||
|  | ||||
| @@ -209,6 +209,6 @@ See documentation in L<SNMP::Info::Layer2/"TABLE METHODS"> for details. | ||||
| 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.  | ||||
| operations. | ||||
|  | ||||
| =cut | ||||
|   | ||||
| @@ -114,7 +114,7 @@ Eric Miller | ||||
|                           DestHost    => 'myswitch', | ||||
|                           Community   => 'public', | ||||
|                           Version     => 2 | ||||
|                         )  | ||||
|                         ) | ||||
|  | ||||
|     or die "Can't connect to DestHost.\n"; | ||||
|  | ||||
| @@ -123,11 +123,11 @@ Eric Miller | ||||
|  | ||||
| =head1 DESCRIPTION | ||||
|  | ||||
| Provides abstraction to the configuration information obtainable from a  | ||||
| Provides abstraction to the configuration information obtainable from a | ||||
| Nortel 2270 Series Wireless Switch through SNMP. | ||||
|  | ||||
| For speed or debugging purposes you can call the subclass directly, but not | ||||
| after determining a more specific class using the method above.  | ||||
| after determining a more specific class using the method above. | ||||
|  | ||||
| my $n2270 = new SNMP::Info::Layer2::N2270(...); | ||||
|  | ||||
|   | ||||
| @@ -375,14 +375,14 @@ Eric Miller | ||||
|  | ||||
| =head1 SYNOPSIS | ||||
|  | ||||
|  # Let SNMP::Info determine the correct subclass for you.  | ||||
|  # Let SNMP::Info determine the correct subclass for you. | ||||
|  my $nap222x = new SNMP::Info( | ||||
|                           AutoSpecify => 1, | ||||
|                           Debug       => 1, | ||||
|                           DestHost    => 'myswitch', | ||||
|                           Community   => 'public', | ||||
|                           Version     => 2 | ||||
|                         )  | ||||
|                         ) | ||||
|     or die "Can't connect to DestHost.\n"; | ||||
|  | ||||
|  my $class = $nap222x->class(); | ||||
| @@ -391,10 +391,10 @@ Eric Miller | ||||
| =head1 DESCRIPTION | ||||
|  | ||||
| Provides abstraction to the configuration information obtainable from a Nortel | ||||
| 2220 series wireless Access Points through SNMP.  | ||||
| 2220 series wireless Access Points through SNMP. | ||||
|  | ||||
| For speed or debugging purposes you can call the subclass directly, but not | ||||
| after determining a more specific class using the method above.  | ||||
| after determining a more specific class using the method above. | ||||
|  | ||||
|  my $nap222x = new SNMP::Info::Layer2::NAP222x(...); | ||||
|  | ||||
| @@ -526,7 +526,7 @@ to a hash. | ||||
|  | ||||
| =item $nap222x->interfaces() | ||||
|  | ||||
| Returns reference to map of IIDs to physical ports.  | ||||
| Returns reference to map of IIDs to physical ports. | ||||
|  | ||||
| =item $nap222x->i_duplex() | ||||
|  | ||||
| @@ -548,7 +548,7 @@ Returns a human name based upon port description. | ||||
|  | ||||
| Returns a mapping between C<ifIndex> and the Bridge Table.  This does not | ||||
| exist in the MIB and bridge port index is not the same as C<ifIndex> so it is | ||||
| created.  | ||||
| created. | ||||
|  | ||||
| =item $nap222x->i_ssidlist() | ||||
|  | ||||
|   | ||||
| @@ -159,7 +159,7 @@ sub model { | ||||
|     return $id unless defined $model; | ||||
|  | ||||
|     $model =~ s/^ntwsSwitch//i; | ||||
|     return $model;     | ||||
|     return $model; | ||||
| } | ||||
|  | ||||
| sub _ap_serial { | ||||
| @@ -389,7 +389,7 @@ sub bp_index { | ||||
| sub fw_mac { | ||||
|     my $nwss2300 = shift; | ||||
|     my $partial  = shift; | ||||
|      | ||||
|  | ||||
|     my $serials = $nwss2300->nwss2300_sta_serial($partial) || {}; | ||||
|  | ||||
|     my %fw_mac; | ||||
| @@ -401,7 +401,7 @@ sub fw_mac { | ||||
| 	 | ||||
|         $fw_mac{$iid} = $mac; | ||||
|     } | ||||
|     return \%fw_mac;     | ||||
|     return \%fw_mac; | ||||
| } | ||||
|  | ||||
| sub fw_port { | ||||
| @@ -494,7 +494,7 @@ sub dot11_cur_tx_pwr_mw { | ||||
|     my $partial  = shift; | ||||
|  | ||||
|     my $cur = $nwss2300->nwss2300_apif_power($partial); | ||||
|      | ||||
|  | ||||
|     my $dot11_cur_tx_pwr_mw = {}; | ||||
|     foreach my $idx ( keys %$cur ) { | ||||
|         my $pwr_dbm = $cur->{$idx}; | ||||
| @@ -502,7 +502,7 @@ sub dot11_cur_tx_pwr_mw { | ||||
| 	#Convert to milliWatts = 10(dBm/10) | ||||
|         my $pwr = int (10 ** ($pwr_dbm / 10)); | ||||
| 	 | ||||
|         $dot11_cur_tx_pwr_mw->{$idx} = $pwr;  | ||||
|         $dot11_cur_tx_pwr_mw->{$idx} = $pwr; | ||||
|     } | ||||
|     return $dot11_cur_tx_pwr_mw; | ||||
| } | ||||
| @@ -514,7 +514,7 @@ sub e_index { | ||||
|  | ||||
|     # Try new first, fall back to depreciated | ||||
|     my $ap_num = $nwss2300->nwss2300_ap_num() || $nwss2300->nwss2300_ap_dapnum() || {}; | ||||
|    | ||||
|  | ||||
|     my %e_index; | ||||
|  | ||||
|     # Chassis | ||||
| @@ -797,7 +797,7 @@ Eric Miller | ||||
|                           DestHost    => 'myswitch', | ||||
|                           Community   => 'public', | ||||
|                           Version     => 2 | ||||
|                         )  | ||||
|                         ) | ||||
|  | ||||
|     or die "Can't connect to DestHost.\n"; | ||||
|  | ||||
| @@ -806,7 +806,7 @@ Eric Miller | ||||
|  | ||||
| =head1 DESCRIPTION | ||||
|  | ||||
| Provides abstraction to the configuration information obtainable from  | ||||
| Provides abstraction to the configuration information obtainable from | ||||
| Avaya (Trapeze) Wireless Controllers through SNMP. | ||||
|  | ||||
| This class emulates bridge functionality for the wireless switch. This enables | ||||
| @@ -814,7 +814,7 @@ end station MAC addresses collection and correlation to the thin access point | ||||
| the end station is using for communication. | ||||
|  | ||||
| For speed or debugging purposes you can call the subclass directly, but not | ||||
| after determining a more specific class using the method above.  | ||||
| after determining a more specific class using the method above. | ||||
|  | ||||
| my $nwss2300 = new SNMP::Info::Layer2::NWSS2300(...); | ||||
|  | ||||
| @@ -908,7 +908,7 @@ See documentation in L<SNMP::Info::Bridge/"GLOBALS"> for details. | ||||
| These are methods that return tables of information in the form of a reference | ||||
| to a hash. | ||||
|  | ||||
| =over  | ||||
| =over | ||||
|  | ||||
| =item $nwss2300->i_ssidlist() | ||||
|  | ||||
| @@ -1139,7 +1139,7 @@ These emulate the F<CISCO-DOT11-MIB> | ||||
|  | ||||
| (C<ntwsClSessClientSessStatsUniPktOut>) | ||||
|  | ||||
| =back  | ||||
| =back | ||||
|  | ||||
| =head2 Table Methods imported from SNMP::Info | ||||
|  | ||||
| @@ -1155,14 +1155,14 @@ See documentation in L<SNMP::Info::Bridge/"TABLE METHODS"> for details. | ||||
|  | ||||
| =item $nwss2300->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 thin APs and WLAN virtual interfaces as device | ||||
| interfaces. | ||||
|  | ||||
| =item $nwss2300->interfaces() | ||||
|  | ||||
| Returns reference to map of IIDs to ports.  Thin APs are implemented as device  | ||||
| Returns reference to map of IIDs to ports.  Thin APs are implemented as device | ||||
| interfaces.  The thin AP MAC address and Slot ID nwss2300_apif_slot() are | ||||
| used as the port identifier. | ||||
|  | ||||
| @@ -1207,7 +1207,7 @@ the interface iid. | ||||
| =item $nwss2300->fw_port() | ||||
|  | ||||
| Returns reference to a hash, value being mac and | ||||
| nwss2300_sta_slot() combined to match the interface iid.   | ||||
| nwss2300_sta_slot() combined to match the interface iid. | ||||
|  | ||||
| =item $nwss2300->fw_mac() | ||||
|  | ||||
|   | ||||
| @@ -74,7 +74,7 @@ sub os { | ||||
| sub serial { | ||||
|     my $netgear = shift; | ||||
|     my $serial = undef; | ||||
|      | ||||
|  | ||||
|     my $e_serial = $netgear->e_serial(); | ||||
|     if (defined($e_serial)) { # This unit sports the Entity-MIB | ||||
|         # Find entity table entry for this unit | ||||
| @@ -108,7 +108,7 @@ sub model { | ||||
| } | ||||
|  | ||||
| # ifDescr is the same for all interfaces in a class, but the ifName is | ||||
| # unique, so let's use that for port name.  If all else fails,  | ||||
| # unique, so let's use that for port name.  If all else fails, | ||||
| # concatentate ifDesc and ifIndex. | ||||
| sub interfaces { | ||||
|     my $netgear = shift; | ||||
| @@ -162,20 +162,20 @@ SNMP::Info::Layer2::Netgear - SNMP Interface to Netgear switches | ||||
|  | ||||
| =head1 AUTHOR | ||||
|  | ||||
|  Bill Fenner and Zoltan Erszenyi,  | ||||
|  Hacked in LLDP support from Baystack.pm by  | ||||
|  Bill Fenner and Zoltan Erszenyi, | ||||
|  Hacked in LLDP support from Baystack.pm by | ||||
|  Nic Bernstein <nic@onlight.com> | ||||
|  | ||||
| =head1 SYNOPSIS | ||||
|  | ||||
|  # Let SNMP::Info determine the correct subclass for you.  | ||||
|  # Let SNMP::Info determine the correct subclass for you. | ||||
|  my $netgear = new SNMP::Info( | ||||
|                           AutoSpecify => 1, | ||||
|                           Debug       => 1, | ||||
|                           DestHost    => 'myswitch', | ||||
|                           Community   => 'public', | ||||
|                           Version     => 2 | ||||
|                         )  | ||||
|                         ) | ||||
|     or die "Can't connect to DestHost.\n"; | ||||
|  | ||||
|  my $class      = $netgear->class(); | ||||
| @@ -183,8 +183,8 @@ SNMP::Info::Layer2::Netgear - SNMP Interface to Netgear switches | ||||
|  | ||||
| =head1 DESCRIPTION | ||||
|  | ||||
| Provides abstraction to the configuration information obtainable from a  | ||||
| Netgear device through SNMP. See inherited classes' documentation for  | ||||
| Provides abstraction to the configuration information obtainable from a | ||||
| Netgear device through SNMP. See inherited classes' documentation for | ||||
| inherited methods. | ||||
|  | ||||
| =head2 Inherited Classes | ||||
| @@ -226,11 +226,11 @@ Returns 'netgear' | ||||
|  | ||||
| =item $netgear->os() | ||||
|  | ||||
| Returns 'netgear'  | ||||
| Returns 'netgear' | ||||
|  | ||||
| =item $netgear->model() | ||||
|  | ||||
| Returns concatenation of $e_model and $e_hwver if Entity MIB present,  | ||||
| Returns concatenation of $e_model and $e_hwver if Entity MIB present, | ||||
| otherwise returns description() | ||||
|  | ||||
| =item $netgear->os_ver() | ||||
|   | ||||
| @@ -114,7 +114,7 @@ sub i_name { | ||||
|     # replace i_name where possible | ||||
|     foreach my $iid ( keys %$return ) { | ||||
|         next unless $return->{$iid} eq ""; | ||||
|         $return->{$iid} = $iid;  | ||||
|         $return->{$iid} = $iid; | ||||
|     } | ||||
|     return \%$return; | ||||
| } | ||||
| @@ -133,7 +133,7 @@ Christoph Neuhaus | ||||
|  | ||||
| =head1 SYNOPSIS | ||||
|  | ||||
| # Let SNMP::Info determine the correct subclass for you.  | ||||
| # Let SNMP::Info determine the correct subclass for you. | ||||
|  | ||||
|     my $nexans = new SNMP::Info( | ||||
|                             AutoSpecify => 1, | ||||
| @@ -141,7 +141,7 @@ Christoph Neuhaus | ||||
|                             DestHost    => 'myswitch', | ||||
|                             Community   => 'public', | ||||
|                             Version     => 2 | ||||
|                             )  | ||||
|                             ) | ||||
|     or die "Can't connect to DestHost.\n"; | ||||
|  | ||||
|     my $class = $nexans->class(); | ||||
| @@ -158,7 +158,7 @@ tested devices: | ||||
|     gigaSwitchV3d2SfpSfp version 3.68, 4.02, 4.02B, 4.10C, 4,14W | ||||
|  | ||||
| For speed or debugging purposes you can call the subclass directly, but not | ||||
| after determining a more specific class using the method above.  | ||||
| after determining a more specific class using the method above. | ||||
|  | ||||
|     my $nexans = new SNMP::Info::Layer2::Nexans(...); | ||||
|  | ||||
| @@ -223,7 +223,7 @@ See documentation in L<SNMP::Info::Layer2/"GLOBALS"> for details. | ||||
| These are methods that return tables of information in the form of a reference | ||||
| to a hash. | ||||
|  | ||||
| =over  | ||||
| =over | ||||
|  | ||||
| =item $nexans->i_name() | ||||
|  | ||||
|   | ||||
| @@ -170,14 +170,14 @@ Eric Miller | ||||
|  | ||||
| =head1 SYNOPSIS | ||||
|  | ||||
|  # Let SNMP::Info determine the correct subclass for you.  | ||||
|  # Let SNMP::Info determine the correct subclass for you. | ||||
|  my $orinoco = new SNMP::Info( | ||||
|                           AutoSpecify => 1, | ||||
|                           Debug       => 1, | ||||
|                           DestHost    => 'myswitch', | ||||
|                           Community   => 'public', | ||||
|                           Version     => 2 | ||||
|                         )  | ||||
|                         ) | ||||
|     or die "Can't connect to DestHost.\n"; | ||||
|  | ||||
|  my $class = $orinoco->class(); | ||||
| @@ -190,7 +190,7 @@ 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.  | ||||
| after determining a more specific class using the method above. | ||||
|  | ||||
|  my $orinoco = new SNMP::Info::Layer2::Orinoco(...); | ||||
|  | ||||
| @@ -269,7 +269,7 @@ to a hash. | ||||
|  | ||||
| =item $orinoco->interfaces() | ||||
|  | ||||
| Returns reference to map of IIDs to physical ports.  | ||||
| Returns reference to map of IIDs to physical ports. | ||||
|  | ||||
| =item $orinoco->i_ignore() | ||||
|  | ||||
|   | ||||
| @@ -96,7 +96,7 @@ Eric Miller | ||||
|               DestHost    => 'myswitch', | ||||
|               Community   => 'public', | ||||
|               Version     => 2 | ||||
|             )  | ||||
|             ) | ||||
|  | ||||
|     or die "Can't connect to DestHost.\n"; | ||||
|  | ||||
| @@ -109,7 +109,7 @@ SNMP::Info::Layer2::Sixnet is a subclass of SNMP::Info that provides an | ||||
| interface to Sixnet industrial switches. | ||||
|  | ||||
| For speed or debugging purposes you can call the subclass directly, but not | ||||
| after determining a more specific class using the method above.  | ||||
| after determining a more specific class using the method above. | ||||
|  | ||||
|  my $sixnet = new SNMP::Info::Layer2::Sixnet(...); | ||||
|  | ||||
|   | ||||
| @@ -163,7 +163,7 @@ sub model { | ||||
|     return $id unless defined $model; | ||||
|  | ||||
|     $model =~ s/^wirelessLANController//i; | ||||
|     return $model;     | ||||
|     return $model; | ||||
| } | ||||
|  | ||||
| sub _ap_serial { | ||||
| @@ -393,7 +393,7 @@ sub bp_index { | ||||
| sub fw_mac { | ||||
|     my $trapeze = shift; | ||||
|     my $partial  = shift; | ||||
|      | ||||
|  | ||||
|     my $serials = $trapeze->trapeze_sta_serial($partial) || {}; | ||||
|  | ||||
|     my %fw_mac; | ||||
| @@ -405,7 +405,7 @@ sub fw_mac { | ||||
| 	 | ||||
|         $fw_mac{$iid} = $mac; | ||||
|     } | ||||
|     return \%fw_mac;     | ||||
|     return \%fw_mac; | ||||
| } | ||||
|  | ||||
| sub fw_port { | ||||
| @@ -498,7 +498,7 @@ sub dot11_cur_tx_pwr_mw { | ||||
|     my $partial  = shift; | ||||
|  | ||||
|     my $cur = $trapeze->trapeze_apif_power($partial); | ||||
|      | ||||
|  | ||||
|     my $dot11_cur_tx_pwr_mw = {}; | ||||
|     foreach my $idx ( keys %$cur ) { | ||||
|         my $pwr_dbm = $cur->{$idx}; | ||||
| @@ -506,7 +506,7 @@ sub dot11_cur_tx_pwr_mw { | ||||
| 	#Convert to milliWatts = 10(dBm/10) | ||||
|         my $pwr = int (10 ** ($pwr_dbm / 10)); | ||||
| 	 | ||||
|         $dot11_cur_tx_pwr_mw->{$idx} = $pwr;  | ||||
|         $dot11_cur_tx_pwr_mw->{$idx} = $pwr; | ||||
|     } | ||||
|     return $dot11_cur_tx_pwr_mw; | ||||
| } | ||||
| @@ -518,7 +518,7 @@ sub e_index { | ||||
|  | ||||
|     # Try new first, fall back to depreciated | ||||
|     my $ap_num = $trapeze->trapeze_ap_num() || $trapeze->trapeze_ap_dapnum() || {}; | ||||
|    | ||||
|  | ||||
|     my %e_index; | ||||
|  | ||||
|     # Chassis | ||||
| @@ -801,7 +801,7 @@ Eric Miller | ||||
|                           DestHost    => 'myswitch', | ||||
|                           Community   => 'public', | ||||
|                           Version     => 2 | ||||
|                         )  | ||||
|                         ) | ||||
|  | ||||
|     or die "Can't connect to DestHost.\n"; | ||||
|  | ||||
| @@ -810,7 +810,7 @@ Eric Miller | ||||
|  | ||||
| =head1 DESCRIPTION | ||||
|  | ||||
| Provides abstraction to the configuration information obtainable from  | ||||
| Provides abstraction to the configuration information obtainable from | ||||
| Juniper (Trapeze) Wireless Controllers through SNMP. | ||||
|  | ||||
| This class emulates bridge functionality for the wireless switch. This enables | ||||
| @@ -818,7 +818,7 @@ end station MAC addresses collection and correlation to the thin access point | ||||
| the end station is using for communication. | ||||
|  | ||||
| For speed or debugging purposes you can call the subclass directly, but not | ||||
| after determining a more specific class using the method above.  | ||||
| after determining a more specific class using the method above. | ||||
|  | ||||
| my $trapeze = new SNMP::Info::Layer2::Trapeze(...); | ||||
|  | ||||
| @@ -912,7 +912,7 @@ See documentation in L<SNMP::Info::Bridge/"GLOBALS"> for details. | ||||
| These are methods that return tables of information in the form of a reference | ||||
| to a hash. | ||||
|  | ||||
| =over  | ||||
| =over | ||||
|  | ||||
| =item $trapeze->i_ssidlist() | ||||
|  | ||||
| @@ -1143,7 +1143,7 @@ These emulate the F<CISCO-DOT11-MIB> | ||||
|  | ||||
| (C<trpzClSessClientSessStatsUniPktOut>) | ||||
|  | ||||
| =back  | ||||
| =back | ||||
|  | ||||
| =head2 Table Methods imported from SNMP::Info | ||||
|  | ||||
| @@ -1159,14 +1159,14 @@ See documentation in L<SNMP::Info::Bridge/"TABLE METHODS"> for details. | ||||
|  | ||||
| =item $trapeze->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 thin APs and WLAN virtual interfaces as device | ||||
| interfaces. | ||||
|  | ||||
| =item $trapeze->interfaces() | ||||
|  | ||||
| Returns reference to map of IIDs to ports.  Thin APs are implemented as device  | ||||
| Returns reference to map of IIDs to ports.  Thin APs are implemented as device | ||||
| interfaces.  The thin AP MAC address and Slot ID trapeze_apif_slot() are | ||||
| used as the port identifier. | ||||
|  | ||||
| @@ -1211,7 +1211,7 @@ the interface iid. | ||||
| =item $trapeze->fw_port() | ||||
|  | ||||
| Returns reference to a hash, value being mac and | ||||
| trapeze_sta_slot() combined to match the interface iid.   | ||||
| trapeze_sta_slot() combined to match the interface iid. | ||||
|  | ||||
| =item $trapeze->fw_mac() | ||||
|  | ||||
|   | ||||
| @@ -130,11 +130,11 @@ sub model { | ||||
|         next unless defined $prod; | ||||
|         return $prod; | ||||
|     } | ||||
|      | ||||
|  | ||||
|     my $desc = $ubnt->description() || ''; | ||||
|      | ||||
|  | ||||
|     ## Pull Model from beginning of description, separated by comma (EdgeSwitch) | ||||
|     if((lc $desc) =~ /^edgeswitch/){     | ||||
|     if((lc $desc) =~ /^edgeswitch/){ | ||||
|         my @mydesc = split(/, /, $desc); | ||||
|         return $mydesc[0]; | ||||
|     } | ||||
| @@ -151,15 +151,15 @@ sub model { | ||||
|         my $ethCount = 0; | ||||
|         my $switchCount = 0; | ||||
|         #my $sfpCount = 0; | ||||
|         #my $poeCount = 0;   | ||||
|         my $memTotalReal = $ubnt->memTotalReal;    | ||||
|         #my $poeCount = 0; | ||||
|         my $memTotalReal = $ubnt->memTotalReal; | ||||
|         my $cpuLoad = $ubnt->hrProcessorLoad; | ||||
|         my $cpuCount = 0; | ||||
|         ## My perl is lacking. Not sure if there's a more efficient way to find the cpu count | ||||
|         foreach my $iid ( keys %$cpuLoad ) { | ||||
|             $cpuCount++; | ||||
|         } | ||||
|          | ||||
|  | ||||
|         my $ifDescs = $ubnt->ifDescr; | ||||
|         foreach my $iid ( keys %$ifDescs ) { | ||||
|             my $ifDesc = $ifDescs->{$iid}; | ||||
| @@ -172,7 +172,7 @@ sub model { | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         ## If people have other models to further fine-tune this logic that would be great.  | ||||
|         ## If people have other models to further fine-tune this logic that would be great. | ||||
|         if($ethCount eq 9){ | ||||
|             ## Should be ER Infinity | ||||
|             return "EdgeRouter Infinity" | ||||
| @@ -190,7 +190,7 @@ sub model { | ||||
|             ## failback string | ||||
|             return "EdgeRouter eth-$ethCount switch-$switchCount mem-$memTotalReal cpuNum-$cpuCount"; | ||||
|         } | ||||
|          | ||||
|  | ||||
|     } | ||||
| } | ||||
|  | ||||
| @@ -221,14 +221,12 @@ sub mac { | ||||
|  | ||||
|             # syntax stolen from sub munge_mac in SNMP::Info | ||||
|             $mac = lc join( ':', map { sprintf "%02x", $_ } unpack( 'C*', $mac ) ); | ||||
|             return $mac if $mac =~ /^([0-9A-F][0-9A-F]:){5}[0-9A-F][0-9A-F]$/i;   | ||||
|              | ||||
|             return $mac if $mac =~ /^([0-9A-F][0-9A-F]:){5}[0-9A-F][0-9A-F]$/i; | ||||
|         } | ||||
|     } | ||||
|      | ||||
|  | ||||
|     # MAC malformed or missing | ||||
|     return; | ||||
|  | ||||
| } | ||||
|  | ||||
| sub interfaces { | ||||
| @@ -288,14 +286,14 @@ Max Kosmach | ||||
|  | ||||
| =head1 SYNOPSIS | ||||
|  | ||||
|  # Let SNMP::Info determine the correct subclass for you.  | ||||
|  # Let SNMP::Info determine the correct subclass for you. | ||||
|  my $ubnt = new SNMP::Info( | ||||
|                           AutoSpecify => 1, | ||||
|                           Debug       => 1, | ||||
|                           DestHost    => 'myswitch', | ||||
|                           Community   => 'public', | ||||
|                           Version     => 2 | ||||
|                         )  | ||||
|                         ) | ||||
|     or die "Can't connect to DestHost.\n"; | ||||
|  | ||||
|  my $class = $ubnt->class(); | ||||
| @@ -307,7 +305,7 @@ Provides abstraction to the configuration information obtainable from | ||||
| Ubiquiti Access Point through SNMP. | ||||
|  | ||||
| For speed or debugging purposes you can call the subclass directly, but not | ||||
| after determining a more specific class using the method above.  | ||||
| after determining a more specific class using the method above. | ||||
|  | ||||
|  my $ubnt = new SNMP::Info::Layer2::Ubiquiti(...); | ||||
|  | ||||
|   | ||||
| @@ -103,7 +103,7 @@ sub ip { | ||||
|     my $found_ip; | ||||
|  | ||||
|     # Since hashes are random add sort so we get the same address each time | ||||
|     # if there happens to be more than one. Will return highest numbered address  | ||||
|     # if there happens to be more than one. Will return highest numbered address | ||||
|     foreach my $ip ( sort keys %{$ip_hash} ) { | ||||
|         $found_ip = $ip | ||||
|             if ( defined $ip | ||||
| @@ -124,14 +124,14 @@ Dmitry Sergienko (C<dmitry@trifle.net>) | ||||
|  | ||||
| =head1 SYNOPSIS | ||||
|  | ||||
|  # Let SNMP::Info determine the correct subclass for you.  | ||||
|  # Let SNMP::Info determine the correct subclass for you. | ||||
|  my $zyxel = new SNMP::Info( | ||||
|                           AutoSpecify => 1, | ||||
|                           Debug       => 1, | ||||
|                           DestHost    => 'myhub', | ||||
|                           Community   => 'public', | ||||
|                           Version     => 1 | ||||
|                         )  | ||||
|                         ) | ||||
|     or die "Can't connect to DestHost.\n"; | ||||
|  | ||||
|  my $class      = $l2->class(); | ||||
| @@ -139,8 +139,8 @@ Dmitry Sergienko (C<dmitry@trifle.net>) | ||||
|  | ||||
| =head1 DESCRIPTION | ||||
|  | ||||
| Provides abstraction to the configuration information obtainable from a  | ||||
| ZyXEL device through SNMP. See inherited classes' documentation for  | ||||
| Provides abstraction to the configuration information obtainable from a | ||||
| ZyXEL device through SNMP. See inherited classes' documentation for | ||||
| inherited methods. | ||||
|  | ||||
| =head2 Inherited Classes | ||||
| @@ -178,7 +178,7 @@ Returns 'ZyXEL' :) | ||||
|  | ||||
| =item $zyxel->os() | ||||
|  | ||||
| Returns 'ZyXEL'  | ||||
| Returns 'ZyXEL' | ||||
|  | ||||
| =item $zyxel->os_ver() | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user