On Tue, 8 Feb 2005 15:31:58 -0800 (PST) Ming wrote: MY> I am trying to put a DB, like BDB for persistent data store. For group of MY> scalars that have a common parent, it would be a table with a single row in MY> BDB. Now for get/set operation into the table, I would like to use 1 DB MY> read/write to get/set all the columns instead of incur 1 read/write per MY> column.
Ahh, ok. now I get it. MY> After reading more into the MY> code, it seems I could use the parent_datalist in the request_info data MY> structure to pass some context information between the calls. [...] MY> This can be done similarly for the set. Do you see any problems with this MY> approach or any other suggestions? That should work. You could also use the datalist in the agent request info (which is shared for all varbinds in a request), instead of saving the pointer for each varbind in a request. Either way, make sure you pass a free routine to release the memory. If you are using the parent_data in each request, make sure you handle multiple requests (eg if they both have the same pointer, use reference counting so you don't delete twice or delete before the second request references the pointer). If you are using the agent request info, make sure you use a unique key name per group, or a pdu with a varbind in two different groups will confuse things. -- 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-users> 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-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