On Tue, 23 Feb 2010 15:27:33 +0100 Gerlando wrote:
GF> How would I add the indexes to the snmp_container though (if, for 
GF> instance, rows are added from another thread)? I would have to make the 
GF> other threads SNMP-aware, which is not something I'd love to do.

Well, you have two choices. 

- the thread that adds/removes a row notifies the SNMP thread that something
  has changed. your code could set a flag to re-fetch the indexes before
  processing the next request (or re-fetch immediately).

- before processing each request, the snmp thread could call some api to check
  if rows have been added/removed, and if so re-fetch indexes.

GF> Or, I might want to add something per-row (i.e., a data pointer!).  How 
GF> can I do that?

The same way... just make sure to use a unique name for the name of the object
you add to the list..

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to