On Wed, 23 Jun 2004 19:05:09 +1000 Gary wrote: GP> As an example, I want to periodically update a variable from my GP> application, and when there is a GET request for it, supply a scalar GP> that is the change since the last request. This requires that when a GP> request is made I remember the value at that time, for the subsequent GP> call. Maybe there is a role for a cache handler here. I am not sure.
Actually, simply adding a static variable to you handler should work ok. GP> The lack of questions suggests that there is in fact some clear GP> documentation somewhere, and I have missed it. No, it just means that for most people, the simple case works for them. GP> I will eventually absorb the source code and understand how to use this GP> facility, but in the meantime I would appreciate any roadmap-like GP> information that people can supply. The kind of thing I am interested in GP> is GP> GP> - what do all the terms used mean? Examples are 'helper handler', 'mib GP> handler', 'handler chain', 'access method', 'inject', 'serialize GP> handler'. This terminology seems well established - is there a GP> reference? No, no reference. The closest thing would be the hander overview. http://www.net-snmp.org/tutorial-5/agent/group__handler.html Handlers and helpers are really the same thing. And instead of a single hander, there is a chain of handlers, each of which does some work to make things easier. A table creates the chain when it registers, either explicity, or by calling a function which does some of the work. For example, the tcpTable init looks something like this: reginfo = netsnmp_create_handler_registration("tcp", tcp_handler, tcp_oid, OID_LENGTH(tcp_oid), HANDLER_CAN_RONLY); netsnmp_inject_handler( reginfo, netsnmp_get_cache_handler(TCP_STATS_CACHE_TIMEOUT, tcp_load, tcp_free, tcp_oid, OID_LENGTH(tcp_oid))); This registers the tcp_handler function, which will create a default chain, and then injects a cache handler into that chain. These two calls result in a chain that looks like this: cache_handler -> bulk_to_next -> table -> table_iterator -> tcpTable GP> - what is the sequence of processing steps for a GET request and where GP> do 'handlers' fit into that. The agent looks up the registration for each OID in an incoming request, then calls the handler for that registration. That handler looks at the request, possibly does some work, and decides whether or not to pass the requests down to lower handlers in it's chain. The last handler in the chain is usually the user's handler, and it does the work of actually finding the data. GP> - for each function, what do all its parameters mean, what is its return GP> value and how does it relate to other function. I was suprised to find that there isn't a list of functions available. It appears you have to browse by module. Or check out the file list, where you can view a file with hyperlinks for functions/structure. GP> - for each struct, what do all its data members mean? http://www.net-snmp.org/tutorial-5/agent/annotated.html -- 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