Hi all, and thanks for all your help,

I am attempting to write a subagent, and at the moment I'm a little confused 
about how to initiate my own coldStart/WarmStart traps.

The first problem I was facing was that these traps were already being sent by 
the agent with the enterprise of net-snmp, and not "mine" = the one in the 
system mib implemented by my subagent. I found the record that explained how to 
disable them, by removing the "send_easy_trap" calls in the agent code, and did 
just that.

Now I need to generate these traps without any additional varbinds.

I init a session as I do for all other enterprise specific traps I send - no 
problem there.
Then I tried both using send_easy_trap(0, 0), or send_v2trap (as I do for all 
the other traps) - with calling just
                        snmp_varlist_add_variable(
                                                &notification_vars,
                                                objid_snmptrap, 
objid_snmptrap_len,
                                                ASN_OBJECT_ID,
                                                (u_char *) 
coldStart_notification_oid_p, coldStart_notification_oid_len * sizeof(oid));

In both cases I get the trap coming with the snmpTrapEnterprise = 
SNMPv2-SMI::enterprises.8072.3.2.10..

I understand that I can change it manually (in my code), but I am missing 
something here: if I use send_v2trap as above, how and why is the 
snmpTrapEnterprise added? And where is it defined that the above enterprise 
value is sent?
And using send_easy_trap, it says in the documentation "the enterprise and 
enterprise_length paramater is set to the pre defined SYSTEM_MIB oid and length 
respectively". What exactly does that mean?

I apologize for the length, was trying to be clear.

Huge thanks in advance,

-Tanya
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
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

Reply via email to