2009/1/27 lanas <[email protected]>: > What seems to happen is that the %W format option of snmptrapd will > always return 'Cold Start'. In the example above it is clearly a > linkUp trap: > > SNMPv2-MIB::snmpTrapOID.0 = OID: IF-MIB::linkUp > > But &W is neverthless 'Cold Start'.
The formatting codes '%w' and '%W' are only relevant to SNMPv1 traps. They report the 'trap_type' field of an SNMPv1 trap header. SNMPv2 notifications (both SNMPv2c and SNMPv3) do not use the same header structure, and so do not have a 'trap_type' field. This value is therefore always 0. > So, should one do without using this %W format option and parse the > actual trap ? If you are working with SNMPv2-style traps, then yes - use the snmpTrapOID varbind. Dave ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
