SNMP::Info::MAU - Perl5 Interface to SNMP Medium Access Unit (MAU) MIB (RFC2668)
MAU-MIB is used by Layer 2 devices like HP Switches . The MAU table contains link and duplex info for the port itself and the device connected to that port.
Inherits all methods from SNMP::Info
Max Baker (max@warped.org)
max@warped.org
my $mau = new SNMP::Info::MAU( DestHost => 'myswitch', Community => 'public');
Arguments passed to new() are passed on to SNMP::Session::new()
my $mau = new SNMP::Info::MAU( DestHost => $host, Community => 'public', Version => 3,... ) die "Couldn't connect.\n" unless defined $mau;
Sets or returns the SNMP::Session object
# Get my $sess = $mau->session(); # Set my $newsession = new SNMP::Session(...); $mau->session($newsession);
Queries each of the methods listed in %FUNCS and returns a hash reference.
$mau->all() will call $mau->load_all() once and then return cahced valued. Use $mau->load_all() to reload from the device.
(ifMauIfIndex)
This is essentially the type of link in use. eg. dot3MauType100BaseTXFD - 100BaseT at Full Duplex
(ifMauType)
1 - other 2 - unknown 3 - operational 4 - standby 5 - shutdown 6 - reset
Use 5 and !5 to see if the link is up or down on the admin side.
(ifMauStatus)
(B<ifMauMediaAvailable>)
Directly from the MAU-MIB : Bit Capability 0 other or unknown 1 AUI 2 10BASE-5 3 FOIRL 4 10BASE-2 5 10BASE-T duplex mode unknown 6 10BASE-FP 7 10BASE-FB 8 10BASE-FL duplex mode unknown 9 10BROAD36 10 10BASE-T half duplex mode 11 10BASE-T full duplex mode 12 10BASE-FL half duplex mode 13 10BASE-FL full duplex mode 14 100BASE-T4 15 100BASE-TX half duplex mode 16 100BASE-TX full duplex mode 17 100BASE-FX half duplex mode 18 100BASE-FX full duplex mode 19 100BASE-T2 half duplex mode 20 100BASE-T2 full duplex mode
(ifMauTypeList)
(ifMauAutoNegAdminStatus)
Uses the same decoder as $mau->mau_type().
(ifMauAutoNegCapAdvertised)
(ifMauAutoNegCapReceived)
Boolean. Checks to see if any of the full_duplex types from mau_type() are high. Currently bits 11,13,16,18,20.
Boolean. Checks to see if any of the half_duplex types from mau_type() are high. Currently bits 10,12,15,17,19.
To install SNMP::Info, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SNMP::Info
CPAN shell
perl -MCPAN -e shell install SNMP::Info
For more information on module installation, please visit the detailed CPAN module installation guide.