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 SNMP instance

    getSNMP() : \OSS_SNMP\SNMP

### Returns

`\OSS_SNMP\SNMP`Instance of the SNMP object

## Get the device's RSTP port roles (by given vlan id)

    portRoles(int $vid, boolean $translate = false) : array

Only ports participating in RSTP for the given VLAN id are returned. This function will also convert STP port IDs to the device proper port IDs. E.g. sample output: Array ( [10101] => 3 [10103] => 3 [10105] => 3 [5048] => 2 )

see |
see | and others

### Parameters

#### $vid

`int`

The RSTP VLAN ID to query port roles for

#### $translate

`boolean`

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

### Returns

`array`The device's RSTP port roles (by given vlan id)

## Set the SNMP instance

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

### Parameters

#### $snmp

`\OSS_SNMP\SNMP`

the SNMP instance

### Returns

`\OSS_SNMP\MIB`An instance of this class for fluent interfaces

### Properties

## Array of port states that indicate traffic is/can pass

    $STP_X_RSTP_PASSING_PORT_ROLES : Array

### Default

`array(self::STP_X_RSTP_PORT_ROLE_ROOT => 'root', self::STP_X_RSTP_PORT_ROLE_DESIGNATED => 'designated')`
Static

## Text representation of STP extensions RSTP Port Roles

    $STP_X_RSTP_PORT_ROLES : array

### Default

`array(self::STP_X_RSTP_PORT_ROLE_DISABLED => 'disabled', self::STP_X_RSTP_PORT_ROLE_ROOT => 'root', self::STP_X_RSTP_PORT_ROLE_DESIGNATED => 'designated', self::STP_X_RSTP_PORT_ROLE_ALTERNATE => 'alternate', self::STP_X_RSTP_PORT_ROLE_BACKUP => 'backUp', self::STP_X_RSTP_PORT_ROLE_BOUNDARY => 'boundary', self::STP_X_RSTP_PORT_ROLE_MASTER => 'master')`
Static

see |

## Instance for the SNMP object

    $_snmp

### Default

`null`

### Constants

## OID_STP_X_RSTP_PORT_ROLE

    OID_STP_X_RSTP_PORT_ROLE = '.1.3.6.1.4.1.9.9.82.1.12.2.1.3'

## Constant for possible value of STP extensions RSTP Port Role

    STP_X_RSTP_PORT_ROLE_ALTERNATE = 4

see |

## Constant for possible value of STP extensions RSTP Port Role

    STP_X_RSTP_PORT_ROLE_BACKUP = 5

see |

## Constant for possible value of STP extensions RSTP Port Role

    STP_X_RSTP_PORT_ROLE_BOUNDARY = 6

see |

## Constant for possible value of STP extensions RSTP Port Role

    STP_X_RSTP_PORT_ROLE_DESIGNATED = 3

see |

## Constant for possible value of STP extensions RSTP Port Role

    STP_X_RSTP_PORT_ROLE_DISABLED = 1

see |

## Constant for possible value of STP extensions RSTP Port Role

    STP_X_RSTP_PORT_ROLE_MASTER = 6

see |

## Constant for possible value of STP extensions RSTP Port Role

    STP_X_RSTP_PORT_ROLE_ROOT = 2

see |