Hi, I'd like to receive Snmp traps in a C++ application. In order to do that, I've open a socket listening on the port udp 162. My application receive the traps, but I don't know how to decode them.
For example, if I send : snmptrap -v 1 -c evitech 127.0.0.1 UCD-TRAP-TEST-MIB::demotraps "" 6 17 "" SNMPv2-MIB::sysLocation.0 s "Just here" I receive (in hexa) : 30 45 2 1 0 4 7 65 76 69 74 65 63 68 a4 37 6 a 2b 6 1 4 1 8f 65 d 87 5e 40 4 c0 a8 a 46 2 1 6 2 1 11 43 4 0 b8 5e 63 30 17 30 15 6 8 2b 6 1 2 1 1 6 0 4 9 4a 75 73 74 20 68 65 72 65 If I translate that in char, I can read the community name (evitech) and the string "just here". Did someone know if there is any method in the net-snmp library which decode the trap, and give all the informations logged by snmptrapd (particulary OID and values of the variables). I sought in the source code of snmptrapd but did'nt found anything. Thanks for your help. Violette ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users