snmp_set_enum_print

(PHP 4 >= 4.3.0, PHP 5, PHP 7)

snmp_set_enum_print Return all values that are enums with their enum value instead of the raw integer

说明

snmp_set_enum_print ( int $enum_print ) : bool

This function toggles if snmpwalk/snmpget etc. should automatically lookup enum values in the MIB and return them together with their human readable string.

参数

enum_print

As the value is interpreted as boolean by the Net-SNMP library, it can only be "0" or "1".

范例

Example #1 Using snmp_set_enum_print()

<?php
 snmp_set_enum_print
(0);
 echo 
snmpget('localhost''public''IF-MIB::ifOperStatus.3') . "\n";
 
snmp_set_enum_print(1);
 echo 
snmpget('localhost''public''IF-MIB::ifOperStatus.3') . "\n";
?>

The above would return

      
 INTEGER: up(1)
 INTEGER: 1

注释

Note:

snmp_set_enum_print() is only available when using the UCD SNMP library. This function is not available when using the Windows SNMP library.

相关文章
php sequence updates all values by applying a callback function to each valuephp vector updates all values by applying a callback function to each valuephp apd 函数 return all persistent resources as an arrayphp cubrid mysql 兼容性函数 return the associative array that corresponds to the fetched rowphp cubrid mysql 兼容性函数 return an array with the lengths of the values of each field from the current rowphp gupnp 函数 sets the specified action return valuesphp informix 函数 sets the default return value on a fetch rowphp imap 函数 returns all of the imap errors that have occurredphp variable handling 函数 verify that the contents of a variable is an iterable valuephp msession 函数 find all sessions with name and valuephp runkit 函数 determines if the current functions return value will be usedphp snmp 函数 return the method how the snmp values will be returnedphp snmp 函数 return all values that are enums with their enum value instead of the raw integerphp snmp 函数 specify the method how the snmp values will be returnedphp snmp 函数 return all objects including their respective object id within the specified onephp snmp 函数 set the value of an snmp objectphp snmp 函数 return all objects including their respective object id within the specified onephp sqlite 函数 execute a query that does not prefetch and buffer all dataphp uopz 函数 gets a previous set return value for a functionphp uopz 函数 unsets a previously set return value for a function
关注编程学问公众号