The SNMP classIntroductionRepresents SNMP session. Class synopsis
SNMP
/* Constants */
public
const
int
SNMP::VERSION_1;
public
const
int
SNMP::VERSION_2c;
public
const
int
SNMP::VERSION_2C;
public
const
int
SNMP::VERSION_3;
public
const
int
SNMP::ERRNO_NOERROR;
public
const
int
SNMP::ERRNO_ANY;
public
const
int
SNMP::ERRNO_GENERIC;
public
const
int
SNMP::ERRNO_TIMEOUT;
public
const
int
SNMP::ERRNO_ERROR_IN_REPLY;
public
const
int
SNMP::ERRNO_OID_NOT_INCREASING;
public
const
int
SNMP::ERRNO_OID_PARSING_ERROR;
public
const
int
SNMP::ERRNO_MULTIPLE_SET_QUERIES;
/* Properties */
public
readonly
array
$info;
public
intnull
$max_oids;
public
int
$valueretrieval;
public
bool
$quick_print;
public
bool
$enum_print;
public
bool
$numeric_index;
public
bool
$numeric_timeticks;
public
bool
$extended_index;
public
bool
$dont_print_units;
public
bool
$escape_quotes;
public
bool
$print_hex_text;
public
int
$oid_output_format;
public
bool
$oid_increasing_check;
public
int
$exceptions_enabled;
/* Methods */
public __construct(
int $version,string $hostname,string $community,int $timeout = -1,int $retries = -1) public bool close()
public mixed get(arraystring
$objectId, bool $preserveKeys = false)public int getErrno()
public string getError()
public mixed getnext(arraystring
$objectId)public bool set(arraystring
$objectId, arraystring $type, arraystring $value)public bool setOidOutputFormat(Snmp\OidOutput
$format)public bool setSecurity(
string $securityLevel,string $authProtocol = "",string $authPassphrase = "",string $privacyProtocol = "",string $privacyPassphrase = "",string $contextName = "",string $contextEngineId = "") public bool setStringOutputFormat(Snmp\StringOutput
$format)public arrayfalse walk(
arraystring $objectId,bool $suffixAsKey = false,int $maxRepetitions = -1,int $nonRepeaters = -1) PropertiesThe properties that control the output format take their initial values from the settings in effect when the object is created, as set by functions such as snmp_set_output_option and snmp_set_oid_output_format. Changing them only affects the requests of this session.
Predefined ConstantsSNMP Error Types
SNMP Protocol Versions
|