On Fri, 2006-03-03 at 08:31 +0000, elias bou rahal wrote: > /* after the parsing of my private mibs that 's contain many tables */ > i register my variable by using this function: > register_mib_range(descr, > (struct variable *)var, > sizeof(struct vartype), > var_len, theoid, > sizeof(theoid)/sizeof(oid), > DEFAULT_MIB_PRIORITY, 1, 1, NULL)
Oh. That seems to be using the old (UCD v4) MIB API. I was assuming that you were using the newer v5 API. Sorry. > if i define an index in the mib for a table how can i > register this index after these functions above? If you're using the v4 API, then the table is registered as an opaque block. The agent toolkit code won't touch the index processing at all - that is the responsibility of your handler routine. If you were using the v5 API approach, then the init routine would typically include a call to netsnmp_table_helper_add_indexes which would list the index syntax. > my solution for this problem is to construct the oid manually in the > var_filename() function by manually parsing the mib to get the index and > then construct the oid with index and return it as argument sturct oid > name to var_filename() Yup - with the v4 API, that's exactly what you have to do. Dave ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ 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
