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 cubrid mysql 兼容性函数 return the numerical value of the error message from previous cubrid operationphp cubrid mysql 兼容性函数 return a numerical array with the values of the current rowphp cubrid mysql 兼容性函数 return an array with the list of all existing cubrid databasesphp 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 imap 函数 returns all imap alert messages that have occurredphp variable handling 函数 verify that the contents of a variable is a countable valuephp ldap 函数 get all binary values from a result entryphp ldap 函数 get all values from a result entryphp radius 函数 converts raw data to integerphp 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 spl 函数 return the integer object handle for given objectphp svn 函数 deletes a file or a directory return true if all is ok false otherwisephp hyperwave api 函数 returns all values of the attribute
关注编程学问公众号