*
SNMP_VALUE_LIBRARY
The return values will be as returned by the Net-SNMP library.
*
SNMP_VALUE_PLAIN
The return values will be the plain value without the SNMP type hint.
*
SNMP_VALUE_OBJECT
The return values will be objects with the properties "value" and "type", where the latter is one of the SNMP_OCTET_STR, SNMP_COUNTER etc. constants. The way "value" is returned is based on which one of SNMP_VALUE_LIBRARY, SNMP_VALUE_PLAIN is set
*
* @link https://secure.php.net/manual/en/class.snmp.php#snmp.props.max-oids */ public $valueretrieval; /** * @var bool Value of quick_print within the NET-SNMP library *

Sets the value of quick_print within the NET-SNMP library. When this is set (1), the SNMP library will return 'quick printed' values. This means that just the value will be printed. When quick_print is not enabled (default) the UCD SNMP library prints extra information including the type of the value (i.e. IpAddress or OID). Additionally, if quick_print is not enabled, the library prints additional hex values for all strings of three characters or less. * @link https://secure.php.net/manual/en/class.snmp.php#snmp.props.quick-print */ public $quick_print; /** * @var bool Controls the way enum values are printed *

Parameter toggles if walk/get etc. should automatically lookup enum values in the MIB and return them together with their human readable string. * @link https://secure.php.net/manual/en/class.snmp.php#snmp.props.enum-print */ public $enum_print; /** * @var int Controls OID output format *

OID .1.3.6.1.2.1.1.3.0 representation for various oid_output_format values *

*
SNMP_OID_OUTPUT_FULL
.iso.org.dod.internet.mgmt.mib-2.system.sysUpTime.sysUpTimeInstance
*
SNMP_OID_OUTPUT_NUMERIC
.1.3.6.1.2.1.1.3.0
*
SNMP_OID_OUTPUT_MODULE
DISMAN-EVENT-MIB::sysUpTimeInstance
*
SNMP_OID_OUTPUT_SUFFIX
sysUpTimeInstance
*
SNMP_OID_OUTPUT_UCD
system.sysUpTime.sysUpTimeInstance
*
SNMP_OID_OUTPUT_NONE
Undefined
*
* @link https://secure.php.net/manual/en/class.snmp.php#snmp.props.oid-output-format */ public $oid_output_format; /** * @var bool Controls disabling check for increasing OID while walking OID tree *

Some SNMP agents are known for returning OIDs out of order but can complete the walk anyway. Other agents return OIDs that are out of order and can cause SNMP::walk() to loop indefinitely until memory limit will be reached. PHP SNMP library by default performs OID increasing check and stops walking on OID tree when it detects possible loop with issuing warning about non-increasing OID faced. Set oid_increasing_check to FALSE to disable this check. * @link https://secure.php.net/manual/en/class.snmp.php#snmp.props.oid-increasing-check */ public $oid_increasing_check; /** * @var int Controls which failures will raise SNMPException instead of warning. Use bitwise OR'ed SNMP::ERRNO_* constants. By default all SNMP exceptions are disabled. * @link https://secure.php.net/manual/en/class.snmp.php#snmp.props.exceptions-enabled */ public $exceptions_enabled; /** * @var array Read-only property with remote agent configuration: hostname, port, default timeout, default retries count * @link https://secure.php.net/manual/en/class.snmp.php#snmp.props.info */ public $info; public const VERSION_1 = 0; public const VERSION_2c = 1; public const VERSION_2C = 1; public const VERSION_3 = 3; public const ERRNO_NOERROR = 0; public const ERRNO_ANY = 126; public const ERRNO_GENERIC = 2; public const ERRNO_TIMEOUT = 4; public const ERRNO_ERROR_IN_REPLY = 8; public const ERRNO_OID_NOT_INCREASING = 16; public const ERRNO_OID_PARSING_ERROR = 32; public const ERRNO_MULTIPLE_SET_QUERIES = 64; /** * Creates SNMP instance representing session to remote SNMP agent * @link https://php.net/manual/en/snmp.construct.php * @param int $version

SNMP protocol version: * SNMP::VERSION_1, * SNMP::VERSION_2C, * SNMP::VERSION_3.

* @param string $hostname The SNMP agent. hostname may be suffixed with * optional SNMP agent port after colon. IPv6 addresses must be enclosed in square * brackets if used with port. If FQDN is used for hostname * it will be resolved by php-snmp library, not by Net-SNMP engine. Usage * of IPv6 addresses when specifying FQDN may be forced by enclosing FQDN * into square brackets. Here it is some examples: * * * * * * * * * * * *
IPv4 with default port127.0.0.1
IPv6 with default port::1 or [::1]
IPv4 with specific port127.0.0.1:1161
IPv6 with specific port[::1]:1161
FQDN with default porthost.domain
FQDN with specific porthost.domain:1161
FQDN with default port, force usage of IPv6 address[host.domain]
FQDN with specific port, force usage of IPv6 address[host.domain]:1161
* @param string $community

The purpuse of community is * SNMP version specific:

* * * * * * *
SNMP::VERSION_1SNMP community
SNMP::VERSION_2CSNMP community
SNMP::VERSION_3SNMPv3 securityName
* @param int $timeout [optional] The number of microseconds until the first timeout. * @param int $retries [optional] The number of retries in case timeout occurs. * @since 5.4 */ public function __construct($version, $hostname, $community, $timeout = 1000000, $retries = 5) {} /** * Close SNMP session * @link https://php.net/manual/en/snmp.close.php * @return bool TRUE on success or FALSE on failure. * @since 5.4 */ public function close() {} /** * Configures security-related SNMPv3 session parameters * @link https://php.net/manual/en/snmp.setsecurity.php * @param string $sec_level the security level (noAuthNoPriv|authNoPriv|authPriv) * @param string $auth_protocol [optional] the authentication protocol (MD5 or SHA) * @param string $auth_passphrase [optional] the authentication pass phrase * @param string $priv_protocol [optional] the privacy protocol (DES or AES) * @param string $priv_passphrase [optional] the privacy pass phrase * @param string $contextName [optional] the context name * @param string $contextEngineID [optional] the context EngineID * @return bool TRUE on success or FALSE on failure. * @since 5.4 */ public function setSecurity($sec_level, $auth_protocol, $auth_passphrase, $priv_protocol, $priv_passphrase, $contextName, $contextEngineID) {} /** * Fetch an SNMP object * @link https://php.net/manual/en/snmp.get.php * @param mixed $object_id The SNMP object (OID) or objects * @param bool $preserve_keys [optional] When object_id is a array and preserve_keys set to TRUE keys in results will be taken exactly as in object_id, otherwise SNMP::oid_output_format property is used to determinate the form of keys. * @return mixed SNMP objects requested as string or array * depending on object_id type or FALSE on error. * @since 5.4 */ public function get($object_id, $preserve_keys = false) {} /** * Fetch an SNMP object which * follows the given object id * @link https://php.net/manual/en/snmp.getnext.php * @param mixed $object_id

* The SNMP object (OID) or objects *

* @return mixed SNMP objects requested as string or array * depending on object_id type or FALSE on error. * @since 5.4 */ public function getnext($object_id) {} /** * Fetch SNMP object subtree * @link https://php.net/manual/en/snmp.walk.php * @param string $object_id

Root of subtree to be fetched

* @param bool $suffix_as_keys [optional]

By default full OID notation is used for keys in output array. If set to TRUE subtree prefix will be removed from keys leaving only suffix of object_id.

* @param int $max_repetitions [optional]

This specifies the maximum number of iterations over the repeating variables. The default is to use this value from SNMP object.

* @param int $non_repeaters [optional]

This specifies the number of supplied variables that should not be iterated over. The default is to use this value from SNMP object.

* @return array|false associative array of the SNMP object ids and their values on success or FALSE on error. * When a SNMP error occures SNMP::getErrno and * SNMP::getError can be used for retrieving error * number (specific to SNMP extension, see class constants) and error message * respectively. * @since 5.4 */ public function walk($object_id, $suffix_as_keys = false, $max_repetitions, $non_repeaters) {} /** * Set the value of an SNMP object * @link https://php.net/manual/en/snmp.set.php * @param string $object_id

The SNMP object id

* @since 5.4 * *

When count of OIDs in object_id array is greater than * max_oids object property set method will have to use multiple queries * to perform requested value updates. In this case type and value checks * are made per-chunk so second or subsequent requests may fail due to * wrong type or value for OID requested. To mark this a warning is * raised when count of OIDs in object_id array is greater than max_oids. * When count of OIDs in object_id array is greater than max_oids object property set method will have to use multiple queries to perform requested value updates. In this case type and value checks are made per-chunk so second or subsequent requests may fail due to wrong type or value for OID requested. To mark this a warning is raised when count of OIDs in object_id array is greater than max_oids.

* @param mixed $type

The MIB defines the type of each object id. It has to be specified as a single character from the below list.

* types: * * * * * * * * * * * * * * *
=The type is taken from the MIB
iINTEGER
uINTEGER
sSTRING
xHEX STRING
dDECIMAL STRING
nNULLOBJ
oOBJID
tTIMETICKS
aIPADDRESS
bBITS
*

* If OPAQUE_SPECIAL_TYPES was defined while compiling the SNMP library, the following are also valid: *

* types: * * * * * * * *
Uunsigned int64
Isigned int64
Ffloat
Ddouble
*

* Most of these will use the obvious corresponding ASN.1 type. 's', 'x', 'd' and 'b' are all different ways of specifying an OCTET STRING value, and * the 'u' unsigned type is also used for handling Gauge32 values. *

* *

* If the MIB-Files are loaded by into the MIB Tree with "snmp_read_mib" or by specifying it in the libsnmp config, '=' may be used as * the type parameter for all object ids as the type can then be automatically read from the MIB. *

* *

* Note that there are two ways to set a variable of the type BITS like e.g. * "SYNTAX BITS {telnet(0), ftp(1), http(2), icmp(3), snmp(4), ssh(5), https(6)}": *

* *

* See examples section for more details. *

* @param mixed $value

* The new value.

* @return bool TRUE on success or FALSE on failure. */ public function set($object_id, $type, $value) {} /** * Get last error code * @link https://php.net/manual/en/snmp.geterrno.php * @return int one of SNMP error code values described in constants chapter. * @since 5.4 */ public function getErrno() {} /** * Get last error message * @link https://php.net/manual/en/snmp.geterror.php * @return string String describing error from last SNMP request. * @since 5.4 */ public function getError() {} } /** * Represents an error raised by SNMP. You should not throw a * SNMPException from your own code. * See Exceptions for more * information about Exceptions in PHP. * @link https://php.net/manual/en/class.snmpexception.php */ class SNMPException extends RuntimeException { /** * @var string Textual error message. Exception::getMessage() to access it. */ protected $message; /** * @var string SNMP library error code. Use Exception::getCode() to access it. */ protected $code; } /** * Fetch an SNMP object * @link https://php.net/manual/en/function.snmpget.php * @param string $hostname

* The SNMP agent. *

* @param string $community

* The read community. *

* @param string $object_id

* The SNMP object. *

* @param int $timeout [optional]

* The number of microseconds until the first timeout. *

* @param int $retries [optional]

* The number of times to retry if timeouts occur. *

* @return string|false SNMP object value on success or FALSE on error. */ function snmpget($hostname, $community, $object_id, $timeout = 1000000, $retries = 5) {} /** * Fetch the SNMP object which follows the given object id * @link https://php.net/manual/en/function.snmpgetnext.php * @param string $host

The hostname of the SNMP agent (server).

* @param string $community

The read community.

* @param string $object_id

The SNMP object id which precedes the wanted one.

* @param int $timeout [optional]

The number of microseconds until the first timeout.

* @param int $retries [optional]

The number of times to retry if timeouts occur.

* @return string|false SNMP object value on success or FALSE on error. * In case of an error, an E_WARNING message is shown. */ function snmpgetnext($host, $community, $object_id, $timeout = 1000000, $retries = 5) {} /** * Fetch all the SNMP objects from an agent * @link https://php.net/manual/en/function.snmpwalk.php * @param string $hostname

* The SNMP agent (server). *

* @param string $community

* The read community. *

* @param string $object_id

* If NULL, object_id is taken as the root of * the SNMP objects tree and all objects under that tree are returned as * an array. *

*

* If object_id is specified, all the SNMP objects * below that object_id are returned. *

* @param int $timeout [optional]

* The number of microseconds until the first timeout. *

* @param int $retries [optional]

The number of times to retry if timeouts occur.

* @return array an array of SNMP object values starting from the * object_id as root or FALSE on error. */ function snmpwalk($hostname, $community, $object_id, $timeout = 1000000, $retries = 5) {} /** * Return all objects including their respective object ID within the specified one * @link https://php.net/manual/en/function.snmprealwalk.php * @param string $host

The hostname of the SNMP agent (server).

* @param string $community

The read community.

* @param string $object_id

The SNMP object id which precedes the wanted one.

* @param int $timeout [optional]

The number of microseconds until the first timeout.

* @param int $retries [optional]

The number of times to retry if timeouts occur.

* @return array|false an associative array of the SNMP object ids and their values on success or FALSE on error. * In case of an error, an E_WARNING message is shown. */ function snmprealwalk($host, $community, $object_id, $timeout = 1000000, $retries = 5) {} /** * Query for a tree of information about a network entity * @link https://php.net/manual/en/function.snmpwalkoid.php * @param string $hostname

* The SNMP agent. *

* @param string $community

* The read community. *

* @param string $object_id

* If NULL, object_id is taken as the root of * the SNMP objects tree and all objects under that tree are returned as * an array. *

*

* If object_id is specified, all the SNMP objects * below that object_id are returned. *

* @param int $timeout [optional]

* The number of microseconds until the first timeout. *

* @param int $retries [optional]

* The number of times to retry if timeouts occur. *

* @return array an associative array with object ids and their respective * object value starting from the object_id * as root or FALSE on error. */ function snmpwalkoid($hostname, $community, $object_id, $timeout = 1000000, $retries = 5) {} /** * Set the value of an SNMP object * @link https://php.net/manual/en/function.snmpset.php * @param string $host

* The hostname of the SNMP agent (server). *

* @param string $community

* The write community. *

* @param string $object_id

* The SNMP object id. *

* @param string $type The MIB defines the type of each object id. It has to be specified as a single character from the below list. *

* types * =The type is taken from the MIB * iINTEGER * uINTEGER * sSTRING * xHEX STRING * dDECIMAL STRING * nNULLOBJ * oOBJID * tTIMETICKS * aIPADDRESS * bBITS * * If OPAQUE_SPECIAL_TYPES was defined while compiling the SNMP library, the following are also valid: *

* types * Uunsigned int64 * Isigned int64 * Ffloat * Ddouble * * Most of these will use the obvious corresponding ASN.1 type. 's', 'x', 'd' and 'b' are all different ways of specifying an OCTET STRING value, and * the 'u' unsigned type is also used for handling Gauge32 values. *

* If the MIB-Files are loaded by into the MIB Tree with "snmp_read_mib" or by specifying it in the libsnmp config, '=' may be used as * the type parameter for all object ids as the type can then be automatically read from the MIB. *

* Note that there are two ways to set a variable of the type BITS like e.g. * "SYNTAX BITS {telnet(0), ftp(1), http(2), icmp(3), snmp(4), ssh(5), https(6)}": *

* Using type "b" and a list of bit numbers. This method is not recommended since GET query for the same OID would return e.g. 0xF8. * Using type "x" and a hex number but without(!) the usual "0x" prefix. * See examples section for more details. *

* @param mixed $value

* The new value. *

* @param int $timeout [optional]

* The number of microseconds until the first timeout. *

* @param int $retries [optional]

* The number of times to retry if timeouts occur. *

* @return bool TRUE on success or FALSE on failure. *

* If the SNMP host rejects the data type, an E_WARNING message like "Warning: Error in packet. Reason: (badValue) The value given has the wrong type or length." is shown. * If an unknown or invalid OID is specified the warning probably reads "Could not add variable". *

*/ function snmpset($host, $community, $object_id, $type, $value, $timeout = 1000000, $retries = 5) {} /** * Fetches the current value of the UCD library's quick_print setting * @link https://php.net/manual/en/function.snmp-get-quick-print.php * @return bool TRUE if quick_print is on, FALSE otherwise. */ function snmp_get_quick_print() {} /** * Set the value of quick_print within the UCD SNMP library * @link https://php.net/manual/en/function.snmp-set-quick-print.php * @param bool $quick_print * @return bool No value is returned. */ function snmp_set_quick_print($quick_print) {} /** * Return all values that are enums with their enum value instead of the raw integer * @link https://php.net/manual/en/function.snmp-set-enum-print.php * @param int $enum_print

* As the value is interpreted as boolean by the Net-SNMP library, it can only be "0" or "1". *

* @return bool */ function snmp_set_enum_print($enum_print) {} /** * Set the OID output format * @link https://php.net/manual/en/function.snmp-set-oid-output-format.php * @param int $oid_format [optional] * OID .1.3.6.1.2.1.1.3.0 representation for various oid_format values * * *
SNMP_OID_OUTPUT_FULL.iso.org.dod.internet.mgmt.mib-2.system.sysUpTime.sysUpTimeInstance
SNMP_OID_OUTPUT_NUMERIC.1.3.6.1.2.1.1.3.0
*

Begining from PHP 5.4.0 four additional constants available: * * * * * *
SNMP_OID_OUTPUT_MODULEDISMAN-EVENT-MIB::sysUpTimeInstance
SNMP_OID_OUTPUT_SUFFIXsysUpTimeInstance
SNMP_OID_OUTPUT_UCDsystem.sysUpTime.sysUpTimeInstance
SNMP_OID_OUTPUT_NONEUndefined
*

* @return bool No value is returned. */ function snmp_set_oid_output_format($oid_format = SNMP_OID_OUTPUT_MODULE) {} /** * Set the oid output format * @link https://php.net/manual/en/function.snmp-set-oid-numeric-print.php * @param int $oid_format * @return void */ function snmp_set_oid_numeric_print($oid_format) {} /** * Fetch an SNMP object * @link https://php.net/manual/en/function.snmp2-get.php * @param string $host

* The SNMP agent. *

* @param string $community

* The read community. *

* @param string $object_id

* The SNMP object. *

* @param int $timeout [optional]

* The number of microseconds until the first timeout. *

* @param int $retries [optional]

* The number of times to retry if timeouts occur. *

* @return string|false SNMP object value on success or FALSE on error. */ function snmp2_get($host, $community, $object_id, $timeout = 1000000, $retries = 5) {} /** * Fetch the SNMP object which follows the given object id * @link https://php.net/manual/en/function.snmp2-getnext.php * @param string $host

* The hostname of the SNMP agent (server). *

* @param string $community

* The read community. *

* @param string $object_id

* The SNMP object id which precedes the wanted one. *

* @param int $timeout [optional]

* The number of microseconds until the first timeout. *

* @param int $retries [optional]

* The number of times to retry if timeouts occur. *

* @return string|false SNMP object value on success or FALSE on error. * In case of an error, an E_WARNING message is shown. */ function snmp2_getnext($host, $community, $object_id, $timeout = 1000000, $retries = 5) {} /** * Fetch all the SNMP objects from an agent * @link https://php.net/manual/en/function.snmp2-walk.php * @param string $host

* The SNMP agent (server). *

* @param string $community

* The read community. *

* @param string $object_id

* If NULL, object_id is taken as the root of * the SNMP objects tree and all objects under that tree are returned as * an array. *

*

* If object_id is specified, all the SNMP objects * below that object_id are returned. *

* @param int $timeout [optional]

* The number of microseconds until the first timeout. *

* @param int $retries [optional]

* The number of times to retry if timeouts occur. *

* @return array an array of SNMP object values starting from the * object_id as root or FALSE on error. */ function snmp2_walk($host, $community, $object_id, $timeout = 1000000, $retries = 5) {} /** * Return all objects including their respective object ID within the specified one * @link https://php.net/manual/en/function.snmp2-real-walk.php * @param string $host

* The hostname of the SNMP agent (server). *

* @param string $community

* The read community. *

* @param string $object_id

* The SNMP object id which precedes the wanted one. *

* @param int $timeout [optional]

* The number of microseconds until the first timeout. *

* @param int $retries [optional]

* The number of times to retry if timeouts occur. *

* @return array|false an associative array of the SNMP object ids and their values on success or FALSE on error. * In case of an error, an E_WARNING message is shown. */ function snmp2_real_walk($host, $community, $object_id, $timeout = 1000000, $retries = 5) {} /** * Set the value of an SNMP object * @link https://php.net/manual/en/function.snmp2-set.php * @param string $host

* The hostname of the SNMP agent (server). *

* @param string $community

* The write community. *

* @param string $object_id

* The SNMP object id. *

* @param string $type

The MIB defines the type of each object id. It has to be specified as a single character from the below list. *

*

types:

* * * * * * * * * * * * *
=The type is taken from the MIB
iINTEGER
uINTEGER
sSTRING
xHEX STRING
dDECIMAL STRING
nNULLOBJ
oOBJID
tTIMETICKS
aIPADDRESS
bBITS
*

If OPAQUE_SPECIAL_TYPES was defined while compiling the SNMP library, the following are also valid: *

*

types:

* * * * * *
Uunsigned int64
Isigned int64
Ffloat
Ddouble
*

Most of these will use the obvious corresponding ASN.1 type. 's', 'x', 'd' and 'b' are all different ways of specifying an OCTET STRING value, and * the 'u' unsigned type is also used for handling Gauge32 values. *

* If the MIB-Files are loaded by into the MIB Tree with "snmp_read_mib" or by specifying it in the libsnmp config, '=' may be used as * the type parameter for all object ids as the type can then be automatically read from the MIB. *

* Note that there are two ways to set a variable of the type BITS like e.g. * "SYNTAX BITS {telnet(0), ftp(1), http(2), icmp(3), snmp(4), ssh(5), https(6)}": *

* Using type "b" and a list of bit numbers. This method is not recommended since GET query for the same OID would return e.g. 0xF8. * Using type "x" and a hex number but without(!) the usual "0x" prefix. * See examples section for more details. *

* @param string $value

* The new value. *

* @param int $timeout [optional]

* The number of microseconds until the first timeout. *

* @param int $retries [optional]

* The number of times to retry if timeouts occur. *

* @return bool TRUE on success or FALSE on failure. *

* If the SNMP host rejects the data type, an E_WARNING message like "Warning: Error in packet. Reason: (badValue) The value given has the wrong type or length." is shown. * If an unknown or invalid OID is specified the warning probably reads "Could not add variable". *

*/ function snmp2_set($host, $community, $object_id, $type, $value, $timeout = 1000000, $retries = 5) {} /** * Fetch an SNMP object * @link https://php.net/manual/en/function.snmp3-get.php * @param string $host

* The hostname of the SNMP agent (server). *

* @param string $sec_name

* the security name, usually some kind of username *

* @param string $sec_level

* the security level (noAuthNoPriv|authNoPriv|authPriv) *

* @param string $auth_protocol

* the authentication protocol (MD5 or SHA) *

* @param string $auth_passphrase

* the authentication pass phrase *

* @param string $priv_protocol

* the privacy protocol (DES or AES) *

* @param string $priv_passphrase

* the privacy pass phrase *

* @param string $object_id

* The SNMP object id. *

* @param int $timeout [optional]

* The number of microseconds until the first timeout. *

* @param int $retries [optional]

* The number of times to retry if timeouts occur. *

* @return string|false SNMP object value on success or FALSE on error. */ function snmp3_get($host, $sec_name, $sec_level, $auth_protocol, $auth_passphrase, $priv_protocol, $priv_passphrase, $object_id, $timeout = 1000000, $retries = 5) {} /** * Fetch the SNMP object which follows the given object id * @link https://php.net/manual/en/function.snmp3-getnext.php * @param string $host

* The hostname of the * SNMP agent (server). *

* @param string $sec_name

* the security name, usually some kind of username *

* @param string $sec_level

* the security level (noAuthNoPriv|authNoPriv|authPriv) *

* @param string $auth_protocol

* the authentication protocol (MD5 or SHA) *

* @param string $auth_passphrase

* the authentication pass phrase *

* @param string $priv_protocol

* the privacy protocol (DES or AES) *

* @param string $priv_passphrase

* the privacy pass phrase *

* @param string $object_id

* The SNMP object id. *

* @param int $timeout [optional]

* The number of microseconds until the first timeout. *

* @param int $retries [optional]

* The number of times to retry if timeouts occur. *

* @return string|false SNMP object value on success or FALSE on error. * In case of an error, an E_WARNING message is shown. */ function snmp3_getnext($host, $sec_name, $sec_level, $auth_protocol, $auth_passphrase, $priv_protocol, $priv_passphrase, $object_id, $timeout = 1000000, $retries = 5) {} /** * Fetch all the SNMP objects from an agent * @link https://php.net/manual/en/function.snmp3-walk.php * @param string $host

* The hostname of the SNMP agent (server). *

* @param string $sec_name

* the security name, usually some kind of username *

* @param string $sec_level

* the security level (noAuthNoPriv|authNoPriv|authPriv) *

* @param string $auth_protocol

* the authentication protocol (MD5 or SHA) *

* @param string $auth_passphrase

* the authentication pass phrase *

* @param string $priv_protocol

* the privacy protocol (DES or AES) *

* @param string $priv_passphrase

* the privacy pass phrase *

* @param string $object_id

* If NULL, object_id is taken as the root of * the SNMP objects tree and all objects under that tree are returned as * an array. *

*

* If object_id is specified, all the SNMP objects * below that object_id are returned. *

* @param int $timeout [optional]

* The number of microseconds until the first timeout. *

* @param int $retries [optional]

* The number of times to retry if timeouts occur. *

* @return array an array of SNMP object values starting from the * object_id as root or FALSE on error. */ function snmp3_walk($host, $sec_name, $sec_level, $auth_protocol, $auth_passphrase, $priv_protocol, $priv_passphrase, $object_id, $timeout = 1000000, $retries = 5) {} /** * Return all objects including their respective object ID within the specified one * @link https://php.net/manual/en/function.snmp3-real-walk.php * @param string $host

* The hostname of the * SNMP agent (server). *

* @param string $sec_name

* the security name, usually some kind of username *

* @param string $sec_level

* the security level (noAuthNoPriv|authNoPriv|authPriv) *

* @param string $auth_protocol

* the authentication protocol (MD5 or SHA) *

* @param string $auth_passphrase

* the authentication pass phrase *

* @param string $priv_protocol

* the privacy protocol (DES or AES) *

* @param string $priv_passphrase

* the privacy pass phrase *

* @param string $object_id

* The SNMP object id. *

* @param int $timeout [optional]

* The number of microseconds until the first timeout. *

* @param int $retries [optional]

* The number of times to retry if timeouts occur. *

* @return array an associative array of the * SNMP object ids and their values on success or FALSE on error. * In case of an error, an E_WARNING message is shown. */ function snmp3_real_walk($host, $sec_name, $sec_level, $auth_protocol, $auth_passphrase, $priv_protocol, $priv_passphrase, $object_id, $timeout = null, $retries = null) {} /** * Set the value of an SNMP object * @link https://php.net/manual/en/function.snmp3-set.php * @param string $host

* The hostname of the SNMP agent (server). *

* @param string $sec_name

* the security name, usually some kind of username *

* @param string $sec_level

* the security level (noAuthNoPriv|authNoPriv|authPriv) *

* @param string $auth_protocol

* the authentication protocol (MD5 or SHA) *

* @param string $auth_passphrase

* the authentication pass phrase *

* @param string $priv_protocol

* the privacy protocol (DES or AES) *

* @param string $priv_passphrase

* the privacy pass phrase *

* @param string $object_id

* The SNMP object id. *

* @param string $type

The MIB defines the type of each object id. It has to be specified as a single character from the below list.

*

types:

* * * * * * * * * * * * *
=The type is taken from the MIB
iINTEGER
uINTEGER
sSTRING
xHEX STRING
dDECIMAL STRING
nNULLOBJ
oOBJID
tTIMETICKS
aIPADDRESS
bBITS
*

If OPAQUE_SPECIAL_TYPES was defined while compiling the SNMP library, the following are also valid: *

*

types:

* * * * * *
Uunsigned int64
Isigned int64
Ffloat
Ddouble
*

Most of these will use the obvious corresponding ASN.1 type. 's', 'x', 'd' and 'b' are all different ways of specifying an OCTET STRING value, and * the 'u' unsigned type is also used for handling Gauge32 values. *

*

* If the MIB-Files are loaded by into the MIB Tree with "snmp_read_mib" or by specifying it in the libsnmp config, '=' may be used as * the type parameter for all object ids as the type can then be automatically read from the MIB. *

*

* Note that there are two ways to set a variable of the type BITS like e.g. * "SYNTAX BITS {telnet(0), ftp(1), http(2), icmp(3), snmp(4), ssh(5), https(6)}": *

*

* Using type "b" and a list of bit numbers. This method is not recommended since GET query for the same OID would return e.g. 0xF8. * Using type "x" and a hex number but without(!) the usual "0x" prefix. * See examples section for more details. *

* @param string $value

* The new value *

* @param int $timeout [optional]

* The number of microseconds until the first timeout. *

* @param int $retries [optional]

* The number of times to retry if timeouts occur. *

* @return bool TRUE on success or FALSE on failure. *

* If the SNMP host rejects the data type, an E_WARNING message like "Warning: Error in packet. Reason: (badValue) The value given has the wrong type or length." is shown. * If an unknown or invalid OID is specified the warning probably reads "Could not add variable". *

*/ function snmp3_set($host, $sec_name, $sec_level, $auth_protocol, $auth_passphrase, $priv_protocol, $priv_passphrase, $object_id, $type, $value, $timeout = 1000000, $retries = 5) {} /** * Specify the method how the SNMP values will be returned * @link https://php.net/manual/en/function.snmp-set-valueretrieval.php * @param int $method * types * * * * * * * * * * * * *
SNMP_VALUE_LIBRARYThe return values will be as returned by the Net-SNMP library.
SNMP_VALUE_PLAINThe return values will be the plain value without the SNMP type hint.
SNMP_VALUE_OBJECT * The return values will be objects with the properties "value" and "type", where the latter * is one of the SNMP_OCTET_STR, SNMP_COUNTER etc. constants. The * way "value" is returned is based on which one of constants * SNMP_VALUE_LIBRARY, SNMP_VALUE_PLAIN is set. *
* @return bool */ function snmp_set_valueretrieval($method) {} /** * Return the method how the SNMP values will be returned * @link https://php.net/manual/en/function.snmp-get-valueretrieval.php * @return int OR-ed combitantion of constants ( SNMP_VALUE_LIBRARY or * SNMP_VALUE_PLAIN ) with * possible SNMP_VALUE_OBJECT set. */ function snmp_get_valueretrieval() {} /** * Reads and parses a MIB file into the active MIB tree * @link https://php.net/manual/en/function.snmp-read-mib.php * @param string $filename

The filename of the MIB.

* @return bool */ function snmp_read_mib($filename) {} /** * As of 5.4 * @link https://php.net/manual/en/snmp.constants.php */ define('SNMP_OID_OUTPUT_SUFFIX', 1); /** * As of 5.4 * @link https://php.net/manual/en/snmp.constants.php */ define('SNMP_OID_OUTPUT_MODULE', 2); /** * As of 5.2 * @link https://php.net/manual/en/snmp.constants.php */ define('SNMP_OID_OUTPUT_FULL', 3); /** * As of 5.2 * @link https://php.net/manual/en/snmp.constants.php */ define('SNMP_OID_OUTPUT_NUMERIC', 4); /** * As of 5.4 * @link https://php.net/manual/en/snmp.constants.php */ define('SNMP_OID_OUTPUT_UCD', 5); /** * As of 5.4 * @link https://php.net/manual/en/snmp.constants.php */ define('SNMP_OID_OUTPUT_NONE', 6); define('SNMP_VALUE_LIBRARY', 0); define('SNMP_VALUE_PLAIN', 1); define('SNMP_VALUE_OBJECT', 2); define('SNMP_BIT_STR', 3); define('SNMP_OCTET_STR', 4); define('SNMP_OPAQUE', 68); define('SNMP_NULL', 5); define('SNMP_OBJECT_ID', 6); define('SNMP_IPADDRESS', 64); define('SNMP_COUNTER', 66); define('SNMP_UNSIGNED', 66); define('SNMP_TIMETICKS', 67); define('SNMP_UINTEGER', 71); define('SNMP_INTEGER', 2); define('SNMP_COUNTER64', 70); // End of snmp v.0.1