On 23 January 2010 05:33, Alexander King <[email protected]> wrote: > But I do not know how to implement the trap in the MIB file
"Implementing a trap" means writing code to construct and send the trap, and invoking this at the appropriate time. This is handled (at least in part) by the mib2c template "mib2c.notify.conf" > the trap is a part of the MIB file,and traps have their own OIDs Correct. > and related some specific OBJECT-TYPE value(s), Typically, yes. Those related OBJECT-TYPE values are often accessible to GET* requests, as well as being included in the payload of the relevant traps. But these payload OIDs are different from the OID of the trap itself. Don't get the two confused. > how to define the trap can make the walk routine donot walk it? If the agent does not include code to handle incoming requests for a particular OID, then walking the agent will ignore that OID. In particular, if you don't register a given OID, then the walk will ignore it. The code generated by mib2c.notify.conf does not include any registration of the OID. Contrast this with the code generated by the other (OBJECT-TYPE) mib2c templates. > All I need is some prototype for my reference,so I can imitate, > modify,implement in my project.(I know it is hard to find one,they are all > difference.) Why not start with the code in 'agent/mibgroup/examples/notification.c' ? That's probably as simple a setup as you're likely to find. Dave ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
