Re: Table iterator and get-next question

This is a discussion on Re: Table iterator and get-next question within the SNMP Coders forums, part of the Networking and Network Related category; On Thu, 2005-11-24 at 19:43 +0100, Barbara Kuriata wrote: > But what happens if some error occurs ...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-25-2005
Dave Shield
 
Posts: n/a
Default Re: Table iterator and get-next question

On Thu, 2005-11-24 at 19:43 +0100, Barbara Kuriata wrote:

> But what happens if some error occurs either in get_first_data_point
> or get_next_data_point routine? Shouldn't the get-next process be
> interrupted and the General Error be returned in Response?
>
> That what I thought after reading the RFC 3416, which explains
> processing of get-next requests the following way (chapter 4.2.2. The
> GetNextRequest-PDU):


Please don't make the mistake of equating the 'get_{first,next}'
hook routines with individual GetNext requests. They do *NOT*
work at this level.

The purpose of the 'get_{first,next}' mechanism is to locate the
appropriate row of the table for a *single* GetNext (or Get) request.
Each individual request will trigger a full 'get_{first,next}' scan
of the table.

So the description in RFC 3416 is not directly applicable to
these routines.



> Is there any way to return error code from the get_first_data_point
> and get_next_data_point routines?


What sort of errors did you have in mind?

> Or error occuring in those functions is treated the same way as
> when next index is not found?


These functions are not really concerned with interpreting
index values - that's the role of the iterator helper.
These routines will *report* the index for each row in turn,
but don't actually use this information themselves. They
use the 'loop_context' parameter to keep track of the current
location within the table. But that's very much a short-term
thing - concerned with processing a single GETNEXT request,
not a full "snmpwalk".


Dave
>



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders
Reply With Quote
Reply


Thread Tools
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

vB 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 01:20 AM.


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