Hi all, I developed one enterprises specific mib & has only NOTIFICATION-TYPES and varbinds defined.
Using mib2c.notification.conf generated templates and did following changes in this template, the template C file look like as follows: [code] <include files> static oid snmptrap_oid[] = { 1, 3, 6, 1, 6, 3, 1, 1, 4, 1, 0 }; int send_xxx_trap() { defines netsnmp_variable_list *var_list = NULL; defines trap oid & varbind oids oid trap_oid[] = {x.x.xx.x}; oid varbind1[] = {w.w.w.ww.w}; oid varbind2[] = {z.z.z.z.z}; calls snmp_varlist_add_variable() to add trap_oid to var_list calls snmp_varlist_add_variable() to add varbind1 & varbind2 oid with their values to var_list send_v2trap(var_list); } [/code] I have other mibs implemented for get/set operations that I compiled as a module, in this same module I have added this above notify mibs code. This code will invoked by set operations Now for sending traps as per tracings the code calls send_v2trap() function but I didn't receive any trap on trap receiver. I didn't saw any error or warning messages on snmpd executed with -Dwarning -Derror -Dinfo -Dtrap options. The snmpd.conf has following lines: trap2sink localhost public trapcommunity public Do we have to register the mib to net-snmp framework? but the template didn't generated any such code Does snmpd.conf needed more config lines for send_v2trap()? The traces shows following line at send_v2trap() trap: trap: send_trap -1 -1 send_trap -1 -1 NET-SNMP-MIB::netSnmpAgentOIDs.10NET-SNMP-MIB::netSnmpAgentOIDs.10 Can anyone explains what wrong happened why am not seeing traps on my localhost snmptrapd? Thanks... -- Rakesh P. Zingade +919420626099
------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders