regenerate for 1.09

This commit is contained in:
Eric Miller
2008-07-23 02:04:27 +00:00
parent f0d490539e
commit 64340bf92e

420
README
View File

@@ -5,12 +5,12 @@ NAME
VERSION
SNMP::Info - Version 1.07
SNMP::Info - Version 1.09
AUTHOR
SNMP::Info was created at UCSC for the netdisco project
(www.netdisco.org) and was orginally written by Max Baker.
(www.netdisco.org) and was originally written by Max Baker.
Currently being maintained by team of Open Source authors headed by Eric
Miller and Bill Fenner.
@@ -141,7 +141,7 @@ REQUIREMENTS
SNMP::Info operates on textual descriptors found in MIBs.
If you are using SNMP::Info separate from Netdisco, download the
Netdisco-MIB package at
Netdisco MIB package at
http://sourceforge.net/project/showfiles.php?group_id=80033&package_id=135517
@@ -194,79 +194,119 @@ SUBCLASSES
AIRESPACE-WIRELESS-MIB and AIRESPACE-SWITCHING-MIB. Inherited by
devices based on the Airespace wireless platform.
See documentation in SNMP::Info::Airespace for details.
SNMP::Info::Bridge
BRIDGE-MIB (RFC1286). QBRIDGE-MIB. Inherited by devices with Layer2
support.
See documentation in SNMP::Info::Bridge for details.
SNMP::Info::CDP
CISCO-CDP-MIB. Cisco Discovery Protocol (CDP) Support. Inherited by
Cisco and HP devices.
Cisco, Enterasys, and HP devices.
See documentation in SNMP::Info::CDP for details.
SNMP::Info::CiscoConfig
CISCO-CONFIG-COPY-MIB, CISCO-FLASH-MIB, and OLD-CISCO-SYS-MIB. These
OIDs facilitate the writing of configuration files.
See documentation in SNMP::Info::CiscoConfig for details.
SNMP::Info::CiscoImage
CISCO-IMAGE-MIB. A collection of OIDs providing IOS image
characteristics.
See documentation in SNMP::Info::CiscoImage for details.
SNMP::Info::CiscoPortSecurity
CISCO-PORT-SECURITY-MIB.
CISCO-PORT-SECURITY-MIB and CISCO-PAE-MIB.
See documentation in SNMP::Info::CiscoPortSecurity for details.
SNMP::Info::CiscoQOS
CISCO-CLASS-BASED-QOS-MIB. A collection of OIDs providing
information about a Cisco device's QOS config.
See documentation in SNMP::Info::CiscoQOS for details.
SNMP::Info::CiscoRTT
CISCO-RTTMON-MIB. A collection of OIDs providing information about a
Cisco device's RTT values.
See documentation in SNMP::Info::CiscoRTT for details.
SNMP::Info::CiscoStack
CISCO-STACK-MIB.
See documentation in SNMP::Info::CiscoStack for details.
SNMP::Info::CiscoStats
OLD-CISCO-CPU-MIB, CISCO-PROCESS-MIB, and CISCO-MEMORY-POOL-MIB.
Provides common interfaces for memory, cpu, and os statistics for
Cisco devices.
See documentation in SNMP::Info::CiscoStats for details.
SNMP::Info::CiscoVTP
CISCO-VTP-MIB, CISCO-VLAN-MEMBERSHIP-MIB,
CISCO-VLAN-IFTABLE-RELATIONSHIP-MIB
See documentation in SNMP::Info::CiscoVTP for details.
SNMP::Info::Entity
ENTITY-MIB. Used for device info in Cisco and other vendors.
See documentation in SNMP::Info::Entity for details.
SNMP::Info::EtherLike
ETHERLIKE-MIB (RFC1398) - Some Layer3 devices implement this MIB, as
well as some Aironet Layer 2 devices (non Cisco).
See documentation in SNMP::Info::EtherLike for details.
SNMP::Info::FDP
Foundry Discovery Protocol. FOUNDRY-SN-SWITCH-GROUP-MIB
See documentation in SNMP::Info::FDP for details.
SNMP::Info::IEEE802dot11
IEEE802dot11-MIB. A collection of OIDs providing information about
standards based 802.11 wireless devices.
See documentation in SNMP::Info::IEEE802dot11 for details.
SNMP::Info::LLDP
LLDP-MIB, LLDP-EXT-DOT1-MIB, and LLDP-EXT-DOT3-MIB. Link Layer
Discovery Protocol (LLDP) Support.
See documentation in SNMP::Info::LLDP for details.
SNMP::Info::MAU
MAU-MIB (RFC2668). Some Layer2 devices use this for extended
Ethernet (Media Access Unit) interface information.
See documentation in SNMP::Info::MAU for details.
SNMP::Info::NortelStack
S5-AGENT-MIB, S5-CHASSIS-MIB.
See documentation in SNMP::Info::NortelStack for details.
SNMP::Info::RapidCity
RAPID-CITY. Inhertited by Nortel switches for duplex and VLAN
RAPID-CITY. Inherited by Nortel switches for duplex and VLAN
information.
See documentation in SNMP::Info::RapidCity for details.
SNMP::Info::SONMP
SYNOPTICS-ROOT-MIB, S5-ETH-MULTISEG-TOPOLOGY-MIB. Provides
translation from Nortel Topology Table information to CDP. Inherited
by Nortel/Bay/Synoptics switches and hubs.
See documentation in SNMP::Info::SONMP for details.
Device Subclasses
These subclasses inherit from one or more classes to provide a common
@@ -278,72 +318,107 @@ SUBCLASSES
SNMP::Info::Layer1
Generic Layer1 Device subclass.
See documentation in SNMP::Info::Layer1 for details.
SNMP::Info::Layer1::Allied
Subclass for Allied Telesys Repeaters / Hubs.
Requires ATI-MIB
See documentation in SNMP::Info::Layer1::Allied for details.
SNMP::Info::Layer1::Asante
Subclass for Asante 1012 Hubs.
Requires ASANTE-HUB1012-MIB
See documentation in SNMP::Info::Layer1::Asante for details.
SNMP::Info::Layer1::Bayhub
Subclass for Nortel/Bay hubs. This includes System 5000, 100
series, 200 series, and probably more.
See documentation in SNMP::Info::Layer1::Bayhub for details.
SNMP::Info::Layer1::Cyclades
Subclass for Cyclades terminal servers.
See documentation in SNMP::Info::Layer1::Cyclades for details.
SNMP::Info::Layer1::S3000
Subclass for Bay/Synoptics hubs. This includes System 3000,
281X, and probably more.
See documentation in SNMP::Info::Layer1::S3000 for details.
SNMP::Info::Layer2
Generic Layer2 Device subclass.
See documentation in SNMP::Info::Layer2 for details.
SNMP::Info::Layer2::Airespace
Subclass for Cisco (Airespace) wireless controllers.
See documentation in SNMP::Info::Layer2::Airespace for details.
SNMP::Info::Layer2::Aironet
Class for Cisco Aironet wireless devices that run IOS. See also
Layer3::Aironet for Aironet devices that don't run IOS.
See documentation in SNMP::Info::Layer2::Aironet for details.
SNMP::Info::Layer2::Allied
Allied Telesys switches.
See documentation in SNMP::Info::Layer2::Allied for details.
SNMP::Info::Layer2::Aruba
Subclass for Aruba wireless switches.
See documentation in SNMP::Info::Layer2::Aruba for details.
SNMP::Info::Layer2::Bay
Depreciated. Use BayStack.
SNMP::Info::Layer2::Baystack
Subclass for Nortel/Bay Ethernet Switch/Baystack switches. This
includes 303, 304, 350, 380, 410, 420, 425, 450, 460, 470, 5510,
5520, 5530, Business Policy Switch (BPS) and probably others.
includes 303, 304, 350, 380, 410, 420, 425, 450, 460, 470
series, 2500 series, 4500 series, 5500 series, Business Ethernet
Switch (BES), Business Policy Switch (BPS) and probably others.
See documentation in SNMP::Info::Layer2::Baystack for details.
SNMP::Info::Layer2::C1900
Subclass for Cisco Catalyst 1900 and 1900c Devices running
CatOS.
See documentation in SNMP::Info::Layer2::C1900 for details.
SNMP::Info::Layer2::C2900
Subclass for Cisco Catalyst 2900, 2950, 3500XL, and 3548 devices
running IOS.
See documentation in SNMP::Info::Layer2::C2900 for details.
SNMP::Info::Layer2::Catalyst
Subclass for Cisco Catalyst switches running CatOS. These
switches usually report a model number that starts with "wsc".
Note that this class does not support everything that has the
name Catalyst.
See documentation in SNMP::Info::Layer2::Catalyst for details.
SNMP::Info::Layer2::Centillion
Subclass for Nortel/Bay Centillion and 5000BH ATM switches.
See documentation in SNMP::Info::Layer2::Centillion for details.
SNMP::Info::Layer2::Cisco
Generic Cisco subclass for layer2 devices that are not yet
supported in more specific subclasses.
See documentation in SNMP::Info::Layer2::Cisco for details.
SNMP::Info::Layer2::Foundry
Depreciated. Use SNMP::Info::Layer3::Foundry.
@@ -352,23 +427,34 @@ SUBCLASSES
Requires HP-ICF-OID and ENTITY-MIB downloaded from HP.
See SNMP::Info::Layer2::HP for more info.
See documentation in SNMP::Info::Layer2::HP for details.
SNMP::Info::Layer2::N2270
Subclass for Nortel 2270 wireless switches.
See documentation in SNMP::Info::Layer2::N2270 for details.
SNMP::Info::Layer2::NAP222x
Subclass for Nortel 222x series wireless access points.
See documentation in SNMP::Info::Layer2::NAP222x for details.
SNMP::Info::Layer2::Orinoco
Subclass for Orinoco/Proxim wireless access points.
See documentation in SNMP::Info::Layer2::Orinoco for details.
SNMP::Info::Layer2::ZyXEL_DSLAM
Zyxel DSLAMs. Need I say more?
See documentation in SNMP::Info::Layer2::ZyXEL_DSLAM for
details.
SNMP::Info::Layer3
Generic Layer3 and Layer2+3 Device subclass.
See documentation in SNMP::Info::Layer3 for details.
SNMP::Info::Layer3::Aironet
Subclass for Cisco Aironet wireless access points (AP) not
running IOS. These are usually older devices.
@@ -378,76 +464,124 @@ SUBCLASSES
Note Layer2::Aironet
See documentation in SNMP::Info::Layer3::Aironet for details.
SNMP::Info::Layer3::AlteonAD
Subclass for Nortel Alteon Ace Director series L2-7 switches.
Subclass for Nortel Alteon Series Layer 2-7 load balancing
switches and Nortel BladeCenter Layer2-3 GbE Switch Modules.
See documentation in SNMP::Info::Layer3::AlteonAD for details.
SNMP::Info::Layer3::BayRS
Subclass for Nortel Multiprotocol/BayRS routers. This includes
BCN, BLN, ASN, ARN, AN, 2430, and 5430 routers.
See documentation in SNMP::Info::Layer3::BayRS for details.
SNMP::Info::Layer3::C3550
Subclass for Cisco Catalyst 3550,3540,3560 2/3 switches running
IOS.
See documentation in SNMP::Info::Layer3::C3550 for details.
SNMP::Info::Layer3::C4000
This class covers Catalyst 4000s and 4500s.
See documentation in SNMP::Info::Layer3::C4000 for details.
SNMP::Info::Layer3::C6500
This class covers Catalyst 6500s in native mode, hybrid mode.
Catalyst 3750's, 2970's and probably others.
See documentation in SNMP::Info::Layer3::C6500 for details.
SNMP::Info::Layer3::Cisco
This is a simple wrapper around Layer3 for IOS devices. It adds
on CiscoVTP.
See documentation in SNMP::Info::Layer3::Cisco for details.
SNMP::Info::Layer3::Contivity
Subclass for Nortel Contivity/VPN Routers.
See documentation in SNMP::Info::Layer3::Contivity for details.
SNMP::Info::Layer3::Dell
Subclass for Dell PowerConnect switches.
Subclass for Dell PowerConnect switches. D-Link, the IBM
BladeCenter Gigabit Ethernet Switch Module and some Linksys
switches also use this module based upon MIB support.
See documentation in SNMP::Info::Layer3::Dell for details.
SNMP::Info::Layer3::Enterasys
Subclass for Enterasys devices.
See documentation in SNMP::Info::Layer3::Enterasys for details.
SNMP::Info::Layer3::Extreme
Subclass for Extreme Networks switches.
See SNMP::Info::Layer3::Extreme for more info.
See documentation in SNMP::Info::Layer3::Extreme for details.
SNMP::Info::Layer3::Foundry
Subclass for Foundry Network devices.
See SNMP::Info::Layer3::Foundry for more info.
See documentation in SNMP::Info::Layer3::Foundry for details.
SNMP::Info::Layer3::HP9300
Subclass for HP network devices which Foundry Networks was the
Original Equipment Manufacturer (OEM) such as the HP ProCurve
9300 series.
See documentation in SNMP::Info::Layer3::HP9300 for details.
SNMP::Info::Layer3::Juniper
Subclass for Juniper devices
See documentation in SNMP::Info::Layer3::Juniper for details.
SNMP::Info::Layer3::Microsoft
Subclass for Generic Microsoft Routers running Microsoft Windows
OS.
See documentation in SNMP::Info::Layer3::Microsoft for details.
SNMP::Info::Layer3::N1600
Subclass for Nortel Ethernet Routing Switch 1600 series.
See documentation in SNMP::Info::Layer3::N1600 for details.
SNMP::Info::Layer3::NetSNMP
Subclass for host systems running Net-SNMP.
See documentation in SNMP::Info::Layer3::NetSNMP for details.
SNMP::Info::Layer3::Netscreen
Subclass for Juniper NetScreen.
See documentation in SNMP::Info::Layer3::Netscreen for details.
SNMP::Info::Layer3::Passport
Subclass for Nortel Ethernet Routing Switch/Passport 8000 series
and Accelar series switches.
See documentation in SNMP::Info::Layer3::Passport for details.
SNMP::Info::Layer3::Sun
Subclass for Generic Sun Routers running SunOS.
See documentation in SNMP::Info::Layer3::Sun for details.
Thanks
Thanks for testing and coding help (in no particular order) to : Andy
Ford, Brian Wilson, Jean-Philippe Luiggi, D<>na Watanabe, Bradley Baetz,
Mike Hunter, Justin Hunter, Brian Chow and people listed on the Netdisco
README!
Thanks for testing and coding help (in no particular order) to :
Alexander Barthel, Andy Ford, Alexander Hartmaier, Andrew Herrick, Alex
Kramarov, Bernhard Augenstein, Bradley Baetz, Brian Chow, Brian Wilson,
Carlos Vicente, Dana Watanabe, David Pinkoski, David Sieborger, Douglas
McKeown, Greg King, Ivan Auger, Jean-Philippe Luiggi, Jeroen van Ingen,
Justin Hunter, Kent Hamilton, Matthew Tuttle, Michael Robbert, Mike
Hunter, Nicolai Petri, Ralf Gross, Robert Kerr and people listed on the
Netdisco README!
USAGE
@@ -561,6 +695,19 @@ USAGE
When trying to get info from a new device, you may have to try
version 2 and then fallback to version 1.
update()
Replace the existing session with a new one with updated values,
without re-identifying the device. The only supported changes are to
Community or Context.
Clears the object cache.
This is useful, e.g., when a device supports multiple contexts (via
changes to the Community string, or via the SNMPv3 Context
parameter), but a context that you want to access does not support
the objects (e.g., "sysObjectID", "sysDescr") that we use to
identify the device.
Data is Cached
Methods and subroutines requesting data from a device will only load the
@@ -574,7 +721,7 @@ USAGE
Object Scalar Methods
These are for package related data, not direcly supplied from SNMP.
These are for package related data, not directly supplied from SNMP.
$info->clear_cache()
Clears the cached data. This includes GLOBALS data and TABLE METHOD
@@ -618,9 +765,12 @@ USAGE
Cisco Generic L3 IOS device -> SNMP::Info::Layer3::Cisco
Cyclades terminal server -> SNMP::Info::Layer1::Cyclades
Dell PowerConnect -> SNMP::Info::Layer3::Dell
D-Link -> SNMP::Info::Layer3::Dell
Enterasys -> SNMP::Info::Layer3::Enterasys
Extreme -> SNMP::Info::Layer3::Extreme
Foundry -> SNMP::Info::Layer3::Foundry
HP Procurve -> SNMP::Info::Layer2::HP
HP Procurve 9300 series -> SNMP::Info::Layer3::HP9300
Juniper -> SNMP::Info::Layer3::Juniper
Microsoft -> SNMP::Info::Layer3::Microsoft
Net-SNMP -> SNMP::Info::Layer3::NetSNMP
@@ -643,10 +793,13 @@ USAGE
Cisco (not covered by above) -> SNMP::Info::Layer2::Cisco
Cyclades terminal server -> SNMP::Info::Layer1::Cyclades
Dell PowerConnect -> SNMP::Info::Layer3::Dell
D-Link -> SNMP::Info::Layer3::Dell
Enterasys -> SNMP::Info::Layer3::Enterasys
Extreme -> SNMP::Info::Layer3::Extreme
Foundry -> SNMP::Info::Layer3::Foundry
HP Procurve -> SNMP::Info::Layer2::HP
HP Procurve 9300 series -> SNMP::Info::Layer3::HP9300
IBM BladeCenter GbESM -> SNMP::Info::Layer3::Dell
Nortel/Bay Centillion ATM -> SNMP::Info::Layer2::Centillion
Nortel/Bay Baystack -> SNMP::Info::Layer2::Baystack
Nortel Business Ethernet Switch-> SNMP::Info::Layer2::Baystack
@@ -675,7 +828,7 @@ USAGE
Returns non-zero if the device has the supplied layer in the OSI
Model
Returns "undef" if the device doesn't support the layers() call.
Returns if the device doesn't support the layers() call.
$info->snmp_comm()
Returns SNMP Community string used in connection.
@@ -712,16 +865,16 @@ USAGE
$info->uptime()
Uptime in hundredths of seconds since device became available.
(sysUpTime)
("sysUpTime")
$info->contact()
(sysContact)
("sysContact")
$info->name()
(sysName)
("sysName")
$info->location()
(sysLocation)
("sysLocation")
$info->layers()
This returns a binary encoded string where each digit represents a
@@ -734,7 +887,7 @@ USAGE
See $info->has_layer()
(sysServices)
("sysServices")
$info->ports()
Number of interfaces available on this device.
@@ -742,14 +895,14 @@ USAGE
Not too useful as the number of SNMP interfaces usually does not
correspond with the number of physical ports
(ifNumber)
("ifNumber")
$info->ipforwarding()
The indication of whether the entity is acting as an IP gateway
Returns either forwarding or not-forwarding
(ipForwarding)
("ipForwarding")
Table Methods
@@ -784,7 +937,7 @@ USAGE
Interface Information
$info->interfaces()
This methods is overriden in each subclass to provide a mapping
This methods is overridden in each subclass to provide a mapping
between the Interface Table Index (iid) and the physical port name.
$info->if_ignore()
@@ -798,71 +951,79 @@ USAGE
$info->i_index()
Default SNMP IID to Interface index.
(ifIndex)
("ifIndex")
$info->i_description()
Description of the interface. Usually a little longer single word
name that is both human and machine friendly. Not always.
(ifDescr)
("ifDescr")
$info->i_type()
Interface type, such as Vlan, 10baseT, Ethernet, Serial
Interface type, such as Vlan, Ethernet, Serial
(ifType)
("ifType")
$info->i_mtu()
INTEGER. Interface MTU value.
(ifMtu)
("ifMtu")
$info->i_speed()
Speed of the link, human format. See munge_speed() later in document
for details.
(ifSpeed, ifHighSpeed if necessary)
("ifSpeed", "ifHighSpeed" if necessary)
$info->i_speed_raw()
Speed of the link in bits per second without munging. If
i_speed_high is available it will be used and multiplied by
1_000_000.
("ifSpeed", "ifHighSpeed" if necessary)
$info->i_speed_high()
Speed of a high-speed link, human format. See munge_highspeed()
later in document for details. You should not need to call this
directly, as i_speed() will call it if it needs to.
(ifHighSpeed)
("ifHighSpeed")
$info->i_mac()
MAC address of the interface. Note this is just the MAC of the port,
not anything connected to it.
(ifPhysAddress)
("ifPhysAddress")
$info->i_up()
Link Status of the interface. Typical values are 'up' and 'down'.
(ifOperStatus)
("ifOperStatus")
$info->i_up_admin()
Administrative status of the port. Typical values are 'enabled' and
'disabled'.
(ifAdminStatus)
("ifAdminStatus")
$info->i_lastchange()
The value of sysUpTime when this port last changed states (up,down).
The value of "sysUpTime" when this port last changed states
(up,down).
(ifLastChange)
("ifLastChange")
$info->i_name()
Interface Name field. Supported by a smaller subset of devices, this
fields is often human set.
(ifName)
("ifName")
$info->i_alias()
Interface Name field. For certain devices this is a more human
friendly form of i_description(). For others it is a human set field
like i_name().
(ifAlias)
("ifAlias")
Interface Statistics
@@ -880,13 +1041,13 @@ USAGE
global $SNMP::Info::BIGINT to 1 , or pass the BigInt value to new()
if you want SNMP::Info to do it for you.
(ifInOctets) (ifOutOctets) (ifHCInOctets) (ifHCOutOctets)
("ifInOctets") ("ifOutOctets") ("ifHCInOctets") ("ifHCOutOctets")
$info->i_errors_in(), $info->i_errors_out()
Number of packets that contained an error prventing delivery. See
IF-MIB for more info.
Number of packets that contained an error preventing delivery. See
"IF-MIB" for more info.
(ifInErrors) (ifOutErrors)
("ifInErrors") ("ifOutErrors")
$info->i_pkts_ucast_in(), $info->i_pkts_ucast_out(),
$info->i_pkts_ucast_in64(), $info->i_pkts_ucast_out64()
@@ -894,16 +1055,17 @@ USAGE
64 bit version may not exist on all devices.
(ifInUcastPkts) (ifOutUcastPkts) (ifHCInUcastPkts)
(ifHCOutUcastPkts)
("ifInUcastPkts") ("ifOutUcastPkts") ("ifHCInUcastPkts")
("ifHCOutUcastPkts")
$info->i_pkts_nucast_in(), $info->i_pkts_nucast_out(),
Number of packets sent to a multicast or broadcast address.
These methods are depricated by i_pkts_multi_in() and
i_pkts_bcast_in() according to IF-MIB. Actual device usage may vary.
These methods are deprecated by i_pkts_multi_in() and
i_pkts_bcast_in() according to "IF-MIB". Actual device usage may
vary.
(ifInNUcastPkts) (ifOutNUcastPkts)
("ifInNUcastPkts") ("ifOutNUcastPkts")
$info->i_pkts_multi_in() $info->i_pkts_multi_out(),
$info->i_pkts_multi_in64(), $info->i_pkts_multi_out64()
@@ -911,8 +1073,8 @@ USAGE
64 bit version may not exist on all devices.
(ifInMulticastPkts) (ifOutMulticastPkts) (ifHCInMulticastPkts)
(ifHCOutMulticastPkts)
("ifInMulticastPkts") ("ifOutMulticastPkts") ("ifHCInMulticastPkts")
("ifHCOutMulticastPkts")
$info->i_pkts_bcast_in() $info->i_pkts_bcast_out(),
$info->i_pkts_bcast_in64() $info->i_pkts_bcast_out64()
@@ -920,16 +1082,17 @@ USAGE
64 bit version may not exist on all devices.
(ifInBroadcastPkts) (ifOutBroadcastPkts) (ifHCInBroadcastPkts)
(ifHCOutBroadcastPkts)
("ifInBroadcastPkts") ("ifOutBroadcastPkts") ("ifHCInBroadcastPkts")
("ifHCOutBroadcastPkts")
$info->i_discards_in() $info->i_discards_out()
"The number of inbound packets which were chosen to be discarded
even though no errors had been detected to prevent their being
deliverable to a higher-layer protocol. One possible reason for
discarding such a packet could be to free up buffer space." (IF-MIB)
discarding such a packet could be to free up buffer space."
("IF-MIB")
(ifInDiscards) (ifOutDiscards)
("ifInDiscards") ("ifOutDiscards")
$info->i_bad_proto_in()
"For packet-oriented interfaces, the number of packets received via
@@ -941,17 +1104,17 @@ USAGE
that does not support protocol multiplexing, this counter will
always be 0."
(ifInUnknownProtos)
("ifInUnknownProtos")
$info->i_qlen_out()
"The length of the output packet queue (in packets)."
(ifOutQLen)
("ifOutQLen")
$info->i_specific()
See IF-MIB for full description
See "IF-MIB" for full description
(ifSpecific)
("ifSpecific")
IP Address Table
@@ -961,22 +1124,22 @@ USAGE
$info->ip_index()
Maps the IP Table to the IID
(ipAdEntIfIndex)
("ipAdEntIfIndex")
$info->ip_table()
Maps the Table to the IP address
(ipAdEntAddr)
("ipAdEntAddr")
$info->ip_netmask()
Gives netmask setting for IP table entry.
(ipAdEntNetMask)
("ipAdEntNetMask")
$info->ip_broadcast()
Gives broadcast address for IP table entry.
(ipAdEntBcastAddr)
("ipAdEntBcastAddr")
IP Routing Table
@@ -1101,16 +1264,16 @@ SETTING DATA VIA SNMP
$info->set_METHOD($value)
Sets the global METHOD to value. Assumes that iid is .0
Returns undef if failed, or the return value from
SNMP::Session::set() (snmp_errno)
Returns if failed, or the return value from SNMP::Session::set()
(snmp_errno)
$info->set_location("Here!");
$info->set_METHOD($value,$iid)
Table Methods. Set iid of method to value.
Returns undef if failed, or the return value from
SNMP::Session::set() (snmp_errno)
Returns if failed, or the return value from SNMP::Session::set()
(snmp_errno)
# Disable a port administratively
my %if_map = reverse %{$info->interfaces()}
@@ -1121,7 +1284,7 @@ SETTING DATA VIA SNMP
string in order for set operations to work.
NOTE: This will only set data listed in %FUNCS and %GLOBALS. For data
acquired from overriden methods (subroutines) specific set_METHOD()
acquired from overridden methods (subroutines) specific set_METHOD()
subroutines will need to be added if they haven't been already.
Quiet Mode
@@ -1149,8 +1312,15 @@ EXTENDING SNMP::INFO
Used to flag if the MIBs have been loaded yet.
%GLOBALS
Contains a hash in the form ( method_name => SNMP iid name ) These
are scalar values such as name,uptime, etc.
Contains a hash in the form ( method_name => SNMP MIB leaf name )
These are scalar values such as name, uptime, etc.
To resolve MIB leaf name conflicts between private MIBs, you may
prefix the leaf name with the MIB replacing each - (dash) and :
(colon) with an _ (underscore). For example,
ALTEON_TIGON_SWITCH_MIB__agSoftwareVersion would be used as the hash
value instead of the net-snmp notation
ALTEON-TIGON-SWITCH-MIB::agSoftwareVersion.
When choosing the name for the methods, be aware that other new Sub
Modules might inherit this one to get it's features. Try to choose a
@@ -1158,13 +1328,20 @@ EXTENDING SNMP::INFO
SNMP::Info methods.
%FUNCS
Contains a hash in the form ( method_name => SNMP iid) These are
table entries, such as the IfIndex
Contains a hash in the form ( method_name => SNMP MIB leaf name)
These are table entries, such as the "ifIndex"
To resolve MIB leaf name conflicts between private MIBs, you may
prefix the leaf name with the MIB replacing each - (dash) and :
(colon) with an _ (underscore). For example,
ALTEON_TS_PHYSICAL_MIB__agPortCurCfgPortName would be used as the
hash value instead of the net-snmp notation
ALTEON-TS-PHYSICAL-MIB::agPortCurCfgPortName.
%MIBS
A list of each mib needed.
('MIB-NAME' => 'itemToTestForPresence')
('MIB-NAME' => 'itemToTestForPresence')
The value for each entry should be a MIB object to check for to make
sure that the MIB is present and has loaded correctly.
@@ -1354,7 +1531,7 @@ SNMP::INFO INTERNALS
)
munge_highspeed()
Makes human friendly speed ratings for ifHighSpeed
Makes human friendly speed ratings for "ifHighSpeed"
munge_ip()
Takes a binary IP and makes it dotted ASCII
@@ -1363,6 +1540,10 @@ SNMP::INFO INTERNALS
Takes an octet stream (HEX-STRING) and returns a colon separated
ASCII hex string.
munge_prio_mac()
Takes an 8-byte octet stream (HEX-STRING) and returns a colon
separated ASCII hex string.
munge_octet2hex()
Takes a binary octet stream and returns an ASCII hex string
@@ -1372,19 +1553,37 @@ SNMP::INFO INTERNALS
munge_bits
Takes a SNMP2 'BITS' field and returns the ASCII bit string
munge_caps
Takes an octet string and returns an ascii binary string, 7 digits
long, MSB.
munge_counter64
If $BIGINT is set to true, then a Math::BigInt object is returned.
See Math::BigInt for details.
munge_i_up
There is a collision between data in IF-MIB and RFC-1213. For
devices that fully implement IF-MIB it might return 7 for a port
that is down. This munges the data against the IF-MIB by hand.
There is a collision between data in "IF-MIB" and "RFC-1213". For
devices that fully implement "IF-MIB" it might return 7 for a port
that is down. This munges the data against the "IF-MIB" by hand.
TODO: Get the precidence of MIBs and overriding of MIB data in
TODO: Get the precedence of MIBs and overriding of MIB data in
Net-SNMP figured out. Heirarchy/precendence of MIBS in SNMP::Info.
Internaly Used Functions
munge_port_list
Takes an octet string representing a set of ports and returns a
reference to an array of binary values each array element
representing a port.
If the element has a value of '1', then that port is included in the
set of ports; the port is not included if it has a value of '0'.
munge_null()
Removes nulls from a string
munge_e_type()
Takes an OID and return the object name if the right MIB is loaded.
Internally Used Functions
$info->init()
Used internally. Loads all entries in %MIBS.
@@ -1410,7 +1609,7 @@ SNMP::INFO INTERNALS
Returns a reference to the %MIBS hash.
$info->munge()
Returns a reference ot the %MUNGE hash.
Returns a reference of the %MUNGE hash.
$info->nosuch()
Returns NoSuch value set or not in new()
@@ -1432,16 +1631,49 @@ SNMP::INFO INTERNALS
Example: $info->name() calls autoload which calls
$info->_global('name').
$info->_set(attr,val,iid)
$info->_set(attr,val,iid,type)
Used internally by AUTOLOAD to run an SNMP set command for dynamic
methods listed in either %GLOBALS or %FUNCS or a valid mib leaf from
a loaded MIB. Clears attr cache on sucessful set.
a loaded MIB or the set_multi() method to set multiple variable in
one command. When run clears attr cache.
Attr is passed as either a scalar for dynamic methods or a reference
to an array or array of arrays when used with set_multi().
Example: $info->set_name('dog',3) uses autoload to resolve to
$info->_set('name','dog',3);
$info->set_multi(arrayref)
Used to run an SNMP set command on several new values in the one
request. Returns the result of $info->_set(method).
Pass either a reference to a 4 element array [<obj>, <iid>, <val>,
<type>] or a reference to an array of 4 element arrays to specify
multiple values.
<obj> - One of the following forms:
1) leaf identifier (e.g., C<'sysContact'>)
2) An entry in either %FUNCS, %GLOBALS (e.g., 'contact')
<iid> - The dotted-decimal, instance identifier. For scalar MIB
objects use '0'
<val> - The SNMP data value being set (e.g., 'netdisco')
<type> - Optional as the MIB should be loaded.
If one of the set assignments is invalid, then the request will be
rejected without applying any of the new values - regardless of the
order they appear in the list.
Example: my $vlan_set = [
['qb_v_untagged',"$old_vlan_id","$old_untagged_portlist"],
['qb_v_egress',"$new_vlan_id","$new_egress_portlist"],
['qb_v_egress',"$old_vlan_id","$old_egress_portlist"],
['qb_v_untagged',"$new_vlan_id","$new_untagged_portlist"],
['qb_i_vlan',"$port","$new_vlan_id"], ];
$info->set_multi($vlan_set);
$info->load_all()
Debugging routine. This does not include any overriden method or
Debugging routine. This does not include any overridden method or
method implemented by subroutine.
Runs $info->load_METHOD() for each entry in $info->funcs();
@@ -1467,7 +1699,7 @@ SNMP::INFO INTERNALS
Called from $info->load_METHOD();
$info->_show_attr()
Used internaly by AUTOLOAD to return data called by methods listed
Used internally by AUTOLOAD to return data called by methods listed
in %FUNCS.
Called like $info->METHOD().
@@ -1475,9 +1707,13 @@ SNMP::INFO INTERNALS
The first time ran, it will call $info->load_METHOD(). Every time
after it will return cached data.
$info->snmp_connect_ip()
$info->snmp_connect_ip(ip)
Returns true or false based upon snmp connectivity to an IP.
modify_port_list(portlist,offset,replacement)
Replaces the specified bit in a port_list array and returns the
packed bitmask
AUTOLOAD
Each entry in either %FUNCS, %GLOBALS, or MIB Leaf node names present in
@@ -1508,12 +1744,12 @@ SNMP::INFO INTERNALS
For example to override $info->name() create `` sub name {...}'' in your
subclass.
COPYRIGHT AND LICENCE
COPYRIGHT AND LICENSE
Changes from SNMP::Info Version 0.7 and on are: Copyright (c)2003, 2004
Changes from SNMP::Info Version 0.7 and on are: Copyright (c) 2003-2008
Max Baker - All rights reserved.
Original Code is: Copyright (c) 2002-3, Regents of the University of
Original Code is: Copyright (c) 2002-2003, Regents of the University of
California All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -1522,9 +1758,9 @@ COPYRIGHT AND LICENCE
* 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.
* 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.