Hi,
 
I have a question about implementation of the get-next request.
 
I've generated code for my MIB using the mib2c tool. In the init function I've registered the iterator access routines like below:
 
iinfo->get_first_data_point =  myTable_get_first_data_point;
iinfo->get_next_data_point =  myTable_get_next_data_point;
Those functions are then called by the netsnmp_table_iterator_helper_handler() routine from the table_iterator.c file. As I understand they are used to find the next index. But those functions can only return a valid pointer, which means the next index was found, or NULL if the end of table was reached. In the second case the next object is taken under consideration and the process continues.
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):
 
"If the processing of any variable binding fails for a reason other
   than listed above, then the Response-PDU is re-formatted with the
   same values in its request-id and variable-bindings fields as the
   received GetNextRequest-PDU, with the value of its error-status field
   set to "genErr", and the value of its error-index field is set to the
   index of the failed variable binding."
Is there any way to return error code from the get_first_data_point and get_next_data_point routines? Or error occuring in those functions is treated the same way as when next index is not found?
 
Thanks for any info
Baska


Czy już jesteś w Yahoo!?
Oferujemy teraz 1GB pojemności
http://pl.mail.yahoo.com

Reply via email to