On Tue, 2005-06-14 at 06:07, partha wrote:
> For you referrence I am attaching the souce code with you .
> Please let  me know what is wrong

Well for a start, you're not providing all the index
information.

When you register the table, you say it has two indexes:


>     netsnmp_table_helper_add_indexes(table_info,
>                                   ASN_INTEGER, /* index: iwsInstanceIndex */
>                                   ASN_INTEGER, /* index: iwsCpuIndex */


But in the 'get_first_data' hook routine, you only supply one of them:

>     vptr = put_index_data;
>     snmp_set_var_value(vptr, (u_char *) &firstNode->iwsCpuIndex,
>                                   sizeof(firstNode->iwsCpuIndex));
>     vptr = vptr->next_variable;

And you're putting the second index value into the first varbind.
This ought to contain the iwsInstanceIndex value, and the *second*
varbind (put_index_data->next_variable) should take the iwsCpuIndex
value.
  That's what you've documented in the registration code, anyway.

And the same in the 'get_next_data' hook routine as well.


I suggest you get things working with a normal iterator helper first,
before you start worrying about how to add the cache handler.

Dave



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to