2008/6/13 dan anderson <[EMAIL PROTECTED]>: > In an attempt to send traps from a standalone, I've done the following: > > create_trap_session("localhost", 0, "public", 1, SNMP_MSG_TRAP2); > init_traps(); > [ populate notification_vars ] > send_v2trap(notification_vars);
It's not clear what you mean by "a standalone". The 'send_v2trap' routine is part of the agent API. If you're working with a standalone application, then this won't work. You'll need to use 'snmptrap.c' as a template in this case. But from the rest of your post, it sounds as if you are working with some sort of agent. > When I step through in gdb, the sinks list is empty. That's normal. This list is a left-over from the early days of the project. Now, traps are handled by the Notification MIB module. That's the purpose of the SNMPD_CALLBACK_SEND_TRAP[12] calls towards the end of netsnmp_send_traps. > Does anyone happen to have sample code (I've searched!) > for sending a trap from a standalone? What do you mean by "a standalone"? Dave ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users