PHP SNMP Functions

EditRocket provides the following information on SNMP functions in the PHP source code builder.

bool snmp_get_quick_print ( void ) - Returns the current value stored in the UCD Library for quick_print. quick_print is off by default.

int snmp_get_valueretrieval ( void ) -

bool snmp_read_mib ( string $filename ) -

void snmp_set_enum_print ( int $enum_print ) -

void snmp_set_oid_numeric_print ( int $oid_numeric_print ) -

void snmp_set_oid_output_format ( int $oid_format ) - snmp_set_oid_output_format() sets the output format to be full or numeric.

void snmp_set_quick_print ( bool $quick_print ) - Sets the value of quick_print within the UCD SNMP library. When this is set (1), the SNMP library will return 'quick printed' values. This means that just the value will be printed. When quick_print is not enabled (default) the UCD SNMP library prints extra information including the type of the value (i.e. IpAddress or OID). Additionally, if quick_print is not enabled, the library prints additional hex values for all strings of three characters or less.

void snmp_set_valueretrieval ( int $method ) -

string snmpget ( string $hostname , string $community , string $object_id [, int $timeout [, int $retries ]] ) - The snmpget() function is used to read the value of an SNMP object specified by the object_id.

string snmpgetnext ( string $host , string $community , string $object_id [, int $timeout [, int $retries ]] ) -

array snmprealwalk ( string $host , string $community , string $object_id [, int $timeout [, int $retries ]] ) -

bool snmpset ( string $hostname , string $community , string $object_id , string $type , mixed $value [, int $timeout [, int $retries ]] ) - snmpset() is used to set the value of an SNMP object specified by the object_id.

array snmpwalk ( string $hostname , string $community , string $object_id [, int $timeout [, int $retries ]] ) - snmpwalk() function is used to read all the values from an SNMP agent specified by the hostname.

array snmpwalkoid ( string $hostname , string $community , string $object_id [, int $timeout [, int $retries ]] ) - snmpwalkoid() function is used to read all object ids and their respective values from an SNMP agent specified by hostname.