mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 22:06:57 +08:00
203 lines
6.4 KiB
HTML
203 lines
6.4 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
<title>Fetch an SNMP object</title>
|
|
</head>
|
|
<body class="docs"><div id="layout">
|
|
<div id="layout-content"><div id="function.snmp3-get" class="refentry">
|
|
<div class="refnamediv">
|
|
<h1 class="refname">snmp3_get</h1>
|
|
<p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">snmp3_get</span> — <span class="dc-title">Fetch an <acronym title="Simple Network Management Protocol">SNMP</acronym> object</span></p>
|
|
|
|
</div>
|
|
|
|
<div class="refsect1 description" id="refsect1-function.snmp3-get-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>snmp3_get</strong></span>
|
|
( <span class="methodparam"><span class="type">string</span> <code class="parameter">$host</code></span>
|
|
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$sec_name</code></span>
|
|
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$sec_level</code></span>
|
|
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$auth_protocol</code></span>
|
|
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$auth_passphrase</code></span>
|
|
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$priv_protocol</code></span>
|
|
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$priv_passphrase</code></span>
|
|
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$object_id</code></span>
|
|
[, <span class="methodparam"><span class="type">int</span> <code class="parameter">$timeout</code><span class="initializer"> = 1000000</span></span>
|
|
[, <span class="methodparam"><span class="type">int</span> <code class="parameter">$retries</code><span class="initializer"> = 5</span></span>
|
|
]] ) : <span class="type">string</span></div>
|
|
|
|
<p class="para rdfs-comment">
|
|
The <span class="function"><strong>snmp3_get()</strong></span> function is used to read the
|
|
value of an <acronym title="Simple Network Management Protocol">SNMP</acronym> object specified by the
|
|
<code class="parameter">object_id</code>.
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 parameters" id="refsect1-function.snmp3-get-parameters">
|
|
<h3 class="title">参数</h3>
|
|
<dl>
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">host</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
The hostname of the <acronym title="Simple Network Management Protocol">SNMP</acronym> agent (server).
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">sec_name</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
the security name, usually some kind of username
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">sec_level</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
the security level (noAuthNoPriv|authNoPriv|authPriv)
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">auth_protocol</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
the authentication protocol (MD5 or SHA)
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">auth_passphrase</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
the authentication pass phrase
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">priv_protocol</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
the privacy protocol (DES or AES)
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">priv_passphrase</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
the privacy pass phrase
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">object_id</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
The <acronym title="Simple Network Management Protocol">SNMP</acronym> object id.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">timeout</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
The number of microseconds until the first timeout.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">retries</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
The number of times to retry if timeouts occur.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.snmp3-get-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
Returns <acronym title="Simple Network Management Protocol">SNMP</acronym> object value on success or <strong><code>FALSE</code></strong> on error.
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 examples" id="refsect1-function.snmp3-get-examples">
|
|
<h3 class="title">范例</h3>
|
|
<p class="para">
|
|
<div class="example" id="example-5570">
|
|
<p><strong>Example #1 Using <span class="function"><strong>snmp3_get()</strong></span></strong></p>
|
|
<div class="example-contents">
|
|
<div class="phpcode"><pre><span style="color: #000000">
|
|
<span style="color: #0000BB"><?php<br />$nameOfSecondInterface </span><span style="color: #007700">= </span><span style="color: #0000BB">snmp3_get</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.2'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?></span>
|
|
</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</div>
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 seealso" id="refsect1-function.snmp3-get-seealso">
|
|
<h3 class="title">参见</h3>
|
|
<p class="para">
|
|
<ul class="simplelist">
|
|
<li class="member"><span class="function"><a href="snmp3_set.html" class="function" rel="rdfs-seeAlso">snmp3_set()</a> - Set the value of an SNMP object</span></li>
|
|
</ul>
|
|
</p>
|
|
</div>
|
|
|
|
|
|
</div></div></div></body></html> |