![]() |
![]()
| ![]() |
![]()
NAMESNMP::Info::Layer2 - SNMP Interface to network devices serving Layer2 only. AUTHORMax Baker SYNOPSIS# Let SNMP::Info determine the correct subclass for you. my $l2 = new SNMP::Info( AutoSpecify => 1, Debug => 1, DestHost => 'myswitch', Community => 'public', Version => 2 ) or die "Can't connect to DestHost.\n"; my $class = $l2->class(); print "SNMP::Info determined this device to fall under subclass : $class\n"; # Let's get some basic Port information my $interfaces = $l2->interfaces(); my $i_up = $l2->i_up(); my $i_speed = $l2->i_speed(); foreach my $iid (keys %$interfaces) { my $port = $interfaces->{$iid}; my $up = $i_up->{$iid}; my $speed = $i_speed->{$iid} print "Port $port is $up. Port runs at $speed.\n"; } DESCRIPTIONThis class is usually used as a superclass for more specific device classes listed under SNMP::Info::Layer2::* Please read all docs under SNMP::Info first. Provides abstraction to the configuration information obtainable from a Layer2 device through SNMP. Information is stored in a number of MIBs. For speed or debugging purposes you can call the subclass directly, but not after determining a more specific class using the method above. my $l2 = new SNMP::Info::Layer2(...); Inherited ClassesRequired MIBs
MIBs can be found in netdisco-mibs package. GLOBALSThese are methods that return scalar value from SNMP Overrides
Globals imported from SNMP::InfoSee documentation in "USAGE" in SNMP::Info for details. Globals imported from SNMP::Info::BridgeSee documentation in "GLOBALS" in SNMP::Info::Bridge for details. Globals imported from SNMP::Info::EntitySee documentation in "GLOBALS" in SNMP::Info::Entity for details. Globals imported from SNMP::Info::LLDPSee documentation in "GLOBALS" in SNMP::Info::LLDP for details. Globals imported from SNMP::Info::PortAccessEntitySee documentation in "GLOBALS" in SNMP::Info::PortAccessEntity for details. TABLE METHODSThese are methods that return tables of information in the form of a reference to a hash. Overrides
Table Methods imported from SNMP::InfoSee documentation in "USAGE" in SNMP::Info for details. Table Methods imported from SNMP::Info::BridgeSee documentation in "TABLE METHODS" in SNMP::Info::Bridge for details. Table Methods imported from SNMP::Info::EntitySee documentation in "TABLE METHODS" in SNMP::Info::Entity for details. Table Methods imported from SNMP::Info::LLDPSee documentation in "TABLE METHODS" in SNMP::Info::LLDP for details. Table Methods imported from SNMP::Info::PortAccessEntitySee documentation in "TABLE METHODS" in SNMP::Info::PortAccessEntity for details.
|