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

table_iterator.h

00001 /* Portions of this file are subject to the following copyright(s).  See
00002  * the Net-SNMP's COPYING file for more details and other copyrights
00003  * that may apply:
00004  */
00005 /*
00006  * Portions of this file are copyrighted by:
00007  * Copyright © 2003 Sun Microsystems, Inc. All rights reserved.
00008  * Use is subject to license terms specified in the COPYING file
00009  * distributed with the Net-SNMP package.
00010  */
00016 #ifndef _TABLE_ITERATOR_HANDLER_H_
00017 #define _TABLE_ITERATOR_HANDLER_H_
00018 
00019 #ifdef __cplusplus
00020 extern          "C" {
00021 #endif
00022 
00023     struct netsnmp_iterator_info_s;
00024 
00025     typedef netsnmp_variable_list *
00026                (Netsnmp_First_Data_Point) (void **loop_context,
00027                                            void **data_context,
00028                                            netsnmp_variable_list *,
00029                                            struct netsnmp_iterator_info_s *);
00030     typedef netsnmp_variable_list *
00031                (Netsnmp_Next_Data_Point)  (void **loop_context,
00032                                            void **data_context,
00033                                            netsnmp_variable_list *,
00034                                            struct netsnmp_iterator_info_s *);
00035     typedef void *(Netsnmp_Make_Data_Context) (void *loop_context,
00036                                              struct netsnmp_iterator_info_s *);
00037     typedef void  (Netsnmp_Free_Loop_Context) (void *,
00038                                              struct netsnmp_iterator_info_s *);
00039     typedef void  (Netsnmp_Free_Data_Context) (void *,
00040                                              struct netsnmp_iterator_info_s *);
00041 
00053     typedef struct netsnmp_iterator_info_s {
00057         Netsnmp_First_Data_Point *get_first_data_point;
00058 
00062         Netsnmp_Next_Data_Point *get_next_data_point;
00063 
00068         Netsnmp_Make_Data_Context *make_data_context;
00069 
00075         Netsnmp_Free_Loop_Context *free_loop_context;
00076 
00082        Netsnmp_Free_Data_Context *free_data_context;
00083 
00090         Netsnmp_Free_Loop_Context *free_loop_context_at_end;
00091 
00094         void           *myvoid;
00095         int             flags;
00096 #define NETSNMP_ITERATOR_FLAG_SORTED    0x01
00097 
00100         netsnmp_table_registration_info *table_reginfo;
00101 
00102         /* Experimental extension - Use At Your Own Risk
00103            (these two fields may change/disappear without warning) */
00104         Netsnmp_First_Data_Point *get_row_indexes;
00105         netsnmp_variable_list *indexes;
00106     } netsnmp_iterator_info;
00107 
00108 #define TABLE_ITERATOR_NAME "table_iterator"
00109 
00110 /* ============================
00111  * Iterator API: Table maintenance
00112  * ============================ */
00113         /* N/A */
00114 
00115 /* ============================
00116  * Iterator API: MIB maintenance
00117  * ============================ */
00118 
00119     netsnmp_mib_handler
00120           *netsnmp_get_table_iterator_handler(netsnmp_iterator_info *iinfo);
00121     int    netsnmp_register_table_iterator(   netsnmp_handler_registration
00122                                                                     *reginfo,
00123                                               netsnmp_iterator_info *iinfo);
00124 
00125     void *netsnmp_extract_iterator_context(netsnmp_request_info *);
00126     void   netsnmp_insert_iterator_context(netsnmp_request_info *, void *);
00127 
00128     Netsnmp_Node_Handler netsnmp_table_iterator_helper_handler;
00129 
00130 
00131 /* ============================
00132  * Iterator API: Row operations
00133  * ============================ */
00134 
00135 void *netsnmp_iterator_row_first(      netsnmp_iterator_info *);
00136 void *netsnmp_iterator_row_get(        netsnmp_iterator_info *, void *);
00137 void *netsnmp_iterator_row_next(       netsnmp_iterator_info *, void *);
00138 void *netsnmp_iterator_row_get_byidx(  netsnmp_iterator_info *,
00139                                        netsnmp_variable_list *);
00140 void *netsnmp_iterator_row_next_byidx( netsnmp_iterator_info *,
00141                                        netsnmp_variable_list *);
00142 void *netsnmp_iterator_row_get_byoid(  netsnmp_iterator_info *, oid *, size_t);
00143 void *netsnmp_iterator_row_next_byoid( netsnmp_iterator_info *, oid *, size_t);
00144 int   netsnmp_iterator_row_count(      netsnmp_iterator_info *);
00145 
00146 
00147 /* ============================
00148  * Iterator API: Index operations
00149  * ============================ */
00150 
00151 #ifdef __cplusplus
00152 }
00153 #endif
00154 
00155 #endif                          /* _TABLE_ITERATOR_HANDLER_H_ */
00156 

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:06 PST
For questions regarding web content and site functionality, please write to the net-snmp-users mail list.