~ubuntu-branches/ubuntu/wily/net-snmp/wily-proposed

« back to all changes in this revision

Viewing changes to man/netsnmp_table.3

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-06-28 14:59:36 UTC
  • mfrom: (1.2.3 upstream) (1.1.12 sid)
  • Revision ID: james.westby@ubuntu.com-20100628145936-cbiallic69pn044g
Tags: 5.4.3~dfsg-1ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Set Ubuntu maintainer address.
  - net-snmp-config: Use bash. (LP: #104738)
  - Removed multiuser option when calling update-rc.d. (LP: #254261)
  - debian/snmpd.init: LSBify the init script.
  - debian/patches/52_fix_snmpcmd_1_typo.patch: Adjust a typo in snmpcmd.1
    (LP: #250459)
  - debian/snmpd.postinst: source debconf before doing work, LP: #589056
  - debian/snmp.preinst, debian/snmp.prerm: kill any/all processes owned by
    snmp user before install/uninstall, LP: #573391
  - Add apport hook (LP: #533603):
  - debian/{snmp,snmpd}.apport: Added.
  - debian/control: Build-depends on dh-apport.
  - debian/rules: 
    + Add --with apport.
    + override_dh_apport to install hook on snmpd package only.
 * Dropped patches:
   - debian/patches/99-fix-ubuntu-div0.patch: Fix dvision by zero.. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH "table" 3 "5 Sep 2008" "Version 5.4.2" "net-snmp" \" -*- nroff -*-
 
1
.TH "table" 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 \- Helps you implement a table.  
 
5
table \- 
 
6
.PP
 
7
Helps you implement a table.  
6
8
 
7
 
.PP
8
9
.SS "Modules"
9
10
 
10
11
.in +1c
11
12
.ti -1c
12
13
.RI "\fBtable_array\fP"
13
14
.br
 
15
.PP
 
16
 
14
17
.RI "\fIHelps you implement a table when data can be stored locally. \fP"
15
 
.PP
16
 
.in +1c
17
 
 
18
18
.ti -1c
19
19
.RI "\fBtable_container\fP"
20
20
.br
 
21
.PP
 
22
 
21
23
.RI "\fIHelps you implement a table when data can be found via a netsnmp_container. \fP"
22
 
.PP
23
 
.in +1c
24
 
 
25
24
.ti -1c
26
25
.RI "\fBtable_data\fP"
27
26
.br
 
27
.PP
 
28
 
28
29
.RI "\fIHelps you implement a table with datamatted storage. \fP"
29
 
.PP
30
 
.in +1c
31
 
 
32
30
.ti -1c
33
31
.RI "\fBgeneric_table_API\fP"
34
32
.br
 
33
.PP
 
34
 
35
35
.RI "\fIGeneral requirements for a table helper. \fP"
36
 
.PP
37
 
.in +1c
38
 
 
39
36
.ti -1c
40
37
.RI "\fBtable_iterator\fP"
41
38
.br
 
39
.PP
 
40
 
42
41
.RI "\fIThe 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. \fP"
43
 
.PP
44
 
.in +1c
45
 
 
46
42
.ti -1c
47
43
.RI "\fBtable_row\fP"
48
44
.br
 
45
.PP
 
46
 
49
47
.RI "\fIHelps you implement a table shared across two or more subagents, or otherwise split into individual row slices. \fP"
50
 
.PP
51
 
.in +1c
52
 
 
53
48
.ti -1c
54
49
.RI "\fBtdata\fP"
55
50
.br
 
51
.PP
 
52
 
56
53
.RI "\fIImplement a table with datamatted storage. \fP"
57
 
.PP
58
 
 
59
54
.in -1c
60
55
.SS "Defines"
61
56
 
123
118
.SH "Detailed Description"
124
119
.PP 
125
120
Helps you implement a table. 
126
 
.PP
 
121
 
127
122
This handler helps you implement a table by doing some of the processing for you.
128
123
.PP
129
124
This handler truly shows the power of the new handler mechanism. By creating a table handler and injecting it into your calling chain, or by using the \fBnetsnmp_register_table()\fP function to register your table, you get access to some pre-parsed information. Specifically, the table handler pulls out the column number and indexes from the request oid so that you don't have to do the complex work to do that parsing within your own code.
133
128
.PP 
134
129
.SS "int netsnmp_check_getnext_reply (\fBnetsnmp_request_info\fP * request, oid * prefix, size_t prefix_len, \fBnetsnmp_variable_list\fP * newvar, \fBnetsnmp_variable_list\fP ** outvar)"
135
130
.PP
136
 
checks the original request against the current data being passed in if its greater than the request oid but less than the current valid return, set the current valid return to the new value. 
137
 
.PP
138
 
returns 1 if outvar was replaced with the oid from newvar (success). returns 0 if not. 
139
 
.PP
140
 
Definition at line 884 of file table.c.
141
 
.PP
142
 
References build_oid_noalloc(), variable_list::name, variable_list::name_length, netsnmp_request_info_s::requestvb, snmp_clone_varbind(), snmp_free_varbind(), snmp_oid_compare(), snmp_set_var_objid(), snmp_set_var_typed_value(), netsnmp_vardata::string, variable_list::type, variable_list::val, and variable_list::val_len.
 
131
checks the original request against the current data being passed in if its greater than the request oid but less than the current valid return, set the current valid return to the new value. returns 1 if outvar was replaced with the oid from newvar (success). returns 0 if not. 
 
132
.PP
 
133
Definition at line 881 of file table.c.
143
134
.SS "NETSNMP_INLINE \fBnetsnmp_table_request_info\fP* netsnmp_extract_table_info (\fBnetsnmp_request_info\fP * request)"
144
135
.PP
145
 
Extracts the processed table information from a given request. 
146
 
.PP
147
 
Call this from subhandlers on a request to extract the processed netsnmp_request_info information. The resulting information includes the index values and the column number.
 
136
Extracts the processed table information from a given request. Call this from subhandlers on a request to extract the processed netsnmp_request_info information. The resulting information includes the index values and the column number.
148
137
.PP
149
138
\fBParameters:\fP
150
139
.RS 4
159
148
 
160
149
.PP
161
150
Definition at line 125 of file table.c.
162
 
.PP
163
 
References netsnmp_request_get_list_data().
164
 
.PP
165
 
Referenced by _netsnmp_tdata_helper_handler(), netsnmp_container_table_row_insert(), netsnmp_insert_iterator_context(), netsnmp_insert_table_row(), netsnmp_table_data_helper_handler(), netsnmp_table_data_set_helper_handler(), netsnmp_table_iterator_helper_handler(), and table_helper_handler().
166
151
.SS "\fBnetsnmp_table_registration_info\fP* netsnmp_find_table_registration_info (\fBnetsnmp_handler_registration\fP * reginfo)"
167
152
.PP
168
153
extracts the registered netsnmp_table_registration_info object from a netsnmp_handler_registration object 
169
154
.PP
170
155
Definition at line 134 of file table.c.
171
 
.PP
172
 
References netsnmp_find_handler_data_by_name().
173
 
.PP
174
 
Referenced by netsnmp_table_data_helper_handler(), and netsnmp_table_iterator_helper_handler().
175
156
.SS "\fBnetsnmp_mib_handler\fP* netsnmp_get_table_handler (\fBnetsnmp_table_registration_info\fP * tabreq)"
176
157
.PP
177
 
Given a netsnmp_table_registration_info object, creates a table handler. 
178
 
.PP
179
 
You can use this table handler by injecting it into a calling chain. When the handler gets called, it'll do processing and store it's information into the request->parent_data structure.
 
158
Given a netsnmp_table_registration_info object, creates a table handler. You can use this table handler by injecting it into a calling chain. When the handler gets called, it'll do processing and store it's information into the request->parent_data structure.
180
159
.PP
181
160
The table helper handler pulls out the column number and indexes from the request oid so that you don't have to do the complex work of parsing within your own code.
182
161
.PP
193
172
 
194
173
.PP
195
174
Definition at line 85 of file table.c.
196
 
.PP
197
 
References count_varbinds(), netsnmp_table_registration_info_s::indexes, netsnmp_mib_handler_s::myvoid, netsnmp_create_handler(), NULL, netsnmp_table_registration_info_s::number_indexes, snmp_log(), and table_helper_handler().
198
 
.PP
199
 
Referenced by netsnmp_register_table(), and netsnmp_sparse_table_register().
200
175
.SS "int netsnmp_register_table (\fBnetsnmp_handler_registration\fP * reginfo, \fBnetsnmp_table_registration_info\fP * tabreq)"
201
176
.PP
202
177
creates a table handler given the netsnmp_table_registration_info object, inserts it into the request chain and then calls \fBnetsnmp_register_handler()\fP to register the table into the agent. 
203
178
.PP
204
179
Definition at line 108 of file table.c.
205
 
.PP
206
 
References netsnmp_get_table_handler(), netsnmp_inject_handler(), and netsnmp_register_handler().
207
 
.PP
208
 
Referenced by netsnmp_container_table_register(), netsnmp_register_table_data(), netsnmp_register_table_iterator(), netsnmp_table_container_register(), and netsnmp_table_row_register().
209
180
.SS "\fBnetsnmp_mib_handler\fP* netsnmp_sparse_table_handler_get (void)"
210
181
.PP
211
182
create sparse table handler 
212
183
.PP
213
184
Definition at line 722 of file table.c.
214
 
.PP
215
 
References netsnmp_create_handler(), and SPARSE_TABLE_HANDLER_NAME.
216
185
.SS "int netsnmp_sparse_table_register (\fBnetsnmp_handler_registration\fP * reginfo, \fBnetsnmp_table_registration_info\fP * tabreq)"
217
186
.PP
218
187
creates a table handler given the netsnmp_table_registration_info object, inserts it into the request chain and then calls \fBnetsnmp_register_handler()\fP to register the table into the agent. 
219
188
.PP
220
189
Definition at line 733 of file table.c.
221
 
.PP
222
 
References netsnmp_create_handler(), netsnmp_get_table_handler(), netsnmp_inject_handler(), netsnmp_register_handler(), and SPARSE_TABLE_HANDLER_NAME.
223
190
.SS "int netsnmp_table_build_oid (\fBnetsnmp_handler_registration\fP * reginfo, \fBnetsnmp_request_info\fP * reqinfo, \fBnetsnmp_table_request_info\fP * table_info)"
224
191
.PP
225
 
given a registration info object, a request object and the table info object it builds the request->requestvb->name oid from the index values and column information found in the table_info object. 
226
 
.PP
227
 
Index values are extracted from the table_info varbinds. 
228
 
.PP
229
 
.Entry
230
 
.PP
231
 
.column 
 
192
given a registration info object, a request object and the table info object it builds the request->requestvb->name oid from the index values and column information found in the table_info object. Index values are extracted from the table_info varbinds. 
 
193
.PP
 
194
Entry
 
195
.PP
 
196
column
232
197
.PP
233
198
Definition at line 784 of file table.c.
234
 
.PP
235
 
References build_oid(), netsnmp_table_request_info_s::colnum, netsnmp_table_request_info_s::indexes, variable_list::name, variable_list::name_length, netsnmp_request_info_s::requestvb, netsnmp_handler_registration_s::rootoid, and netsnmp_handler_registration_s::rootoid_len.
236
 
.PP
237
 
Referenced by netsnmp_table_build_result().
238
199
.SS "int netsnmp_table_build_oid_from_index (\fBnetsnmp_handler_registration\fP * reginfo, \fBnetsnmp_request_info\fP * reqinfo, \fBnetsnmp_table_request_info\fP * table_info)"
239
200
.PP
240
 
given a registration info object, a request object and the table info object it builds the request->requestvb->name oid from the index values and column information found in the table_info object. 
241
 
.PP
242
 
Index values are extracted from the table_info index oid. 
 
201
given a registration info object, a request object and the table info object it builds the request->requestvb->name oid from the index values and column information found in the table_info object. Index values are extracted from the table_info index oid. 
243
202
.PP
244
203
Definition at line 821 of file table.c.
245
 
.PP
246
 
References netsnmp_table_request_info_s::colnum, netsnmp_table_request_info_s::index_oid, netsnmp_table_request_info_s::index_oid_len, variable_list::name, variable_list::name_length, variable_list::name_loc, netsnmp_request_info_s::requestvb, netsnmp_handler_registration_s::rootoid, netsnmp_handler_registration_s::rootoid_len, snmp_clone_mem(), and SNMP_FREE.
247
204
.SS "int netsnmp_table_build_result (\fBnetsnmp_handler_registration\fP * reginfo, \fBnetsnmp_request_info\fP * reqinfo, \fBnetsnmp_table_request_info\fP * table_info, u_char type, u_char * result, size_t result_len)"
248
205
.PP
249
 
Builds the result to be returned to the agent given the table information. 
250
 
.PP
251
 
Use this function to return results from lowel level handlers to the agent. It takes care of building the proper resulting oid (containing proper indexing) and inserts the result value into the returning varbind. 
 
206
Builds the result to be returned to the agent given the table information. Use this function to return results from lowel level handlers to the agent. It takes care of building the proper resulting oid (containing proper indexing) and inserts the result value into the returning varbind. 
252
207
.PP
253
208
Definition at line 751 of file table.c.
254
 
.PP
255
 
References variable_list::name, variable_list::name_loc, netsnmp_table_build_oid(), NULL, netsnmp_request_info_s::requestvb, and snmp_set_var_typed_value().
256
209
.SS "int netsnmp_update_indexes_from_variable_list (\fBnetsnmp_table_request_info\fP * tri)"
257
210
.PP
258
211
builds an oid given a set of indexes. 
259
212
.PP
260
 
Definition at line 866 of file table.c.
261
 
.PP
262
 
References build_oid_noalloc(), netsnmp_table_request_info_s::index_oid, netsnmp_table_request_info_s::index_oid_len, netsnmp_table_request_info_s::indexes, and NULL.
 
213
Definition at line 863 of file table.c.
263
214
.SS "int netsnmp_update_variable_list_from_index (\fBnetsnmp_table_request_info\fP * tri)"
264
215
.PP
265
216
parses an OID into table indexses 
266
217
.PP
267
 
Definition at line 850 of file table.c.
268
 
.PP
269
 
References netsnmp_table_request_info_s::index_oid, netsnmp_table_request_info_s::index_oid_len, netsnmp_table_request_info_s::indexes, parse_oid_indexes(), and snmp_reset_var_buffers().
 
218
Definition at line 847 of file table.c.
270
219
.SS "int table_helper_handler (\fBnetsnmp_mib_handler\fP * handler, \fBnetsnmp_handler_registration\fP * reginfo, \fBnetsnmp_agent_request_info\fP * reqinfo, \fBnetsnmp_request_info\fP * requests)"
271
220
.PP
272
221
implements the table helper handler 
280
229
for loop 
281
230
.PP
282
231
Definition at line 142 of file table.c.
283
 
.PP
284
 
References netsnmp_table_request_info_s::colnum, netsnmp_mib_handler_s::handler_name, netsnmp_table_request_info_s::index_oid, netsnmp_table_request_info_s::index_oid_len, netsnmp_table_request_info_s::indexes, netsnmp_table_registration_info_s::indexes, netsnmp_table_registration_info_s::max_column, netsnmp_table_registration_info_s::min_column, netsnmp_agent_request_info_s::mode, netsnmp_mib_handler_s::myvoid, netsnmp_agent_get_list_data(), netsnmp_call_next_handler(), netsnmp_create_data_list(), netsnmp_extract_table_info(), netsnmp_free_agent_data_sets(), netsnmp_request_add_list_data(), netsnmp_set_request_error(), netsnmp_request_info_s::next, netsnmp_mib_handler_s::next, variable_list::next_variable, NULL, netsnmp_table_registration_info_s::number_indexes, netsnmp_table_request_info_s::number_indexes, parse_one_oid_index(), netsnmp_request_info_s::processed, netsnmp_table_request_info_s::reg_info, netsnmp_request_info_s::requestvb, netsnmp_handler_registration_s::rootoid, netsnmp_handler_registration_s::rootoid_len, snmp_clone_varbind(), SNMP_FREE, snmp_log(), SNMP_MALLOC_TYPEDEF, snmp_oid_compare(), snmp_set_var_objid(), sprint_realloc_by_type(), netsnmp_request_info_s::status, variable_list::type, and netsnmp_table_registration_info_s::valid_columns.
285
 
.PP
286
 
Referenced by netsnmp_get_table_handler().
 
232
.SH "Author"
 
233
.PP 
 
234
Generated automatically by Doxygen for net-snmp from the source code.