Cannot make SNMPv1-connect to agent with SNMPv3 disabled/deleted
Bjoern.Schorre____RSBICK.rohde-schwarz.com
Bjoern.Schorre____RSBICK.rohde-schwarz.com
Wed Mar 5 10:39:32 CET 2003
Hi,
I tailered the example *atm_mib* from the "agent++-archive" to get a very simple
agent, with only the *sysGroup* and *snmpGroup* supported. Aftre this I'm going
to add some own MIBs.
Unfourtnatley, after deleting all SNMPv3-Code my agent results in the errors
below.
1.
I'm just trying to connect to my agent via SNMPv1. When contacting the agent
crashes with a *segmentation fault*.
--------- Init MIB ------------------------------------------
void init(Mib& mib)
{
OctetStr sysDescr("bsc_test");
mib.add(new sysGroup(sysDescr.get_printable(), "1.3.6.1.4.1.4976",
mib.add(new snmpGroup());
mib.add(new snmp_target_mib());
mib.add(new snmp_notification_mib());
// mib.add(new agentpp_notifytest_mib());
// mib.add(new agentpp_test_mib());
}
---------------------------------------------------
------- Main --------------------------------------------
[...]
mib = new Mib();
reqList = new RequestList();
// register requestList for outgoing requests
mib->set_request_list(reqList);
init_signals();
// add supported objects
init(*mib);
// load persitent objects from disk
mib->init();
reqList->set_snmp(&snmp);
Vbx* vbs = 0;
coldStartOid coldOid;
NotificationOriginator no;
UdpAddress dest("172.20.16.245/162");
cout << "Marke 01" << endl;
no.add_v1_trap_destination(dest);
cout << "Marke 02" << endl;
// no.generate(vbs, 0, coldOid, "", "");
cout << "Marke 03" << endl;
Request* req;
while (run)
{
req = reqList->receive(2);
if (req)
{
mib->process_request(req);
}
else
{
mib->cleanup();
}
}
delete mib;
return 0;
}
---------------------------------------------------
2.
The second question is, the agent will also crashes, when trying to send a trap:
// no.generate(vbs, 0, coldOid, "", "");
Perhaps both problems bases on the same error - I don't know.
Best regards
Bjoern
More information about the AGENTPP
mailing list