Re: Index out of range when using get_node

This is a discussion on Re: Index out of range when using get_node within the SNMP Users forums, part of the Networking and Network Related category; On 10/03/2008, Jelena Savic <JSavic@evertz.com> wrote: > Then i have an application that takes ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-11-2008
Dave Shield
 
Posts: n/a
Default Re: Index out of range when using get_node

On 10/03/2008, Jelena Savic <JSavic@evertz.com> wrote:
> Then i have an application that takes in a list of oids, and parses them using read_objid
> (however the same problem occurs while using snmp_parse_oid or get_node)
>
> I get the problem:
> Unknown object identifier: Index out of range
>
> if in my list of oids that need to be parsed, there is an oid with smaller
> number of subids before an oid with more subids.


Do you reset the length parameter before calling 'read_objid'?
This should hold the maximum length of the OID buffer.

When read_objid returns, this parameter holds the *actual*
length of the OID that was read. If you are going to re-use the same
variables, then you need to reset this to be the maximum length before
processing the next OID.

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/...net-snmp-users
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:19 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0