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

« back to all changes in this revision

Viewing changes to man/netsnmp_mib_utilities.3

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

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH "mib parsing and datatype manipulation routines." 3 "5 Sep 2008" "Version 5.4.2" "net-snmp" \" -*- nroff -*-
 
1
.TH "mib parsing and datatype manipulation routines." 3 "23 May 2010" "Version 5.4.3.pre1" "net-snmp" \" -*- nroff -*-
2
2
.ad l
3
3
.nh
4
4
.SH NAME
17
17
 
18
18
.in +1c
19
19
.ti -1c
20
 
.RI "typedef \fB_PrefixList\fP * \fBPrefixListPtr\fP"
 
20
.RI "typedef struct \fB_PrefixList\fP * \fBPrefixListPtr\fP"
21
21
.br
22
22
.ti -1c
23
 
.RI "typedef \fB_PrefixList\fP \fBPrefixList\fP"
 
23
.RI "typedef struct \fB_PrefixList\fP \fBPrefixList\fP"
24
24
.br
25
25
.in -1c
26
26
.SS "Enumerations"
63
63
.ti -1c
64
64
.RI "int \fBsprint_realloc_timeticks\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const \fBnetsnmp_variable_list\fP *var, const struct \fBenum_list\fP *enums, const char *hint, const char *units)"
65
65
.br
66
 
.RI "\fIPrints a timetick variable into a buffer. \fP"
 
66
.RI "\fIPrints a timetick \fBvariable\fP into a buffer. \fP"
67
67
.ti -1c
68
68
.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)"
69
69
.br
110
110
.ti -1c
111
111
.RI "int \fBsprint_realloc_by_type\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const \fBnetsnmp_variable_list\fP *var, const struct \fBenum_list\fP *enums, const char *hint, const char *units)"
112
112
.br
113
 
.RI "\fIUniversal print routine, prints a variable into a buffer according to the variable type. \fP"
 
113
.RI "\fIUniversal print routine, prints a \fBvariable\fP into a buffer according to the \fBvariable\fP type. \fP"
114
114
.ti -1c
115
 
.RI "\fBtree\fP * \fBget_tree_head\fP (void)"
 
115
.RI "struct \fBtree\fP * \fBget_tree_head\fP (void)"
116
116
.br
117
 
.RI "\fIRetrieves the tree head. \fP"
 
117
.RI "\fIRetrieves the \fBtree\fP head. \fP"
118
118
.ti -1c
119
119
.RI "char * \fBsnmp_out_toggle_options\fP (char *options)"
120
120
.br
173
173
.RI "void \fBnetsnmp_sprint_realloc_objid\fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, int *buf_overflow, const oid *objid, size_t objidlen)"
174
174
.br
175
175
.ti -1c
176
 
.RI "\fBtree\fP * \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)"
 
176
.RI "struct \fBtree\fP * \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)"
177
177
.br
178
178
.ti -1c
179
179
.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)"
198
198
.ti -1c
199
199
.RI "void \fBprint_variable\fP (const oid *objid, size_t objidlen, const \fBnetsnmp_variable_list\fP *\fBvariable\fP)"
200
200
.br
201
 
.RI "\fIPrints a variable to stdout. \fP"
 
201
.RI "\fIPrints a \fBvariable\fP to stdout. \fP"
202
202
.ti -1c
203
203
.RI "void \fBfprint_variable\fP (FILE *f, const oid *objid, size_t objidlen, const \fBnetsnmp_variable_list\fP *\fBvariable\fP)"
204
204
.br
205
 
.RI "\fIPrints a variable to a file descriptor. \fP"
 
205
.RI "\fIPrints a \fBvariable\fP to a file descriptor. \fP"
206
206
.ti -1c
207
207
.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, const \fBnetsnmp_variable_list\fP *\fBvariable\fP)"
208
208
.br
238
238
.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)"
239
239
.br
240
240
.ti -1c
241
 
.RI "\fBtree\fP * \fBget_tree\fP (const oid *objid, size_t objidlen, struct \fBtree\fP *subtree)"
 
241
.RI "struct \fBtree\fP * \fBget_tree\fP (const oid *objid, size_t objidlen, struct \fBtree\fP *subtree)"
242
242
.br
243
243
.ti -1c
244
244
.RI "void \fBprint_description\fP (oid *objid, size_t objidlen, int width)"
260
260
.ti -1c
261
261
.RI "int \fBget_wild_node\fP (const char *name, oid *objid, size_t *objidlen)"
262
262
.br
263
 
.RI "\fI\fBSee also:\fP
264
 
.RS 4
265
 
comments on find_best_tree_node for usage after first time. 
266
 
.RE
267
 
.PP
268
 
\fP"
269
263
.ti -1c
270
264
.RI "int \fBget_node\fP (const char *name, oid *objid, size_t *objidlen)"
271
265
.br
381
375
 
382
376
.in +1c
383
377
.ti -1c
384
 
.RI "\fBtree\fP * \fBtree_head\fP"
 
378
.RI "struct \fBtree\fP * \fBtree_head\fP"
385
379
.br
386
380
.ti -1c
387
 
.RI "\fBtree\fP * \fBMib\fP"
 
381
.RI "struct \fBtree\fP * \fBMib\fP"
388
382
.br
389
383
.ti -1c
390
384
.RI "oid \fBRFC1213_MIB\fP [] = { 1, 3, 6, 1, 2, 1 }"
397
391
.PP 
398
392
.SS "int _sprint_hexstring_line (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const u_char * cp, size_t line_len)"
399
393
.PP
400
 
Prints a hexadecimal string into a buffer. 
401
 
.PP
402
 
The characters pointed by *cp are encoded as hexadecimal string.
 
394
Prints a hexadecimal string into a buffer. The characters pointed by *cp are encoded as hexadecimal string.
403
395
.PP
404
396
If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
405
397
.PP
426
418
 
427
419
.PP
428
420
Definition at line 271 of file mib.c.
429
 
.PP
430
 
References netsnmp_ds_get_boolean(), and snmp_realloc().
431
 
.PP
432
 
Referenced by sprint_realloc_hexstring().
433
421
.SS "int build_oid (oid ** out, size_t * out_len, oid * prefix, size_t prefix_len, \fBnetsnmp_variable_list\fP * indexes)"
434
422
.PP
435
 
Definition at line 3578 of file mib.c.
436
 
.PP
437
 
References build_oid_noalloc(), tree::indexes, and snmp_clone_mem().
438
 
.PP
439
 
Referenced by _netsnmp_tdata_generate_index_oid(), netsnmp_table_build_oid(), and netsnmp_table_data_generate_index_oid().
 
423
xxx-rks: should free previous value? 
 
424
.PP
 
425
Definition at line 3581 of file mib.c.
440
426
.SS "int build_oid_segment (\fBnetsnmp_variable_list\fP * var)"
441
427
.PP
442
 
Takes the value in VAR and turns it into an OID segment in var->name. 
443
 
.PP
444
 
\fBParameters:\fP
 
428
Takes the value in VAR and turns it into an OID segment in var->name. \fBParameters:\fP
445
429
.RS 4
446
 
\fIvar\fP The variable.
 
430
\fIvar\fP The \fBvariable\fP.
447
431
.RE
448
432
.PP
449
433
\fBReturns:\fP
453
437
.PP
454
438
 
455
439
.PP
456
 
Definition at line 3442 of file mib.c.
457
 
.PP
458
 
References netsnmp_vardata::integer, variable_list::name, variable_list::name_length, variable_list::name_loc, NULL, netsnmp_vardata::objid, SNMP_FREE, netsnmp_vardata::string, variable_list::type, variable_list::val, and variable_list::val_len.
459
 
.PP
460
 
Referenced by build_oid_noalloc().
 
440
Definition at line 3445 of file mib.c.
461
441
.SS "void fprint_description (FILE * f, oid * objid, size_t objidlen, int width)"
462
442
.PP
463
 
Prints on oid description into a file descriptor. 
464
 
.PP
465
 
\fBParameters:\fP
 
443
Prints on oid description into a file descriptor. \fBParameters:\fP
466
444
.RS 4
467
445
\fIf\fP The file descriptor to print to. 
468
446
.br
475
453
.PP
476
454
 
477
455
.PP
478
 
Definition at line 4437 of file mib.c.
479
 
.PP
480
 
References NULL, SNMP_FREE, and sprint_realloc_description().
481
 
.PP
482
 
Referenced by print_description().
 
456
Definition at line 4451 of file mib.c.
483
457
.SS "void fprint_objid (FILE * f, const oid * objid, size_t objidlen)"
484
458
.PP
485
 
Prints an oid to a file descriptor. 
486
 
.PP
487
 
\fBParameters:\fP
 
459
Prints an oid to a file descriptor. \fBParameters:\fP
488
460
.RS 4
489
461
\fIf\fP The file descriptor to print to. 
490
462
.br
495
467
.PP
496
468
 
497
469
.PP
498
 
Definition at line 3163 of file mib.c.
499
 
.PP
500
 
References netsnmp_sprint_realloc_objid_tree(), NULL, and SNMP_FREE.
501
 
.PP
502
 
Referenced by print_objid().
 
470
Definition at line 3164 of file mib.c.
503
471
.SS "void fprint_variable (FILE * f, const oid * objid, size_t objidlen, const \fBnetsnmp_variable_list\fP * variable)"
504
472
.PP
505
 
Prints a variable to a file descriptor. 
506
 
.PP
507
 
\fBParameters:\fP
 
473
Prints a \fBvariable\fP to a file descriptor. \fBParameters:\fP
508
474
.RS 4
509
475
\fIf\fP The file descriptor to print to. 
510
476
.br
512
478
.br
513
479
\fIobjidlen\fP The length of teh object id. 
514
480
.br
515
 
\fIvariable\fP The variable to print. 
 
481
\fI\fBvariable\fP\fP The \fBvariable\fP to print. 
516
482
.RE
517
483
.PP
518
484
 
519
485
.PP
520
 
Definition at line 3317 of file mib.c.
521
 
.PP
522
 
References NULL, SNMP_FREE, and sprint_realloc_variable().
523
 
.PP
524
 
Referenced by print_variable().
525
 
.SS "struct \fBtree\fP* get_tree_head (void)"
526
 
.PP
527
 
Retrieves the tree head. 
528
 
.PP
529
 
\fBReturns:\fP
 
486
Definition at line 3318 of file mib.c.
 
487
.SS "struct \fBtree\fP* get_tree_head (void)\fC [read]\fP"
 
488
.PP
 
489
Retrieves the \fBtree\fP head. \fBReturns:\fP
530
490
.RS 4
531
 
the tree head. 
 
491
the \fBtree\fP head. 
532
492
.RE
533
493
.PP
534
494
 
535
495
.PP
536
496
Definition at line 2017 of file mib.c.
537
 
.PP
538
 
References tree_head.
539
 
.PP
540
 
Referenced by netsnmp_config_parse_table_set(), and snmp_add_var().
541
 
.SS "int get_wild_node (const char * name, oid * objid, size_t * objidlen)"
542
 
.PP
543
 
\fBSee also:\fP
 
497
.SS "int get_wild_node (const char * name, oid * objid, size_t * objidlen)"\fBSee also:\fP
544
498
.RS 4
545
499
comments on find_best_tree_node for usage after first time. 
546
500
.RE
547
501
.PP
548
502
 
549
503
.PP
550
 
Definition at line 5457 of file mib.c.
551
 
.PP
552
 
References get_node(), tree::label, NULL, and tree_head.
553
 
.PP
554
 
Referenced by snmp_parse_oid().
 
504
Definition at line 5490 of file mib.c.
555
505
.SS "void netsnmp_fixup_mib_directory (void)"
556
506
.PP
557
 
Definition at line 2479 of file mib.c.
558
 
.PP
559
 
References netsnmp_get_mib_directory(), netsnmp_getenv(), netsnmp_set_mib_directory(), NULL, and SNMP_FREE.
560
 
.PP
561
 
Referenced by netsnmp_init_mib().
 
507
swap in the new value and repeat 
 
508
.PP
 
509
Definition at line 2480 of file mib.c.
562
510
.SS "char* netsnmp_get_mib_directory (void)"
563
511
.PP
564
 
Definition at line 2432 of file mib.c.
565
 
.PP
566
 
References netsnmp_ds_get_string(), netsnmp_getenv(), netsnmp_set_mib_directory(), and NULL.
567
 
.PP
568
 
Referenced by netsnmp_fixup_mib_directory(), and netsnmp_init_mib().
 
512
Check if the environment \fBvariable\fP is set
 
513
.PP
 
514
Not set use hard coded path 
 
515
.PP
 
516
Definition at line 2433 of file mib.c.
569
517
.SS "void netsnmp_init_mib (void)"
570
518
.PP
571
 
Initialises the mib reader. 
572
 
.PP
573
 
Reads in all settings from the environment. 
574
 
.PP
575
 
Definition at line 2526 of file mib.c.
576
 
.PP
577
 
References tree::child_list, tree::label, _PrefixList::len, Mib, mib_prefixes, netsnmp_fixup_mib_directory(), netsnmp_get_mib_directory(), netsnmp_getenv(), NULL, SNMP_FREE, _PrefixList::str, and tree_head.
578
 
.PP
579
 
Referenced by init_mib(), and init_snmp().
 
519
Initialises the mib reader. Reads in all settings from the environment. 
 
520
.PP
 
521
Definition at line 2527 of file mib.c.
580
522
.SS "int netsnmp_oid2chars (char * C, int L, const oid * O)"
581
523
.PP
582
 
Converts an OID to its character form. 
583
 
.PP
584
 
in example 5 . 1 . 2 . 3 . 4 . 5 = 12345
 
524
Converts an OID to its character form. in example 5 . 1 . 2 . 3 . 4 . 5 = 12345
585
525
.PP
586
526
\fBParameters:\fP
587
527
.RS 4
601
541
.PP
602
542
length 
603
543
.PP
604
 
Definition at line 6244 of file mib.c.
605
 
.PP
606
 
Referenced by netsnmp_oid2str().
 
544
Definition at line 6277 of file mib.c.
607
545
.SS "int netsnmp_oid2str (char * S, int L, oid * O)"
608
546
.PP
609
 
Converts an OID to its string form. 
610
 
.PP
611
 
in example 5 . 'h' . 'e' . 'l' . 'l' . 'o' = 'hello\\0' (null terminated)
 
547
Converts an OID to its string form. in example 5 . 'h' . 'e' . 'l' . 'l' . 'o' = 'hello\\0' (null terminated)
612
548
.PP
613
549
\fBParameters:\fP
614
550
.RS 4
626
562
.PP
627
563
 
628
564
.PP
629
 
Definition at line 6272 of file mib.c.
630
 
.PP
631
 
References netsnmp_oid2chars().
 
565
Definition at line 6305 of file mib.c.
632
566
.SS "void netsnmp_set_mib_directory (const char * dir)"
633
567
.PP
634
 
Definition at line 2377 of file mib.c.
635
 
.PP
636
 
References netsnmp_ds_get_string(), netsnmp_ds_set_string(), NULL, and SNMP_FREE.
637
 
.PP
638
 
Referenced by netsnmp_fixup_mib_directory(), and netsnmp_get_mib_directory().
 
568
New dir starts with '+', thus we add it.
 
569
.PP
 
570
If dir starts with '+' skip '+' it.
 
571
.PP
 
572
set_string calls strdup, so if we allocated memory, free it 
 
573
.PP
 
574
Definition at line 2378 of file mib.c.
639
575
.SS "int netsnmp_str2oid (const char * S, oid * O, int L)"
640
576
.PP
641
 
Converts a string to its OID form. 
642
 
.PP
643
 
in example 'hello' = 5 . 'h' . 'e' . 'l' . 'l' . 'o'
 
577
Converts a string to its OID form. in example 'hello' = 5 . 'h' . 'e' . 'l' . 'l' . 'o'
644
578
.PP
645
579
\fBParameters:\fP
646
580
.RS 4
658
592
.PP
659
593
 
660
594
.PP
661
 
Definition at line 6209 of file mib.c.
 
595
Definition at line 6242 of file mib.c.
662
596
.SS "void print_description (oid * objid, size_t objidlen, int width)"
663
597
.PP
664
 
Prints on oid description on stdout. 
665
 
.PP
666
 
\fBSee also:\fP
 
598
Prints on oid description on stdout. \fBSee also:\fP
667
599
.RS 4
668
600
\fBfprint_description\fP 
669
601
.RE
670
602
.PP
671
603
 
672
604
.PP
673
 
Definition at line 4421 of file mib.c.
674
 
.PP
675
 
References fprint_description().
 
605
Definition at line 4435 of file mib.c.
676
606
.SS "void print_mib (FILE * fp)"
677
607
.PP
678
 
Prints the MIBs to the file fp. 
679
 
.PP
680
 
\fBParameters:\fP
 
608
Prints the MIBs to the file fp. \fBParameters:\fP
681
609
.RS 4
682
610
\fIfp\fP The file descriptor to print to. 
683
611
.RE
684
612
.PP
685
613
 
686
614
.PP
687
 
Definition at line 2741 of file mib.c.
688
 
.PP
689
 
References tree_head.
 
615
Definition at line 2742 of file mib.c.
690
616
.SS "void print_objid (const oid * objid, size_t objidlen)"
691
617
.PP
692
 
Prints an oid to stdout. 
693
 
.PP
694
 
\fBParameters:\fP
 
618
Prints an oid to stdout. \fBParameters:\fP
695
619
.RS 4
696
620
\fIobjid\fP The oid to print 
697
621
.br
700
624
.PP
701
625
 
702
626
.PP
703
 
Definition at line 3149 of file mib.c.
704
 
.PP
705
 
References fprint_objid().
 
627
Definition at line 3150 of file mib.c.
706
628
.SS "void print_variable (const oid * objid, size_t objidlen, const \fBnetsnmp_variable_list\fP * variable)"
707
629
.PP
708
 
Prints a variable to stdout. 
709
 
.PP
710
 
\fBParameters:\fP
 
630
Prints a \fBvariable\fP to stdout. \fBParameters:\fP
711
631
.RS 4
712
632
\fIobjid\fP The object id. 
713
633
.br
714
634
\fIobjidlen\fP The length of teh object id. 
715
635
.br
716
 
\fIvariable\fP The variable to print. 
 
636
\fI\fBvariable\fP\fP The \fBvariable\fP to print. 
717
637
.RE
718
638
.PP
719
639
 
720
640
.PP
721
 
Definition at line 3301 of file mib.c.
722
 
.PP
723
 
References fprint_variable().
 
641
Definition at line 3302 of file mib.c.
724
642
.SS "int read_objid (const char * input, oid * output, size_t * out_len)"
725
643
.PP
726
 
Reads an object identifier from an input string into internal OID form. 
727
 
.PP
728
 
When called, out_len must hold the maximum length of the output array.
 
644
Reads an object identifier from an input string into internal OID form. When called, out_len must hold the maximum length of the output array.
729
645
.PP
730
646
\fBParameters:\fP
731
647
.RS 4
743
659
.PP
744
660
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. 
745
661
.PP
746
 
Definition at line 2839 of file mib.c.
747
 
.PP
748
 
References get_node(), netsnmp_ds_get_boolean(), NULL, SNMP_FREE, and tree_head.
749
 
.PP
750
 
Referenced by read_config_read_objid(), and snmp_parse_oid().
 
662
Definition at line 2840 of file mib.c.
751
663
.SS "void set_function (struct \fBtree\fP * subtree)"
752
664
.PP
753
 
Set's the printing function printomat in a subtree according it's type. 
754
 
.PP
755
 
\fBParameters:\fP
 
665
Set's the printing function printomat in a subtree according it's type. \fBParameters:\fP
756
666
.RS 4
757
667
\fIsubtree\fP The subtree to set. 
758
668
.RE
759
669
.PP
760
670
 
761
671
.PP
762
 
Definition at line 2762 of file mib.c.
763
 
.PP
764
 
References NULL, tree::printer, tree::printomat, sprint_realloc_bitstring(), sprint_realloc_by_type(), sprint_realloc_counter(), sprint_realloc_counter64(), sprint_realloc_gauge(), sprint_realloc_integer(), sprint_realloc_ipaddress(), sprint_realloc_networkaddress(), sprint_realloc_nsapaddress(), sprint_realloc_null(), sprint_realloc_object_identifier(), sprint_realloc_octet_string(), sprint_realloc_opaque(), sprint_realloc_timeticks(), sprint_realloc_uinteger(), and tree::type.
 
672
Definition at line 2763 of file mib.c.
765
673
.SS "void shutdown_mib (void)"
766
674
.PP
767
675
Unloads all mibs. 
768
676
.PP
769
 
Definition at line 2716 of file mib.c.
770
 
.PP
771
 
References tree::label, Mib, NULL, SNMP_FREE, and tree_head.
772
 
.PP
773
 
Referenced by snmp_shutdown().
 
677
Definition at line 2717 of file mib.c.
774
678
.SS "void snmp_in_toggle_options_usage (const char * lead, FILE * outf)"
775
679
.PP
776
 
Prints out a help usage for the in* toggle options. 
777
 
.PP
778
 
\fBParameters:\fP
 
680
Prints out a help usage for the in* toggle options. \fBParameters:\fP
779
681
.RS 4
780
682
\fIlead\fP The lead to print for every line. 
781
683
.br
784
686
.PP
785
687
 
786
688
.PP
787
 
Definition at line 2289 of file mib.c.
 
689
Definition at line 2290 of file mib.c.
788
690
.SS "oid* snmp_parse_oid (const char * argv, oid * root, size_t * rootlen)"
789
691
.PP
790
 
Given a string, parses an oid out of it (if possible). 
791
 
.PP
792
 
It will try to parse it based on predetermined configuration if present or by every method possible otherwise. If a suffix has been registered using NETSNMP_DS_LIB_OIDSUFFIX, it will be appended to the input string before processing.
 
692
Given a string, parses an oid out of it (if possible). It will try to parse it based on predetermined configuration if present or by every method possible otherwise. If a suffix has been registered using NETSNMP_DS_LIB_OIDSUFFIX, it will be appended to the input string before processing.
793
693
.PP
794
694
\fBParameters:\fP
795
695
.RS 4
807
707
.PP
808
708
 
809
709
.PP
810
 
Definition at line 5815 of file mib.c.
811
 
.PP
812
 
References clear_tree_flags(), get_node(), get_wild_node(), netsnmp_ds_get_boolean(), netsnmp_ds_get_string(), NULL, read_objid(), and tree_head.
813
 
.PP
814
 
Referenced by netsnmp_config_parse_table_set(), and snmp_add_var().
 
710
Definition at line 5848 of file mib.c.
815
711
.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)"
816
712
.PP
817
 
Prints an ascii string into a buffer. 
818
 
.PP
819
 
The characters pointed by *cp are encoded as an ascii string.
 
713
Prints an ascii string into a buffer. The characters pointed by *cp are encoded as an ascii string.
820
714
.PP
821
715
If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
822
716
.PP
843
737
 
844
738
.PP
845
739
Definition at line 367 of file mib.c.
846
 
.PP
847
 
References snmp_realloc().
848
 
.PP
849
 
Referenced by asn_build_string(), asn_parse_string(), snprint_asciistring(), and sprint_realloc_octet_string().
850
740
.SS "int sprint_realloc_badtype (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const \fBnetsnmp_variable_list\fP * var, const struct \fBenum_list\fP * enums, const char * hint, const char * units)"
851
741
.PP
852
 
Fallback routine for a bad type, prints 'Variable has bad type' into a buffer. 
853
 
.PP
854
 
If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
 
742
Fallback routine for a bad type, prints 'Variable has bad type' into a buffer. If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
855
743
.PP
856
744
\fBParameters:\fP
857
745
.RS 4
863
751
.br
864
752
\fIallow_realloc\fP if not zero reallocate the buffer to fit the needed size. 
865
753
.br
866
 
\fIvar\fP The variable to encode. 
 
754
\fIvar\fP The \fBvariable\fP to encode. 
867
755
.br
868
 
\fIenums\fP The enumeration ff this variable is enumerated. may be NULL. 
 
756
\fIenums\fP The enumeration ff this \fBvariable\fP is enumerated. may be NULL. 
869
757
.br
870
758
\fIhint\fP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
871
759
.br
880
768
 
881
769
.PP
882
770
Definition at line 1902 of file mib.c.
883
 
.PP
884
 
References snmp_strcat().
885
 
.PP
886
 
Referenced by snprint_badtype(), and sprint_realloc_by_type().
887
771
.SS "int sprint_realloc_bitstring (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const \fBnetsnmp_variable_list\fP * var, const struct \fBenum_list\fP * enums, const char * hint, const char * units)"
888
772
.PP
889
 
Prints a bit string into a buffer. 
890
 
.PP
891
 
If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
 
773
Prints a bit string into a buffer. If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
892
774
.PP
893
775
\fBParameters:\fP
894
776
.RS 4
900
782
.br
901
783
\fIallow_realloc\fP if not zero reallocate the buffer to fit the needed size. 
902
784
.br
903
 
\fIvar\fP The variable to encode. 
 
785
\fIvar\fP The \fBvariable\fP to encode. 
904
786
.br
905
 
\fIenums\fP The enumeration ff this variable is enumerated. may be NULL. 
 
787
\fIenums\fP The enumeration ff this \fBvariable\fP is enumerated. may be NULL. 
906
788
.br
907
789
\fIhint\fP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
908
790
.br
917
799
 
918
800
.PP
919
801
Definition at line 1763 of file mib.c.
920
 
.PP
921
 
References netsnmp_vardata::bitstring, enum_list::label, netsnmp_ds_get_boolean(), enum_list::next, NULL, snmp_strcat(), sprint_realloc_by_type(), sprint_realloc_hexstring(), variable_list::type, variable_list::val, variable_list::val_len, and enum_list::value.
922
 
.PP
923
 
Referenced by set_function(), snprint_bitstring(), and sprint_realloc_by_type().
924
802
.SS "int sprint_realloc_by_type (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const \fBnetsnmp_variable_list\fP * var, const struct \fBenum_list\fP * enums, const char * hint, const char * units)"
925
803
.PP
926
 
Universal print routine, prints a variable into a buffer according to the variable type. 
927
 
.PP
928
 
If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
 
804
Universal print routine, prints a \fBvariable\fP into a buffer according to the \fBvariable\fP type. If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
929
805
.PP
930
806
\fBParameters:\fP
931
807
.RS 4
937
813
.br
938
814
\fIallow_realloc\fP if not zero reallocate the buffer to fit the needed size. 
939
815
.br
940
 
\fIvar\fP The variable to encode. 
 
816
\fIvar\fP The \fBvariable\fP to encode. 
941
817
.br
942
 
\fIenums\fP The enumeration ff this variable is enumerated. may be NULL. 
 
818
\fIenums\fP The enumeration ff this \fBvariable\fP is enumerated. may be NULL. 
943
819
.br
944
820
\fIhint\fP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
945
821
.br
954
830
 
955
831
.PP
956
832
Definition at line 1937 of file mib.c.
957
 
.PP
958
 
References sprint_realloc_badtype(), sprint_realloc_bitstring(), sprint_realloc_counter(), sprint_realloc_counter64(), sprint_realloc_gauge(), sprint_realloc_integer(), sprint_realloc_ipaddress(), sprint_realloc_null(), sprint_realloc_object_identifier(), sprint_realloc_octet_string(), sprint_realloc_opaque(), sprint_realloc_timeticks(), sprint_realloc_uinteger(), and variable_list::type.
959
 
.PP
960
 
Referenced by set_function(), snprint_by_type(), sprint_realloc_bitstring(), sprint_realloc_counter(), sprint_realloc_counter64(), sprint_realloc_gauge(), sprint_realloc_integer(), sprint_realloc_ipaddress(), sprint_realloc_networkaddress(), sprint_realloc_nsapaddress(), sprint_realloc_null(), sprint_realloc_object_identifier(), sprint_realloc_octet_string(), sprint_realloc_opaque(), sprint_realloc_timeticks(), sprint_realloc_uinteger(), sprint_realloc_value(), sprint_realloc_variable(), and table_helper_handler().
961
833
.SS "int sprint_realloc_counter (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const \fBnetsnmp_variable_list\fP * var, const struct \fBenum_list\fP * enums, const char * hint, const char * units)"
962
834
.PP
963
 
Prints a counter value into a buffer. 
964
 
.PP
965
 
If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
 
835
Prints a counter value into a buffer. If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
966
836
.PP
967
837
\fBParameters:\fP
968
838
.RS 4
974
844
.br
975
845
\fIallow_realloc\fP if not zero reallocate the buffer to fit the needed size. 
976
846
.br
977
 
\fIvar\fP The variable to encode. 
 
847
\fIvar\fP The \fBvariable\fP to encode. 
978
848
.br
979
 
\fIenums\fP The enumeration ff this variable is enumerated. may be NULL. 
 
849
\fIenums\fP The enumeration ff this \fBvariable\fP is enumerated. may be NULL. 
980
850
.br
981
851
\fIhint\fP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
982
852
.br
991
861
 
992
862
.PP
993
863
Definition at line 1530 of file mib.c.
994
 
.PP
995
 
References netsnmp_vardata::integer, netsnmp_ds_get_boolean(), NULL, snmp_strcat(), sprint_realloc_by_type(), variable_list::type, and variable_list::val.
996
 
.PP
997
 
Referenced by set_function(), snprint_counter(), and sprint_realloc_by_type().
998
864
.SS "int sprint_realloc_counter64 (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const \fBnetsnmp_variable_list\fP * var, const struct \fBenum_list\fP * enums, const char * hint, const char * units)"
999
865
.PP
1000
 
Prints a counter into a buffer. 
1001
 
.PP
1002
 
The variable var is encoded as a counter value.
 
866
Prints a counter into a buffer. The \fBvariable\fP var is encoded as a counter value.
1003
867
.PP
1004
868
If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
1005
869
.PP
1013
877
.br
1014
878
\fIallow_realloc\fP if not zero reallocate the buffer to fit the needed size. 
1015
879
.br
1016
 
\fIvar\fP The variable to encode. 
 
880
\fIvar\fP The \fBvariable\fP to encode. 
1017
881
.br
1018
 
\fIenums\fP The enumeration ff this variable is enumerated. may be NULL. 
 
882
\fIenums\fP The enumeration ff this \fBvariable\fP is enumerated. may be NULL. 
1019
883
.br
1020
884
\fIhint\fP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
1021
885
.br
1030
894
 
1031
895
.PP
1032
896
Definition at line 846 of file mib.c.
1033
 
.PP
1034
 
References netsnmp_vardata::counter64, netsnmp_ds_get_boolean(), NULL, snmp_cstrcat, sprint_realloc_by_type(), variable_list::type, and variable_list::val.
1035
 
.PP
1036
 
Referenced by set_function(), snprint_counter64(), sprint_realloc_by_type(), and sprint_realloc_opaque().
1037
897
.SS "int sprint_realloc_gauge (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const \fBnetsnmp_variable_list\fP * var, const struct \fBenum_list\fP * enums, const char * hint, const char * units)"
1038
898
.PP
1039
 
Prints a gauge value into a buffer. 
1040
 
.PP
1041
 
If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
 
899
Prints a gauge value into a buffer. If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
1042
900
.PP
1043
901
\fBParameters:\fP
1044
902
.RS 4
1050
908
.br
1051
909
\fIallow_realloc\fP if not zero reallocate the buffer to fit the needed size. 
1052
910
.br
1053
 
\fIvar\fP The variable to encode. 
 
911
\fIvar\fP The \fBvariable\fP to encode. 
1054
912
.br
1055
 
\fIenums\fP The enumeration ff this variable is enumerated. may be NULL. 
 
913
\fIenums\fP The enumeration ff this \fBvariable\fP is enumerated. may be NULL. 
1056
914
.br
1057
915
\fIhint\fP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
1058
916
.br
1067
925
 
1068
926
.PP
1069
927
Definition at line 1457 of file mib.c.
1070
 
.PP
1071
 
References netsnmp_vardata::integer, netsnmp_ds_get_boolean(), NULL, snmp_strcat(), sprint_realloc_by_type(), sprint_realloc_hinted_integer(), variable_list::type, and variable_list::val.
1072
 
.PP
1073
 
Referenced by set_function(), snprint_gauge(), and sprint_realloc_by_type().
1074
928
.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)"
1075
929
.PP
1076
 
Prints an integer according to the hint into a buffer. 
1077
 
.PP
1078
 
If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
 
930
Prints an integer according to the hint into a buffer. If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
1079
931
.PP
1080
932
\fBParameters:\fP
1081
933
.RS 4
1087
939
.br
1088
940
\fIallow_realloc\fP if not zero reallocate the buffer to fit the needed size. 
1089
941
.br
1090
 
\fIval\fP The variable to encode. 
 
942
\fIval\fP The \fBvariable\fP to encode. 
1091
943
.br
1092
 
\fIdecimaltype\fP The enumeration ff this variable is enumerated. may be NULL. 
 
944
\fIdecimaltype\fP The enumeration ff this \fBvariable\fP is enumerated. may be NULL. 
1093
945
.br
1094
946
\fIhint\fP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may _NOT_ be NULL. 
1095
947
.br
1104
956
 
1105
957
.PP
1106
958
Definition at line 1183 of file mib.c.
1107
 
.PP
1108
 
References snmp_strcat().
1109
 
.PP
1110
 
Referenced by snprint_hinted_integer(), and sprint_realloc_gauge().
1111
959
.SS "int sprint_realloc_integer (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const \fBnetsnmp_variable_list\fP * var, const struct \fBenum_list\fP * enums, const char * hint, const char * units)"
1112
960
.PP
1113
 
Prints an integer into a buffer. 
1114
 
.PP
1115
 
If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
 
961
Prints an integer into a buffer. If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
1116
962
.PP
1117
963
\fBParameters:\fP
1118
964
.RS 4
1124
970
.br
1125
971
\fIallow_realloc\fP if not zero reallocate the buffer to fit the needed size. 
1126
972
.br
1127
 
\fIvar\fP The variable to encode. 
 
973
\fIvar\fP The \fBvariable\fP to encode. 
1128
974
.br
1129
 
\fIenums\fP The enumeration ff this variable is enumerated. may be NULL. 
 
975
\fIenums\fP The enumeration ff this \fBvariable\fP is enumerated. may be NULL. 
1130
976
.br
1131
977
\fIhint\fP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
1132
978
.br
1141
987
 
1142
988
.PP
1143
989
Definition at line 1257 of file mib.c.
1144
 
.PP
1145
 
References netsnmp_vardata::integer, enum_list::label, netsnmp_ds_get_boolean(), enum_list::next, NULL, snmp_strcat(), sprint_realloc_by_type(), variable_list::type, variable_list::val, and enum_list::value.
1146
 
.PP
1147
 
Referenced by set_function(), snprint_integer(), and sprint_realloc_by_type().
1148
990
.SS "int sprint_realloc_ipaddress (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const \fBnetsnmp_variable_list\fP * var, const struct \fBenum_list\fP * enums, const char * hint, const char * units)"
1149
991
.PP
1150
 
Prints an ip-address into a buffer. 
1151
 
.PP
1152
 
If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
 
992
Prints an ip-address into a buffer. If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
1153
993
.PP
1154
994
\fBParameters:\fP
1155
995
.RS 4
1161
1001
.br
1162
1002
\fIallow_realloc\fP if not zero reallocate the buffer to fit the needed size. 
1163
1003
.br
1164
 
\fIvar\fP The variable to encode. 
 
1004
\fIvar\fP The \fBvariable\fP to encode. 
1165
1005
.br
1166
 
\fIenums\fP The enumeration ff this variable is enumerated. may be NULL. 
 
1006
\fIenums\fP The enumeration ff this \fBvariable\fP is enumerated. may be NULL. 
1167
1007
.br
1168
1008
\fIhint\fP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
1169
1009
.br
1178
1018
 
1179
1019
.PP
1180
1020
Definition at line 1659 of file mib.c.
1181
 
.PP
1182
 
References netsnmp_ds_get_boolean(), NULL, snmp_realloc(), snmp_strcat(), sprint_realloc_by_type(), netsnmp_vardata::string, variable_list::type, and variable_list::val.
1183
 
.PP
1184
 
Referenced by set_function(), snprint_ipaddress(), and sprint_realloc_by_type().
1185
1021
.SS "int sprint_realloc_networkaddress (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const \fBnetsnmp_variable_list\fP * var, const struct \fBenum_list\fP * enums, const char * hint, const char * units)"
1186
1022
.PP
1187
 
Prints a network address into a buffer. 
1188
 
.PP
1189
 
If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
 
1023
Prints a network address into a buffer. If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
1190
1024
.PP
1191
1025
\fBParameters:\fP
1192
1026
.RS 4
1198
1032
.br
1199
1033
\fIallow_realloc\fP if not zero reallocate the buffer to fit the needed size. 
1200
1034
.br
1201
 
\fIvar\fP The variable to encode. 
 
1035
\fIvar\fP The \fBvariable\fP to encode. 
1202
1036
.br
1203
 
\fIenums\fP The enumeration ff this variable is enumerated. may be NULL. 
 
1037
\fIenums\fP The enumeration ff this \fBvariable\fP is enumerated. may be NULL. 
1204
1038
.br
1205
1039
\fIhint\fP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
1206
1040
.br
1215
1049
 
1216
1050
.PP
1217
1051
Definition at line 1593 of file mib.c.
1218
 
.PP
1219
 
References netsnmp_ds_get_boolean(), NULL, snmp_realloc(), snmp_strcat(), sprint_realloc_by_type(), netsnmp_vardata::string, variable_list::type, variable_list::val, and variable_list::val_len.
1220
 
.PP
1221
 
Referenced by set_function(), and snprint_networkaddress().
1222
1052
.SS "int sprint_realloc_null (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const \fBnetsnmp_variable_list\fP * var, const struct \fBenum_list\fP * enums, const char * hint, const char * units)"
1223
1053
.PP
1224
 
Prints a null value into a buffer. 
1225
 
.PP
1226
 
If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
 
1054
Prints a null value into a buffer. If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
1227
1055
.PP
1228
1056
\fBParameters:\fP
1229
1057
.RS 4
1235
1063
.br
1236
1064
\fIallow_realloc\fP if not zero reallocate the buffer to fit the needed size. 
1237
1065
.br
1238
 
\fIvar\fP The variable to encode. 
 
1066
\fIvar\fP The \fBvariable\fP to encode. 
1239
1067
.br
1240
 
\fIenums\fP The enumeration ff this variable is enumerated. may be NULL. 
 
1068
\fIenums\fP The enumeration ff this \fBvariable\fP is enumerated. may be NULL. 
1241
1069
.br
1242
1070
\fIhint\fP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
1243
1071
.br
1252
1080
 
1253
1081
.PP
1254
1082
Definition at line 1719 of file mib.c.
1255
 
.PP
1256
 
References netsnmp_ds_get_boolean(), NULL, snmp_strcat(), sprint_realloc_by_type(), and variable_list::type.
1257
 
.PP
1258
 
Referenced by set_function(), snprint_null(), and sprint_realloc_by_type().
1259
1083
.SS "int sprint_realloc_object_identifier (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const \fBnetsnmp_variable_list\fP * var, const struct \fBenum_list\fP * enums, const char * hint, const char * units)"
1260
1084
.PP
1261
 
Prints an object identifier into a buffer. 
1262
 
.PP
1263
 
If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
 
1085
Prints an object identifier into a buffer. If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
1264
1086
.PP
1265
1087
\fBParameters:\fP
1266
1088
.RS 4
1272
1094
.br
1273
1095
\fIallow_realloc\fP if not zero reallocate the buffer to fit the needed size. 
1274
1096
.br
1275
 
\fIvar\fP The variable to encode. 
 
1097
\fIvar\fP The \fBvariable\fP to encode. 
1276
1098
.br
1277
 
\fIenums\fP The enumeration ff this variable is enumerated. may be NULL. 
 
1099
\fIenums\fP The enumeration ff this \fBvariable\fP is enumerated. may be NULL. 
1278
1100
.br
1279
1101
\fIhint\fP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
1280
1102
.br
1289
1111
 
1290
1112
.PP
1291
1113
Definition at line 1039 of file mib.c.
1292
 
.PP
1293
 
References netsnmp_ds_get_boolean(), netsnmp_sprint_realloc_objid_tree(), NULL, netsnmp_vardata::objid, snmp_strcat(), sprint_realloc_by_type(), variable_list::type, variable_list::val, and variable_list::val_len.
1294
 
.PP
1295
 
Referenced by set_function(), snprint_object_identifier(), and sprint_realloc_by_type().
1296
1114
.SS "int sprint_realloc_octet_string (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const \fBnetsnmp_variable_list\fP * var, const struct \fBenum_list\fP * enums, const char * hint, const char * units)"
1297
1115
.PP
1298
 
Prints an octet string into a buffer. 
1299
 
.PP
1300
 
The variable var is encoded as octet string.
 
1116
Prints an octet string into a buffer. The \fBvariable\fP var is encoded as octet string.
1301
1117
.PP
1302
1118
If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
1303
1119
.PP
1311
1127
.br
1312
1128
\fIallow_realloc\fP if not zero reallocate the buffer to fit the needed size. 
1313
1129
.br
1314
 
\fIvar\fP The variable to encode. 
 
1130
\fIvar\fP The \fBvariable\fP to encode. 
1315
1131
.br
1316
 
\fIenums\fP The enumeration ff this variable is enumerated. may be NULL. 
 
1132
\fIenums\fP The enumeration ff this \fBvariable\fP is enumerated. may be NULL. 
1317
1133
.br
1318
1134
\fIhint\fP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
1319
1135
.br
1328
1144
 
1329
1145
.PP
1330
1146
Definition at line 427 of file mib.c.
1331
 
.PP
1332
 
References netsnmp_ds_get_boolean(), netsnmp_ds_get_int(), NULL, snmp_cstrcat, SNMP_MIN, snmp_realloc(), sprint_realloc_asciistring(), sprint_realloc_by_type(), sprint_realloc_hexstring(), sprint_realloc_octet_string(), netsnmp_vardata::string, variable_list::type, variable_list::val, and variable_list::val_len.
1333
 
.PP
1334
 
Referenced by set_function(), snprint_octet_string(), sprint_realloc_by_type(), and sprint_realloc_octet_string().
1335
1147
.SS "int sprint_realloc_opaque (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const \fBnetsnmp_variable_list\fP * var, const struct \fBenum_list\fP * enums, const char * hint, const char * units)"
1336
1148
.PP
1337
 
Prints an object identifier into a buffer. 
1338
 
.PP
1339
 
If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
 
1149
Prints an object identifier into a buffer. If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
1340
1150
.PP
1341
1151
\fBParameters:\fP
1342
1152
.RS 4
1348
1158
.br
1349
1159
\fIallow_realloc\fP if not zero reallocate the buffer to fit the needed size. 
1350
1160
.br
1351
 
\fIvar\fP The variable to encode. 
 
1161
\fIvar\fP The \fBvariable\fP to encode. 
1352
1162
.br
1353
 
\fIenums\fP The enumeration ff this variable is enumerated. may be NULL. 
 
1163
\fIenums\fP The enumeration ff this \fBvariable\fP is enumerated. may be NULL. 
1354
1164
.br
1355
1165
\fIhint\fP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
1356
1166
.br
1365
1175
 
1366
1176
.PP
1367
1177
Definition at line 949 of file mib.c.
1368
 
.PP
1369
 
References netsnmp_ds_get_boolean(), NULL, snmp_cstrcat, snmp_strcat(), sprint_realloc_by_type(), sprint_realloc_counter64(), sprint_realloc_hexstring(), netsnmp_vardata::string, variable_list::type, variable_list::val, and variable_list::val_len.
1370
 
.PP
1371
 
Referenced by set_function(), snprint_opaque(), and sprint_realloc_by_type().
1372
1178
.SS "int sprint_realloc_timeticks (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const \fBnetsnmp_variable_list\fP * var, const struct \fBenum_list\fP * enums, const char * hint, const char * units)"
1373
1179
.PP
1374
 
Prints a timetick variable into a buffer. 
1375
 
.PP
1376
 
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
Prints a timetick \fBvariable\fP into a buffer. If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
1377
1181
.PP
1378
1182
\fBParameters:\fP
1379
1183
.RS 4
1385
1189
.br
1386
1190
\fIallow_realloc\fP if not zero reallocate the buffer to fit the needed size. 
1387
1191
.br
1388
 
\fIvar\fP The variable to encode. 
 
1192
\fIvar\fP The \fBvariable\fP to encode. 
1389
1193
.br
1390
 
\fIenums\fP The enumeration ff this variable is enumerated. may be NULL. 
 
1194
\fIenums\fP The enumeration ff this \fBvariable\fP is enumerated. may be NULL. 
1391
1195
.br
1392
1196
\fIhint\fP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
1393
1197
.br
1402
1206
 
1403
1207
.PP
1404
1208
Definition at line 1109 of file mib.c.
1405
 
.PP
1406
 
References netsnmp_vardata::integer, netsnmp_ds_get_boolean(), NULL, snmp_strcat(), sprint_realloc_by_type(), variable_list::type, and variable_list::val.
1407
 
.PP
1408
 
Referenced by set_function(), snprint_timeticks(), and sprint_realloc_by_type().
1409
1209
.SS "int sprint_realloc_uinteger (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const \fBnetsnmp_variable_list\fP * var, const struct \fBenum_list\fP * enums, const char * hint, const char * units)"
1410
1210
.PP
1411
 
Prints an unsigned integer into a buffer. 
1412
 
.PP
1413
 
If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
 
1211
Prints an unsigned integer into a buffer. If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
1414
1212
.PP
1415
1213
\fBParameters:\fP
1416
1214
.RS 4
1422
1220
.br
1423
1221
\fIallow_realloc\fP if not zero reallocate the buffer to fit the needed size. 
1424
1222
.br
1425
 
\fIvar\fP The variable to encode. 
 
1223
\fIvar\fP The \fBvariable\fP to encode. 
1426
1224
.br
1427
 
\fIenums\fP The enumeration ff this variable is enumerated. may be NULL. 
 
1225
\fIenums\fP The enumeration ff this \fBvariable\fP is enumerated. may be NULL. 
1428
1226
.br
1429
1227
\fIhint\fP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL. 
1430
1228
.br
1439
1237
 
1440
1238
.PP
1441
1239
Definition at line 1360 of file mib.c.
1442
 
.PP
1443
 
References netsnmp_vardata::integer, enum_list::label, netsnmp_ds_get_boolean(), enum_list::next, NULL, snmp_strcat(), sprint_realloc_by_type(), variable_list::type, variable_list::val, and enum_list::value.
1444
 
.PP
1445
 
Referenced by set_function(), snprint_uinteger(), and sprint_realloc_by_type().
1446
1240
.SS "char* uptime_string (u_long timeticks, char * buf)"
1447
1241
.PP
1448
 
Converts timeticks to hours, minutes, seconds string. 
1449
 
.PP
1450
 
CMU compatible does not show centiseconds.
 
1242
Converts timeticks to hours, minutes, seconds string. CMU compatible does not show centiseconds.
1451
1243
.PP
1452
1244
\fBParameters:\fP
1453
1245
.RS 4
1468
1260
.PP
1469
1261
 
1470
1262
.PP
1471
 
Definition at line 5780 of file mib.c.
1472
 
.PP
1473
 
References uptime_string_n().
 
1263
Definition at line 5813 of file mib.c.
1474
1264
.SH "Variable Documentation"
1475
1265
.PP 
1476
 
.SS "\fBPrefixList\fP \fBmib_prefixes\fP[]"
1477
 
.PP
1478
 
\fBInitial value:\fP
 
1266
.SS "\fBPrefixList\fP mib_prefixes[]"\fBInitial value:\fP
1479
1267
.PP
1480
1268
.nf
1481
1269
 {
1490
1278
.fi
1491
1279
.PP
1492
1280
Definition at line 160 of file mib.c.
1493
 
.PP
1494
 
Referenced by netsnmp_init_mib(), and netsnmp_sprint_realloc_objid_tree().
 
1281
.SH "Author"
 
1282
.PP 
 
1283
Generated automatically by Doxygen for net-snmp from the source code.