SNMPV3 Trap listner

Hello,

  1. There are two options for the trap receiver: If the discovery mode of the USM is disabled, you have to add the localized users to the USM with the engineId of the trap sender. If you enable the discovery mode of the USM and add the users with passwords to the USM, then the USM is able to create the localized users, whenever a trap is received.
  2. Yes, it is tried to fetch the user information using the user name and engine id. In other words, as in the first question: If you want to keep the discovery mode disabled, you will have to find out the engineId and add the users for each engineId to the USM. With enabled discovery mode, only the users with their passwords have to be added to the USM and the localized users are created automatically.

Edit: The following is related to snmp++ and not to SNMP4J:

You can have a look at consoleExamples/receive_trap.cpp which receives SNMPv3 traps that can be sent using the consoleExamples/snmpTraps.cpp with the following command line:
./snmpTraps 127.0.0.1 -P10162 -v3 -snMD5DES -authMD5 -privDES -uaMD5DESUserAuthPassword -upMD5DESUserPrivPassword

Kind regards,
Jochen