<< Back to man.lupaworld.com

22.        Status and Error Codes

SNMP++ provides two levels of errors when performing Snmp class operations. All Snmp class member functions return a status value. One special error value, “SNMP_CLASS_ERR_STATUS_SET” indicate that the Pdu has an internal error which must be retrieved via the Pdu::get_error_status() member function. All SNMP++ error values may be passed into the Snmp::err_msg() member function for a textual description of the error.

 

 

SNMP++ General Errors

Value

Description

    SNMP_CLASS_SUCCESS

0

Success Status

    SNMP_CLASS_ERROR             

-1

General Error

    SNMP_CLASS_RESOURCE_UNAVAIL   

-2

New or malloc Failed

    SNMP_CLASS_INTERNAL_ERROR

-3

Unexpected internal error

    SNMP_CLASS_UNSUPPORTED

-4

Unsupported function

Callback Reasons

 

 

    SNMP_CLASS_TIMEOUT

-5

Outstanding request timed out

    SNMP_CLASS_ASYNC_RESPONSE     

-6

Received response

    SNMP_CLASS_NOTIFICATION  

-7

Received notification (trap/inform)

    SNMP_CLASS_SESSION_DESTROYED

-8

Snmp Object destroyed

Snmp Class Errors

 

 

    SNMP_CLASS_INVALID      

-10

Snmp member function called on invalid instance

    SNMP_CLASS_INVALID_PDU         

-11

Invalid Pdu passed to mf

    SNMP_CLASS_INVALID_TARGET

-12

Invalid target passed to mf

    SNMP_CLASS_INVALID_CALLBACK

-13

Invalid callback to mf

    SNMP_CLASS_INVALID_REQID

-14

Invalid request id to cancel

    SNMP_CLASS_INVALID_NOTIFYID

-15

Missing trap/inform Oid

    SNMP_CLASS_INVALID_OPERATION

-16

Snmp operation not allowed for specified target

    SNMP_CLASS_INVALID_OID       

-17

Invalid Oid passed to mf

    SNMP_CLASS_INVALID_ADDRESS

-18

Invalid address passed to mf

    SNMP_CLASS_ERR_STATUS_SET

-19

Agent returned response Pdu with error status set

    SNMP_CLASS_TL_UNSUPPORTED

-20

Transport not supported

    SNMP_CLASS_TL_IN_USE

-21

Transport in use

    SNMP_CLASS_TL_FAILED

-22

Transport Failed