Re: about the problem of index

This is a discussion on Re: about the problem of index within the SNMP Coders forums, part of the Networking and Network Related category; [Sorry for the delay in responding] On 23/03/07, Clement Hsu <m934020022@gmail.com> wrote: > ... i ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-03-2007
Dave Shield
 
Posts: n/a
Default Re: about the problem of index

[Sorry for the delay in responding]

On 23/03/07, Clement Hsu <m934020022@gmail.com> wrote:
> ... i want to correct the
> result as following:
>
> IEEE802dot11-MIB::dot11GroupAddressesStatus.1.1 = INTEGER: active(1)
> IEEE802dot11-MIB:: dot11GroupAddressesStatus.2.2 = INTEGER: active(1)
>
> IEEE802dot11-MIB::dot11GroupAddressesStatus.3 .3 = INTEGER: active(1)
> IEEE802dot11-MIB::dot11GroupAddressesStatus.4 .4 = INTEGER: active(1)
>
> how to do that


You need to set both index values in your get_{first,next} hook routine.
Instead of simply:

vptr = put_index_data;
snmp_set_var_value(vptr, (u_char *)&LoopContext, sizeof(LoopContext));
vptr = vptr->next_variable;
return put_index_data;

which only sets the first index value, try

vptr = put_index_data;
snmp_set_var_value(vptr, (u_char *)&LoopContext, sizeof(LoopContext));
vptr = vptr->next_variable;
snmp_set_var_value(vptr, (u_char *)&LoopContext, sizeof(LoopContext));
return put_index_data;

which sets both indexes (to the same value).
I'm not convinced this is the correct behaviour for this second index,
but that is how you would do this.

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:07 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0