I have several questions related to multi-thread (pthreads) support
within the Net-SNMP C API.  I am currently linking against Net-SNMP
v5.4.2.1.  Thank you for your time.

-Brendan


1. Can I use the the same session concurrently with multiple threads?

    1A. Can a single library/snmp_api.h: struct snmp_session be shared
by multiple threads each crafting their own struct snmp_pdu's?  Or by
looking at utilizing the void *myvoid field of struct snmp_session,
must I use a separate struct snmp_session per thread?


2. Can I do asynchronous requests at the same time in multiple threads?

   2A. How is the callback implemented regarding signals and threads
(e.g. raise() vs. pthread_kill())?

   2B. Is it safe to make a thread-safe callback function and use it
as the callback function for all threads?  Will that produce the
expected behavior?


3. How should I use the authentication and privacy protocol OIDs?

   3A. Should I make a copy of the protocol OIDs before using them, or
is it safe to use them as const oid*?

   3B.  In snmplib/keytools.c: generate_Ku() function in the snmp apps
source code:  Why do the apps copy the OIDs for the AUTH and PRIV
protocols to separate memory locations, then pass the copies to
generate_Ku()?


4. Are there any particular interactions between multiple threads and
version 3 that I should be aware of, especially after reading
README.thread?

------------------------------------------------------------------------------
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