|
GetPduErrorStatus
int
GetPduErrorStatus (snmppdu
pdu)
Return
Value
Returns the error status value.
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
pdu
–the SNMP PDU to
get error status from.
Remarks
Call this
function to get SNMP error status. To convert error status to
string, call GetPduErrorString() function.
Example
snmpvar
var1 = CreateVar("1.3.6.1.2.1.1.1.0")
snmppdu
pdu = CreatePdu(var1),
response
response=SnmpGet("65.35.64.170", "public", 2, 3000,
pdu)
if
(GetPduErrorStatus(response) ==
1000)
Println("SNMP Timeout")
endif
|