31
32
.SH "Detailed Description"
33
34
Helps you implement a table when data can be stored locally.
35
36
The data is stored in a sorted array, using a binary search for lookups.
37
38
The table_array handler is used (automatically) in conjuntion with the \fBtable\fP handler. It is primarily intended to be used with the mib2c configuration file mib2c.array-user.conf.
55
56
If your table contains a RowStatus object, by default the code will not allow object in an active row to be modified. To allow active rows to be modified, remove the comment block around the #define <PREFIX>_CAN_MODIFY_ACTIVE_ROW in the header file.
57
Code will be generated to maintain a secondary index for all rows, stored in a binary tree. This is very useful for finding rows by a key other than the OID index. By default, the functions for maintaining this tree will be based on a character string. NOTE: this will likely be made into a more generic mechanism, using new callback methods, in the near future.
58
Code will be generated to maintain a secondary index for all rows, stored in a binary \fBtree\fP. This is very useful for finding rows by a key other than the OID index. By default, the functions for maintaining this \fBtree\fP will be based on a character string. NOTE: this will likely be made into a more generic mechanism, using new callback methods, in the near future.
59
60
The generated code contains many TODO comments. Make sure you check each one to see if it applies to your code. Examples include checking indices for syntax (ranges, etc), initializing default values in newly created rows, checking for row activation and deactivation requirements, etc.
60
61
.SH "Function Documentation"
64
65
find the context data used by the table_array helper
66
67
Definition at line 229 of file table_array.c.
68
References netsnmp_request_get_list_data().
69
68
.SS "\fBnetsnmp_mib_handler\fP* netsnmp_find_table_array_handler (\fBnetsnmp_handler_registration\fP * reginfo)"
71
70
find the handler for the table_array helper.
73
72
Definition at line 212 of file table_array.c.
75
References netsnmp_mib_handler_s::access_method, netsnmp_handler_registration_s::handler, netsnmp_mib_handler_s::next, and NULL.
76
73
.SS "int netsnmp_table_array_check_row_status (\fBnetsnmp_table_array_callbacks\fP * cb, \fBnetsnmp_request_group\fP * ag, long * rs_new, long * rs_old)"
78
75
this function is called to validate RowStatus transitions.
80
77
Definition at line 236 of file table_array.c.
82
References netsnmp_table_array_callbacks_s::can_activate, netsnmp_table_array_callbacks_s::can_deactivate, netsnmp_table_array_callbacks_s::can_delete, netsnmp_request_group_s::existing_row, NULL, netsnmp_request_group_s::row_deleted, and netsnmp_request_group_s::undo_info.
83
78
.SS "int netsnmp_table_container_register (\fBnetsnmp_handler_registration\fP * reginfo, \fBnetsnmp_table_registration_info\fP * tabreg, \fBnetsnmp_table_array_callbacks\fP * cb, \fBnetsnmp_container\fP * container, int group_rows)"
85
register specified callbacks for the specified table/oid.
87
If the group_rows parameter is set, the row related callbacks will be called once for each unique row index. Otherwise, each callback will be called only once, for all objects.
80
register specified callbacks for the specified table/oid. If the group_rows parameter is set, the row related callbacks will be called once for each unique row index. Otherwise, each callback will be called only once, for all objects.
89
82
Definition at line 149 of file table_array.c.
91
References netsnmp_table_array_callbacks_s::can_set, table_container_data_s::cb, netsnmp_container_s::compare, netsnmp_table_array_callbacks_s::delete_row, netsnmp_table_array_callbacks_s::duplicate_row, netsnmp_handler_registration_s::handler, netsnmp_mib_handler_s::myvoid, netsnmp_container_s::ncompare, netsnmp_register_table(), NULL, netsnmp_table_array_callbacks_s::row_copy, snmp_log(), SNMP_MALLOC_TYPEDEF, table_container_data_s::table, and table_container_data_s::tblreg_info.
93
Referenced by netsnmp_table_array_register().
85
Generated automatically by Doxygen for net-snmp from the source code.