I have tried to look at things with a debugger and:
a.) The ifEntry handler is not called for a GET it is called for a GETNEXT.
b.) I tried to extract the indexes using the following routine:
Function call:
case MODE_GET:
case MODE_GETNEXT:
for (request = requests; request; request = request->next) {
//table_entry = (struct ifTable_entry *)
table_info = netsnmp_extract_table_info(request);
if(table_entry ==NULL || table_info==NULL) {
netsnmp_set_request_error(reqinfo, request,
SNMP_NOSUCHINSTANCE);
continue;
}
if(!extract_if_table_entry(table_info,entry,reqinfo->mode))
{//netsnmp_extract_table_row_data(request);
netsnmp_set_request_error(reqinfo, request,
SNMP_NOSUCHINSTANCE);
continue;
}
Function Body:
boolean_t extract_if_table_entry(netsnmp_table_request_info
*table_info,SnmpdifTableEntry &entry, int mode)
{
int ifIndex=0;
// Extract the index
//
if((table_info->number_indexes==0) || (table_info->indexes==0)) {
return nwh_getFirstIfTableEntry(entry);
}
ifIndex=table_info->indexes->name[0];
if(mode==MODE_GET )
return nwh_getIfTableEntry(ifIndex, entry);
if(mode==MODE_GETNEXT)
return nwh_getNextIfTableEntry(ifIndex, entry);
return FALSE;
}
What I see using a debugger is that table_info->number_indexes is always
zero.
The table_info->indexes->name[0] contains a very large number.
It seems like I am missing something.
I appreciate your help...
Shuki
-----Original Message-----
From: Dave Shield [mailto:[EMAIL PROTECTED]
Sent: Friday, September 30, 2005 5:02 AM
To: sasson, shuki
Cc: [email protected]
Subject: RE: Cannot find an adquate mib2c configuration file for travesing
large tables.
On Thu, 2005-09-29 at 17:15 -0400, sasson, shuki wrote:
> Hi David, I have tried to follow your instructions.
> I found that the handler function....
> is called only by GETNEXT...
It shouldn't be. This handler ought to be called for both
GET and GETNEXT requests.
Dave
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders