Thank you very much for your answer.


I tried to look for the examples you suggested, but I couldn't find any
example.



I'm sorry, I'm not trying to be lazy, but I'm still very green in SNMP and I
couldn't find and understand any example of what you suggested.



Can you please give me a simple example of how could I replace my
var_table_app_type function with the use of the new v5 handler-based API?



Thank you very much once again.


----- Original Message ----- 
From: "Dave Shield" <[EMAIL PROTECTED]>
To: "vsaavedra" <[EMAIL PROTECTED]>
Cc: <[email protected]>
Sent: Friday, September 21, 2007 5:04 PM
Subject: Re: Double Index tables


> 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
>


-------------------------------------------------------------------------
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