<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.snmp.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'function.snmp3-real-walk.php',
    1 => 'snmp3_real_walk',
    2 => 'Return all objects including their respective object ID within the specified one',
  ),
  'up' => 
  array (
    0 => 'ref.snmp.php',
    1 => 'SNMP 函数',
  ),
  'prev' => 
  array (
    0 => 'function.snmp3-getnext.php',
    1 => 'snmp3_getnext',
  ),
  'next' => 
  array (
    0 => 'function.snmp3-set.php',
    1 => 'snmp3_set',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/snmp/functions/snmp3-real-walk.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.snmp3-real-walk" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">snmp3_real_walk</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">snmp3_real_walk</span> &mdash; <span class="dc-title">Return all objects including their respective object ID within the specified one</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.snmp3-real-walk-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>snmp3_real_walk</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$hostname</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$security_name</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$security_level</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$auth_protocol</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$auth_passphrase</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$privacy_protocol</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$privacy_passphrase</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><span class="type"><a href="language.types.array.php" class="type array">array</a></span>|<span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$object_id</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$timeout</code><span class="initializer"> = -1</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$retries</code><span class="initializer"> = -1</span></span><br>): <span class="type"><span class="type"><a href="language.types.array.php" class="type array">array</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="simpara">
   The
   <span class="function"><strong>snmp3_real_walk()</strong></span> function is used to traverse over a number
   of
   <abbr title="Simple Network Management Protocol">SNMP</abbr> objects starting from
   <code class="parameter">object_id</code>
   and return not only their values but also their object ids.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.snmp3-real-walk-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt>
     <code class="parameter">hostname</code>
    </dt>
    <dd>
     <span class="simpara">
      The hostname of the
      <abbr title="Simple Network Management Protocol">SNMP</abbr> agent (server).
     </span>
    </dd>
   
   
    <dt>
     <code class="parameter">security_name</code>
    </dt>
    <dd>
     <span class="simpara">
      the security name, usually some kind of username
     </span>
    </dd>
   
   
    <dt>
     <code class="parameter">security_level</code>
    </dt>
    <dd>
     <span class="simpara">
      the security level (noAuthNoPriv|authNoPriv|authPriv)
     </span>
    </dd>
   
   
    <dt>
     <code class="parameter">auth_protocol</code>
    </dt>
    <dd>
     <span class="simpara">
      the authentication protocol (MD5 or SHA)
     </span>
    </dd>
   
   
    <dt>
     <code class="parameter">auth_passphrase</code>
    </dt>
    <dd>
     <span class="simpara">
      the authentication pass phrase
     </span>
    </dd>
   
   
    <dt>
     <code class="parameter">privacy_protocol</code>
    </dt>
    <dd>
     <span class="simpara">
      the authentication protocol (<code class="literal">&quot;MD5&quot;</code>, <code class="literal">&quot;SHA&quot;</code>,
      <code class="literal">&quot;SHA256&quot;</code>, or <code class="literal">&quot;SHA512&quot;</code>)
     </span>
    </dd>
   
   
    <dt>
     <code class="parameter">privacy_passphrase</code>
    </dt>
    <dd>
     <span class="simpara">
      the privacy pass phrase
     </span>
    </dd>
   
   
    <dt>
     <code class="parameter">object_id</code>
    </dt>
    <dd>
     <span class="simpara">
      The <abbr title="Simple Network Management Protocol">SNMP</abbr> object id.
     </span>
    </dd>
   
   
    <dt>
     <code class="parameter">timeout</code>
    </dt>
    <dd>
     <span class="simpara">
      The number of microseconds until the first timeout.
     </span>
    </dd>
   
   
    <dt>
     <code class="parameter">retries</code>
    </dt>
    <dd>
     <span class="simpara">
      The number of times to retry if timeouts occur.
     </span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.snmp3-real-walk-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="simpara">
   Returns an associative array of the
   <abbr title="Simple Network Management Protocol">SNMP</abbr> object ids and their values on success or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> on error.
   In case of an error, an E_WARNING message is shown.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.snmp3-real-walk-changelog">
  <h3 class="title">更新日志</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>版本</th>
      <th>说明</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.1.0</td>
      <td>
       The <code class="parameter">auth_protocol</code> now accepts <code class="literal">&quot;SHA256&quot;</code>
       and <code class="literal">&quot;SHA512&quot;</code> when supported by libnetsnmp.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.snmp3-real-walk-examples">
  <h3 class="title">示例</h3>
  <div class="example" id="example-1">
   <p><strong>示例 #1 Using
    <span class="function"><strong>snmp3_real_walk()</strong></span>
   </strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /> var_export</span><span style="color: #007700">(</span><span style="color: #0000BB">snmp3_real_walk</span><span style="color: #007700">(</span><span style="color: #DD0000">'localhost'</span><span style="color: #007700">, </span><span style="color: #DD0000">'james'</span><span style="color: #007700">, </span><span style="color: #DD0000">'authPriv'</span><span style="color: #007700">, </span><span style="color: #DD0000">'SHA'</span><span style="color: #007700">, </span><span style="color: #DD0000">'secret007'</span><span style="color: #007700">, </span><span style="color: #DD0000">'AES'</span><span style="color: #007700">, </span><span style="color: #DD0000">'secret007'</span><span style="color: #007700">, </span><span style="color: #DD0000">'IF-MIB::ifName'</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>


   <div class="example-contents"><p>
    The above will output something like:
<div class="examplescode"><pre class="examplescode">array (
  &#039;IF-MIB::ifName.1&#039; =&gt; &#039;STRING: lo&#039;,
  &#039;IF-MIB::ifName.2&#039; =&gt; &#039;STRING: eth0&#039;,
  &#039;IF-MIB::ifName.3&#039; =&gt; &#039;STRING: eth2&#039;,
  &#039;IF-MIB::ifName.4&#039; =&gt; &#039;STRING: sit0&#039;,
  &#039;IF-MIB::ifName.5&#039; =&gt; &#039;STRING: sixxs&#039;,
)</pre>
</div>
   </p></div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.snmp3-real-walk-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li>
    <span class="function"><a href="function.snmpwalk.php" class="function" rel="rdfs-seeAlso">snmpwalk()</a> - 从代理获取所有 SNMP 对象</span>
   </li>
  </ul>
 </div>


</div><?php manual_footer($setup); ?>