On Mon, 28 Jun 2004 14:21:11 +0100 Dave wrote:
DS>   The second issue relates to the overall form of the handler routine.
DS> The general model of the v5 handler chain architecture is of a series
DS> of routines, each of which takes care of certain aspects of the request
DS> and then passes control on to the next handler.  I'm pretty sure that
DS> when I first wrote the original cache handler, it took this basic form.
DS> 
DS> But now the handler seems to return success or failure immediately,
DS> without actually calling any lower-level handlers.   At first sight,
DS> I don't see how this can work at all (though clearly it does).
DS> This seems to be at odds with my understanding of the handler design.

A while ago I added a 'flags' field to the mib handler structure. One of the
flags avaiable is 'AUTO_NEXT', which if set, will call the next handler
automatically. Seemed this behaviour belonged at a higher level. I've updated
several handlers to use it, eliminating the redundant loop.

Handlers which need to make a decision about whether or not to the next handler
should be called have two optoins. One is to not use the flag. The other is to
use the flag for the general case, and set another flag (OVERRIDE something or
the other) to skip the auto-next processing for the current request. Some quick
greps will turn up examples of both...


The next level, if I can get to it before 5.2 goes out (which I doubt I will),
would also be to add flags for the various modes, so that a handler could
indicate it never wanted to be called for certain modes. This is somewhat
complicated by the new baby step modes, which it why it will probably have to
wait for 5.3 or later.


-- 
Robert Story; NET-SNMP Junkie <http://www.net-snmp.org/>
<irc://irc.freenode.net/#net-snmp>
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders>

You are lost in a twisty maze of little standards, all different. 


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to