On 21/09/2007, vsaavedra <[EMAIL PROTECTED]> wrote:
> I'm trying to implement a netsnmp subagent, and I'm having some problems.


> u_char *var_table_app_type(struct variable *vp, oid * name, size_t * length,
>                     int exact, size_t * var_len, WriteMethod ** write_method)
> {
>      if (header_simple_table
>          (vp, name, length, exact, var_len, write_method, 
> col_size[vp->magic]))
                  [snip]


> In my function u_char *var_table_XXX() , how can I retrieve the first and
> second indexes of the table  applicationTable ?


If you are implementing new code, then we would *strongly* suggest that
you use the new v5 handler-based API.    With the traditional UCD-style
MIB code, you've effectively got to unpick the OIDs manually to extract
the index values.
     The v5 table helper will do this for you, and provide the index values
as fields in one of the parameter structures.   Other helpers can even
assist with selecting the appropriate row from the internal representation
of the table.   This would significantly simplify the code that you have
to supply.

See the CODING section of the FAQ, and various example MIB
implementations for more info.

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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

Reply via email to