From: Stéphane C. <ste...@gm...> - 2012-04-18 21:14:13
|
Took me a while to figure this out, so I figured I'd send it to the list for future mailing list search results. Maybe this will help someone else running into the same issue. I have an app that calls functions generated by "mib2c -c mib2c.notify.conf myTestMib". Those functions should be triggering trap notifications, but instead I was getting this error message: send_trap: no v2 trapOID varbind provided Turns out there is 1 additional API that needs to be called which isn't in the generated code. Prior to calling the trap functions, you must remember to call init_traps(). See: #include <net-snmp/agent/agent_trap.h> (In my case, this is using net-snmp 5.4.2.1 on Ubuntu 10.04.) Stéphane Charette |