Compare commits

...

145 Commits
3.53 ... 3.63

Author SHA1 Message Date
Oliver Gorwits
bde8da5e6b release 3.63 2018-11-25 23:27:42 +00:00
Oliver Gorwits
f134368e6d try different testing 2018-11-25 23:16:10 +00:00
Oliver Gorwits
a6ff166e4e attempt to fix test? 2018-11-21 11:37:44 +00:00
Oliver Gorwits
3ea6bd6217 fix docs 2018-11-21 10:52:45 +00:00
Oliver Gorwits
6405ebfc3e #271 update os_ver for Alcatel-Lucent (stromsoe) 2018-11-21 10:48:05 +00:00
Oliver Gorwits
94ab114cd3 #273 remove old ADTRAN modules not in netdisco-mibs 2018-11-21 10:45:46 +00:00
nick n
954f58fdbc return aerohive serial (#280)
no idea why this is needed, but without this change no serial is returned:

netdisco-do show -d hiveap207 -e serial
[25474] 2018-11-09 19:45:09  info App::Netdisco version 2.039031 loaded.
[25474] 2018-11-09 19:45:10  info show: [10.40.252.14]/serial started at Fri Nov  9 20:45:10 2018
undef
[25474] 2018-11-09 19:45:10  info show: finished at Fri Nov  9 20:45:10 2018
[25474] 2018-11-09 19:45:10  info show: status done: Showed serial response from 10.40.252.14

netdisco-do show -d hiveap207 -e Layer2::Aerohive::serial
[25491] 2018-11-09 19:45:15  info App::Netdisco version 2.039031 loaded.
[25491] 2018-11-09 19:45:15  info show: [10.40.252.14]/Layer2::Aerohive::serial started at Fri Nov  9 20:45:15 2018
undef
[25491] 2018-11-09 19:45:16  info show: finished at Fri Nov  9 20:45:16 2018
[25491] 2018-11-09 19:45:16  info show: status done: Showed serial response from 10.40.252.14



with the change:
netdisco-do show -d hiveap207 -e Layer2::Aerohive::serial
[23072] 2018-11-09 19:44:06  info App::Netdisco version 2.039031 loaded.
[23072] 2018-11-09 19:44:07  info show: [10.40.252.14]/Layer2::Aerohive::serial started at Fri Nov  9 20:44:07 2018
02501610110274
[23072] 2018-11-09 19:44:07  info show: finished at Fri Nov  9 20:44:07 2018
[23072] 2018-11-09 19:44:07  info show: status done: Showed serial response from 10.40.252.14

netdisco-do show -d hiveap207 -e serial
[23075] 2018-11-09 19:44:13  info App::Netdisco version 2.039031 loaded.
[23075] 2018-11-09 19:44:13  info show: [10.40.252.14]/serial started at Fri Nov  9 20:44:13 2018
02501610110274
[23075] 2018-11-09 19:44:14  info show: finished at Fri Nov  9 20:44:14 2018
[23075] 2018-11-09 19:44:14  info show: status done: Showed serial response from 10.40.252.14
2018-11-21 10:37:19 +00:00
nick n
8232e783fa use correct module (#279)
The test code for Layer2::Aerohive should reference the Layer2::Aerohive class, not Layer1::Allied.
2018-11-13 08:57:02 +01:00
Eric A. Miller
5aa21deb07 release 3.62 2018-10-29 19:09:26 -04:00
Alexander Hartmaier
b7ac11222a Support for Cisco Firepower Threat Defense (#278)
When sending SNMP requests to one of the data interfaces of an FTD you're
talking to a Cisco ASA running as a process called 'lina'.
2018-10-25 10:30:43 +02:00
Jeroen van Ingen
b24da8c380 Add tests for peth_port_ifindex in Juniper.pm 2018-10-08 12:37:23 +02:00
pyro3d
ab2be759af Document peth_port_ifindex for Junipers (#275)
Document peth_port_ifindex in Juniper.pm
2018-10-08 10:56:38 +02:00
Jeroen van Ingen Schenau
78e5528c0d Merge pull request #270 from avantops/mikrotik-model-fix
Add support for additional Mikrotik models
2018-10-08 09:45:27 +02:00
Jeroen van Ingen Schenau
01ce4238dd Merge pull request #274 from pyro3d/master
Add peth_port_ifindex override for Junipers.
2018-10-08 09:44:00 +02:00
Ryan Gasik
a82e8e32a0 Add peth_port_ifindex override for Junipers. 2018-10-06 20:53:06 -07:00
Jeroen van Ingen
770ab9c8ec Add 3810M, 2930M, 2930F and 2540 series switches 2018-09-10 10:28:42 +02:00
avantops
f63a71910c Add support for additional Mikrotik models
Add additional regex to catch additional valid Mikrotik hardware models.
2018-06-27 00:05:42 -07:00
Jeroen van Ingen Schenau
8fa27f8844 Merge pull request #265 from fschlich/patch-1
fix typos in Huawei.pm
2018-05-14 17:59:09 +02:00
Florian Schlichting
ea59fa2c2d fix typos in Huawei.pm
as found by Debian's lintian QA checker
2018-05-14 17:47:34 +02:00
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
Eric A. Miller
bd85ebc8d6 release 3.55 2018-04-19 19:06:06 -04:00
Eric A. Miller
2aca6d9300 #67 Juniper EX4300 Missing/Wrong information
Modify Q-Bridge methods to work on both pre-Enhanced Layer 2 Software (ELS) such as EX4200 and newer Enhanced Layer 2 Software (ELS) based switches such as EX4300 and QFX series
2018-04-19 18:23:48 -04:00
Eric A. Miller
4919cb0f69 Documentation correction 2018-04-19 18:15:55 -04:00
Eric A. Miller
d134c342e8 #117 Recognition for HP Blade switches 2018-04-19 18:12:39 -04:00
Eric A. Miller
b1c7e78d12 Merge branch 'robwwd-oneaccess' 2018-04-17 00:09:29 -04:00
Eric A. Miller
0a0766afbd Simplify Layer3::OneAccess model method since it is returning a static string
Add Layer3::OneAccess test class and POD updates
2018-04-17 00:09:02 -04:00
Eric A. Miller
2d39911cba Merge branch 'oneaccess' of https://github.com/robwwd/snmp-info into robwwd-oneaccess 2018-04-16 23:50:59 -04:00
Eric A. Miller
3bf60002f4 Merge branch 'robwwd-erx' 2018-04-16 23:49:39 -04:00
Eric A. Miller
42db01335e Add Layer3::ERX test class and POD updates 2018-04-16 23:47:35 -04:00
Eric A. Miller
752e1c632c Merge branch 'erx' of https://github.com/robwwd/snmp-info into robwwd-erx 2018-04-16 23:32:32 -04:00
Eric A. Miller
892d2014ca Merge branch 'robwwd-arbor' 2018-04-16 23:30:26 -04:00
Eric A. Miller
1fdc486cd5 Add Layer7::Arbor test class
POD updates
2018-04-16 23:29:24 -04:00
Eric A. Miller
9e7f7f734e Merge branch 'arbor' of https://github.com/robwwd/snmp-info into robwwd-arbor 2018-04-16 23:06:33 -04:00
Rob Woodward
e311f8a5c6 Change vendor to Juniper 2018-04-16 13:15:26 +01:00
Eric A. Miller
82755ab8db #196 support for powerconnect 8164F
Refactor Layer3::Dell for better support of newer models - requires updated MIBs
2018-04-15 23:38:05 -04:00
Eric A. Miller
62823e3d83 Factor out logic to determine serial number from ENTITY-MIB in Layer2 and Layer3 to new method entity_derived_serial in Entity class
Create new method entity_derived_os_ver in Entity class to determine OS version in a similar manner
2018-04-15 23:30:19 -04:00
Rob Woodward
66077c9662 Fix documentation 2018-04-13 12:17:36 +01:00
Rob Woodward
74e129154b Add ERX (Old Juniper E-Series JunOSe) Support 2018-04-13 12:12:17 +01:00
Rob Woodward
75880d9134 Fix tab character 2018-04-13 12:05:37 +01:00
Rob Woodward
245fe93be4 Support for OneAccess Network Devices 2018-04-13 12:01:58 +01:00
Rob Woodward
54a0baa2fa Add support for Arbor devices 2018-04-13 11:26:46 +01:00
Eric A. Miller
4e18ccc9e2 #142 Sixnet Switch Support 2018-04-12 22:57:54 -04:00
Eric A. Miller
9ed5a187a9 Add missing documentation to Layer2::Nexans
Update Changes and Manifest
Add Layer2::Nexans test class
2018-04-12 14:44:53 -04:00
Eric Miller
a636ba6117 Merge pull request #253 from paecker/nexans_support
Nexans switch support
2018-04-12 14:26:44 -04:00
Eric A. Miller
facdf0aafe Restore check that the MIB leaf is accessible when validating AUTOLOAD method calls
Restore corresponding test
Move live snmp_connect_ip() test to 10_remote_snmplabs.t so that tests requiring Internet access are within one file
2018-04-11 21:09:57 -04:00
Eric A. Miller
75dcf74148 Add initial versions of test classes 2018-04-11 21:02:48 -04:00
Eric A. Miller
e252dac59c Correct typo in comments 2018-04-11 20:56:15 -04:00
Eric A. Miller
9d384f2bc2 Correct regex validator in mau_set_i_speed_admin() and mau_set_i_duplex_admin()
Correct IID/key used in mau_set_i_speed_admin() and mau_set_i_duplex_admin()
Add MAU test class
2018-04-11 20:55:11 -04:00
Eric A. Miller
cc9a1c9f47 Make sure MIB leaf is actually in the MIB we're loading, not the imports
Add Layer3::Foundry and Layer3::Force10 test classes
2018-04-11 20:50:16 -04:00
Eric A. Miller
b43eafd09a Use OIDs when we don't have the MIB
Add Layer3::DLink test class
2018-04-11 20:48:16 -04:00
Eric A. Miller
141470fdf4 Add missing MIB required for leafs used in %FUNCS
Add Layer3::Dell test class
2018-04-11 20:46:36 -04:00
Eric A. Miller
2e18464635 Make sure MIB leaf is actually in the MIB we're loading, not the imports
Capture the numeric OS version
Add Layer3::Cumulus test class
2018-04-11 20:43:54 -04:00
Eric A. Miller
87a287e0c9 Sort hash keys to make sure we returna consistent mac in L3::Contivity
Add Layer3::Contivity test class
2018-04-11 20:42:35 -04:00
Eric A. Miller
a38eafbf56 Increase capture of i_vlan on router interfaces in L3::Cisco
Make sure cisco_comm_indexing() has a return value of either 1 or 0 in L3::Cisco
Add Layer3::Cisco test class
2018-04-11 20:41:14 -04:00
Eric A. Miller
81c7203642 Make sure MIB leaf is actually in the MIB we're loading, not the imports
Add L3::CheckPoint, L3::NetSNMP, and L3::PacketFront test classes
2018-04-11 20:36:51 -04:00
Eric A. Miller
c515a5e4a1 Prevent potential undefined warning in ports() of Layer3::C3550
Add Layer3::C3550 test class
2018-04-11 20:30:46 -04:00
Eric A. Miller
02e6807e44 Prevent potential undefined warnings in i_speed_admin() of L2::C2900 2018-04-11 20:27:40 -04:00
Eric A. Miller
90bb0ef071 ISA Info
Add IEEE802dot11 test class
2018-04-11 20:25:55 -04:00
Eric A. Miller
209988cf9e Don't use MIB leafs that are not-accessible according to MIB
Add CiscoVTP test class
2018-04-11 20:24:50 -04:00
Eric A. Miller
da130926a9 Don't use MIB leafs that are not-accessible according to MIB
Add CiscoPortSecurity test class
2018-04-11 20:21:08 -04:00
Eric A. Miller
4c51c29428 Fix gigabit logic in i_duplex_admin()
ISA Info
Add CiscoStack test class
2018-04-11 20:19:58 -04:00
Eric A. Miller
2301d2e60a Remove not-accessible 'cdpCacheIfIndex' MIB leaf and don't try to access it in CDP class
Add CDP test class
2018-04-11 20:12:46 -04:00
Eric A. Miller
53a5b5aa0a Correct typo in store hash 2018-04-11 19:57:32 -04:00
Eric A. Miller
d13adfee80 Correct test descriptions 2018-04-11 19:56:36 -04:00
Christoph Neuhaus
9752bf2878 Merge branch 'master' of https://github.com/netdisco/snmp-info into nexans_support 2018-04-11 16:53:38 +02:00
Christoph Neuhaus
9949eeb389 Version 3.54 2018-04-11 09:14:49 +02:00
Eric A. Miller
aceed9cc52 Remove non-existant MIB leafs and add FDP cache type
Add FDP test class
2018-04-05 23:31:03 -04:00
Eric A. Miller
0371ca35d6 Use consistent return values and provide default initalizations
Add inital versions of Layer 2 test classes
2018-04-05 23:28:57 -04:00
Eric A. Miller
ce0a350ef2 Correct typo in MIB leaf names in Layer3::Aironet
Add Layer3::Aironet test class
2018-04-05 23:25:34 -04:00
Eric A. Miller
3b58ba8678 Remove commented out code
Add Layer2::Orinoco test class
2018-04-05 23:23:59 -04:00
Eric A. Miller
a69b45d849 Load MIB required for defined FUNCS
Add Layer2::Trapeze and Layer2::NWSS2300 test classes
2018-04-05 23:11:37 -04:00
Eric A. Miller
ad0a1044b9 Use SUPER:: rather than creating a new global
Add Layer2::Aironet test class
2018-04-05 23:09:19 -04:00
Eric A. Miller
5336ec2db2 Make sure MIB leaf is actually in the MIB we're loading, not the imports
Add CiscoStats and Layer3::Arista test classes
2018-04-05 23:07:49 -04:00
Eric A. Miller
e20cd6dd02 Fix ISA in AMAP and EDP classes
Add AMAP and EDP test classes
2018-04-05 23:03:33 -04:00
Eric A. Miller
66f16f6617 #61 ZyXEL (X)GS1900 family MIB
Fix loop in Layer2::ZyXEL_DSLAM layers method
Add  Layer2::ZyXEL_DSLAM test class
2018-04-05 23:01:48 -04:00
Eric A. Miller
0755487e02 release 3.54 2018-04-01 22:22:32 -04:00
Eric A. Miller
afeb37ae5e Additional test classes 2018-04-01 22:09:50 -04:00
Eric A. Miller
cc05fb927f Track down mysterious CARP_TRACE, don’t try to AUTOLOAD or create method through can()
Remove test for previous appearance in _global
2018-04-01 22:04:07 -04:00
Eric A. Miller
facdf5b7a7 Relax validation of MIB access checks until we have broader test coverage that this is a non-breaking change
Mark corresponding test TODO in Info test class
2018-04-01 21:50:26 -04:00
Eric A. Miller
66bedd4d54 Load MIB for leafs referenced within class so we can instantiate class
Aggregate test class
2018-04-01 21:03:40 -04:00
Eric A. Miller
3a3c1efe46 Explicit returns
Layer2::3Com test class
2018-04-01 21:01:06 -04:00
Eric A. Miller
1a069c2b52 Make sure MIB leaf is actually in the MIB we're loading, not the imports
Add initial Layer1::Bayhub and Layer2::Baystack test classes
2018-04-01 20:59:32 -04:00
Eric A. Miller
f7de9ffbc6 Explicit return 2018-04-01 20:49:23 -04:00
Eric A. Miller
3c6cfa8ecf Cover overridden layers in Layer1::Cyclades 2018-04-01 20:46:02 -04:00
Eric A. Miller
585d01895b Use cmp_deeply versus is_deeply for better diagnostics 2018-04-01 20:44:17 -04:00
Eric A. Miller
63cac2a3a8 Test harness only checks for existence of data structures in constructor test
Test harness skips globals, funcs, mibs, and munges tests if the hash is empty
Add test to check that subclass methods have coverage with ability to mark class as TODO
2018-04-01 20:28:58 -04:00
Eric A. Miller
0623fbfdf1 Update changes for last commit set 2018-04-01 20:27:11 -04:00
Eric A. Miller
0c711269ae #141 Avocent ACS files for correct discovery in Netdisco
Add support for ACS 5K/6K/8K terminal servers in Layer1::Cyclades requires new MIBs
Layer1::Cyclades test class
2018-03-31 23:25:10 -04:00
Eric A. Miller
f676d27a3b Updated Layer3::Timetra requires latest MIBs
Update Changes and MANIFEST for recent changes
2018-03-30 17:34:35 -04:00
Eric A. Miller
64167df588 #215 Nokia/Alcatel-Lucent 7705 LLDP
#220 Alcatel-Lucent / Nokia SR 7750 missing neighbors
Improve Layer3::Timetra model detection
Layer3::Timetra test class
2018-03-30 17:17:44 -04:00
Eric A. Miller
398f3ee74b Layer1::Asante test class
Fix logic in Layer1::Asante i_up() method
Don't end a subroutine with a conditional block
2018-03-30 17:11:22 -04:00
Eric A. Miller
125f02b8a2 Layer1::Allied test class
Don't end a subroutine with a conditional block
2018-03-30 17:08:39 -04:00
Eric A. Miller
eeeabeec94 Sort keys in globals, funcs, mibs, and munges tests so that reported order is consistent between test runs 2018-03-30 17:06:00 -04:00
Eric A. Miller
5fe0ebaeda Fix typo in MIB leaf
Don't use MIB leafs that are not-accessible according to MIB
2018-03-30 17:03:48 -04:00
Eric A. Miller
fda59f51f7 Correct comment on table containing ifName 2018-03-29 15:50:34 -04:00
Eric A. Miller
e8de74c6a5 Move common device_type() tests to base test class 2018-03-29 15:49:13 -04:00
Eric A. Miller
da6716b107 Make class names reflect new directory structure 2018-03-29 12:25:12 -04:00
Eric A. Miller
62267f4e8e Change Test class naming to minimize directories 2018-03-29 12:18:22 -04:00
Eric A. Miller
fd1c91edac Move common test methods to base class and mark them to be skipped in base class itself 2018-03-28 23:12:25 -04:00
Eric A. Miller
a0b2010994 Comment on todo_skip tests in update() 2018-03-28 22:47:07 -04:00
Eric A. Miller
bda796ae98 Mark failing v3 context update tests as todo_skip 2018-03-27 22:25:02 -04:00
Eric A. Miller
8b3b03b312 Create a new v3 based object for to test update() with Context 2018-03-27 21:53:05 -04:00
Eric A. Miller
cbc756a3f8 Test harness improvements and test coverage of all methods within SNMP::Info base class 2018-03-27 21:07:04 -04:00
Eric A. Miller
9af7a7661c Fix logic for determining if MIB leaf supports set operations 2018-03-27 21:05:26 -04:00
Eric A. Miller
eab89e4736 Just return rather than create anon sub 2018-03-26 23:52:31 -04:00
Eric A. Miller
8391cee4f3 Remove unused variables from _load_attr method 2018-03-26 23:32:48 -04:00
Eric A. Miller
fcd0e30d64 If we don't have valid arguments stop and return, we also won't be able to report attr or val. 2018-03-26 20:57:46 -04:00
Christoph Neuhaus
4a454c9431 Tag 3.53 2018-03-26 17:34:44 +02:00
Christoph Neuhaus
cd751071e1 Merge remote-tracking branch 'upstream/master' into nexans_support 2018-03-26 17:31:21 +02:00
Eric A. Miller
c921e8b35c Mark problematic update() tests as todo_skip 2018-03-22 23:19:12 -04:00
Eric A. Miller
60d5591401 More base class test coverage 2018-03-22 22:52:58 -04:00
Christoph Neuhaus
f6a4f937ee Nexans switch support 2018-03-22 17:26:05 +01:00
265 changed files with 21995 additions and 3231 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.004/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',
@@ -33,6 +34,7 @@ Module::Build->new(
'Path::Class' => '0',
'File::Slurper' => '0',
'Test::Exception' => '0.43',
'Class::Inspector' => '0',
},
# script_files => [
# ],

170
Changes
View File

@@ -1,3 +1,173 @@
Version 3.63 (2018-11-25)
[ENHANCEMENTS]
* #280 update to retrieve Aerohive serial
* #271 update os_ver for Alcatel-Lucent (stromsoe)
[BUG FIXES]
* #273 remove old ADTRAN modules not in netdisco-mibs
Version 3.62 (2018-10-29)
[ENHANCEMENTS]
* #278 Support for Cisco Firepower Threat Defense
* #275 Document peth_port_ifindex for Junipers
* #274 Add peth_port_ifindex override for Junipers
* #270 Add support for additional Mikrotik models
* Add HP 3810M, 2930M, 2930F and 2540 series switches
[BUG FIXES]
* #265 Fix typos in L3::Huawei
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]
* #260 Oneaccess (robwwd)
* #259 Add ERX (Old Juniper E-Series JunOSe) Support (robwwd)
* #258 Add support for Arbor devices (robwwd)
* #253 Nexans switch support (paecker)
* #142 Sixnet Switch Support
[ENHANCEMENTS]
* #117 Recognition for HP Blade switches (J R Binks)
* #196 Support for powerconnect 8164F
* Refactor Layer3::Dell for better support of newer models
* Increase capture of i_vlan on router interfaces in L3::Cisco
* Factor out logic to determine serial number from ENTITY-MIB in Layer2 and
Layer3 to new method entity_derived_serial in Entity class and added new
method entity_derived_os_ver in Entity class to determine OS version
in a similar manner
[BUG FIXES]
* #67 Juniper EX4300 Missing/Wrong information
* #61 ZyXEL (X)GS1900 family MIB - Fix loop in layers method
* Fix ISA in AMAP and EDP classes
* Add missing MIB in L2::Trapeze, L2::NWSS2300, and L3::Dell
* Fix gigabit logic in i_duplex_admin() of CiscoStack
* Prevent potential undefined warnings in i_speed_admin() of L2::C2900 and
ports() of L3::C3550
* Correct validation and IID/key used in mau_set_i_speed_admin() and
mau_set_i_duplex_admin() of MAU
* Correct typo in MIB leaf names in L3::Aironet
* Don't use MIB leafs that are not-accessible according to MIB
NOTE: Fixing this logic now results in methods on MIB leafs specified as
not-accessible failing validation in _validate_autoload_method()
Version 3.54 (2018-04-01)
[NEW FEATURES]
* #141 Avocent ACS files for correct discovery in Netdisco
* Add support for Avocent ACS 5K/6K/8K terminal servers in Layer1::Cyclades
[ENHANCEMENTS]
* #215 Nokia/Alcatel-Lucent 7705 LLDP
* #220 Alcatel-Lucent / Nokia SR 7750 missing neighbors
* Improve Layer3::Timetra model detection
[BUG FIXES]
* Fix logic in Layer1::Asante i_up() method
* Fix MIB leaf typo in IPv6
* Don't use MIB leafs that are not-accessible according to MIB
* Fix logic for determining if MIB leaf supports set operations
NOTE: Fixing this logic now results in methods starting with set_ on MIB
leafs without Write or Create access failing validation in
_validate_autoload_method()
Version 3.53 (2018-03-22)
[NEW FEATURES]

136
MANIFEST
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
@@ -58,8 +61,10 @@ lib/SNMP/Info/Layer2/Kentrox.pm
lib/SNMP/Info/Layer2/N2270.pm
lib/SNMP/Info/Layer2/NAP222x.pm
lib/SNMP/Info/Layer2/Netgear.pm
lib/SNMP/Info/Layer2/Nexans.pm
lib/SNMP/Info/Layer2/NWSS2300.pm
lib/SNMP/Info/Layer2/Orinoco.pm
lib/SNMP/Info/Layer2/Sixnet.pm
lib/SNMP/Info/Layer2/Trapeze.pm
lib/SNMP/Info/Layer2/Ubiquiti.pm
lib/SNMP/Info/Layer2/ZyXEL_DSLAM.pm
@@ -85,11 +90,13 @@ lib/SNMP/Info/Layer3/Cumulus.pm
lib/SNMP/Info/Layer3/Dell.pm
lib/SNMP/Info/Layer3/DLink.pm
lib/SNMP/Info/Layer3/Enterasys.pm
lib/SNMP/Info/Layer3/ERX.pm
lib/SNMP/Info/Layer3/Extreme.pm
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
@@ -102,6 +109,7 @@ lib/SNMP/Info/Layer3/N1600.pm
lib/SNMP/Info/Layer3/Netscreen.pm
lib/SNMP/Info/Layer3/NetSNMP.pm
lib/SNMP/Info/Layer3/Nexus.pm
lib/SNMP/Info/Layer3/OneAccess.pm
lib/SNMP/Info/Layer3/PacketFront.pm
lib/SNMP/Info/Layer3/PaloAlto.pm
lib/SNMP/Info/Layer3/Passport.pm
@@ -116,8 +124,10 @@ lib/SNMP/Info/Layer3/VMware.pm
lib/SNMP/Info/Layer3/VyOS.pm
lib/SNMP/Info/Layer7.pm
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
@@ -145,4 +155,128 @@ xt/00_local_versionsync.t
xt/10_remote_snmplabs.t
xt/20_run.t
xt/lib/My/Test/Class.pm
xt/lib/SNMP/Info/Test.pm
xt/lib/Test/SNMP/Info.pm
xt/lib/Test/SNMP/Info/AdslLine.pm
xt/lib/Test/SNMP/Info/Aggregate.pm
xt/lib/Test/SNMP/Info/Airespace.pm
xt/lib/Test/SNMP/Info/AMAP.pm
xt/lib/Test/SNMP/Info/Bridge.pm
xt/lib/Test/SNMP/Info/CDP.pm
xt/lib/Test/SNMP/Info/CiscoAgg.pm
xt/lib/Test/SNMP/Info/CiscoConfig.pm
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/CiscoStats.pm
xt/lib/Test/SNMP/Info/CiscoStpExtensions.pm
xt/lib/Test/SNMP/Info/CiscoVTP.pm
xt/lib/Test/SNMP/Info/EDP.pm
xt/lib/Test/SNMP/Info/Entity.pm
xt/lib/Test/SNMP/Info/EtherLike.pm
xt/lib/Test/SNMP/Info/FDP.pm
xt/lib/Test/SNMP/Info/IEEE802dot11.pm
xt/lib/Test/SNMP/Info/IEEE802dot3ad.pm
xt/lib/Test/SNMP/Info/IPv6.pm
xt/lib/Test/SNMP/Info/Layer1.pm
xt/lib/Test/SNMP/Info/Layer1/Allied.pm
xt/lib/Test/SNMP/Info/Layer1/Asante.pm
xt/lib/Test/SNMP/Info/Layer1/Bayhub.pm
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
xt/lib/Test/SNMP/Info/Layer2/Catalyst.pm
xt/lib/Test/SNMP/Info/Layer2/Centillion.pm
xt/lib/Test/SNMP/Info/Layer2/Cisco.pm
xt/lib/Test/SNMP/Info/Layer2/CiscoSB.pm
xt/lib/Test/SNMP/Info/Layer2/HP.pm
xt/lib/Test/SNMP/Info/Layer2/HP4000.pm
xt/lib/Test/SNMP/Info/Layer2/HPVC.pm
xt/lib/Test/SNMP/Info/Layer2/Kentrox.pm
xt/lib/Test/SNMP/Info/Layer2/N2270.pm
xt/lib/Test/SNMP/Info/Layer2/NAP222x.pm
xt/lib/Test/SNMP/Info/Layer2/Netgear.pm
xt/lib/Test/SNMP/Info/Layer2/Nexans.pm
xt/lib/Test/SNMP/Info/Layer2/NWSS2300.pm
xt/lib/Test/SNMP/Info/Layer2/Orinoco.pm
xt/lib/Test/SNMP/Info/Layer2/Sixnet.pm
xt/lib/Test/SNMP/Info/Layer2/Trapeze.pm
xt/lib/Test/SNMP/Info/Layer2/Ubiquiti.pm
xt/lib/Test/SNMP/Info/Layer2/ZyXEL_DSLAM.pm
xt/lib/Test/SNMP/Info/Layer3.pm
xt/lib/Test/SNMP/Info/Layer3/Aironet.pm
xt/lib/Test/SNMP/Info/Layer3/AlcatelLucent.pm
xt/lib/Test/SNMP/Info/Layer3/AlteonAD.pm
xt/lib/Test/SNMP/Info/Layer3/Altiga.pm
xt/lib/Test/SNMP/Info/Layer3/Arista.pm
xt/lib/Test/SNMP/Info/Layer3/Aruba.pm
xt/lib/Test/SNMP/Info/Layer3/BayRS.pm
xt/lib/Test/SNMP/Info/Layer3/BlueCoatSG.pm
xt/lib/Test/SNMP/Info/Layer3/C3550.pm
xt/lib/Test/SNMP/Info/Layer3/C4000.pm
xt/lib/Test/SNMP/Info/Layer3/C6500.pm
xt/lib/Test/SNMP/Info/Layer3/CheckPoint.pm
xt/lib/Test/SNMP/Info/Layer3/Cisco.pm
xt/lib/Test/SNMP/Info/Layer3/CiscoASA.pm
xt/lib/Test/SNMP/Info/Layer3/CiscoFWSM.pm
xt/lib/Test/SNMP/Info/Layer3/CiscoSwitch.pm
xt/lib/Test/SNMP/Info/Layer3/Contivity.pm
xt/lib/Test/SNMP/Info/Layer3/Cumulus.pm
xt/lib/Test/SNMP/Info/Layer3/Dell.pm
xt/lib/Test/SNMP/Info/Layer3/DLink.pm
xt/lib/Test/SNMP/Info/Layer3/Enterasys.pm
xt/lib/Test/SNMP/Info/Layer3/ERX.pm
xt/lib/Test/SNMP/Info/Layer3/Extreme.pm
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
xt/lib/Test/SNMP/Info/Layer3/IBMGbTor.pm
xt/lib/Test/SNMP/Info/Layer3/Juniper.pm
xt/lib/Test/SNMP/Info/Layer3/Lantronix.pm
xt/lib/Test/SNMP/Info/Layer3/Microsoft.pm
xt/lib/Test/SNMP/Info/Layer3/Mikrotik.pm
xt/lib/Test/SNMP/Info/Layer3/N1600.pm
xt/lib/Test/SNMP/Info/Layer3/Netscreen.pm
xt/lib/Test/SNMP/Info/Layer3/NetSNMP.pm
xt/lib/Test/SNMP/Info/Layer3/Nexus.pm
xt/lib/Test/SNMP/Info/Layer3/OneAccess.pm
xt/lib/Test/SNMP/Info/Layer3/PacketFront.pm
xt/lib/Test/SNMP/Info/Layer3/PaloAlto.pm
xt/lib/Test/SNMP/Info/Layer3/Passport.pm
xt/lib/Test/SNMP/Info/Layer3/Pf.pm
xt/lib/Test/SNMP/Info/Layer3/Pica8.pm
xt/lib/Test/SNMP/Info/Layer3/SonicWALL.pm
xt/lib/Test/SNMP/Info/Layer3/Steelhead.pm
xt/lib/Test/SNMP/Info/Layer3/Sun.pm
xt/lib/Test/SNMP/Info/Layer3/Tasman.pm
xt/lib/Test/SNMP/Info/Layer3/Timetra.pm
xt/lib/Test/SNMP/Info/Layer3/VMware.pm
xt/lib/Test/SNMP/Info/Layer3/VyOS.pm
xt/lib/Test/SNMP/Info/Layer7.pm
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
xt/lib/Test/SNMP/Info/MAU.pm
xt/lib/Test/SNMP/Info/NortelStack.pm
xt/lib/Test/SNMP/Info/PowerEthernet.pm
xt/lib/Test/SNMP/Info/RapidCity.pm
xt/lib/Test/SNMP/Info/SONMP.pm

282
META.json
View File

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

271
META.yml
View File

@@ -3,6 +3,7 @@ abstract: 'OO Interface to Network devices and MIBs through SNMP'
author:
- 'Eric A. Miller <emiller@cpan.org>'
build_requires:
Class::Inspector: '0'
File::Find: '0'
File::Slurper: '0'
Path::Class: '0'
@@ -23,361 +24,388 @@ name: SNMP-Info
provides:
SNMP::Info:
file: lib/SNMP/Info.pm
version: '3.53'
version: '3.63'
SNMP::Info::AMAP:
file: lib/SNMP/Info/AMAP.pm
version: '3.53'
version: '3.63'
SNMP::Info::AdslLine:
file: lib/SNMP/Info/AdslLine.pm
version: '3.53'
version: '3.63'
SNMP::Info::Aggregate:
file: lib/SNMP/Info/Aggregate.pm
version: '3.53'
version: '3.63'
SNMP::Info::Airespace:
file: lib/SNMP/Info/Airespace.pm
version: '3.53'
version: '3.63'
SNMP::Info::Bridge:
file: lib/SNMP/Info/Bridge.pm
version: '3.53'
version: '3.63'
SNMP::Info::CDP:
file: lib/SNMP/Info/CDP.pm
version: '3.53'
version: '3.63'
SNMP::Info::CiscoAgg:
file: lib/SNMP/Info/CiscoAgg.pm
version: '3.53'
version: '3.63'
SNMP::Info::CiscoConfig:
file: lib/SNMP/Info/CiscoConfig.pm
version: '3.53'
version: '3.63'
SNMP::Info::CiscoPortSecurity:
file: lib/SNMP/Info/CiscoPortSecurity.pm
version: '3.53'
version: '3.63'
SNMP::Info::CiscoPower:
file: lib/SNMP/Info/CiscoPower.pm
version: '3.53'
version: '3.63'
SNMP::Info::CiscoQOS:
file: lib/SNMP/Info/CiscoQOS.pm
version: '3.53'
version: '3.63'
SNMP::Info::CiscoRTT:
file: lib/SNMP/Info/CiscoRTT.pm
version: '3.53'
version: '3.63'
SNMP::Info::CiscoStack:
file: lib/SNMP/Info/CiscoStack.pm
version: '3.53'
version: '3.63'
SNMP::Info::CiscoStats:
file: lib/SNMP/Info/CiscoStats.pm
version: '3.53'
version: '3.63'
SNMP::Info::CiscoStpExtensions:
file: lib/SNMP/Info/CiscoStpExtensions.pm
version: '3.53'
version: '3.63'
SNMP::Info::CiscoVTP:
file: lib/SNMP/Info/CiscoVTP.pm
version: '3.53'
version: '3.63'
SNMP::Info::EDP:
file: lib/SNMP/Info/EDP.pm
version: '3.53'
version: '3.63'
SNMP::Info::Entity:
file: lib/SNMP/Info/Entity.pm
version: '3.53'
version: '3.63'
SNMP::Info::EtherLike:
file: lib/SNMP/Info/EtherLike.pm
version: '3.53'
version: '3.63'
SNMP::Info::FDP:
file: lib/SNMP/Info/FDP.pm
version: '3.53'
version: '3.63'
SNMP::Info::IEEE802dot11:
file: lib/SNMP/Info/IEEE802dot11.pm
version: '3.53'
version: '3.63'
SNMP::Info::IEEE802dot3ad:
file: lib/SNMP/Info/IEEE802dot3ad.pm
version: '3.53'
version: '3.63'
SNMP::Info::IPv6:
file: lib/SNMP/Info/IPv6.pm
version: '3.53'
version: '3.63'
SNMP::Info::LLDP:
file: lib/SNMP/Info/LLDP.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer1:
file: lib/SNMP/Info/Layer1.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer1::Allied:
file: lib/SNMP/Info/Layer1/Allied.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer1::Asante:
file: lib/SNMP/Info/Layer1/Asante.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer1::Bayhub:
file: lib/SNMP/Info/Layer1/Bayhub.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer1::Cyclades:
file: lib/SNMP/Info/Layer1/Cyclades.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer1::S3000:
file: lib/SNMP/Info/Layer1/S3000.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2:
file: lib/SNMP/Info/Layer2.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2::3Com:
file: lib/SNMP/Info/Layer2/3Com.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2::Adtran:
file: lib/SNMP/Info/Layer2/Adtran.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2::Aerohive:
file: lib/SNMP/Info/Layer2/Aerohive.pm
version: '3.63'
SNMP::Info::Layer2::Airespace:
file: lib/SNMP/Info/Layer2/Airespace.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2::Aironet:
file: lib/SNMP/Info/Layer2/Aironet.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2::Allied:
file: lib/SNMP/Info/Layer2/Allied.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2::Atmedia:
file: lib/SNMP/Info/Layer2/Atmedia.pm
version: '3.63'
SNMP::Info::Layer2::Baystack:
file: lib/SNMP/Info/Layer2/Baystack.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2::C1900:
file: lib/SNMP/Info/Layer2/C1900.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2::C2900:
file: lib/SNMP/Info/Layer2/C2900.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2::Catalyst:
file: lib/SNMP/Info/Layer2/Catalyst.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2::Centillion:
file: lib/SNMP/Info/Layer2/Centillion.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2::Cisco:
file: lib/SNMP/Info/Layer2/Cisco.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2::CiscoSB:
file: lib/SNMP/Info/Layer2/CiscoSB.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2::HP:
file: lib/SNMP/Info/Layer2/HP.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2::HP4000:
file: lib/SNMP/Info/Layer2/HP4000.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2::HPVC:
file: lib/SNMP/Info/Layer2/HPVC.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2::Kentrox:
file: lib/SNMP/Info/Layer2/Kentrox.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2::N2270:
file: lib/SNMP/Info/Layer2/N2270.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2::NAP222x:
file: lib/SNMP/Info/Layer2/NAP222x.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2::NWSS2300:
file: lib/SNMP/Info/Layer2/NWSS2300.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2::Netgear:
file: lib/SNMP/Info/Layer2/Netgear.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2::Nexans:
file: lib/SNMP/Info/Layer2/Nexans.pm
version: '3.63'
SNMP::Info::Layer2::Orinoco:
file: lib/SNMP/Info/Layer2/Orinoco.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2::Sixnet:
file: lib/SNMP/Info/Layer2/Sixnet.pm
version: '3.63'
SNMP::Info::Layer2::Trapeze:
file: lib/SNMP/Info/Layer2/Trapeze.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2::Ubiquiti:
file: lib/SNMP/Info/Layer2/Ubiquiti.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer2::ZyXEL_DSLAM:
file: lib/SNMP/Info/Layer2/ZyXEL_DSLAM.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3:
file: lib/SNMP/Info/Layer3.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Aironet:
file: lib/SNMP/Info/Layer3/Aironet.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::AlcatelLucent:
file: lib/SNMP/Info/Layer3/AlcatelLucent.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::AlteonAD:
file: lib/SNMP/Info/Layer3/AlteonAD.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Altiga:
file: lib/SNMP/Info/Layer3/Altiga.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Arista:
file: lib/SNMP/Info/Layer3/Arista.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Aruba:
file: lib/SNMP/Info/Layer3/Aruba.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::BayRS:
file: lib/SNMP/Info/Layer3/BayRS.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::BlueCoatSG:
file: lib/SNMP/Info/Layer3/BlueCoatSG.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::C3550:
file: lib/SNMP/Info/Layer3/C3550.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::C4000:
file: lib/SNMP/Info/Layer3/C4000.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::C6500:
file: lib/SNMP/Info/Layer3/C6500.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::CheckPoint:
file: lib/SNMP/Info/Layer3/CheckPoint.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Cisco:
file: lib/SNMP/Info/Layer3/Cisco.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::CiscoASA:
file: lib/SNMP/Info/Layer3/CiscoASA.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::CiscoFWSM:
file: lib/SNMP/Info/Layer3/CiscoFWSM.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::CiscoSwitch:
file: lib/SNMP/Info/Layer3/CiscoSwitch.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Contivity:
file: lib/SNMP/Info/Layer3/Contivity.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Cumulus:
file: lib/SNMP/Info/Layer3/Cumulus.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::DLink:
file: lib/SNMP/Info/Layer3/DLink.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Dell:
file: lib/SNMP/Info/Layer3/Dell.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::ERX:
file: lib/SNMP/Info/Layer3/ERX.pm
version: '3.63'
SNMP::Info::Layer3::Enterasys:
file: lib/SNMP/Info/Layer3/Enterasys.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Extreme:
file: lib/SNMP/Info/Layer3/Extreme.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::F5:
file: lib/SNMP/Info/Layer3/F5.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Force10:
file: lib/SNMP/Info/Layer3/Force10.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Fortinet:
file: lib/SNMP/Info/Layer3/Fortinet.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Foundry:
file: lib/SNMP/Info/Layer3/Foundry.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Genua:
file: lib/SNMP/Info/Layer3/Genua.pm
version: '3.63'
SNMP::Info::Layer3::H3C:
file: lib/SNMP/Info/Layer3/H3C.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::HP9300:
file: lib/SNMP/Info/Layer3/HP9300.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Huawei:
file: lib/SNMP/Info/Layer3/Huawei.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::IBMGbTor:
file: lib/SNMP/Info/Layer3/IBMGbTor.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Juniper:
file: lib/SNMP/Info/Layer3/Juniper.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Lantronix:
file: lib/SNMP/Info/Layer3/Lantronix.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Microsoft:
file: lib/SNMP/Info/Layer3/Microsoft.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Mikrotik:
file: lib/SNMP/Info/Layer3/Mikrotik.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::N1600:
file: lib/SNMP/Info/Layer3/N1600.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::NetSNMP:
file: lib/SNMP/Info/Layer3/NetSNMP.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Netscreen:
file: lib/SNMP/Info/Layer3/Netscreen.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Nexus:
file: lib/SNMP/Info/Layer3/Nexus.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::OneAccess:
file: lib/SNMP/Info/Layer3/OneAccess.pm
version: '3.63'
SNMP::Info::Layer3::PacketFront:
file: lib/SNMP/Info/Layer3/PacketFront.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::PaloAlto:
file: lib/SNMP/Info/Layer3/PaloAlto.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Passport:
file: lib/SNMP/Info/Layer3/Passport.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Pf:
file: lib/SNMP/Info/Layer3/Pf.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Pica8:
file: lib/SNMP/Info/Layer3/Pica8.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::SonicWALL:
file: lib/SNMP/Info/Layer3/SonicWALL.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Steelhead:
file: lib/SNMP/Info/Layer3/Steelhead.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Sun:
file: lib/SNMP/Info/Layer3/Sun.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Tasman:
file: lib/SNMP/Info/Layer3/Tasman.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::Timetra:
file: lib/SNMP/Info/Layer3/Timetra.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::VMware:
file: lib/SNMP/Info/Layer3/VMware.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer3::VyOS:
file: lib/SNMP/Info/Layer3/VyOS.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer7:
file: lib/SNMP/Info/Layer7.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer7::APC:
file: lib/SNMP/Info/Layer7/APC.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer7::Arbor:
file: lib/SNMP/Info/Layer7/Arbor.pm
version: '3.63'
SNMP::Info::Layer7::CiscoIPS:
file: lib/SNMP/Info/Layer7/CiscoIPS.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer7::Gigamon:
file: lib/SNMP/Info/Layer7/Gigamon.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer7::Liebert:
file: lib/SNMP/Info/Layer7/Liebert.pm
version: '3.63'
SNMP::Info::Layer7::Neoteris:
file: lib/SNMP/Info/Layer7/Neoteris.pm
version: '3.53'
version: '3.63'
SNMP::Info::Layer7::Netscaler:
file: lib/SNMP/Info/Layer7/Netscaler.pm
version: '3.53'
version: '3.63'
SNMP::Info::MAU:
file: lib/SNMP/Info/MAU.pm
version: '3.53'
version: '3.63'
SNMP::Info::MRO:
file: lib/SNMP/Info/MRO.pm
version: '3.53'
version: '3.63'
SNMP::Info::NortelStack:
file: lib/SNMP/Info/NortelStack.pm
version: '3.53'
version: '3.63'
SNMP::Info::PowerEthernet:
file: lib/SNMP/Info/PowerEthernet.pm
version: '3.53'
version: '3.63'
SNMP::Info::RapidCity:
file: lib/SNMP/Info/RapidCity.pm
version: '3.53'
version: '3.63'
SNMP::Info::SONMP:
file: lib/SNMP/Info/SONMP.pm
version: '3.53'
version: '3.63'
recommends:
Class::ISA: '0'
File::Slurp: '0'
@@ -386,13 +414,14 @@ recommends:
PPI: '0'
requires:
Math::BigInt: '0'
NetAddr::IP: '4.068'
SNMP: '0'
resources:
IRC: irc://irc.freenode.org/#netdisco
MailingList: https://lists.sourceforge.net/lists/listinfo/snmp-info-users
bugtracker: https://github.com/netdisco/snmp-info/issues
homepage: http://netdisco.org/
license: http://opensource.org/licenses/BSD-3-Clause
license: http://opensource.org/licenses/bsd-license.php
repository: https://github.com/netdisco/snmp-info
version: '3.53'
version: '3.63'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'

2588
README

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -33,12 +33,12 @@ use strict;
use Exporter;
use SNMP::Info;
@SNMP::Info::LLDP::ISA = qw/SNMP::Info Exporter/;
@SNMP::Info::LLDP::EXPORT_OK = qw//;
@SNMP::Info::AMAP::ISA = qw/SNMP::Info Exporter/;
@SNMP::Info::AMAP::EXPORT_OK = qw//;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
%MIBS = ( 'ADSL-LINE-MIB' => 'adslLineType' );

View File

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

View File

@@ -39,7 +39,7 @@ use SNMP::Info;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
%MIBS = (
'BRIDGE-MIB' => 'dot1dBaseBridgeAddress',
@@ -721,7 +721,7 @@ tagged ports or the VLAN ID.
=item $bridge->qb_fdb_index()
Returns reference to hash: key = VLAN ID, value = FDB ID.
Returns reference to hash: key = FDB ID, value = VLAN ID.
=item $bridge->v_index()

View File

@@ -43,7 +43,7 @@ use SNMP::Info;
use vars
qw/$VERSION $DEBUG %FUNCS %GLOBALS %MIBS %MUNGE $INIT %CDP_CAPABILITIES/;
$VERSION = '3.53';
$VERSION = '3.63';
# Five data structures required by SNMP::Info
%MIBS = ( 'CISCO-CDP-MIB' => 'cdpGlobalRun' );
@@ -54,16 +54,15 @@ $VERSION = '3.53';
'cdp_run' => 'cdpGlobalRun',
'cdp_interval' => 'cdpGlobalMessageInterval',
'cdp_holdtime' => 'cdpGlobalHoldTime',
'cdp_gid' => 'cdpGlobalDeviceId',
'cdp_gid' => 'cdpGlobalDeviceId',
);
%FUNCS = (
'cdp_index' => 'cdpCacheIfIndex',
'cdp_proto' => 'cdpCacheAddressType',
'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',
@@ -80,7 +79,6 @@ $VERSION = '3.53';
'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,
@@ -111,28 +109,21 @@ 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 {
my $cdp = shift;
# See if by some miracle Cisco implemented the cdpCacheIfIndex entry
my $cdp_index = $cdp->cdp_index();
return $cdp_index if defined $cdp_index;
# Nope, didn't think so. Now we fake it.
my $cdp_ip = $cdp->cdp_ip();
unless ( defined $cdp_ip ) {
$cdp->error_throw(
@@ -225,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.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::IEEE802dot3ad::MIBS,

View File

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

View File

@@ -32,13 +32,14 @@ package SNMP::Info::CiscoPortSecurity;
use strict;
use Exporter;
use SNMP::Info;
@SNMP::Info::CiscoPortSecurity::ISA = qw/Exporter/;
@SNMP::Info::CiscoPortSecurity::ISA = qw/SNMP::Info Exporter/;
@SNMP::Info::CiscoPortSecurity::EXPORT_OK = qw//;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE %PAECAPABILITIES/;
$VERSION = '3.53';
$VERSION = '3.63';
%MIBS = (
'CISCO-PORT-SECURITY-MIB' => 'ciscoPortSecurityMIB',
@@ -82,20 +83,16 @@ $VERSION = '3.53';
# CISCO-PORT-SECURITY-MIB::cpsIfVlanTable
'cps_i_v_mac_count' => 'cpsIfVlanCurSecureMacAddrCount',
'cps_i_v_mac_max' => 'cpsIfVlanMaxSecureMacAddr',
'cps_i_v' => 'cpsIfVlanIndex',
# CISCO-PORT-SECURITY-MIB::cpsIfVlanSecureMacAddrTable
'cps_i_v_mac_status' => 'cpsIfVlanSecureMacAddrRowStatus',
'cps_i_v_mac_age' => 'cpsIfVlanSecureMacAddrRemainAge',
'cps_i_v_mac_type' => 'cpsIfVlanSecureMacAddrType',
'cps_i_v_vlan' => 'cpsIfVlanSecureVlanIndex',
'cps_i_v_mac' => 'cpsIfVlanSecureMacAddress',
# CISCO-PORT-SECURITY-MIB::cpsSecureMacAddressTable
'cps_m_status' => 'cpsSecureMacAddrRowStatus',
'cps_m_age' => 'cpsSecureMacAddrRemainingAge',
'cps_m_type' => 'cpsSecureMacAddrType',
'cps_m_mac' => 'cpsSecureMacAddress',
# IEEE8021-PAE-MIB::dot1xPaePortEntry
'pae_i_capabilities' => 'dot1xPaePortCapabilities',
@@ -107,8 +104,6 @@ $VERSION = '3.53';
%MUNGE = (
'cps_i_mac' => \&SNMP::Info::munge_mac,
'cps_m_mac' => \&SNMP::Info::munge_mac,
'cps_i_v_mac' => \&SNMP::Info::munge_mac,
'pae_i_last_eapol_frame_source' => \&SNMP::Info::munge_mac,
'pae_i_capabilities' => \&munge_pae_capabilities,
);
@@ -323,10 +318,6 @@ These are methods that return scalar values from SNMP
(C<cpsIfVlanMaxSecureMacAddr>)
=item $cps->cps_i_v()
(C<cpsIfVlanIndex>)
=back
=head2 C<CISCO-PORT-SECURITY-MIB::cpsIfVlanSecureMacAddrTable>
@@ -345,14 +336,6 @@ These are methods that return scalar values from SNMP
(C<cpsIfVlanSecureMacAddrType>)
=item $cps->cps_i_v_vlan()
(C<cpsIfVlanSecureVlanIndex>)
=item $cps->cps_i_v_mac()
(C<cpsIfVlanSecureMacAddress>)
=back
=head2 C<CISCO-PORT-SECURITY-MIB::cpsSecureMacAddressTable>
@@ -371,10 +354,6 @@ These are methods that return scalar values from SNMP
(C<cpsSecureMacAddrType>)
=item $cps->cps_m_mac()
(C<cpsSecureMacAddress>)
=back
=head2 C<IEEE8021-PAE-MIB::dot1xPaePortEntry>

View File

@@ -39,7 +39,7 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
%MIBS = ( 'CISCO-RTTMON-MIB' => 'rttMonCtrlAdminOwner', );

View File

@@ -38,7 +38,7 @@ use Exporter;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE %PORTSTAT/;
$VERSION = '3.53';
$VERSION = '3.63';
%MIBS = ( 'CISCO-STACK-MIB' => 'ciscoStackMIB', );
@@ -194,7 +194,7 @@ sub i_duplex_admin {
next if ( defined $partial and $iid !~ /^$partial$/ );
# Test for gigabit
if ( defined $p_duplex_cap->{$port} and $p_duplex_cap->{$port} == 1 ) {
if ( defined $p_duplex_cap->{$port} and $p_duplex_cap->{$port} == 0 ) {
$i_duplex_admin->{$iid} = 'full';
}

View File

@@ -42,14 +42,14 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%MIBS = (
'SNMPv2-MIB' => 'sysDescr',
'CISCO-PROCESS-MIB' => 'cpmCPUTotal5sec',
'CISCO-MEMORY-POOL-MIB' => 'ciscoMemoryPoolUsed',
'OLD-CISCO-SYSTEM-MIB' => 'writeMem',
'CISCO-PRODUCTS-MIB' => 'sysName',
'CISCO-PRODUCTS-MIB' => 'ciscoIGS',
'ENTITY-MIB' => 'entPhysicalSoftwareRev',
'CISCO-IMAGE-MIB' => 'ciscoImageString',

View File

@@ -36,7 +36,7 @@ use SNMP::Info::Bridge;
use vars qw/$VERSION $DEBUG %MIBS %FUNCS %GLOBALS %MUNGE %PORTSTAT $INIT/;
$VERSION = '3.53';
$VERSION = '3.63';
@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.53';
$VERSION = '3.63';
%MIBS = (
'CISCO-VTP-MIB' => 'vtpVlanName',
@@ -61,7 +61,6 @@ $VERSION = '3.53';
%FUNCS = (
# CISCO-VTP-MIB::managementDomainTable
'vtp_d_index' => 'managementDomainIndex',
'vtp_d_name' => 'managementDomainName',
'vtp_d_mode' => 'managementDomainLocalMode',
'vtp_d_rev' => 'managementDomainConfigRevNumber',
@@ -780,10 +779,6 @@ Each bit represents a VLAN. This is 3072 through 4095
=over
=item $vtp->vtp_d_index()
(C<managementDomainIndex>)
=item $vtp->vtp_d_name()
(C<managementDomainName>)

View File

@@ -34,12 +34,12 @@ use strict;
use Exporter;
use SNMP::Info;
@SNMP::Info::LLDP::ISA = qw/SNMP::Info Exporter/;
@SNMP::Info::LLDP::EXPORT_OK = qw//;
@SNMP::Info::EDP::ISA = qw/SNMP::Info Exporter/;
@SNMP::Info::EDP::EXPORT_OK = qw//;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%MIBS = (
'EXTREME-EDP-MIB' => 'extremeEdpPortIfIndex',

View File

@@ -41,7 +41,7 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%MIBS = ( 'ENTITY-MIB' => 'entPhysicalSerialNum' );
@@ -109,6 +109,57 @@ sub e_port {
return \%e_port;
}
sub entity_derived_serial {
my $entity = shift;
my $e_parent = $entity->e_parent() || {};
my $e_class = $entity->e_class() || {};
# Sort keys to return a consistent result between runs
foreach my $iid ( sort keys %$e_parent ) {
my $parent = $e_parent->{$iid};
my $class = $e_class->{$iid} || '';
# Only consider serial numbers for entries without a parent, or
# if they are of type "chassis"
if ( $parent eq '0' or $class eq 'chassis') {
my $serial = $entity->e_serial($iid);
if ( $serial && $serial->{$iid} ) {
return $serial->{$iid};
}
else {
my $descr = $entity->e_descr($iid);
if ( $descr and $descr->{$iid} =~ /serial#?:\s*([a-z0-9]+)/i )
{
return $1;
}
}
}
}
return;
}
sub entity_derived_os_ver {
my $entity = shift;
my $e_parent = $entity->e_parent() || {};
my $e_class = $entity->e_class() || {};
# Sort keys to return a consistent result between runs
foreach my $iid ( sort keys %$e_parent ) {
my $parent = $e_parent->{$iid};
my $class = $e_class->{$iid} || '';
# Only consider serial numbers for entries without a parent, or
# if they are of type "chassis"
if ( $parent eq '0' or $class eq 'chassis') {
my $os_ver = $entity->e_swver($iid);
if ( $os_ver && $os_ver->{$iid} ) {
return $os_ver->{$iid};
}
}
}
return;
}
1;
__END__
@@ -173,6 +224,23 @@ none.
These are methods that return tables of information in the form of a reference
to a hash.
=over
=item $entity->entity_derived_serial()
Tries to determine the device serial number from the F<ENTITY-MIB>. Only
considers serial numbers for entries without a parent, or if they are of type
chassis. Looks at C<entPhysicalSerialNum> and then C<entPhysicalDescr> for
serial number.
=item $entity->entity_derived_os_ver()
Tries to determine the device OS version from the F<ENTITY-MIB>. Only
considers serial numbers for entries without a parent, or if they are of type
chassis. Looks at C<entPhysicalSoftwareRev> for the version.
=back
=head2 Entity Table
=over

View File

@@ -41,7 +41,7 @@ use SNMP::Info;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%MIBS = ( 'EtherLike-MIB' => 'etherMIB' );
@@ -68,7 +68,6 @@ $VERSION = '3.53';
'el_xmit_defer' => 'dot3StatsDeferredTransmissions',
# Ethernet-like Collision Statistics Group
'el_coll_count' => 'dot3CollCount',
'el_coll_freq' => 'dot3CollFrequencies'
);

View File

@@ -42,7 +42,7 @@ use SNMP::Info;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%MIBS = ( 'FOUNDRY-SN-SWITCH-GROUP-MIB' => 'snFdpGlobalRun' );
@@ -50,11 +50,9 @@ $VERSION = '3.53';
'fdp_run' => 'snFdpGlobalRun',
'fdp_interval' => 'snFdpGlobalMessageInterval',
'fdp_holdtime' => 'snFdpGlobalHoldTime',
'fdp_gid' => 'snFdpGlobalDeviceId',
);
%FUNCS = (
'fdp_index' => 'snFdpCacheIfIndex',
'fdp_proto' => 'snFdpCacheAddressType',
'fdp_ip' => 'snFdpCacheAddress',
'fdp_ver' => 'snFdpCacheVersion',
@@ -62,9 +60,7 @@ $VERSION = '3.53';
'fdp_port' => 'snFdpCacheDevicePort',
'fdp_platform' => 'snFdpCachePlatform',
'fdp_capabilities' => 'snFdpCacheCapabilities',
'fdp_domain' => 'snFdpCacheVTPMgmtDomain',
'fdp_vlan' => 'snFdpCacheNativeVLAN',
'fdp_duplex' => 'snFdpCacheDuplex',
'fdp_cache_type' => 'snFdpCacheVendorId',
);
%MUNGE = (
@@ -84,9 +80,7 @@ sub fdp_run {
sub hasFDP {
my $fdp = shift;
my $ver = $fdp->{_version};
#my $ver = $fdp->fdp_ver;
my $ver = $fdp->snmp_ver();
# SNMP v1 clients dont have the globals
if ( defined $ver and $ver == 1 ) {
@@ -103,11 +97,6 @@ sub hasFDP {
sub fdp_if {
my $fdp = shift;
# See if by some miracle Cisco implemented the fdpCacheIfIndex entry
my $fdp_index = $fdp->fdp_index();
return $fdp_index if defined $fdp_index;
# Nope, didn't think so. Now we fake it.
my $fdp_ip = $fdp->fdp_ip();
unless ( defined $fdp_ip ) {
$fdp->error_throw(
@@ -231,15 +220,6 @@ Time in seconds that FDP messages are kept.
(C<fdpGlobalHoldTime>)
=item $fdp->fdp_gid()
Returns FDP device ID.
This is the device id broadcast via FDP to other devices, and is what is
retrieved from remote devices with $fdp->id().
(C<fdpGlobalDeviceId>)
=back
=head2 Overrides
@@ -323,19 +303,6 @@ Thanks to Martin Lorensen for a pointer to this information.
(C<fdpCacheCapabilities>)
=item $fdp->fdp_domain()
The CDP version of this returns remote VTP Management Domain as defined
in C<CISCO-VTP-MIB::managementDomainName>
(C<fdpCacheVTPMgmtDomain>)
=item $fdp->fdp_duplex()
Returns the port duplex status from remote devices.
(C<fdpCacheDuplex>)
=item $fdp->fdp_id()
Returns remote device id string
@@ -346,19 +313,11 @@ Returns remote device id string
Returns the mapping to the SNMP Interface Table.
Note that a lot devices don't implement $fdp->fdp_index(), So if it isn't
around, we fake it.
In order to map the fdp table entry back to the interfaces() entry, we
truncate the last number off of it :
# it exists, yay.
my $fdp_index = $device->fdp_index();
return $fdp_index if defined $fdp_index;
# if not, let's fake it
my $fdp_ip = $device->fdp_ip();
my %fdp_if
foreach my $key (keys %$fdp_ip){
$iid = $key;
@@ -366,21 +325,9 @@ truncate the last number off of it :
$iid =~ s/\.\d+$//;
$fdp_if{$key} = $iid;
}
return \%fdp_if;
=item $fdp->fdp_index()
Returns the mapping to the SNMP2 Interface table for FDP Cache Entries.
Most devices don't implement this, so you probably want to use $fdp->fdp_if()
instead.
See fdp_if() entry.
(C<fdpCacheIfIndex>)
=item $fdp->fdp_ip()
Returns remote IP address
@@ -411,11 +358,11 @@ Returns remote hardware version
(C<fdpCacheVersion>)
=item $fdp->fdp_vlan()
=item $fdp->fdp_cache_type()
Returns the remote interface native VLAN.
Returns type of entry received, either FDP or CDP.
(C<fdpCacheNativeVLAN>)
(C<snFdpCacheVendorId>)
=back

View File

@@ -32,13 +32,14 @@ package SNMP::Info::IEEE802dot11;
use strict;
use Exporter;
use SNMP::Info;
@SNMP::Info::IEEE802dot11::ISA = qw/Exporter/;
@SNMP::Info::IEEE802dot11::ISA = qw/SNMP::Info Exporter/;
@SNMP::Info::IEEE802dot11::EXPORT_OK = qw//;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%MIBS = ( 'IEEE802dot11-MIB' => 'dot11DesiredSSID', );

View File

@@ -43,7 +43,7 @@ use SNMP::Info::Aggregate;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
@@ -67,7 +67,7 @@ $VERSION = '3.53';
'ip_n2p_phys_state' => 'ipNetToPhysicalState', # IP-MIB
'c_inet_phys_state' => 'cInetNetToMediaState', # CISCO-IETF-IP-MIB
'i6_n2p_phys_state' => 'ipv6NetToMediaState', # IPV6-MIB
'i6_n2p_phys_state' => 'ipv6IfNetToMediaState', # IPV6-MIB
'ip_pfx_origin' => 'ipAddressPrefixOrigin', # IP-MIB
'c_pfx_origin' => 'cIpAddressPfxOrigin', # CISCO-IETF-IP-MIB
@@ -75,8 +75,9 @@ $VERSION = '3.53';
'ip_addr6_pfx' => 'ipAddressPrefix', # IP-MIB
'c_addr6_pfx' => 'cIpAddressPrefix', # CISCO-IETF-IP-MIB
'ip_addr6_pfxlen' => 'ipAddressPrefixLength', # IP-MIB
'c_addr6_pfxlen' => 'cIpAddressPfxLength', # CISCO-IETF-IP-MIB
# Commented out are not-accessible according to MIB
#'ip_addr6_pfxlen' => 'ipAddressPrefixLength', # IP-MIB
#'c_addr6_pfxlen' => 'cIpAddressPfxLength', # CISCO-IETF-IP-MIB
'i6_addr_pfxlen' => 'ipv6AddrPfxLength', # IPV6-MIB
'ip_addr6_index' => 'ipAddressIfIndex', # IP-MIB

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.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
# Set for No CDP
%GLOBALS = ( %SNMP::Info::Layer1::GLOBALS, 'root_ip' => 'actualIPAddr', );
@@ -71,6 +71,7 @@ sub os_ver {
if ( $descr =~ m/version (\d+\.\d+)/ ) {
return $1;
}
return;
}
sub model {

View File

@@ -41,7 +41,7 @@ use SNMP::Info::Layer1;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
# Set for No CDP
%GLOBALS = ( %SNMP::Info::Layer1::GLOBALS, );
@@ -84,6 +84,7 @@ sub os_ver {
if ( $descr =~ /software v(\d+\.\d+)/ ) {
return $1;
}
return;
}
sub vendor {
@@ -94,7 +95,7 @@ sub model {
my $asante = shift;
my $id = $asante->id();
my $model = &SNMP::translateObj($id);
my $model = SNMP::translateObj($id);
return $model;
}
@@ -108,8 +109,8 @@ sub i_up {
my $i_up = {};
foreach my $port ( keys %$asante_up ) {
my $up = $asante_up->{$port};
$i_up->{$port} = 'down' if $up =~ /on/;
$i_up->{$port} = 'up' if $up =~ /off/;
$i_up->{$port} = 'down' if $up =~ /off/;
$i_up->{$port} = 'up' if $up =~ /on/;
}
return $i_up;
@@ -149,7 +150,7 @@ sub i_name {
my $asante = shift;
my $partial = shift;
my $i_name = $asante->orig_i_descr($partial) || {};
my $i_name = $asante->orig_i_description($partial) || {};
my %i_name;

View File

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

View File

@@ -1,7 +1,7 @@
# SNMP::Info::Layer1::Cyclades
# $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,38 +39,105 @@ use SNMP::Info::Layer1;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD/;
$VERSION = '3.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::Layer1::MIBS,
'CYCLADES-ACS-SYS-MIB' => 'cyACSversion',
'CYCLADES-ACS-CONF-MIB' => 'cyEthIPaddr',
'CYCLADES-ACS-INFO-MIB' => 'cyISPortTty',
'CYCLADES-ACS-SYS-MIB' => 'cyACSversion',
'CYCLADES-ACS5K-SYS-MIB' => 'cyACS5Kversion',
'CYCLADES-ACS-CONF-MIB' => 'cyACSConf',
'CYCLADES-ACS5K-CONF-MIB' => 'cyACS5KConf',
'CYCLADES-ACS-INFO-MIB' => 'cyACSInfo',
'CYCLADES-ACS5K-INFO-MIB' => 'cyACS5KInfo',
'ACS-MIB' => 'acs6016',
'ACS8000-MIB' => 'acs8048',
);
%GLOBALS = (
# CYCLADES-ACS-SYS-MIB
%SNMP::Info::Layer1::GLOBALS,
'os_ver' => 'cyACSversion',
'cy_model' => 'cyACSpname',
'serial' => 'cyACSDevId',
'root_ip' => 'cyEthIPaddr',
'ps1_status' => 'cyACSPw1',
'ps2_status' => 'cyACSPw2',
# CYCLADES-ACS-SYS-MIB
'cy_os_ver' => 'cyACSversion',
'cy_model' => 'cyACSpname',
'cy_serial' => 'cyACSDevId',
'cy_ps1_status' => 'cyACSPw1',
'cy_ps2_status' => 'cyACSPw2',
# CYCLADES-ACS-CONF-MIB
'cy_root_ip' => 'CYCLADES_ACS_CONF_MIB__cyEthIPaddr',
# CYCLADES-ACS5K-SYS-MIB
'cy5k_os_ver' => 'cyACS5Kversion',
'cy5k_model' => 'cyACS5Kpname',
'cy5k_serial' => 'cyACS5KDevId',
'cy5k_ps1_status' => 'cyACS5KPw1',
'cy5k_ps2_status' => 'cyACS5KPw2',
# CYCLADES-ACS5K-CONF-MIB
'cy5k_root_ip' => 'CYCLADES_ACS5K_CONF_MIB__cyEthIPaddr',
# ACS-MIB
'acs_os_ver' => 'ACS_MIB__acsFirmwareVersion',
'acs_model' => 'ACS_MIB__acsProductModel',
'acs_serial' => 'ACS_MIB__acsSerialNumber',
'acs_ps1_status' => 'ACS_MIB__acsPowerSupplyStatePw1',
'acs_ps2_status' => 'ACS_MIB__acsPowerSupplyStatePw2',
# ACS8000-MIB
'acs8k_os_ver' => 'ACS8000_MIB__acsFirmwareVersion',
'acs8k_model' => 'ACS8000_MIB__acsProductModel',
'acs8k_serial' => 'ACS8000_MIB__acsSerialNumber',
'acs8k_ps1_status' => 'ACS8000_MIB__acsPowerSupplyStatePw1',
'acs8k_ps2_status' => 'ACS8000_MIB__acsPowerSupplyStatePw2',
);
%FUNCS = (
%SNMP::Info::Layer1::FUNCS,
# CYCLADES-ACS-INFO-MIB::cyInfoSerialTable
'cy_port_tty' => 'cyISPortTty',
'cy_port_name' => 'cyISPortName',
'cy_port_speed' => 'cyISPortSpeed',
'cy_port_cd' => 'cyISPortSigCD',
'cy_port_tty' => 'CYCLADES_ACS_INFO_MIB__cyISPortTty',
'cy_port_name' => 'CYCLADES_ACS_INFO_MIB__cyISPortName',
'cy_port_speed' => 'CYCLADES_ACS_INFO_MIB__cyISPortSpeed',
'cy_port_cd' => 'CYCLADES_ACS_INFO_MIB__cyISPortSigCD',
# CYCLADES-ACS-CONF-MIB::cySerialPortTable
'cy_port_socket' => 'cySPortSocketPort',
'cy_port_socket' => 'CYCLADES_ACS_CONF_MIB__cySPortSocketPort',
# CYCLADES-ACS5K-INFO-MIB::cyInfoSerialTable
'cy5k_port_tty' => 'CYCLADES_ACS5K_INFO_MIB__cyISPortTty',
'cy5k_port_name' => 'CYCLADES_ACS5K_INFO_MIB__cyISPortName',
'cy5k_port_speed' => 'CYCLADES_ACS5K_INFO_MIB__cyISPortSpeed',
'cy5k_port_cd' => 'CYCLADES_ACS5K_INFO_MIB__cyISPortSigCD',
# CYCLADES-ACS5K-CONF-MIB::cySerialPortTable
'cy5k_port_socket' => 'CYCLADES_ACS5K_CONF_MIB__cySPortSocketPort',
# ACS-MIB::acsSerialPortTable
'acs_port_tty' => 'ACS_MIB__acsSerialPortTableDeviceName',
'acs_port_name' => 'ACS_MIB__acsSerialPortTableName',
'acs_port_speed' => 'ACS_MIB__acsSerialPortTableComSpeed',
'acs_port_cd' => 'ACS_MIB__acsSerialPortTableSignalStateDCD',
# Equivalent to cySPortSocketPort doesn't exist in ACS-MIB
# Use 'acsSerialPortTableDeviceName' as an equivalent, it just needs
# to be unique so that we can differentiate between the index in the
# acsSerialPortTable from ifIndex which are both integers
# ACS-MIB::acsSerialPortTableEntry
'acs_port_socket' => 'ACS_MIB__acsSerialPortTableDeviceName',
# ACS8000-MIB::acsSerialPortTable
'acs8k_port_tty' => 'ACS8000_MIB__acsSerialPortTableDeviceName',
'acs8k_port_name' => 'ACS8000_MIB__acsSerialPortTableName',
'acs8k_port_speed' => 'ACS8000_MIB__acsSerialPortTableComSpeed',
'acs8k_port_cd' => 'ACS8000_MIB__acsSerialPortTableSignalStateDCD',
# Equivalent to cySPortSocketPort doesn't exist in ACS-MIB
# Use 'acsSerialPortTableDeviceName' as an equivalent, it just needs
# to be unique so that we can differentiate between the index in the
# acsSerialPortTable from ifIndex which are both integers
# ACS8000-MIB::acsSerialPortTableEntry
'acs8k_port_socket' => 'ACS8000_MIB__acsSerialPortTableDeviceName',
);
%MUNGE = ( %SNMP::Info::Layer1::MUNGE, );
@@ -82,21 +149,85 @@ sub layers {
}
sub os {
return 'cyclades';
return 'avocent';
}
# Use "short circuit" to return the first MIB instance that returns data to
# reduce network communications
# We'll try newest (acs*) first assuming those are most likely deployed
sub os_ver {
my $cyclades = shift;
return
$cyclades->acs_os_ver()
|| $cyclades->acs8k_os_ver()
|| $cyclades->cy5k_os_ver()
|| $cyclades->cy_os_ver()
|| undef;
}
sub vendor {
return 'cyclades';
return 'vertiv';
}
sub model {
my $cyclades = shift;
my $model = $cyclades->cy_model();
my $model
= $cyclades->acs_model()
|| $cyclades->acs8k_model()
|| $cyclades->cy5k_model()
|| $cyclades->cy_model()
|| undef;
return unless defined $model;
return lc($model) if ( defined $model );
return lc($model);
my $id = $cyclades->id();
my $prod = SNMP::translateObj($id);
return $prod || $id;
}
sub serial {
my $cyclades = shift;
return
$cyclades->acs_serial()
|| $cyclades->acs8k_serial()
|| $cyclades->cy5k_serial()
|| $cyclades->cy_serial()
|| undef;
}
sub root_ip {
my $cyclades = shift;
return
$cyclades->cy5k_root_ip()
|| $cyclades->cy_root_ip()
|| undef;
}
sub ps1_status {
my $cyclades = shift;
return
$cyclades->acs_ps1_status()
|| $cyclades->acs8k_ps1_status()
|| $cyclades->cy5k_ps1_status()
|| $cyclades->cy_ps1_status()
|| undef;
}
sub ps2_status {
my $cyclades = shift;
return
$cyclades->acs_ps2_status()
|| $cyclades->acs8k_ps2_status()
|| $cyclades->cy5k_ps2_status()
|| $cyclades->cy_ps2_status()
|| undef;
}
# Extend interface methods to include serial ports
@@ -109,7 +240,12 @@ sub i_index {
my $partial = shift;
my $orig_index = $cyclades->orig_i_index($partial) || {};
my $cy_index = $cyclades->cy_port_socket() || {};
my $cy_index
= $cyclades->acs_port_socket()
|| $cyclades->acs8k_port_socket()
|| $cyclades->cy5k_port_socket()
|| $cyclades->cy_port_socket()
|| {};
my %i_index;
foreach my $iid ( keys %$orig_index ) {
@@ -136,9 +272,19 @@ sub interfaces {
my $cyclades = shift;
my $partial = shift;
my $i_descr = $cyclades->orig_i_description($partial) || {};
my $cy_index = $cyclades->cy_port_socket() || {};
my $cy_p_tty = $cyclades->cy_port_tty() || {};
my $i_descr = $cyclades->orig_i_description($partial) || {};
my $cy_index
= $cyclades->acs_port_socket()
|| $cyclades->acs8k_port_socket()
|| $cyclades->cy5k_port_socket()
|| $cyclades->cy_port_socket()
|| {};
my $cy_p_tty
= $cyclades->acs_port_tty()
|| $cyclades->acs8k_port_tty()
|| $cyclades->cy5k_port_tty()
|| $cyclades->cy_port_tty()
|| {};
my %if;
foreach my $iid ( keys %$i_descr ) {
@@ -166,8 +312,18 @@ sub i_speed {
my $partial = shift;
my $i_speed = $cyclades->orig_i_speed($partial) || {};
my $cy_index = $cyclades->cy_port_socket() || {};
my $cy_p_speed = $cyclades->cy_port_speed() || {};
my $cy_index
= $cyclades->acs_port_socket()
|| $cyclades->acs8k_port_socket()
|| $cyclades->cy5k_port_socket()
|| $cyclades->cy_port_socket()
|| {};
my $cy_p_speed
= $cyclades->acs_port_speed()
|| $cyclades->acs8k_port_speed()
|| $cyclades->cy5k_port_speed()
|| $cyclades->cy_port_speed()
|| {};
my %i_speed;
foreach my $iid ( keys %$i_speed ) {
@@ -195,8 +351,18 @@ sub i_up {
my $partial = shift;
my $i_up = $cyclades->orig_i_up($partial) || {};
my $cy_index = $cyclades->cy_port_socket() || {};
my $cy_p_up = $cyclades->cy_port_cd() || {};
my $cy_index
= $cyclades->acs_port_socket()
|| $cyclades->acs8k_port_socket()
|| $cyclades->cy5k_port_socket()
|| $cyclades->cy_port_socket()
|| {};
my $cy_p_up
= $cyclades->acs_port_cd()
|| $cyclades->acs8k_port_cd()
|| $cyclades->cy5k_port_cd()
|| $cyclades->cy_port_cd()
|| {};
my %i_up;
foreach my $iid ( keys %$i_up ) {
@@ -224,8 +390,18 @@ sub i_description {
my $partial = shift;
my $i_desc = $cyclades->orig_i_description($partial) || {};
my $cy_index = $cyclades->cy_port_socket() || {};
my $cy_p_desc = $cyclades->cy_port_name() || {};
my $cy_index
= $cyclades->acs_port_socket()
|| $cyclades->acs8k_port_socket()
|| $cyclades->cy5k_port_socket()
|| $cyclades->cy_port_socket()
|| {};
my $cy_p_desc
= $cyclades->acs_port_name()
|| $cyclades->acs8k_port_name()
|| $cyclades->cy5k_port_name()
|| $cyclades->cy_port_name()
|| {};
my %descr;
foreach my $iid ( keys %$i_desc ) {
@@ -253,8 +429,18 @@ sub i_name {
my $partial = shift;
my $i_name = $cyclades->orig_i_name($partial) || {};
my $cy_index = $cyclades->cy_port_socket() || {};
my $cy_p_desc = $cyclades->cy_port_name() || {};
my $cy_index
= $cyclades->acs_port_socket()
|| $cyclades->acs8k_port_socket()
|| $cyclades->cy5k_port_socket()
|| $cyclades->cy_port_socket()
|| {};
my $cy_p_desc
= $cyclades->acs_port_name()
|| $cyclades->acs8k_port_name()
|| $cyclades->cy5k_port_name()
|| $cyclades->cy_port_name()
|| {};
my %i_name;
foreach my $iid ( keys %$i_name ) {
@@ -282,7 +468,8 @@ __END__
=head1 NAME
SNMP::Info::Layer1::Cyclades - SNMP Interface to Cyclades terminal servers
SNMP::Info::Layer1::Cyclades - SNMP Interface to Cyclades/Avocent terminal
servers
=head1 AUTHOR
@@ -309,7 +496,7 @@ Eric Miller
=head1 DESCRIPTION
Provides abstraction to the configuration information obtainable from a
Cyclades device through SNMP.
Cyclades/Avocent device through SNMP.
For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above.
@@ -334,6 +521,14 @@ my $cyclades = new SNMP::Info::Layer1::Cyclades(...);
=item F<CYCLADES-ACS-INFO-MIB>
=item F<CYCLADES-ACS5K-SYS-MIB>
=item F<CYCLADES-ACS5K-CONF-MIB>
=item F<CYCLADES-ACS5K-INFO-MIB>
=item F<ACS6000-MIB>
=back
=head2 Inherited MIBs
@@ -348,11 +543,11 @@ These are methods that return scalar value from SNMP
=item $cyclades->os_ver()
(C<cyACSversion>)
(C<acsFirmwareVersion>), (C<cyACS5Kversion>), or (C<cyACSversion>)
=item $cyclades->serial()
(C<cyACSDevId>)
(C<acsSerialNumber>), (C<cyACS5KDevId>), or (C<cyACSDevId>)
=item $cyclades->root_ip()
@@ -360,11 +555,11 @@ These are methods that return scalar value from SNMP
=item $cyclades->ps1_status()
(C<cyACSPw1>)
(C<acsPowerSupplyStatePw1>), (C<cyACS5KPw1>), or (C<cyACSPw1>)
=item $cyclades->ps2_status()
(C<cyACSPw2>)
(C<acsPowerSupplyStatePw2>), (C<cyACS5KPw2>), or (C<cyACSPw2>)
=back
@@ -379,15 +574,16 @@ to poll for an ARP cache so turn off reported Layer 2 and Layer 3.
=item $cyclades->vendor()
Returns 'cyclades'
Returns 'vertiv'
=item $cyclades->os()
Returns 'cyclades'
Returns 'avocent'
=item $cyclades->model()
Returns lower case (C<cyACSpname>)
Returns lower case (C<cyACSpname>) or (C<acsProductModel>) if it exists
otherwise tries to reference $cyclades->id() to one of the MIBs listed above
=back
@@ -409,31 +605,34 @@ to a hash.
Returns reference to map of IIDs to Interface index.
Extended to include serial ports. Serial ports are indexed with the
alternative labeling system for the serial port, the listening socket port
C<cySPortSocketPort> to avoid conflicts with C<ifIndex>.
alternative labeling system for the serial port, either the listening socket
port C<cySPortSocketPort> or C<acsSerialPortTableDeviceName> name to avoid
conflicts with C<ifIndex>.
=item $cyclades->interfaces()
Returns reference to map of IIDs to physical ports. Extended to include
serial ports, C<cyISPortTty>.
serial ports, C<acsSerialPortTableDeviceName> or C<cyISPortTty>.
=item $cyclades->i_speed()
Returns interface speed. Extended to include serial ports, C<cyISPortSpeed>.
Returns interface speed. Extended to include serial ports,
C<acsSerialPortTableComSpeed> or C<cyISPortSpeed>.
=item $cyclades->i_up()
Returns link status for each port. Extended to include serial ports,
C<cyISPortSigCD>.
C<acsSerialPortTableSignalStateDCD> or C<cyISPortSigCD>.
=item $cyclades->i_description()
Returns description of each port. Extended to include serial ports,
C<cyISPortName>.
C<acsSerialPortTableName> or C<cyISPortName>.
=item $cyclades->i_name()
Returns name of each port. Extended to include serial ports, C<cyISPortName>.
Returns name of each port. Extended to include serial ports,
C<acsSerialPortTableName> or C<cyISPortName>.
=back

View File

@@ -39,7 +39,7 @@ use SNMP::Info::Layer2;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::MIBS, %SNMP::Info::Bridge::MIBS,
@@ -118,24 +118,18 @@ sub vendor {
sub serial {
my $l2 = shift;
my $serial1 = $l2->serial1();
my $e_descr = $l2->e_descr() || {};
my $e_serial = $l2->e_serial() || {};
my $serial2 = $e_serial->{1} || undef;
my $chassis = $e_descr->{1} || undef;
# precedence
# serial2,chassis parse,serial1
return $serial2 if ( defined $serial2 and $serial2 !~ /^\s*$/ );
if ( defined $chassis and $chassis =~ /serial#?:\s*([a-z0-9]+)/i ) {
return $1;
my $entity_serial = $l2->entity_derived_serial();
if ( defined $entity_serial and $entity_serial !~ /^\s*$/ ){
return $entity_serial;
}
return $serial1 if ( defined $serial1 and $serial1 !~ /^\s*$/ );
my $serial1 = $l2->serial1();
if ( defined $serial1 and $serial1 !~ /^\s*$/ ) {
return $serial1;
}
return;
}
sub interfaces {
@@ -262,7 +256,7 @@ Tries to discover the vendor from $l2->model() and $l2->description()
=item $l2->serial()
Returns serial number if available through SNMP
Returns a serial number if found from F<ENTITY-MIB> and F<OLD-CISCO->... MIB.
=back

View File

@@ -11,7 +11,7 @@ use SNMP::Info::CDP;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD/;
$VERSION = '3.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::LLDP::MIBS,
@@ -49,6 +49,7 @@ sub serial {
return $e_serial->{$e};
}
}
return;
}
sub os_ver {
@@ -61,6 +62,7 @@ sub os_ver {
return $e_swver->{$e};
}
}
return;
}
sub vendor {
@@ -76,6 +78,7 @@ sub model {
} else {
return $descr;
}
return;
}
1;

View File

@@ -11,7 +11,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
# This will be filled in with the device's index into the EntPhysicalEntry
# table by the serial() function.
@@ -20,9 +20,9 @@ our $index = undef;
%MIBS = (
%SNMP::Info::Layer2::MIBS,
%SNMP::Info::Layer3::MIBS,
'ADTRAN-GENEVC-MIB' => 'adGenEVCMIB',
'ADTRAN-GENMEF-MIB' => 'adGenMEFMIB',
'ADTRAN-GENPORT-MIB' => 'adGenPort',
# 'ADTRAN-GENEVC-MIB' => 'adGenEVCMIB',
# 'ADTRAN-GENMEF-MIB' => 'adGenMEFMIB',
# 'ADTRAN-GENPORT-MIB' => 'adGenPort',
'ADTRAN-MIB' => 'adtran',
'ADTRAN-AOSUNIT' => 'adGenAOSUnitMib',
);

View File

@@ -0,0 +1,479 @@
# 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.63';
%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 serial {
my $aerohive = shift;
return $aerohive->ahSystemSerial()
|| $aerohive->SUPER::serial();
}
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->serial()
Returns the serial number extracted from C<ahSystemSerial>.
=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>.
=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.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
%GLOBALS = (
%SNMP::Info::IEEE802dot11::GLOBALS,
@@ -60,7 +60,6 @@ $VERSION = '3.53';
%SNMP::Info::CiscoConfig::GLOBALS,
%SNMP::Info::CDP::GLOBALS,
'serial' => 'entPhysicalSerialNum.1',
'descr' => 'sysDescr',
'ps1_type' => 'cpoePdCurrentPowerSource'
);
@@ -136,7 +135,7 @@ sub interfaces {
# Tag on e_descr.1
sub description {
my $aironet = shift;
my $descr = $aironet->descr();
my $descr = $aironet->SUPER::description();
my $e_descr = $aironet->e_descr();
$descr = "$e_descr->{1} $descr" if defined $e_descr->{1};

View File

@@ -40,7 +40,7 @@ use SNMP::Info::Layer1;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%GLOBALS = ( %SNMP::Info::Layer2::GLOBALS );
@@ -73,6 +73,7 @@ sub os_ver {
if ( $descr =~ m/version (\d+\.\d+)/ ) {
return $1;
}
return;
}
sub model {

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.63';
%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.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS,
@@ -200,6 +200,8 @@ sub set_i_duplex_admin {
my $iid = $c1900->c1900_p_ifindex($port);
return 0 unless $iid->{$port};
$duplex = lc($duplex);
return 0 unless defined $duplexes{$duplex};
@@ -212,17 +214,17 @@ sub i_vlan {
my $partial = shift;
# Overlap allows more than one VLAN per port. Unable to determine default
my $overlap
my $overlap
= $c1900->bridgeGroupAllowMembershipOverlap()
|| $c1900->vlanAllowMembershipOverlap()
|| 'disabled';
if ( $overlap eq 'enabled' ) {
return;
return {};
}
my $member_of = $c1900->bridgeGroupMemberPortOfBridgeGroup()
|| $c1900->vlanMemberPortOfVlan();
|| $c1900->vlanMemberPortOfVlan() || {};
my $i_pvid = {};
foreach my $idx ( keys %$member_of ) {
@@ -244,7 +246,7 @@ sub i_vlan_membership {
my $partial = shift;
my $member_of = $c1900->bridgeGroupMemberPortOfBridgeGroup()
|| $c1900->vlanMemberPortOfVlan();
|| $c1900->vlanMemberPortOfVlan() || {};
my $i_vlan_membership = {};
foreach my $idx ( keys %$member_of ) {
@@ -261,7 +263,7 @@ sub i_vlan_membership {
return $i_vlan_membership;
}
sub i_vlan_membership_untagged { return; }
sub i_vlan_membership_untagged { return {}; }
sub bp_index {
my $c1900 = shift;

View File

@@ -41,7 +41,7 @@ use SNMP::Info::Layer2::Cisco;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%GLOBALS = (
%SNMP::Info::Layer2::Cisco::GLOBALS,
@@ -128,25 +128,24 @@ sub i_speed_admin {
my $c2900 = shift;
my $partial = shift;
my %i_speed_admin;
my $p_port = $c2900->p_port() || {};
my $interfaces = $c2900->interfaces($partial);
my $c2900_p_index = $c2900->c2900_p_index() || {};
my $c2900_p_admin = $c2900->c2900_p_speed_admin();
my %reverse_2900 = reverse %$c2900_p_index;
my $c2900_p_speed
= $c2900->c2900_p_speed_admin( $reverse_2900{$partial} );
my %speeds = (
'autoDetect' => 'auto',
's10000000' => '10 Mbps',
's100000000' => '100 Mbps',
);
%i_speed_admin
= map { $c2900_p_index->{$_} => $speeds{ $c2900_p_speed->{$_} } }
keys %$c2900_p_index;
my %i_speed_admin;
foreach my $if ( keys %$interfaces ) {
my $port_2900 = $reverse_2900{$if};
next unless defined $port_2900;
my $speed = $c2900_p_admin->{$port_2900};
next unless defined $speed;
$speed = 'auto' if $speed eq 'autoDetect';
$speed = '10 Mbps' if $speed eq 's10000000';
$speed = '100 Mbps' if $speed eq 's100000000';
$i_speed_admin{$if} = $speed;
}
return \%i_speed_admin;
}
@@ -190,7 +189,7 @@ sub set_i_duplex_admin {
return $c2900->set_c2900_p_duplex_admin( $duplexes{$duplex}, $iid );
}
# Use i_descritption for port key, cuz i_name can be manually entered.
# Use i_description for port key, cuz i_name can be manually entered.
sub interfaces {
my $c2900 = shift;
my $partial = shift;

View File

@@ -42,7 +42,7 @@ use SNMP::Info::Layer2::Cisco;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::Layer2::Cisco::MIBS,
@@ -70,7 +70,7 @@ $VERSION = '3.53';
sub i_physical {
my $cat = shift;
my $p_port = $cat->p_port();
my $p_port = $cat->p_port() || {};
my %i_physical;
foreach my $port ( keys %$p_port ) {
@@ -104,8 +104,8 @@ sub os_ver {
# Workaround for incomplete bp_index
sub bp_index {
my $cat = shift;
my $p_index = $cat->p_port();
my $b_index = $cat->p_oidx();
my $p_index = $cat->p_port() || {};
my $b_index = $cat->p_oidx() || {};
my %bp_index;
foreach my $iid ( keys %$p_index ) {

View File

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

View File

@@ -52,7 +52,7 @@ use SNMP::Info::Layer2;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS,

View File

@@ -50,22 +50,24 @@ use SNMP::Info::Aggregate 'agg_ports_ifstack';
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %PORTSTAT %MODEL_MAP %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
%SNMP::Info::MAU::MIBS,
%SNMP::Info::CDP::MIBS,
%SNMP::Info::Aggregate::MIBS,
'RFC1271-MIB' => 'logDescription',
'HP-ICF-OID' => 'hpSwitch4000',
'STATISTICS-MIB' => 'hpSwitchCpuStat',
'NETSWITCH-MIB' => 'hpMsgBufFree',
'CONFIG-MIB' => 'hpSwitchConfig',
'HP-ICF-CHASSIS' => 'hpicfSensorObjectId',
'HP-ICF-BRIDGE' => 'hpicfBridgeRstpForceVersion',
'HP-ICF-POE-MIB' => 'hpicfPoePethPsePortCurrent',
'SEMI-MIB' => 'hpHttpMgSerialNumber',
'RFC1271-MIB' => 'logDescription',
'HP-ICF-OID' => 'hpSwitch4000',
'STATISTICS-MIB' => 'hpSwitchCpuStat',
'NETSWITCH-MIB' => 'hpMsgBufFree',
'CONFIG-MIB' => 'hpSwitchConfig',
'HP-ICF-CHASSIS' => 'hpicfSensorObjectId',
'HP-ICF-BRIDGE' => 'hpicfBridgeRstpForceVersion',
'HP-ICF-POE-MIB' => 'hpicfPoePethPsePortCurrent',
'SEMI-MIB' => 'hpHttpMgSerialNumber',
'HP-SWITCH-PL-MIB' => 'hpSwitchProliant',
'BLADETYPE4-NETWORK-MIB' => 'hpProLiant-GbE2c-InterconnectSwitch',
);
%GLOBALS = (
@@ -156,6 +158,12 @@ $VERSION = '3.53';
'J8771A' => '4202vl-48G',
'J4865A' => '4108GL',
'J4887A' => '4104GL',
'JL074A' => '3810M-48G-PoE+',
'JL072A' => '3810M-48G',
'JL076A' => '3810M-40G-8SR-PoE+',
'JL073A' => '3810M-24G-PoE+',
'JL071A' => '3810M-24G',
'JL075A' => '3810M-16SFP+',
'J9588A' => '3800-48G-PoE+-4XG',
'J9574A' => '3800-48G-PoE+-4SFP+',
'J9586A' => '3800-48G-4XG',
@@ -175,6 +183,21 @@ $VERSION = '3.53';
'J4905A' => '3400cl-24G',
'J4815A' => '3324XL',
'J4851A' => '3124',
'JL322A' => '2930M-48G-PoE+',
'JL321A' => '2930M-48G',
'JL323A' => '2930M-40G-8SR-PoE+',
'JL320A' => '2930M-24G-PoE+',
'JL324A' => '2930M-24G-8SR-PoE+',
'JL319A' => '2930M-24G',
'JL258A' => '2930F-8G-PoE+-2SFP+',
'JL256A' => '2930F-48G-PoE+-4SFP+',
'JL262A' => '2930F-48G-PoE+-4SFP',
'JL254A' => '2930F-48G-4SFP+',
'JL260A' => '2930F-48G-4SFP',
'JL255A' => '2930F-24G-PoE+-4SFP+',
'JL261A' => '2930F-24G-PoE+-4SFP',
'JL253A' => '2930F-24G-4SFP+',
'JL259A' => '2930F-24G-4SFP',
'J9729A' => '2920-48G-PoE+',
'J9729A' => '2920-48G-PoE+',
'J9728A' => '2920-48G',
@@ -214,6 +237,11 @@ $VERSION = '3.53';
'J9086A' => '2610-24/12PWR',
'J9085A' => '2610-24',
'J8762A' => '2600-8-PWR',
'JL357A' => '2540-48G-PoE+-4SFP+',
'JL355A' => '2540-48G-4SFP+',
'JL356A' => '2540-24G-PoE+-4SFP+',
'JL354A' => '2540-24G-4SFP+',
'JL070A' => '2530-8-PoE+ Internal PS',
'J9780A' => '2530-8-PoE+',
'J9774A' => '2530-8G-PoEP',
'J9777A' => '2530-8G',
@@ -303,7 +331,7 @@ sub model {
my $model = &SNMP::translateObj($id);
return $id unless defined $model;
$model =~ s/^hpswitch//i;
$model =~ s/^(hp|aruba)switch//i;
return defined $MODEL_MAP{$model} ? $MODEL_MAP{$model} : $model;
}
@@ -624,6 +652,14 @@ Included in V2 mibs from Cisco
=item F<HP-ICF-POE-MIB>
=item F<HP-ICF-CHASSIS>
=item F<SEMI-MIB>
=item F<HP-SWITCH-PL-MIB>
=item F<BLADETYPE4-NETWORK-MIB>
=back
The last four MIBs listed are from HP and can be found at

View File

@@ -44,7 +44,7 @@ use SNMP::Info::CDP;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %PORTSTAT %MODEL_MAP %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::Layer2::MIBS,
@@ -66,6 +66,7 @@ sub os_ver {
if ( $descr =~ /^\S+\s\S+\s\S+\s(\S+)/){
return $1;
}
return;
}
sub serial {
@@ -75,7 +76,7 @@ sub serial {
my $str = substr($1,8,10);
return $str;
}
return;
}
sub vendor {
return 'Kentrox';
@@ -87,6 +88,7 @@ sub model {
if ( $descr =~ /^(\S+\s\S+)/){
return $1;
}
return;
}
1;

View File

@@ -43,7 +43,7 @@ use SNMP::Info::Airespace;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/;
$VERSION = '3.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::MIBS,
@@ -49,6 +49,7 @@ $VERSION = '3.53';
'NTWS-CLIENT-SESSION-MIB' => 'ntwsClSessTotalSessions',
'NTWS-SYSTEM-MIB' => 'ntwsSysCpuAverageLoad',
'NTWS-BASIC-MIB' => 'ntwsVersionString',
'NTWS-AP-CONFIG-MIB' => 'ntwsApConfServProfBeaconEnabled',
);
%GLOBALS = (

View File

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

View File

@@ -0,0 +1,253 @@
# SNMP::Info::Layer2::Nexans
#
# Copyright (c) 2018 Christoph Neuhaus
# 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::Nexans;
use strict;
use Exporter;
use SNMP::Info::Layer2;
@SNMP::Info::Layer2::Nexans::ISA = qw/SNMP::Info::Layer2 Exporter/;
@SNMP::Info::Layer2::Nexans::EXPORT_OK = qw//;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::Layer2::MIBS,
'NEXANS-MIB' => 'nexansANS',
'NEXANS-BM-MIB' => 'infoDescr',
);
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS,
'mac' => 'adminAgentPhysAddress.0',
);
%FUNCS = (
%SNMP::Info::Layer2::FUNCS,
'i_duplex' => 'portLinkState', #NEXANS-BM-MIB
'i_duplex_admin' => 'portSpeedDuplexSetup', #NEXANS-BM-MIB
'nexans_i_name' => 'ifAlias',
);
%MUNGE = (
%SNMP::Info::Layer2::MUNGE,
'i_duplex' => \&munge_i_duplex,
'i_duplex_admin' => \&munge_i_duplex_admin,
);
sub munge_i_duplex {
my $duplex = shift;
return unless defined $duplex;
$duplex = 'half' if $duplex =~/Hdx/;
$duplex = 'full' if $duplex =~/Fdx/;
return $duplex;
}
sub munge_i_duplex_admin {
my $duplex_admin = shift;
return unless defined $duplex_admin;
$duplex_admin = 'full' if $duplex_admin =~/Fdx/;
$duplex_admin = 'half' if $duplex_admin =~/Hdx/;
$duplex_admin = 'auto' if $duplex_admin =~/autoneg/;
return $duplex_admin;
}
sub vendor {
return 'nexans';
}
sub model {
my $nexans = shift;
my $id = $nexans->id() || '';
my $model = &SNMP::translateObj($id);
return $id unless defined $model;
return $model;
}
sub os {
return 'nexanos';
}
sub os_ver {
my $nexans = shift;
my $ver = $nexans->infoMgmtFirmwareVersion() || '';
return $ver;
}
sub serial {
my $nexans = shift;
return $nexans->infoSeriesNo();
}
sub i_name {
my $nexans = shift;
my $return = $nexans->nexans_i_name();
# replace i_name where possible
foreach my $iid ( keys %$return ) {
next unless $return->{$iid} eq "";
$return->{$iid} = $iid;
}
return \%$return;
}
1;
__END__
=head1 NAME
SNMP::Info::Layer2::Nexans - SNMP Interface to Nexans network devices.
=head1 AUTHOR
Christoph Neuhaus
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
my $nexans = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
or die "Can't connect to DestHost.\n";
my $class = $nexans->class();
print "SNMP::Info determined this device to fall under subclass : $class\n";
=head1 DESCRIPTION
Abstraction subclass for Nexans network devices.
tested devices:
fiberSwitch100BmPlus version 3.61
gigaSwitch641DeskSfpTp version 3.68, 4.14W
gigaSwitchV3d2SfpSfp version 3.68, 4.02, 4.02B, 4.10C, 4,14W
For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above.
my $nexans = new SNMP::Info::Layer2::Nexans(...);
=head2 Inherited Classes
=over
=item SNMP::Info::Layer2
=back
=head2 Required MIBs
=over
=item F<NEXANS>
=item F<NEXANS-BM>
=item Inherited Classes' MIBs
See L<SNMP::Info::Layer2/"Required MIBs"> for its own MIB requirements.
=back
=head1 GLOBALS
These are methods that return scalar value from SNMP
=over
=item $nexans->vendor()
Returns 'nexans'
=item $nexans->model()
Returns the chassis model.
=item $nexans->os()
Returns 'nexanos'
=item $nexans->os_ver()
Returns the software version.
=item $nexans->serial()
Returns the chassis serial number.
(C<infoSeriesNo>)
=back
=head2 Globals imported from SNMP::Info::Layer2
See documentation in 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 $nexans->i_name()
Returns reference to map of IIDs to human-set port name.
=back
=head2 Table Methods imported from SNMP::Info::Layer2
See documentation in L<SNMP::Info::Layer2/"TABLE METHODS"> for details.
=head1 Data Munging Callback Subroutines
=over
=item munge_i_duplex()
Converts duplex returned by C<portLinkState> to either 'full' or 'half'.
=item munge_i_duplex_admin()
Converts duplex returned by C<portSpeedDuplexSetup> to either 'full', 'half',
or 'auto'.
=back
=cut

View File

@@ -41,13 +41,11 @@ use SNMP::Info::Layer2;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::Layer2::MIBS,
%SNMP::Info::IEEE802dot11::MIBS,
#'ORiNOCO-MIB' => 'orinoco',
);
%GLOBALS
@@ -56,12 +54,6 @@ $VERSION = '3.53';
%FUNCS = (
%SNMP::Info::Layer2::FUNCS,
%SNMP::Info::IEEE802dot11::FUNCS,
# ORiNOCO-MIB:oriWirelessIfPropertiesTable
#'ori_ssid' => 'oriWirelessIfNetworkName',
#'ori_channel' => 'oriWirelessIfChannel',
#'ori_closed_sys' => 'oriWirelessIfClosedSystem',
# ORiNOCO-MIB:oriSystemInvMgmtComponentTable
);
%MUNGE = ( %SNMP::Info::Layer2::MUNGE, %SNMP::Info::IEEE802dot11::MUNGE, );
@@ -165,22 +157,6 @@ sub interfaces {
return \%interfaces;
}
#sub i_ssidbcast {
# my $orinoco = shift;
# my $partial = shift;
#
# my $bcast = $orinoco->ori_closed_sys($partial) || {};
#
# my %i_ssidbcast;
# foreach my $iid (keys %$bcast){
# my $bc = $bcast->{$iid};
# next unless defined $bc;
#
# $i_ssidbcast{$iid} = $bc;
# }
# return \%i_ssidbcast;
#}
1;
__END__

View File

@@ -0,0 +1,182 @@
# SNMP::Info::Layer2::Sixnet
#
# 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::Sixnet;
use strict;
use Exporter;
use SNMP::Info::Layer2;
@SNMP::Info::Layer2::Sixnet::ISA = qw/SNMP::Info::Layer2 Exporter/;
@SNMP::Info::Layer2::Sixnet::EXPORT_OK = qw//;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.63';
%MIBS = (%SNMP::Info::Layer2::MIBS, 'SIXNET-MIB' => 'sxid',);
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS,
'os_ver' => 'firmwareRevision',
's_model' => 'sxid',
'ps1_status' => 'p1status',
'ps2_status' => 'p2status',
);
%FUNCS = (%SNMP::Info::Layer2::FUNCS,);
%MUNGE = (%SNMP::Info::Layer2::MUNGE,);
sub vendor {
return 'sixnet';
}
sub os {
return 'sixnet';
}
sub model {
my $sixnet = shift;
my $s_model = $sixnet->s_model();
return $s_model if defined $s_model;
my $id = $sixnet->id();
return unless defined $id;
my $model = SNMP::translateObj($id);
return $model ? $model : $id;
}
1;
__END__
=head1 NAME
SNMP::Info::Layer2::Sixnet - SNMP Interface to Sixnet industrial switches
=head1 AUTHOR
Eric Miller
=head1 SYNOPSIS
my $sixnet = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
or die "Can't connect to DestHost.\n";
my $class = $sixnet->class();
print " Using device sub class : $class\n";
=head1 DESCRIPTION
SNMP::Info::Layer2::Sixnet is a subclass of SNMP::Info that provides an
interface to Sixnet industrial switches.
For speed or debugging purposes you can call the subclass directly, but not
after determining a more specific class using the method above.
my $sixnet = new SNMP::Info::Layer2::Sixnet(...);
=head2 Inherited Classes
=over
=item SNMP::Info::Layer2
=back
=head2 Required MIBs
=over
=item F<SIXNET-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 $sixnet->vendor()
Returns 'sixnet'
=item $sixnet->os()
Returns 'sixnet'
=item $sixnet->os_ver()
Returns the software version returned by C<firmwareRevision>
=item $sixnet->model()
Returns model type. Returns C<sxid> if it exists, otherwise cross references
$sixnet->id() with the F<SIXNET-MIB>.
=item $sixnet->ps1_status()
(C<p1status>)
=item $sixnet->ps2_status()
(C<p2status>)
=back
=head2 Globals 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.
=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::LLDP;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::MIBS,
@@ -51,6 +51,7 @@ $VERSION = '3.53';
'TRAPEZE-NETWORKS-CLIENT-SESSION-MIB' => 'trpzClSessTotalSessions',
'TRAPEZE-NETWORKS-SYSTEM-MIB' => 'trpzSysCpuAverageLoad',
'TRAPEZE-NETWORKS-BASIC-MIB' => 'trpzVersionString',
'TRAPEZE-NETWORKS-AP-CONFIG-MIB' => 'trpzApConfServProfBeaconEnabled',
);
%GLOBALS = (

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.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::Layer2::MIBS,

View File

@@ -39,14 +39,14 @@ use SNMP::Info::Layer2;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
# Set for No CDP
%GLOBALS = ( %SNMP::Info::Layer2::GLOBALS );
%FUNCS = (
%SNMP::Info::Layer2::FUNCS,
'ip_adresses' => 'ipAdEntAddr',
'ip_addresses' => 'ipAdEntAddr',
'i_name' => 'ifDescr',
'i_description' => 'adslLineConfProfile',
);
@@ -58,7 +58,7 @@ $VERSION = '3.53';
sub layers {
my $zyxel = shift;
my $layers = $zyxel->layers();
my $layers = $zyxel->SUPER::layers();
return $layers if defined $layers;
# If these don't claim to have any layers, so we'll give them 1+2
@@ -102,7 +102,9 @@ sub ip {
my $ip_hash = $zyxel->ip_addresses();
my $found_ip;
foreach my $ip ( keys %{$ip_hash} ) {
# Since hashes are random add sort so we get the same address each time
# if there happens to be more than one. Will return highest numbered address
foreach my $ip ( sort keys %{$ip_hash} ) {
$found_ip = $ip
if ( defined $ip
and $ip =~ /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/ );

View File

@@ -53,7 +53,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::MIBS,
@@ -194,32 +194,18 @@ sub root_ip {
sub serial {
my $l3 = shift;
my $serial1 = $l3->serial1();
my $e_parent = $l3->e_parent() || {};
my $e_class = $l3->e_class() || {};
foreach my $iid ( keys %$e_parent ) {
my $parent = $e_parent->{$iid};
my $class = $e_class->{$iid} || '';
# Only consider serial numbers for entries without a parent, or if they are of type "chassis"
if ( $parent eq '0' or $class eq 'chassis') {
my $serial = $l3->e_serial($iid);
if ( $serial && $serial->{$iid} ) {
return $serial->{$iid};
}
else {
my $descr = $l3->e_descr($iid);
if ( $descr and $descr =~ /serial#?:\s*([a-z0-9]+)/i )
{
return $1;
}
}
}
my $entity_serial = $l3->entity_derived_serial();
if ( defined $entity_serial and $entity_serial !~ /^\s*$/ ){
return $entity_serial;
}
return $serial1 if ( defined $serial1 and $serial1 !~ /^\s*$/ );
my $serial1 = $l3->serial1();
if ( defined $serial1 and $serial1 !~ /^\s*$/ ) {
return $serial1;
}
return;
}
# $l3->model() - the sysObjectID returns an IID to an entry in
@@ -493,8 +479,7 @@ Removes 'cisco' from cisco devices for readability.
=item $l3->serial()
Tries to cull a serial number from F<ENTITY-MIB>, description, and
F<OLD-CISCO->... MIB.
Returns a serial number if found from F<ENTITY-MIB> and F<OLD-CISCO->... MIB.
=item $l3->vendor()

View File

@@ -41,7 +41,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %MIBS %FUNCS %GLOBALS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
@@ -69,8 +69,8 @@ $VERSION = '3.53';
'bp_index2' => 'dot1dBasePortIfIndex',
# AWC Interface Table (awcIfTable)
'awc_default_mac' => 'awcIfDefaultPhyAddress',
'awc_mac' => 'awcIfPhyAddress',
'awc_default_mac' => 'awcIfDefaultPhysAddress',
'awc_mac' => 'awcIfPhysAddress',
'awc_ip' => 'awcIfIpAddress',
'awc_netmask' => 'awcIfIpNetMask',
'awc_msdu' => 'awcIfMSDUMaxLength',
@@ -364,13 +364,13 @@ Ignores ports that are of type ``rptr'' and ``lo''.
Gives the default MAC address of each interface.
C<awcIfDefaultPhyAddress>
C<awcIfDefaultPhysAddress>
=item $aironet->awc_mac()
Gives the actual MAC address of each interface.
C<awcIfPhyAddress>
C<awcIfPhysAddress>
=item $aironet->awc_ip()

View File

@@ -49,7 +49,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
@@ -112,15 +112,13 @@ sub vendor {
}
sub os_ver {
my $alu = shift;
my $alu = shift;
my $descr = $alu->description();
if ( $descr =~ m/^(\S+)/ ) {
return $1;
}
my $descr = $alu->description();
return $1 if $descr =~ m/\b(\d[\.\d]+R\d+) (?:GA|Service Release), /;
# No clue what this will try but hey
return $alu->SUPER::os_ver();
# No clue what this will try but hey
return $alu->SUPER::os_ver();
}
# ps1_type, ps1_status, ps2_type, ps2_status:

View File

@@ -39,7 +39,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -48,14 +48,14 @@ use SNMP::Info::Aggregate 'agg_ports_ifstack';
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
%SNMP::Info::MAU::MIBS,
%SNMP::Info::LLDP::MIBS,
%SNMP::Info::Aggregate::MIBS,
'ARISTA-PRODUCTS-MIB' => 'aristaProducts',
'ARISTA-PRODUCTS-MIB' => 'aristaDCS7124S',
);
%GLOBALS = (

View File

@@ -40,7 +40,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::MIBS,

View File

@@ -36,7 +36,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
# NOTE: Order creates precedence
# Example: v_name exists in Bridge.pm and CiscoVTP.pm
@@ -96,8 +96,8 @@ sub ports {
my $c3550 = shift;
my $id = $c3550->id();
my $model = &SNMP::translateObj($id);
if ( $model =~ /(12|24|48)(C|T|TS|G|TS-E|TS-S|T-E)?$/ ) {
my $model = SNMP::translateObj($id);
if ( defined $model && $model =~ /(12|24|48)(C|T|TS|G|TS-E|TS-S|T-E)?$/ ) {
return $1;
}

View File

@@ -44,7 +44,7 @@ use SNMP::Info::MAU;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
# NOTE: Order creates precedence
# Example: v_name exists in Bridge.pm and CiscoVTP.pm

View File

@@ -40,14 +40,14 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
%SNMP::Info::LLDP::MIBS,
'CHECKPOINT-MIB' => 'fwProduct',
'UCD-SNMP-MIB' => 'versionTag',
'NET-SNMP-TC' => 'netSnmpAgentOIDs',
'NET-SNMP-TC' => 'netSnmpAliasDomain',
'NET-SNMP-EXTEND-MIB' => 'nsExtendNumEntries',
'HOST-RESOURCES-MIB' => 'hrSystem',
);

View File

@@ -55,7 +55,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
@@ -97,22 +97,18 @@ $VERSION = '3.53';
%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 {
@@ -128,19 +124,53 @@ sub i_vlan {
if ( $i_type->{$idx} eq 'l2vlan'
|| $i_type->{$idx} eq '135' && !defined $i_vlan->{$idx} )
{
# Not sure where this regex came from, anchored at end?
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;
}
}
}
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
# 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 ne '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;

View File

@@ -45,7 +45,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::MIBS, %SNMP::Info::Layer3::MIBS, %SNMP::Info::Entity::MIBS,
@@ -101,7 +101,7 @@ sub mac {
my $i_mac = $contivity->i_mac();
# Return Interface MAC
foreach my $entry ( keys %$i_mac ) {
foreach my $entry ( sort keys %$i_mac ) {
my $sn = $i_mac->{$entry};
next unless $sn;
return $sn;

View File

@@ -46,14 +46,14 @@ use SNMP::Info::IEEE802dot3ad 'agg_ports_lag';
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
%SNMP::Info::LLDP::MIBS,
%SNMP::Info::IEEE802dot3ad::MIBS,
'UCD-SNMP-MIB' => 'versionTag',
'NET-SNMP-TC' => 'netSnmpAgentOIDs',
'NET-SNMP-TC' => 'netSnmpAliasDomain',
'HOST-RESOURCES-MIB' => 'hrSystem',
);
@@ -86,7 +86,7 @@ sub os_ver {
my $descr = $netsnmp->description();
# STRING: "Cumulus Linux version 3.5.1 running on innotek GmbH VirtualBox"
return $1 if ( $descr =~ /^Cumulus Linux (\S+)\s+/ );
return $1 if ( $descr =~ /^Cumulus Linux.+(\d+\.\d+\.\d+)\s/ );
return;
}

View File

@@ -10,7 +10,7 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
@@ -39,8 +39,13 @@ $VERSION = '3.53';
%SNMP::Info::LLDP::FUNCS,
'dlink_fw' => 'probeSoftwareRev',
'dlink_hw' => 'probeHardwareRev',
'dlink_stp_i_root_port' => 'MSTP_MIB__swMSTPInstRootPort',
'dlink_serial_no' => 'AGENT_GENERAL_MIB__agentSerialNumber',
# Replaced with OID since these MIBs are no longer in the netdisco-mibs
# collection. Commit reference of MIB removal in netdisco-mibs:
# d6ec3f15861e28d220a681e7fa3b222c21664fda
'dlink_stp_i_root_port' => '.1.3.6.1.4.1.171.12.15.2.3.1.18',
'dlink_serial_no' => '.1.3.6.1.4.1.171.12.1.1.12',
# TODO: hardcoded OIDs using get() in method calls below should be
# replaced similarly and use the library getter methods
);
%MUNGE = ( %SNMP::Info::Layer3::MUNGE, %SNMP::Info::LLDP::MUNGE, );

View File

@@ -40,21 +40,23 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
%SNMP::Info::LLDP::MIBS,
'RADLAN-COPY-MIB' => 'rlCopySourceLocation',
'RADLAN-Physicaldescription-MIB' => 'rlPhdStackReorder',
'RADLAN-rlInterfaces' => 'rlIfNumOfLoopbackPorts',
'RADLAN-HWENVIROMENT' => 'rlEnvPhysicalDescription',
'Dell-Vendor-MIB' => 'productIdentificationVersion',
'DELL-REF-MIB' => 'dell6224Switch',
);
%GLOBALS = (
%SNMP::Info::Layer3::GLOBALS,
%SNMP::Info::LLDP::GLOBALS,
'os_ver' => 'productIdentificationVersion',
'dell_os_ver' => 'productIdentificationVersion',
'dell_id_name' => 'productIdentificationDisplayName',
);
@@ -114,16 +116,22 @@ sub model {
my $dell = shift;
my $name = $dell->dell_id_name();
my $descr = $dell->description();
my $id = $dell->id();
if ( defined $name and $name =~ m/(\d+)/ ) {
return $1;
}
# Don't have a vendor MIB for D-Link
else {
return $descr;
return unless defined $id;
my $model = SNMP::translateObj($id);
if (defined $model) {
$model =~ s/^dell//;
$model =~ s/Switch$//;
return $model;
}
return $id;
}
sub vendor {
@@ -138,19 +146,19 @@ sub os {
return $dell->_vendor();
}
sub serial {
sub os_ver {
my $dell = shift;
my $numbers = $dell->dell_serial_no();
foreach my $key ( keys %$numbers ) {
my $serial = $numbers->{$key};
return $serial if ( defined $serial and $serial !~ /^\s*$/ );
next;
my $entity_os = $dell->entity_derived_os_ver();
if ( defined $entity_os and $entity_os !~ /^\s*$/ ){
return $entity_os;
}
# Last resort
return $dell->SUPER::serial();
my $dell_os = $dell->dell_os_ver();
if ( defined $dell_os and $dell_os !~ /^\s*$/ ) {
return $dell_os;
}
return;
}
# check all fans, and report overall status
@@ -159,41 +167,74 @@ sub fan {
my $fan = $dell->dell_fan_desc() || {};
my $state = $dell->dell_fan_state() || {};
my @messages = ();
if (scalar keys %$fan) {
my @messages = ();
foreach my $k (keys %$fan) {
next if $state->{$k} and $state->{$k} eq 'normal';
push @messages, "$fan->{$k}: $state->{$k}";
}
foreach my $k (keys %$fan) {
next if $state->{$k} and $state->{$k} eq 'normal';
push @messages, "$fan->{$k}: $state->{$k}";
}
push @messages, ((scalar keys %$fan). " fans OK")
if scalar @messages == 0;
push @messages, ((scalar keys %$fan). " fans OK")
if scalar @messages == 0;
return (join ", ", @messages);
return (join ", ", @messages);
}
return;
}
sub _ps_status {
my ($dell, $unit) = @_;
sub ps1_type {
my $dell = shift;
my $status = 'unknown';
return $status if !defined $unit;
my $src = $dell->dell_pwr_src() || {};
my $desc = $dell->dell_pwr_desc() || {};
my $state = $dell->dell_pwr_state() || {};
foreach my $k (keys %$desc) {
next unless $desc->{$k} and $desc->{$k} eq "ps1_unit$unit";
return ($state->{$k} || $status);
foreach my $k (sort keys %$src) {
next unless $src->{$k};
return $src->{$k};
}
return $status;
return;
}
sub ps1_type { return 'internalRedundant' }
sub ps2_type { return 'internalRedundant' }
sub ps2_type {
my $dell = shift;
sub ps1_status { return (shift)->_ps_status(1) }
sub ps2_status { return (shift)->_ps_status(2) }
my $src = $dell->dell_pwr_src() || {};
my $i = 0;
foreach my $k (sort keys %$src) {
$i++;
next unless $src->{$k} and $i == 2;
return $src->{$k};
}
return;
}
sub ps1_status {
my $dell = shift;
my $status = $dell->dell_pwr_state() || {};
foreach my $k (sort keys %$status) {
next unless $status->{$k};
return $status->{$k};
}
return;
}
sub ps2_status {
my $dell = shift;
my $status = $dell->dell_pwr_state() || {};
my $i = 0;
foreach my $k (sort keys %$status) {
$i++;
next unless $status->{$k} and $i == 2;
return $status->{$k};
}
return;
}
sub interfaces {
my $dell = shift;
@@ -213,6 +254,23 @@ sub interfaces {
return $i_descr;
}
sub i_duplex {
my $dell = shift;
my $partial = shift;
my $dell_duplex = $dell->dell_duplex($partial) || {};
my %i_duplex;
foreach my $if ( keys %$dell_duplex ) {
my $duplex = $dell_duplex->{$if};
next unless defined $duplex;
next if $duplex eq 'unknown';
$i_duplex{$if} = $duplex;
}
return \%i_duplex;
}
sub i_duplex_admin {
my $dell = shift;
my $partial = shift;
@@ -225,11 +283,11 @@ sub i_duplex_admin {
foreach my $if ( keys %$interfaces ) {
my $duplex = $dell_duplex->{$if};
next unless defined $duplex;
my $auto = $dell_auto->{$if} || 'false';
my $auto = $dell_auto->{$if} || 'disabled';
$duplex = 'half' if ( $duplex =~ /half/i and $auto =~ /false/i );
$duplex = 'full' if ( $duplex =~ /half/i and $auto =~ /false/i );
$duplex = 'auto' if $auto =~ /true/i;
$duplex = 'half' if ( $duplex eq 'half' and $auto eq 'disabled' );
$duplex = 'full' if ( $duplex eq 'full' and $auto eq 'disabled' );
$duplex = 'auto' if $auto eq 'enabled';
$i_duplex_admin{$if} = $duplex;
}
return \%i_duplex_admin;
@@ -241,7 +299,6 @@ sub _vendor {
my $id = $dell->id() || 'undef';
my %oidmap = (
2 => 'ibm',
171 => 'dlink',
674 => 'dell',
3955 => 'linksys',
);
@@ -251,7 +308,7 @@ sub _vendor {
return $oidmap{$id};
}
else {
return 'dlink';
return $id;
}
}
@@ -448,6 +505,10 @@ Returns the map between SNMP Interface Identifier (iid) and physical port
name. Uses name if available instead of description since descriptions are
sometimes not unique.
=item $dell->i_duplex()
Returns reference to map of IIDs to current link duplex.
=item $dell->i_duplex_admin()
Returns reference to hash of iid to current link administrative duplex

205
lib/SNMP/Info/Layer3/ERX.pm Normal file
View File

@@ -0,0 +1,205 @@
# SNMP::Info::Layer3::ERX
#
# Copyright (c) 2017 Rob Woodward
# 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::Layer3::ERX;
use strict;
use Exporter;
use SNMP::Info::Layer3;
@SNMP::Info::Layer3::ERX::ISA = qw/
SNMP::Info::Layer3
Exporter
/;
@SNMP::Info::Layer3::ERX::EXPORT_OK = qw//;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::Layer3::MIBS
);
%GLOBALS = (
%SNMP::Info::Layer3::GLOBALS,
);
%FUNCS = (
%SNMP::Info::Layer3::FUNCS,
);
%MUNGE = (
%SNMP::Info::Layer3::MUNGE,
);
sub vendor {
return "Juniper";
}
sub model {
my $ERX = shift;
my $descr = $ERX->description() || '';
my $model = undef;
$model = $1 if ( $descr =~ /Juniper Networks, Inc. (.+) Edge Routing Switch/i );
return $model;
}
sub os {
return 'JunOSe';
}
sub os_ver {
my $ERX = shift;
my $descr = $ERX->description();
my $os_ver = undef;
if ( $descr =~ /Version : \((.+)\) .+:/ ) {
$os_ver = $1;
}
return $os_ver;
}
sub i_ignore {
my $l3 = shift;
my $partial = shift;
my $interfaces = $l3->interfaces($partial) || {};
my %i_ignore;
foreach my $if ( keys %$interfaces ) {
# lo0 etc
if ( $interfaces->{$if} =~ /\b(inloopback|console)\d*\b/i ) {
$i_ignore{$if}++;
}
}
return \%i_ignore;
}
1;
__END__
=head1 NAME
SNMP::Info::Layer3::ERX - SNMP Interface to ERX Layer 3 routers.
=head1 AUTHORS
Rob Woodward
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
my $ERX = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myrouter',
Community => 'public',
Version => 2
)
or die "Can't connect to DestHost.\n";
my $class = $ERX->class();
print "SNMP::Info determined this device to fall under subclass : $class\n";
=head1 DESCRIPTION
Subclass for Juniper ERX switches
=head2 Inherited Classes
=over
=item SNMP::Info::Layer3
=back
=head2 Required MIBs
=over
=item Inherited Classes' MIBs
See L<SNMP::Info::Layer3> for its own MIB requirements.
=back
=head1 GLOBALS
These are methods that return scalar value from SNMP
=over
=item $ERX->vendor()
Returns 'Juniper'.
=item $ERX->os()
Returns 'JunOSe'.
=item $ERX->os_ver()
Returns the software version extracted from C<sysDescr>.
=item $ERX->model()
Returns the hardware model extracted from C<sysDescr>.
=back
=head2 Globals imported from SNMP::Info::Layer3
See documentation in L<SNMP::Info::Layer3> for details.
=head1 TABLE ENTRIES
These are methods that return tables of information in the form of a reference
to a hash.
=head2 Overrides
=over
=item $ERX->i_ignore()
Returns reference to hash. Increments value of IID if port is to be ignored.
Ignores InLoopback and Console interfaces
=back
=head2 Table Methods imported from SNMP::Info::Layer3
See documentation in L<SNMP::Info::Layer3> for details.
=cut

View File

@@ -44,7 +44,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION $DEBUG %GLOBALS %FUNCS $INIT %MIBS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::Layer3::MIBS,

View File

@@ -43,13 +43,13 @@ use SNMP::Info::LLDP;
use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
%SNMP::Info::MAU::MIBS,
%SNMP::Info::LLDP::MIBS,
'F10-PRODUCTS-MIB' => 'f10Products',
'F10-PRODUCTS-MIB' => 'f10ESeriesProducts',
);
%GLOBALS = (

View File

@@ -39,7 +39,7 @@ use SNMP::Info::Layer3;
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
$VERSION = '3.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
@@ -61,7 +61,7 @@ $VERSION = '3.53';
'FOUNDRY-SN-STACKING-MIB' => 'snStackingOperUnitRole',
'FOUNDRY-POE-MIB' => 'snAgentPoeGblPowerCapacityTotal',
'FOUNDRY-SN-SWITCH-GROUP-MIB' => 'snSwGroupOperMode',
'BROCADE-PRODUCTS-MIB' => 'sysName',
'BROCADE-PRODUCTS-MIB' => 'brocadeProducts',
);
%GLOBALS = (

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.63';
%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.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
%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.53';
$VERSION = '3.63';
%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. Overridden 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 compatibility 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 compatibility 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