Rechercher une page de manuel
SNMP::Info::Layer1.3pm
Langue: en
Version: 2007-11-25 (mandriva - 01/05/08)
Section: 3 (Bibliothèques de fonctions)
NAME
SNMP::Info::Layer1 - SNMP Interface to network devices serving Layer1 only.AUTHOR
Max BakerSYNOPSIS
# Let SNMP::Info determine the correct subclass for you. my $l1 = new SNMP::Info( AutoSpecify => 1, Debug => 1, # These arguments are passed directly on to SNMP::Session DestHost => 'myswitch', Community => 'public', Version => 1 ) or die "Can't connect to DestHost.\n";
my $class = $l1->class(); print "SNMP::Info determined this device to fall under subclass : $class\n";
# Let's get some basic Port information my $interfaces = $l1->interfaces(); my $i_up = $l1->i_up(); my $i_speed = $l1->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"; }
DESCRIPTION
This class is usually used as a superclass for more specific device classes listed under SNMP::Info::Layer1::* Please read all docs under SNMP::Info first.Provides abstraction to the configuration information obtainable from a Layer1 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 $l1 = new SNMP::Info::Layer1(...);
Inherited Classes
- SNMP::Info
Required MIBs
- SNMP-REPEATER-MIB
MIBs required for ``Required MIBs'' in SNMP::Info
See ``Required MIBs'' in SNMP::Info for its MIB requirements.
SNMP-REPEATER-MIB needs to be extracted from ftp://ftp.cisco.com/pub/mibs/v1/v1.tar.gz
GLOBALS
These are methods that return scalar value from SNMP- $l1->ports_managed()
- Gets the number of ports under the interface mib
(ifNumber)
Overrides
- $l1->vendor()
- Trys to discover the vendor from $l1->model() and $l1->vendor()
- $l1->ports()
- Adds the values from rptr_ports() and ports_managed()
- $l1->slots()
- Number of 'groups' in the Repeater MIB
(rptrGroupCapacity)
Global Methods imported from SNMP::Info
See documentation in ``GLOBALS'' in SNMP::Info for details.
TABLE METHODS
These are methods that return tables of information in the form of a reference to a hash.Overrides
- $l1->interfaces()
- $l1->i_up()
- $l1->i_up_admin()
Repeater MIB
- $l1->rptr_ports()
- Number of ports in each group.
(rptrGroupPortCapacity)
- $l1->rptr_port()
- Port number in Group
(rptrPortIndex)
- $l1->rptr_slot()
- Group (slot) Number for given port.
(rptrPortGroupIndex)
- $l1->rptr_up_admin()
- (rptrPortAdminStatus)
- $l1->rptr_up()
- (rptrPortOperStatus)
- $l1->rptr_last_src()
- (rptrAddrTrackNewLastSrcAddress)
Table Methods imported from SNMP::Info
See documentation in ``TABLE METHODS'' in SNMP::Info for details.
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre