Compare commits

...

34 Commits
3.55 ... 3.61

Author SHA1 Message Date
Eric A. Miller
a1769aa905 release 3.61 2018-05-09 23:17:09 -04:00
Eric A. Miller
78119d6547 #252 Unpack binary MAC if present in cdp_port
Fix SNMPv1 cdp_run check
2018-05-09 22:49:53 -04:00
Eric A. Miller
f27d76fa9d Use munge_mac() to unpack MACs 2018-05-09 22:44:24 -04:00
Eric A. Miller
4f8534169a Use NetAddr::IP::Lite to determine if EIGRP peer is a valid IP 2018-05-09 22:42:59 -04:00
Eric A. Miller
f531c9d9a7 #261 EIGRP Peer Neighbor Formatting / Munge 2018-05-07 23:08:19 -04:00
Eric A. Miller
1a80138026 #195 IP address table - IPv4 Address Table will use the IP-MIB::ipAddressTable if the deprecated IP-MIB::ipAddrTable doesn't return results 2018-05-07 21:09:16 -04:00
Eric A. Miller
4ff904f3cd If we were given an IPv6 transport-specifier strip it before trying to resolve it
Since DestHost defaults to 'localhost' die instead of returning undef from resolve_desthost()
2018-05-06 20:26:51 -04:00
Eric A. Miller
721193ccb8 #255 IPv6 support 2018-05-06 14:02:35 -04:00
Eric A. Miller
b263fa4375 release 3.60 2018-05-06 11:01:00 -04:00
Eric A. Miller
4681004b52 Fix potential issue in enumeration of LLDP reported system capabilities supported by the remote system due to the 'lldpRemSysCapSupported' leaf name being defined in multiple MIBs 2018-05-06 10:51:19 -04:00
Eric A. Miller
0ab688964f Don't capture 'Hive' if it exists in aerohive AP model name 2018-05-06 09:32:35 -04:00
Oliver Gorwits
7e0ef60e24 update changelog 2018-05-05 16:27:09 +01:00
inphobia
41339c8df4 detect ap250 & ap230 models (#263)
it seems aerohive changed the their model names in snmp, so they no langer always begin with "hive". i have access to models 120, 121, 230 & 250. this is their sysdescr:

SNMPv2-MIB::sysDescr.0 = STRING: AP250, HiveOS 8.3r2 build-191018
SNMPv2-MIB::sysDescr.0 = STRING: AP230, HiveOS 6.5r8b build-179369
SNMPv2-MIB::sysDescr.0 = STRING: HiveAP121, HiveOS 6.5r8b build-179369
SNMPv2-MIB::sysDescr.0 = STRING: HiveAP120, HiveOS 6.5r3 Honolulu build2530

this fixes empty model names for the 230 & 250 ones while still supporting 120 & 121

Class SNMP::Info::Layer2::Aerohive (3.59) loaded from SNMP::Info 3.59.
Connected to hiveap211.
Detected Class: SNMP::Info::Layer2::Aerohive
Using    Class: SNMP::Info::Layer2::Aerohive (-c to change)

Fetching base info...

vendor               aerohive
model                AP250
os                   hiveos
os_ver               8.3r2
description          AP250, HiveOS 8.3r2 build-191018
contact              admin@aerohive.com



Class SNMP::Info::Layer2::Aerohive (3.59) loaded from SNMP::Info 3.59.
Connected to hiveap113.
Detected Class: SNMP::Info::Layer2::Aerohive
Using    Class: SNMP::Info::Layer2::Aerohive (-c to change)

Fetching base info...

vendor               aerohive
model                HiveAP121
os                   hiveos
os_ver               6.5r8b
description          HiveAP121, HiveOS 6.5r8b build-179369
contact              admin@aerohive.com
2018-05-05 16:19:39 +01:00
Eric A. Miller
119c077d25 Some devices use ifIndex when LLDP remote type is 'local', don't lldpRemPortId in these cases when it contains all digits
Cover LLDP class with tests
2018-05-04 17:23:44 -04:00
Eric A. Miller
9af3f7c579 #140 LLDP fixes - treat remote port type of 'local' as an interface name 2018-05-02 22:47:46 -04:00
Eric A. Miller
e7c93b7abd release 3.59 2018-05-01 23:18:16 -04:00
Eric A. Miller
20b655c7a2 POD 2018-05-01 23:13:00 -04:00
Eric A. Miller
9fca5b1e42 Change _lldp_addr_index to a method so it can be properly overridden in subclasses 2018-05-01 23:01:56 -04:00
Eric A. Miller
1c581f8e8f Capture base MAC in L3::Huawei
Capture fan and power supply status in L3::Huawei when description is not available
2018-05-01 22:19:39 -04:00
Eric A. Miller
8d35e15624 #214 SNMP::Info Device models Genua, ATMedia, Liebert 2018-04-30 23:36:47 -04:00
Eric A. Miller
cf42fe1496 release 3.58 2018-04-29 23:47:25 -04:00
Eric A. Miller
1af11bd088 #220 Alcatel-Lucent / Nokia SR 7750 missing port information. Add duplex, fan, and power supply status, as well as, module inventory to L3::Timetra 2018-04-29 23:35:09 -04:00
Eric A. Miller
073ec319e7 perltidy updates 2018-04-29 13:01:32 -04:00
Eric A. Miller
5852c3548b #202 Support for Aerohive access points 2018-04-29 12:20:43 -04:00
Eric A. Miller
2344a1eacf Add fan and power supply status to L3::Huawei
Override ifMTU with max frame size when applicable in L3::Huawei
Correct POE power module to port mapping in L3::Huawei
2018-04-29 12:03:05 -04:00
Eric A. Miller
d0887fbea7 release 3.57 2018-04-26 21:17:17 -04:00
Eric A. Miller
e5ebda1b1e Significant performance improvement validating AUTOLOAD methods 2018-04-26 20:53:04 -04:00
Eric A. Miller
8d1681dbfc Validate funcs and globals rather than using can() to avoid unintended side effects 2018-04-26 20:48:02 -04:00
Eric A. Miller
7221797826 Fix for macsuck in Cisco classes introduced in 3.55 caused by inheritance issue in CiscoStack 2018-04-26 20:44:31 -04:00
Eric A. Miller
f2fdbb077c #145 Patch for Huawei (robwwd)
#228 Huawei aggregate link support
POE and duplex admin support added to L3::Huawei
2018-04-25 22:44:13 -04:00
Eric A. Miller
a6fdb107b4 Return empty hash peth_port_ifindex() for consistency
Cover PowerEthernet methods with tests
2018-04-25 22:34:55 -04:00
Eric A. Miller
7f31038462 IEEE802dot3ad portlist is indexed with a dot1dBasePort, cross reference with dot1dBasePortIfIndex 2018-04-25 22:33:08 -04:00
Eric A. Miller
5fb7c78619 release 3.56 2018-04-22 01:00:30 -04:00
Eric A. Miller
603345205a Fix table methods when defined as an OID which will not completely translate to a fully qualified textual leaf 2018-04-22 00:30:31 -04:00
150 changed files with 4967 additions and 899 deletions

18
.perltidyrc Normal file
View File

@@ -0,0 +1,18 @@
# .perltidyrc - PBP perltidy configuration file for SNMP::Info
# $Id$
-l=78 # Max line width is 78 cols
-i=4 # Indent level is 4 cols
-ci=4 # Continuation indent is 4 cols
-nst # Output to STDOUT
-se # Errors to STDERR
-vt=2 # Maximal vertical tightness
-cti=0 # No extra indentation for closing brackets
-pt=1 # Medium parenthesis tightness
-bt=1 # Medium brace tightness
-sbt=1 # Medium square bracket tightness
-bbt=1 # Medium block brace tightness
-nsfs # No space before semicolons
-nolq # Don't outdent long quoted strings
-wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= && += -= /= |= >>= ||= .= %= ^= x=" # Break before all operators

View File

@@ -12,7 +12,7 @@ before_install:
- mkdir ~/netdisco-mibs
- cd ~/netdisco-mibs
install:
- curl -sL https://github.com/netdisco/netdisco-mibs/releases/download/4.008/netdisco-mibs.tar.gz | tar --strip-components=1 -zxf -
- curl -sL https://github.com/netdisco/netdisco-mibs/releases/download/4.010/netdisco-mibs.tar.gz | tar --strip-components=1 -zxf -
- cpanm --quiet --notest PkgConfig Test::CChecker Alien::zlib::Static Alien::OpenSSL::Static Alien::SNMP::MAXTC
before_script:
- 'cd ${TRAVIS_BUILD_DIR}'

View File

@@ -16,6 +16,7 @@ Module::Build->new(
requires => {
'SNMP' => '0',
'Math::BigInt' => '0',
'NetAddr::IP' => '4.068',
},
recommends => {
'PPI' => '0',

86
Changes
View File

@@ -1,3 +1,89 @@
Version 3.61 (2018-05-09)
[ENHANCEMENTS]
* #255 IPv6 support - Set the transport-specifier if given an IPv6 address
* #195 IP address table - IPv4 Address Table will use the
IP-MIB::ipAddressTable if the deprecated IP-MIB::ipAddrTable doesn't
return results
[BUG FIXES]
* #261 EIGRP Peer Neighbor Formatting / Munge
* #252 Unpack binary MAC if present in cdp_port
* Fix SNMPv1 cdp_run check
Version 3.60 (2018-05-06)
[ENHANCEMENTS]
* #263 detect Aerohive ap250 & ap230 models (inphobia)
[BUG FIXES]
* #140 LLDP fixes - treat remote port type of 'local' as an interface name if
the remote port id doesn't look like an index
* Fix potential issue in enumeration of LLDP reported system capabilities
supported by the remote system due to the 'lldpRemSysCapSupported' leaf
name being defined in multiple MIBs
Version 3.59 (2018-05-01)
[NEW FEATURES]
* #214 SNMP::Info Device models Genua, ATMedia, Liebert
[ENHANCEMENTS]
* Capture base MAC in L3::Huawei
* Change _lldp_addr_index to a method so it can be properly overridden in
subclasses
[BUG FIXES]
* Capture fan ans power supply status in L3::Huawei when description is
not available
Version 3.58 (2018-04-29)
[NEW FEATURES]
* #202 Support for Aerohive access points
[ENHANCEMENTS]
* #220 Alcatel-Lucent / Nokia SR 7750 missing port information. Add duplex,
fan, and power supply status, as well as, module inventory to L3::Timetra
* Add fan and power supply status to L3::Huawei
* Override ifMTU with max frame size when applicable in L3::Huawei
[BUG FIXES]
* Correct POE power module to port mapping in L3::Huawei
Version 3.57 (2018-04-26)
[ENHANCEMENTS]
* #145 Patch for Huawei (robwwd)
* #228 Huawei aggregate link support
* POE and duplex admin support added to L3::Huawei
* Significant performance improvement validating AUTOLOAD methods
[BUG FIXES]
* IEEE802dot3ad portlist is indexed with a dot1dBasePort, cross reference
with dot1dBasePortIfIndex
* Fix for macsuck in Cisco classes introduced in 3.55 caused by inheritance
issue in CiscoStack
Version 3.56 (2018-04-22)
[BUG FIXES]
* Fix table methods when defined as an OID which will not completely
translate to a fully qualified textual leaf
Version 3.55 (2018-04-19)
[NEW FEATURES]

View File

@@ -1,3 +1,4 @@
.perltidyrc
Build.PL
Changes
contrib/DEVELOP
@@ -41,9 +42,11 @@ lib/SNMP/Info/Layer1/S3000.pm
lib/SNMP/Info/Layer2.pm
lib/SNMP/Info/Layer2/3Com.pm
lib/SNMP/Info/Layer2/Adtran.pm
lib/SNMP/Info/Layer2/Aerohive.pm
lib/SNMP/Info/Layer2/Airespace.pm
lib/SNMP/Info/Layer2/Aironet.pm
lib/SNMP/Info/Layer2/Allied.pm
lib/SNMP/Info/Layer2/Atmedia.pm
lib/SNMP/Info/Layer2/Baystack.pm
lib/SNMP/Info/Layer2/C1900.pm
lib/SNMP/Info/Layer2/C2900.pm
@@ -93,6 +96,7 @@ lib/SNMP/Info/Layer3/F5.pm
lib/SNMP/Info/Layer3/Force10.pm
lib/SNMP/Info/Layer3/Fortinet.pm
lib/SNMP/Info/Layer3/Foundry.pm
lib/SNMP/Info/Layer3/Genua.pm
lib/SNMP/Info/Layer3/H3C.pm
lib/SNMP/Info/Layer3/HP9300.pm
lib/SNMP/Info/Layer3/Huawei.pm
@@ -123,6 +127,7 @@ lib/SNMP/Info/Layer7/APC.pm
lib/SNMP/Info/Layer7/Arbor.pm
lib/SNMP/Info/Layer7/CiscoIPS.pm
lib/SNMP/Info/Layer7/Gigamon.pm
lib/SNMP/Info/Layer7/Liebert.pm
lib/SNMP/Info/Layer7/Neoteris.pm
lib/SNMP/Info/Layer7/Netscaler.pm
lib/SNMP/Info/LLDP.pm
@@ -163,7 +168,6 @@ xt/lib/Test/SNMP/Info/CiscoPortSecurity.pm
xt/lib/Test/SNMP/Info/CiscoPower.pm
xt/lib/Test/SNMP/Info/CiscoQOS.pm
xt/lib/Test/SNMP/Info/CiscoRTT.pm
xt/lib/Test/SNMP/Info/CiscoStack.pm
xt/lib/Test/SNMP/Info/CiscoStats.pm
xt/lib/Test/SNMP/Info/CiscoStpExtensions.pm
xt/lib/Test/SNMP/Info/CiscoVTP.pm
@@ -182,9 +186,11 @@ xt/lib/Test/SNMP/Info/Layer1/Cyclades.pm
xt/lib/Test/SNMP/Info/Layer1/S3000.pm
xt/lib/Test/SNMP/Info/Layer2.pm
xt/lib/Test/SNMP/Info/Layer2/3Com.pm
xt/lib/Test/SNMP/Info/Layer2/Aerohive.pm
xt/lib/Test/SNMP/Info/Layer2/Airespace.pm
xt/lib/Test/SNMP/Info/Layer2/Aironet.pm
xt/lib/Test/SNMP/Info/Layer2/Allied.pm
xt/lib/Test/SNMP/Info/Layer2/Atmedia.pm
xt/lib/Test/SNMP/Info/Layer2/Baystack.pm
xt/lib/Test/SNMP/Info/Layer2/C1900.pm
xt/lib/Test/SNMP/Info/Layer2/C2900.pm
@@ -234,6 +240,7 @@ xt/lib/Test/SNMP/Info/Layer3/F5.pm
xt/lib/Test/SNMP/Info/Layer3/Force10.pm
xt/lib/Test/SNMP/Info/Layer3/Fortinet.pm
xt/lib/Test/SNMP/Info/Layer3/Foundry.pm
xt/lib/Test/SNMP/Info/Layer3/Genua.pm
xt/lib/Test/SNMP/Info/Layer3/H3C.pm
xt/lib/Test/SNMP/Info/Layer3/HP9300.pm
xt/lib/Test/SNMP/Info/Layer3/Huawei.pm
@@ -264,6 +271,7 @@ xt/lib/Test/SNMP/Info/Layer7/APC.pm
xt/lib/Test/SNMP/Info/Layer7/Arbor.pm
xt/lib/Test/SNMP/Info/Layer7/CiscoIPS.pm
xt/lib/Test/SNMP/Info/Layer7/Gigamon.pm
xt/lib/Test/SNMP/Info/Layer7/Liebert.pm
xt/lib/Test/SNMP/Info/Layer7/Neoteris.pm
xt/lib/Test/SNMP/Info/Layer7/Netscaler.pm
xt/lib/Test/SNMP/Info/LLDP.pm

267
META.json
View File

@@ -29,6 +29,7 @@
},
"requires" : {
"Math::BigInt" : "0",
"NetAddr::IP" : "4.068",
"SNMP" : "0"
}
},
@@ -49,499 +50,515 @@
"provides" : {
"SNMP::Info" : {
"file" : "lib/SNMP/Info.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::AMAP" : {
"file" : "lib/SNMP/Info/AMAP.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::AdslLine" : {
"file" : "lib/SNMP/Info/AdslLine.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Aggregate" : {
"file" : "lib/SNMP/Info/Aggregate.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Airespace" : {
"file" : "lib/SNMP/Info/Airespace.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Bridge" : {
"file" : "lib/SNMP/Info/Bridge.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::CDP" : {
"file" : "lib/SNMP/Info/CDP.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::CiscoAgg" : {
"file" : "lib/SNMP/Info/CiscoAgg.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::CiscoConfig" : {
"file" : "lib/SNMP/Info/CiscoConfig.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::CiscoPortSecurity" : {
"file" : "lib/SNMP/Info/CiscoPortSecurity.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::CiscoPower" : {
"file" : "lib/SNMP/Info/CiscoPower.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::CiscoQOS" : {
"file" : "lib/SNMP/Info/CiscoQOS.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::CiscoRTT" : {
"file" : "lib/SNMP/Info/CiscoRTT.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::CiscoStack" : {
"file" : "lib/SNMP/Info/CiscoStack.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::CiscoStats" : {
"file" : "lib/SNMP/Info/CiscoStats.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::CiscoStpExtensions" : {
"file" : "lib/SNMP/Info/CiscoStpExtensions.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::CiscoVTP" : {
"file" : "lib/SNMP/Info/CiscoVTP.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::EDP" : {
"file" : "lib/SNMP/Info/EDP.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Entity" : {
"file" : "lib/SNMP/Info/Entity.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::EtherLike" : {
"file" : "lib/SNMP/Info/EtherLike.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::FDP" : {
"file" : "lib/SNMP/Info/FDP.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::IEEE802dot11" : {
"file" : "lib/SNMP/Info/IEEE802dot11.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::IEEE802dot3ad" : {
"file" : "lib/SNMP/Info/IEEE802dot3ad.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::IPv6" : {
"file" : "lib/SNMP/Info/IPv6.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::LLDP" : {
"file" : "lib/SNMP/Info/LLDP.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer1" : {
"file" : "lib/SNMP/Info/Layer1.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer1::Allied" : {
"file" : "lib/SNMP/Info/Layer1/Allied.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer1::Asante" : {
"file" : "lib/SNMP/Info/Layer1/Asante.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer1::Bayhub" : {
"file" : "lib/SNMP/Info/Layer1/Bayhub.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer1::Cyclades" : {
"file" : "lib/SNMP/Info/Layer1/Cyclades.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer1::S3000" : {
"file" : "lib/SNMP/Info/Layer1/S3000.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2" : {
"file" : "lib/SNMP/Info/Layer2.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::3Com" : {
"file" : "lib/SNMP/Info/Layer2/3Com.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::Adtran" : {
"file" : "lib/SNMP/Info/Layer2/Adtran.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::Aerohive" : {
"file" : "lib/SNMP/Info/Layer2/Aerohive.pm",
"version" : "3.61"
},
"SNMP::Info::Layer2::Airespace" : {
"file" : "lib/SNMP/Info/Layer2/Airespace.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::Aironet" : {
"file" : "lib/SNMP/Info/Layer2/Aironet.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::Allied" : {
"file" : "lib/SNMP/Info/Layer2/Allied.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::Atmedia" : {
"file" : "lib/SNMP/Info/Layer2/Atmedia.pm",
"version" : "3.61"
},
"SNMP::Info::Layer2::Baystack" : {
"file" : "lib/SNMP/Info/Layer2/Baystack.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::C1900" : {
"file" : "lib/SNMP/Info/Layer2/C1900.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::C2900" : {
"file" : "lib/SNMP/Info/Layer2/C2900.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::Catalyst" : {
"file" : "lib/SNMP/Info/Layer2/Catalyst.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::Centillion" : {
"file" : "lib/SNMP/Info/Layer2/Centillion.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::Cisco" : {
"file" : "lib/SNMP/Info/Layer2/Cisco.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::CiscoSB" : {
"file" : "lib/SNMP/Info/Layer2/CiscoSB.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::HP" : {
"file" : "lib/SNMP/Info/Layer2/HP.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::HP4000" : {
"file" : "lib/SNMP/Info/Layer2/HP4000.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::HPVC" : {
"file" : "lib/SNMP/Info/Layer2/HPVC.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::Kentrox" : {
"file" : "lib/SNMP/Info/Layer2/Kentrox.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::N2270" : {
"file" : "lib/SNMP/Info/Layer2/N2270.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::NAP222x" : {
"file" : "lib/SNMP/Info/Layer2/NAP222x.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::NWSS2300" : {
"file" : "lib/SNMP/Info/Layer2/NWSS2300.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::Netgear" : {
"file" : "lib/SNMP/Info/Layer2/Netgear.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::Nexans" : {
"file" : "lib/SNMP/Info/Layer2/Nexans.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::Orinoco" : {
"file" : "lib/SNMP/Info/Layer2/Orinoco.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::Sixnet" : {
"file" : "lib/SNMP/Info/Layer2/Sixnet.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::Trapeze" : {
"file" : "lib/SNMP/Info/Layer2/Trapeze.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::Ubiquiti" : {
"file" : "lib/SNMP/Info/Layer2/Ubiquiti.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer2::ZyXEL_DSLAM" : {
"file" : "lib/SNMP/Info/Layer2/ZyXEL_DSLAM.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3" : {
"file" : "lib/SNMP/Info/Layer3.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Aironet" : {
"file" : "lib/SNMP/Info/Layer3/Aironet.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::AlcatelLucent" : {
"file" : "lib/SNMP/Info/Layer3/AlcatelLucent.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::AlteonAD" : {
"file" : "lib/SNMP/Info/Layer3/AlteonAD.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Altiga" : {
"file" : "lib/SNMP/Info/Layer3/Altiga.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Arista" : {
"file" : "lib/SNMP/Info/Layer3/Arista.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Aruba" : {
"file" : "lib/SNMP/Info/Layer3/Aruba.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::BayRS" : {
"file" : "lib/SNMP/Info/Layer3/BayRS.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::BlueCoatSG" : {
"file" : "lib/SNMP/Info/Layer3/BlueCoatSG.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::C3550" : {
"file" : "lib/SNMP/Info/Layer3/C3550.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::C4000" : {
"file" : "lib/SNMP/Info/Layer3/C4000.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::C6500" : {
"file" : "lib/SNMP/Info/Layer3/C6500.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::CheckPoint" : {
"file" : "lib/SNMP/Info/Layer3/CheckPoint.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Cisco" : {
"file" : "lib/SNMP/Info/Layer3/Cisco.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::CiscoASA" : {
"file" : "lib/SNMP/Info/Layer3/CiscoASA.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::CiscoFWSM" : {
"file" : "lib/SNMP/Info/Layer3/CiscoFWSM.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::CiscoSwitch" : {
"file" : "lib/SNMP/Info/Layer3/CiscoSwitch.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Contivity" : {
"file" : "lib/SNMP/Info/Layer3/Contivity.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Cumulus" : {
"file" : "lib/SNMP/Info/Layer3/Cumulus.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::DLink" : {
"file" : "lib/SNMP/Info/Layer3/DLink.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Dell" : {
"file" : "lib/SNMP/Info/Layer3/Dell.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::ERX" : {
"file" : "lib/SNMP/Info/Layer3/ERX.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Enterasys" : {
"file" : "lib/SNMP/Info/Layer3/Enterasys.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Extreme" : {
"file" : "lib/SNMP/Info/Layer3/Extreme.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::F5" : {
"file" : "lib/SNMP/Info/Layer3/F5.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Force10" : {
"file" : "lib/SNMP/Info/Layer3/Force10.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Fortinet" : {
"file" : "lib/SNMP/Info/Layer3/Fortinet.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Foundry" : {
"file" : "lib/SNMP/Info/Layer3/Foundry.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Genua" : {
"file" : "lib/SNMP/Info/Layer3/Genua.pm",
"version" : "3.61"
},
"SNMP::Info::Layer3::H3C" : {
"file" : "lib/SNMP/Info/Layer3/H3C.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::HP9300" : {
"file" : "lib/SNMP/Info/Layer3/HP9300.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Huawei" : {
"file" : "lib/SNMP/Info/Layer3/Huawei.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::IBMGbTor" : {
"file" : "lib/SNMP/Info/Layer3/IBMGbTor.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Juniper" : {
"file" : "lib/SNMP/Info/Layer3/Juniper.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Lantronix" : {
"file" : "lib/SNMP/Info/Layer3/Lantronix.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Microsoft" : {
"file" : "lib/SNMP/Info/Layer3/Microsoft.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Mikrotik" : {
"file" : "lib/SNMP/Info/Layer3/Mikrotik.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::N1600" : {
"file" : "lib/SNMP/Info/Layer3/N1600.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::NetSNMP" : {
"file" : "lib/SNMP/Info/Layer3/NetSNMP.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Netscreen" : {
"file" : "lib/SNMP/Info/Layer3/Netscreen.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Nexus" : {
"file" : "lib/SNMP/Info/Layer3/Nexus.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::OneAccess" : {
"file" : "lib/SNMP/Info/Layer3/OneAccess.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::PacketFront" : {
"file" : "lib/SNMP/Info/Layer3/PacketFront.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::PaloAlto" : {
"file" : "lib/SNMP/Info/Layer3/PaloAlto.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Passport" : {
"file" : "lib/SNMP/Info/Layer3/Passport.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Pf" : {
"file" : "lib/SNMP/Info/Layer3/Pf.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Pica8" : {
"file" : "lib/SNMP/Info/Layer3/Pica8.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::SonicWALL" : {
"file" : "lib/SNMP/Info/Layer3/SonicWALL.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Steelhead" : {
"file" : "lib/SNMP/Info/Layer3/Steelhead.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Sun" : {
"file" : "lib/SNMP/Info/Layer3/Sun.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Tasman" : {
"file" : "lib/SNMP/Info/Layer3/Tasman.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::Timetra" : {
"file" : "lib/SNMP/Info/Layer3/Timetra.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::VMware" : {
"file" : "lib/SNMP/Info/Layer3/VMware.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer3::VyOS" : {
"file" : "lib/SNMP/Info/Layer3/VyOS.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer7" : {
"file" : "lib/SNMP/Info/Layer7.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer7::APC" : {
"file" : "lib/SNMP/Info/Layer7/APC.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer7::Arbor" : {
"file" : "lib/SNMP/Info/Layer7/Arbor.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer7::CiscoIPS" : {
"file" : "lib/SNMP/Info/Layer7/CiscoIPS.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer7::Gigamon" : {
"file" : "lib/SNMP/Info/Layer7/Gigamon.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer7::Liebert" : {
"file" : "lib/SNMP/Info/Layer7/Liebert.pm",
"version" : "3.61"
},
"SNMP::Info::Layer7::Neoteris" : {
"file" : "lib/SNMP/Info/Layer7/Neoteris.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::Layer7::Netscaler" : {
"file" : "lib/SNMP/Info/Layer7/Netscaler.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::MAU" : {
"file" : "lib/SNMP/Info/MAU.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::MRO" : {
"file" : "lib/SNMP/Info/MRO.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::NortelStack" : {
"file" : "lib/SNMP/Info/NortelStack.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::PowerEthernet" : {
"file" : "lib/SNMP/Info/PowerEthernet.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::RapidCity" : {
"file" : "lib/SNMP/Info/RapidCity.pm",
"version" : "3.55"
"version" : "3.61"
},
"SNMP::Info::SONMP" : {
"file" : "lib/SNMP/Info/SONMP.pm",
"version" : "3.55"
"version" : "3.61"
}
},
"release_status" : "stable",
@@ -559,6 +576,6 @@
"x_IRC" : "irc://irc.freenode.org/#netdisco",
"x_MailingList" : "https://lists.sourceforge.net/lists/listinfo/snmp-info-users"
},
"version" : "3.55",
"version" : "3.61",
"x_serialization_backend" : "JSON::PP version 2.97001"
}

263
META.yml
View File

@@ -24,376 +24,388 @@ name: SNMP-Info
provides:
SNMP::Info:
file: lib/SNMP/Info.pm
version: '3.55'
version: '3.61'
SNMP::Info::AMAP:
file: lib/SNMP/Info/AMAP.pm
version: '3.55'
version: '3.61'
SNMP::Info::AdslLine:
file: lib/SNMP/Info/AdslLine.pm
version: '3.55'
version: '3.61'
SNMP::Info::Aggregate:
file: lib/SNMP/Info/Aggregate.pm
version: '3.55'
version: '3.61'
SNMP::Info::Airespace:
file: lib/SNMP/Info/Airespace.pm
version: '3.55'
version: '3.61'
SNMP::Info::Bridge:
file: lib/SNMP/Info/Bridge.pm
version: '3.55'
version: '3.61'
SNMP::Info::CDP:
file: lib/SNMP/Info/CDP.pm
version: '3.55'
version: '3.61'
SNMP::Info::CiscoAgg:
file: lib/SNMP/Info/CiscoAgg.pm
version: '3.55'
version: '3.61'
SNMP::Info::CiscoConfig:
file: lib/SNMP/Info/CiscoConfig.pm
version: '3.55'
version: '3.61'
SNMP::Info::CiscoPortSecurity:
file: lib/SNMP/Info/CiscoPortSecurity.pm
version: '3.55'
version: '3.61'
SNMP::Info::CiscoPower:
file: lib/SNMP/Info/CiscoPower.pm
version: '3.55'
version: '3.61'
SNMP::Info::CiscoQOS:
file: lib/SNMP/Info/CiscoQOS.pm
version: '3.55'
version: '3.61'
SNMP::Info::CiscoRTT:
file: lib/SNMP/Info/CiscoRTT.pm
version: '3.55'
version: '3.61'
SNMP::Info::CiscoStack:
file: lib/SNMP/Info/CiscoStack.pm
version: '3.55'
version: '3.61'
SNMP::Info::CiscoStats:
file: lib/SNMP/Info/CiscoStats.pm
version: '3.55'
version: '3.61'
SNMP::Info::CiscoStpExtensions:
file: lib/SNMP/Info/CiscoStpExtensions.pm
version: '3.55'
version: '3.61'
SNMP::Info::CiscoVTP:
file: lib/SNMP/Info/CiscoVTP.pm
version: '3.55'
version: '3.61'
SNMP::Info::EDP:
file: lib/SNMP/Info/EDP.pm
version: '3.55'
version: '3.61'
SNMP::Info::Entity:
file: lib/SNMP/Info/Entity.pm
version: '3.55'
version: '3.61'
SNMP::Info::EtherLike:
file: lib/SNMP/Info/EtherLike.pm
version: '3.55'
version: '3.61'
SNMP::Info::FDP:
file: lib/SNMP/Info/FDP.pm
version: '3.55'
version: '3.61'
SNMP::Info::IEEE802dot11:
file: lib/SNMP/Info/IEEE802dot11.pm
version: '3.55'
version: '3.61'
SNMP::Info::IEEE802dot3ad:
file: lib/SNMP/Info/IEEE802dot3ad.pm
version: '3.55'
version: '3.61'
SNMP::Info::IPv6:
file: lib/SNMP/Info/IPv6.pm
version: '3.55'
version: '3.61'
SNMP::Info::LLDP:
file: lib/SNMP/Info/LLDP.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer1:
file: lib/SNMP/Info/Layer1.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer1::Allied:
file: lib/SNMP/Info/Layer1/Allied.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer1::Asante:
file: lib/SNMP/Info/Layer1/Asante.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer1::Bayhub:
file: lib/SNMP/Info/Layer1/Bayhub.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer1::Cyclades:
file: lib/SNMP/Info/Layer1/Cyclades.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer1::S3000:
file: lib/SNMP/Info/Layer1/S3000.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2:
file: lib/SNMP/Info/Layer2.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::3Com:
file: lib/SNMP/Info/Layer2/3Com.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::Adtran:
file: lib/SNMP/Info/Layer2/Adtran.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::Aerohive:
file: lib/SNMP/Info/Layer2/Aerohive.pm
version: '3.61'
SNMP::Info::Layer2::Airespace:
file: lib/SNMP/Info/Layer2/Airespace.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::Aironet:
file: lib/SNMP/Info/Layer2/Aironet.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::Allied:
file: lib/SNMP/Info/Layer2/Allied.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::Atmedia:
file: lib/SNMP/Info/Layer2/Atmedia.pm
version: '3.61'
SNMP::Info::Layer2::Baystack:
file: lib/SNMP/Info/Layer2/Baystack.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::C1900:
file: lib/SNMP/Info/Layer2/C1900.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::C2900:
file: lib/SNMP/Info/Layer2/C2900.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::Catalyst:
file: lib/SNMP/Info/Layer2/Catalyst.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::Centillion:
file: lib/SNMP/Info/Layer2/Centillion.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::Cisco:
file: lib/SNMP/Info/Layer2/Cisco.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::CiscoSB:
file: lib/SNMP/Info/Layer2/CiscoSB.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::HP:
file: lib/SNMP/Info/Layer2/HP.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::HP4000:
file: lib/SNMP/Info/Layer2/HP4000.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::HPVC:
file: lib/SNMP/Info/Layer2/HPVC.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::Kentrox:
file: lib/SNMP/Info/Layer2/Kentrox.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::N2270:
file: lib/SNMP/Info/Layer2/N2270.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::NAP222x:
file: lib/SNMP/Info/Layer2/NAP222x.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::NWSS2300:
file: lib/SNMP/Info/Layer2/NWSS2300.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::Netgear:
file: lib/SNMP/Info/Layer2/Netgear.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::Nexans:
file: lib/SNMP/Info/Layer2/Nexans.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::Orinoco:
file: lib/SNMP/Info/Layer2/Orinoco.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::Sixnet:
file: lib/SNMP/Info/Layer2/Sixnet.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::Trapeze:
file: lib/SNMP/Info/Layer2/Trapeze.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::Ubiquiti:
file: lib/SNMP/Info/Layer2/Ubiquiti.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer2::ZyXEL_DSLAM:
file: lib/SNMP/Info/Layer2/ZyXEL_DSLAM.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3:
file: lib/SNMP/Info/Layer3.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Aironet:
file: lib/SNMP/Info/Layer3/Aironet.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::AlcatelLucent:
file: lib/SNMP/Info/Layer3/AlcatelLucent.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::AlteonAD:
file: lib/SNMP/Info/Layer3/AlteonAD.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Altiga:
file: lib/SNMP/Info/Layer3/Altiga.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Arista:
file: lib/SNMP/Info/Layer3/Arista.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Aruba:
file: lib/SNMP/Info/Layer3/Aruba.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::BayRS:
file: lib/SNMP/Info/Layer3/BayRS.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::BlueCoatSG:
file: lib/SNMP/Info/Layer3/BlueCoatSG.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::C3550:
file: lib/SNMP/Info/Layer3/C3550.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::C4000:
file: lib/SNMP/Info/Layer3/C4000.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::C6500:
file: lib/SNMP/Info/Layer3/C6500.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::CheckPoint:
file: lib/SNMP/Info/Layer3/CheckPoint.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Cisco:
file: lib/SNMP/Info/Layer3/Cisco.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::CiscoASA:
file: lib/SNMP/Info/Layer3/CiscoASA.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::CiscoFWSM:
file: lib/SNMP/Info/Layer3/CiscoFWSM.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::CiscoSwitch:
file: lib/SNMP/Info/Layer3/CiscoSwitch.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Contivity:
file: lib/SNMP/Info/Layer3/Contivity.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Cumulus:
file: lib/SNMP/Info/Layer3/Cumulus.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::DLink:
file: lib/SNMP/Info/Layer3/DLink.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Dell:
file: lib/SNMP/Info/Layer3/Dell.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::ERX:
file: lib/SNMP/Info/Layer3/ERX.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Enterasys:
file: lib/SNMP/Info/Layer3/Enterasys.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Extreme:
file: lib/SNMP/Info/Layer3/Extreme.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::F5:
file: lib/SNMP/Info/Layer3/F5.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Force10:
file: lib/SNMP/Info/Layer3/Force10.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Fortinet:
file: lib/SNMP/Info/Layer3/Fortinet.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Foundry:
file: lib/SNMP/Info/Layer3/Foundry.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Genua:
file: lib/SNMP/Info/Layer3/Genua.pm
version: '3.61'
SNMP::Info::Layer3::H3C:
file: lib/SNMP/Info/Layer3/H3C.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::HP9300:
file: lib/SNMP/Info/Layer3/HP9300.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Huawei:
file: lib/SNMP/Info/Layer3/Huawei.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::IBMGbTor:
file: lib/SNMP/Info/Layer3/IBMGbTor.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Juniper:
file: lib/SNMP/Info/Layer3/Juniper.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Lantronix:
file: lib/SNMP/Info/Layer3/Lantronix.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Microsoft:
file: lib/SNMP/Info/Layer3/Microsoft.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Mikrotik:
file: lib/SNMP/Info/Layer3/Mikrotik.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::N1600:
file: lib/SNMP/Info/Layer3/N1600.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::NetSNMP:
file: lib/SNMP/Info/Layer3/NetSNMP.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Netscreen:
file: lib/SNMP/Info/Layer3/Netscreen.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Nexus:
file: lib/SNMP/Info/Layer3/Nexus.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::OneAccess:
file: lib/SNMP/Info/Layer3/OneAccess.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::PacketFront:
file: lib/SNMP/Info/Layer3/PacketFront.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::PaloAlto:
file: lib/SNMP/Info/Layer3/PaloAlto.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Passport:
file: lib/SNMP/Info/Layer3/Passport.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Pf:
file: lib/SNMP/Info/Layer3/Pf.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Pica8:
file: lib/SNMP/Info/Layer3/Pica8.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::SonicWALL:
file: lib/SNMP/Info/Layer3/SonicWALL.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Steelhead:
file: lib/SNMP/Info/Layer3/Steelhead.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Sun:
file: lib/SNMP/Info/Layer3/Sun.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Tasman:
file: lib/SNMP/Info/Layer3/Tasman.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::Timetra:
file: lib/SNMP/Info/Layer3/Timetra.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::VMware:
file: lib/SNMP/Info/Layer3/VMware.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer3::VyOS:
file: lib/SNMP/Info/Layer3/VyOS.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer7:
file: lib/SNMP/Info/Layer7.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer7::APC:
file: lib/SNMP/Info/Layer7/APC.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer7::Arbor:
file: lib/SNMP/Info/Layer7/Arbor.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer7::CiscoIPS:
file: lib/SNMP/Info/Layer7/CiscoIPS.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer7::Gigamon:
file: lib/SNMP/Info/Layer7/Gigamon.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer7::Liebert:
file: lib/SNMP/Info/Layer7/Liebert.pm
version: '3.61'
SNMP::Info::Layer7::Neoteris:
file: lib/SNMP/Info/Layer7/Neoteris.pm
version: '3.55'
version: '3.61'
SNMP::Info::Layer7::Netscaler:
file: lib/SNMP/Info/Layer7/Netscaler.pm
version: '3.55'
version: '3.61'
SNMP::Info::MAU:
file: lib/SNMP/Info/MAU.pm
version: '3.55'
version: '3.61'
SNMP::Info::MRO:
file: lib/SNMP/Info/MRO.pm
version: '3.55'
version: '3.61'
SNMP::Info::NortelStack:
file: lib/SNMP/Info/NortelStack.pm
version: '3.55'
version: '3.61'
SNMP::Info::PowerEthernet:
file: lib/SNMP/Info/PowerEthernet.pm
version: '3.55'
version: '3.61'
SNMP::Info::RapidCity:
file: lib/SNMP/Info/RapidCity.pm
version: '3.55'
version: '3.61'
SNMP::Info::SONMP:
file: lib/SNMP/Info/SONMP.pm
version: '3.55'
version: '3.61'
recommends:
Class::ISA: '0'
File::Slurp: '0'
@@ -402,6 +414,7 @@ recommends:
PPI: '0'
requires:
Math::BigInt: '0'
NetAddr::IP: '4.068'
SNMP: '0'
resources:
IRC: irc://irc.freenode.org/#netdisco
@@ -410,5 +423,5 @@ resources:
homepage: http://netdisco.org/
license: http://opensource.org/licenses/bsd-license.php
repository: https://github.com/netdisco/snmp-info
version: '3.55'
version: '3.61'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'

61
README
View File

@@ -2,7 +2,7 @@ NAME
SNMP::Info - OO Interface to Network devices and MIBs through SNMP
VERSION
SNMP::Info - Version 3.55
SNMP::Info - Version 3.61
AUTHOR
SNMP::Info is maintained by team of Open Source authors headed by Eric
@@ -413,6 +413,11 @@ SUBCLASSES
See documentation in SNMP::Info::Layer2::Adtran for details.
SNMP::Info::Layer2::Aerohive
Subclass for Aerohive Access Points.
See documentation in SNMP::Info::Layer2::Aerohive for details.
SNMP::Info::Layer2::Airespace
Subclass for Cisco (Airespace) wireless controllers.
@@ -429,6 +434,11 @@ SUBCLASSES
See documentation in SNMP::Info::Layer2::Allied for details.
SNMP::Info::Layer2::Atmedia
Subclass for atmedia encryptors.
See documentation in SNMP::Info::Layer2::Atmedia for details.
SNMP::Info::Layer2::Baystack
Subclass for Avaya/Nortel/Bay Ethernet Switch/Baystack switches.
This includes 303, 304, 350, 380, 410, 420, 425, 450, 460, 470
@@ -701,6 +711,11 @@ SUBCLASSES
See documentation in SNMP::Info::Layer3::Foundry for details.
SNMP::Info::Layer3::Genua
Subclass for Genua security devices.
See documentation in SNMP::Info::Layer3::Genua for details.
SNMP::Info::Layer3::H3C
SNMP Interface to Layer 3 Devices, H3C & HP A-series.
@@ -856,6 +871,11 @@ SUBCLASSES
See documentation in SNMP::Info::Layer7::Gigamon for details.
SNMP::Info::Layer7::Liebert
Subclass for Liebert devices
See documentation in SNMP::Info::Layer7::Liebert for details.
SNMP::Info::Layer7::Netscaler
Subclass for Citrix Netscaler appliances
@@ -1382,29 +1402,39 @@ USAGE
("ifSpecific")
IP Address Table
Each entry in this table is an IP address in use on this device. Usually
this is implemented in Layer3 Devices.
IPv4 Address Table
Each entry in this table is an IPv4 address in use on this device.
Usually this is implemented in Layer3 Devices. These methods try the
deprecated IPv4 address table "IP-MIB::ipAddrTable" first due to its
prevalence and will try the current "IP-MIB::ipAddressTable" if it
doesn't return any results. "IP-MIB::ipAddressTable" results are
filtered to only return IPv4 unicast addresses and modified to match the
return format of the older table for backwards compatibility.
See documentation in SNMP::Info::IPv6 for IPv6 Address Table.
$info->ip_index()
Maps the IP Table to the IID
Maps the IPv4 addresses to the interface index
("ipAdEntIfIndex")
("ipAdEntIfIndex") or filtered and index modified
("ipAddressIfIndex")
$info->ip_table()
Maps the Table to the IP address
Maps the Table to the IPv4 address
("ipAdEntAddr")
("ipAdEntAddr") or address extracted from ("ipAddressIfIndex")
$info->ip_netmask()
Gives netmask setting for IP table entry.
Gives netmask setting for IPv4 table entry.
("ipAdEntNetMask")
("ipAdEntNetMask") or netmask calculated from ("ipAddressPrefix")
$info->ip_broadcast()
Gives broadcast address for IP table entry.
Gives the value of the least-significant bit in the IPv4 broadcast
address either 1 or 0.
("ipAdEntBcastAddr")
("ipAdEntBcastAddr"), there is no equivalent from the
"IP-MIB::ipAddressTable"
IP Routing Table
$info->ipr_route()
@@ -1968,6 +1998,13 @@ SNMP::INFO INTERNALS
Takes an OID and return the object name if the right MIB is loaded.
Internally Used Functions
resolve_desthost()
Takes the SNMP::Session "DestHost" argument and determines if it is
an 'IPv4' or 'IPv6' host. 'IPv6' hosts are prefixed with the "udp6:"
"transport-specifier" as required by the undelying "Net-SNMP"
library. If unable to determine the type of address or resolve a DNS
name, dies with "croak".
$info->init()
Used internally. Loads all entries in %MIBS.

View File

@@ -16,6 +16,7 @@ use Exporter;
use SNMP;
use Carp;
use Math::BigInt;
use NetAddr::IP::Lite ':lower';
@SNMP::Info::ISA = qw/Exporter/;
@SNMP::Info::EXPORT_OK = qw//;
@@ -24,7 +25,7 @@ use vars
qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG %SPEED_MAP
$NOSUCH $BIGINT $REPEATERS/;
$VERSION = '3.55';
$VERSION = '3.61';
=head1 NAME
@@ -32,7 +33,7 @@ SNMP::Info - OO Interface to Network devices and MIBs through SNMP
=head1 VERSION
SNMP::Info - Version 3.55
SNMP::Info - Version 3.61
=head1 AUTHOR
@@ -507,6 +508,12 @@ Subclass for Adtran devices.
See documentation in L<SNMP::Info::Layer2::Adtran> for details.
=item SNMP::Info::Layer2::Aerohive
Subclass for Aerohive Access Points.
See documentation in L<SNMP::Info::Layer2::Aerohive> for details.
=item SNMP::Info::Layer2::Airespace
Subclass for Cisco (Airespace) wireless controllers.
@@ -526,6 +533,12 @@ Allied Telesis switches.
See documentation in L<SNMP::Info::Layer2::Allied> for details.
=item SNMP::Info::Layer2::Atmedia
Subclass for atmedia encryptors.
See documentation in L<SNMP::Info::Layer2::Atmedia> for details.
=item SNMP::Info::Layer2::Baystack
Subclass for Avaya/Nortel/Bay Ethernet Switch/Baystack switches. This
@@ -840,6 +853,12 @@ Subclass for Brocade (Foundry) Network devices.
See documentation in L<SNMP::Info::Layer3::Foundry> for details.
=item SNMP::Info::Layer3::Genua
Subclass for Genua security devices.
See documentation in L<SNMP::Info::Layer3::Genua> for details.
=item SNMP::Info::Layer3::H3C
SNMP Interface to Layer 3 Devices, H3C & HP A-series.
@@ -1029,6 +1048,12 @@ Subclass for Gigamon devices
See documentation in L<SNMP::Info::Layer7::Gigamon> for details.
=item SNMP::Info::Layer7::Liebert
Subclass for Liebert devices
See documentation in L<SNMP::Info::Layer7::Liebert> for details.
=item SNMP::Info::Layer7::Netscaler
Subclass for Citrix Netscaler appliances
@@ -1296,6 +1321,11 @@ sub new {
$new_obj->{mibdirs} = $args{MibDirs};
delete $sess_args{MibDirs};
}
# For IPv6 hosts set transport
if ( defined $sess_args{DestHost} ) {
$sess_args{DestHost} = resolve_desthost($sess_args{DestHost});
}
$new_obj->{nosuch} = $args{RetryNoSuch} || $NOSUCH;
@@ -1603,6 +1633,7 @@ sub device_type {
3224 => 'SNMP::Info::Layer3::Netscreen',
3375 => 'SNMP::Info::Layer3::F5',
3417 => 'SNMP::Info::Layer3::BlueCoatSG',
3717 => 'SNMP::Info::Layer3::Genua',
4526 => 'SNMP::Info::Layer2::Netgear',
4874 => 'SNMP::Info::Layer3::ERX',
5624 => 'SNMP::Info::Layer3::Enterasys',
@@ -1629,6 +1660,7 @@ sub device_type {
35098 => 'SNMP::Info::Layer3::Pica8',
41112 => 'SNMP::Info::Layer2::Ubiquiti',
4413 => 'SNMP::Info::Layer2::Ubiquiti',
26928 => 'SNMP::Info::Layer2::Aerohive',
30803 => 'SNMP::Info::Layer3::VyOS',
40310 => 'SNMP::Info::Layer3::Cumulus',
);
@@ -1657,12 +1689,14 @@ sub device_type {
9303 => 'SNMP::Info::Layer3::PacketFront',
10418 => 'SNMP::Info::Layer1::Cyclades',
11898 => 'SNMP::Info::Layer2::Orinoco',
13458 => 'SNMP::Info::Layer2::Atmedia',
14179 => 'SNMP::Info::Layer2::Airespace',
14525 => 'SNMP::Info::Layer2::Trapeze',
14823 => 'SNMP::Info::Layer3::Aruba',
17163 => 'SNMP::Info::Layer3::Steelhead',
20540 => 'SNMP::Info::Layer2::Sixnet',
26543 => 'SNMP::Info::Layer3::IBMGbTor',
26928 => 'SNMP::Info::Layer2::Aerohive',
);
my %l1sysoidmap = (
@@ -1672,6 +1706,7 @@ sub device_type {
my %l7sysoidmap = (
318 => 'SNMP::Info::Layer7::APC',
476 => 'SNMP::Info::Layer7::Liebert',
5951 => 'SNMP::Info::Layer7::Netscaler',
9694 => 'SNMP::Info::Layer7::Arbor',
14525 => 'SNMP::Info::Layer2::Trapeze',
@@ -2525,36 +2560,45 @@ See C<IF-MIB> for full description
=back
=head2 IP Address Table
=head2 IPv4 Address Table
Each entry in this table is an IP address in use on this device. Usually
this is implemented in Layer3 Devices.
Each entry in this table is an IPv4 address in use on this device. Usually
this is implemented in Layer3 Devices. These methods try the deprecated IPv4
address table C<IP-MIB::ipAddrTable> first due to its prevalence and will try
the current C<IP-MIB::ipAddressTable> if it doesn't return any results.
C<IP-MIB::ipAddressTable> results are filtered to only return IPv4 unicast
addresses and modified to match the return format of the older table for
backwards compatibility.
See documentation in L<SNMP::Info::IPv6> for IPv6 Address Table.
=over
=item $info->ip_index()
Maps the IP Table to the IID
Maps the IPv4 addresses to the interface index
(C<ipAdEntIfIndex>)
(C<ipAdEntIfIndex>) or filtered and index modified (C<ipAddressIfIndex>)
=item $info->ip_table()
Maps the Table to the IP address
Maps the Table to the IPv4 address
(C<ipAdEntAddr>)
(C<ipAdEntAddr>) or address extracted from (C<ipAddressIfIndex>)
=item $info->ip_netmask()
Gives netmask setting for IP table entry.
Gives netmask setting for IPv4 table entry.
(C<ipAdEntNetMask>)
(C<ipAdEntNetMask>) or netmask calculated from (C<ipAddressPrefix>)
=item $info->ip_broadcast()
Gives broadcast address for IP table entry.
Gives the value of the least-significant bit in the IPv4 broadcast address
either 1 or 0.
(C<ipAdEntBcastAddr>)
(C<ipAdEntBcastAddr>), there is no equivalent from the
C<IP-MIB::ipAddressTable>
=back
@@ -2735,6 +2779,88 @@ no protocols are supported or running.
=cut
sub ip_index {
my $self = shift;
my $o_ip_idx = $self->old_ip_index();
return $o_ip_idx
if ( ref {} eq ref $o_ip_idx and scalar keys %$o_ip_idx );
# Since callers may be using the old iid to get the IP, strip protocol
# and length from the index
my $n_ip_idx = $self->new_ip_index() || {};
my $n_ip_type = $self->new_ip_type() || {};
my %ip_index;
foreach my $iid ( keys %$n_ip_idx ) {
next unless $n_ip_type->{$iid} and $n_ip_type->{$iid} eq 'unicast';
my @parts = split( /\./, $iid );
my $type = shift(@parts);
my $len = shift(@parts);
next unless ( ( $type == 1 ) and ( $len == 4 ) );
my $new_iid = join( ".", @parts );
$ip_index{$new_iid} = $n_ip_idx->{$iid};
}
return \%ip_index;
}
sub ip_table {
my $self = shift;
my $o_ip_table = $self->old_ip_table();
return $o_ip_table
if ( ref {} eq ref $o_ip_table and scalar keys %$o_ip_table );
my $n_ip_idx = $self->new_ip_index() || {};
my $n_ip_type = $self->new_ip_type() || {};
my %ip_table;
foreach my $iid ( keys %$n_ip_idx ) {
next unless $n_ip_type->{$iid} and $n_ip_type->{$iid} eq 'unicast';
my @parts = split( /\./, $iid );
my $type = shift(@parts);
my $len = shift(@parts);
next unless ( ( $type == 1 ) and ( $len == 4 ) );
my $new_iid = join( ".", @parts );
$ip_table{$new_iid} = $new_iid;
}
return \%ip_table;
}
sub ip_netmask {
my $self = shift;
my $o_ip_mask = $self->old_ip_netmask();
return $o_ip_mask
if ( ref {} eq ref $o_ip_mask and scalar keys %$o_ip_mask );
my $n_ip_pfx = $self->new_ip_prefix() || {};
my $n_ip_type = $self->new_ip_type() || {};
my %ip_netmask;
foreach my $iid ( keys %$n_ip_pfx ) {
next unless $n_ip_type->{$iid} and $n_ip_type->{$iid} eq 'unicast';
my @parts = split( /\./, $iid );
my $type = shift(@parts);
my $len = shift(@parts);
next unless ( ( $type == 1 ) and ( $len == 4 ) );
my $prefix = $n_ip_pfx->{$iid};
next if ( !$prefix || $prefix =~ /0\.0$/ );
if ( $prefix =~ /\.(\d+)$/ ) {
$prefix = $1;
}
my $new_iid = join( ".", @parts );
my $mask = NetAddr::IP::Lite->new( $new_iid . '/' . $prefix )->mask()
|| undef;
$ip_netmask{$new_iid} = $mask;
}
return \%ip_netmask;
}
sub has_topo {
my $self = shift;
@@ -3147,11 +3273,16 @@ ALTEON-TS-PHYSICAL-MIB::agPortCurCfgPortName.
# IF-MIB::IfStackTable
'i_stack_status' => 'ifStackStatus',
# IP::MIB::ipAddrTable (deprecated IPv4 address table)
'ip_index' => 'ipAdEntIfIndex',
'ip_table' => 'ipAdEntAddr',
'ip_netmask' => 'ipAdEntNetMask',
'ip_broadcast' => 'ipAdEntBcastAddr',
# IP-MIB::ipAddrTable (deprecated IPv4 address table)
'old_ip_index' => 'ipAdEntIfIndex',
'old_ip_table' => 'ipAdEntAddr',
'old_ip_netmask' => 'ipAdEntNetMask',
'ip_broadcast' => 'ipAdEntBcastAddr',
# IP-MIB::ipAddressTable
'new_ip_index' => 'ipAddressIfIndex',
'new_ip_prefix' => 'ipAddressPrefix',
'new_ip_type' => 'ipAddressType',
# IF-MIB::ifXTable - Extension Table
'i_speed_high' => 'ifHighSpeed',
@@ -3716,6 +3847,35 @@ sub munge_e_type {
=over
=item resolve_desthost()
Takes the SNMP::Session C<DestHost> argument and determines if it is an
'IPv4' or 'IPv6' host. 'IPv6' hosts are prefixed with the C<udp6:>
C<transport-specifier> as required by the undelying C<Net-SNMP> library.
If unable to determine the type of address or resolve a DNS name, dies with
C<croak>.
=cut
sub resolve_desthost {
my $desthost = shift;
# If we have an IPv6 transport-specifier strip it
$desthost =~ s/^(?:udp6:|udpv6:|udpipv6:)//x;
my $ip = NetAddr::IP::Lite->new($desthost);
if ($ip and $ip->bits == 32) {
return $ip->addr;
}
elsif ($ip and $ip->bits == 128) {
return 'udp6:' . $ip->addr;
}
else {
croak "Unable to resolve DestHost: $desthost to an IP\n";
}
}
=item $info->init()
Used internally. Loads all entries in %MIBS.
@@ -4285,7 +4445,10 @@ sub _load_attr {
# the match to make sure we didn't leave the table during getnext
# requests
my ($leaf) = $qual_leaf =~ /::(\w+)$/;
my ($leaf) = $qual_leaf =~ /::(.+)$/;
# If we weren't able to translate, we'll only have an OID
$leaf = $oid unless defined $leaf;
$self->debug()
and print "SNMP::Info::_load_attr $method : $qual_leaf",
@@ -4482,6 +4645,8 @@ sub snmp_connect_ip {
my $comm = $self->snmp_comm();
return if $self->{Offline};
$ip = resolve_desthost($ip);
return if ( $ip eq '0.0.0.0' ) or ( $ip =~ /^127\./ );
# Create session object
@@ -4511,7 +4676,6 @@ sub snmp_connect_ip {
}
return 1;
}
=item modify_port_list(portlist,offset,replacement)
@@ -4656,7 +4820,12 @@ sub _validate_autoload_method {
}
# Validate that we have proper access for the operation
my $access = $SNMP::MIB{$oid}{'access'} || '';
my $access = '';
# Prevent autovivification by checking that MIB leaf exists
if (exists $SNMP::MIB{$oid}) {
$access = $SNMP::MIB{$oid}{'access'} || '';
}
# If we were given a fully qualified OID because we don't have the MIB
# file, it will translate above but we won't be able to check access so
@@ -4671,16 +4840,26 @@ sub _validate_autoload_method {
}
# If the parent of the leaf has indexes it is contained within a table
my $indexes = $SNMP::MIB{$oid}{'parent'}{'indexes'};
my $table_leaf = 0;
my $table_leaf = 0;
# This is an expensive check so we assume anything in the funcs and globals
# hashes are known. Only for actual MIB leafs should we have to check the
# MIB. If the parent of the leaf has indexes it is contained within a table.
if ($funcs->{$attr}) {
$table_leaf = 1;
}
elsif (!$globals->{$attr}) {
if ( !$globals->{$attr}
&& ( ( defined $indexes && scalar( @{$indexes} ) > 0 )
|| $funcs->{$attr} ))
{
$table_leaf = 1;
}
# Prevent autovivification
if (exists $SNMP::MIB{$oid} &&
exists $SNMP::MIB{$oid}{'parent'} &&
exists $SNMP::MIB{$oid}{'parent'}{'indexes'} &&
defined $SNMP::MIB{$oid}{'parent'}{'indexes'} &&
scalar( @{$SNMP::MIB{$oid}{'parent'}{'indexes'}} ) > 0)
{
$table_leaf = 1;
}
}
# Tag on .0 for %GLOBALS and single instance MIB leafs unless
# the leaf ends in a digit or we are going to use for a set operation

View File

@@ -38,7 +38,7 @@ use SNMP::Info;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS
= ( 'ALCATEL-IND1-INTERSWITCH-PROTOCOL-MIB' => 'aipAMAPRemDeviceType', );

View File

@@ -38,7 +38,7 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = ( 'ADSL-LINE-MIB' => 'adslLineType' );

View File

@@ -38,7 +38,7 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
# Load MIB for leafs referenced within class
%MIBS = ('IF-MIB' => 'ifIndex',);

View File

@@ -39,7 +39,7 @@ use SNMP::Info;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::MIBS,
@@ -508,8 +508,8 @@ sub ip_index {
my $airespace = shift;
my $partial = shift;
my $ip_index = $airespace->orig_ip_index($partial) || {};
my $if_ip = $airespace->airespace_if_ip() || {};
my $ip_index = $airespace->SUPER::ip_index($partial) || {};
my $if_ip = $airespace->airespace_if_ip() || {};
my %ip_index;
foreach my $ip ( keys %$ip_index ) {
@@ -534,9 +534,9 @@ sub ip_netmask {
my $airespace = shift;
my $partial = shift;
my $ip_mask = $airespace->orig_ip_netmask($partial) || {};
my $if_ip = $airespace->airespace_if_ip() || {};
my $if_mask = $airespace->airespace_if_mask() || {};
my $ip_mask = $airespace->SUPER::ip_netmask($partial) || {};
my $if_ip = $airespace->airespace_if_ip() || {};
my $if_mask = $airespace->airespace_if_mask() || {};
my %ip_netmask;
foreach my $ip ( keys %$ip_mask ) {

View File

@@ -42,7 +42,7 @@ use SNMP::Info;
use vars qw/$VERSION $DEBUG %MIBS %FUNCS %GLOBALS %MUNGE $INIT/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
'BRIDGE-MIB' => 'dot1dBaseBridgeAddress',

View File

@@ -43,7 +43,7 @@ use SNMP::Info;
use vars
qw/$VERSION $DEBUG %FUNCS %GLOBALS %MIBS %MUNGE $INIT %CDP_CAPABILITIES/;
$VERSION = '3.55';
$VERSION = '3.61';
# Five data structures required by SNMP::Info
%MIBS = ( 'CISCO-CDP-MIB' => 'cdpGlobalRun' );
@@ -54,7 +54,7 @@ $VERSION = '3.55';
'cdp_run' => 'cdpGlobalRun',
'cdp_interval' => 'cdpGlobalMessageInterval',
'cdp_holdtime' => 'cdpGlobalHoldTime',
'cdp_gid' => 'cdpGlobalDeviceId',
'cdp_gid' => 'cdpGlobalDeviceId',
);
%FUNCS = (
@@ -62,7 +62,7 @@ $VERSION = '3.55';
'cdp_addr' => 'cdpCacheAddress',
'cdp_ver' => 'cdpCacheVersion',
'cdp_dev_id' => 'cdpCacheDeviceId',
'cdp_port' => 'cdpCacheDevicePort',
'cdp_dev_port' => 'cdpCacheDevicePort',
'cdp_platform' => 'cdpCachePlatform',
'cdp_capabilities' => 'cdpCacheCapabilities',
'cdp_domain' => 'cdpCacheVTPMgmtDomain',
@@ -79,7 +79,6 @@ $VERSION = '3.55';
'cdp_capabilities' => \&SNMP::Info::munge_bits,
'cdp_platform' => \&SNMP::Info::munge_null,
'cdp_domain' => \&SNMP::Info::munge_null,
'cdp_port' => \&SNMP::Info::munge_null,
'cdp_ver' => \&SNMP::Info::munge_null,
'cdp_ip' => \&SNMP::Info::munge_ip,
'cdp_power' => \&munge_power,
@@ -110,18 +109,16 @@ sub munge_power {
sub hasCDP {
my $cdp = shift;
my $ver = $cdp->{_version};
# Check the global that is supposed to indicate CDP is running
my $cdp_run = $cdp->cdp_run();
return 1 if $cdp_run;
# SNMP v1 clients dont have the globals
if ( defined $ver and $ver == 1 ) {
my $cdp_ip = $cdp->cdp_ip();
# SNMP v1 clients don't have the globals, fallback
# by checking if it would report neighbors
my $cdp_ip = $cdp->cdp_ip() || {};
return 1 if scalar keys %$cdp_ip;
# See if anything in cdp cache, if so we have cdp
return 1 if ( defined $cdp_ip and scalar( keys %$cdp_ip ) );
return;
}
return $cdp->cdp_run();
return;
}
sub cdp_if {
@@ -219,6 +216,22 @@ sub cdp_id {
return \%cdp_id;
}
sub cdp_port {
my $cdp = shift;
my $partial = shift;
my $ch = $cdp->cdp_dev_port($partial) || {};
my %cdp_port;
foreach my $key ( sort keys %$ch ) {
my $port = $ch->{$key};
next unless $port;
$port = SNMP::Info::munge_mac($port) || SNMP::Info::munge_null($port);
$cdp_port{$key} = $port;
}
return \%cdp_port;
}
1;
__END__

View File

@@ -43,7 +43,7 @@ use SNMP::Info::IEEE802dot3ad 'agg_ports_lag';
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::IEEE802dot3ad::MIBS,

View File

@@ -39,7 +39,7 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
'CISCO-CONFIG-COPY-MIB' => 'ccCopyTable',

View File

@@ -39,7 +39,7 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE %PAECAPABILITIES/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
'CISCO-PORT-SECURITY-MIB' => 'ciscoPortSecurityMIB',

View File

@@ -39,7 +39,7 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = ( 'CISCO-POWER-ETHERNET-EXT-MIB' => 'cpeExtPsePortEntPhyIndex',
'CISCO-CDP-MIB' => 'cdpCachePowerConsumption' );

View File

@@ -39,7 +39,7 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = ( 'CISCO-CLASS-BASED-QOS-MIB' => 'cbQosIfIndex', );

View File

@@ -39,7 +39,7 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = ( 'CISCO-RTTMON-MIB' => 'rttMonCtrlAdminOwner', );

View File

@@ -32,14 +32,13 @@ package SNMP::Info::CiscoStack;
use strict;
use Exporter;
use SNMP::Info;
@SNMP::Info::CiscoStack::ISA = qw/SNMP::Info Exporter/;
@SNMP::Info::CiscoStack::ISA = qw/Exporter/;
@SNMP::Info::CiscoStack::EXPORT_OK = qw//;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE %PORTSTAT/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = ( 'CISCO-STACK-MIB' => 'ciscoStackMIB', );

View File

@@ -42,7 +42,7 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
'SNMPv2-MIB' => 'sysDescr',

View File

@@ -36,7 +36,7 @@ use SNMP::Info::Bridge;
use vars qw/$VERSION $DEBUG %MIBS %FUNCS %GLOBALS %MUNGE %PORTSTAT $INIT/;
$VERSION = '3.55';
$VERSION = '3.61';
@SNMP::Info::CiscoStpExtensions::ISA = qw/SNMP::Info::Bridge SNMP::Info Exporter/;
@SNMP::Info::CiscoStpExtensions::EXPORT_OK = qw//;

View File

@@ -41,7 +41,7 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
'CISCO-VTP-MIB' => 'vtpVlanName',

View File

@@ -39,7 +39,7 @@ use SNMP::Info;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
'EXTREME-EDP-MIB' => 'extremeEdpPortIfIndex',

View File

@@ -41,7 +41,7 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = ( 'ENTITY-MIB' => 'entPhysicalSerialNum' );

View File

@@ -41,7 +41,7 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = ( 'EtherLike-MIB' => 'etherMIB' );

View File

@@ -42,7 +42,7 @@ use SNMP::Info;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = ( 'FOUNDRY-SN-SWITCH-GROUP-MIB' => 'snFdpGlobalRun' );

View File

@@ -39,7 +39,7 @@ use SNMP::Info;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = ( 'IEEE802dot11-MIB' => 'dot11DesiredSSID', );

View File

@@ -43,7 +43,7 @@ use SNMP::Info::Aggregate;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Aggregate::MIBS,
@@ -64,7 +64,8 @@ sub agg_ports_lag {
my $dev = shift;
# TODO: implement partial
my $ports = $dev->ad_lag_ports;
my $ports = $dev->ad_lag_ports();
my $index = $dev->bp_index() || {};
return {} unless ref {} eq ref $ports and scalar keys %$ports;
@@ -73,9 +74,18 @@ sub agg_ports_lag {
my $idx = $m;
my $portlist = $ports->{$m};
next unless $portlist;
# While dot3adAggTable is indexed by ifIndex, the portlist is indexed
# with a dot1dBasePort, so we need to use dot1dBasePortIfIndex to map to
# the ifIndex. If we don't have dot1dBasePortIfIndex assume
# dot1dBasePort = ifIndex
for ( my $i = 0; $i <= scalar(@$portlist); $i++ ) {
$ret->{$i+1} = $idx if ( @$portlist[$i] );
}
my $ifindex = $i+1;
if ( exists($index->{$i+1}) and defined($index->{$i+1}) ) {
$ifindex = $index->{$i+1};
}
$ret->{$ifindex} = $idx if ( @$portlist[$i] );
}
}
return $ret;

View File

@@ -44,7 +44,7 @@ use constant {
IPV6MIB => 3,
};
$VERSION = '3.55';
$VERSION = '3.61';

View File

@@ -1,7 +1,7 @@
# SNMP::Info::LLDP
# $Id$
#
# Copyright (c) 2008 Eric Miller
# Copyright (c) 2018 Eric Miller
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,7 @@ use SNMP::Info;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
'LLDP-MIB' => 'lldpLocSysCapEnabled',
@@ -116,7 +116,8 @@ sub hasLLDP {
my $lldp_cap = $lldp->lldp_sys_cap();
return 1 if defined $lldp_cap;
# If the device doesn't return local system capabilities, fallback by checking if it would report neighbors
# If the device doesn't return local system capabilities, fallback
# by checking if it would report neighbors
my $lldp_rem = $lldp->lldp_rem_id() || {};
return 1 if scalar keys %$lldp_rem;
@@ -138,13 +139,18 @@ sub lldp_if {
my @aOID = split( '\.', $key );
my $port = $aOID[1];
next unless $port;
# Local LLDP port may not equate to ifIndex, see LldpPortNumber TEXTUAL-CONVENTION in LLDP-MIB.
# Cross reference lldpLocPortDesc with ifDescr and ifAlias to get ifIndex,
# prefer ifDescr over ifAlias because using cross ref with description is correct behavior
# according to the LLDP-MIB. Some devices (eg H3C gear) seem to use ifAlias though.
# Local LLDP port may not equate to ifIndex, see LldpPortNumber
# TEXTUAL-CONVENTION in LLDP-MIB. Cross reference lldpLocPortDesc
# with ifDescr and ifAlias to get ifIndex, prefer ifDescr over
# ifAlias because using cross ref with description is correct
# behavior according to the LLDP-MIB. Some devices (eg H3C gear)
# seem to use ifAlias though.
my $lldp_desc = $lldp->lldpLocPortDesc($port);
my $desc = $lldp_desc->{$port};
# If cross reference is successful use it, otherwise stick with lldpRemLocalPortNum
# If cross reference is successful use it, otherwise stick with
# lldpRemLocalPortNum
if ( $desc && exists $r_i_descr{$desc} ) {
$port = $r_i_descr{$desc};
}
@@ -165,7 +171,7 @@ sub lldp_ip {
my %lldp_ip;
foreach my $key ( keys %$rman_addr ) {
my ( $index, $proto, $addr ) = _lldp_addr_index($key);
my ( $index, $proto, $addr ) = $lldp->_lldp_addr_index($key);
next unless defined $index;
next unless $proto == 1;
$lldp_ip{$index} = $addr;
@@ -181,7 +187,7 @@ sub lldp_ipv6 {
my %lldp_ipv6;
foreach my $key ( keys %$rman_addr ) {
my ( $index, $proto, $addr ) = _lldp_addr_index($key);
my ( $index, $proto, $addr ) = $lldp->_lldp_addr_index($key);
next unless defined $index;
next unless $proto == 2;
$lldp_ipv6{$index} = $addr;
@@ -197,7 +203,7 @@ sub lldp_mac {
my %lldp_ipv6;
foreach my $key ( keys %$rman_addr ) {
my ( $index, $proto, $addr ) = _lldp_addr_index($key);
my ( $index, $proto, $addr ) = $lldp->_lldp_addr_index($key);
next unless defined $index;
next unless $proto == 6;
$lldp_ipv6{$index} = $addr;
@@ -213,7 +219,7 @@ sub lldp_addr {
my %lldp_ip;
foreach my $key ( keys %$rman_addr ) {
my ( $index, $proto, $addr ) = _lldp_addr_index($key);
my ( $index, $proto, $addr ) = $lldp->_lldp_addr_index($key);
next unless defined $index;
$lldp_ip{$index} = $addr;
}
@@ -233,7 +239,10 @@ sub lldp_port {
foreach my $key ( sort keys %$pid ) {
my $port = $pdesc->{$key};
my $type = $ptype->{$key};
if ( $type and $type eq 'interfaceName' ) {
if ( $type
and ( $type eq 'interfaceName' or $type eq 'local' )
and ( defined $pid->{$key} and $pid->{$key} !~ /^\d+$/ ) )
{
# If the pid claims to be an interface name,
# believe it.
@@ -246,8 +255,7 @@ sub lldp_port {
# 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 = SNMP::Info::munge_mac($port)
}
}
@@ -282,12 +290,13 @@ sub lldp_id {
# May need to format other types in the future
if ( $type =~ /mac/ ) {
$id = join( ':', map { sprintf "%02x", $_ } unpack( 'C*', $id ) );
$id = SNMP::Info::munge_mac($id)
}
elsif ( $type eq 'networkAddress' ) {
if ( length( unpack( 'H*', $id ) ) == 10 ) {
# IP address (first octet is sign, I guess)
# IP address - first octet is IANA Address Family Number, need
# walk with IPv6
my @octets
= ( map { sprintf "%02x", $_ } unpack( 'C*', $id ) )
[ 1 .. 4 ];
@@ -323,7 +332,8 @@ sub lldp_cap {
# Encoded as BITS which Perl Net-SNMP implementation doesn't seem to
# be able to enumerate for us, so we have to get it from the MIB
# and enumerate ourselves
my $oid = SNMP::translateObj( 'lldpRemSysCapEnabled', 0, 1 ) || '';
my $oid
= SNMP::translateObj( 'LLDP-MIB::lldpRemSysCapEnabled', 0, 1 ) || '';
my $enums = (
( ref {} eq ref $SNMP::MIB{$oid}{'enums'} )
? $SNMP::MIB{$oid}{'enums'}
@@ -401,11 +411,13 @@ sub lldp_media_cap {
# Break up the lldpRemManAddrTable INDEX into common index, protocol,
# and address.
sub _lldp_addr_index {
my $idx = shift;
my @oids = split( /\./, $idx );
my $index = join( '.', splice( @oids, 0, 3 ) );
my $proto = shift(@oids);
shift(@oids) if scalar @oids > 4; # $length
my $lldp = shift;
my $idx = shift;
my @oids = split( /\./, $idx );
my $index = join( '.', splice( @oids, 0, 3 ) );
my $proto = shift(@oids);
shift(@oids) if scalar @oids > 4; # $length
# IPv4
if ( $proto == 1 ) {
@@ -415,7 +427,7 @@ sub _lldp_addr_index {
# IPv6
elsif ( $proto == 2 ) {
return ( $index, $proto,
join(':', unpack('(H4)*', pack('C*', @oids)) ) );
join( ':', unpack( '(H4)*', pack( 'C*', @oids ) ) ) );
}
# MAC

View File

@@ -41,7 +41,7 @@ use SNMP::Info;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %PORTSTAT %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = ( %SNMP::Info::MIBS, 'SNMP-REPEATER-MIB' => 'rptrPortGroupIndex' );

View File

@@ -41,7 +41,7 @@ use SNMP::Info::Layer1;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
# Set for No CDP
%GLOBALS = ( %SNMP::Info::Layer1::GLOBALS, 'root_ip' => 'actualIPAddr', );

View File

@@ -41,7 +41,7 @@ use SNMP::Info::Layer1;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
# Set for No CDP
%GLOBALS = ( %SNMP::Info::Layer1::GLOBALS, );

View File

@@ -42,7 +42,7 @@ use SNMP::Info::Layer2;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer2::MIBS,

View File

@@ -39,7 +39,7 @@ use SNMP::Info::Layer1;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer1::MIBS,

View File

@@ -39,7 +39,7 @@ use SNMP::Info::Layer2;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer2::MIBS,

View File

@@ -46,7 +46,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %PORTSTAT %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::MIBS, %SNMP::Info::Bridge::MIBS,

View File

@@ -11,7 +11,7 @@ use SNMP::Info::CDP;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::LLDP::MIBS,

View File

@@ -11,7 +11,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
# This will be filled in with the device's index into the EntPhysicalEntry
# table by the serial() function.

View File

@@ -0,0 +1,472 @@
# SNMP::Info::Layer2::Aerohive
#
# Copyright (c) 2018 Eric Miller
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the University of California, Santa Cruz nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
package SNMP::Info::Layer2::Aerohive;
use strict;
use Exporter;
use SNMP::Info::Layer2;
@SNMP::Info::Layer2::Aerohive::ISA = qw/SNMP::Info::Layer2 Exporter/;
@SNMP::Info::Layer2::Aerohive::EXPORT_OK = qw//;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer2::MIBS,
'AH-SYSTEM-MIB' => 'ahSystemSerial',
'AH-INTERFACE-MIB' => 'ahSSIDName',
);
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS,
# AH-SYSTEM-MIB
'serial' => 'ahSystemSerial',
'os_bin' => 'ahFirmwareVersion',
);
%FUNCS = (
%SNMP::Info::Layer2::FUNCS,
# AH-INTERFACE-MIB::ahRadioAttributeTable
'i_80211channel' => 'ahRadioChannel',
'dot11_cur_tx_pwr_mw' => 'ahRadioTxPower',
# AH-INTERFACE-MIB::ahXIfTable
'ah_i_ssidlist' => 'ahSSIDName',
# AH-INTERFACE-MIB::ahAssociationTable
'cd11_txrate' => 'ahClientLastTxRate',
'cd11_uptime' => 'ahClientLinkUptime',
'cd11_sigstrength' => 'ahClientRSSI',
'cd11_rxpkt' => 'ahClientRxDataFrames',
'cd11_txpkt' => 'ahClientTxDataFrames',
'cd11_rxbyte' => 'ahClientRxDataOctets',
'cd11_txbyte' => 'ahClientTxDataOctets',
'cd11_ssid' => 'ahClientSSID',
'ah_c_vlan' => 'ahClientVLAN',
'ah_c_ip' => 'ahClientIP',
);
%MUNGE
= ( %SNMP::Info::Layer2::MUNGE, 'at_paddr' => \&SNMP::Info::munge_mac, );
sub layers {
return '00000111';
}
sub vendor {
return 'aerohive';
}
sub os {
return 'hiveos';
}
sub os_ver {
my $aerohive = shift;
my $descr = $aerohive->description();
if ( $descr =~ m/\bHiveOS\s(\d\.\w+)\b/ix ) {
return $1;
}
return;
}
sub model {
my $aerohive = shift;
my $descr = $aerohive->description();
if ( $descr =~ m/\b(?:Hive|)(AP\d+)\b/ix ) {
return $1;
}
return;
}
sub i_ssidlist {
my $aerohive = shift;
my $partial = shift;
my $ssids = $aerohive->ah_i_ssidlist($partial) || {};
my %i_ssidlist;
foreach my $iid ( keys %$ssids ) {
my $ssid = $ssids->{$iid};
next if $ssid =~ /N\/A/i;
$i_ssidlist{$iid} = $ssid;
}
return \%i_ssidlist;
}
sub i_ssidmac {
my $aerohive = shift;
my $partial = shift;
my $ssids = $aerohive->i_ssidlist($partial) || {};
my $macs = $aerohive->i_mac($partial) || {};
my %i_ssidmac;
foreach my $iid ( keys %$ssids ) {
my $mac = $macs->{$iid};
next unless $mac;
$i_ssidmac{$iid} = $mac;
}
return \%i_ssidmac;
}
# Break up the ahAssociationEntry INDEX into ifIndex and MAC Address.
sub _ah_association_index {
my $idx = shift;
my @values = split( /\./, $idx );
my $ifindex = shift(@values);
my $length = shift(@values);
return ( $ifindex, join( ':', map { sprintf "%02x", $_ } @values ) );
}
sub cd11_port {
my $aerohive = shift;
my $cd11_txrate = $aerohive->cd11_txrate();
my $interfaces = $aerohive->interfaces();
my %ret;
foreach ( keys %$cd11_txrate ) {
my ( $ifindex, $mac ) = _ah_association_index($_);
$ret{$_} = $interfaces->{$ifindex};
}
return \%ret;
}
sub cd11_mac {
my $aerohive = shift;
my $cd11_txrate = $aerohive->cd11_txrate();
my %ret;
foreach ( keys %$cd11_txrate ) {
my ( $ifindex, $mac ) = _ah_association_index($_);
$ret{$_} = $mac;
}
return \%ret;
}
# Does not support the standard Bridge MIB
sub bp_index {
my $aerohive = shift;
my $partial = shift;
my $i_index = $aerohive->i_index($partial) || {};
my %bp_index;
foreach my $iid ( keys %$i_index ) {
my $index = $i_index->{$iid};
next unless defined $index;
$bp_index{$index} = $iid;
}
return \%bp_index;
}
sub qb_fw_port {
my $aerohive = shift;
my $partial = shift;
my $txrate = $aerohive->cd11_txrate($partial) || {};
my $qb_fw_port = {};
foreach my $idx ( keys %$txrate ) {
my ( $fdb_id, $mac ) = _ah_association_index($idx);
$qb_fw_port->{$idx} = $fdb_id;
}
return $qb_fw_port;
}
sub qb_fw_mac {
my $aerohive = shift;
my $partial = shift;
my $txrate = $aerohive->cd11_txrate($partial) || {};
my $qb_fw_mac = {};
foreach my $idx ( keys %$txrate ) {
my ( $fdb_id, $mac ) = _ah_association_index($idx);
$qb_fw_mac->{$idx} = $mac;
}
return $qb_fw_mac;
}
sub qb_fw_vlan {
my $aerohive = shift;
my $partial = shift;
my $vlans = $aerohive->ah_c_vlan($partial) || {};
my $qb_fw_vlan = {};
foreach my $idx ( keys %$vlans ) {
my $vlan = $vlans->{$idx};
next unless defined $vlan;
$qb_fw_vlan->{$idx} = $vlan;
}
return $qb_fw_vlan;
}
# arpnip:
#
# This is the AP snooping on the MAC->IP mappings.
# Pretending this is arpnip data allows us to get MAC->IP
# mappings even for stations that only communicate locally.
sub at_paddr {
my $aerohive = shift;
my $txrate = $aerohive->cd11_txrate() || {};
my $at_paddr = {};
foreach my $idx ( keys %$txrate ) {
my ( $fdb_id, $mac ) = _ah_association_index($idx);
$at_paddr->{$idx} = $mac;
}
return $at_paddr;
}
sub at_netaddr {
my $aerohive = shift;
my $ips = $aerohive->ah_c_ip() || {};
my $ret = {};
foreach my $idx ( keys %$ips ) {
next if ( $ips->{$idx} eq '0.0.0.0' );
$ret->{$idx} = $ips->{$idx};
}
return $ret;
}
1;
__END__
=head1 NAME
SNMP::Info::Layer2::Aerohive - SNMP Interface to Aerohive Access Points
=head1 AUTHOR
Eric Miller
=head1 SYNOPSIS
# 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();
print "SNMP::Info determined this device to fall under subclass : $class\n";
=head1 DESCRIPTION
Provides abstraction to the configuration information obtainable from an
Aerohive wireless Access Point through SNMP.
For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above.
my $aerohive = new SNMP::Info::Layer2::Aerohive(...);
=head2 Inherited Classes
=over
=item SNMP::Info::Layer2
=back
=head2 Required MIBs
=over
=item F<AH-SYSTEM-MIB>
=item F<AH-INTERFACE-MIB>
=back
=head2 Inherited MIBs
See L<SNMP::Info::Layer2/"Required MIBs"> for its MIB requirements.
=head1 GLOBALS
These are methods that return scalar value from SNMP
=over
=item $aerohive->vendor()
Returns 'aerohive'.
=item $aerohive->os()
Returns 'hive_os'.
=item $aerohive->os_ver()
Returns the OS versionl extracted from C<sysDescr>.
=item $aerohive->os_bin()
Returns the firmware version extracted from C<ahFirmwareVersion>.
=item $aerohive->model()
Returns the model extracted from C<sysDescr>.
=item $aerohive->serial()
Returns the serial number extracted from C<ahSystemSerial>.
=back
=head2 Overrides
=over
=item $aerohive->layers()
Returns 00000111. Layer 2 and Layer 3 functionality through proprietary MIBs.
=back
=head2 Global Methods imported from SNMP::Info::Layer2
See L<SNMP::Info::Layer2/"GLOBALS"> for details.
=head1 TABLE METHODS
These are methods that return tables of information in the form of a reference
to a hash.
=over
=item $aerohive->i_ssidlist()
Returns reference to hash. SSID's recognized by the radio interface.
=item $aerohive->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.
=item $aerohive->i_80211channel()
Returns reference to hash. Current operating frequency channel of the radio
interface.
C<ahRadioChannel>
=item $aerohive->dot11_cur_tx_pwr_mw()
Returns reference to hash. Current transmit power, in milliwatts, of the
radio interface.
C<ahRadioTxPower>
=item $aironet->cd11_port()
Returns radio interfaces.
=item $aironet->cd11_mac()
Returns client radio interface MAC addresses.
=back
=head2 Overrides
=over
=item $aerohive->bp_index()
Simulates bridge MIB by returning reference to a hash mapping i_index() to
the interface iid.
=item $aerohive->qb_fw_port()
Returns reference to hash of forwarding table entries port interface
identifier (iid)
=item $aerohive->qb_fw_mac()
Returns reference to hash of forwarding table MAC Addresses
C<ahClientMac>
=item $aerohive->qb_fw_vlan()
Returns reference to hash of forwarding table entries VLAN ID
C<ahClientVLAN>
=back
=head2 Arp Cache Table Augmentation
The AP has knowledge of MAC->IP mappings for wireless clients.
Augmenting the arp cache data with these MAC->IP mappings enables visibility
for stations that only communicate locally.
=over
=item $aerohive->at_paddr()
C<ahClientMac>
=item $aerohive->at_netaddr()
C<ahClientIP>
=back
=head2 Table Methods imported from SNMP::Info::Layer2
See L<SNMP::Info::Layer2/"TABLE METHODS"> for details.
=cut

View File

@@ -40,7 +40,7 @@ use SNMP::Info::Airespace;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::MIBS, %SNMP::Info::Bridge::MIBS,

View File

@@ -49,7 +49,7 @@ use SNMP::Info::IEEE802dot11;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%GLOBALS = (
%SNMP::Info::IEEE802dot11::GLOBALS,

View File

@@ -40,7 +40,7 @@ use SNMP::Info::Layer1;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%GLOBALS = ( %SNMP::Info::Layer2::GLOBALS );

View File

@@ -0,0 +1,165 @@
# SNMP::Info::Layer2::Atmedia
#
# Copyright (c) 2018 Netdisco Developers
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the University of California, Santa Cruz nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
package SNMP::Info::Layer2::Atmedia;
use strict;
use Exporter;
use SNMP::Info::Layer2;
@SNMP::Info::Layer2::Atmedia::ISA = qw/SNMP::Info::Layer2/;
@SNMP::Info::Layer2::Atmedia::EXPORT_OK = qw//;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.61';
%MIBS = ( %SNMP::Info::Layer2::MIBS );
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS,
'os_ver' => '.1.3.6.1.4.1.13458.1.2.1.0',
'atm_serial' => '.1.3.6.1.4.1.13458.1.1.2.0',
'atm_hardversion' => '.1.3.6.1.4.1.13458.1.3.1.0',
'atm_model' => '.1.3.6.1.4.1.13458.1.1.6.0',
);
%FUNCS = (%SNMP::Info::Layer2::FUNCS);
%MUNGE = (%SNMP::Info::Layer2::MUNGE);
sub serial {
my $atmedia = shift;
return $atmedia->atm_serial();
}
sub os {
return 'Atmedia-OS';
}
sub model {
my $atmedia = shift;
my $atmedia_model = $atmedia->atm_model();
$atmedia_model =~ s/\<|\>//g;
$atmedia_model =~ s/\//_/g;
return $atmedia_model;
}
sub vendor {
return 'atmedia';
}
1;
__END__
=head1 NAME
SNMP::Info::Layer2::Atmedia - SNMP Interface to atmedia encryptors
=head1 AUTHOR
Netdisco Developers
=head1 SYNOPSIS
# 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();
print "SNMP::Info determined this device to fall under subclass : $class\n";
=head1 DESCRIPTION
Provides abstraction to information obtainable from a atmedia encryptor
through SNMP. See inherited classes' documentation for inherited methods.
=head2 Inherited Classes
=over
=item SNMP::Info::Layer2
=back
=head2 Inherited MIBs
See L<SNMP::Info::Layer2/"Required MIBs"> for its MIB requirements.
=head1 GLOBALS
These are methods that return scalar value from SNMP
=head2 Overrides
=over
=item $atmedia->vendor()
Returns 'atmedia'
=item $atmedia->os()
Returns 'Atmedia-OS'
=item $atmedia->os_ver()
(C<acSoftVersion>)
=item $atmedia->model()
(C<acDescr>)
=item $atmedia->serial()
(C<acSerialNumber>)
=back
=head2 Globals imported from SNMP::Info::Layer2
See L<SNMP::Info::Layer2/"GLOBALS"> for details.
=head1 TABLE METHODS
=head2 Table Methods imported from SNMP::Info::Layer2
See L<SNMP::Info::Layer2/"TABLE METHODS"> for details.
=cut

View File

@@ -46,7 +46,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::MIBS, %SNMP::Info::LLDP::MIBS,

View File

@@ -48,7 +48,7 @@ use SNMP::Info::Layer2;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS,

View File

@@ -41,7 +41,7 @@ use SNMP::Info::Layer2::Cisco;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%GLOBALS = (
%SNMP::Info::Layer2::Cisco::GLOBALS,

View File

@@ -42,7 +42,7 @@ use SNMP::Info::Layer2::Cisco;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer2::Cisco::MIBS,

View File

@@ -43,7 +43,7 @@ use SNMP::Info::SONMP;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::MIBS,

View File

@@ -52,7 +52,7 @@ use SNMP::Info::Layer2;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer2::MIBS,

View File

@@ -50,7 +50,7 @@ use SNMP::Info::CDP;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS,

View File

@@ -50,7 +50,7 @@ use SNMP::Info::Aggregate 'agg_ports_ifstack';
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %PORTSTAT %MODEL_MAP %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -44,7 +44,7 @@ use SNMP::Info::CDP;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %PORTSTAT %MODEL_MAP %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -41,7 +41,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer2::MIBS,

View File

@@ -36,7 +36,7 @@ use SNMP::Info::Layer2;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer2::MIBS,

View File

@@ -43,7 +43,7 @@ use SNMP::Info::Airespace;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::MIBS, %SNMP::Info::Bridge::MIBS,

View File

@@ -42,7 +42,7 @@ use SNMP::Info::Layer2;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer2::MIBS, %SNMP::Info::IEEE802dot11::MIBS,

View File

@@ -39,7 +39,7 @@ use SNMP::Info::Bridge;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::MIBS,

View File

@@ -40,7 +40,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
# This will be filled in with the device's index into the EntPhysicalEntry
# table by the serial() function.

View File

@@ -38,7 +38,7 @@ use SNMP::Info::Layer2;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer2::MIBS,

View File

@@ -41,7 +41,7 @@ use SNMP::Info::Layer2;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer2::MIBS,

View File

@@ -38,7 +38,7 @@ use SNMP::Info::Layer2;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (%SNMP::Info::Layer2::MIBS, 'SIXNET-MIB' => 'sxid',);

View File

@@ -40,7 +40,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::MIBS,

View File

@@ -18,7 +18,7 @@ use SNMP::Info::Layer3; # only used in sub mac()
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer2::MIBS,

View File

@@ -39,7 +39,7 @@ use SNMP::Info::Layer2;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
# Set for No CDP
%GLOBALS = ( %SNMP::Info::Layer2::GLOBALS );

View File

@@ -53,7 +53,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::MIBS,

View File

@@ -41,7 +41,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -49,7 +49,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -39,7 +39,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -40,7 +40,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE
$int_include_vpn $fake_idx $type_class/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -48,7 +48,7 @@ use SNMP::Info::Aggregate 'agg_ports_ifstack';
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -40,7 +40,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -43,7 +43,7 @@ use SNMP::Info::Bridge;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE %MODEL_MAP
%MODID_MAP %PROCID_MAP/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::MIBS,

View File

@@ -36,7 +36,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer2::MIBS, %SNMP::Info::Layer3::MIBS,

View File

@@ -47,7 +47,7 @@ use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
@SNMP::Info::Layer3::C3550::EXPORT_OK = qw//;
$VERSION = '3.55';
$VERSION = '3.61';
# NOTE: Order creates precedence
# Example: v_name exists in Bridge.pm and CiscoVTP.pm

View File

@@ -44,7 +44,7 @@ use SNMP::Info::MAU;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::MAU::MIBS,

View File

@@ -51,7 +51,7 @@ use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
# NOTE: Order creates precedence
# Example: v_name exists in Bridge.pm and CiscoVTP.pm

View File

@@ -40,7 +40,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -55,7 +55,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
@@ -97,22 +97,18 @@ $VERSION = '3.55';
%SNMP::Info::LLDP::FUNCS,
%SNMP::Info::CiscoVTP::FUNCS,
# EIGRP
'eigrp_peers' => 'cEigrpPeerAddr',
# CISCO-EIGRP-MIB::cEigrpPeerTable
'c_eigrp_peer_types' => 'cEigrpPeerAddrType',
'c_eigrp_peers' => 'cEigrpPeerAddr',
);
%MUNGE = (
%SNMP::Info::Layer3::MUNGE,
%SNMP::Info::CiscoStpExtensions::MUNGE,
%SNMP::Info::CiscoPower::MUNGE,
%SNMP::Info::CiscoConfig::MUNGE,
%SNMP::Info::CiscoQOS::MUNGE,
%SNMP::Info::CiscoRTT::MUNGE,
%SNMP::Info::CiscoStats::MUNGE,
%SNMP::Info::CDP::MUNGE,
%SNMP::Info::LLDP::MUNGE,
%SNMP::Info::CiscoVTP::MUNGE,
'eigrp_peers' => \&SNMP::Info::munge_ip,
%SNMP::Info::Layer3::MUNGE, %SNMP::Info::CiscoStpExtensions::MUNGE,
%SNMP::Info::CiscoPower::MUNGE, %SNMP::Info::CiscoConfig::MUNGE,
%SNMP::Info::CiscoQOS::MUNGE, %SNMP::Info::CiscoRTT::MUNGE,
%SNMP::Info::CiscoStats::MUNGE, %SNMP::Info::CDP::MUNGE,
%SNMP::Info::LLDP::MUNGE, %SNMP::Info::CiscoVTP::MUNGE,
);
sub i_vlan {
@@ -132,6 +128,7 @@ sub i_vlan {
if ( $i_descr->{$idx} =~ /\.(\d+)$/ ) {
$i_vlan->{$idx} = $1;
}
# This matches 101 in 'Ethernet0.101-802.1Q vLAN subif'
elsif ( $i_descr->{$idx} =~ /\.(\d+)-/ ) {
$i_vlan->{$idx} = $1;
@@ -141,14 +138,41 @@ sub i_vlan {
return $i_vlan;
}
sub cisco_comm_indexing {
sub cisco_comm_indexing {
my $cisco = shift;
# If we get a VTP version, it's *extremely* likely that the device needs
# community based indexing
my $vtp = $cisco->vtp_version() || '0';
return $vtp ? 1 : 0;
}
sub eigrp_peers {
my $cisco = shift;
my $peers = $cisco->c_eigrp_peers() || {};
my $types = $cisco->c_eigrp_peer_types() || {};
my %eigrp_peers;
foreach my $idx ( keys %$peers ) {
my $type = $types->{$idx};
next unless $type;
my $peer = $peers->{$idx};
next unless $peer;
my $ip = NetAddr::IP::Lite->new($peer);
if ($ip) {
$eigrp_peers{$idx} = $ip->addr;
}
elsif ( $type eq 'ipv4' ) {
$eigrp_peers{$idx} = SNMP::Info::munge_ip($peer);
}
next;
}
return \%eigrp_peers;
}
1;
__END__

View File

@@ -45,7 +45,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = ( %SNMP::Info::Layer3::MIBS, %SNMP::Info::CiscoStats::MIBS, );

View File

@@ -43,7 +43,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = ( %SNMP::Info::Layer3::MIBS, %SNMP::Info::CiscoStats::MIBS, );

View File

@@ -50,7 +50,7 @@ use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::Cisco::MIBS,

View File

@@ -42,7 +42,7 @@ use SNMP::Info::Entity;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::MIBS, %SNMP::Info::Layer3::MIBS, %SNMP::Info::Entity::MIBS,

View File

@@ -46,7 +46,7 @@ use SNMP::Info::IEEE802dot3ad 'agg_ports_lag';
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -10,7 +10,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -40,7 +40,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -41,7 +41,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::MIBS

View File

@@ -44,7 +44,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION $DEBUG %GLOBALS %FUNCS $INIT %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::MIBS, %SNMP::Info::CDP::MIBS,

View File

@@ -46,7 +46,7 @@ use SNMP::Info::EDP;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -38,7 +38,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -43,7 +43,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -39,7 +39,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -48,7 +48,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -0,0 +1,188 @@
# SNMP::Info::Layer3::Genua
#
# Copyright (c) 2018 Netdisco Developers
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the University of California, Santa Cruz nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
package SNMP::Info::Layer3::Genua;
use strict;
use Exporter;
use SNMP::Info::Layer3;
@SNMP::Info::Layer3::Genua::ISA = qw/SNMP::Info::Layer3/;
@SNMP::Info::Layer3::Genua::EXPORT_OK = qw//;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.61';
%MIBS = (%SNMP::Info::Layer3::MIBS);
%GLOBALS = (
%SNMP::Info::Layer3::GLOBALS,
'genua_os' => '.1.3.6.1.4.1.3717.2.3.1.0',
'genua_osver_rel' => '.1.3.6.1.4.1.3717.2.3.3.0',
'genua_osver_patch' => '.1.3.6.1.4.1.3717.2.3.4.0',
'genua_model' => '.1.3.6.1.4.1.3717.2.3.5.0',
'genua_serial' => '.1.3.6.1.4.1.3717.2.3.6.0',
);
%FUNCS = (%SNMP::Info::Layer3::FUNCS);
%MUNGE = (%SNMP::Info::Layer3::MUNGE);
sub serial {
my $genua = shift;
return $genua->genua_serial();
}
sub os {
my $genua = shift;
return $genua->genua_os();
}
sub os_ver {
my $genua = shift;
my $genua_osver_rel = $genua->genua_osver_rel();
my $genua_osver_patch = $genua->genua_osver_patch();
my $genua_osver;
if ( defined $genua_osver_rel and defined $genua_osver_patch ) {
return $genua_osver_rel . "_PL_" . $genua_osver_patch;
}
return $genua_osver;
}
sub model {
my $genua = shift;
my $genua_model = $genua->genua_model();
if ( $genua_model =~ m/GeNUA.+(GS.+?)\s/i ) {
$genua_model = $1;
}
elsif ( $genua_model =~ m/genua\s+(.+?)\s+/i ) {
$genua_model = $1;
}
else {
$genua_model = 'unknown';
}
return $genua_model;
}
sub vendor {
return 'genua';
}
1;
__END__
=head1 NAME
SNMP::Info::Layer3::Genua - SNMP Interface to Genua security devices
=head1 AUTHOR
Netdisco Developers
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
my $genua = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myhub',
Community => 'public',
Version => 1
)
or die "Can't connect to DestHost.\n";
my $class = $genua->class();
print "SNMP::Info determined this device to fall under subclass : $class\n";
=head1 DESCRIPTION
Provides abstraction to information obtainable from a Genua security device
through SNMP. See inherited classes' documentation for inherited methods.
=head2 Inherited Classes
=over
=item SNMP::Info::Layer3
=back
=head2 Inherited MIBs
See L<SNMP::Info::Layer3/"Required MIBs"> for its MIB requirements.
=head1 GLOBALS
These are methods that return scalar value from SNMP
=head2 Overrides
=over
=item $genua->vendor()
Returns 'genua'
=item $genua->os()
(C<infoSoftwareversion>)
=item $genua->os_ver()
(C<infoRelease>) and (C<infoPatchlevel>)
=item $genua->model()
(C<infoHardwareversion>)
=item $genua->serial()
(C<infoSerialnumber>)
=back
=head2 Globals imported from SNMP::Info::Layer3
See L<SNMP::Info::Layer3/"GLOBALS"> for details.
=head1 TABLE METHODS
=head2 Table Methods imported from SNMP::Info::Layer3
See L<SNMP::Info::Layer3/"TABLE METHODS"> for details.
=cut

View File

@@ -47,7 +47,7 @@ use SNMP::Info::IEEE802dot3ad 'agg_ports_lag';
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -42,7 +42,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -1,6 +1,6 @@
# SNMP::Info::Layer3::Huawei
#
# Copyright (c) 2018 Jeroen van Ingen
# Copyright (c) 2018 Jeroen van Ingen and Eric Miller
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -32,45 +32,82 @@ package SNMP::Info::Layer3::Huawei;
use strict;
use Exporter;
use SNMP::Info::Layer3;
use SNMP::Info::LLDP;
use SNMP::Info::IEEE802dot3ad 'agg_ports_lag';
use SNMP::Info::IEEE802dot3ad;
@SNMP::Info::Layer3::Huawei::ISA = qw/
SNMP::Info::IEEE802dot3ad
SNMP::Info::LLDP
SNMP::Info::Layer3
Exporter
/;
@SNMP::Info::Layer3::Huawei::EXPORT_OK = qw/
agg_ports
/;
SNMP::Info::IEEE802dot3ad
SNMP::Info::Layer3
Exporter
/;
@SNMP::Info::Layer3::Huawei::EXPORT_OK = qw//;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.55';
$VERSION = '3.61';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
%SNMP::Info::LLDP::MIBS,
%SNMP::Info::IEEE802dot3ad::MIBS,
'HUAWEI-MIB' => 'quidway',
'HUAWEI-MIB' => 'quidway',
'HUAWEI-PORT-MIB' => 'hwEthernetDuplex',
'HUAWEI-IF-EXT-MIB' => 'hwTrunkIfIndex',
'HUAWEI-L2IF-MIB' => 'hwL2IfPortIfIndex',
'HUAWEI-POE-MIB' => 'hwPoePower',
'HUAWEI-ENTITY-EXTENT-MIB' => 'hwEntityFanState',
);
%GLOBALS = (
%SNMP::Info::Layer3::GLOBALS,
%SNMP::Info::LLDP::GLOBALS,
);
%GLOBALS = ( %SNMP::Info::Layer3::GLOBALS, );
%FUNCS = (
%SNMP::Info::Layer3::FUNCS,
%SNMP::Info::LLDP::FUNCS,
%SNMP::Info::IEEE802dot3ad::FUNCS,
# HUAWEI-PORT-MIB::hwEthernetTable
'hw_eth_speed_admin' => 'hwEthernetSpeedSet',
'hw_eth_duplex' => 'hwEthernetDuplex',
'hw_eth_auto' => 'hwEthernetNegotiation',
'hw_eth_frame_len' => 'hwEthernetJumboframeMaxLength',
# HUAWEI-PORT-MIB::hwPhysicalPortTable
'hw_phy_port_slot' => 'hwPhysicalPortInSlot',
# HUAWEI-IF-EXT-MIB::hwTrunkIfTable
'hw_trunk_if_idx' => 'hwTrunkIfIndex',
'hw_trunk_entry' => 'hwTrunkValidEntry',
# HUAWEI-L2IF-MIB::hwL2IfTable
'hw_l2if_port_idx' => 'hwL2IfPortIfIndex',
# HUAWEI-POE-MIB::hwPoePortTable
'hw_peth_port_admin' => 'hwPoePortEnable',
'hw_peth_port_status' => 'hwPoePortPowerStatus',
'hw_peth_port_class' => 'hwPoePortPdClass',
'hw_peth_port_power' => 'hwPoePortConsumingPower',
# HUAWEI-POE-MIB::hwPoeSlotTable
'peth_power_watts' => 'hwPoeSlotMaximumPower',
'peth_power_consumption' => 'hwPoeSlotConsumingPower',
'peth_power_threshold' => 'hwPoeSlotPowerUtilizationThreshold',
# HUAWEI-ENTITY-EXTENT-MIB::hwFanStatusTable
'hw_fan_state' => 'hwEntityFanState',
'hw_fan_descr' => 'hwEntityFanDesc',
# HUAWEI-ENTITY-EXTENT-MIB::hwPwrStatusTable
'hw_pwr_state' => 'hwEntityPwrState',
'hw_pwr_descr' => 'hwEntityPwrDesc',
);
%MUNGE = (
%SNMP::Info::Layer3::MUNGE,
%SNMP::Info::LLDP::MUNGE,
%SNMP::Info::IEEE802dot3ad::MUNGE,
'hw_peth_port_admin' => \&SNMP::Info::Layer3::Huawei::munge_hw_peth_admin,
'peth_power_watts' => \&SNMP::Info::Layer3::Huawei::munge_hw_peth_power,
'peth_power_consumption' =>
\&SNMP::Info::Layer3::Huawei::munge_hw_peth_power,
'hw_peth_port_status' =>
\&SNMP::Info::Layer3::Huawei::munge_hw_peth_status,
'hw_peth_port_class' => \&SNMP::Info::Layer3::Huawei::munge_hw_peth_class,
);
sub vendor {
@@ -81,49 +118,396 @@ sub os {
my $huawei = shift;
my $descr = $huawei->description();
return $1 if ( $descr =~ /\b(VRP)\b/ );
if ( $descr =~ /\b(VRP)\b/ ) {
return $1;
}
return "huawei";
}
sub os_ver {
my $huawei = shift;
my $entity_os = $huawei->entity_derived_os_ver();
if ( defined $entity_os and $entity_os !~ /^\s*$/ ) {
return $entity_os;
}
my $descr = $huawei->description();
my $os_ver = undef;
$os_ver = "$1" if ( $descr =~ /\bVersion ([0-9.]+)/i );
if ($descr =~ /Version\s # Start match on Version string
([\d\.]+) # Capture the primary version in 1
,? # There may be a comma
\s # Always a space
(?:Release|Feature)? # Don't capture stanza if present
(?:\(\w+)? # If paren & model don't capture
\s # Always a space
(\w+) # If 2nd part of version capture in 2
/xi
)
{
$os_ver = $2 ? "$1 $2" : $1;
}
return $os_ver;
}
sub mac {
my $huawei = shift;
return $huawei->b_mac();
}
sub i_ignore {
my $l3 = shift;
my $huawei = shift;
my $partial = shift;
my $interfaces = $l3->interfaces($partial) || {};
my $interfaces = $huawei->interfaces($partial) || {};
my %i_ignore;
foreach my $if ( keys %$interfaces ) {
# lo0 etc
if ( $interfaces->{$if} =~ /\b(inloopback|console)\d*\b/i ) {
if ( $interfaces->{$if} =~ /\b(inloopback|console)\d*\b/ix ) {
$i_ignore{$if}++;
}
}
return \%i_ignore;
}
sub agg_ports { return agg_ports_lag(@_) }
sub bp_index {
my $huawei = shift;
my $hw_index = $huawei->hw_l2if_port_idx();
return $hw_index
if ( ref {} eq ref $hw_index and scalar keys %$hw_index );
return $huawei->SUPER::bp_index();
}
sub i_duplex {
my $huawei = shift;
my $partial = shift;
my $hw_duplex = $huawei->hw_eth_duplex($partial);
return $hw_duplex
if ( ref {} eq ref $hw_duplex and scalar keys %$hw_duplex );
return $huawei->SUPER::i_duplex($partial);
}
sub i_duplex_admin {
my $huawei = shift;
my $partial = shift;
my $hw_duplex_admin = $huawei->hw_eth_duplex($partial) || {};
my $hw_auto = $huawei->hw_eth_auto($partial) || {};
my %i_duplex_admin;
foreach my $if ( keys %$hw_duplex_admin ) {
my $duplex = $hw_duplex_admin->{$if};
next unless defined $duplex;
my $auto = $hw_auto->{$if} || 'disabled';
my $string = 'other';
$string = 'half' if ( $duplex =~ /half/i and $auto =~ /disabled/i );
$string = 'full' if ( $duplex =~ /full/i and $auto =~ /disabled/i );
$string = 'auto' if $auto =~ /enabled/i;
$i_duplex_admin{$if} = $string;
}
return \%i_duplex_admin;
}
sub agg_ports {
my $huawei = shift;
# First use proprietary MIB for broader implementation across
# devices type / os and no xref of hwL2IfPortIfIndex
my $masters = $huawei->hw_trunk_if_idx();
my $slaves = $huawei->hw_trunk_entry();
my $ret = {};
if ( ref {} eq ref $masters
and scalar keys %$masters
and ref {} eq ref $slaves
and scalar keys %$slaves )
{
foreach my $s ( keys %$slaves ) {
next if $slaves->{$s} ne 'valid';
my ( $trunk, $sl_idx ) = split( /\./, $s );
foreach my $m ( keys %$masters ) {
next unless $m == $trunk;
next unless defined $masters->{$m};
$ret->{$sl_idx} = $masters->{$m};
last;
}
}
return $ret;
}
# If for some reason we don't get the info, try IEEE8023-LAG-MIB
return $huawei->agg_ports_lag();
}
# The standard IEEE 802.af POWER-ETHERNET-MIB has an index of module.port
# The HUAWEI-POE-MIB only indexes by ifIndex, we need to match the standard
# for so method calls across classes work the same
#
sub peth_port_ifindex {
my $huawei = shift;
my $peth_port_status = $huawei->hw_peth_port_status() || {};
my $peth_port_slot = $huawei->hw_phy_port_slot() || {};
my $i_descr = $huawei->i_description() || {};
my $peth_port_ifindex = {};
foreach my $i ( keys %$peth_port_status ) {
my $slot = 0;
if ( exists $peth_port_slot->{$i}
&& defined $peth_port_slot->{$i} )
{
$slot = $peth_port_slot->{$i};
}
elsif ( exists $i_descr->{$i}
&& $i_descr->{$i} =~ /(\d+)(?:\/\d+){2,3}$/x )
{
$slot = $1;
}
$peth_port_ifindex->{"$slot.$i"} = $i;
}
return $peth_port_ifindex;
}
sub peth_port_admin {
my $huawei = shift;
my $port_admin = $huawei->hw_peth_port_admin() || {};
my $port_ifindex = $huawei->peth_port_ifindex() || {};
my $peth_port_admin = {};
foreach my $idx ( keys %$port_ifindex ) {
my $ifindex = $port_ifindex->{$idx};
my $admin = $port_admin->{$ifindex};
next unless $admin;
$peth_port_admin->{$idx} = $admin;
}
return $peth_port_admin;
}
sub peth_port_status {
my $huawei = shift;
my $port_status = $huawei->hw_peth_port_status() || {};
my $port_ifindex = $huawei->peth_port_ifindex() || {};
my $peth_port_status = {};
foreach my $idx ( keys %$port_ifindex ) {
my $ifindex = $port_ifindex->{$idx};
my $status = $port_status->{$ifindex};
next unless $status;
$peth_port_status->{$idx} = $status;
}
return $peth_port_status;
}
sub peth_port_class {
my $huawei = shift;
my $port_class = $huawei->hw_peth_port_class() || {};
my $port_ifindex = $huawei->peth_port_ifindex() || {};
my $peth_port_class = {};
foreach my $idx ( keys %$port_ifindex ) {
my $ifindex = $port_ifindex->{$idx};
my $class = $port_class->{$ifindex};
next unless $class;
$peth_port_class->{$idx} = $class;
}
return $peth_port_class;
}
sub peth_port_power {
my $huawei = shift;
my $port_power = $huawei->hw_peth_port_power() || {};
my $port_ifindex = $huawei->peth_port_ifindex() || {};
my $peth_port_power = {};
foreach my $idx ( keys %$port_ifindex ) {
my $ifindex = $port_ifindex->{$idx};
my $power = $port_power->{$ifindex};
next unless defined $power;
$peth_port_power->{$idx} = $power;
}
return $peth_port_power;
}
sub peth_port_neg_power {
my $huawei = shift;
my $peth_port_status = $huawei->peth_port_status() || {};
my $peth_port_class = $huawei->peth_port_class() || {};
my $port_ifindex = $huawei->peth_port_ifindex() || {};
my $huaweimax = {
'class0' => 12950,
'class1' => 3840,
'class2' => 6490,
'class3' => 12950,
'class4' => 25500
};
my $peth_port_neg_power = {};
foreach my $idx ( keys %$port_ifindex ) {
if ( $peth_port_status->{$idx} eq 'deliveringPower' ) {
$peth_port_neg_power->{$idx}
= $huaweimax->{ $peth_port_class->{$idx} };
}
}
return $peth_port_neg_power;
}
sub fan {
my $huawei = shift;
my $fan = $huawei->hw_fan_descr() || {};
my $state = $huawei->hw_fan_state() || {};
if ( scalar keys %$state ) {
my @messages = ();
foreach my $k ( keys %$state ) {
next if $state->{$k} and $state->{$k} eq 'normal';
my ($slot, $num) = split(/\./, $k);
my $descr = "Slot $slot,Fan $num";
$descr = $fan->{$k} if ($fan->{$k});
push @messages, "$descr: $state->{$k}";
}
push @messages, ( ( scalar keys %$state ) . " fans OK" )
if scalar @messages == 0;
return ( join ", ", @messages );
}
return;
}
sub ps1_status {
my $huawei = shift;
my $pwr_state = $huawei->hw_pwr_state() || {};
my $pwr_descr = $huawei->hw_pwr_descr() || {};
my $ret = "";
my $s = "";
foreach my $i ( sort keys %$pwr_state ) {
my ( $slot, $num ) = split( /\./, $i );
next unless $num == 1;
my $descr = "Slot $slot,PS $num";
$descr = $pwr_descr->{$i} if ($pwr_descr->{$i});
$ret .= $s . $descr . ": " . $pwr_state->{$i};
$s = ", ";
}
return if ( $s eq "" );
return $ret;
}
sub ps2_status {
my $huawei = shift;
my $pwr_state = $huawei->hw_pwr_state() || {};
my $pwr_descr = $huawei->hw_pwr_descr() || {};
my $ret = "";
my $s = "";
foreach my $i ( sort keys %$pwr_state ) {
my ( $slot, $num ) = split( /\./, $i );
next unless $num == 2;
my $descr = "Slot $slot,PS $num";
$descr = $pwr_descr->{$i} if ($pwr_descr->{$i});
$ret .= $s . $descr . ": " . $pwr_state->{$i};
$s = ", ";
}
return if ( $s eq "" );
return $ret;
}
sub i_mtu {
my $huawei = shift;
my $mtus = $huawei->SUPER::i_mtu() || {};
my $frames = $huawei->hw_eth_frame_len() || {};
foreach my $idx ( keys %$mtus ) {
my $frame_sz = $frames->{$idx};
next unless $frame_sz;
$mtus->{$idx} = $frame_sz;
}
return $mtus;
}
sub munge_hw_peth_admin {
my $admin = shift;
$admin =~ s/enabled/true/;
$admin =~ s/disabled/false/;
return $admin;
}
sub munge_hw_peth_power {
my $pwr = shift;
$pwr = $pwr / 1000;
return sprintf( "%.0f", $pwr );
}
sub munge_hw_peth_class {
my $pwr = shift;
return "class$pwr";
}
# The values are from the MIB reference guide
sub munge_hw_peth_status {
my $pwr = shift;
# The status is an octet string rather than enum
# so use regex rather than hash lookup
$pwr = 'disabled' if $pwr =~ /Disabled/i;
$pwr = 'searching' if $pwr =~ /(Powering|Power-ready|Detecting)/ix;
$pwr = 'deliveringPower' if $pwr =~ /Powered/i;
$pwr = 'fault' if $pwr =~ /fault/i;
return $pwr;
}
1;
__END__
=head1 NAME
SNMP::Info::Layer3::Huawei - SNMP Interface to Huawei Layer 3 switches and routers.
SNMP::Info::Layer3::Huawei - SNMP Interface to Huawei switches and routers.
=head1 AUTHORS
Jeroen van Ingen
Jeroen van Ingen and Eric Miller
=head1 SYNOPSIS
@@ -142,7 +526,7 @@ Jeroen van Ingen
=head1 DESCRIPTION
Subclass for Huawei Quidway switches
Subclass for Huawei switches
=head2 Inherited Classes
@@ -150,8 +534,6 @@ Subclass for Huawei Quidway switches
=item SNMP::Info::Layer3
=item SNMP::Info::LLDP
=item SNMP::Info::IEEE802dot3ad
=back
@@ -162,12 +544,20 @@ Subclass for Huawei Quidway switches
=item F<HUAWEI-MIB>
=item F<HUAWEI-PORT-MIB>
=item F<HUAWEI-IF-EXT-MIB>
=item F<HUAWEI-L2IF-MIB>
=item F<HUAWEI-POE-MIB>
=item F<HUAWEI-ENTITY-EXTENT-MIB>
=item Inherited Classes' MIBs
See L<SNMP::Info::Layer3> for its own MIB requirements.
See L<SNMP::Info::LLDP> for its own MIB requirements.
See L<SNMP::Info::IEEE802dot3ad> for its own MIB requirements.
=back
@@ -188,7 +578,30 @@ Returns 'VRP' if contained in C<sysDescr>, 'huawei' otherwise.
=item $huawei->os_ver()
Returns the software version extracted from C<sysDescr>.
Returns the software version derived from the C<ENTITY-MIB> or
extracted from C<sysDescr>.
=item $huawei->mac()
Base MAC of the device.
(C<dot1dBaseBridgeAddress>)
=item $huawei->fan()
Return the status of all fans from the F<HUAWEI-ENTITY-EXTENT-MIB>. Returns
a string indicating the number of fans 'OK' or identification of any fan without
a 'normal' operating status
=item $huawei->ps1_status()
Return the status of the first power supply in each chassis or switch from
the F<HUAWEI-ENTITY-EXTENT-MIB>
=item $huawei->ps2_status()
Return the status of the second power supply in each chassis or switch from
the F<HUAWEI-ENTITY-EXTENT-MIB>
=back
@@ -196,15 +609,49 @@ Returns the software version extracted from C<sysDescr>.
See documentation in L<SNMP::Info::Layer3> for details.
=head2 Globals imported from SNMP::Info::LLDP
See documentation in L<SNMP::Info::LLDP> for details.
=head1 TABLE ENTRIES
These are methods that return tables of information in the form of a reference
to a hash.
=over
=item $huawei->i_duplex()
Returns reference to map of IIDs to current link duplex.
=item $huawei->i_duplex_admin()
Returns reference to hash of IIDs to admin duplex setting.
=back
=head2 POE Slot Table
=over
=item $huawei->peth_power_watts()
The slot's power supply's capacity, in watts.
C<hwPoeSlotMaximumPower>
=item $huawei->peth_power_consumption()
How much power, in watts, this power supply has been committed to
deliver.
C<hwPoeSlotConsumingPower>
=item $huawei->peth_power_threshold()
The threshold (in percent) of consumption required to raise an
alarm.
C<hwPoeSlotPowerUtilizationThreshold>
=back
=head2 Overrides
=over
@@ -215,11 +662,63 @@ Returns reference to hash. Increments value of IID if port is to be ignored.
Ignores InLoopback and Console interfaces
=item $huawei->bp_index()
Returns a mapping between C<ifIndex> and the Bridge Table. Uses
C<hwL2IfPortIfIndex> for the most complete mapping and falls back to
C<dot1dBasePortIfIndex> if not available.
=item C<agg_ports>
Returns a HASH reference mapping from slave to master port for each member of
a port bundle on the device. Keys are ifIndex of the slave ports, Values are
ifIndex of the corresponding master ports.
ifIndex of the corresponding master ports. Attempts to use C<hwTrunkIfTable>
first and then C<dot3adAggPortListPorts> if that is unavailable.
=item C<i_mtu>
Interface MTU value. Overriden with corresponding frame size entry from
C<hwEthernetJumboframeMaxLength> if one exists.
=back
=head2 Power Port Table
The index of these methods have been normalized to slot.port and values
munged to provide compatability with the IEEE 802.3af F<POWER-ETHERNET-MIB>
and equivalent L<SNMP::Info::PowerEthernet> methods.
=over
=item $huawei->peth_port_admin()
Administrative status: is this port permitted to deliver power?
=item $huawei->peth_port_status()
Current status: is this port delivering power, searching, disabled, etc?
=item $huawei->peth_port_class()
Device class: if status is delivering power, this represents the 802.3af
class of the device being powered.
=item $huawei->peth_port_power()
Power supplied the port, in milliwatts
=item $huawei->peth_port_ifindex()
Returns an index of slot.port to an C<ifIndex>. Slot defaults to zero
meaning chassis or box if there is no C<ifIndex> to slot mapping available in
C<hwPhysicalPortInSlot>. Mapping the index to slot.port is a normalization
function to provide compatability with the IEEE 802.3af F<POWER-ETHERNET-MIB>.
=item $huawei->peth_port_neg_power()
The power, in milliwatts, that has been committed to this port.
This value is derived from the 802.3af class of the device being
powered.
=back
@@ -227,12 +726,31 @@ ifIndex of the corresponding master ports.
See documentation in L<SNMP::Info::Layer3> for details.
=head2 Table Methods imported from SNMP::Info::LLDP
See documentation in L<SNMP::Info::LLDP> for details.
=head2 Table Methods imported from SNMP::Info::IEEE802dot3ad
See documentation in L<SNMP::Info::IEEE802dot3ad> for details.
=head1 Data Munging Callback Subroutines
=over
=item $huawei->munge_hw_peth_admin()
Normalizes C<hwPoePortEnable> values to 'true' or 'false'.
=item $huawei->munge_hw_peth_class()
Normalizes C<hwPoePortPdClass> values by prepending 'class'.
=item $huawei->munge_hw_peth_power()
Converts and rounds to a whole number milliwatts to watts.
=item $huawei->munge_hw_peth_status()
Normalizes C<hwPoePortPowerStatus> values to those that would be returned by
the the IEEE 802.3af F<POWER-ETHERNET-MIB>.
=back
=cut

Some files were not shown because too many files have changed in this diff Show More