>>>>> On Fri, 07 Jan 2005 12:52:00 +0000, Dave Shield <[EMAIL PROTECTED]> said:

Dave> Firstly, adding this stash-caching to an existing MIB
Dave> relies on injecting the stash-cache handler *after* having
Dave> registered the handler chain with the main agent (so that
Dave> the stash-cache kicks in before the normal processing).

Um, well I wouldn't use the word "rely" there, but ok.  The current
documentation says to inject it within the snmpd.conf file.  However,
like any other extra-feature handler out there the code could do it
itself as well.

Dave> Secondly, I've tweaked the stash-cache handler to automatically
Dave> inject the new stash-to-next handler into the chain if it
Dave> detects that this is needed.  This involved manipulating the
Dave> 'next' and 'prev' links directly, which feels:
Dave> a) ugly, and
Dave> b) potentially unsafe
Dave> Can you suggest a better way?

Depends on where you do it.  Neither you nor Robert clarified what you
meant by "active".  Generally, handler chains should be messed with
only when they're being built (IMHO, of course).  The agent operates
generally in 3 modes: startup, processing stuff, and shutdown.
Handler chains, I'd argue, are probably fairly safe to mess with
during startup but probably shouldn't be tinkered with during
processing.  (and during shutdown being kind of useless, of course).

I liked ...  um...  one of you's ... suggestion "add_handler_here"

-- 
Wes Hardaker
Sparta


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to