NAME
SNMP::Info::Bridge - Perl5 Interface to BRIDGE-MIB
DESCRIPTION
BRIDGE-MIB is used by most Layer 2 devices like Switches
Inherits all methods from SNMP::Info
AUTHOR
Max Baker (max@warped.org
)
SYNOPSIS
my $bridge = new SNMP::Info::Bridge(DestHost => 'myswitch',
Community => 'public');
my $mac = $bridge->mac();
CREATING AN OBJECT
- new SNMP::Info::Bridge()
-
Arguments passed to new() are passed on to SNMP::Session::new()
my $bridge = new SNMP::Info::Bridge( DestHost => $host, Community => 'public', Version => 3,... ) die "Couldn't connect.\n" unless defined $bridge;
- $bridge->session()
-
Sets or returns the SNMP::Session object
# Get my $sess = $bridge->session(); # Set my $newsession = new SNMP::Session(...); $bridge->session($newsession);
Bridge Global Configuration Values
- $bridge->b_mac()
-
Returns the MAC Address of the root bridge port
(dot1dBaseBridgeAddress)
- $bridge->b_ports()
-
Returns the number of ports in device
(dot1dBaseNumPorts)
- $bridge->b_type()
-
Returns the type? of the device
(dot1dBaseType)
TABLE ENTRIES
Forwarding Table (dot1dTpFdbEntry)
- $bridge->fw_mac()
-
Returns reference to hash of forwarding table MAC Addresses
(dot1dTpFdbAddress)
- $bridge->fw_port()
-
Returns reference to hash of forwarding table entries port interface identifier (iid)
(dot1dTpFdbPort)
- $bridge->fw_status()
-
Returns reference to hash of forwading table entries status
(dot2dTpFdbStatus)