Re: Snmpgetnext on Table with "holes"
Dave Shield <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On 25 April 2011 12:28, Boris Zweimueller <[email protected]> wrote: > Sorry, I did not provide the 'implemented' x_access.c/h files because I > thought get_first_data and get_next_data are only responsible to find the > correct row and have nothing to do with columns. Yes - but they are needed to compile and query the module, which is the best way to find out exactly what it happening, and how to fix it. > I have now attached the access_c/h files. > > But the code does still not compile, because the access.c makes further > calls to get the data row from the internal data representation - code which > you are probably not interested in. That's not a problem - it's easy enough to whip up a dummy set of data to work with. (Though the use of 'LogWrapper' routines didn't help either.) I've finally managed to construct a working example, and reproduced the problem. The fix is also very straightforward. Just add the following code snippet: case 13: case 14: netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHOBJECT); break; to the case MODE_GET: switch(table_info->colnum) { block. That is sufficient to let the table helper know that these MIB objects are missing, and that GETNEXT requests should move on to the next column. You'll probably also need a similar check in the SET_RESERVE1 block, to reject SET requests for these missing objects. Dave ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ 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