SNMP Trap Query - Any thoughts?

BHARATKUMAR GERA <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
I will like to know regarding SNMP Trap OIDS issue I;m facing below - 

 

      - On RedHat 3 , my subagent code is able to send custom trap OID ( defined in custom mib ). 

       - On RedHat 4 / SUSE , with similar configuration , the subagent fails to send custom trap OID reporting "Var Bind Failure".

        On Changing the code to send "{ 1,3,6,1,6,3,1,1,4,1,0}; /* snmpTrapOID.0 */"  with my custom trap information  - it works ! Ofcourse the trap is sent as snmpTrapOID.0 as depcited in trap log file. 

 

 

I;m wondering if this is a configuration issue OR their is only provision to send snmpTrapOID.0 traps?  

 

On both RH4 and SUSE 9 - there are additional snmp files  files 

     - /usr/share/snmp/mib2c.notify.conf   - with entry static oid snmptrap_oid[] = {1, 3, 6, 1, 6, 3, 1, 1, 4, 1, 0};  

 

This file is NOT present in RH3. Though mib2c is only used for custom code generation - wondering? 

 

My code change is as below ----

 


 /* trap definition objects */
 memset(&var_trap, 0, sizeof(struct variable_list));

/#if 0   //  workaround to fix the problem of not showing event OID
 var_trap.name = objid_snmptrap; /* snmpTrapOID.0 */
 var_trap.name_length = sizeof(objid_snmptrap)/sizeof(oid); /* number of sub-ids */
//#endif

 //  workaround to fix the problem of not showing event OID
 //var_trap.name = eventOID;
 //var_trap.name_length = OIDLEN_14;
 //var_trap.val.objid = eventOID;
 var_trap.val.objid =  objid_snmptrap;
 var_trap.val_len = OIDLEN_14;
 var_trap.type = ASN_OBJECT_ID;
 var_trap.next_variable = &var_obj; /* next variable */

/#if 0
 fprintf(stderr, "systemManagement Event-----------:  \n");
 printOID(var_trap.name, var_trap.name_length, "var_trap.name");
 printOID(var_trap.val.objid, var_trap.val_len, "var_trap.val");
 printOID(eventOID, OIDLEN_14, "eventOID");
/#endif

 /* additional objects */

 

 

 

        




Send instant messages to your online friends http://uk.messenger.yahoo.com
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.