Re: Having problem with stirng index table

geri noorzaman <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
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 <[email protected]>
To: geri noorzaman <[email protected]>
Cc: [email protected]
Sent: Friday, June 5, 2009 2:20:48 PM
Subject: Re: Having problem with stirng index table

2009/6/4 geri noorzaman <[email protected]>:

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
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.