Рекурсивный акроним словосочетания «PHP: Hypertext Preprocessor»
Добро пожаловать на форум PHP программистов!
SNMP::setSecurity - Configures security-related SNMPv3 session parameters
Вернуться к: SNMP
SNMP::setSecurity
(PHP 5 >= 5.4.0, PHP 7)
SNMP::setSecurity — Configures security-related SNMPv3 session parameters
Описание
public bool SNMP::setSecurity
( string
$sec_level
[, string $auth_protocol =
[, string $auth_passphrase =
[, string $priv_protocol =
[, string $priv_passphrase =
[, string $contextName =
[, string $contextEngineID =
]]]]]] )setSecurity configures security-related session parameters used in SNMP protocol version 3
Список параметров
-
sec_level -
the security level (noAuthNoPriv|authNoPriv|authPriv)
-
auth_protocol -
the authentication protocol (MD5 or SHA)
-
auth_passphrase -
the authentication pass phrase
-
priv_protocol -
the privacy protocol (DES or AES)
-
priv_passphrase -
the privacy pass phrase
-
contextName -
the context name
-
contextEngineID -
the context EngineID
Возвращаемые значения
Возвращает TRUE в случае успешного завершения или FALSE в случае возникновения ошибки.
Примеры
Пример #1 SNMP::setSecurity() example
<?php
$session = new SNMP(SNMP::VERSION_3, $hostname, $rwuser, $timeout, $retries);
$session->setSecurity('authPriv', 'MD5', $auth_pass, 'AES', $priv_pass, '', 'aeeeff');
?>
Смотрите также
- SNMP::__construct() - Creates SNMP instance representing session to remote SNMP agent
Вернуться к: SNMP