|
GetPduErrorString
string
GetPduErrorString(int
status)
Return
Value
Returns string containing the text
description of SNMP error.
The following table maps the status
value to the actual SNMP error description.
|
0
|
Success
|
|
1
|
SNMP: Response PDU Too Big
|
|
2
|
SNMP: Variable does not exist
|
|
3
|
SNMP: Cannot modify variable: Bad Value
|
|
4
|
SNMP: Cannot modify object, Read Only
|
|
5
|
SNMP: Cannot perform operation, General
Error
|
|
6
|
SNMP: Cannot access variable, No Access
|
|
7
|
SNMP: Cannot create/modify variable,
Wrong Type
|
|
8
|
SNMP: Cannot create/set variable, Wrong
Length
|
|
9
|
SNMP: Cannot create/set variable, Wrong
Encoding
|
|
10
|
SNMP: Cannot create/set variable, Wrong
Value
|
|
11
|
SNMP: Cannot create variable, Creation
Not Allowed
|
|
12
|
SNMP: Cannot create/set variable,
Inconsistent Value
|
|
13
|
SNMP: Cannot create/set variable,
Resource Unavailable
|
|
14
|
SNMP: Cannot create/set variable, Commit
Failed
|
|
15
|
SNMP: Cannot create/set variable, Undo
Failed
|
|
16
|
SNMP: Cannot perform operation,
Authorization Error
|
|
17
|
SNMP: Cannot create/set variable, Not
Writable
|
|
18
|
SNMP: Cannot create variable,
Inconsistent Name
|
|
19
|
SNMP: Unknown Error Status
|
|
1000
|
SNMP Timeout
|
Parameters
status
–the integer
containing SNMP error status.
Remarks
Call this
function to the text description of SNMP error status. Returns
empty string if specified error status does not exist.
Example
snmpvarvar1
=
CreateVar("1.3.6.0")
snmppdupdu
=
CreatePdu(var1),
response
response =
SnmpGet("65.35.64.170",
"public",
2,
3000,
pdu)
intiStatus
=
GetPduErrorStatus(response)
Println(GetPduErrorString(iStatus))
Output of the example script will look
like:
SNMP:
Variable does not exist
|