SNMP::getErrno
(PHP 5 >= 5.4.0)
SNMP::getErrno — Get last error code
Description
public int SNMP::getErrno
( void
)
Returns error code from last SNMP request.
Return Values
Returns one of SNMP error code values described in constants chapter.
Examples
Example #1 SNMP::getErrno() example
<?php
$session = new SNMP(SNMP::VERSION_2c, '127.0.0.1', 'boguscommunity');
var_dump(@$session->get('.1.3.6.1.2.1.1.1.0'));
var_dump($session->getErrno() == SNMP::ERRNO_TIMEOUT);
?>
The above example will output:
bool(false) bool(true)
See Also
- SNMP::getError() - Get last error message
- Функция SNMP::close() - Close SNMP session
- Функция SNMP::__construct() - Creates SNMP instance representing session to remote SNMP agent
- Функция SNMP::get() - Fetch an SNMP object
- Функция SNMP::getErrno() - Get last error code
- Функция SNMP::getError() - Get last error message
- SNMP::getnext
- Функция SNMP::set() - Set the value of an SNMP object
- Функция SNMP::setSecurity() - Configures security-related SNMPv3 session parameters
- Функция SNMP::walk() - Fetch SNMP object subtree
Коментарии
404 Not Found