SNMP
class SNMP (View source)
Represents SNMP session.
Constants
| VERSION_1 |
|
| VERSION_2c |
|
| VERSION_2C |
|
| VERSION_3 |
|
| ERRNO_NOERROR |
|
| ERRNO_ANY |
|
| ERRNO_GENERIC |
|
| ERRNO_TIMEOUT |
|
| ERRNO_ERROR_IN_REPLY |
|
| ERRNO_OID_NOT_INCREASING |
|
| ERRNO_OID_PARSING_ERROR |
|
| ERRNO_MULTIPLE_SET_QUERIES |
|
Properties
| int | $max_oids | ||
| int | $valueretrieval | ||
| bool | $quick_print | ||
| bool | $enum_print | ||
| int | $oid_output_format | ||
|
bool
Since: 8.6
|
$numeric_index | ||
|
bool
Since: 8.6
|
$numeric_timeticks | ||
|
bool
Since: 8.6
|
$extended_index | ||
|
bool
Since: 8.6
|
$dont_print_units | ||
|
bool
Since: 8.6
|
$escape_quotes | ||
|
bool
Since: 8.6
|
$print_hex_text | ||
| bool | $oid_increasing_check | ||
| int | $exceptions_enabled | ||
| array | $info |
Methods
Creates SNMP instance representing session to remote SNMP agent
Close SNMP session
Configures security-related SNMPv3 session parameters
Fetch an SNMP object
Fetch an SNMP object which follows the given object id
Fetch SNMP object subtree
Set the value of an SNMP object
Set the OID output format for this SNMP session
Set the string output format for this SNMP session
Get last error code
Get last error message
Details
__construct(int $version, string $hostname, string $community, int $timeout = 1000000, int $retries = 5)
Creates SNMP instance representing session to remote SNMP agent
bool
close()
Close SNMP session
bool
setSecurity(string $sec_level, string $auth_protocol = "", string $auth_passphrase = "", string $priv_protocol = "", string $priv_passphrase = "", string $contextName = "", string $contextEngineID = "")
Configures security-related SNMPv3 session parameters
mixed
get(mixed $object_id, bool $preserve_keys = false)
Fetch an SNMP object
mixed
getnext(mixed $object_id)
Fetch an SNMP object which follows the given object id
array|false
walk(string $object_id, bool $suffix_as_keys = false, int $max_repetitions, int $non_repeaters)
Fetch SNMP object subtree
bool
set(string $object_id, mixed $type, mixed $value)
Set the value of an SNMP object
bool
setOidOutputFormat(OidOutput $format)
Set the OID output format for this SNMP session
bool
setStringOutputFormat(StringOutput $format)
Set the string output format for this SNMP session
int
getErrno()
Get last error code
string
getError()
Get last error message