Logo
Home page Net-SNMP

Archive Search:

Require all words?

Site Search:
Google
Main Page | Modules | Data Structures | File List | Data Fields | Related Pages | Examples

netsnmp_iterator_info_s Struct Reference
[table_iterator: The table iterator helper is designed to simplify the task of writing a table handler for the net-snmp agent when the data being accessed is not in an oid sorted form and must be accessed externally.table_iterator: The table iterator helper is designed to simplify the task of writing a table handler for the net-snmp agent when the data being accessed is not in an oid sorted form and must be accessed externally.]

Holds iterator information containing functions which should be called by the iterator_handler to loop over your data set and sort it in a SNMP specific manner. More...

#include <table_iterator.h>


Data Fields

Netsnmp_First_Data_Point *  get_first_data_point
  Responsible for: returning the first set of "index" data, a loop-context pointer, and optionally a data context pointer.
Netsnmp_Next_Data_Point *  get_next_data_point
  Given the previous loop context, this should return the next loop context, assiocated index set and optionally a data context.
Netsnmp_Make_Data_Context *  make_data_context
  If a data context wasn't supplied by the get_first_data_point or get_next_data_point functions and the make_data_context pointer is defined, it will be called to convert a loop context into a data context.
Netsnmp_Free_Loop_Context *  free_loop_context
  A function which should free the loop context.
Netsnmp_Free_Data_Context *  free_data_context
  Frees a data context.
Netsnmp_Free_Loop_Context *  free_loop_context_at_end
  Frees a loop context at the end of the entire iteration sequence.
void *  myvoid
  This can be used by client handlers to store any information they need.
int  flags
netsnmp_table_registration_info table_reginfo
  A pointer to the netsnmp_table_registration_info object this iterator is registered along with.
Netsnmp_First_Data_Point *  get_row_indexes
netsnmp_variable_list indexes

Detailed Description

Holds iterator information containing functions which should be called by the iterator_handler to loop over your data set and sort it in a SNMP specific manner.

The netsnmp_iterator_info typedef can be used instead of directly calling this struct if you would prefer.

Definition at line 53 of file table_iterator.h.


Field Documentation

Netsnmp_Free_Data_Context* netsnmp_iterator_info_s::free_data_context
 

Frees a data context.

This will be called at any time a data context needs to be freed. This may be at the same time as a correspondng loop context is freed, or much much later. Multiple data contexts may be kept in existence at any time.

Definition at line 82 of file table_iterator.h.

Netsnmp_Free_Loop_Context* netsnmp_iterator_info_s::free_loop_context
 

A function which should free the loop context.

This function is called at *each* iteration step, which is not-optimal for speed purposes. The use of free_loop_context_at_end instead is strongly encouraged. This can be set to NULL to avoid its usage.

Definition at line 75 of file table_iterator.h.

Netsnmp_Free_Loop_Context* netsnmp_iterator_info_s::free_loop_context_at_end
 

Frees a loop context at the end of the entire iteration sequence.

Generally, this would free the loop context allocated by the get_first_data_point function (which would then be updated by each call to the get_next_data_point function). It is not called until the get_next_data_point function returns a NULL

Definition at line 90 of file table_iterator.h.

Netsnmp_First_Data_Point* netsnmp_iterator_info_s::get_first_data_point
 

Responsible for: returning the first set of "index" data, a loop-context pointer, and optionally a data context pointer.

Definition at line 57 of file table_iterator.h.

Netsnmp_Next_Data_Point* netsnmp_iterator_info_s::get_next_data_point
 

Given the previous loop context, this should return the next loop context, assiocated index set and optionally a data context.

Definition at line 62 of file table_iterator.h.

Netsnmp_Make_Data_Context* netsnmp_iterator_info_s::make_data_context
 

If a data context wasn't supplied by the get_first_data_point or get_next_data_point functions and the make_data_context pointer is defined, it will be called to convert a loop context into a data context.

Definition at line 68 of file table_iterator.h.

void* netsnmp_iterator_info_s::myvoid
 

This can be used by client handlers to store any information they need.

Definition at line 94 of file table_iterator.h.

netsnmp_table_registration_info* netsnmp_iterator_info_s::table_reginfo
 

A pointer to the netsnmp_table_registration_info object this iterator is registered along with.

Definition at line 100 of file table_iterator.h.

Referenced by netsnmp_register_table_iterator().


The documentation for this struct was generated from the following file:
Generated on Fri Dec 30 13:47:51 2005 for net-snmp by  doxygen 1.3.9.1

Valid CSS!


Last modified: Thursday, 01-Mar-2007 16:20:10 PST
For questions regarding web content and site functionality, please write to the net-snmp-users mail list.