Php/docs/function.snmp3-getnext

提供:Dev Guides
< Php
移動先:案内検索

snmp3_getnext

(PHP 5, PHP 7)

snmp3_getnext指定したオブジェクト ID に続く SNMP オブジェクトを取得する


説明

snmp3_getnext ( string $host , string $sec_name , string $sec_level , string $auth_protocol , string $auth_passphrase , string $priv_protocol , string $priv_passphrase , string $object_id [, int $timeout = 1000000 [, int $retries = 5 ]] ) : string

snmp3_getnext() 関数は、 object_id で指定したオブジェクトに続く SNMP オブジェクトの値を取得します。


パラメータ

host
SNMP エージェント (サーバー) のホスト名。
sec_name
セキュリティ名。通常はユーザー名のようなもの。
sec_level
セキュリティレベル (noAuthNoPriv|authNoPriv|authPriv)。
auth_protocol
認証プロトコル (MD5 あるいは SHA)。
auth_passphrase
認証パスフレーズ。
priv_protocol
プライバシープロトコル (DES あるいは AES)。
priv_passphrase
プライバシーパスフレーズ。
object_id
SNMP オブジェクト ID。
timeout
最初のタイムアウトまでのマイクロ秒数。
retries
タイムアウト発生時の再試行回数。


返り値

成功した場合に SNMP オブジェクトの値、エラー時に false を返します。 エラー時には E_WARNING が発生します。


例1 snmp3_getnext() の使用法

<?php$nameOfSecondInterface = snmp3_getnext('localhost', 'james', 'authPriv', 'SHA', 'secret007', 'AES', 'secret007', 'IF-MIB::ifName.1');?>

参考

  • snmp3_get() - SNMP オブジェクトを取得する
  • snmp3_walk() - すべての SNMP オブジェクトをエージェントから取得する