[AGENT++] few questions about UTargets and SNMPv3 trap sending
Dario maljur
dmaljur at elma.hr
Mon Oct 16 14:00:24 CEST 2006
Hi all
1. If UTarget is used for sending SNMPv3 traps and CTarget for v1, and
v2c, why is important to set version in target?
2. When trying to use UTarget and setting security name and specifying
priv and auth level to noAuth and noPriv, trap returns value SUCCESS (0),
DEBUG is :
INFO : v3MP: Message build OK
DEBUG : SNMPMessage: v3MP return value for build message: (-1401).
But trap still isn't received by manager.
What does (-1401) stands for? Is it connected with USM and v3MP?
I think that all my user init is set ok.
My InitRootMib function looks like this:
#ifdef _SNMPv3
MibTableRow *pRow;
userSecurityTable = new UsmUserTable();
pRow =
userSecurityTable->addNewRow("public",SNMPv3_usmNoAuthProtocol,SNMPv3_usmNoP
rivProtocol, "", "");
pRow =
userSecurityTable->addNewRow("Dario",SNMPv3_usmNoAuthProtocol,SNMPv3_usmNoPr
ivProtocol, "", "");
rootMib->add(new UsmStats());
rootMib->add(new usm_mib(userSecurityTable));
rootMib->add(userSecurityTable);
rootMib->add(new V3SnmpEngine());
#endif
And my Initv3MP function look like this:
int iErr = 0;
v3mp = new v3MP(engineID, engineBoots, iErr);
USM *usm = v3mp->get_usm();
v3mp->add_to_engine_id_table(this->engineID,"127.0.0.1",162);
iErr = usm->add_usm_user("Dario", SNMPv3_usmNoAuthProtocol,
SNMPv3_usmNoPrivProtocol,"", "");
agent_log->AppendLog("I_cAgentEngine::InitV3MP: add user iErr =
%s",Snmp::error_msg(iErr));
iErr = usm->add_usm_user("public", SNMPv3_usmNoAuthProtocol,
SNMPv3_usmNoPrivProtocol,"", "");
agent_log->AppendLog("I_cAgentEngine::InitV3MP: add user iErr =
%s",Snmp::error_msg(iErr));
More information about the AGENTPP
mailing list