On 10/12/2007, Giuseppe Modugno <[EMAIL PROTECTED]> wrote:
> I'm reading watcher code and I found the following:


>     whandler         = netsnmp_get_watcher_handler();
>     netsnmp_inject_handler(reginfo, whandler);
>     return netsnmp_register_scalar(reginfo);


> The injected handler is whandler or the handler in the reginfo struct
> ('netsnmp_mib_handler *handler' field)?

The newly-created handler 'whandler' is inserting into the existing
handler chain 'reginfo->handler'


> So, what is the purpose of reginfo->handler if it isn't used?

When a request is received, the agent detects the 'reginfo'
structure that is relevant for that OID, and invokes the list
of handler routines (reginfo->handler).   These will each
apply certain specific processing, and then pass the request
on to the next handler in the list - finally ending up at the
handler specific for that particular MIB.

Dave

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to