On Fri, 25 Feb 2005 10:09:36 -0700 Lisa wrote: LM> I'm implementing the Printer-MIB as an AgentX subagent, but I'm running LM> into a problem trying to implement the prtStorageRefTable. One of its LM> indices is hrStorageIndex from HOST-RESOURCES-MIB. For example, if LM> hrStorageTable uses index '101' for some RAM that's used by the printer, LM> then prtStorageRefTable needs an entry like 'prtStorageRefIndex.101.1'. LM> The master agent contains the hrStorageTable implementation, so how do I LM> find out what it's reporting so I can build my prtStorageRefTable? Is LM> there a way to query the master agent for this information?
If you can, you should try to keep the two implementations in the same place for easier sharing of data. AgentX doesn't provide a mechanism for exchanging random data. If you can't move the hrStorage table but can modify the master agent, you could add a proprietary IPC mechanism to communicate with your sub-agent. If you can't do either, then you might be able to use the callback transport to send dummy requests to the agent. I'm not sure if this will work from a sub-agent(the more I think about it, the more I think it won't), but you can give it a try. If you have the source for the master, you might be able to link in the code for the hrStorageTable to your subagent, but without registering it, and call the C functions to set up the data structures. Hopefully it should result in the same index info as the master, and you can just query the data structures directly in the sub-agent. If none of those options work, then you'd be stuck with using a standard snmp walk of the hrStorageTable at startup, to determine what info the master is providing. -- Robert Story; NET-SNMP Junkie Support: <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. ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
