Template:FAQ:Coding 24

From Net-SNMP Wiki
Jump to: navigation, search

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.