On 20 October 2011 09:39, Ravi Kumar <[email protected]> wrote:
> Code is similar to below........
OK - so you are still forcing me to guess.
The only thing I can spot that looks wrong is the
handling of suffices (i.e. the index values)
> suffix = requests->requestvb->name + reginfo->rootoid_len + 1;
> suffix_len = requests->requestvb->name_length - (reginfo->rootoid_len +
> 1);
This seems to be extracting the suffix for the first varbind,
but there's nothing to guarantee that the other varbinds will
necessarily share the same suffix.
It might be worth moving this code to within the
for (request = requests....)
loop, and extract the oid stash for each varbind separately.
I've no idea whether this is relevant or not, because the
oid_stash data is never actually referenced in the code
that you've shown. Presumably it's used in the fragments
that have been omitted.
> switch (reqinfo->mode) {
> case MODE_GET:
> case MODE_GETNEXT:
> {
> entry = get_XXXTable_row(reqinfo->mode,
> table_info->indexes);
Does this call succeed?
I can't see anywhere that you test the return value.
> switch (table_info->colnum) {
>
> case COLUMN1:
> {
> ------------
> ------------
> xxx_get_oid(var, table_info->indexes, "column1",
> entry_val);
Again, does this call succed?
I've no real idea what this routine is meant to do, or whether it
returns anything.
Where are you updating the OID within the varbind for GETNEXT requests?
That's one of the things that is normally handled by the table helpers,
but if you are dealing with GETNEXTs yourself, you must update the
varbind OID as well.
There's some discussion about this in the file AGENT.txt
It's aimed at the old UCD v4 style implementations, but the basic
tasks are similar for the v5 approach as well.
Dave
------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders