netsnmp_mib_utilities.3
上传用户:wxp200602
上传日期:2007-10-30
资源大小:4028k
文件大小:53k
源码类别:
SNMP编程
开发平台:
Unix_Linux
- .TH "mib parsing and datatype manipulation routines." 3 "28 Nov 2005" "Version 5.2.1.rc3" "net-snmp" " -*- nroff -*-
- .ad l
- .nh
- .SH NAME
- mib parsing and datatype manipulation routines. -
- .SS "Data Structures"
- .in +1c
- .ti -1c
- .RI "struct fB_PrefixListfP"
- .br
- .ti -1c
- .RI "struct fBparse_hintsfP"
- .br
- .in -1c
- .SS "Typedefs"
- .in +1c
- .ti -1c
- .RI "typedef fB_PrefixListfP * fBPrefixListPtrfP"
- .br
- .ti -1c
- .RI "typedef fB_PrefixListfP fBPrefixListfP"
- .br
- .in -1c
- .SS "Enumerations"
- .in +1c
- .ti -1c
- .RI "enum fBinet_address_typefP { fBIPV4fP = 1, fBIPV6fP = 2, fBIPV4ZfP = 3, fBIPV6ZfP = 4, fBDNSfP = 16 }"
- .br
- .in -1c
- .SS "Functions"
- .in +1c
- .ti -1c
- .RI "int fB_sprint_hexstring_linefP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const u_char *cp, size_t line_len)"
- .br
- .RI "fIPrints a hexadecimal string into a buffer. fP"
- .ti -1c
- .RI "int fBsprint_realloc_hexstringfP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const u_char *cp, size_t len)"
- .br
- .ti -1c
- .RI "int fBsprint_realloc_asciistringfP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const u_char *cp, size_t len)"
- .br
- .RI "fIPrints an ascii string into a buffer. fP"
- .ti -1c
- .RI "int fBsprint_realloc_octet_stringfP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .RI "fIPrints an octet string into a buffer. fP"
- .ti -1c
- .RI "int fBsprint_realloc_counter64fP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .RI "fIPrints a counter into a buffer. fP"
- .ti -1c
- .RI "int fBsprint_realloc_opaquefP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .RI "fIPrints an object identifier into a buffer. fP"
- .ti -1c
- .RI "int fBsprint_realloc_object_identifierfP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .RI "fIPrints an object identifier into a buffer. fP"
- .ti -1c
- .RI "int fBsprint_realloc_timeticksfP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .RI "fIPrints a timetick variable into a buffer. fP"
- .ti -1c
- .RI "int fBsprint_realloc_hinted_integerfP (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)"
- .br
- .RI "fIPrints an integer according to the hint into a buffer. fP"
- .ti -1c
- .RI "int fBsprint_realloc_integerfP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .RI "fIPrints an integer into a buffer. fP"
- .ti -1c
- .RI "int fBsprint_realloc_uintegerfP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .RI "fIPrints an unsigned integer into a buffer. fP"
- .ti -1c
- .RI "int fBsprint_realloc_gaugefP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .RI "fIPrints a gauge value into a buffer. fP"
- .ti -1c
- .RI "int fBsprint_realloc_counterfP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .RI "fIPrints a counter value into a buffer. fP"
- .ti -1c
- .RI "int fBsprint_realloc_networkaddressfP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .RI "fIPrints a network address into a buffer. fP"
- .ti -1c
- .RI "int fBsprint_realloc_ipaddressfP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .RI "fIPrints an ip-address into a buffer. fP"
- .ti -1c
- .RI "int fBsprint_realloc_nullfP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .RI "fIPrints a null value into a buffer. fP"
- .ti -1c
- .RI "int fBsprint_realloc_bitstringfP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .RI "fIPrints a bit string into a buffer. fP"
- .ti -1c
- .RI "int fBsprint_realloc_nsapaddressfP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .ti -1c
- .RI "int fBsprint_realloc_badtypefP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .RI "fIFallback routine for a bad type, prints 'Variable has bad type' into a buffer. fP"
- .ti -1c
- .RI "int fBsprint_realloc_by_typefP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .RI "fIUniversal print routine, prints a variable into a buffer according to the variable type. fP"
- .ti -1c
- .RI "fBtreefP * fBget_tree_headfP (void)"
- .br
- .RI "fIRetrieves the tree head. fP"
- .ti -1c
- .RI "char * fBsnmp_out_toggle_optionsfP (char *options)"
- .br
- .ti -1c
- .RI "void fBsnmp_out_toggle_options_usagefP (const char *lead, FILE *outf)"
- .br
- .ti -1c
- .RI "char * fBsnmp_in_optionsfP (char *optarg, int argc, char *const *argv)"
- .br
- .ti -1c
- .RI "char * fBsnmp_in_toggle_optionsfP (char *options)"
- .br
- .ti -1c
- .RI "void fBsnmp_in_toggle_options_usagefP (const char *lead, FILE *outf)"
- .br
- .RI "fIPrints out a help usage for the in* toggle options. fP"
- .ti -1c
- .RI "void fBregister_mib_handlersfP (void)"
- .br
- .ti -1c
- .RI "void fBnetsnmp_set_mib_directoryfP (const char *dir)"
- .br
- .ti -1c
- .RI "char * fBnetsnmp_get_mib_directoryfP (void)"
- .br
- .ti -1c
- .RI "void fBnetsnmp_fixup_mib_directoryfP (void)"
- .br
- .ti -1c
- .RI "void fBinit_mibfP (void)"
- .br
- .RI "fIInitialises the mib reader. fP"
- .ti -1c
- .RI "void fBshutdown_mibfP (void)"
- .br
- .RI "fIUnloads all mibs. fP"
- .ti -1c
- .RI "void fBprint_mibfP (FILE *fp)"
- .br
- .RI "fIPrints the MIBs to the file fp. fP"
- .ti -1c
- .RI "void fBprint_ascii_dumpfP (FILE *fp)"
- .br
- .ti -1c
- .RI "void fBset_functionfP (struct fBtreefP *subtree)"
- .br
- .RI "fISet's the printing function printomat in a subtree according it's type. fP"
- .ti -1c
- .RI "int fBread_objidfP (const char *input, oid *output, size_t *out_len)"
- .br
- .RI "fIReads an object identifier from an input string into internal OID form. fP"
- .ti -1c
- .RI "void fBnetsnmp_sprint_realloc_objidfP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, int *buf_overflow, const oid *objid, size_t objidlen)"
- .br
- .ti -1c
- .RI "fBtreefP * fBnetsnmp_sprint_realloc_objid_treefP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, int *buf_overflow, const oid *objid, size_t objidlen)"
- .br
- .ti -1c
- .RI "int fBsprint_realloc_objidfP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const oid *objid, size_t objidlen)"
- .br
- .ti -1c
- .RI "int fBsnprint_objidfP (char *buf, size_t buf_len, const oid *objid, size_t objidlen)"
- .br
- .ti -1c
- .RI "void fBprint_objidfP (const oid *objid, size_t objidlen)"
- .br
- .RI "fIPrints an oid to stdout. fP"
- .ti -1c
- .RI "void fBfprint_objidfP (FILE *f, const oid *objid, size_t objidlen)"
- .br
- .RI "fIPrints an oid to a file descriptor. fP"
- .ti -1c
- .RI "int fBsprint_realloc_variablefP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const oid *objid, size_t objidlen, const fBnetsnmp_variable_listfP *fBvariablefP)"
- .br
- .ti -1c
- .RI "int fBsnprint_variablefP (char *buf, size_t buf_len, const oid *objid, size_t objidlen, const fBnetsnmp_variable_listfP *fBvariablefP)"
- .br
- .ti -1c
- .RI "void fBprint_variablefP (const oid *objid, size_t objidlen, const fBnetsnmp_variable_listfP *fBvariablefP)"
- .br
- .RI "fIPrints a variable to stdout. fP"
- .ti -1c
- .RI "void fBfprint_variablefP (FILE *f, const oid *objid, size_t objidlen, const fBnetsnmp_variable_listfP *fBvariablefP)"
- .br
- .RI "fIPrints a variable to a file descriptor. fP"
- .ti -1c
- .RI "int fBsprint_realloc_valuefP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const oid *objid, size_t objidlen, const fBnetsnmp_variable_listfP *fBvariablefP)"
- .br
- .ti -1c
- .RI "int fBsnprint_valuefP (char *buf, size_t buf_len, const oid *objid, size_t objidlen, const fBnetsnmp_variable_listfP *fBvariablefP)"
- .br
- .ti -1c
- .RI "void fBprint_valuefP (const oid *objid, size_t objidlen, const fBnetsnmp_variable_listfP *fBvariablefP)"
- .br
- .ti -1c
- .RI "void fBfprint_valuefP (FILE *f, const oid *objid, size_t objidlen, const fBnetsnmp_variable_listfP *fBvariablefP)"
- .br
- .ti -1c
- .RI "int fBbuild_oid_segmentfP (fBnetsnmp_variable_listfP *var)"
- .br
- .RI "fITakes the value in VAR and turns it into an OID segment in var->name. fP"
- .ti -1c
- .RI "int fBbuild_oid_noallocfP (oid *in, size_t in_len, size_t *out_len, oid *prefix, size_t prefix_len, fBnetsnmp_variable_listfP *indexes)"
- .br
- .ti -1c
- .RI "int fBbuild_oidfP (oid **out, size_t *out_len, oid *prefix, size_t prefix_len, fBnetsnmp_variable_listfP *indexes)"
- .br
- .ti -1c
- .RI "int fBparse_oid_indexesfP (oid *oidIndex, size_t oidLen, fBnetsnmp_variable_listfP *data)"
- .br
- .ti -1c
- .RI "int fBparse_one_oid_indexfP (oid **oidStart, size_t *oidLen, fBnetsnmp_variable_listfP *data, int complete)"
- .br
- .ti -1c
- .RI "int fBdump_realloc_oid_to_inetaddressfP (const int addr_type, const oid *objid, size_t objidlen, u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, char quotechar)"
- .br
- .ti -1c
- .RI "int fBdump_realloc_oid_to_stringfP (const oid *objid, size_t objidlen, u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, char quotechar)"
- .br
- .ti -1c
- .RI "fBtreefP * fBget_treefP (const oid *objid, size_t objidlen, struct fBtreefP *subtree)"
- .br
- .RI "fIClone of get_symbol that doesn't take a buffer argument. fP"
- .ti -1c
- .RI "void fBprint_descriptionfP (oid *objid, size_t objidlen, int width)"
- .br
- .RI "fIPrints on oid description on stdout. fP"
- .ti -1c
- .RI "void fBfprint_descriptionfP (FILE *f, oid *objid, size_t objidlen, int width)"
- .br
- .RI "fIPrints on oid description into a file descriptor. fP"
- .ti -1c
- .RI "int fBsnprint_descriptionfP (char *buf, size_t buf_len, oid *objid, size_t objidlen, int width)"
- .br
- .ti -1c
- .RI "int fBsprint_realloc_descriptionfP (u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, oid *objid, size_t objidlen, int width)"
- .br
- .ti -1c
- .RI "int fBget_module_nodefP (const char *fname, const char *fBmodulefP, oid *objid, size_t *objidlen)"
- .br
- .ti -1c
- .RI "int fBget_wild_nodefP (const char *name, oid *objid, size_t *objidlen)"
- .br
- .ti -1c
- .RI "int fBget_nodefP (const char *name, oid *objid, size_t *objidlen)"
- .br
- .ti -1c
- .RI "void fBclear_tree_flagsfP (register struct fBtreefP *tp)"
- .br
- .ti -1c
- .RI "void fBprint_oid_reportfP (FILE *fp)"
- .br
- .ti -1c
- .RI "void fBprint_oid_report_enable_labeledoidfP (void)"
- .br
- .ti -1c
- .RI "void fBprint_oid_report_enable_oidfP (void)"
- .br
- .ti -1c
- .RI "void fBprint_oid_report_enable_suffixfP (void)"
- .br
- .ti -1c
- .RI "void fBprint_oid_report_enable_symbolicfP (void)"
- .br
- .ti -1c
- .RI "char * fBuptime_stringfP (u_long timeticks, char *buf)"
- .br
- .RI "fIConverts timeticks to hours, minutes, seconds string. fP"
- .ti -1c
- .RI "oid * fBsnmp_parse_oidfP (const char *argv, oid *root, size_t *rootlen)"
- .br
- .RI "fIGiven a string, parses an oid out of it (if possible). fP"
- .ti -1c
- .RI "const char * fBparse_octet_hintfP (const char *hint, const char *value, unsigned char **new_val, int *new_val_len)"
- .br
- .ti -1c
- .RI "u_char fBmib_to_asn_typefP (int mib_type)"
- .br
- .ti -1c
- .RI "int fBnetsnmp_str2oidfP (const char *S, oid *O, int L)"
- .br
- .RI "fIConverts a string to its OID form. fP"
- .ti -1c
- .RI "int fBnetsnmp_oid2charsfP (char *C, int L, const oid *O)"
- .br
- .RI "fIConverts an OID to its character form. fP"
- .ti -1c
- .RI "int fBnetsnmp_oid2strfP (char *S, int L, oid *O)"
- .br
- .RI "fIConverts an OID to its string form. fP"
- .ti -1c
- .RI "int fBsnprint_by_typefP (char *buf, size_t buf_len, fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .ti -1c
- .RI "int fBsnprint_hexstringfP (char *buf, size_t buf_len, const u_char *cp, size_t len)"
- .br
- .ti -1c
- .RI "int fBsnprint_asciistringfP (char *buf, size_t buf_len, const u_char *cp, size_t len)"
- .br
- .ti -1c
- .RI "int fBsnprint_octet_stringfP (char *buf, size_t buf_len, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .ti -1c
- .RI "int fBsnprint_opaquefP (char *buf, size_t buf_len, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .ti -1c
- .RI "int fBsnprint_object_identifierfP (char *buf, size_t buf_len, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .ti -1c
- .RI "int fBsnprint_timeticksfP (char *buf, size_t buf_len, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .ti -1c
- .RI "int fBsnprint_hinted_integerfP (char *buf, size_t buf_len, long val, const char *hint, const char *units)"
- .br
- .ti -1c
- .RI "int fBsnprint_integerfP (char *buf, size_t buf_len, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .ti -1c
- .RI "int fBsnprint_uintegerfP (char *buf, size_t buf_len, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .ti -1c
- .RI "int fBsnprint_gaugefP (char *buf, size_t buf_len, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .ti -1c
- .RI "int fBsnprint_counterfP (char *buf, size_t buf_len, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .ti -1c
- .RI "int fBsnprint_networkaddressfP (char *buf, size_t buf_len, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .ti -1c
- .RI "int fBsnprint_ipaddressfP (char *buf, size_t buf_len, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .ti -1c
- .RI "int fBsnprint_nullfP (char *buf, size_t buf_len, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .ti -1c
- .RI "int fBsnprint_bitstringfP (char *buf, size_t buf_len, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .ti -1c
- .RI "int fBsnprint_nsapaddressfP (char *buf, size_t buf_len, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .ti -1c
- .RI "int fBsnprint_counter64fP (char *buf, size_t buf_len, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .ti -1c
- .RI "int fBsnprint_badtypefP (char *buf, size_t buf_len, const fBnetsnmp_variable_listfP *var, const struct fBenum_listfP *enums, const char *hint, const char *units)"
- .br
- .in -1c
- .SS "Variables"
- .in +1c
- .ti -1c
- .RI "fBtreefP * fBtree_headfP"
- .br
- .ti -1c
- .RI "fBtreefP * fBMibfP"
- .br
- .ti -1c
- .RI "oid fBRFC1213_MIBfP [] = { 1, 3, 6, 1, 2, 1 }"
- .br
- .ti -1c
- .RI "int fB_PrefixList::lenfP"
- .br
- .ti -1c
- .RI "fBPrefixListfP fBmib_prefixesfP []"
- .br
- .ti -1c
- .RI "int fBparse_hints::repeatfP"
- .br
- .ti -1c
- .RI "int fBparse_hints::formatfP"
- .br
- .ti -1c
- .RI "int fBparse_hints::separatorfP"
- .br
- .ti -1c
- .RI "int fBparse_hints::terminatorfP"
- .br
- .ti -1c
- .RI "unsigned char * fBparse_hints::resultfP"
- .br
- .ti -1c
- .RI "int fBparse_hints::result_maxfP"
- .br
- .ti -1c
- .RI "int fBparse_hints::result_lenfP"
- .br
- .in -1c
- .SH "Function Documentation"
- .PP
- .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)"
- .PP
- Prints a hexadecimal string into a buffer.
- .PP
- The characters pointed by *cp are encoded as hexadecimal string.
- .PP
- If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
- .PP
- fBParameters:fP
- .RS 4
- fIbuffP address of the buffer to print to.
- .br
- fIbuf_lenfP address to an integer containing the size of buf.
- .br
- fIout_lenfP incremented by the number of characters printed.
- .br
- fIallow_reallocfP if not zero reallocate the buffer to fit the needed size.
- .br
- fIcpfP the array of characters to encode.
- .br
- fIlenfP the array length of cp.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.)
- .RE
- .PP
- .PP
- Definition at line 271 of file mib.c.
- .PP
- References netsnmp_ds_get_boolean(), and snmp_realloc().
- .PP
- Referenced by sprint_realloc_hexstring().
- .SS "int build_oid (oid ** out, size_t * out_len, oid * prefix, size_t prefix_len, fBnetsnmp_variable_listfP * indexes)"
- .PP
- xxx-rks: should free previous value?
- .PP
- Definition at line 3593 of file mib.c.
- .PP
- References build_oid_noalloc(), and snmp_clone_mem().
- .PP
- Referenced by netsnmp_table_build_oid(), and netsnmp_table_data_generate_index_oid().
- .SS "int build_oid_segment (fBnetsnmp_variable_listfP * var)"
- .PP
- Takes the value in VAR and turns it into an OID segment in var->name.
- .PP
- fBParameters:fP
- .RS 4
- fIvarfP The variable.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- SNMPERR_SUCCESS or SNMPERR_GENERR
- .RE
- .PP
- .PP
- Definition at line 3457 of file mib.c.
- .PP
- 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.
- .PP
- Referenced by build_oid_noalloc().
- .SS "void fprint_description (FILE * f, oid * objid, size_t objidlen, int width)"
- .PP
- Prints on oid description into a file descriptor.
- .PP
- fBParameters:fP
- .RS 4
- fIffP The file descriptor to print to.
- .br
- fIobjidfP The object identifier.
- .br
- fIobjidlenfP The object id length.
- .br
- fIwidthfP Number of subidentifiers.
- .RE
- .PP
- .PP
- Definition at line 4439 of file mib.c.
- .PP
- References NULL, SNMP_FREE, and sprint_realloc_description().
- .PP
- Referenced by print_description().
- .SS "void fprint_objid (FILE * f, const oid * objid, size_t objidlen)"
- .PP
- Prints an oid to a file descriptor.
- .PP
- fBParameters:fP
- .RS 4
- fIffP The file descriptor to print to.
- .br
- fIobjidfP The oid to print
- .br
- fIobjidlenfP The length of oidid.
- .RE
- .PP
- .PP
- Definition at line 3185 of file mib.c.
- .PP
- References netsnmp_sprint_realloc_objid_tree(), NULL, and SNMP_FREE.
- .PP
- Referenced by print_objid().
- .SS "void fprint_variable (FILE * f, const oid * objid, size_t objidlen, const fBnetsnmp_variable_listfP * variable)"
- .PP
- Prints a variable to a file descriptor.
- .PP
- fBParameters:fP
- .RS 4
- fIffP The file descriptor to print to.
- .br
- fIobjidfP The object id.
- .br
- fIobjidlenfP The length of teh object id.
- .br
- fIvariablefP The variable to print.
- .RE
- .PP
- .PP
- Definition at line 3332 of file mib.c.
- .PP
- References NULL, SNMP_FREE, and sprint_realloc_variable().
- .PP
- Referenced by print_variable().
- .SS "struct fBtreefP* get_tree (const oid * objid, size_t objidlen, struct fBtreefP * subtree)"
- .PP
- Clone of get_symbol that doesn't take a buffer argument.
- .PP
- fBSee also:fP
- .RS 4
- get_symbol
- .RE
- .PP
- .PP
- Definition at line 4394 of file mib.c.
- .PP
- References tree::child_list, get_tree(), tree::next_peer, NULL, and tree::subid.
- .PP
- Referenced by get_tree(), netsnmp_config_parse_table_set(), snmp_add_var(), sprint_realloc_description(), and sprint_realloc_value().
- .SS "struct fBtreefP* get_tree_head (void)"
- .PP
- Retrieves the tree head.
- .PP
- fBReturns:fP
- .RS 4
- the tree head.
- .RE
- .PP
- .PP
- Definition at line 2051 of file mib.c.
- .PP
- Referenced by netsnmp_config_parse_table_set(), and snmp_add_var().
- .SS "int get_wild_node (const char * name, oid * objid, size_t * objidlen)"
- .PP
- fBSee also:fP
- .RS 4
- comments on find_best_tree_node for usage after first time.
- .RE
- .PP
- .PP
- Definition at line 5444 of file mib.c.
- .PP
- References get_node(), tree::label, and NULL.
- .PP
- Referenced by snmp_parse_oid().
- .SS "void init_mib (void)"
- .PP
- Initialises the mib reader.
- .PP
- Reads in all settings from the environment.
- .PP
- Definition at line 2563 of file mib.c.
- .PP
- References tree::child_list, tree::label, _PrefixList::len, netsnmp_fixup_mib_directory(), netsnmp_get_mib_directory(), netsnmp_getenv(), NULL, SNMP_FREE, and _PrefixList::str.
- .PP
- Referenced by init_snmp().
- .SS "void netsnmp_fixup_mib_directory (void)"
- .PP
- swap in the new value and repeat
- .PP
- Definition at line 2516 of file mib.c.
- .PP
- References netsnmp_get_mib_directory(), netsnmp_getenv(), netsnmp_set_mib_directory(), NULL, and SNMP_FREE.
- .PP
- Referenced by init_mib().
- .SS "char* netsnmp_get_mib_directory (void)"
- .PP
- Check if the environment variable is set
- .PP
- Not set use hard coded path
- .PP
- Definition at line 2469 of file mib.c.
- .PP
- References netsnmp_ds_get_string(), netsnmp_getenv(), netsnmp_set_mib_directory(), and NULL.
- .PP
- Referenced by init_mib(), and netsnmp_fixup_mib_directory().
- .SS "int netsnmp_oid2chars (char * C, int L, const oid * O)"
- .PP
- Converts an OID to its character form.
- .PP
- in example 5 . 1 . 2 . 3 . 4 . 5 = 12345
- .PP
- fBParameters:fP
- .RS 4
- fICfP The character buffer.
- .br
- fILfP The length of the buffer.
- .br
- fIOfP The oid.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- 0 on Sucess, 1 on failure.
- .RE
- .PP
- length
- .PP
- Definition at line 6187 of file mib.c.
- .PP
- Referenced by netsnmp_oid2str().
- .SS "int netsnmp_oid2str (char * S, int L, oid * O)"
- .PP
- Converts an OID to its string form.
- .PP
- in example 5 . 'h' . 'e' . 'l' . 'l' . 'o' = 'hello\0' (null terminated)
- .PP
- fBParameters:fP
- .RS 4
- fISfP The character string buffer.
- .br
- fILfP The length of the string buffer.
- .br
- fIOfP The oid.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- 0 on Sucess, 1 on failure.
- .RE
- .PP
- .PP
- Definition at line 6215 of file mib.c.
- .PP
- References netsnmp_oid2chars().
- .SS "void netsnmp_set_mib_directory (const char * dir)"
- .PP
- New dir starts with '+', thus we add it.
- .PP
- If dir starts with '+' skip '+' it.
- .PP
- set_string calls strdup, so if we allocated memory, free it
- .PP
- Definition at line 2414 of file mib.c.
- .PP
- References netsnmp_ds_get_string(), netsnmp_ds_set_string(), NULL, and SNMP_FREE.
- .PP
- Referenced by netsnmp_fixup_mib_directory(), and netsnmp_get_mib_directory().
- .SS "int netsnmp_str2oid (const char * S, oid * O, int L)"
- .PP
- Converts a string to its OID form.
- .PP
- in example 'hello' = 5 . 'h' . 'e' . 'l' . 'l' . 'o'
- .PP
- fBParameters:fP
- .RS 4
- fISfP The string.
- .br
- fIOfP The oid.
- .br
- fILfP The length of the oid.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- 0 on Sucess, 1 on failure.
- .RE
- .PP
- .PP
- Definition at line 6152 of file mib.c.
- .SS "void print_description (oid * objid, size_t objidlen, int width)"
- .PP
- Prints on oid description on stdout.
- .PP
- fBSee also:fP
- .RS 4
- fBfprint_descriptionfP
- .RE
- .PP
- .PP
- Definition at line 4423 of file mib.c.
- .PP
- References fprint_description().
- .SS "void print_mib (FILE * fp)"
- .PP
- Prints the MIBs to the file fp.
- .PP
- fBParameters:fP
- .RS 4
- fIfpfP The file descriptor to print to.
- .RE
- .PP
- .PP
- Definition at line 2766 of file mib.c.
- .SS "void print_objid (const oid * objid, size_t objidlen)"
- .PP
- Prints an oid to stdout.
- .PP
- fBParameters:fP
- .RS 4
- fIobjidfP The oid to print
- .br
- fIobjidlenfP The length of oidid.
- .RE
- .PP
- .PP
- Definition at line 3171 of file mib.c.
- .PP
- References fprint_objid().
- .SS "void print_variable (const oid * objid, size_t objidlen, const fBnetsnmp_variable_listfP * variable)"
- .PP
- Prints a variable to stdout.
- .PP
- fBParameters:fP
- .RS 4
- fIobjidfP The object id.
- .br
- fIobjidlenfP The length of teh object id.
- .br
- fIvariablefP The variable to print.
- .RE
- .PP
- .PP
- Definition at line 3316 of file mib.c.
- .PP
- References fprint_variable().
- .SS "int read_objid (const char * input, oid * output, size_t * out_len)"
- .PP
- Reads an object identifier from an input string into internal OID form.
- .PP
- When called, out_len must hold the maximum length of the output array.
- .PP
- fBParameters:fP
- .RS 4
- fIinputfP the input string.
- .br
- fIoutputfP the oid wirte.
- .br
- fIout_lenfP number of subid's in output.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- 1 if successful.
- .RE
- .PP
- 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.
- .PP
- Definition at line 2864 of file mib.c.
- .PP
- References get_node(), netsnmp_ds_get_boolean(), NULL, and SNMP_FREE.
- .PP
- Referenced by read_config_read_objid(), and snmp_parse_oid().
- .SS "void set_function (struct fBtreefP * subtree)"
- .PP
- Set's the printing function printomat in a subtree according it's type.
- .PP
- fBParameters:fP
- .RS 4
- fIsubtreefP The subtree to set.
- .RE
- .PP
- .PP
- Definition at line 2787 of file mib.c.
- .PP
- 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.
- .SS "void shutdown_mib (void)"
- .PP
- Unloads all mibs.
- .PP
- Definition at line 2743 of file mib.c.
- .PP
- References tree::label, NULL, and SNMP_FREE.
- .PP
- Referenced by snmp_shutdown().
- .SS "void snmp_in_toggle_options_usage (const char * lead, FILE * outf)"
- .PP
- Prints out a help usage for the in* toggle options.
- .PP
- fBParameters:fP
- .RS 4
- fIleadfP The lead to print for every line.
- .br
- fIoutffP The file descriptor to write to.
- .RE
- .PP
- .PP
- Definition at line 2326 of file mib.c.
- .SS "oid* snmp_parse_oid (const char * argv, oid * root, size_t * rootlen)"
- .PP
- Given a string, parses an oid out of it (if possible).
- .PP
- 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.
- .PP
- fBParameters:fP
- .RS 4
- fIargvfP The OID to string parse
- .br
- fIrootfP An OID array where the results are stored.
- .br
- fIrootlenfP The max length of the array going in and the data length coming out.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- The root oid pointer if successful, or NULL otherwise.
- .RE
- .PP
- .PP
- Definition at line 5758 of file mib.c.
- .PP
- References clear_tree_flags(), get_node(), get_wild_node(), netsnmp_ds_get_boolean(), netsnmp_ds_get_string(), NULL, and read_objid().
- .PP
- Referenced by netsnmp_config_parse_table_set(), and snmp_add_var().
- .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)"
- .PP
- Prints an ascii string into a buffer.
- .PP
- The characters pointed by *cp are encoded as an ascii string.
- .PP
- If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
- .PP
- fBParameters:fP
- .RS 4
- fIbuffP address of the buffer to print to.
- .br
- fIbuf_lenfP address to an integer containing the size of buf.
- .br
- fIout_lenfP incremented by the number of characters printed.
- .br
- fIallow_reallocfP if not zero reallocate the buffer to fit the needed size.
- .br
- fIcpfP the array of characters to encode.
- .br
- fIlenfP the array length of cp.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.)
- .RE
- .PP
- .PP
- Definition at line 367 of file mib.c.
- .PP
- References snmp_realloc().
- .PP
- Referenced by asn_build_string(), asn_parse_string(), snprint_asciistring(), and sprint_realloc_octet_string().
- .SS "int sprint_realloc_badtype (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const fBnetsnmp_variable_listfP * var, const struct fBenum_listfP * enums, const char * hint, const char * units)"
- .PP
- Fallback routine for a bad type, prints 'Variable has bad type' into a buffer.
- .PP
- If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
- .PP
- fBParameters:fP
- .RS 4
- fIbuffP Address of the buffer to print to.
- .br
- fIbuf_lenfP Address to an integer containing the size of buf.
- .br
- fIout_lenfP Incremented by the number of characters printed.
- .br
- fIallow_reallocfP if not zero reallocate the buffer to fit the needed size.
- .br
- fIvarfP The variable to encode.
- .br
- fIenumsfP The enumeration ff this variable is enumerated. may be NULL.
- .br
- fIhintfP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL.
- .br
- fIunitsfP Contents of the UNITS clause of the MIB. may be NULL.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.)
- .RE
- .PP
- .PP
- Definition at line 1936 of file mib.c.
- .PP
- References snmp_strcat().
- .PP
- Referenced by snprint_badtype(), and sprint_realloc_by_type().
- .SS "int sprint_realloc_bitstring (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const fBnetsnmp_variable_listfP * var, const struct fBenum_listfP * enums, const char * hint, const char * units)"
- .PP
- Prints a bit string into a buffer.
- .PP
- If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
- .PP
- fBParameters:fP
- .RS 4
- fIbuffP Address of the buffer to print to.
- .br
- fIbuf_lenfP Address to an integer containing the size of buf.
- .br
- fIout_lenfP Incremented by the number of characters printed.
- .br
- fIallow_reallocfP if not zero reallocate the buffer to fit the needed size.
- .br
- fIvarfP The variable to encode.
- .br
- fIenumsfP The enumeration ff this variable is enumerated. may be NULL.
- .br
- fIhintfP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL.
- .br
- fIunitsfP Contents of the UNITS clause of the MIB. may be NULL.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.)
- .RE
- .PP
- .PP
- Definition at line 1797 of file mib.c.
- .PP
- 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.
- .PP
- Referenced by set_function(), snprint_bitstring(), and sprint_realloc_by_type().
- .SS "int sprint_realloc_by_type (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const fBnetsnmp_variable_listfP * var, const struct fBenum_listfP * enums, const char * hint, const char * units)"
- .PP
- Universal print routine, prints a variable into a buffer according to the variable type.
- .PP
- If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
- .PP
- fBParameters:fP
- .RS 4
- fIbuffP Address of the buffer to print to.
- .br
- fIbuf_lenfP Address to an integer containing the size of buf.
- .br
- fIout_lenfP Incremented by the number of characters printed.
- .br
- fIallow_reallocfP if not zero reallocate the buffer to fit the needed size.
- .br
- fIvarfP The variable to encode.
- .br
- fIenumsfP The enumeration ff this variable is enumerated. may be NULL.
- .br
- fIhintfP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL.
- .br
- fIunitsfP Contents of the UNITS clause of the MIB. may be NULL.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.)
- .RE
- .PP
- .PP
- Definition at line 1971 of file mib.c.
- .PP
- 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.
- .PP
- 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().
- .SS "int sprint_realloc_counter (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const fBnetsnmp_variable_listfP * var, const struct fBenum_listfP * enums, const char * hint, const char * units)"
- .PP
- Prints a counter value into a buffer.
- .PP
- If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
- .PP
- fBParameters:fP
- .RS 4
- fIbuffP Address of the buffer to print to.
- .br
- fIbuf_lenfP Address to an integer containing the size of buf.
- .br
- fIout_lenfP Incremented by the number of characters printed.
- .br
- fIallow_reallocfP if not zero reallocate the buffer to fit the needed size.
- .br
- fIvarfP The variable to encode.
- .br
- fIenumsfP The enumeration ff this variable is enumerated. may be NULL.
- .br
- fIhintfP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL.
- .br
- fIunitsfP Contents of the UNITS clause of the MIB. may be NULL.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.)
- .RE
- .PP
- .PP
- Definition at line 1564 of file mib.c.
- .PP
- References netsnmp_vardata::integer, netsnmp_ds_get_boolean(), NULL, snmp_strcat(), sprint_realloc_by_type(), variable_list::type, and variable_list::val.
- .PP
- Referenced by set_function(), snprint_counter(), and sprint_realloc_by_type().
- .SS "int sprint_realloc_counter64 (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const fBnetsnmp_variable_listfP * var, const struct fBenum_listfP * enums, const char * hint, const char * units)"
- .PP
- Prints a counter into a buffer.
- .PP
- The variable var is encoded as a counter value.
- .PP
- If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
- .PP
- fBParameters:fP
- .RS 4
- fIbuffP Address of the buffer to print to.
- .br
- fIbuf_lenfP Address to an integer containing the size of buf.
- .br
- fIout_lenfP Incremented by the number of characters printed.
- .br
- fIallow_reallocfP if not zero reallocate the buffer to fit the needed size.
- .br
- fIvarfP The variable to encode.
- .br
- fIenumsfP The enumeration ff this variable is enumerated. may be NULL.
- .br
- fIhintfP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL.
- .br
- fIunitsfP Contents of the UNITS clause of the MIB. may be NULL.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.)
- .RE
- .PP
- .PP
- Definition at line 869 of file mib.c.
- .PP
- References netsnmp_vardata::counter64, netsnmp_ds_get_boolean(), NULL, snmp_strcat(), sprint_realloc_by_type(), variable_list::type, and variable_list::val.
- .PP
- Referenced by set_function(), snprint_counter64(), sprint_realloc_by_type(), and sprint_realloc_opaque().
- .SS "int sprint_realloc_gauge (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const fBnetsnmp_variable_listfP * var, const struct fBenum_listfP * enums, const char * hint, const char * units)"
- .PP
- Prints a gauge value into a buffer.
- .PP
- If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
- .PP
- fBParameters:fP
- .RS 4
- fIbuffP Address of the buffer to print to.
- .br
- fIbuf_lenfP Address to an integer containing the size of buf.
- .br
- fIout_lenfP Incremented by the number of characters printed.
- .br
- fIallow_reallocfP if not zero reallocate the buffer to fit the needed size.
- .br
- fIvarfP The variable to encode.
- .br
- fIenumsfP The enumeration ff this variable is enumerated. may be NULL.
- .br
- fIhintfP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL.
- .br
- fIunitsfP Contents of the UNITS clause of the MIB. may be NULL.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.)
- .RE
- .PP
- .PP
- Definition at line 1491 of file mib.c.
- .PP
- 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.
- .PP
- Referenced by set_function(), snprint_gauge(), and sprint_realloc_by_type().
- .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)"
- .PP
- Prints an integer according to the hint into a buffer.
- .PP
- If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
- .PP
- fBParameters:fP
- .RS 4
- fIbuffP Address of the buffer to print to.
- .br
- fIbuf_lenfP Address to an integer containing the size of buf.
- .br
- fIout_lenfP Incremented by the number of characters printed.
- .br
- fIallow_reallocfP if not zero reallocate the buffer to fit the needed size.
- .br
- fIvarfP The variable to encode.
- .br
- fIenumsfP The enumeration ff this variable is enumerated. may be NULL.
- .br
- fIhintfP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may _NOT_ be NULL.
- .br
- fIunitsfP Contents of the UNITS clause of the MIB. may be NULL.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.)
- .RE
- .PP
- .PP
- Definition at line 1217 of file mib.c.
- .PP
- References snmp_strcat().
- .PP
- Referenced by snprint_hinted_integer(), sprint_realloc_gauge(), sprint_realloc_integer(), and sprint_realloc_uinteger().
- .SS "int sprint_realloc_integer (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const fBnetsnmp_variable_listfP * var, const struct fBenum_listfP * enums, const char * hint, const char * units)"
- .PP
- Prints an integer into a buffer.
- .PP
- If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
- .PP
- fBParameters:fP
- .RS 4
- fIbuffP Address of the buffer to print to.
- .br
- fIbuf_lenfP Address to an integer containing the size of buf.
- .br
- fIout_lenfP Incremented by the number of characters printed.
- .br
- fIallow_reallocfP if not zero reallocate the buffer to fit the needed size.
- .br
- fIvarfP The variable to encode.
- .br
- fIenumsfP The enumeration ff this variable is enumerated. may be NULL.
- .br
- fIhintfP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL.
- .br
- fIunitsfP Contents of the UNITS clause of the MIB. may be NULL.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.)
- .RE
- .PP
- .PP
- Definition at line 1291 of file mib.c.
- .PP
- References netsnmp_vardata::integer, enum_list::label, netsnmp_ds_get_boolean(), enum_list::next, NULL, snmp_strcat(), sprint_realloc_by_type(), sprint_realloc_hinted_integer(), variable_list::type, variable_list::val, and enum_list::value.
- .PP
- Referenced by set_function(), snprint_integer(), and sprint_realloc_by_type().
- .SS "int sprint_realloc_ipaddress (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const fBnetsnmp_variable_listfP * var, const struct fBenum_listfP * enums, const char * hint, const char * units)"
- .PP
- Prints an ip-address into a buffer.
- .PP
- If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
- .PP
- fBParameters:fP
- .RS 4
- fIbuffP Address of the buffer to print to.
- .br
- fIbuf_lenfP Address to an integer containing the size of buf.
- .br
- fIout_lenfP Incremented by the number of characters printed.
- .br
- fIallow_reallocfP if not zero reallocate the buffer to fit the needed size.
- .br
- fIvarfP The variable to encode.
- .br
- fIenumsfP The enumeration ff this variable is enumerated. may be NULL.
- .br
- fIhintfP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL.
- .br
- fIunitsfP Contents of the UNITS clause of the MIB. may be NULL.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.)
- .RE
- .PP
- .PP
- Definition at line 1693 of file mib.c.
- .PP
- References netsnmp_ds_get_boolean(), NULL, snmp_realloc(), snmp_strcat(), sprint_realloc_by_type(), netsnmp_vardata::string, variable_list::type, and variable_list::val.
- .PP
- Referenced by set_function(), snprint_ipaddress(), and sprint_realloc_by_type().
- .SS "int sprint_realloc_networkaddress (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const fBnetsnmp_variable_listfP * var, const struct fBenum_listfP * enums, const char * hint, const char * units)"
- .PP
- Prints a network address into a buffer.
- .PP
- If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
- .PP
- fBParameters:fP
- .RS 4
- fIbuffP Address of the buffer to print to.
- .br
- fIbuf_lenfP Address to an integer containing the size of buf.
- .br
- fIout_lenfP Incremented by the number of characters printed.
- .br
- fIallow_reallocfP if not zero reallocate the buffer to fit the needed size.
- .br
- fIvarfP The variable to encode.
- .br
- fIenumsfP The enumeration ff this variable is enumerated. may be NULL.
- .br
- fIhintfP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL.
- .br
- fIunitsfP Contents of the UNITS clause of the MIB. may be NULL.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.)
- .RE
- .PP
- .PP
- Definition at line 1627 of file mib.c.
- .PP
- 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.
- .PP
- Referenced by set_function(), and snprint_networkaddress().
- .SS "int sprint_realloc_null (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const fBnetsnmp_variable_listfP * var, const struct fBenum_listfP * enums, const char * hint, const char * units)"
- .PP
- Prints a null value into a buffer.
- .PP
- If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
- .PP
- fBParameters:fP
- .RS 4
- fIbuffP Address of the buffer to print to.
- .br
- fIbuf_lenfP Address to an integer containing the size of buf.
- .br
- fIout_lenfP Incremented by the number of characters printed.
- .br
- fIallow_reallocfP if not zero reallocate the buffer to fit the needed size.
- .br
- fIvarfP The variable to encode.
- .br
- fIenumsfP The enumeration ff this variable is enumerated. may be NULL.
- .br
- fIhintfP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL.
- .br
- fIunitsfP Contents of the UNITS clause of the MIB. may be NULL.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.)
- .RE
- .PP
- .PP
- Definition at line 1753 of file mib.c.
- .PP
- References netsnmp_ds_get_boolean(), NULL, snmp_strcat(), sprint_realloc_by_type(), and variable_list::type.
- .PP
- Referenced by set_function(), snprint_null(), and sprint_realloc_by_type().
- .SS "int sprint_realloc_object_identifier (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const fBnetsnmp_variable_listfP * var, const struct fBenum_listfP * enums, const char * hint, const char * units)"
- .PP
- Prints an object identifier into a buffer.
- .PP
- If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
- .PP
- fBParameters:fP
- .RS 4
- fIbuffP Address of the buffer to print to.
- .br
- fIbuf_lenfP Address to an integer containing the size of buf.
- .br
- fIout_lenfP Incremented by the number of characters printed.
- .br
- fIallow_reallocfP if not zero reallocate the buffer to fit the needed size.
- .br
- fIvarfP The variable to encode.
- .br
- fIenumsfP The enumeration ff this variable is enumerated. may be NULL.
- .br
- fIhintfP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL.
- .br
- fIunitsfP Contents of the UNITS clause of the MIB. may be NULL.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.)
- .RE
- .PP
- .PP
- Definition at line 1073 of file mib.c.
- .PP
- 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.
- .PP
- Referenced by set_function(), snprint_object_identifier(), and sprint_realloc_by_type().
- .SS "int sprint_realloc_octet_string (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const fBnetsnmp_variable_listfP * var, const struct fBenum_listfP * enums, const char * hint, const char * units)"
- .PP
- Prints an octet string into a buffer.
- .PP
- The variable var is encoded as octet string.
- .PP
- If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
- .PP
- fBParameters:fP
- .RS 4
- fIbuffP Address of the buffer to print to.
- .br
- fIbuf_lenfP Address to an integer containing the size of buf.
- .br
- fIout_lenfP Incremented by the number of characters printed.
- .br
- fIallow_reallocfP if not zero reallocate the buffer to fit the needed size.
- .br
- fIvarfP The variable to encode.
- .br
- fIenumsfP The enumeration ff this variable is enumerated. may be NULL.
- .br
- fIhintfP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL.
- .br
- fIunitsfP Contents of the UNITS clause of the MIB. may be NULL.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.)
- .RE
- .PP
- .PP
- Definition at line 427 of file mib.c.
- .PP
- References netsnmp_ds_get_boolean(), netsnmp_ds_get_int(), NULL, snmp_realloc(), snmp_strcat(), 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.
- .PP
- Referenced by set_function(), snprint_octet_string(), sprint_realloc_by_type(), and sprint_realloc_octet_string().
- .SS "int sprint_realloc_opaque (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const fBnetsnmp_variable_listfP * var, const struct fBenum_listfP * enums, const char * hint, const char * units)"
- .PP
- Prints an object identifier into a buffer.
- .PP
- If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
- .PP
- fBParameters:fP
- .RS 4
- fIbuffP Address of the buffer to print to.
- .br
- fIbuf_lenfP Address to an integer containing the size of buf.
- .br
- fIout_lenfP Incremented by the number of characters printed.
- .br
- fIallow_reallocfP if not zero reallocate the buffer to fit the needed size.
- .br
- fIvarfP The variable to encode.
- .br
- fIenumsfP The enumeration ff this variable is enumerated. may be NULL.
- .br
- fIhintfP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL.
- .br
- fIunitsfP Contents of the UNITS clause of the MIB. may be NULL.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.)
- .RE
- .PP
- .PP
- Definition at line 983 of file mib.c.
- .PP
- References netsnmp_ds_get_boolean(), NULL, 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.
- .PP
- Referenced by set_function(), snprint_opaque(), and sprint_realloc_by_type().
- .SS "int sprint_realloc_timeticks (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const fBnetsnmp_variable_listfP * var, const struct fBenum_listfP * enums, const char * hint, const char * units)"
- .PP
- Prints a timetick variable into a buffer.
- .PP
- If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
- .PP
- fBParameters:fP
- .RS 4
- fIbuffP Address of the buffer to print to.
- .br
- fIbuf_lenfP Address to an integer containing the size of buf.
- .br
- fIout_lenfP Incremented by the number of characters printed.
- .br
- fIallow_reallocfP if not zero reallocate the buffer to fit the needed size.
- .br
- fIvarfP The variable to encode.
- .br
- fIenumsfP The enumeration ff this variable is enumerated. may be NULL.
- .br
- fIhintfP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL.
- .br
- fIunitsfP Contents of the UNITS clause of the MIB. may be NULL.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.)
- .RE
- .PP
- .PP
- Definition at line 1143 of file mib.c.
- .PP
- References netsnmp_vardata::integer, netsnmp_ds_get_boolean(), NULL, snmp_strcat(), sprint_realloc_by_type(), variable_list::type, and variable_list::val.
- .PP
- Referenced by set_function(), snprint_timeticks(), and sprint_realloc_by_type().
- .SS "int sprint_realloc_uinteger (u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const fBnetsnmp_variable_listfP * var, const struct fBenum_listfP * enums, const char * hint, const char * units)"
- .PP
- Prints an unsigned integer into a buffer.
- .PP
- If allow_realloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.)
- .PP
- fBParameters:fP
- .RS 4
- fIbuffP Address of the buffer to print to.
- .br
- fIbuf_lenfP Address to an integer containing the size of buf.
- .br
- fIout_lenfP Incremented by the number of characters printed.
- .br
- fIallow_reallocfP if not zero reallocate the buffer to fit the needed size.
- .br
- fIvarfP The variable to encode.
- .br
- fIenumsfP The enumeration ff this variable is enumerated. may be NULL.
- .br
- fIhintfP Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903 Section 3.1 for details. may be NULL.
- .br
- fIunitsfP Contents of the UNITS clause of the MIB. may be NULL.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.)
- .RE
- .PP
- .PP
- Definition at line 1394 of file mib.c.
- .PP
- References netsnmp_vardata::integer, enum_list::label, netsnmp_ds_get_boolean(), enum_list::next, NULL, snmp_strcat(), sprint_realloc_by_type(), sprint_realloc_hinted_integer(), variable_list::type, variable_list::val, and enum_list::value.
- .PP
- Referenced by set_function(), snprint_uinteger(), and sprint_realloc_by_type().
- .SS "char* uptime_string (u_long timeticks, char * buf)"
- .PP
- Converts timeticks to hours, minutes, seconds string.
- .PP
- CMU compatible does not show centiseconds.
- .PP
- fBParameters:fP
- .RS 4
- fItimeticksfP The timeticks to convert.
- .br
- fIbuffP Buffer to write to, has to be at least 40 Bytes large.
- .RE
- .PP
- fBReturns:fP
- .RS 4
- The buffer
- .RE
- .PP
- fBSee also:fP
- .RS 4
- uptimeString
- .RE
- .PP
- .PP
- Definition at line 5729 of file mib.c.
- .SH "Variable Documentation"
- .PP
- .SS "fBPrefixListfP fBmib_prefixesfP[]"
- .PP
- fBInitial value:fP
- .PP
- .nf
- {
- {&Standard_Prefix[0]},
- {'.iso.org.dod.internet.mgmt.mib-2'},
- {'.iso.org.dod.internet.experimental'},
- {'.iso.org.dod.internet.private'},
- {'.iso.org.dod.internet.snmpParties'},
- {'.iso.org.dod.internet.snmpSecrets'},
- {NULL, 0}
- }
- .fi
- .PP
- Definition at line 160 of file mib.c.