A class for performing SNMP V2 queries on generic devices

copyright Copyright (c) 2012 - 2013, Open Source Solutions Limited, Dublin, Ireland
author Barry O'Donovan

 Methods

Get the SNMP instance

getSNMP() : \OSS_SNMP\SNMP

Returns

\OSS_SNMP\SNMPInstance of the SNMP object

Returns an associate array of physical aliases

physicalAlias() : array
e.g. [1005] => 10001

Returns

arrayAssociate array of physical aliases

Returns an associate array of entPhysicalClass

physicalClass(boolean $translate = false) : array
e.g. [1005] => 10 / port

Parameters

$translate

boolean

If true, return the string representation via self::$ENTITY_PHSYICAL_CLASS

Returns

arrayAssociate array of entPhysicalClass

Returns an associate array of entPhysicalDescr

physicalDescription() : array
e.g. [1] = STRING: "Cisco Systems Catalyst 6500 9-slot Chassis System" [2] = STRING: "Cisco Systems Catalyst 6500 9-slot Physical Slot" [3] = STRING: "Cisco Systems Catalyst 6500 9-slot Physical Slot" [4] = STRING: "Cisco Systems Catalyst 6500 9-slot Physical Slot"

Returns

arrayAssociate array of entPhysicalDescr

Returns an associate array of entPhysicalName

physicalName() : array
e.g. [1] = STRING: "WS-C6509-E" [2] = STRING: "Physical Slot 1" [3] = STRING: "Physical Slot 2" [4] = STRING: "Physical Slot 3"

Returns

arrayAssociate array of entPhysicalName

Returns an associate array of entPhysicalParentRelPos

physicalParentRelPos() : array
e.g. [1005] => 1

Returns

arrayAssociate array of entPhysicalParentRelPos

Utility function for MIBS\Cisco\RSTP::rstpPortRole() to try and translate a port index into a port ID

relPosToAlias() : Array
Makes a number of assumptions including that it has to be of type port, that the ID must be >10000, etc.

Returns

Arrayof relative positions to port IDs

Set the SNMP instance

setSNMP(\OSS_SNMP\SNMP $snmp) : \OSS_SNMP\MIB

Parameters

$snmp

\OSS_SNMP\SNMP

the SNMP instance

Returns

\OSS_SNMP\MIBAn instance of this class for fluent interfaces

 Properties

 

Translator array for physical class types

$ENTITY_PHSYICAL_CLASS : array

Default

array(self::PHYSICAL_CLASS_CHASSIS => 'chassis', self::PHYSICAL_CLASS_CONTAINER => 'container', self::PHYSICAL_CLASS_POWER_SUPPLY => 'powerSupply', self::PHYSICAL_CLASS_FAN => 'fan', self::PHYSICAL_CLASS_SENSOR => 'sensor', self::PHYSICAL_CLASS_MODULE => 'module', self::PHYSICAL_CLASS_PORT => 'port')
Static
 

Instance for the SNMP object

$_snmp 

Default

null

 Constants

 

OID_ENTITY_PHYSICAL_ALIAS

OID_ENTITY_PHYSICAL_ALIAS = '.1.3.6.1.2.1.47.1.1.1.1.14' 
 

OID_ENTITY_PHYSICAL_CLASS

OID_ENTITY_PHYSICAL_CLASS = '.1.3.6.1.2.1.47.1.1.1.1.5' 
 

OID_ENTITY_PHYSICAL_DESCRIPTION

OID_ENTITY_PHYSICAL_DESCRIPTION = '.1.3.6.1.2.1.47.1.1.1.1.2' 
 

OID_ENTITY_PHYSICAL_NAME

OID_ENTITY_PHYSICAL_NAME = '.1.3.6.1.2.1.47.1.1.1.1.7' 
 

OID_ENTITY_PHYSICAL_PARENT_REL_POS

OID_ENTITY_PHYSICAL_PARENT_REL_POS = '.1.3.6.1.2.1.47.1.1.1.1.6' 
 

Physical entitly class type

PHYSICAL_CLASS_CHASSIS = 3 : \OSS_SNMP\MIBS\Physical
 

Physical entitly class type

PHYSICAL_CLASS_CONTAINER = 5 : \OSS_SNMP\MIBS\Physical
 

Physical entitly class type

PHYSICAL_CLASS_FAN = 7 : \OSS_SNMP\MIBS\Physical
 

Physical entitly class type

PHYSICAL_CLASS_MODULE = 9 : \OSS_SNMP\MIBS\Physical
 

Physical entitly class type

PHYSICAL_CLASS_PORT = 10 : \OSS_SNMP\MIBS\Physical
 

Physical entitly class type

PHYSICAL_CLASS_POWER_SUPPLY = 6 : \OSS_SNMP\MIBS\Physical
 

Physical entitly class type

PHYSICAL_CLASS_SENSOR = 8 : \OSS_SNMP\MIBS\Physical