[AGENT++] Processing errors for multiple varbinds in SNMP req uest
Frank Fock
fock at agentpp.com
Fri Nov 14 00:07:24 CET 2003
Rajesh,
Yes indeed, when you return an error on a get_request, the processing
continues. This is a bug and will be changed in the next release. However,
normally this bug will have no effect, since a GET request should not return
an error. The view and access handling is already handled before an object's
get_request method is called.
Best regards,
Frank
Rajesh Semwal wrote:
>Frank,
>
>Thanks for your reply.
>I raised this question because I noticed that in the case of SNMP-Get
>request, the function <void MibLeaf::get_request()> is used to fetch the
>required value into the SNMP response PDU. Since it returns void, there is
>no way to let the caller know of any error(like NO_ACCESS) encountered while
>fetching the value. Moreover, the MibLeaf::get_request() method also sets
>the error_status and error_index field in SNMP response PDU in case of an
>error. Therefore even if there was an error encountered before, the caller
>will keep processing all the varbinds in request and thus overwriting the
>error fields of SNMP reponse PDU with the latest values, in case of multiple
>errors.
>
>Please let me know if I misunderstood the code.
>
>Thanks,
>Rajesh
>
>
>-----Original Message-----
>From: agentpp-admin at agentpp.org [mailto:agentpp-admin at agentpp.org] On Behalf
>Of Frank Fock
>Sent: Thursday, November 13, 2003 4:11 PM
>To: Rajesh Semwal
>Cc: 'agentpp at agentpp.org'
>Subject: Re: [AGENT++] Processing errors for multiple varbinds in SNMP
>request
>
>Rajesh,
>
>the processing of a request will be finished when the first error is
>encountered,
>thus AGENT++ always reports the first error it detects.
>
>Best regards,
>Frank
>
>Rajesh Semwal wrote:
>
>
>
>>Hi,
>>
>>
>>
>>I have a question about the SNMP agent's behaviour when it encounters
>>multiple errors while processing any SNMP request from the manager.
>>
>>
>>
>>When the agent encounters any error while processing a varbind from the
>>
>>
>SNMP
>
>
>>request, it sets the error_status and error_index field of SNMP response
>>
>>
>PDU
>
>
>>with the respective error number and the index number of the varbind
>>respectively. If the agent again encounters error while processing the
>>
>>
>rest
>
>
>>of the varbinds in the same SNMP request, should it update the error_status
>>and error_index fields of the SNMP response with newly encountered errors?
>>If yes, this may mean that SNMP Response PDU always reports the last error
>>encountered while processing the SNMP request.
>>
>>
>>
>>Thanks,
>>
>>Rajesh
>>
>>
>>
>>
>>
>>
>
>
>
>_______________________________________________
>AGENTPP mailing list
>AGENTPP at agentpp.org
>http://agentpp.org/mailman/listinfo/agentpp
>
>
>
More information about the AGENTPP
mailing list