>JJJ> When I send a trap from my subagent (AgentX), the enterprise >JJJ> OID field of the V1 trap is always .1.3.6.1.4.1.8072.3.2.10. >JJJ> I actually want it the be a different one > >DTS>I've just tried this with the current code, and it works as expected. >DTS> b) What's the exact 'send_enterprise_trap_vars()' call you're making > >JJJ> send_enterprise_trap_vars (6, 0, obj_ID, 13 * 2, &var_obj); > >And how is 'obj_ID' defined and initialised? > >I'm not sure your size is right either - the OID that you mention >(.1.3.6.1.4.1.343.1000.2) has nine subidentifiers, rather than 26. >Not that I would expect this to cause the problems you're seeing, >but it's worth fixing, just in case.
obj_ID is initialized as: static oid obj_ID = { 1,3,6,1,4,1,343,2,10,3,5,1000,10,1 }; There are 14 sub identifiers (not 9 as I said earlier, sorry), and only with this length 26 (13 * 2) I'm able to get the complete OID in TRAP. If I give 14, then the TRAP has only half of it. This behavior is noticed on Net SNMP v 5.0.8/9. But in UCD snmp 4.x, length as 14 works properly. I'm not sure what changed from then. >The other difference between your code and my quick test is that >I didn't add any other varbinds to the trap. So it might be worth >temporarily replacing "&var_obj" by NULL - again, just in case. Done this, not any different. >> >Are you sending the trap from the main SNMP agent, or are you >working with an AgentX subagent? I'm sending traps from the AgentX subagent. > >Dave In windows SNMP API, the notification oid can be set to whatever required each time a trap is sent. Thankyou! ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ 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