snmp3_walk
snmp3_walk
Fetch all the SNMP objects from an agent
**snmp3_walk** string $hostname string $security_name string $security_level string $auth_protocol string $auth_passphrase string $privacy_protocol string $privacy_passphrase $object_id int $timeout int $retries
function is used to read all the values from
an agent specified by the .
snmp3_walk``hostname
Even if the security level does not use an auth or priv protocol/password valid values have to be specified.
hostnameThe hostname of the SNMP agent (server).
security_namethe security name, usually some kind of username
security_levelthe security level (noAuthNoPriv|authNoPriv|authPriv)
auth_protocol
the authentication protocol (, ,
, or )
"MD5"``"SHA"``"SHA256"``"SHA512"
auth_passphrasethe authentication pass phrase
privacy_protocolthe privacy protocol (DES or AES)
privacy_passphrasethe privacy pass phrase
object_id
If null, is taken as the root of
the objects tree and all objects under that tree are returned as
an array.
object_id
If is specified, all the objects
below that are returned.
`object_id``object_id`
timeoutThe number of microseconds until the first timeout.
retriesThe number of times to retry if timeouts occur.
Returns an array of object values starting from the
as root or false on error.
object_id
Voorbeeld: Example
<?php
$ret = snmp3_walk('localhost', 'james', 'authPriv', 'SHA', 'secret007', 'AES', 'secret007', 'IF-MIB::ifName');
var_export($ret);
?>
Above function call would return all the objects from the agent running on localhost:
array ( 0 => 'STRING: lo', 1 => 'STRING: eth0', 2 => 'STRING: eth2', 3 => 'STRING: sit0', 4 => 'STRING: sixxs', )
snmp3_real_walk