On 20/09/06, Toth, Gregory S <[EMAIL PROTECTED]> wrote:
> How do I setup the indexes in the "get_first_data_point" method?  Is it
> something like this:

[snip]

Right general idea, but a couple of problems:



>     snmp_set_var_value(vptr, (u_char *) &this_name ,
>                        sizeof(this_name) );
>     vptr = vptr->next_variable;
>     snmp_set_var_value(vptr, (u_char *) &this_page ,
>                        sizeof(this_page) );

This is the wrong way round.
    You defined the table as UNSIGNED followed by OCTET_STR,
but set the index values as OCTET_STR followed by UNSIGNED.

The indexes set up here must match the original definition of the table.

The string-based index should also be set using "strlen", rather than
"sizeof" (since you've defined this buffer as a SPRINT_MAX_LEN).

Dave

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to