snmp3_get
(PHP 4, PHP 5, PHP 7)
snmp3_get — SNMP オブジェクトを取得する
説明
snmp3_get
( 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_get() 関数は、
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
を返します。
例
例1 snmp3_get() の使用法
<?php$nameOfSecondInterface = snmp3_get('localhost', 'james', 'authPriv', 'SHA', 'secret007', 'AES', 'secret007', 'IF-MIB::ifName.2');?>