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 deque updates all values by applying a callback function to each valuephp map updates all values by applying a callback function to each valuephp cubrid mysql 兼容性函数 return the numerical value of the error message from previous cubrid operationphp cubrid mysql 兼容性函数 return an array with the list of all existing cubrid databasesphp cubrid mysql 兼容性函数 return the value of a specific field in a specific rowphp gnupg 函数 returns an array with information about all keys that matches the given patternphp firebird/interbase 函数 return the number of rows that were affected by the previous queryphp ingres 函数 get the return value from a procedure callphp ldap 函数 get all binary values from a result entryphp ldap 函数 get all values from a result entryphp 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 函数 return all objects including their respective object id within the specified onephp snmp 函数 return all objects including their respective object id within the specified onephp snmp 函数 set the value of an snmp objectphp snmp 函数 fetch all the snmp objects from an agentphp svn 函数 deletes a file or a directory return true if all is ok false otherwisephp uopz 函数 provide a return value for an existing functionphp hyperwave api 函数 returns all values of the attributephp sdo das relational 函数 executes an sql query passed as a prepared statement with a list of values to substitute for placeholders and return the results as a normalised data graph
关注编程学问公众号