Re: Code for multiple subagents each providing one row of a table
Pete Gillin <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Oct 09, 2007 at 11:13:01PM +0100, Dave Shield wrote: > On 03/10/2007, Pete Gillin <[email protected]> wrote: > > Short version: I have a MIB which describes a table, and I want a > > number of subagents on the machine to each provide one row of that > > table. > We don't have any documentation on this, so the best description > is probably in the AgentX specification. I have read RFC 2741, in particular Example 1 of section 7.1.4.2.3 which seems fairly similar to my case. I think I now understand broadly what needs to be done at the protocol level, so it's a question of working out the calls... > > What functions should I be looking at? Is there a mib2c > > configuration which will provide stub code for my subagents? > No - there's isn't a mib2c config for this, or any example code. > It's a feature that hasn't been used much so far (so I wouldn't > like to guarantee the solidity of the code). > Have a look at the AgentX RFC so you are familiar with the > basic idea. Then let me know when you're happy with that, > and I'll try to point you in the right direction for the code to use. My current situation is that I have a PoC application which uses netsnmp_table_container_register with a single row in its container. Obviously, I can only have one such subagent running. Presumably I need to switch it over to only register the OID range corresponding to the row, and to change the callbacks to correspond to this. I have seen table_row.c which seems to be tantalisingly close to my requirements. Only issues: without example code, I'm not clear on exactly how to use it; and there's no table_row.h, so I'm not too sure whether we're even supposed to use it at all (although it does say PUBLIC in big letters...). So your advice at this point would be very much appreciated. Incidentally, I would like to use the AgentX IndexAllocate PDU with INDEX_ANY to obtain the index for my row. I don't know whether that's something net-snmp handles? Finally, thank you very much for your offer of help. I'm sorry it's taken me a while to respond, I've been occupied with other work (aren't we all?). Regards, Pete. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users