I am using ucd-snmp-4.2.5.
I have everything running in the agent i.e. snmpget, snmpset etc. But as
shown in example.c, if I trigger send_v2Trap() through a snmpset call
then the agent gives segmentation fault. i.e. I make a snmpset on a
particular column and within its write function I call send_v2Trap with
necessary parameters. And it gives seg. fault. If I don't call
send_v2Trap then it works fine.

I tried sending traps by another way i.e. creating a separate thread at
the start of agent after     
init_agent("snmpd");                /* do what we need to do first. */
init_mib_modules();
/* start library */
init_snmp("snmpd");
createThread(); // here I create a separate thread which calls a
separate function which further use send_v2Trap to send traps at an
interval of 10 secs.

This way it works fine and I can do snmpget/set also in parallel. But I
don't understand why it fails if I do it like as it is explained in
example.c. Does it clash somewhere?

Thanks
Soni


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to