2009/9/1 sandeep patra <[email protected]>: > I am writing a snmp subagent (say name xyz), whose purpose is to capture all > v2traps send out by the snmp master agent.
I'm not sure that will be possible. The master agent and the subagent are separate processes. The only communication between them is as specified in the AgentX protocol. This doesn't support sending notifications from the master agent to the subagent. All I can suggest is that you code your subagent to also act as a trap receiver, listening on a suitable port, and configure the master agent to use this port as (one of) the trap sink destinations. > for this in the init_xyz() function i have registered a callback function > for v2trap using below lines > > snmp_register_callback(SNMP_CALLBACK_APPLICATION, > SNMPD_CALLBACK_SEND_TRAP2, notificationV2_callback, NULL); No - that won't work. The callback mechanism is purely concerned with what's happening within a single process. It doesn't support inter-process callbacks, Dave ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
