[SOLVED] error message when attempting to send a trap: send_trap: no v2 trapOID varbind provided

Stéphane Charette <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CA+HxBULDBnUmaZREfz-42=BXC_b2tUbFcOMdkNXWSoXbTMTKTw@mail.gmail.com>
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

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.