[APP-63]: Removed usage of static v3MP::I

Hi Frank,

I was just digging around in the archives because I was curious what differences there maybe between the snmp++ version im using (3.3.10) vs snmp++ 3.5. I noticed in release announcement SNMP++ Release 3.4.0 that this, “Removed usage of static v3MP::I instance to allow using several Snmp sessions with independent v3 message processing models within a single process.”

Is there something inherently wrong with using static v3MP::I?
In our current setup we have a snmp agent that starts up on one thread. Then at a later time we have a snmp Trap receiver on another thread. We then use the static v3MP::I

Snmp_pp::v3MP* m_v3_MP = Snmp_pp::v3MP::I;
m_usm = m_v3_MP -> get_usm();

I believe we needed to do this because when the agent is initialized it creates the Snmp_pp::v3MP object and it gets assigned some engine ID. If we were to do the same with the trapreciever I believe we ran into an issue with the engine IDs running into conflict with one another. So to circumvent this we just grab the static pointer to the v3MP object and append our USM users there.

If we were to upgrade to version 3.5 would this be an issue for us?

No, it is still safe to use the static v3MP::I. It will not b e removed (at least until the next major release update, which is not planned yet).
If you want to remove the static instance usage, you can do this then too. With the newer version, you just have the option.