On 25 February 2011 08:03, Giuseppe Modugno <[email protected]> wrote: > I thought sending traps and managing GET/SET requests were two different > tasks usually performed by two different processes.
Sending traps and responding to GET/SET requests are two different tasks, yes. Whether they are handled by two separate processes, or a single combined application (or both) is up to the developer. The SNMP application framework (RFC 3414) describes these roles individually to _allow_ this separation of functionality, rather than to enforce it. So an SNMP agent will typically act as both a "Command Responder" and a "Notification Originator", while the Net-SNMP 'snmptrap' command is purely a "Notification Originator". > I have already a running agent extended with a private MIB. So I think it's > better to include in this part of the agent also the trap sending. If the trap is intended to report on a particular event (such as the detection of some error condition in a given subsystem), then the two natural places to generate the trap are either the MIB module that monitors this subsystem, or the code for the subsystem itself. Having the subsystem trigger the trap directly is the most efficient approach but does require adding adding SNMP-specific code (which may not be desirable or even possible). Handling this within the MIB module code, which already knows about SNMP *and* this particular subsystem, is a very sensible (and commonly used) alternative. Particularly if the MIB module will be re-loading the data on a regular basis anyway (or can be informed if there is a "significant change") Dave ------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
