On 26/09/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >>> The table does not have any row initially .The user need to create the row . >> How? >> Via an SNMP SET command? >> Or via some other control mechanism? > > The table may be created by another agent (for example http agent)
Ok - so that's external to the SNMP agent. >> If rows can be created "behind the back" of the agent, then things are >> slightly harder. >> >> The most straighforward approach would be for the agent to hold a >> cache of the table (or at least of the row indexes), > > Does it mean if the table is created by http agent, SNMP agent should know > about > the index which is created by http agent? How it is possible? It means that every so often, the SNMP agent should load a copy of the whole table from some external source (presumably the database). It then has the information it needs to handle SNMP requests. The most common arrangement is to load *all* the contents of the table, and use this copy to server the SNMP requests. There are several examples of this in the Net-SNMP agent. (Just look for anything that makes mention of the cache handler). You seem to be wanting an alternative variant, where the SNMP agent caches the row indexes (but not the actual column values), and then uses this to query the database for the relevant column information. I'd actually suggest that you start by caching the full contents of the table - which mib2c can generate code for. Then once you've got this workjing (and are happy you understand how it works), you can tweak the cache loading routine to simpy store the indexes, and tweak the MIB handler routine to retrieve the data from the database. But I would strongly urge you to take this one step at a time. There's significantly more information, examples, etc about a fully-cached approach. I'm not sure there's much at all written down about a cached-index implementation. Dave ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users