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