downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

SNMP::walk> <SNMP::set
[edit] Last updated: Fri, 25 May 2012

view this page in

SNMP::setSecurity

(PHP 5 >= 5.4.0)

SNMP::setSecurityセキュリティ関連の SNMPv3 セッションパラメータを設定する

説明

bool SNMP::setSecurity ( string $sec_level [, string $auth_protocol = [, string $auth_passphrase = [, string $priv_protocol = [, string $priv_passphrase = [, string $contextName = [, string $contextEngineID = ]]]]]] )

setSecurity は、 SNMP プロトコルバージョン 3 で使うセキュリティ関連のセッションパラメータを設定します。

パラメータ

sec_level

セキュリティレベル (noAuthNoPriv|authNoPriv|authPriv)。

auth_protocol

認証プロトコル (MD5 あるいは SHA)。

auth_passphrase

認証パスフレーズ。

priv_protocol

プライバシープロトコル (DES あるいは AES)。

priv_passphrase

プライバシーパスフレーズ。

contextName

コンテキスト名。

contextEngineID

コンテキスト EngineID。

返り値

成功した場合に TRUE を、失敗した場合に FALSE を返します。

例1 SNMP::setSecurity() の例

<?php
  $session 
= new SNMP(SNMP::VERSION_3$hostname$rwuser$timeout$retries);
  
$session->setSecurity('authPriv''MD5'$auth_pass'AES'$priv_pass'''aeeeff');
?>

参考

  • SNMP::__construct() - リモート SNMP エージェントへのセッションを表す SNMP インスタンスを作成する


add a note add a note User Contributed Notes SNMP::setSecurity
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites