and added files
[bcm963xx.git] / userapps / opensource / net-snmp / man / netsnmp_mib_utilities.3
1 .TH "mib parsing and datatype manipulation routines." 3 "5 Mar 2003" "net-snmp" \" -*- nroff -*-
2 .ad l
3 .nh
4 .SH NAME
5 mib parsing and datatype manipulation routines. \- 
6 .SS "Data Structures"
7
8 .in +1c
9 .ti -1c
10 .RI "struct \fB_PrefixList\fP"
11 .br
12 .ti -1c
13 .RI "struct \fBparse_hints\fP"
14 .br
15 .in -1c
16 .SS "Typedefs"
17
18 .in +1c
19 .ti -1c
20 .RI "typedef _PrefixList * \fBPrefixListPtr\fP"
21 .br
22 .ti -1c
23 .RI "typedef _PrefixList \fBPrefixList\fP"
24 .br
25 .in -1c
26 .SS "Functions"
27
28 .in +1c
29 .ti -1c
30 .RI "int \fBsprint_realloc_hexstring\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const u_char *cp, size_t len)"
31 .br
32 .RI "\fIPrints a hexadecimal string into a buffer.\fP"
33 .ti -1c
34 .RI "int \fBsprint_realloc_asciistring\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const u_char *cp, size_t len)"
35 .br
36 .RI "\fIPrints an ascii string into a buffer.\fP"
37 .ti -1c
38 .RI "int \fBsprint_realloc_octet_string\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
39 .br
40 .RI "\fIPrints an octet string into a buffer.\fP"
41 .ti -1c
42 .RI "int \fBsprint_realloc_counter64\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
43 .br
44 .RI "\fIPrints a counter into a buffer.\fP"
45 .ti -1c
46 .RI "int \fBsprint_realloc_opaque\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
47 .br
48 .RI "\fIPrints an object identifier into a buffer.\fP"
49 .ti -1c
50 .RI "int \fBsprint_realloc_object_identifier\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
51 .br
52 .RI "\fIPrints an object identifier into a buffer.\fP"
53 .ti -1c
54 .RI "int \fBsprint_realloc_timeticks\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
55 .br
56 .RI "\fIPrints a timetick variable into a buffer.\fP"
57 .ti -1c
58 .RI "int \fBsprint_realloc_hinted_integer\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, long val, const char decimaltype, const char *hint, const char *units)"
59 .br
60 .RI "\fIPrints an integer according to the hint into a buffer.\fP"
61 .ti -1c
62 .RI "int \fBsprint_realloc_integer\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
63 .br
64 .RI "\fIPrints an integer into a buffer.\fP"
65 .ti -1c
66 .RI "int \fBsprint_realloc_uinteger\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
67 .br
68 .RI "\fIPrints an unsigned integer into a buffer.\fP"
69 .ti -1c
70 .RI "int \fBsprint_realloc_gauge\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
71 .br
72 .RI "\fIPrints a gauge value into a buffer.\fP"
73 .ti -1c
74 .RI "int \fBsprint_realloc_counter\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
75 .br
76 .RI "\fIPrints a counter value into a buffer.\fP"
77 .ti -1c
78 .RI "int \fBsprint_realloc_networkaddress\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
79 .br
80 .RI "\fIPrints a network address into a buffer.\fP"
81 .ti -1c
82 .RI "int \fBsprint_realloc_ipaddress\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
83 .br
84 .RI "\fIPrints an ip-address into a buffer.\fP"
85 .ti -1c
86 .RI "int \fBsprint_realloc_null\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
87 .br
88 .RI "\fIPrints a null value into a buffer.\fP"
89 .ti -1c
90 .RI "int \fBsprint_realloc_bitstring\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
91 .br
92 .RI "\fIPrints a bit string into a buffer.\fP"
93 .ti -1c
94 .RI "int \fBsprint_realloc_nsapaddress\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
95 .br
96 .ti -1c
97 .RI "int \fBsprint_realloc_badtype\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
98 .br
99 .RI "\fIFallback routine for a bad type, prints 'Variable has bad type' into a buffer.\fP"
100 .ti -1c
101 .RI "int \fBsprint_realloc_by_type\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
102 .br
103 .RI "\fIUniversal print routine, prints a variable into a buffer according to the variable type.\fP"
104 .ti -1c
105 .RI "tree * \fBget_tree_head\fP (void)"
106 .br
107 .RI "\fIRetrieves the tree head.\fP"
108 .ti -1c
109 .RI "char * \fBsnmp_out_toggle_options\fP (char *options)"
110 .br
111 .ti -1c
112 .RI "void \fBsnmp_out_toggle_options_usage\fP (const char *lead, FILE *outf)"
113 .br
114 .ti -1c
115 .RI "char * \fBsnmp_in_toggle_options\fP (char *options)"
116 .br
117 .ti -1c
118 .RI "void \fBsnmp_in_toggle_options_usage\fP (const char *lead, FILE *outf)"
119 .br
120 .RI "\fIPrints out a help usage for the in* toggle options.\fP"
121 .ti -1c
122 .RI "void \fBregister_mib_handlers\fP (void)"
123 .br
124 .ti -1c
125 .RI "void \fBnetsnmp_set_mib_directory\fP (const char *dir)"
126 .br
127 .ti -1c
128 .RI "char * \fBnetsnmp_get_mib_directory\fP ()"
129 .br
130 .RI "\fIset_string calls strdup, so if we allocated memory, free it.\fP"
131 .ti -1c
132 .RI "void \fBnetsnmp_fixup_mib_directory\fP ()"
133 .br
134 .RI "\fINot set use hard coded path.\fP"
135 .ti -1c
136 .RI "void \fBinit_mib\fP (void)"
137 .br
138 .RI "\fIInitialises the mib reader.\fP"
139 .ti -1c
140 .RI "void \fBshutdown_mib\fP (void)"
141 .br
142 .RI "\fIUnloads all mibs.\fP"
143 .ti -1c
144 .RI "void \fBprint_mib\fP (FILE *fp)"
145 .br
146 .RI "\fIPrints the MIBs to the file fp.\fP"
147 .ti -1c
148 .RI "void \fBprint_ascii_dump\fP (FILE *fp)"
149 .br
150 .ti -1c
151 .RI "void \fBset_function\fP (struct tree *subtree)"
152 .br
153 .RI "\fISet's the printing function printomat in a subtree according it's type.\fP"
154 .ti -1c
155 .RI "int \fBread_objid\fP (const char *input, oid *output, size_t *out_len)"
156 .br
157 .RI "\fIReads an object identifier from an input string into internal OID form.\fP"
158 .ti -1c
159 .RI "tree * \fBnetsnmp_sprint_realloc_objid_tree\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, int *buf_overflow, const oid *objid, size_t objidlen)"
160 .br
161 .ti -1c
162 .RI "int \fBsprint_realloc_objid\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const oid *objid, size_t objidlen)"
163 .br
164 .ti -1c
165 .RI "int \fBsnprint_objid\fP (char *buf, size_t buf_len, const oid *objid, size_t objidlen)"
166 .br
167 .ti -1c
168 .RI "void \fBprint_objid\fP (const oid *objid, size_t objidlen)"
169 .br
170 .RI "\fIPrints an oid to stdout.\fP"
171 .ti -1c
172 .RI "void \fBfprint_objid\fP (FILE *f, const oid *objid, size_t objidlen)"
173 .br
174 .RI "\fIPrints an oid to a file descriptor.\fP"
175 .ti -1c
176 .RI "int \fBsprint_realloc_variable\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const oid *objid, size_t objidlen, netsnmp_variable_list *variable)"
177 .br
178 .ti -1c
179 .RI "int \fBsnprint_variable\fP (char *buf, size_t buf_len, const oid *objid, size_t objidlen, netsnmp_variable_list *variable)"
180 .br
181 .ti -1c
182 .RI "void \fBprint_variable\fP (const oid *objid, size_t objidlen, netsnmp_variable_list *variable)"
183 .br
184 .RI "\fIPrints a variable to stdout.\fP"
185 .ti -1c
186 .RI "void \fBfprint_variable\fP (FILE *f, const oid *objid, size_t objidlen, netsnmp_variable_list *variable)"
187 .br
188 .RI "\fIPrints a variable to a file descriptor.\fP"
189 .ti -1c
190 .RI "int \fBsprint_realloc_value\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const oid *objid, size_t objidlen, netsnmp_variable_list *variable)"
191 .br
192 .ti -1c
193 .RI "int \fBsnprint_value\fP (char *buf, size_t buf_len, const oid *objid, size_t objidlen, netsnmp_variable_list *variable)"
194 .br
195 .ti -1c
196 .RI "void \fBprint_value\fP (const oid *objid, size_t objidlen, netsnmp_variable_list *variable)"
197 .br
198 .ti -1c
199 .RI "void \fBfprint_value\fP (FILE *f, const oid *objid, size_t objidlen, netsnmp_variable_list *variable)"
200 .br
201 .ti -1c
202 .RI "int \fBbuild_oid_segment\fP (netsnmp_variable_list *var)"
203 .br
204 .RI "\fITakes the value in VAR and turns it into an OID segment in var->name.\fP"
205 .ti -1c
206 .RI "int \fBbuild_oid_noalloc\fP (oid *in, size_t in_len, size_t *out_len, oid *prefix, size_t prefix_len, netsnmp_variable_list *indexes)"
207 .br
208 .ti -1c
209 .RI "int \fBbuild_oid\fP (oid **out, size_t *out_len, oid *prefix, size_t prefix_len, netsnmp_variable_list *indexes)"
210 .br
211 .ti -1c
212 .RI "int \fBparse_oid_indexes\fP (oid *oidIndex, size_t oidLen, netsnmp_variable_list *data)"
213 .br
214 .ti -1c
215 .RI "int \fBparse_one_oid_index\fP (oid **oidStart, size_t *oidLen, netsnmp_variable_list *data, int complete)"
216 .br
217 .ti -1c
218 .RI "int \fBdump_realloc_oid_to_string\fP (const oid *objid, size_t objidlen, u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, char quotechar)"
219 .br
220 .ti -1c
221 .RI "tree * \fBget_tree\fP (const oid *objid, size_t objidlen, struct tree *subtree)"
222 .br
223 .RI "\fIClone of get_symbol that doesn't take a buffer argument.\fP"
224 .ti -1c
225 .RI "void \fBprint_description\fP (oid *objid, size_t objidlen, int width)"
226 .br
227 .RI "\fIPrints on oid description on stdout.\fP"
228 .ti -1c
229 .RI "void \fBfprint_description\fP (FILE *f, oid *objid, size_t objidlen, int width)"
230 .br
231 .RI "\fIPrints on oid description into a file descriptor.\fP"
232 .ti -1c
233 .RI "int \fBget_module_node\fP (const char *fname, const char *module, oid *objid, size_t *objidlen)"
234 .br
235 .ti -1c
236 .RI "int \fBget_wild_node\fP (const char *name, oid *objid, size_t *objidlen)"
237 .br
238 .ti -1c
239 .RI "int \fBget_node\fP (const char *name, oid *objid, size_t *objidlen)"
240 .br
241 .ti -1c
242 .RI "void \fBclear_tree_flags\fP (register struct tree *tp)"
243 .br
244 .ti -1c
245 .RI "void \fBprint_oid_report\fP (FILE *fp)"
246 .br
247 .ti -1c
248 .RI "void \fBprint_oid_report_enable_labeledoid\fP (void)"
249 .br
250 .ti -1c
251 .RI "void \fBprint_oid_report_enable_oid\fP (void)"
252 .br
253 .ti -1c
254 .RI "void \fBprint_oid_report_enable_suffix\fP (void)"
255 .br
256 .ti -1c
257 .RI "void \fBprint_oid_report_enable_symbolic\fP (void)"
258 .br
259 .ti -1c
260 .RI "char * \fBuptime_string\fP (u_long timeticks, char *buf)"
261 .br
262 .RI "\fIConverts timeticks to hours, minutes, seconds string.\fP"
263 .ti -1c
264 .RI "oid * \fBsnmp_parse_oid\fP (const char *argv, oid *root, size_t *rootlen)"
265 .br
266 .ti -1c
267 .RI "const char * \fBparse_octet_hint\fP (const char *hint, const char *value, unsigned char **new_val, int *new_val_len)"
268 .br
269 .ti -1c
270 .RI "u_char \fBmib_to_asn_type\fP (int mib_type)"
271 .br
272 .ti -1c
273 .RI "int \fBnetsnmp_str2oid\fP (const char *S, oid *O, int L)"
274 .br
275 .RI "\fIConverts a string to its OID form.\fP"
276 .ti -1c
277 .RI "int \fBnetsnmp_oid2chars\fP (char *C, int L, const oid *O)"
278 .br
279 .RI "\fIConverts an OID to its character form.\fP"
280 .ti -1c
281 .RI "int \fBnetsnmp_oid2str\fP (char *S, int L, oid *O)"
282 .br
283 .RI "\fIConverts an OID to its string form.\fP"
284 .ti -1c
285 .RI "int \fBsnprint_by_type\fP (char *buf, size_t buf_len, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
286 .br
287 .ti -1c
288 .RI "int \fBsnprint_hexstring\fP (char *buf, size_t buf_len, const u_char *cp, size_t len)"
289 .br
290 .ti -1c
291 .RI "int \fBsnprint_asciistring\fP (char *buf, size_t buf_len, const u_char *cp, size_t len)"
292 .br
293 .ti -1c
294 .RI "int \fBsnprint_octet_string\fP (char *buf, size_t buf_len, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
295 .br
296 .ti -1c
297 .RI "int \fBsnprint_opaque\fP (char *buf, size_t buf_len, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
298 .br
299 .ti -1c
300 .RI "int \fBsnprint_object_identifier\fP (char *buf, size_t buf_len, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
301 .br
302 .ti -1c
303 .RI "int \fBsnprint_timeticks\fP (char *buf, size_t buf_len, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
304 .br
305 .ti -1c
306 .RI "int \fBsnprint_hinted_integer\fP (char *buf, size_t buf_len, long val, const char *hint, const char *units)"
307 .br
308 .ti -1c
309 .RI "int \fBsnprint_integer\fP (char *buf, size_t buf_len, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
310 .br
311 .ti -1c
312 .RI "int \fBsnprint_uinteger\fP (char *buf, size_t buf_len, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
313 .br
314 .ti -1c
315 .RI "int \fBsnprint_gauge\fP (char *buf, size_t buf_len, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
316 .br
317 .ti -1c
318 .RI "int \fBsnprint_counter\fP (char *buf, size_t buf_len, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
319 .br
320 .ti -1c
321 .RI "int \fBsnprint_networkaddress\fP (char *buf, size_t buf_len, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
322 .br
323 .ti -1c
324 .RI "int \fBsnprint_ipaddress\fP (char *buf, size_t buf_len, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
325 .br
326 .ti -1c
327 .RI "int \fBsnprint_null\fP (char *buf, size_t buf_len, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
328 .br
329 .ti -1c
330 .RI "int \fBsnprint_bitstring\fP (char *buf, size_t buf_len, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
331 .br
332 .ti -1c
333 .RI "int \fBsnprint_nsapaddress\fP (char *buf, size_t buf_len, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
334 .br
335 .ti -1c
336 .RI "int \fBsnprint_counter64\fP (char *buf, size_t buf_len, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
337 .br
338 .ti -1c
339 .RI "int \fBsnprint_badtype\fP (char *buf, size_t buf_len, netsnmp_variable_list *var, struct enum_list *enums, const char *hint, const char *units)"
340 .br
341 .in -1c
342 .SS "Variables"
343
344 .in +1c
345 .ti -1c
346 .RI "tree * \fBtree_head\fP"
347 .br
348 .ti -1c
349 .RI "tree * \fBMib\fP"
350 .br
351 .ti -1c
352 .RI "oid \fBRFC1213_MIB\fP [] = { 1, 3, 6, 1, 2, 1 }"
353 .br
354 .ti -1c
355 .RI "PrefixList \fBmib_prefixes\fP []"
356 .br
357 .in -1c
358 .SH "FUNCTION DOCUMENTATION"
359 .PP 
360 .SS "int build_oid_segment (netsnmp_variable_list * var)"
361 .PP
362 Takes the value in VAR and turns it into an OID segment in var->name.
363 .PP
364 Parameters: \fP
365 .in +1c
366 .TP
367 \fB\fIvar\fP\fP
368 The variable.
369 .PP
370 \fBReturns: \fP
371 .in +1c
372 SNMPERR_SUCCESS or SNMPERR_GENERR 
373 .PP
374 Definition at line 3226 of file mib.c.
375 .SS "void fprint_description (FILE * f, oid * objid, size_t objidlen, int width)"
376 .PP
377 Prints on oid description into a file descriptor.
378 .PP
379 Parameters: \fP
380 .in +1c
381 .TP
382 \fB\fIf\fP\fP
383 The file descriptor to print to. 
384 .TP
385 \fB\fIobjid\fP\fP
386 The object identifier. 
387 .TP
388 \fB\fIobjidlen\fP\fP
389 The object id length. 
390 .TP
391 \fB\fIwidth\fP\fP
392 Number of subidentifiers. 
393 .PP
394 Definition at line 4079 of file mib.c.
395 .SS "void fprint_objid (FILE * f, const oid * objid, size_t objidlen)"
396 .PP
397 Prints an oid to a file descriptor.
398 .PP
399 Parameters: \fP
400 .in +1c
401 .TP
402 \fB\fIf\fP\fP
403 The file descriptor to print to. 
404 .TP
405 \fB\fIobjid\fP\fP
406 The oid to print 
407 .TP
408 \fB\fIobjidlen\fP\fP
409 The length of oidid. 
410 .PP
411 Definition at line 2967 of file mib.c.
412 .SS "void fprint_variable (FILE * f, const oid * objid, size_t objidlen, netsnmp_variable_list * variable)"
413 .PP
414 Prints a variable to a file descriptor.
415 .PP
416 Parameters: \fP
417 .in +1c
418 .TP
419 \fB\fIf\fP\fP
420 The file descriptor to print to. 
421 .TP
422 \fB\fIobjid\fP\fP
423 The object id. 
424 .TP
425 \fB\fIobjidlen\fP\fP
426 The length of teh object id. 
427 .TP
428 \fB\fIvariable\fP\fP
429 The variable to print. 
430 .PP
431 Definition at line 3109 of file mib.c.
432 .SS "struct tree* get_tree (const oid * objid, size_t objidlen, struct tree * subtree)"
433 .PP
434 Clone of get_symbol that doesn't take a buffer argument.
435 .PP
436 \fBSee also: \fP
437 .in +1c
438 get_symbol 
439 .PP
440 Definition at line 4034 of file mib.c.
441 .SS "struct tree* get_tree_head (void)"
442 .PP
443 Retrieves the tree head.
444 .PP
445 \fBReturns: \fP
446 .in +1c
447 the tree head. 
448 .PP
449 Definition at line 2021 of file mib.c.
450 .SS "int get_wild_node (const char * name, oid * objid, size_t * objidlen)"
451 .PP
452 \fBSee also: \fP
453 .in +1c
454 comments on find_best_tree_node for usage after first time. 
455 .PP
456 Definition at line 4941 of file mib.c.
457 .SS "void init_mib (void)"
458 .PP
459 Initialises the mib reader.
460 .PP
461 Reads in all settings from the environment. 
462 .PP
463 Definition at line 2456 of file mib.c.
464 .SS "void netsnmp_fixup_mib_directory ()"
465 .PP
466 Not set use hard coded path.
467 .PP
468 Definition at line 2410 of file mib.c.
469 .SS "char* netsnmp_get_mib_directory ()"
470 .PP
471 set_string calls strdup, so if we allocated memory, free it.
472 .PP
473 Definition at line 2363 of file mib.c.
474 .SS "int netsnmp_oid2chars (char * C, int L, const oid * O)"
475 .PP
476 Converts an OID to its character form.
477 .PP
478 in example 5 . 1 . 2 . 3 . 4 . 5 = 12345
479 .PP
480 Parameters: \fP
481 .in +1c
482 .TP
483 \fB\fIC\fP\fP
484 The character buffer. 
485 .TP
486 \fB\fIL\fP\fP
487 The length of the buffer. 
488 .TP
489 \fB\fIO\fP\fP
490 The oid.
491 .PP
492 \fBReturns: \fP
493 .in +1c
494 0 on Sucess, 1 on failure. 
495 .PP
496 Definition at line 5635 of file mib.c.
497 .SS "int netsnmp_oid2str (char * S, int L, oid * O)"
498 .PP
499 Converts an OID to its string form.
500 .PP
501 in example 5 . 'h' . 'e' . 'l' . 'l' . 'o' = 'hello\\0' (null terminated)
502 .PP
503 Parameters: \fP
504 .in +1c
505 .TP
506 \fB\fIS\fP\fP
507 The character string buffer. 
508 .TP
509 \fB\fIL\fP\fP
510 The length of the string buffer. 
511 .TP
512 \fB\fIO\fP\fP
513 The oid.
514 .PP
515 \fBReturns: \fP
516 .in +1c
517 0 on Sucess, 1 on failure. 
518 .PP
519 Definition at line 5663 of file mib.c.
520 .SS "int netsnmp_str2oid (const char * S, oid * O, int L)"
521 .PP
522 Converts a string to its OID form.
523 .PP
524 in example 'hello' = 5 . 'h' . 'e' . 'l' . 'l' . 'o'
525 .PP
526 Parameters: \fP
527 .in +1c
528 .TP
529 \fB\fIS\fP\fP
530 The string. 
531 .TP
532 \fB\fIO\fP\fP
533 The oid. 
534 .TP
535 \fB\fIL\fP\fP
536 The length of the oid.
537 .PP
538 \fBReturns: \fP
539 .in +1c
540 0 on Sucess, 1 on failure. 
541 .PP
542 Definition at line 5600 of file mib.c.
543 .SS "void print_description (oid * objid, size_t objidlen, int width)"
544 .PP
545 Prints on oid description on stdout.
546 .PP
547 \fBSee also: \fP
548 .in +1c
549 \fBfprint_description\fP 
550 .PP
551 Definition at line 4063 of file mib.c.
552 .SS "void print_mib (FILE * fp)"
553 .PP
554 Prints the MIBs to the file fp.
555 .PP
556 Parameters: \fP
557 .in +1c
558 .TP
559 \fB\fIfp\fP\fP
560 The file descriptor to print to. 
561 .PP
562 Definition at line 2636 of file mib.c.
563 .SS "void print_objid (const oid * objid, size_t objidlen)"
564 .PP
565 Prints an oid to stdout.
566 .PP
567 Parameters: \fP
568 .in +1c
569 .TP
570 \fB\fIobjid\fP\fP
571 The oid to print 
572 .TP
573 \fB\fIobjidlen\fP\fP
574 The length of oidid. 
575 .PP
576 Definition at line 2953 of file mib.c.
577 .SS "void print_variable (const oid * objid, size_t objidlen, netsnmp_variable_list * variable)"
578 .PP
579 Prints a variable to stdout.
580 .PP
581 Parameters: \fP
582 .in +1c
583 .TP
584 \fB\fIobjid\fP\fP
585 The object id. 
586 .TP
587 \fB\fIobjidlen\fP\fP
588 The length of teh object id. 
589 .TP
590 \fB\fIvariable\fP\fP
591 The variable to print. 
592 .PP
593 Definition at line 3093 of file mib.c.
594 .SS "int read_objid (const char * input, oid * output, size_t * out_len)"
595 .PP
596 Reads an object identifier from an input string into internal OID form.
597 .PP
598 When called, out_len must hold the maximum length of the output array.
599 .PP
600 Parameters: \fP
601 .in +1c
602 .TP
603 \fB\fIinput\fP\fP
604 the input string. 
605 .TP
606 \fB\fIoutput\fP\fP
607 the oid wirte. 
608 .TP
609 \fB\fIout_len\fP\fP
610 number of subid's in output.
611 .PP
612 \fBReturns: \fP
613 .in +1c
614 1 if successful.If an error occurs, this function returns 0 and MAY set snmp_errno. snmp_errno is NOT set if SET_SNMP_ERROR evaluates to nothing. This can make multi-threaded use a tiny bit more robust. 
615 .PP
616 Definition at line 2732 of file mib.c.
617 .SS "void set_function (struct tree * subtree)"
618 .PP
619 Set's the printing function printomat in a subtree according it's type.
620 .PP
621 Parameters: \fP
622 .in +1c
623 .TP
624 \fB\fIsubtree\fP\fP
625 The subtree to set. 
626 .PP
627 Definition at line 2657 of file mib.c.
628 .SS "void shutdown_mib (void)"
629 .PP
630 Unloads all mibs.
631 .PP
632 Definition at line 2613 of file mib.c.
633 .SS "void snmp_in_toggle_options_usage (const char * lead, FILE * outf)"
634 .PP
635 Prints out a help usage for the in* toggle options.
636 .PP
637 Parameters: \fP
638 .in +1c
639 .TP
640 \fB\fIlead\fP\fP
641 The lead to print for every line. 
642 .TP
643 \fB\fIoutf\fP\fP
644 The file descriptor to write to. 
645 .PP
646 Definition at line 2229 of file mib.c.
647 .SS "int sprint_realloc_asciistring (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const u_char * cp, size_t len)"
648 .PP
649 Prints an ascii string into a buffer.
650 .PP
651 The characters pointed by *cp are encoded as an ascii string.
652 .PP
653 If allow_realloc is true the buffer will be (re)allocated to fit in the  needed size. (Note: *buf may change due to this.)
654 .PP
655 Parameters: \fP
656 .in +1c
657 .TP
658 \fB\fIbuf\fP\fP
659 address of the buffer to print to. 
660 .TP
661 \fB\fIbuf_len\fP\fP
662 address to an integer containing the size of buf. 
663 .TP
664 \fB\fIout_len\fP\fP
665 incremented by the number of characters printed. 
666 .TP
667 \fB\fIallow_realloc\fP\fP
668 if not zero reallocate the buffer to fit the  needed size. 
669 .TP
670 \fB\fIcp\fP\fP
671 the array of characters to encode. 
672 .TP
673 \fB\fIlen\fP\fP
674 the array length of cp.
675 .PP
676 \fBReturns: \fP
677 .in +1c
678 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) 
679 .PP
680 Definition at line 343 of file mib.c.
681 .SS "int sprint_realloc_badtype (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, netsnmp_variable_list * var, struct enum_list * enums, const char * hint, const char * units)"
682 .PP
683 Fallback routine for a bad type, prints 'Variable has bad type' into a buffer.
684 .PP
685 If allow_realloc is true the buffer will be (re)allocated to fit in the  needed size. (Note: *buf may change due to this.)
686 .PP
687 Parameters: \fP
688 .in +1c
689 .TP
690 \fB\fIbuf\fP\fP
691 Address of the buffer to print to. 
692 .TP
693 \fB\fIbuf_len\fP\fP
694 Address to an integer containing the size of buf. 
695 .TP
696 \fB\fIout_len\fP\fP
697 Incremented by the number of characters printed. 
698 .TP
699 \fB\fIallow_realloc\fP\fP
700 if not zero reallocate the buffer to fit the  needed size. 
701 .TP
702 \fB\fIvar\fP\fP
703 The variable to encode. 
704 .TP
705 \fB\fIenums\fP\fP
706 The enumeration ff this variable is enumerated. may be NULL. 
707 .TP
708 \fB\fIhint\fP\fP
709 Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
710 .TP
711 \fB\fIunits\fP\fP
712 Contents of the UNITS clause of the MIB. may be NULL.
713 .PP
714 \fBReturns: \fP
715 .in +1c
716 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) 
717 .PP
718 Definition at line 1907 of file mib.c.
719 .SS "int sprint_realloc_bitstring (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, netsnmp_variable_list * var, struct enum_list * enums, const char * hint, const char * units)"
720 .PP
721 Prints a bit string into a buffer.
722 .PP
723 If allow_realloc is true the buffer will be (re)allocated to fit in the  needed size. (Note: *buf may change due to this.)
724 .PP
725 Parameters: \fP
726 .in +1c
727 .TP
728 \fB\fIbuf\fP\fP
729 Address of the buffer to print to. 
730 .TP
731 \fB\fIbuf_len\fP\fP
732 Address to an integer containing the size of buf. 
733 .TP
734 \fB\fIout_len\fP\fP
735 Incremented by the number of characters printed. 
736 .TP
737 \fB\fIallow_realloc\fP\fP
738 if not zero reallocate the buffer to fit the  needed size. 
739 .TP
740 \fB\fIvar\fP\fP
741 The variable to encode. 
742 .TP
743 \fB\fIenums\fP\fP
744 The enumeration ff this variable is enumerated. may be NULL. 
745 .TP
746 \fB\fIhint\fP\fP
747 Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
748 .TP
749 \fB\fIunits\fP\fP
750 Contents of the UNITS clause of the MIB. may be NULL.
751 .PP
752 \fBReturns: \fP
753 .in +1c
754 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) 
755 .PP
756 Definition at line 1768 of file mib.c.
757 .SS "int sprint_realloc_by_type (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, netsnmp_variable_list * var, struct enum_list * enums, const char * hint, const char * units)"
758 .PP
759 Universal print routine, prints a variable into a buffer according to the variable type.
760 .PP
761 If allow_realloc is true the buffer will be (re)allocated to fit in the  needed size. (Note: *buf may change due to this.)
762 .PP
763 Parameters: \fP
764 .in +1c
765 .TP
766 \fB\fIbuf\fP\fP
767 Address of the buffer to print to. 
768 .TP
769 \fB\fIbuf_len\fP\fP
770 Address to an integer containing the size of buf. 
771 .TP
772 \fB\fIout_len\fP\fP
773 Incremented by the number of characters printed. 
774 .TP
775 \fB\fIallow_realloc\fP\fP
776 if not zero reallocate the buffer to fit the  needed size. 
777 .TP
778 \fB\fIvar\fP\fP
779 The variable to encode. 
780 .TP
781 \fB\fIenums\fP\fP
782 The enumeration ff this variable is enumerated. may be NULL. 
783 .TP
784 \fB\fIhint\fP\fP
785 Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
786 .TP
787 \fB\fIunits\fP\fP
788 Contents of the UNITS clause of the MIB. may be NULL.
789 .PP
790 \fBReturns: \fP
791 .in +1c
792 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) 
793 .PP
794 Definition at line 1942 of file mib.c.
795 .SS "int sprint_realloc_counter (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, netsnmp_variable_list * var, struct enum_list * enums, const char * hint, const char * units)"
796 .PP
797 Prints a counter value into a buffer.
798 .PP
799 If allow_realloc is true the buffer will be (re)allocated to fit in the  needed size. (Note: *buf may change due to this.)
800 .PP
801 Parameters: \fP
802 .in +1c
803 .TP
804 \fB\fIbuf\fP\fP
805 Address of the buffer to print to. 
806 .TP
807 \fB\fIbuf_len\fP\fP
808 Address to an integer containing the size of buf. 
809 .TP
810 \fB\fIout_len\fP\fP
811 Incremented by the number of characters printed. 
812 .TP
813 \fB\fIallow_realloc\fP\fP
814 if not zero reallocate the buffer to fit the  needed size. 
815 .TP
816 \fB\fIvar\fP\fP
817 The variable to encode. 
818 .TP
819 \fB\fIenums\fP\fP
820 The enumeration ff this variable is enumerated. may be NULL. 
821 .TP
822 \fB\fIhint\fP\fP
823 Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
824 .TP
825 \fB\fIunits\fP\fP
826 Contents of the UNITS clause of the MIB. may be NULL.
827 .PP
828 \fBReturns: \fP
829 .in +1c
830 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) 
831 .PP
832 Definition at line 1536 of file mib.c.
833 .SS "int sprint_realloc_counter64 (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, netsnmp_variable_list * var, struct enum_list * enums, const char * hint, const char * units)"
834 .PP
835 Prints a counter into a buffer.
836 .PP
837 The variable var is encoded as a counter value.
838 .PP
839 If allow_realloc is true the buffer will be (re)allocated to fit in the  needed size. (Note: *buf may change due to this.)
840 .PP
841 Parameters: \fP
842 .in +1c
843 .TP
844 \fB\fIbuf\fP\fP
845 Address of the buffer to print to. 
846 .TP
847 \fB\fIbuf_len\fP\fP
848 Address to an integer containing the size of buf. 
849 .TP
850 \fB\fIout_len\fP\fP
851 Incremented by the number of characters printed. 
852 .TP
853 \fB\fIallow_realloc\fP\fP
854 if not zero reallocate the buffer to fit the  needed size. 
855 .TP
856 \fB\fIvar\fP\fP
857 The variable to encode. 
858 .TP
859 \fB\fIenums\fP\fP
860 The enumeration ff this variable is enumerated. may be NULL. 
861 .TP
862 \fB\fIhint\fP\fP
863 Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
864 .TP
865 \fB\fIunits\fP\fP
866 Contents of the UNITS clause of the MIB. may be NULL.
867 .PP
868 \fBReturns: \fP
869 .in +1c
870 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) 
871 .PP
872 Definition at line 841 of file mib.c.
873 .SS "int sprint_realloc_gauge (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, netsnmp_variable_list * var, struct enum_list * enums, const char * hint, const char * units)"
874 .PP
875 Prints a gauge value into a buffer.
876 .PP
877 If allow_realloc is true the buffer will be (re)allocated to fit in the  needed size. (Note: *buf may change due to this.)
878 .PP
879 Parameters: \fP
880 .in +1c
881 .TP
882 \fB\fIbuf\fP\fP
883 Address of the buffer to print to. 
884 .TP
885 \fB\fIbuf_len\fP\fP
886 Address to an integer containing the size of buf. 
887 .TP
888 \fB\fIout_len\fP\fP
889 Incremented by the number of characters printed. 
890 .TP
891 \fB\fIallow_realloc\fP\fP
892 if not zero reallocate the buffer to fit the  needed size. 
893 .TP
894 \fB\fIvar\fP\fP
895 The variable to encode. 
896 .TP
897 \fB\fIenums\fP\fP
898 The enumeration ff this variable is enumerated. may be NULL. 
899 .TP
900 \fB\fIhint\fP\fP
901 Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
902 .TP
903 \fB\fIunits\fP\fP
904 Contents of the UNITS clause of the MIB. may be NULL.
905 .PP
906 \fBReturns: \fP
907 .in +1c
908 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) 
909 .PP
910 Definition at line 1463 of file mib.c.
911 .SS "int sprint_realloc_hexstring (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const u_char * cp, size_t len)"
912 .PP
913 Prints a hexadecimal string into a buffer.
914 .PP
915 The characters pointed by *cp are encoded as hexadecimal string.
916 .PP
917 If allow_realloc is true the buffer will be (re)allocated to fit in the  needed size. (Note: *buf may change due to this.)
918 .PP
919 Parameters: \fP
920 .in +1c
921 .TP
922 \fB\fIbuf\fP\fP
923 address of the buffer to print to. 
924 .TP
925 \fB\fIbuf_len\fP\fP
926 address to an integer containing the size of buf. 
927 .TP
928 \fB\fIout_len\fP\fP
929 incremented by the number of characters printed. 
930 .TP
931 \fB\fIallow_realloc\fP\fP
932 if not zero reallocate the buffer to fit the  needed size. 
933 .TP
934 \fB\fIcp\fP\fP
935 the array of characters to encode. 
936 .TP
937 \fB\fIlen\fP\fP
938 the array length of cp.
939 .PP
940 \fBReturns: \fP
941 .in +1c
942 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) 
943 .PP
944 Definition at line 241 of file mib.c.
945 .SS "int sprint_realloc_hinted_integer (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, long val, const char decimaltype, const char * hint, const char * units)"
946 .PP
947 Prints an integer according to the hint into a buffer.
948 .PP
949 If allow_realloc is true the buffer will be (re)allocated to fit in the  needed size. (Note: *buf may change due to this.)
950 .PP
951 Parameters: \fP
952 .in +1c
953 .TP
954 \fB\fIbuf\fP\fP
955 Address of the buffer to print to. 
956 .TP
957 \fB\fIbuf_len\fP\fP
958 Address to an integer containing the size of buf. 
959 .TP
960 \fB\fIout_len\fP\fP
961 Incremented by the number of characters printed. 
962 .TP
963 \fB\fIallow_realloc\fP\fP
964 if not zero reallocate the buffer to fit the  needed size. 
965 .TP
966 \fB\fIvar\fP\fP
967 The variable to encode. 
968 .TP
969 \fB\fIenums\fP\fP
970 The enumeration ff this variable is enumerated. may be NULL. 
971 .TP
972 \fB\fIhint\fP\fP
973 Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may _NOT_ be NULL. 
974 .TP
975 \fB\fIunits\fP\fP
976 Contents of the UNITS clause of the MIB. may be NULL.
977 .PP
978 \fBReturns: \fP
979 .in +1c
980 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) 
981 .PP
982 Definition at line 1189 of file mib.c.
983 .SS "int sprint_realloc_integer (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, netsnmp_variable_list * var, struct enum_list * enums, const char * hint, const char * units)"
984 .PP
985 Prints an integer into a buffer.
986 .PP
987 If allow_realloc is true the buffer will be (re)allocated to fit in the  needed size. (Note: *buf may change due to this.)
988 .PP
989 Parameters: \fP
990 .in +1c
991 .TP
992 \fB\fIbuf\fP\fP
993 Address of the buffer to print to. 
994 .TP
995 \fB\fIbuf_len\fP\fP
996 Address to an integer containing the size of buf. 
997 .TP
998 \fB\fIout_len\fP\fP
999 Incremented by the number of characters printed. 
1000 .TP
1001 \fB\fIallow_realloc\fP\fP
1002 if not zero reallocate the buffer to fit the  needed size. 
1003 .TP
1004 \fB\fIvar\fP\fP
1005 The variable to encode. 
1006 .TP
1007 \fB\fIenums\fP\fP
1008 The enumeration ff this variable is enumerated. may be NULL. 
1009 .TP
1010 \fB\fIhint\fP\fP
1011 Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
1012 .TP
1013 \fB\fIunits\fP\fP
1014 Contents of the UNITS clause of the MIB. may be NULL.
1015 .PP
1016 \fBReturns: \fP
1017 .in +1c
1018 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) 
1019 .PP
1020 Definition at line 1263 of file mib.c.
1021 .SS "int sprint_realloc_ipaddress (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, netsnmp_variable_list * var, struct enum_list * enums, const char * hint, const char * units)"
1022 .PP
1023 Prints an ip-address into a buffer.
1024 .PP
1025 If allow_realloc is true the buffer will be (re)allocated to fit in the  needed size. (Note: *buf may change due to this.)
1026 .PP
1027 Parameters: \fP
1028 .in +1c
1029 .TP
1030 \fB\fIbuf\fP\fP
1031 Address of the buffer to print to. 
1032 .TP
1033 \fB\fIbuf_len\fP\fP
1034 Address to an integer containing the size of buf. 
1035 .TP
1036 \fB\fIout_len\fP\fP
1037 Incremented by the number of characters printed. 
1038 .TP
1039 \fB\fIallow_realloc\fP\fP
1040 if not zero reallocate the buffer to fit the  needed size. 
1041 .TP
1042 \fB\fIvar\fP\fP
1043 The variable to encode. 
1044 .TP
1045 \fB\fIenums\fP\fP
1046 The enumeration ff this variable is enumerated. may be NULL. 
1047 .TP
1048 \fB\fIhint\fP\fP
1049 Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
1050 .TP
1051 \fB\fIunits\fP\fP
1052 Contents of the UNITS clause of the MIB. may be NULL.
1053 .PP
1054 \fBReturns: \fP
1055 .in +1c
1056 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) 
1057 .PP
1058 Definition at line 1665 of file mib.c.
1059 .SS "int sprint_realloc_networkaddress (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, netsnmp_variable_list * var, struct enum_list * enums, const char * hint, const char * units)"
1060 .PP
1061 Prints a network address into a buffer.
1062 .PP
1063 If allow_realloc is true the buffer will be (re)allocated to fit in the  needed size. (Note: *buf may change due to this.)
1064 .PP
1065 Parameters: \fP
1066 .in +1c
1067 .TP
1068 \fB\fIbuf\fP\fP
1069 Address of the buffer to print to. 
1070 .TP
1071 \fB\fIbuf_len\fP\fP
1072 Address to an integer containing the size of buf. 
1073 .TP
1074 \fB\fIout_len\fP\fP
1075 Incremented by the number of characters printed. 
1076 .TP
1077 \fB\fIallow_realloc\fP\fP
1078 if not zero reallocate the buffer to fit the  needed size. 
1079 .TP
1080 \fB\fIvar\fP\fP
1081 The variable to encode. 
1082 .TP
1083 \fB\fIenums\fP\fP
1084 The enumeration ff this variable is enumerated. may be NULL. 
1085 .TP
1086 \fB\fIhint\fP\fP
1087 Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
1088 .TP
1089 \fB\fIunits\fP\fP
1090 Contents of the UNITS clause of the MIB. may be NULL.
1091 .PP
1092 \fBReturns: \fP
1093 .in +1c
1094 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) 
1095 .PP
1096 Definition at line 1599 of file mib.c.
1097 .SS "int sprint_realloc_null (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, netsnmp_variable_list * var, struct enum_list * enums, const char * hint, const char * units)"
1098 .PP
1099 Prints a null value into a buffer.
1100 .PP
1101 If allow_realloc is true the buffer will be (re)allocated to fit in the  needed size. (Note: *buf may change due to this.)
1102 .PP
1103 Parameters: \fP
1104 .in +1c
1105 .TP
1106 \fB\fIbuf\fP\fP
1107 Address of the buffer to print to. 
1108 .TP
1109 \fB\fIbuf_len\fP\fP
1110 Address to an integer containing the size of buf. 
1111 .TP
1112 \fB\fIout_len\fP\fP
1113 Incremented by the number of characters printed. 
1114 .TP
1115 \fB\fIallow_realloc\fP\fP
1116 if not zero reallocate the buffer to fit the  needed size. 
1117 .TP
1118 \fB\fIvar\fP\fP
1119 The variable to encode. 
1120 .TP
1121 \fB\fIenums\fP\fP
1122 The enumeration ff this variable is enumerated. may be NULL. 
1123 .TP
1124 \fB\fIhint\fP\fP
1125 Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
1126 .TP
1127 \fB\fIunits\fP\fP
1128 Contents of the UNITS clause of the MIB. may be NULL.
1129 .PP
1130 \fBReturns: \fP
1131 .in +1c
1132 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) 
1133 .PP
1134 Definition at line 1724 of file mib.c.
1135 .SS "int sprint_realloc_object_identifier (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, netsnmp_variable_list * var, struct enum_list * enums, const char * hint, const char * units)"
1136 .PP
1137 Prints an object identifier into a buffer.
1138 .PP
1139 If allow_realloc is true the buffer will be (re)allocated to fit in the  needed size. (Note: *buf may change due to this.)
1140 .PP
1141 Parameters: \fP
1142 .in +1c
1143 .TP
1144 \fB\fIbuf\fP\fP
1145 Address of the buffer to print to. 
1146 .TP
1147 \fB\fIbuf_len\fP\fP
1148 Address to an integer containing the size of buf. 
1149 .TP
1150 \fB\fIout_len\fP\fP
1151 Incremented by the number of characters printed. 
1152 .TP
1153 \fB\fIallow_realloc\fP\fP
1154 if not zero reallocate the buffer to fit the  needed size. 
1155 .TP
1156 \fB\fIvar\fP\fP
1157 The variable to encode. 
1158 .TP
1159 \fB\fIenums\fP\fP
1160 The enumeration ff this variable is enumerated. may be NULL. 
1161 .TP
1162 \fB\fIhint\fP\fP
1163 Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
1164 .TP
1165 \fB\fIunits\fP\fP
1166 Contents of the UNITS clause of the MIB. may be NULL.
1167 .PP
1168 \fBReturns: \fP
1169 .in +1c
1170 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) 
1171 .PP
1172 Definition at line 1045 of file mib.c.
1173 .SS "int sprint_realloc_octet_string (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, netsnmp_variable_list * var, struct enum_list * enums, const char * hint, const char * units)"
1174 .PP
1175 Prints an octet string into a buffer.
1176 .PP
1177 The variable var is encoded as octet string.
1178 .PP
1179 If allow_realloc is true the buffer will be (re)allocated to fit in the  needed size. (Note: *buf may change due to this.)
1180 .PP
1181 Parameters: \fP
1182 .in +1c
1183 .TP
1184 \fB\fIbuf\fP\fP
1185 Address of the buffer to print to. 
1186 .TP
1187 \fB\fIbuf_len\fP\fP
1188 Address to an integer containing the size of buf. 
1189 .TP
1190 \fB\fIout_len\fP\fP
1191 Incremented by the number of characters printed. 
1192 .TP
1193 \fB\fIallow_realloc\fP\fP
1194 if not zero reallocate the buffer to fit the  needed size. 
1195 .TP
1196 \fB\fIvar\fP\fP
1197 The variable to encode. 
1198 .TP
1199 \fB\fIenums\fP\fP
1200 The enumeration ff this variable is enumerated. may be NULL. 
1201 .TP
1202 \fB\fIhint\fP\fP
1203 Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
1204 .TP
1205 \fB\fIunits\fP\fP
1206 Contents of the UNITS clause of the MIB. may be NULL.
1207 .PP
1208 \fBReturns: \fP
1209 .in +1c
1210 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) 
1211 .PP
1212 Definition at line 403 of file mib.c.
1213 .SS "int sprint_realloc_opaque (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, netsnmp_variable_list * var, struct enum_list * enums, const char * hint, const char * units)"
1214 .PP
1215 Prints an object identifier into a buffer.
1216 .PP
1217 If allow_realloc is true the buffer will be (re)allocated to fit in the  needed size. (Note: *buf may change due to this.)
1218 .PP
1219 Parameters: \fP
1220 .in +1c
1221 .TP
1222 \fB\fIbuf\fP\fP
1223 Address of the buffer to print to. 
1224 .TP
1225 \fB\fIbuf_len\fP\fP
1226 Address to an integer containing the size of buf. 
1227 .TP
1228 \fB\fIout_len\fP\fP
1229 Incremented by the number of characters printed. 
1230 .TP
1231 \fB\fIallow_realloc\fP\fP
1232 if not zero reallocate the buffer to fit the  needed size. 
1233 .TP
1234 \fB\fIvar\fP\fP
1235 The variable to encode. 
1236 .TP
1237 \fB\fIenums\fP\fP
1238 The enumeration ff this variable is enumerated. may be NULL. 
1239 .TP
1240 \fB\fIhint\fP\fP
1241 Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
1242 .TP
1243 \fB\fIunits\fP\fP
1244 Contents of the UNITS clause of the MIB. may be NULL.
1245 .PP
1246 \fBReturns: \fP
1247 .in +1c
1248 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) 
1249 .PP
1250 Definition at line 955 of file mib.c.
1251 .SS "int sprint_realloc_timeticks (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, netsnmp_variable_list * var, struct enum_list * enums, const char * hint, const char * units)"
1252 .PP
1253 Prints a timetick variable into a buffer.
1254 .PP
1255 If allow_realloc is true the buffer will be (re)allocated to fit in the  needed size. (Note: *buf may change due to this.)
1256 .PP
1257 Parameters: \fP
1258 .in +1c
1259 .TP
1260 \fB\fIbuf\fP\fP
1261 Address of the buffer to print to. 
1262 .TP
1263 \fB\fIbuf_len\fP\fP
1264 Address to an integer containing the size of buf. 
1265 .TP
1266 \fB\fIout_len\fP\fP
1267 Incremented by the number of characters printed. 
1268 .TP
1269 \fB\fIallow_realloc\fP\fP
1270 if not zero reallocate the buffer to fit the  needed size. 
1271 .TP
1272 \fB\fIvar\fP\fP
1273 The variable to encode. 
1274 .TP
1275 \fB\fIenums\fP\fP
1276 The enumeration ff this variable is enumerated. may be NULL. 
1277 .TP
1278 \fB\fIhint\fP\fP
1279 Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
1280 .TP
1281 \fB\fIunits\fP\fP
1282 Contents of the UNITS clause of the MIB. may be NULL.
1283 .PP
1284 \fBReturns: \fP
1285 .in +1c
1286 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) 
1287 .PP
1288 Definition at line 1115 of file mib.c.
1289 .SS "int sprint_realloc_uinteger (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, netsnmp_variable_list * var, struct enum_list * enums, const char * hint, const char * units)"
1290 .PP
1291 Prints an unsigned integer into a buffer.
1292 .PP
1293 If allow_realloc is true the buffer will be (re)allocated to fit in the  needed size. (Note: *buf may change due to this.)
1294 .PP
1295 Parameters: \fP
1296 .in +1c
1297 .TP
1298 \fB\fIbuf\fP\fP
1299 Address of the buffer to print to. 
1300 .TP
1301 \fB\fIbuf_len\fP\fP
1302 Address to an integer containing the size of buf. 
1303 .TP
1304 \fB\fIout_len\fP\fP
1305 Incremented by the number of characters printed. 
1306 .TP
1307 \fB\fIallow_realloc\fP\fP
1308 if not zero reallocate the buffer to fit the  needed size. 
1309 .TP
1310 \fB\fIvar\fP\fP
1311 The variable to encode. 
1312 .TP
1313 \fB\fIenums\fP\fP
1314 The enumeration ff this variable is enumerated. may be NULL. 
1315 .TP
1316 \fB\fIhint\fP\fP
1317 Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
1318 .TP
1319 \fB\fIunits\fP\fP
1320 Contents of the UNITS clause of the MIB. may be NULL.
1321 .PP
1322 \fBReturns: \fP
1323 .in +1c
1324 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) 
1325 .PP
1326 Definition at line 1366 of file mib.c.
1327 .SS "char* uptime_string (u_long timeticks, char * buf)"
1328 .PP
1329 Converts timeticks to hours, minutes, seconds string.
1330 .PP
1331 CMU compatible does not show centiseconds.
1332 .PP
1333 Parameters: \fP
1334 .in +1c
1335 .TP
1336 \fB\fItimeticks\fP\fP
1337 The timeticks to convert. 
1338 .TP
1339 \fB\fIbuf\fP\fP
1340 Buffer to write to, has to be at  least 64 Bytes large.
1341 .PP
1342 \fBReturns: \fP
1343 .in +1c
1344 The buffer
1345 .PP
1346 \fBSee also: \fP
1347 .in +1c
1348 uptimeString 
1349 .PP
1350 Definition at line 5223 of file mib.c.
1351 .SH "VARIABLE DOCUMENTATION"
1352 .PP 
1353 .SS "PrefixList mib_prefixes[]"
1354 .PP
1355 \fBInitial value:\fP
1356 .PP
1357 .nf
1358  {
1359     {&Standard_Prefix[0]},      
1360     {'.iso.org.dod.internet.mgmt.mib-2'},
1361     {'.iso.org.dod.internet.experimental'},
1362     {'.iso.org.dod.internet.private'},
1363     {'.iso.org.dod.internet.snmpParties'},
1364     {'.iso.org.dod.internet.snmpSecrets'},
1365     {NULL, 0}                   
1366 }
1367 .fi
1368 .PP
1369 Definition at line 138 of file mib.c.