What's an easy to use SNMP client library for c++?
Asked
Active
Viewed 4.8k 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
-
2There 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
-
Is there any Code example or some kind of "Get Started" tutorial available? All I can find is the class documentation over here: https://www.agentpp.com/doc/snmp++3.x/index.html – Sparkofska Nov 26 '21 at 06:31
13
Probably the best choice is net-snmp. Note that the library has "C" linkage but will work just fine with C++.

Jon Trauntvein
- 4,453
- 6
- 39
- 69
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.

initzero
- 852
- 11
- 13
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.

KayEss
- 2,290
- 15
- 31

Wes Hardaker
- 21,735
- 2
- 38
- 69