What's an easy to use SNMP client library for c++?
Asked
Active
Viewed 4.2k times
4 Answers
21
SNMP++ is also a nice and open source library for C++ developers.
-
Easier to use than net-snmp in my opinion... – Chris M. Mar 29 '10 at 09:46
-
looks nice and simple. Is it really? is it robust and reliable? – f4. Apr 06 '10 at 14:45
-
1Why not evaluate it? It's open source so you can feel free to try it out. – Lex Li Apr 07 '10 at 00:56
-
I will. But I'm on a tight schedule and I'd better not lose time with a poor library :) anyway it looks ok for now – f4. Apr 07 '10 at 09:59
-
AES 192 encryption failed for me using this library – Antarus Jun 23 '14 at 09:10
-
1There exists at least two different AES192 implementations: 1. That one that was defined in a IETF draft. That has been originally implemented by SNMP++ (https://agentpp.com) and SNMP4J. 2. An implementation that was part of many Cisco devices which used a different algorithm than in the IETF draft. Most likely Antarus tested with a Cisco device. The second AES192 implementation is now also available in SNMP++ and SNMP4J. – ooSNMP Oct 05 '15 at 20:12
12
Probably the best choice is net-snmp. Note that the library has "C" linkage but will work just fine with C++.
![](../../users/profiles/19674.webp)
Jon Trauntvein
- 4,131
- 6
- 37
- 65
5
I have found that Net-SNMP does not support multi-threading with v3 type queries. So if you are writing an SNMP monitoring tool that will be polling multiple hosts then you will need to take this into consideration.
![](../../users/profiles/338713.webp)
initzero
- 782
- 9
- 12
1
OpenSNMP contains a complete multi-threaded implementation of SNMPv3 that is done in C++ (complete with classes, etc). It's not heavily used and maintained though.
Net-SNMP with v3 over TLS/DTLS is likely to be threadsafe as it's really SNMPv3/USM that contains threading issues. I think.
![](../../users/profiles/115526.webp)
KayEss
- 2,210
- 14
- 31
![](../../users/profiles/473770.webp)
Wes Hardaker
- 19,386
- 1
- 35
- 63