Hi, Robert:
 
Thanks for the reply. I think I did not make myself quite clear in my question, partly because I am quite new to NetSNMP.
 
I am trying to put a DB, like BDB for persistent data store. For group of scalars that have a common parent, it would be a table with a single row in BDB. Now for get/set operation into the table, I would like to use 1 DB read/write to get/set all the columns instead of incur 1 read/write per column. If I use the existing scalar or scalar_group handler, it seems to always invokes the downstream handler with each varbind received in the incoming SNMP request for every handler mode. After reading more into the code, it seems I could use the parent_datalist in the request_info data structure to pass some context information between the calls. So, for get operation, I could retrieve the entire row from BDB and store it in parent_datalist for the first scalar invocation in my own handler and the rest of the invocation will just return the info from the parent_datalist. This can be done similarly f or the set. Do you see any problems with this approach or any other suggestions?
 
Thanks,
Ming   

Robert Story <[EMAIL PROTECTED]> wrote:
On Fri, 28 Jan 2005 13:34:36 -0800 (PST) Ming wrote:
MY> Is there a way to group a set of scalars so that the handler gets called
MY> once for the group for incoming get/set request? I look at the scalar_group
MY> helper, but it seems to only simply the handler registration s.t. I don't
MY> have to call 10 scalar registration for 10 scalars.

I don't quite understand what you are trying to do or why the scalar_group
handler doesn't do what you want it to.

The scalar_group handler does require the scalars to have a common parent, and
be sequentially numbered (it wouldn't be to hard to eliminate that requirement
in the scalar_group handler - patches welcomed). But if the nodes you want to
have a common handler called don't have a common parent, there isn't a helper
you can use. I don't even think it's possible with the current agent
architecture, which has handler registrations by OID.

--
Robert Story; NET-SNMP Junkie
Support:
Archive:

You are lost in a twisty maze of little standards, all different.


Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.

Reply via email to