SNMP::setSecurity
(PHP 5 >= 5.4.0, PHP 7, PHP 8)
SNMP::setSecurity — Configures security-related SNMPv3 session parameters
Beschreibung
string
$securityLevel,string
$authProtocol = "",string
$authPassphrase = "",string
$privacyProtocol = "",string
$privacyPassphrase = "",string
$contextName = "",string
$contextEngineId = ""): bool
setSecurity configures security-related session parameters used in SNMP protocol version 3
Parameter-Liste
-
securityLevel -
the security level (noAuthNoPriv|authNoPriv|authPriv)
-
authProtocol -
the authentication protocol (MD5 or SHA)
-
authPassphrase -
the authentication pass phrase
-
privacyProtocol -
the privacy protocol (DES or AES)
-
privacyPassphrase -
the privacy pass phrase
-
contextName -
the context name
-
contextEngineId -
the context EngineID
Rückgabewerte
Gibt bei Erfolg true zurück. Bei einem Fehler wird false zurückgegeben.
Beispiele
Beispiel #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');
?>
Siehe auch
- SNMP::__construct() - Creates SNMP instance representing session to remote SNMP agent

