A class for performing SNMP V2 queries on generic devices

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

 Methods

Returns the system contact of the device

contact() : string

Returns

stringThe system contact of the device

Returns the system description of the device

description() : string

Returns

stringThe system description of the device

Gets all system values as an associate array

getAll() : array

The keys of the array are contact, description, location, name, services, uptime

Returns

arrayAll system values as an associate array

Returns the system location of the device

location() : string

Returns

stringThe system location of the device

Returns the system name of the device

name() : string

Returns

stringThe system name of the device

Returns the system services of the device

services() : string

"A value which indicates the set of services that this entity primarily offers.

The value is a sum. This sum initially takes the value zero, Then, for each layer, L, in the range 1 through 7, that this node performs transactions for, 2 raised to (L - 1) is added to the sum. For example, a node which performs primarily routing functions would have a value of 4 (2^(3-1)). In contrast, a node which is a host offering application services would have a value of 72 (2^(4-1) + 2^(7-1)). Note that in the context of the Internet suite of protocols, values should be calculated accordingly:

layer  functionality
    1  physical (e.g., repeaters)
    2  datalink/subnetwork (e.g., bridges)
    3  internet (e.g., IP gateways)
    4  end-to-end  (e.g., IP hosts)
    7  applications (e.g., mail relays)

For systems including OSI protocols, layers 5 and 6 may also be counted."

Returns

stringThe system services of the device

Returns the system uptime of the device

uptime() : int

"The time (in hundredths of a second) since the network management portion of the system was last re-initialized."

Returns

intThe system uptime of the device (in timeticks)

 Constants

 

OID_SYSTEM_CONTACT

OID_SYSTEM_CONTACT 

 

OID_SYSTEM_DESCRIPTION

OID_SYSTEM_DESCRIPTION 

 

OID_SYSTEM_LOCATION

OID_SYSTEM_LOCATION 

 

OID_SYSTEM_NAME

OID_SYSTEM_NAME 

 

OID_SYSTEM_SERVICES

OID_SYSTEM_SERVICES 

 

OID_SYSTEM_UPTIME

OID_SYSTEM_UPTIME