>
>
> The simplest approach is probably to insert code into the routine
> netsnmp_agent_check_parse() (see 'agent/snmp_agent.c').
> This is called after the request has been received and parsed,
> but before it is processed.
>
> Within this routine, you could extract the context of the request,
> and register your handler for that context. Then when the processing
> returns to the main agent, it will pick up this new context, and pass
> the request on to your handler.
>
> That would also avoid the clashes with the standard MIB modules,
> since these would only be registered in the default context.
>
> This seems to be a good way to do it. One more thing which i would like to
ask is that is it possible for me to register the handler within the above
routine and then compile the package again. Now as far as the actual
function definition of the handler function goes is it possible for me to
define it inside a subagent. Some thing like extern, EXPORT_SYMBOL thing
which they use in kernel module programming. If this can be done then i
guess it will make the whole system more cleaner and remove the need of
compiling the whole thing again and again if i just want to change my
handler definition.
> Note that all this assumes that you are using SNMPv3.
> A community-based approach would be somewhat trickier.
>
Yes i will be using SNMPv3 only.
regards
Devvrat
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders