Re: Help on Index out of range error ‏

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
2010/4/7 X Z <[email protected]>:
> Here are the original c & h files.

The problem lies with the registration of the table.
In particular, how you specified the list of indexes.

You had:

    netsnmp_table_helper_add_indexes(table_info, ASN_UNSIGNED, 1);

which should have been

    netsnmp_table_helper_add_indexes(table_info, ASN_UNSIGNED, 0);

This call takes a variable number of index types, and so looks for '0'
as the final parameter, to mark the end of this list.   By using '1' instead,
you're confusing the table helper as to what the list of indexes should be.

That doesn't matter for GETNEXT requests, since these can work
with incomplete OIDs anyway, and the module code sets up the
OID of the result.
   But for GET (and SET) requests, the table helper checks the OID
against the expected index structure, and rejects anything that's
incomplete.

Fixing the index registration call solves this problem.

Dave

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
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.