SNMP response processing
Response PDUs have nearly the same format as request PDUs.
request-ID | error-status | error-index | variable-bindings |
---|---|---|---|
GET-RESPONSE | ErrorStatus | ErrorIndex | VarBindList |
If the request was successfully processed, the value for both the error-status and error-index field is 0 (zero), and the variable-bindings field contains a complete list of pairs of instance IDs and values.
If any instance ID in the variable-bindings field of the request PDU was not successfully processed, the SNMP agent stops processing, writes the index of the failing instance ID into the error-index field, records an error code in the error-status field, and copies the partially completed result list into the variable-bindings field.
RFC 1157 defines the following values for the error-status field:
Value | Value | Explanation |
---|---|---|
noError | 0 | Processing successfully completed (error-index is 0). |
tooBig | 1 | The size of the response PDU would exceed an implementation-defined limit (error-index is 0). |
noSuchName | 2 | An instance ID does not exist in the relevant MIB view for GET and SET request types or has no successor in the MIB tree in the relevant MIB view for GET-NEXT requests (nonzero error-index). |
badValue | 3 | For SET requests only, a specified value is syntactically incompatible with the type attribute of the corresponding instance ID (nonzero error-index). |
readOnly | 4 | Not defined. |
genErr | 5 | An implementation-defined error occurred (nonzero error- index); for example, an attempt to assign a value that exceeds implementation limits. |