[AGENT++]how to send a trap?
Frank Fock
fock at agentpp.com
Wed Jul 28 18:04:54 CEST 2004
Hi Jerry,
As written a couple of times now here on the list,
the NotificationOriginator::add_*_trap_destination
methods are *examples* only, that most likely will
not be suitable for production needs.
Nevertheless, you can use these examples or your
own derived implementation to configure the
destinations (or even better configure the destinations
using SNMP SET requests on the SNMP-TARGET-MIB and
SNMP-NOTIFICATION-MIB), even though you use the
MIB::notify method.
When you get an access violation, then you most likely
have not created and added the snmp_target_mib and the
snmp_notification_mib to your Mib instance.
Best regards,
Frank
Jerry OELoo wrote:
> hi all
> I have sent a notification with code as shown below:
> coldStartOid coldOid;
>
> NotificationOriginator no;
>
> UdpAddress dest("127.0.0.1/162");
>
> no.add_v1_trap_destination(dest);
>
> no.generate(vbs, 0, coldOid, "", "");
>
> but when i run the program,it crashes and shows :0xC0000005: Access
> Violation.
> I want to know why? and I have found something in the maillist:
> Frank Fock recommend to use theMib::notify method.
> but as this method ,how do I configure the manager' address and port ?
> Thanks in advance!
>
> Jerry
>
> _________________________________________________________________
> 与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn
> _______________________________________________
> AGENTPP mailing list
> AGENTPP at agentpp.org
> http://agentpp.org/mailman/listinfo/agentpp
>
More information about the AGENTPP
mailing list