1mib parsing and datatype manimpiublaptaironsneitnr-gosunatmnipdnedsa.t(a3t)ype manipulation routines.(3)
2
3
4

NAME

6       mib parsing and datatype manipulation routines. -
7
8   Data Structures
9       struct _PrefixList
10       struct parse_hints
11
12   Typedefs
13       typedef _PrefixList * PrefixListPtr
14       typedef _PrefixList PrefixList
15
16   Enumerations
17       enum inet_address_type { IPV4 =  1, IPV6 =  2, IPV4Z =  3, IPV6Z =  4,
18           DNS =  16 }
19
20   Functions
21       int _sprint_hexstring_line (u_char **buf, size_t *buf_len, size_t
22           *out_len, int allow_realloc, const u_char *cp, size_t line_len)
23           Prints a hexadecimal string into a buffer.
24       int sprint_realloc_hexstring (u_char **buf, size_t *buf_len, size_t
25           *out_len, int allow_realloc, const u_char *cp, size_t len)
26       int sprint_realloc_asciistring (u_char **buf, size_t *buf_len, size_t
27           *out_len, int allow_realloc, const u_char *cp, size_t len)
28           Prints an ascii string into a buffer.
29       int sprint_realloc_octet_string (u_char **buf, size_t *buf_len, size_t
30           *out_len, int allow_realloc, const netsnmp_variable_list *var,
31           const struct enum_list *enums, const char *hint, const char *units)
32           Prints an octet string into a buffer.
33       int sprint_realloc_counter64 (u_char **buf, size_t *buf_len, size_t
34           *out_len, int allow_realloc, const netsnmp_variable_list *var,
35           const struct enum_list *enums, const char *hint, const char *units)
36           Prints a counter into a buffer.
37       int sprint_realloc_opaque (u_char **buf, size_t *buf_len, size_t
38           *out_len, int allow_realloc, const netsnmp_variable_list *var,
39           const struct enum_list *enums, const char *hint, const char *units)
40           Prints an object identifier into a buffer.
41       int sprint_realloc_object_identifier (u_char **buf, size_t *buf_len,
42           size_t *out_len, int allow_realloc, const netsnmp_variable_list
43           *var, const struct enum_list *enums, const char *hint, const char
44           *units)
45           Prints an object identifier into a buffer.
46       int sprint_realloc_timeticks (u_char **buf, size_t *buf_len, size_t
47           *out_len, int allow_realloc, const netsnmp_variable_list *var,
48           const struct enum_list *enums, const char *hint, const char *units)
49           Prints a timetick variable into a buffer.
50       int sprint_realloc_hinted_integer (u_char **buf, size_t *buf_len,
51           size_t *out_len, int allow_realloc, long val, const char
52           decimaltype, const char *hint, const char *units)
53           Prints an integer according to the hint into a buffer.
54       int sprint_realloc_integer (u_char **buf, size_t *buf_len, size_t
55           *out_len, int allow_realloc, const netsnmp_variable_list *var,
56           const struct enum_list *enums, const char *hint, const char *units)
57           Prints an integer into a buffer.
58       int sprint_realloc_uinteger (u_char **buf, size_t *buf_len, size_t
59           *out_len, int allow_realloc, const netsnmp_variable_list *var,
60           const struct enum_list *enums, const char *hint, const char *units)
61           Prints an unsigned integer into a buffer.
62       int sprint_realloc_gauge (u_char **buf, size_t *buf_len, size_t
63           *out_len, int allow_realloc, const netsnmp_variable_list *var,
64           const struct enum_list *enums, const char *hint, const char *units)
65           Prints a gauge value into a buffer.
66       int sprint_realloc_counter (u_char **buf, size_t *buf_len, size_t
67           *out_len, int allow_realloc, const netsnmp_variable_list *var,
68           const struct enum_list *enums, const char *hint, const char *units)
69           Prints a counter value into a buffer.
70       int sprint_realloc_networkaddress (u_char **buf, size_t *buf_len,
71           size_t *out_len, int allow_realloc, const netsnmp_variable_list
72           *var, const struct enum_list *enums, const char *hint, const char
73           *units)
74           Prints a network address into a buffer.
75       int sprint_realloc_ipaddress (u_char **buf, size_t *buf_len, size_t
76           *out_len, int allow_realloc, const netsnmp_variable_list *var,
77           const struct enum_list *enums, const char *hint, const char *units)
78           Prints an ip-address into a buffer.
79       int sprint_realloc_null (u_char **buf, size_t *buf_len, size_t
80           *out_len, int allow_realloc, const netsnmp_variable_list *var,
81           const struct enum_list *enums, const char *hint, const char *units)
82           Prints a null value into a buffer.
83       int sprint_realloc_bitstring (u_char **buf, size_t *buf_len, size_t
84           *out_len, int allow_realloc, const netsnmp_variable_list *var,
85           const struct enum_list *enums, const char *hint, const char *units)
86           Prints a bit string into a buffer.
87       int sprint_realloc_nsapaddress (u_char **buf, size_t *buf_len, size_t
88           *out_len, int allow_realloc, const netsnmp_variable_list *var,
89           const struct enum_list *enums, const char *hint, const char *units)
90       int sprint_realloc_badtype (u_char **buf, size_t *buf_len, size_t
91           *out_len, int allow_realloc, const netsnmp_variable_list *var,
92           const struct enum_list *enums, const char *hint, const char *units)
93           Fallback routine for a bad type, prints 'Variable has bad type'
94           into a buffer.
95       int sprint_realloc_by_type (u_char **buf, size_t *buf_len, size_t
96           *out_len, int allow_realloc, const netsnmp_variable_list *var,
97           const struct enum_list *enums, const char *hint, const char *units)
98           Universal print routine, prints a variable into a buffer according
99           to the variable type.
100       tree * get_tree_head (void)
101           Retrieves the tree head.
102       char * snmp_out_toggle_options (char *options)
103       void snmp_out_toggle_options_usage (const char *lead, FILE *outf)
104       char * snmp_in_options (char *optarg, int argc, char *const *argv)
105       char * snmp_in_toggle_options (char *options)
106       void snmp_in_toggle_options_usage (const char *lead, FILE *outf)
107           Prints out a help usage for the in* toggle options.
108       void register_mib_handlers (void)
109       void netsnmp_set_mib_directory (const char *dir)
110       char * netsnmp_get_mib_directory (void)
111       void netsnmp_fixup_mib_directory (void)
112       void netsnmp_init_mib (void)
113           Initialises the mib reader.
114       void init_mib (void)
115       void shutdown_mib (void)
116           Unloads all mibs.
117       void print_mib (FILE *fp)
118           Prints the MIBs to the file fp.
119       void print_ascii_dump (FILE *fp)
120       void set_function (struct tree *subtree)
121           Set's the printing function printomat in a subtree according it's
122           type.
123       int read_objid (const char *input, oid *output, size_t *out_len)
124           Reads an object identifier from an input string into internal OID
125           form.
126       void netsnmp_sprint_realloc_objid (u_char **buf, size_t *buf_len,
127           size_t *out_len, int allow_realloc, int *buf_overflow, const oid
128           *objid, size_t objidlen)
129       tree * netsnmp_sprint_realloc_objid_tree (u_char **buf, size_t
130           *buf_len, size_t *out_len, int allow_realloc, int *buf_overflow,
131           const oid *objid, size_t objidlen)
132       int sprint_realloc_objid (u_char **buf, size_t *buf_len, size_t
133           *out_len, int allow_realloc, const oid *objid, size_t objidlen)
134       int snprint_objid (char *buf, size_t buf_len, const oid *objid, size_t
135           objidlen)
136       void print_objid (const oid *objid, size_t objidlen)
137           Prints an oid to stdout.
138       void fprint_objid (FILE *f, const oid *objid, size_t objidlen)
139           Prints an oid to a file descriptor.
140       int sprint_realloc_variable (u_char **buf, size_t *buf_len, size_t
141           *out_len, int allow_realloc, const oid *objid, size_t objidlen,
142           const netsnmp_variable_list *variable)
143       int snprint_variable (char *buf, size_t buf_len, const oid *objid,
144           size_t objidlen, const netsnmp_variable_list *variable)
145       void print_variable (const oid *objid, size_t objidlen, const
146           netsnmp_variable_list *variable)
147           Prints a variable to stdout.
148       void fprint_variable (FILE *f, const oid *objid, size_t objidlen, const
149           netsnmp_variable_list *variable)
150           Prints a variable to a file descriptor.
151       int sprint_realloc_value (u_char **buf, size_t *buf_len, size_t
152           *out_len, int allow_realloc, const oid *objid, size_t objidlen,
153           const netsnmp_variable_list *variable)
154       int snprint_value (char *buf, size_t buf_len, const oid *objid, size_t
155           objidlen, const netsnmp_variable_list *variable)
156       void print_value (const oid *objid, size_t objidlen, const
157           netsnmp_variable_list *variable)
158       void fprint_value (FILE *f, const oid *objid, size_t objidlen, const
159           netsnmp_variable_list *variable)
160       int build_oid_segment (netsnmp_variable_list *var)
161           Takes the value in VAR and turns it into an OID segment in
162           var->name.
163       int build_oid_noalloc (oid *in, size_t in_len, size_t *out_len, oid
164           *prefix, size_t prefix_len, netsnmp_variable_list *indexes)
165       int build_oid (oid **out, size_t *out_len, oid *prefix, size_t
166           prefix_len, netsnmp_variable_list *indexes)
167       int parse_oid_indexes (oid *oidIndex, size_t oidLen,
168           netsnmp_variable_list *data)
169       int parse_one_oid_index (oid **oidStart, size_t *oidLen,
170           netsnmp_variable_list *data, int complete)
171       int dump_realloc_oid_to_inetaddress (const int addr_type, const oid
172           *objid, size_t objidlen, u_char **buf, size_t *buf_len, size_t
173           *out_len, int allow_realloc, char quotechar)
174       int dump_realloc_oid_to_string (const oid *objid, size_t objidlen,
175           u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc,
176           char quotechar)
177       tree * get_tree (const oid *objid, size_t objidlen, struct tree
178           *subtree)
179       void print_description (oid *objid, size_t objidlen, int width)
180           Prints on oid description on stdout.
181       void fprint_description (FILE *f, oid *objid, size_t objidlen, int
182           width)
183           Prints on oid description into a file descriptor.
184       int snprint_description (char *buf, size_t buf_len, oid *objid, size_t
185           objidlen, int width)
186       int sprint_realloc_description (u_char **buf, size_t *buf_len, size_t
187           *out_len, int allow_realloc, oid *objid, size_t objidlen, int
188           width)
189       int get_module_node (const char *fname, const char *module, oid *objid,
190           size_t *objidlen)
191       int get_wild_node (const char *name, oid *objid, size_t *objidlen)
192       int get_node (const char *name, oid *objid, size_t *objidlen)
193       void clear_tree_flags (register struct tree *tp)
194       void print_oid_report (FILE *fp)
195       void print_oid_report_enable_labeledoid (void)
196       void print_oid_report_enable_oid (void)
197       void print_oid_report_enable_suffix (void)
198       void print_oid_report_enable_symbolic (void)
199       void print_oid_report_enable_mibchildoid (void)
200       char * uptime_string (u_long timeticks, char *buf)
201           Converts timeticks to hours, minutes, seconds string.
202       char * uptime_string_n (u_long timeticks, char *buf, size_t buflen)
203       oid * snmp_parse_oid (const char *argv, oid *root, size_t *rootlen)
204           Given a string, parses an oid out of it (if possible).
205       const char * parse_octet_hint (const char *hint, const char *value,
206           unsigned char **new_val, int *new_val_len)
207       u_char mib_to_asn_type (int mib_type)
208       int netsnmp_str2oid (const char *S, oid *O, int L)
209           Converts a string to its OID form.
210       int netsnmp_oid2chars (char *C, int L, const oid *O)
211           Converts an OID to its character form.
212       int netsnmp_oid2str (char *S, int L, oid *O)
213           Converts an OID to its string form.
214       int snprint_by_type (char *buf, size_t buf_len, netsnmp_variable_list
215           *var, const struct enum_list *enums, const char *hint, const char
216           *units)
217       int snprint_hexstring (char *buf, size_t buf_len, const u_char *cp,
218           size_t len)
219       int snprint_asciistring (char *buf, size_t buf_len, const u_char *cp,
220           size_t len)
221       int snprint_octet_string (char *buf, size_t buf_len, const
222           netsnmp_variable_list *var, const struct enum_list *enums, const
223           char *hint, const char *units)
224       int snprint_opaque (char *buf, size_t buf_len, const
225           netsnmp_variable_list *var, const struct enum_list *enums, const
226           char *hint, const char *units)
227       int snprint_object_identifier (char *buf, size_t buf_len, const
228           netsnmp_variable_list *var, const struct enum_list *enums, const
229           char *hint, const char *units)
230       int snprint_timeticks (char *buf, size_t buf_len, const
231           netsnmp_variable_list *var, const struct enum_list *enums, const
232           char *hint, const char *units)
233       int snprint_hinted_integer (char *buf, size_t buf_len, long val, const
234           char *hint, const char *units)
235       int snprint_integer (char *buf, size_t buf_len, const
236           netsnmp_variable_list *var, const struct enum_list *enums, const
237           char *hint, const char *units)
238       int snprint_uinteger (char *buf, size_t buf_len, const
239           netsnmp_variable_list *var, const struct enum_list *enums, const
240           char *hint, const char *units)
241       int snprint_gauge (char *buf, size_t buf_len, const
242           netsnmp_variable_list *var, const struct enum_list *enums, const
243           char *hint, const char *units)
244       int snprint_counter (char *buf, size_t buf_len, const
245           netsnmp_variable_list *var, const struct enum_list *enums, const
246           char *hint, const char *units)
247       int snprint_networkaddress (char *buf, size_t buf_len, const
248           netsnmp_variable_list *var, const struct enum_list *enums, const
249           char *hint, const char *units)
250       int snprint_ipaddress (char *buf, size_t buf_len, const
251           netsnmp_variable_list *var, const struct enum_list *enums, const
252           char *hint, const char *units)
253       int snprint_null (char *buf, size_t buf_len, const
254           netsnmp_variable_list *var, const struct enum_list *enums, const
255           char *hint, const char *units)
256       int snprint_bitstring (char *buf, size_t buf_len, const
257           netsnmp_variable_list *var, const struct enum_list *enums, const
258           char *hint, const char *units)
259       int snprint_nsapaddress (char *buf, size_t buf_len, const
260           netsnmp_variable_list *var, const struct enum_list *enums, const
261           char *hint, const char *units)
262       int snprint_counter64 (char *buf, size_t buf_len, const
263           netsnmp_variable_list *var, const struct enum_list *enums, const
264           char *hint, const char *units)
265       int snprint_badtype (char *buf, size_t buf_len, const
266           netsnmp_variable_list *var, const struct enum_list *enums, const
267           char *hint, const char *units)
268
269   Variables
270       tree * tree_head
271       tree * Mib
272       oid RFC1213_MIB [] = { 1, 3, 6, 1, 2, 1 }
273       PrefixList mib_prefixes []
274

Function Documentation

276   int _sprint_hexstring_line (u_char ** buf, size_t * buf_len, size_t *
277       out_len, int allow_realloc, const u_char * cp, size_t line_len)
278       Prints a hexadecimal string into a buffer.
279
280       The characters pointed by *cp are encoded as hexadecimal string.
281
282       If allow_realloc is true the buffer will be (re)allocated to fit in the
283       needed size. (Note: *buf may change due to this.)
284
285       Parameters:
286           buf address of the buffer to print to.
287           buf_len address to an integer containing the size of buf.
288           out_len incremented by the number of characters printed.
289           allow_realloc if not zero reallocate the buffer to fit the needed
290           size.
291           cp the array of characters to encode.
292           line_len the array length of cp.
293
294       Returns:
295           1 on success, or 0 on failure (out of memory, or buffer to small
296           when not allowed to realloc.)
297
298       Definition at line 271 of file mib.c.
299
300       References snmp_realloc().
301
302       Referenced by sprint_realloc_hexstring().
303
304   int build_oid (oid ** out, size_t * out_len, oid * prefix, size_t
305       prefix_len, netsnmp_variable_list * indexes)
306       xxx-rks: should free previous value?
307
308       Definition at line 3567 of file mib.c.
309
310       References build_oid_noalloc(), tree::indexes, and snmp_clone_mem().
311
312       Referenced by _netsnmp_tdata_generate_index_oid(),
313       netsnmp_table_build_oid(), and netsnmp_table_data_generate_index_oid().
314
315   int build_oid_segment (netsnmp_variable_list * var)
316       Takes the value in VAR and turns it into an OID segment in var->name.
317
318       Parameters:
319           var The variable.
320
321       Returns:
322           SNMPERR_SUCCESS or SNMPERR_GENERR
323
324       Definition at line 3431 of file mib.c.
325
326       References netsnmp_vardata::integer, variable_list::name,
327       variable_list::name_length, variable_list::name_loc, NULL,
328       netsnmp_vardata::objid, SNMP_FREE, netsnmp_vardata::string,
329       variable_list::type, variable_list::val, and variable_list::val_len.
330
331       Referenced by build_oid_noalloc().
332
333   void fprint_description (FILE * f, oid * objid, size_t objidlen, int width)
334       Prints on oid description into a file descriptor.
335
336       Parameters:
337           f The file descriptor to print to.
338           objid The object identifier.
339           objidlen The object id length.
340           width Number of subidentifiers.
341
342       Definition at line 4426 of file mib.c.
343
344       References NULL, SNMP_FREE, and sprint_realloc_description().
345
346       Referenced by print_description().
347
348   void fprint_objid (FILE * f, const oid * objid, size_t objidlen)
349       Prints an oid to a file descriptor.
350
351       Parameters:
352           f The file descriptor to print to.
353           objid The oid to print
354           objidlen The length of oidid.
355
356       Definition at line 3159 of file mib.c.
357
358       References netsnmp_sprint_realloc_objid_tree(), NULL, and SNMP_FREE.
359
360       Referenced by print_objid().
361
362   void fprint_variable (FILE * f, const oid * objid, size_t objidlen, const
363       netsnmp_variable_list * variable)
364       Prints a variable to a file descriptor.
365
366       Parameters:
367           f The file descriptor to print to.
368           objid The object id.
369           objidlen The length of teh object id.
370           variable The variable to print.
371
372       Definition at line 3306 of file mib.c.
373
374       References NULL, SNMP_FREE, and sprint_realloc_variable().
375
376       Referenced by print_variable().
377
378   struct tree* get_tree_head (void)
379       Retrieves the tree head.
380
381       Returns:
382           the tree head.
383
384       Definition at line 2015 of file mib.c.
385
386       References tree_head.
387
388       Referenced by netsnmp_config_parse_table_set(), and snmp_add_var().
389
390   int get_wild_node (const char * name, oid * objid, size_t * objidlen)
391       See also:
392           comments on find_best_tree_node for usage after first time.
393
394       Definition at line 5434 of file mib.c.
395
396       References get_node(), tree::label, NULL, and tree_head.
397
398       Referenced by snmp_parse_oid().
399
400   void netsnmp_fixup_mib_directory (void)
401       swap in the new value and repeat
402
403       Definition at line 2477 of file mib.c.
404
405       References netsnmp_get_mib_directory(), netsnmp_getenv(),
406       netsnmp_set_mib_directory(), NULL, and SNMP_FREE.
407
408       Referenced by netsnmp_init_mib().
409
410   char* netsnmp_get_mib_directory (void)
411       Check if the environment variable is set
412
413       Not set use hard coded path
414
415       Definition at line 2430 of file mib.c.
416
417       References netsnmp_ds_get_string(), netsnmp_getenv(),
418       netsnmp_set_mib_directory(), and NULL.
419
420       Referenced by netsnmp_fixup_mib_directory(), and netsnmp_init_mib().
421
422   void netsnmp_init_mib (void)
423       Initialises the mib reader.
424
425       Reads in all settings from the environment.
426
427       Definition at line 2524 of file mib.c.
428
429       References tree::child_list, tree::label, _PrefixList::len, Mib,
430       mib_prefixes, netsnmp_fixup_mib_directory(),
431       netsnmp_get_mib_directory(), netsnmp_getenv(), NULL, SNMP_FREE,
432       _PrefixList::str, and tree_head.
433
434       Referenced by init_mib(), and init_snmp().
435
436   int netsnmp_oid2chars (char * C, int L, const oid * O)
437       Converts an OID to its character form.
438
439       in example 5 . 1 . 2 . 3 . 4 . 5 = 12345
440
441       Parameters:
442           C The character buffer.
443           L The length of the buffer.
444           O The oid.
445
446       Returns:
447           0 on Sucess, 1 on failure.
448
449       length
450
451       Definition at line 6221 of file mib.c.
452
453       Referenced by netsnmp_oid2str().
454
455   int netsnmp_oid2str (char * S, int L, oid * O)
456       Converts an OID to its string form.
457
458       in example 5 . 'h' . 'e' . 'l' . 'l' . 'o' = 'hello\0' (null
459       terminated)
460
461       Parameters:
462           S The character string buffer.
463           L The length of the string buffer.
464           O The oid.
465
466       Returns:
467           0 on Sucess, 1 on failure.
468
469       Definition at line 6249 of file mib.c.
470
471       References netsnmp_oid2chars().
472
473   void netsnmp_set_mib_directory (const char * dir)
474       New dir starts with '+', thus we add it.
475
476       If dir starts with '+' skip '+' it.
477
478       set_string calls strdup, so if we allocated memory, free it
479
480       Definition at line 2375 of file mib.c.
481
482       References netsnmp_ds_get_string(), netsnmp_ds_set_string(), NULL, and
483       SNMP_FREE.
484
485       Referenced by netsnmp_fixup_mib_directory(), and
486       netsnmp_get_mib_directory().
487
488   int netsnmp_str2oid (const char * S, oid * O, int L)
489       Converts a string to its OID form.
490
491       in example 'hello' = 5 . 'h' . 'e' . 'l' . 'l' . 'o'
492
493       Parameters:
494           S The string.
495           O The oid.
496           L The length of the oid.
497
498       Returns:
499           0 on Sucess, 1 on failure.
500
501       Definition at line 6186 of file mib.c.
502
503   void print_description (oid * objid, size_t objidlen, int width)
504       Prints on oid description on stdout.
505
506       See also:
507           fprint_description
508
509       Definition at line 4410 of file mib.c.
510
511       References fprint_description().
512
513   void print_mib (FILE * fp)
514       Prints the MIBs to the file fp.
515
516       Parameters:
517           fp The file descriptor to print to.
518
519       Definition at line 2737 of file mib.c.
520
521       References tree_head.
522
523   void print_objid (const oid * objid, size_t objidlen)
524       Prints an oid to stdout.
525
526       Parameters:
527           objid The oid to print
528           objidlen The length of oidid.
529
530       Definition at line 3145 of file mib.c.
531
532       References fprint_objid().
533
534   void print_variable (const oid * objid, size_t objidlen, const
535       netsnmp_variable_list * variable)
536       Prints a variable to stdout.
537
538       Parameters:
539           objid The object id.
540           objidlen The length of teh object id.
541           variable The variable to print.
542
543       Definition at line 3290 of file mib.c.
544
545       References fprint_variable().
546
547   int read_objid (const char * input, oid * output, size_t * out_len)
548       Reads an object identifier from an input string into internal OID form.
549
550       When called, out_len must hold the maximum length of the output array.
551
552       Parameters:
553           input the input string.
554           output the oid wirte.
555           out_len number of subid's in output.
556
557       Returns:
558           1 if successful.
559
560       If an error occurs, this function returns 0 and MAY set snmp_errno.
561       snmp_errno is NOT set if SET_SNMP_ERROR evaluates to nothing. This can
562       make multi-threaded use a tiny bit more robust.
563
564       Definition at line 2835 of file mib.c.
565
566       References get_node(), netsnmp_ds_get_boolean(), NULL, SNMP_FREE, and
567       tree_head.
568
569       Referenced by read_config_read_objid(), and snmp_parse_oid().
570
571   void set_function (struct tree * subtree)
572       Set's the printing function printomat in a subtree according it's type.
573
574       Parameters:
575           subtree The subtree to set.
576
577       Definition at line 2758 of file mib.c.
578
579       References NULL, tree::printer, tree::printomat,
580       sprint_realloc_bitstring(), sprint_realloc_by_type(),
581       sprint_realloc_counter(), sprint_realloc_counter64(),
582       sprint_realloc_gauge(), sprint_realloc_integer(),
583       sprint_realloc_ipaddress(), sprint_realloc_networkaddress(),
584       sprint_realloc_nsapaddress(), sprint_realloc_null(),
585       sprint_realloc_object_identifier(), sprint_realloc_octet_string(),
586       sprint_realloc_opaque(), sprint_realloc_timeticks(),
587       sprint_realloc_uinteger(), and tree::type.
588
589   void shutdown_mib (void)
590       Unloads all mibs.
591
592       Definition at line 2714 of file mib.c.
593
594       References tree::label, Mib, NULL, SNMP_FREE, and tree_head.
595
596       Referenced by snmp_shutdown().
597
598   void snmp_in_toggle_options_usage (const char * lead, FILE * outf)
599       Prints out a help usage for the in* toggle options.
600
601       Parameters:
602           lead The lead to print for every line.
603           outf The file descriptor to write to.
604
605       Definition at line 2287 of file mib.c.
606
607   oid* snmp_parse_oid (const char * argv, oid * root, size_t * rootlen)
608       Given a string, parses an oid out of it (if possible).
609
610       It will try to parse it based on predetermined configuration if present
611       or by every method possible otherwise. If a suffix has been registered
612       using NETSNMP_DS_LIB_OIDSUFFIX, it will be appended to the input string
613       before processing.
614
615       Parameters:
616           argv The OID to string parse
617           root An OID array where the results are stored.
618           rootlen The max length of the array going in and the data length
619           coming out.
620
621       Returns:
622           The root oid pointer if successful, or NULL otherwise.
623
624       Definition at line 5792 of file mib.c.
625
626       References clear_tree_flags(), get_node(), get_wild_node(),
627       netsnmp_ds_get_boolean(), netsnmp_ds_get_string(), NULL, read_objid(),
628       and tree_head.
629
630       Referenced by netsnmp_config_parse_table_set(), and snmp_add_var().
631
632   int sprint_realloc_asciistring (u_char ** buf, size_t * buf_len, size_t *
633       out_len, int allow_realloc, const u_char * cp, size_t len)
634       Prints an ascii string into a buffer.
635
636       The characters pointed by *cp are encoded as an ascii string.
637
638       If allow_realloc is true the buffer will be (re)allocated to fit in the
639       needed size. (Note: *buf may change due to this.)
640
641       Parameters:
642           buf address of the buffer to print to.
643           buf_len address to an integer containing the size of buf.
644           out_len incremented by the number of characters printed.
645           allow_realloc if not zero reallocate the buffer to fit the needed
646           size.
647           cp the array of characters to encode.
648           len the array length of cp.
649
650       Returns:
651           1 on success, or 0 on failure (out of memory, or buffer to small
652           when not allowed to realloc.)
653
654       Definition at line 367 of file mib.c.
655
656       References snmp_realloc().
657
658       Referenced by asn_build_string(), asn_parse_string(), and
659       snprint_asciistring().
660
661   int sprint_realloc_badtype (u_char ** buf, size_t * buf_len, size_t *
662       out_len, int allow_realloc, const netsnmp_variable_list * var, const
663       struct enum_list * enums, const char * hint, const char * units)
664       Fallback routine for a bad type, prints 'Variable has bad type' into a
665       buffer.
666
667       If allow_realloc is true the buffer will be (re)allocated to fit in the
668       needed size. (Note: *buf may change due to this.)
669
670       Parameters:
671           buf Address of the buffer to print to.
672           buf_len Address to an integer containing the size of buf.
673           out_len Incremented by the number of characters printed.
674           allow_realloc if not zero reallocate the buffer to fit the needed
675           size.
676           var The variable to encode.
677           enums The enumeration ff this variable is enumerated. may be NULL.
678           hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
679           Section 3.1 for details. may be NULL.
680           units Contents of the UNITS clause of the MIB. may be NULL.
681
682       Returns:
683           1 on success, or 0 on failure (out of memory, or buffer to small
684           when not allowed to realloc.)
685
686       Definition at line 1900 of file mib.c.
687
688       References snmp_strcat().
689
690       Referenced by snprint_badtype(), and sprint_realloc_by_type().
691
692   int sprint_realloc_bitstring (u_char ** buf, size_t * buf_len, size_t *
693       out_len, int allow_realloc, const netsnmp_variable_list * var, const
694       struct enum_list * enums, const char * hint, const char * units)
695       Prints a bit string into a buffer.
696
697       If allow_realloc is true the buffer will be (re)allocated to fit in the
698       needed size. (Note: *buf may change due to this.)
699
700       Parameters:
701           buf Address of the buffer to print to.
702           buf_len Address to an integer containing the size of buf.
703           out_len Incremented by the number of characters printed.
704           allow_realloc if not zero reallocate the buffer to fit the needed
705           size.
706           var The variable to encode.
707           enums The enumeration ff this variable is enumerated. may be NULL.
708           hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
709           Section 3.1 for details. may be NULL.
710           units Contents of the UNITS clause of the MIB. may be NULL.
711
712       Returns:
713           1 on success, or 0 on failure (out of memory, or buffer to small
714           when not allowed to realloc.)
715
716       Definition at line 1761 of file mib.c.
717
718       References netsnmp_vardata::bitstring, enum_list::label,
719       netsnmp_ds_get_boolean(), enum_list::next, NULL, snmp_strcat(),
720       sprint_realloc_by_type(), sprint_realloc_hexstring(),
721       variable_list::type, variable_list::val, variable_list::val_len, and
722       enum_list::value.
723
724       Referenced by set_function(), snprint_bitstring(), and
725       sprint_realloc_by_type().
726
727   int sprint_realloc_by_type (u_char ** buf, size_t * buf_len, size_t *
728       out_len, int allow_realloc, const netsnmp_variable_list * var, const
729       struct enum_list * enums, const char * hint, const char * units)
730       Universal print routine, prints a variable into a buffer according to
731       the variable type.
732
733       If allow_realloc is true the buffer will be (re)allocated to fit in the
734       needed size. (Note: *buf may change due to this.)
735
736       Parameters:
737           buf Address of the buffer to print to.
738           buf_len Address to an integer containing the size of buf.
739           out_len Incremented by the number of characters printed.
740           allow_realloc if not zero reallocate the buffer to fit the needed
741           size.
742           var The variable to encode.
743           enums The enumeration ff this variable is enumerated. may be NULL.
744           hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
745           Section 3.1 for details. may be NULL.
746           units Contents of the UNITS clause of the MIB. may be NULL.
747
748       Returns:
749           1 on success, or 0 on failure (out of memory, or buffer to small
750           when not allowed to realloc.)
751
752       Definition at line 1935 of file mib.c.
753
754       References sprint_realloc_badtype(), sprint_realloc_bitstring(),
755       sprint_realloc_counter(), sprint_realloc_counter64(),
756       sprint_realloc_gauge(), sprint_realloc_integer(),
757       sprint_realloc_ipaddress(), sprint_realloc_null(),
758       sprint_realloc_object_identifier(), sprint_realloc_octet_string(),
759       sprint_realloc_opaque(), sprint_realloc_timeticks(),
760       sprint_realloc_uinteger(), and variable_list::type.
761
762       Referenced by set_function(), snprint_by_type(),
763       sprint_realloc_bitstring(), sprint_realloc_counter(),
764       sprint_realloc_counter64(), sprint_realloc_gauge(),
765       sprint_realloc_integer(), sprint_realloc_ipaddress(),
766       sprint_realloc_networkaddress(), sprint_realloc_nsapaddress(),
767       sprint_realloc_null(), sprint_realloc_object_identifier(),
768       sprint_realloc_octet_string(), sprint_realloc_opaque(),
769       sprint_realloc_timeticks(), sprint_realloc_uinteger(),
770       sprint_realloc_value(), sprint_realloc_variable(), and
771       table_helper_handler().
772
773   int sprint_realloc_counter (u_char ** buf, size_t * buf_len, size_t *
774       out_len, int allow_realloc, const netsnmp_variable_list * var, const
775       struct enum_list * enums, const char * hint, const char * units)
776       Prints a counter value into a buffer.
777
778       If allow_realloc is true the buffer will be (re)allocated to fit in the
779       needed size. (Note: *buf may change due to this.)
780
781       Parameters:
782           buf Address of the buffer to print to.
783           buf_len Address to an integer containing the size of buf.
784           out_len Incremented by the number of characters printed.
785           allow_realloc if not zero reallocate the buffer to fit the needed
786           size.
787           var The variable to encode.
788           enums The enumeration ff this variable is enumerated. may be NULL.
789           hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
790           Section 3.1 for details. may be NULL.
791           units Contents of the UNITS clause of the MIB. may be NULL.
792
793       Returns:
794           1 on success, or 0 on failure (out of memory, or buffer to small
795           when not allowed to realloc.)
796
797       Definition at line 1528 of file mib.c.
798
799       References netsnmp_vardata::integer, netsnmp_ds_get_boolean(), NULL,
800       snmp_strcat(), sprint_realloc_by_type(), variable_list::type, and
801       variable_list::val.
802
803       Referenced by set_function(), snprint_counter(), and
804       sprint_realloc_by_type().
805
806   int sprint_realloc_counter64 (u_char ** buf, size_t * buf_len, size_t *
807       out_len, int allow_realloc, const netsnmp_variable_list * var, const
808       struct enum_list * enums, const char * hint, const char * units)
809       Prints a counter into a buffer.
810
811       The variable var is encoded as a counter value.
812
813       If allow_realloc is true the buffer will be (re)allocated to fit in the
814       needed size. (Note: *buf may change due to this.)
815
816       Parameters:
817           buf Address of the buffer to print to.
818           buf_len Address to an integer containing the size of buf.
819           out_len Incremented by the number of characters printed.
820           allow_realloc if not zero reallocate the buffer to fit the needed
821           size.
822           var The variable to encode.
823           enums The enumeration ff this variable is enumerated. may be NULL.
824           hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
825           Section 3.1 for details. may be NULL.
826           units Contents of the UNITS clause of the MIB. may be NULL.
827
828       Returns:
829           1 on success, or 0 on failure (out of memory, or buffer to small
830           when not allowed to realloc.)
831
832       Definition at line 844 of file mib.c.
833
834       References netsnmp_vardata::counter64, netsnmp_ds_get_boolean(), NULL,
835       snmp_cstrcat, sprint_realloc_by_type(), variable_list::type, and
836       variable_list::val.
837
838       Referenced by set_function(), snprint_counter64(),
839       sprint_realloc_by_type(), and sprint_realloc_opaque().
840
841   int sprint_realloc_gauge (u_char ** buf, size_t * buf_len, size_t *
842       out_len, int allow_realloc, const netsnmp_variable_list * var, const
843       struct enum_list * enums, const char * hint, const char * units)
844       Prints a gauge value into a buffer.
845
846       If allow_realloc is true the buffer will be (re)allocated to fit in the
847       needed size. (Note: *buf may change due to this.)
848
849       Parameters:
850           buf Address of the buffer to print to.
851           buf_len Address to an integer containing the size of buf.
852           out_len Incremented by the number of characters printed.
853           allow_realloc if not zero reallocate the buffer to fit the needed
854           size.
855           var The variable to encode.
856           enums The enumeration ff this variable is enumerated. may be NULL.
857           hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
858           Section 3.1 for details. may be NULL.
859           units Contents of the UNITS clause of the MIB. may be NULL.
860
861       Returns:
862           1 on success, or 0 on failure (out of memory, or buffer to small
863           when not allowed to realloc.)
864
865       Definition at line 1455 of file mib.c.
866
867       References netsnmp_vardata::integer, netsnmp_ds_get_boolean(), NULL,
868       snmp_strcat(), sprint_realloc_by_type(),
869       sprint_realloc_hinted_integer(), variable_list::type, and
870       variable_list::val.
871
872       Referenced by set_function(), snprint_gauge(), and
873       sprint_realloc_by_type().
874
875   int sprint_realloc_hinted_integer (u_char ** buf, size_t * buf_len, size_t
876       * out_len, int allow_realloc, long val, const char decimaltype, const
877       char * hint, const char * units)
878       Prints an integer according to the hint into a buffer.
879
880       If allow_realloc is true the buffer will be (re)allocated to fit in the
881       needed size. (Note: *buf may change due to this.)
882
883       Parameters:
884           buf Address of the buffer to print to.
885           buf_len Address to an integer containing the size of buf.
886           out_len Incremented by the number of characters printed.
887           allow_realloc if not zero reallocate the buffer to fit the needed
888           size.
889           val The variable to encode.
890           decimaltype The enumeration ff this variable is enumerated. may be
891           NULL.
892           hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
893           Section 3.1 for details. may _NOT_ be NULL.
894           units Contents of the UNITS clause of the MIB. may be NULL.
895
896       Returns:
897           1 on success, or 0 on failure (out of memory, or buffer to small
898           when not allowed to realloc.)
899
900       Definition at line 1181 of file mib.c.
901
902       References snmp_strcat().
903
904       Referenced by snprint_hinted_integer(), and sprint_realloc_gauge().
905
906   int sprint_realloc_integer (u_char ** buf, size_t * buf_len, size_t *
907       out_len, int allow_realloc, const netsnmp_variable_list * var, const
908       struct enum_list * enums, const char * hint, const char * units)
909       Prints an integer into a buffer.
910
911       If allow_realloc is true the buffer will be (re)allocated to fit in the
912       needed size. (Note: *buf may change due to this.)
913
914       Parameters:
915           buf Address of the buffer to print to.
916           buf_len Address to an integer containing the size of buf.
917           out_len Incremented by the number of characters printed.
918           allow_realloc if not zero reallocate the buffer to fit the needed
919           size.
920           var The variable to encode.
921           enums The enumeration ff this variable is enumerated. may be NULL.
922           hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
923           Section 3.1 for details. may be NULL.
924           units Contents of the UNITS clause of the MIB. may be NULL.
925
926       Returns:
927           1 on success, or 0 on failure (out of memory, or buffer to small
928           when not allowed to realloc.)
929
930       Definition at line 1255 of file mib.c.
931
932       References netsnmp_vardata::integer, enum_list::label,
933       netsnmp_ds_get_boolean(), enum_list::next, NULL, snmp_strcat(),
934       sprint_realloc_by_type(), variable_list::type, variable_list::val, and
935       enum_list::value.
936
937       Referenced by set_function(), snprint_integer(), and
938       sprint_realloc_by_type().
939
940   int sprint_realloc_ipaddress (u_char ** buf, size_t * buf_len, size_t *
941       out_len, int allow_realloc, const netsnmp_variable_list * var, const
942       struct enum_list * enums, const char * hint, const char * units)
943       Prints an ip-address into a buffer.
944
945       If allow_realloc is true the buffer will be (re)allocated to fit in the
946       needed size. (Note: *buf may change due to this.)
947
948       Parameters:
949           buf Address of the buffer to print to.
950           buf_len Address to an integer containing the size of buf.
951           out_len Incremented by the number of characters printed.
952           allow_realloc if not zero reallocate the buffer to fit the needed
953           size.
954           var The variable to encode.
955           enums The enumeration ff this variable is enumerated. may be NULL.
956           hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
957           Section 3.1 for details. may be NULL.
958           units Contents of the UNITS clause of the MIB. may be NULL.
959
960       Returns:
961           1 on success, or 0 on failure (out of memory, or buffer to small
962           when not allowed to realloc.)
963
964       Definition at line 1657 of file mib.c.
965
966       References netsnmp_ds_get_boolean(), NULL, snmp_realloc(),
967       snmp_strcat(), sprint_realloc_by_type(), netsnmp_vardata::string,
968       variable_list::type, and variable_list::val.
969
970       Referenced by set_function(), snprint_ipaddress(), and
971       sprint_realloc_by_type().
972
973   int sprint_realloc_networkaddress (u_char ** buf, size_t * buf_len, size_t
974       * out_len, int allow_realloc, const netsnmp_variable_list * var, const
975       struct enum_list * enums, const char * hint, const char * units)
976       Prints a network address into a buffer.
977
978       If allow_realloc is true the buffer will be (re)allocated to fit in the
979       needed size. (Note: *buf may change due to this.)
980
981       Parameters:
982           buf Address of the buffer to print to.
983           buf_len Address to an integer containing the size of buf.
984           out_len Incremented by the number of characters printed.
985           allow_realloc if not zero reallocate the buffer to fit the needed
986           size.
987           var The variable to encode.
988           enums The enumeration ff this variable is enumerated. may be NULL.
989           hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
990           Section 3.1 for details. may be NULL.
991           units Contents of the UNITS clause of the MIB. may be NULL.
992
993       Returns:
994           1 on success, or 0 on failure (out of memory, or buffer to small
995           when not allowed to realloc.)
996
997       Definition at line 1591 of file mib.c.
998
999       References netsnmp_ds_get_boolean(), NULL, snmp_realloc(),
1000       snmp_strcat(), sprint_realloc_by_type(), netsnmp_vardata::string,
1001       variable_list::type, variable_list::val, and variable_list::val_len.
1002
1003       Referenced by set_function(), and snprint_networkaddress().
1004
1005   int sprint_realloc_null (u_char ** buf, size_t * buf_len, size_t * out_len,
1006       int allow_realloc, const netsnmp_variable_list * var, const struct
1007       enum_list * enums, const char * hint, const char * units)
1008       Prints a null value into a buffer.
1009
1010       If allow_realloc is true the buffer will be (re)allocated to fit in the
1011       needed size. (Note: *buf may change due to this.)
1012
1013       Parameters:
1014           buf Address of the buffer to print to.
1015           buf_len Address to an integer containing the size of buf.
1016           out_len Incremented by the number of characters printed.
1017           allow_realloc if not zero reallocate the buffer to fit the needed
1018           size.
1019           var The variable to encode.
1020           enums The enumeration ff this variable is enumerated. may be NULL.
1021           hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
1022           Section 3.1 for details. may be NULL.
1023           units Contents of the UNITS clause of the MIB. may be NULL.
1024
1025       Returns:
1026           1 on success, or 0 on failure (out of memory, or buffer to small
1027           when not allowed to realloc.)
1028
1029       Definition at line 1717 of file mib.c.
1030
1031       References netsnmp_ds_get_boolean(), NULL, snmp_strcat(),
1032       sprint_realloc_by_type(), and variable_list::type.
1033
1034       Referenced by set_function(), snprint_null(), and
1035       sprint_realloc_by_type().
1036
1037   int sprint_realloc_object_identifier (u_char ** buf, size_t * buf_len,
1038       size_t * out_len, int allow_realloc, const netsnmp_variable_list * var,
1039       const struct enum_list * enums, const char * hint, const char * units)
1040       Prints an object identifier into a buffer.
1041
1042       If allow_realloc is true the buffer will be (re)allocated to fit in the
1043       needed size. (Note: *buf may change due to this.)
1044
1045       Parameters:
1046           buf Address of the buffer to print to.
1047           buf_len Address to an integer containing the size of buf.
1048           out_len Incremented by the number of characters printed.
1049           allow_realloc if not zero reallocate the buffer to fit the needed
1050           size.
1051           var The variable to encode.
1052           enums The enumeration ff this variable is enumerated. may be NULL.
1053           hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
1054           Section 3.1 for details. may be NULL.
1055           units Contents of the UNITS clause of the MIB. may be NULL.
1056
1057       Returns:
1058           1 on success, or 0 on failure (out of memory, or buffer to small
1059           when not allowed to realloc.)
1060
1061       Definition at line 1037 of file mib.c.
1062
1063       References netsnmp_ds_get_boolean(),
1064       netsnmp_sprint_realloc_objid_tree(), NULL, netsnmp_vardata::objid,
1065       snmp_strcat(), sprint_realloc_by_type(), variable_list::type,
1066       variable_list::val, and variable_list::val_len.
1067
1068       Referenced by set_function(), snprint_object_identifier(), and
1069       sprint_realloc_by_type().
1070
1071   int sprint_realloc_octet_string (u_char ** buf, size_t * buf_len, size_t *
1072       out_len, int allow_realloc, const netsnmp_variable_list * var, const
1073       struct enum_list * enums, const char * hint, const char * units)
1074       Prints an octet string into a buffer.
1075
1076       The variable var is encoded as octet string.
1077
1078       If allow_realloc is true the buffer will be (re)allocated to fit in the
1079       needed size. (Note: *buf may change due to this.)
1080
1081       Parameters:
1082           buf Address of the buffer to print to.
1083           buf_len Address to an integer containing the size of buf.
1084           out_len Incremented by the number of characters printed.
1085           allow_realloc if not zero reallocate the buffer to fit the needed
1086           size.
1087           var The variable to encode.
1088           enums The enumeration ff this variable is enumerated. may be NULL.
1089           hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
1090           Section 3.1 for details. may be NULL.
1091           units Contents of the UNITS clause of the MIB. may be NULL.
1092
1093       Returns:
1094           1 on success, or 0 on failure (out of memory, or buffer to small
1095           when not allowed to realloc.)
1096
1097       Definition at line 427 of file mib.c.
1098
1099       References netsnmp_ds_get_boolean(), NULL, snmp_cstrcat,
1100       snmp_realloc(), sprint_realloc_by_type(),
1101       sprint_realloc_octet_string(), netsnmp_vardata::string,
1102       variable_list::type, variable_list::val, and variable_list::val_len.
1103
1104       Referenced by set_function(), snprint_octet_string(),
1105       sprint_realloc_by_type(), and sprint_realloc_octet_string().
1106
1107   int sprint_realloc_opaque (u_char ** buf, size_t * buf_len, size_t *
1108       out_len, int allow_realloc, const netsnmp_variable_list * var, const
1109       struct enum_list * enums, const char * hint, const char * units)
1110       Prints an object identifier into a buffer.
1111
1112       If allow_realloc is true the buffer will be (re)allocated to fit in the
1113       needed size. (Note: *buf may change due to this.)
1114
1115       Parameters:
1116           buf Address of the buffer to print to.
1117           buf_len Address to an integer containing the size of buf.
1118           out_len Incremented by the number of characters printed.
1119           allow_realloc if not zero reallocate the buffer to fit the needed
1120           size.
1121           var The variable to encode.
1122           enums The enumeration ff this variable is enumerated. may be NULL.
1123           hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
1124           Section 3.1 for details. may be NULL.
1125           units Contents of the UNITS clause of the MIB. may be NULL.
1126
1127       Returns:
1128           1 on success, or 0 on failure (out of memory, or buffer to small
1129           when not allowed to realloc.)
1130
1131       Definition at line 947 of file mib.c.
1132
1133       References netsnmp_ds_get_boolean(), NULL, snmp_cstrcat, snmp_strcat(),
1134       sprint_realloc_by_type(), sprint_realloc_counter64(),
1135       sprint_realloc_hexstring(), netsnmp_vardata::string,
1136       variable_list::type, variable_list::val, and variable_list::val_len.
1137
1138       Referenced by set_function(), snprint_opaque(), and
1139       sprint_realloc_by_type().
1140
1141   int sprint_realloc_timeticks (u_char ** buf, size_t * buf_len, size_t *
1142       out_len, int allow_realloc, const netsnmp_variable_list * var, const
1143       struct enum_list * enums, const char * hint, const char * units)
1144       Prints a timetick variable into a buffer.
1145
1146       If allow_realloc is true the buffer will be (re)allocated to fit in the
1147       needed size. (Note: *buf may change due to this.)
1148
1149       Parameters:
1150           buf Address of the buffer to print to.
1151           buf_len Address to an integer containing the size of buf.
1152           out_len Incremented by the number of characters printed.
1153           allow_realloc if not zero reallocate the buffer to fit the needed
1154           size.
1155           var The variable to encode.
1156           enums The enumeration ff this variable is enumerated. may be NULL.
1157           hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
1158           Section 3.1 for details. may be NULL.
1159           units Contents of the UNITS clause of the MIB. may be NULL.
1160
1161       Returns:
1162           1 on success, or 0 on failure (out of memory, or buffer to small
1163           when not allowed to realloc.)
1164
1165       Definition at line 1107 of file mib.c.
1166
1167       References netsnmp_vardata::integer, netsnmp_ds_get_boolean(), NULL,
1168       snmp_strcat(), sprint_realloc_by_type(), variable_list::type, and
1169       variable_list::val.
1170
1171       Referenced by set_function(), snprint_timeticks(), and
1172       sprint_realloc_by_type().
1173
1174   int sprint_realloc_uinteger (u_char ** buf, size_t * buf_len, size_t *
1175       out_len, int allow_realloc, const netsnmp_variable_list * var, const
1176       struct enum_list * enums, const char * hint, const char * units)
1177       Prints an unsigned integer into a buffer.
1178
1179       If allow_realloc is true the buffer will be (re)allocated to fit in the
1180       needed size. (Note: *buf may change due to this.)
1181
1182       Parameters:
1183           buf Address of the buffer to print to.
1184           buf_len Address to an integer containing the size of buf.
1185           out_len Incremented by the number of characters printed.
1186           allow_realloc if not zero reallocate the buffer to fit the needed
1187           size.
1188           var The variable to encode.
1189           enums The enumeration ff this variable is enumerated. may be NULL.
1190           hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
1191           Section 3.1 for details. may be NULL.
1192           units Contents of the UNITS clause of the MIB. may be NULL.
1193
1194       Returns:
1195           1 on success, or 0 on failure (out of memory, or buffer to small
1196           when not allowed to realloc.)
1197
1198       Definition at line 1358 of file mib.c.
1199
1200       References netsnmp_vardata::integer, enum_list::label,
1201       netsnmp_ds_get_boolean(), enum_list::next, NULL, snmp_strcat(),
1202       sprint_realloc_by_type(), variable_list::type, variable_list::val, and
1203       enum_list::value.
1204
1205       Referenced by set_function(), snprint_uinteger(), and
1206       sprint_realloc_by_type().
1207
1208   char* uptime_string (u_long timeticks, char * buf)
1209       Converts timeticks to hours, minutes, seconds string.
1210
1211       CMU compatible does not show centiseconds.
1212
1213       Parameters:
1214           timeticks The timeticks to convert.
1215           buf Buffer to write to, has to be at least 40 Bytes large.
1216
1217       Returns:
1218           The buffer
1219
1220       See also:
1221           uptimeString
1222
1223       Definition at line 5757 of file mib.c.
1224
1225       References uptime_string_n().
1226

Variable Documentation

1228   PrefixList mib_prefixes[]
1229       Initial value:
1230
1231        {
1232           {&Standard_Prefix[0]},
1233           {'.iso.org.dod.internet.mgmt.mib-2'},
1234           {'.iso.org.dod.internet.experimental'},
1235           {'.iso.org.dod.internet.private'},
1236           {'.iso.org.dod.internet.snmpParties'},
1237           {'.iso.org.dod.internet.snmpSecrets'},
1238           {NULL, 0}
1239       }
1240
1241       Definition at line 160 of file mib.c.
1242
1243       Referenced by netsnmp_init_mib().
1244
1245
1246
1247Version 5.4                 mib pa2r4siNnogva2n0d06datatype manipulation routines.(3)
Impressum