Template:FAQ:Coding 24
From Net-SNMP Wiki
Revision as of 20:50, 20 July 2009 by Dts12 (Talk | contribs) (Latest FAQ revision - preparing for 5.5 release)
This is done in exactly the same manner as with the main SNMP agent.
Calling one of the routines described in 'snmp_trap_api(3)
' will cause
the AgentX sub-agent to send a notification to the master agent, which
will then pass this on to the configured trap destination(s).
One of the original design aims of the Net-SNMP AgentX support was that the agent (or subagent) framework should be transparent to a MIB module implementer. The interface between the agent framework and a MIB module should be independent of the protocol used to receive the original request. So the exact same MIB module code could be used within a traditional SNMP-only agent, or an AgentX subagent, with no changes needed.
This also holds for sending traps.