Agent++ 4.6.1 how to do trap version 3 for multi agent

In examples\multi_agent\src\agent.cpp, there is an example how to set-up and add trap version 1 for multiple agent.

Vbx* vbs = 0;
coldStartOid coldOid;
NotificationOriginator no;
// add an example destination
UdpAddress dest(127.0.0.1/162);
no.add_v1_trap_destination(dest, defaultV1Trap, v1trap, public);
// send the notification
mib->notify(, coldOid, vbs, 0);

Do we have any example how to set-up and add version 3 trap for multiple agent?

virtual bool add_v3_trap_destination(const NS_SNMP UdpAddress& addr,
				     const NS_SNMP OctetStr &name,
				     const NS_SNMP OctetStr &tag,
				     const NS_SNMP OctetStr &secName,
				     const int secLevel);

Besides secName and secLevel=3, do we need to set-up anything for security authentication and security privacy separately like we add a user to the table and to USM?

uut->addNewRow("SHADES",
               SNMP_AUTHPROTOCOL_HMACSHA,
               SNMP_PRIVPROTOCOL_DES,
               "SHADESUserAuthPassword",
               "SHADESUserPrivPassword", engineID, false);

Hi, please have a look at the code of add_v3_trap_destination(). This function only offers a small part of the configuration possibilities. If you can live with the limitations of the function, call it for each agent (addr, secName, secLevel) with unique values of name and tag.

You will have to add the needed users to the USM (through the USM user table).

Best regards,
Jochen