On 21 May 2012 12:05, Suresh kumar <skjaiswa...@hotmail.com> wrote: > Int send_EnvOverTemp_trap() > { > const oid XXXConnCustName_oid[] = > { 1, 3, 6, 1, 4, 1, 4960, 2, 5, 1, 1, 3, 1, 14, /* insert index here > */ }; > // we need to add idex like 1000 dynamically
Is the index value fixed, or will it be specified at the time that the trap is sent? If it's fixed, then you'd simply use something like const oid XXXConnCustName_oid[] = { 1, 3, 6, 1, 4, 1, 4960, 2, 5, 1, 1, 3, 1, 14, 1000 }; If it's specified dynamically, then try something like int send_EnvOverTemp_trap( int idx ) { oid XXXConnCustName_oid[] = { 1, 3, 6, 1, 4, 1, 4960, 2, 5, 1, 1, 3, 1, 14, 9999 }; XXXConnCustName_oid[14] = idx; <etc> 9999 is simply a placeholder, which you then replace using the actual index value for this particular invocation. Dave ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ 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