<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.snmp-set-enum-print" xmlns="http://docbook.org/ns/docbook">
 <refnamediv>
  <refname>snmp_set_enum_print</refname>
  <refpurpose>
   Return all values that are enums with their enum value instead of the raw integer
  </refpurpose>
 </refnamediv>
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>true</type><methodname>snmp_set_enum_print</methodname>
   <methodparam><type>bool</type><parameter>enable</parameter></methodparam>
  </methodsynopsis>
  <para>
   This function toggles if snmpwalk/snmpget etc. should automatically lookup enum values
   in the MIB and return them together with their human readable string. 
  </para>
 </refsect1>
 
 <refsect1 role="parameters">
  &reftitle.parameters;
  <variablelist>
   <varlistentry>
    <term><parameter>enable</parameter></term>
    <listitem>
     <para>
      As the value is interpreted as boolean by the Net-SNMP library, it can only be "0" or "1".
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   &return.true.always;
  </para>
 </refsect1>

 <refsect1 role="changelog">
  &reftitle.changelog;
  <para>
   <informaltable>
    <tgroup cols="2">
     <thead>
      <row>
       <entry>&Version;</entry>
       <entry>&Description;</entry>
      </row>
     </thead>
     <tbody>
      &return.type.true;
     </tbody>
    </tgroup>
   </informaltable>
  </para>
 </refsect1>

 <refsect1 role="examples">
  &reftitle.examples;
  <para>
   <example>
    <title>Using <function>snmp_set_enum_print</function></title>
    <programlisting role="php">
<![CDATA[
<?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";
?>
]]>
    </programlisting>
   </example>
  </para>
  <para>
   The above  would return
<![CDATA[      
 INTEGER: up(1)
 INTEGER: 1
]]>
  </para>
 </refsect1>
 
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
