[AGENT++] SNMPv3_ parallel access

Jochen Katz katz at agentpp.com
Wed Dec 12 00:32:18 CET 2007


Hi,

> We are seeing some issues with SNMPv3 and parallel concurrent snmpv3
> access to v3 agents on network devices.

> OR (our usage explanation)

> At this point in our library (that uses snmp++) we cache a unique
> snmpv3 credential (identified uniquely by : sec user user, auth
> protocol,privprotocol , privpass and auth password) in memory and add
> it to  to the USM only once per thread  so as not to insert the same
> credential multiple times into USM in the same thread of execution  ,
> also each thread access the same snmpv3 agent only during its
> lifetime . Is this something that could cause the above problem in a
> multi threaded environment or is this the right way to proceed?

to make your code with passwords work, you will have do it like this
1) lock global mutex
2) add desired user with password
3) issue request
4) wait until response has been received
5) remove user
6) unlock global mutex

So you don't need any threads any longer ;-)

The right way for your scenario, is to add users using their localized
keys. This way you can add the needed user when contacting the agent for
the first time and keep it in USM until you're sure the agent does not
exist any longer.

Regards,
  Jochen



More information about the AGENTPP mailing list