Hi Dave, Thank you very much for your advice. I will try.
Another question about linkup trap, can I just use only 1 varbind list to send all the interfaces generated linkup trap? I mean by using "snmp_varlist_add_variable", bind all the interfaces into the same list one by one. Thanks Li -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Shield Sent: Tuesday, August 22, 2006 10:29 AM To: Li Gan Cc: [email protected] Subject: Re: how can I send linkUp trap in my code On 22/08/06, Li Gan <[EMAIL PROTECTED]> wrote: > But when the program running into the second interface, > by debugging, when arriving "snmp_varlist_add_variable", the program dumped. Ah. I see a problem. You're freeing the previous varbind list at the end of the loop, but the linktrap_vars variable is still pointing to this (now invalid) varbind structure. So following this chain may well trigger a crash. Try clearing the linktrap_vars variable immediately after freeing it. > Another question: for the second interface, the if_index_oid is > {1,3,6,1,2,1,2,2,1,1,1} or {1,3,6,1,2,1,2,2,1,1,2} ? > ^^^ ^^^ It'll be 1.3.6.1.2.1.2.2.1.1.2 (assuming that the index is 2) Dave ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
