Hello list,

this is my first post here, so hope I don't get too flamed (at least
not yet). :)

I'm implementing a few traps using net-snmp 5.2.3 (know it isn't the
latest, but it's stable), but looks like I'm missing something. When I
ran snmpd, it gave me this error everytime my send_trap function was
called:

"send_trap: no v2 trapOID varbind provided"

(running with snmpd -f -Le -c snmpd.conf).

I google'd a lot, and saw some posts in this discussion list that
linked to the net-snmp documentation (which I've read a few times
already), but no complete answer was given.

My code looks something like this:

/* ...code snip... */
    // function header above, only
    netsnmp_variable_list *var_list = NULL;
    oid dlswCircuitS1Mac_oid[] =  { DLSWTRAP_CIRCUITS1MAC_OID, S1 };
    // a few other oids

    snmp_varlist_add_variable(&var_list,
                              snmptrap_oid, OID_LENGTH(snmptrap_oid),
                              ASN_OBJECT_ID,
                              dlswTrapCircuitUp_oid,
                              OID_LENGTH(dlswTrapCircuitUp_oid));
    snmp_varlist_add_variable(&var_list,
                              dlswCircuitS1Mac_oid,
                              OID_LENGTH(dlswCircuitS1Mac_oid),
                              ASN_OCTET_STR,
                              router_ptr->circuit[S1].S1Mac.string,
                              router_ptr->circuit[S1].S1Mac.len);
    // more snmp_varlist_add... below

/* ...code snip... */

Am I missing something? What can be wrong?

Thanks for helping out, net-snmp is great!

-- 
[EMAIL PROTECTED]

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to