~ubuntu-branches/ubuntu/trusty/net-snmp/trusty

« back to all changes in this revision

Viewing changes to man/netsnmp_table_data.3

  • Committer: Bazaar Package Importer
  • Author(s): Jochen Friedrich
  • Date: 2010-06-10 18:02:54 UTC
  • mto: (1.4.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100610180254-6ezvupl2clicwdqf
ImportĀ upstreamĀ versionĀ 5.4.3~dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH "table_data" 3 "5 Sep 2008" "Version 5.4.2" "net-snmp" \" -*- nroff -*-
 
1
.TH "table_data" 3 "23 May 2010" "Version 5.4.3.pre1" "net-snmp" \" -*- nroff -*-
2
2
.ad l
3
3
.nh
4
4
.SH NAME
5
 
table_data \- Helps you implement a table with datamatted storage.  
 
5
table_data \- 
 
6
.PP
 
7
Helps you implement a table with datamatted storage.  
6
8
 
7
 
.PP
8
9
.SS "Modules"
9
10
 
10
11
.in +1c
11
12
.ti -1c
12
13
.RI "\fBtable_dataset\fP"
13
14
.br
 
15
.PP
 
16
 
14
17
.RI "\fIHelps you implement a table with automatted storage. \fP"
15
 
.PP
16
 
 
17
18
.in -1c
18
19
.SS "Functions"
19
20
 
170
171
.SH "Detailed Description"
171
172
.PP 
172
173
Helps you implement a table with datamatted storage. 
173
 
.PP
174
 
This helper is obsolete. If you are writing a new module, please consider using the table_tdata helper instead.
 
174
 
 
175
This helper is obsolete. If you are writing a new \fBmodule\fP, please consider using the table_tdata helper instead.
175
176
.PP
176
177
This helper helps you implement a table where all the indexes are expected to be stored within the agent itself and not in some external storage location. It can be used to store a list of rows, where a row consists of the indexes to the table and a generic data pointer. You can then implement a subhandler which is passed the exact row definition and data it must return data for or accept data for. Complex GETNEXT handling is greatly simplified in this case. 
177
178
.SH "Function Documentation"
181
182
creates and returns a pointer to table data set 
182
183
.PP
183
184
Definition at line 52 of file table_data.c.
184
 
.PP
185
 
References netsnmp_table_data_s::name, and SNMP_MALLOC_TYPEDEF.
186
 
.PP
187
 
Referenced by netsnmp_create_table_data_set(), and netsnmp_table_data_create_table().
188
185
.SS "\fBnetsnmp_table_row\fP* netsnmp_create_table_data_row (void)"
189
186
.PP
190
187
creates and returns a pointer to table data set 
194
191
\fBdata_set.c\fP.
195
192
.PP
196
193
Definition at line 62 of file table_data.c.
197
 
.PP
198
 
References SNMP_MALLOC_TYPEDEF.
199
 
.PP
200
 
Referenced by netsnmp_config_parse_add_row(), and netsnmp_table_data_set_create_row_from_defaults().
201
194
.SS "\fBnetsnmp_table_data\fP* netsnmp_extract_table (\fBnetsnmp_request_info\fP * request)"
202
195
.PP
203
196
extracts the table being accessed passed from the table_data helper 
204
197
.PP
205
 
Definition at line 649 of file table_data.c.
206
 
.PP
207
 
References netsnmp_request_get_list_data().
 
198
Definition at line 653 of file table_data.c.
208
199
.SS "\fBnetsnmp_table_row\fP* netsnmp_extract_table_row (\fBnetsnmp_request_info\fP * request)"
209
200
.PP
210
201
extracts the row being accessed passed from the table_data helper 
211
202
.PP
212
 
Definition at line 657 of file table_data.c.
213
 
.PP
214
 
References netsnmp_request_get_list_data().
215
 
.PP
216
 
Referenced by netsnmp_extract_table_row_data(), and netsnmp_table_data_set_helper_handler().
 
203
Definition at line 661 of file table_data.c.
217
204
.SS "void* netsnmp_extract_table_row_data (\fBnetsnmp_request_info\fP * request)"
218
205
.PP
219
206
extracts the data from the row being accessed passed from the table_data helper 
220
207
.PP
221
 
Definition at line 666 of file table_data.c.
222
 
.PP
223
 
References netsnmp_table_row_s::data, netsnmp_extract_table_row(), and NULL.
224
 
.PP
225
 
Referenced by netsnmp_extract_table_data_set_column().
 
208
Definition at line 670 of file table_data.c.
226
209
.SS "\fBnetsnmp_mib_handler\fP* netsnmp_get_table_data_handler (\fBnetsnmp_table_data\fP * table)"
227
210
.PP
228
211
Creates a table_data handler and returns it. 
229
212
.PP
230
 
Definition at line 371 of file table_data.c.
231
 
.PP
232
 
References netsnmp_mib_handler_s::flags, MIB_HANDLER_AUTO_NEXT, netsnmp_mib_handler_s::myvoid, netsnmp_create_handler(), netsnmp_table_data_helper_handler(), NULL, and snmp_log().
233
 
.PP
234
 
Referenced by netsnmp_register_table_data().
 
213
Definition at line 375 of file table_data.c.
235
214
.SS "NETSNMP_INLINE void netsnmp_insert_table_row (\fBnetsnmp_request_info\fP * request, \fBnetsnmp_table_row\fP * row)"
236
215
.PP
237
216
inserts a newly created table_data row into a request 
238
217
.PP
239
 
Definition at line 678 of file table_data.c.
240
 
.PP
241
 
References build_oid_noalloc(), netsnmp_table_request_info_s::indexes, netsnmp_create_data_list(), netsnmp_extract_table_info(), netsnmp_request_add_list_data(), netsnmp_request_info_s::next, NULL, netsnmp_request_info_s::prev, and snmp_oid_compare().
 
218
Definition at line 682 of file table_data.c.
242
219
.SS "int netsnmp_register_read_only_table_data (\fBnetsnmp_handler_registration\fP * reginfo, \fBnetsnmp_table_data\fP * table, \fBnetsnmp_table_registration_info\fP * table_info)"
243
220
.PP
244
221
registers a handler as a read-only data table If table_info != NULL, it registers it as a normal table too. 
245
222
.PP
246
 
Definition at line 405 of file table_data.c.
247
 
.PP
248
 
References netsnmp_get_read_only_handler(), netsnmp_inject_handler(), and netsnmp_register_table_data().
 
223
Definition at line 409 of file table_data.c.
249
224
.SS "int netsnmp_register_table_data (\fBnetsnmp_handler_registration\fP * reginfo, \fBnetsnmp_table_data\fP * table, \fBnetsnmp_table_registration_info\fP * table_info)"
250
225
.PP
251
 
registers a handler as a data table. 
252
 
.PP
253
 
If table_info != NULL, it registers it as a normal table too. 
254
 
.PP
255
 
Definition at line 394 of file table_data.c.
256
 
.PP
257
 
References netsnmp_get_table_data_handler(), netsnmp_inject_handler(), and netsnmp_register_table().
258
 
.PP
259
 
Referenced by netsnmp_register_read_only_table_data(), and netsnmp_register_table_data_set().
 
226
registers a handler as a data table. If table_info != NULL, it registers it as a normal table too. 
 
227
.PP
 
228
Definition at line 398 of file table_data.c.
260
229
.SS "int netsnmp_table_data_add_row (\fBnetsnmp_table_data\fP * table, \fBnetsnmp_table_row\fP * row)"
261
230
.PP
262
 
Adds a row of data to a given table (stored in proper lexographical order). 
263
 
.PP
264
 
returns SNMPERR_SUCCESS on successful addition. or SNMPERR_GENERR on failure (E.G., indexes already existed) 
 
231
Adds a row of data to a given table (stored in proper lexographical order). returns SNMPERR_SUCCESS on successful addition. or SNMPERR_GENERR on failure (E.G., indexes already existed) 
265
232
.PP
266
233
xxx-rks: remove invalid row? 
267
234
.PP
268
 
Definition at line 130 of file table_data.c.
269
 
.PP
270
 
References netsnmp_table_data_s::first_row, netsnmp_table_row_s::index_oid, netsnmp_table_row_s::index_oid_len, netsnmp_table_row_s::indexes, netsnmp_table_data_s::last_row, netsnmp_table_data_s::name, netsnmp_table_data_generate_index_oid(), netsnmp_table_row_s::next, NULL, netsnmp_table_row_s::prev, snmp_free_varbind(), snmp_log(), snmp_oid_compare(), and netsnmp_table_data_s::store_indexes.
271
 
.PP
272
 
Referenced by netsnmp_config_parse_add_row(), netsnmp_table_data_replace_row(), and netsnmp_table_dataset_add_row().
 
235
Definition at line 134 of file table_data.c.
273
236
.SS "\fBnetsnmp_table_row\fP* netsnmp_table_data_clone_row (\fBnetsnmp_table_row\fP * row)"
274
237
.PP
275
 
clones a data row. 
276
 
.PP
277
 
DOES NOT CLONE THE CONTAINED DATA. 
 
238
clones a data row. DOES NOT CLONE THE CONTAINED DATA. 
278
239
.PP
279
240
Definition at line 70 of file table_data.c.
280
 
.PP
281
 
References memdup(), NULL, and snmp_clone_varbind().
282
 
.PP
283
 
Referenced by netsnmp_table_data_set_clone_row().
284
241
.SS "void* netsnmp_table_data_delete_row (\fBnetsnmp_table_row\fP * row)"
285
242
.PP
286
 
deletes a row's memory. 
287
 
.PP
288
 
returns the void data that it doesn't know how to delete. 
289
 
.PP
290
 
Definition at line 101 of file table_data.c.
291
 
.PP
292
 
References netsnmp_table_row_s::data, netsnmp_table_row_s::index_oid, netsnmp_table_row_s::indexes, NULL, SNMP_FREE, and snmp_free_varbind().
293
 
.PP
294
 
Referenced by netsnmp_table_data_delete_table(), netsnmp_table_data_remove_and_delete_row(), and netsnmp_table_dataset_delete_row().
 
243
deletes a row's memory. returns the void data that it doesn't know how to delete. 
 
244
.PP
 
245
Definition at line 105 of file table_data.c.
295
246
.SS "\fBnetsnmp_table_row\fP* netsnmp_table_data_get (\fBnetsnmp_table_data\fP * table, \fBnetsnmp_variable_list\fP * indexes)"
296
247
.PP
297
248
finds the data in 'datalist' stored at 'indexes' 
298
249
.PP
299
 
Definition at line 804 of file table_data.c.
300
 
.PP
301
 
References build_oid_noalloc(), netsnmp_table_data_get_from_oid(), and NULL.
302
 
.PP
303
 
Referenced by netsnmp_table_data_row_get_byidx().
 
250
Definition at line 808 of file table_data.c.
304
251
.SS "\fBnetsnmp_table_row\fP* netsnmp_table_data_get_first_row (\fBnetsnmp_table_data\fP * table)"
305
252
.PP
306
253
returns the first row in the table 
307
254
.PP
308
 
Definition at line 785 of file table_data.c.
309
 
.PP
310
 
References netsnmp_table_data_s::first_row, and NULL.
311
 
.PP
312
 
Referenced by netsnmp_table_data_entry_first(), netsnmp_table_data_row_first(), and netsnmp_table_data_set_get_first_row().
 
255
Definition at line 789 of file table_data.c.
313
256
.SS "\fBnetsnmp_table_row\fP* netsnmp_table_data_get_from_oid (\fBnetsnmp_table_data\fP * table, oid * searchfor, size_t searchfor_len)"
314
257
.PP
315
258
finds the data in 'datalist' stored at the searchfor oid 
316
259
.PP
317
 
Definition at line 818 of file table_data.c.
318
 
.PP
319
 
References netsnmp_table_data_s::first_row, netsnmp_table_row_s::index_oid, netsnmp_table_row_s::index_oid_len, netsnmp_table_row_s::next, NULL, and snmp_oid_compare().
320
 
.PP
321
 
Referenced by netsnmp_table_data_get(), netsnmp_table_data_row_get(), and netsnmp_table_data_row_get_byoid().
 
260
Definition at line 822 of file table_data.c.
322
261
.SS "\fBnetsnmp_table_row\fP* netsnmp_table_data_get_next_row (\fBnetsnmp_table_data\fP * table, \fBnetsnmp_table_row\fP * row)"
323
262
.PP
324
263
returns the next row in the table 
325
264
.PP
326
 
Definition at line 794 of file table_data.c.
327
 
.PP
328
 
References netsnmp_table_row_s::next, and NULL.
329
 
.PP
330
 
Referenced by netsnmp_table_data_row_next(), and netsnmp_table_data_set_get_next_row().
 
265
Definition at line 798 of file table_data.c.
331
266
.SS "void* netsnmp_table_data_remove_and_delete_row (\fBnetsnmp_table_data\fP * table, \fBnetsnmp_table_row\fP * row)"
332
267
.PP
333
 
removes and frees a row of data to a given table and returns the void * 
334
 
.PP
335
 
returns the void * data on successful deletion. or NULL on failure (bad arguments) 
336
 
.PP
337
 
Definition at line 270 of file table_data.c.
338
 
.PP
339
 
References netsnmp_table_data_delete_row(), netsnmp_table_data_remove_row(), and NULL.
340
 
.PP
341
 
Referenced by netsnmp_table_data_remove_delete_row(), netsnmp_table_dataset_remove_and_delete_row(), and netsnmp_table_dataset_remove_row().
 
268
removes and frees a row of data to a given table and returns the void * returns the void * data on successful deletion. or NULL on failure (bad arguments) 
 
269
.PP
 
270
Definition at line 274 of file table_data.c.
342
271
.SS "\fBnetsnmp_table_row\fP* netsnmp_table_data_remove_row (\fBnetsnmp_table_data\fP * table, \fBnetsnmp_table_row\fP * row)"
343
272
.PP
344
 
removes a row of data to a given table and returns it (no free's called) 
345
 
.PP
346
 
returns the row pointer itself on successful removing. or NULL on failure (bad arguments) 
347
 
.PP
348
 
Definition at line 244 of file table_data.c.
349
 
.PP
350
 
References netsnmp_table_data_s::first_row, netsnmp_table_data_s::last_row, netsnmp_table_row_s::next, NULL, and netsnmp_table_row_s::prev.
351
 
.PP
352
 
Referenced by netsnmp_table_data_remove_and_delete_row(), and netsnmp_table_data_replace_row().
 
273
removes a row of data to a given table and returns it (no free's called) returns the row pointer itself on successful removing. or NULL on failure (bad arguments) 
 
274
.PP
 
275
Definition at line 248 of file table_data.c.
353
276
.SS "NETSNMP_INLINE void netsnmp_table_data_replace_row (\fBnetsnmp_table_data\fP * table, \fBnetsnmp_table_row\fP * origrow, \fBnetsnmp_table_row\fP * newrow)"
354
277
.PP
355
 
swaps out origrow with newrow. 
356
 
.PP
357
 
This does *not* delete/free anything! 
358
 
.PP
359
 
Definition at line 229 of file table_data.c.
360
 
.PP
361
 
References netsnmp_table_data_add_row(), and netsnmp_table_data_remove_row().
362
 
.PP
363
 
Referenced by netsnmp_table_dataset_replace_row().
 
278
swaps out origrow with newrow. This does *not* delete/free anything! 
 
279
.PP
 
280
Definition at line 233 of file table_data.c.
 
281
.SH "Author"
 
282
.PP 
 
283
Generated automatically by Doxygen for net-snmp from the source code.