> Hi i'm looking at net-snmp code to understand the main flow of the requests 
> that come/go. I'm looking at netsnmp_register_handler (agent_handler.c:207)
> As far as i understand it makes some checks and passes the 
> netsnmp_handler_registration *reginfo to netsnmp_register_mib function to 
> register it to oid tree. My question actually is about netsnmp_register_mib
> (agent_registry.c:708) as far as i understand it creates a netsnmp_subtree 
> *subtree it puts the reginfo in it but i dont see any place that this subtree 
> is registered (attached to any global structure) can someone tell me what the 
> netsnmp_register_mib is doing and what happens to created subtree structure ?

I actually have been working toward putting more documentation about
that in the tutorials, but I don't think I'll get to that part until at
least after next week.

The "netsnmp_subtree_load" is the function in "netsnmp_register_mib"
that takes the subtree and stores it for future use.  It gets stored in
an ordered list of subtrees that the agent later uses to look through
when an incoming request is received.  Each OID in a request is paired
against the proper subtree from the ordered list so that the appropriate
registered handler can be found.
-- 
Wes Hardaker
Please mail all replies to net-snmp-coders@lists.sourceforge.net

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to