I am currently working with the following:
for (i=1; i<= number_of_tables; i++){
index[0] = i;
row = netsnmp_create_table_data_row();
netsnmp_table_row_add_index(row, ASN_INTEGER, &index, sizeof(int));
netsnmp_set_row_column(row,COLUMN_COMMBASESTATSENTRYINDEX,ASN_INTEGER,(char*)&index[0],sizeof(int));
netsnmp_set_row_column(row,COLUMN_COMMBASESTATSENTRYCARDNUMBER,ASN_INTEGER,(char*)&index[0],sizeof(int));
netsnmp_set_row_column(row,COLUMN_COMMBASESTATSENTRYPORTNUMBER,ASN_INTEGER,(char*)&index[0],sizeof(int));
.............
int
commBaseStatsEntryTable_handler(netsnmp_mib_handler *handler,
netsnmp_handler_registration *reginfo,
netsnmp_agent_request_info *reqinfo,
netsnmp_request_info *requests)
{
netsnmp_request_info *request;
netsnmp_table_request_info *table_info;
netsnmp_variable_list *var;
static long value;
unsigned int index;
static unsigned char string[SPRINT_MAX_LEN];
unsigned char debug_string[SPRINT_MAX_LEN];
uint data_type = ASN_INTEGER;
for (request = requests; request; request = request->next) {
var = request->requestvb;
I hope that helps. I have also regenerated the base files with the newer mib2c in an attempt to resolve the problem, but do not know how to implement the first and next variables using the num_tables int value I am currently using. Maybe you can shed some light on this as well.
Greg
Wes Hardaker <[EMAIL PROTECTED]> wrote:
>>>>> On Wed, 8 Mar 2006 04:41:49 -0800 (PST), Greg Robillard <[EMAIL PROTECTED]> said:
Greg> I am not getting accurate data returned when posting multiple
Greg> snmpget requests to table data.
Can you provide additional info: which table handler are you using. I
was originally thinking the iterator style, but based on your text I
can't actually tell.
--
Wes Hardaker
Sparta, Inc.
[EMAIL PROTECTED]>
Yahoo! Mail
Use Photomail to share photos without annoying attachments.