I'm sorry, but thank you so much for your answer. Here's is the comple code for
get_first_data_point function (get_next_data_point is similar to this):
netsnmp_variable_list *
wmanIfBsRegisteredSsTable_get_first_data_point(void **my_loop_context, void
**my_data_context,
netsnmp_variable_list *put_index_data,
netsnmp_iterator_info *mydata)
{
netsnmp_variable_list *vptr;
*my_loop_context = wmanRegisteredGetRowFirst() /** XXX */;
*my_data_context = *my_loop_context /** XXX */;
if (*my_loop_context == NULL) return NULL;
vptr = put_index_data;
wmanRegistered *data;
data = *my_data_context;
int idx=data->ifIndex;
snmp_set_var_value(vptr, (u_char *) &idx , sizeof(idx) );
vptr = vptr->next_variable;
unsigned char idx1[65535];
strcpy(idx1,data->wmanIfBsSsMacAddress);
snmp_set_var_value(vptr,idx1,strlen(idx1));
vptr = vptr->next_variable;
if (*my_loop_context==NULL) return NULL;
return put_index_data;
}
the struct of wmanRegistered is something like:
typedef struct
{
int ifIndex;
unsigned char wmanIfBsSsMacAddress[65535];
long wmanIfBsSsBasicCid;
long wmanIfBsSsPrimaryCid;
unsigned char wmanIfOthersString[65535];
long wmanIfOthers;
}
wmanRegistered;
Thank u very much for reply.
________________________________
From: Dave Shield <d.t.shi...@liverpool.ac.uk>
To: geri noorzaman <noorzaman...@yahoo.com>
Cc: net-snmp-users@lists.sourceforge.net
Sent: Friday, June 5, 2009 2:20:48 PM
Subject: Re: Having problem with stirng index table
2009/6/4 geri noorzaman <noorzaman...@yahoo.com>:
I'm sorry - but I am not prepared to waste my time trying to
guess what you might or might not have written in code
that you can't be bothered to mention.
If you wish assistance, can you please post the *complete*
code - not isolated fragments.
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users