Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Is Net-SNMP thread safe?

net-snmp safe thread
0
Posted

Is Net-SNMP thread safe?

0

Strictly speaking, no. However, it is possible to use the library within a multi-threaded management application. This is covered in detail in the file README.thread (shipped with the standard distribution), but can be summarised as follows: • Call ‘snmp_sess_init()’ prior to activating any threads. This reads in and parses MIB information (which isn’t thread-safe) as well as preparing a session structure for subsequent use. • Open an SNMP session using ‘snmp_sess_open()’ which returns an opaque session handle, which is essentially independent of any other sessions (regardless of thread). • Resource locking is not handled within the library, and is the responsibility of the main application. The Net-SNMP agent has not been designed for multi-threaded use. It should be safe to use the agent library to embed a subagent within a threaded application as long as *all* SNMP-related activity (including generating traps, and parsing MIBs) is handled within a single thread. The command-line too

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.