On Thu, 2005-08-18 at 11:54 -0500, [EMAIL PROTECTED] wrote:
> Now I have question about implementing SET request, what exactly I
> need to do in MODE_SET_RESERVE2?
It depends on the MIB.
(An unhelpful answer, I know!)
It doesn't actually matter too much what is done in each pass, just
as long as all the necessary processing is done *somewhere*, and the
agent handles both successful *and* failed requests correctly.
Probably the most typical arrangement is something like the following:
RESERVE1: check syntax of the new assignment
RESERVE2: allocate any resources
(including creating new table rows)
ACTION: apply the new values
COMMIT: release any resources
(allocated during RESERVE2)
That's the tasks for a successful assignment.
The other passes are typically:
FREE: release any R2 resources
(*if* they've been allocated)
UNDO: reverse the assignments, and release resources.
Some MIBs might need a slightly different approach, but that's a
reasonable starting point.
Note that if you don't need to allocate any resources dynamically,
then the RESERVE2 pass can remain empty. There's no need to add
code just for the sake of it.
Dave
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders