A class for performing SNMP V2 queries on Cisco devices

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

 Methods

Get the device's CDP (Cisco Discovery Protocol) ID

deviceId() : string

Returns

stringThe device's CDP (Cisco Discovery Protocol) ID

Get the device's interfaces CDP enabled status

interfaceEnabled() : array

Applies the TruthValue post processor (self::ppTruthValue()) to turn SNMP values into true / false.

Returns

arrayThe device's interfaces CDP enabled status' (as boolean true / false)

Get the device's interface names as seen in CDP

interfaceNames() : array

Returns

arrayThe device's interface names as seen in CDP

Get the device's CDP neighbour capabilities (as a decimal integer) indexed by the current device's port ID

neighbourCapability() : array

Returns

arrayThe device's CDP neighbour capabilities (as a decimal integer) indexed by the current device's port ID

Get the device's CDP neighbours (by their CDP ID) indexed by the current device's port ID

neighbourId() : array

Returns

arrayThe device's CDP neighbours (by their CDP ID) indexed by the current device's port ID

CDP utility function to get all CDP neighbours and their connected ports.

neighbourInformation() : array

Returns an array of neighbours indexed by the neighbour CDP ID. For example:

Array ( [cr-sw03.ixdub1.opensolutions.ie] => Array ( [0] => Array ( [localPortId] => 10101 [localPort] => GigabitEthernet1/0/1 [remotePort] => GigabitEthernet0/1 )

        [1] => Array
            (
                [localPortId] => 10102
                [localPort] => GigabitEthernet1/0/2
                [remotePort] => FastEthernet0/2
            )

    )
[ ... ]

)

see \neighbourId()
see \OSS\SNMP\MIBS\Interface::descriptions()
see \neighbourPort()

Returns

arrayCDP neighbours and their connected ports

Get the device's CDP neighbours connected port *description* indexed by the current device's port ID

neighbourPort() : array

E.g. a sample call may return:

Array ( [10101] => GigabitEthernet0/1 [10102] => FastEthernet0/2 [10103] => GigabitEthernet1/0/24 [10105] => GigabitEthernet1/0/2 )

meaning, for example, that our local port with ID 10101 is connected to port GigabitEthernet0/1 on the neighbour connected to that local port. You can discover the neighbour ID via neighbourId().

see \neighbourId()

Returns

arrayThe device's CDP neighbours connected port *description* indexed by the current device's port ID

 Constants

 

OID_CDP_DEVICE_ID

OID_CDP_DEVICE_ID 

 

OID_CDP_INTERFACE_ENABLED

OID_CDP_INTERFACE_ENABLED 

 

OID_CDP_INTERFACE_NAME

OID_CDP_INTERFACE_NAME 

 

OID_CDP_NEIGHBOUR_CAPABILITY

OID_CDP_NEIGHBOUR_CAPABILITY 

 

OID_CDP_NEIGHBOUR_ID

OID_CDP_NEIGHBOUR_ID 

 

OID_CDP_NEIGHBOUR_PORT

OID_CDP_NEIGHBOUR_PORT