I’ve been assigned to implement snmpv3 on a product that is currently using snmpv1 with snmp++v3.2.25. I am new to this and having been having a lot of difficulty all week trying to transform the current GET to get data from a remote system I have snmpv3 set up on. To simplify it even further, i have it set to NoAuthNoPriv.
In the get_integer function we have, we called the snmp get function, passing in the pdu with the oid of the device, a ctarget, a callback function where it checks for errors and then sees which functions to call after. Going off the API documentation for snmp++, I’ve been putting together something I think makes sense but with no luck.
What I’ve done so far is I created a v3MP which also creates a USM. I then set the USM discovery mode on and I add the user that I have set up on the remote device (security name with no authentication and no encryption).I made a constructor for UTarget that assigns the remote device address to it and I hard-coded the same security name as in the USM and remote device. I have the security model parameter set to 1 (not too sure what this is). I have switched to using a UTarget in the snmp get function but I can’t seem to receive a value (when looking at the pdu received in the callback function).
I’m not too sure if I am missing some major component or am completely misunderstanding something. I don’t see how the USM is connected to the snmp get function I call. Does the UTarget get the user from the USM based off the security name?
Sorry for how clueless I probably sound.