Segmentattion fault when calling *add_v1_trap_destination*

Frank Fock Frank.Fock____t-online.de
Tue Mar 4 20:23:44 CET 2003


Hi Bjoern,

In order to be able to use the NotificationOriginator
class, the snmp_target_mib and snmp_notification_mib
have to be created and added to the Mib instance.

Otherwise, you will get a SIGSEGV (although in some
common cases a error message is logged instead).

Hope this helps.

Best regards,
Frank

Bjoern.Schorre____RSBICK.rohde-schwarz.com wrote:
> Hi all,
> 
> When calling the method *add_v1_trap_destination* my program runs in a
> segmentation fault. Here*s a piece of the code.
> 
> -------------------------------------------------------
> Includes
> -------------------------------------------------------
> #include <stdlib.h>
> #include <signal.h>
> #include <iostream.h>
> 
> #include "agent++.h"
> #include "log.h"
> 
> #include "system_group.h"
> #include "snmp_group.h"
> 
> #include "snmp_target_mib.h"
> #include "snmp_notification_mib.h"
> #include "notification_originator.h"
> #include "notification_log_mib.h"
> 
> #include "snmp_community_mib.h"
> #include "oid_def.h"
> 
> //#include "agentpp_simulation_mib.h"
> //#include "agentpp_notifytest_mib.h"
> //#include "agentpp_test_mib.h"
> 
> //#include <mib_policy.h>
> //#include <vacm.h>
> -------------------------------------------------------
> 
> 
> -------------------------------------------------------
> Code
> -------------------------------------------------------
>   UdpAddress dest("127.0.0.1/162");
>   NotificationOriginator no;
>   cout << "Marke 01" << endl;
>   no.add_v1_trap_destination(dest);
> -------------------------------------------------------
> 
> 
> -------------------------------------------------------
> Output
> -------------------------------------------------------
> systest at giraffe:~/henning/agent++/examples/bsc_test/src > agent
> 20030304.16:41:46: 6534: (1)EVENT  : main: SNMP listen port: (4700)
> 20030304.16:41:46: 6534: (1)DEBUG  : TaskManager: thread started
> 20030304.16:41:46: 6536: (1)DEBUG  : Thread: started (tid): (1026)
> 20030304.16:41:46: 6534: (1)DEBUG  : TaskManager: thread started
> 20030304.16:41:46: 6537: (1)DEBUG  : Thread: started (tid): (2051)
> 20030304.16:41:46: 6534: (1)DEBUG  : TaskManager: thread started
> 20030304.16:41:46: 6538: (1)DEBUG  : Thread: started (tid): (3076)
> 20030304.16:41:46: 6534: (1)DEBUG  : TaskManager: thread started
> 20030304.16:41:46: 6534: (3)DEBUG  : MibContext: adding MIB object
> (context)(oid): (), (1.3.6.1.2.1.1)
> 20030304.16:41:46: 6534: (3)DEBUG  : MibContext: adding MIB object
> (context)(oid): (), (1.3.6.1.6.3.13.1)
> Marke 01
> Segmentation fault
> systest at giraffe:~/henning/agent++/examples/bsc_test/src > 20030304.16:41:46:
> 6539: (1)DEBUG  : Thread: started (tid): (4101)
> -------------------------------------------------------
> 
> 
> Looking forward
> Bjoern
> 
> 
> 
> 
> 
> 







More information about the AGENTPP mailing list