|
I am trying to send both v1 and v2c traps and am having problems
figuring out the right way to do it.
Originally I thought that I should have two MIBs, one with a TRAP-TYPE definition and one with a NOTIFICATION-TYPE definition. I then made calls to send_trap_vars() and send_v2trap() figuring that send_trap_vars() would send the v1 traps and send_v2trap() would send the v2c trap. When testing this I discovered that both functions convert the PDU to the correct type based on the directive in snmpd.conf so I got two traps. So I checked the man page for send_v2trap and found out it it's working the way it's supposed to. Since send_v2trap() converts the PDU to the appropriate version I don't need to also call send_trap_vars(). The problem is that when the PDU is converted it does not change the OID. This behavior suggests that there should be a single OID for the v1 trap and the v2c trap. Now I'm not sure how to setup the MIBs. Do I have one MIB that uses the TRAP-TYPE definition and assume that a v2c client would do the appropriate conversion? The FAQ: Can I use SNMPv1 requests with a SNMPv2 MIB (or vice versa)? (http://net-snmp.sourceforge.net/wiki/index.php/FAQ:General_15) is not clear if it applies to traps or not. The other thought I have had was to still use two MIBs one with a TRAP-TYPE definition and one with a NOTIFICATION-TYPE definition but force them to use the same OID. It's not clear how to do that well since there will be conflicting registrations. Do I simply not register one of the MIBs? What is the best way to do this? My main concern is getting the OID in the trap to match the MIB. Thanks for you help, Scott |
------------------------------------------------------------------------------ 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
