NAME
netsnmpmibutilities - mib parsing and datatype manipulation routines.
DDaattaa SSttrruuccttuurreess struct PPrreeffiixxLLiisstt struct ppaarrsseehhiinnttss TTyyppeeddeeffss typedef PrefixList * PPrreeffiixxLLiissttPPttrr typedef PrefixList PPrreeffiixxLLiisstt EEnnuummeerraattiioonnss enum iinneettaaddddrreessssttyyppee { IIPPVV44 = 1, IIPPVV66 = 2, IIPPVV44ZZ = 3, IIPPVV66ZZ = 4, DDNNSS = 16 } FFuunnccttiioonnss int sspprriinntthheexxssttrriinngglliinnee (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, const uchar *cp, sizet linelen) Prints a hexadecimal string into a buffer. int sspprriinnttrreeaalllloocchheexxssttrriinngg (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, const uchar *cp, sizet len) int sspprriinnttrreeaallllooccaasscciiiissttrriinngg (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, const uchar *cp, sizet len) Prints an ascii string into a buffer. int sspprriinnttrreeaallllooccoocctteettssttrriinngg (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) Prints an octet string into a buffer. int sspprriinnttrreeaallllooccccoouunntteerr6644 (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) Prints a counter into a buffer. int sspprriinnttrreeaallllooccooppaaqquuee (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) Prints an object identifier into a buffer. int sspprriinnttrreeaallllooccoobbjjeeccttiiddeennttiiffiieerr (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) Prints an object identifier into a buffer. int sspprriinnttrreeaallllooccttiimmeettiicckkss (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) Prints a timetick variable into a buffer. int sspprriinnttrreeaalllloocchhiinntteeddiinntteeggeerr (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, long val, const char decimaltype, const char *hint, const char *units) Prints an integer according to the hint into a buffer. int sspprriinnttrreeaalllloocciinntteeggeerr (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) Prints an integer into a buffer. int sspprriinnttrreeaallllooccuuiinntteeggeerr (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) Prints an unsigned integer into a buffer. int sspprriinnttrreeaallllooccggaauuggee (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) Prints a gauge value into a buffer. int sspprriinnttrreeaallllooccccoouunntteerr (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) Prints a counter value into a buffer. int sspprriinnttrreeaallllooccnneettwwoorrkkaaddddrreessss (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) Prints a network address into a buffer. int sspprriinnttrreeaalllloocciippaaddddrreessss (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units)Prints an ip-address into a buffer.
int sspprriinnttrreeaallllooccnnuullll (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) Prints a null value into a buffer. int sspprriinnttrreeaallllooccbbiittssttrriinngg (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) Prints a bit string into a buffer. int sspprriinnttrreeaallllooccnnssaappaaddddrreessss (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) int sspprriinnttrreeaallllooccbbaaddttyyppee (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) Fallback routine for a bad type, prints 'Variable has bad type' into a buffer. int sspprriinnttrreeaallllooccbbyyttyyppee (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) Universal print routine, prints a variable into a buffer according to the variable type. tree * ggeettttrreeeehheeaadd (void) Retrieves the tree head. char * ssnnmmppoouuttttoogggglleeooppttiioonnss (char *options) void ssnnmmppoouuttttoogggglleeooppttiioonnssuussaaggee (const char *lead, FILE *outf) char * ssnnmmppiinnooppttiioonnss (char *optarg, int argc, char *const *argv) char * ssnnmmppiinnttoogggglleeooppttiioonnss (char *options) void ssnnmmppiinnttoogggglleeooppttiioonnssuussaaggee (const char *lead, FILE *outf) Prints out a help usage for the in* toggle options. void rreeggiisstteerrmmiibbhhaannddlleerrss (void) void nneettssnnmmppsseettmmiibbddiirreeccttoorryy (const char *dir) char * nneettssnnmmppggeettmmiibbddiirreeccttoorryy (void) void nneettssnnmmppffiixxuuppmmiibbddiirreeccttoorryy (void) void iinniittmmiibb (void) Initialises the mib reader. void sshhuuttddoowwnnmmiibb (void) Unloads all mibs. void pprriinnttmmiibb (FILE *fp) Prints the MIBs to the file fp. void pprriinnttaasscciiiidduummpp (FILE *fp) void sseettffuunnccttiioonn (struct tree *subtree) Set's the printing function printomat in a subtree according it's type. int rreeaaddoobbjjiidd (const char *input, oid *output, sizet *outlen) Reads an object identifier from an input string into internal OID form. void nneettssnnmmppsspprriinnttrreeaallllooccoobbjjiidd (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, int *bufoverflow, const oid *objid, sizet objidlen) tree * nneettssnnmmppsspprriinnttrreeaallllooccoobbjjiiddttrreeee (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, int *bufoverflow, const oid *objid, sizet objidlen) int sspprriinnttrreeaallllooccoobbjjiidd (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, const oid *objid, sizet objidlen) int ssnnpprriinnttoobbjjiidd (char *buf, sizet buflen, const oid *objid, sizet objidlen) void pprriinnttoobbjjiidd (const oid *objid, sizet objidlen) Prints an oid to stdout. void ffpprriinnttoobbjjiidd (FILE *f, const oid *objid, sizet objidlen) Prints an oid to a file descriptor. int sspprriinnttrreeaallllooccvvaarriiaabbllee (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, const oid *objid, sizet objidlen, const nneettssnnmmppvvaarriiaabblleelliisstt *variable) int ssnnpprriinnttvvaarriiaabbllee (char *buf, sizet buflen, const oid *objid, sizet objidlen, const nneettssnnmmppvvaarriiaabblleelliisstt *variable) void pprriinnttvvaarriiaabbllee (const oid *objid, sizet objidlen, const nneettssnnmmppvvaarriiaabblleelliisstt *variable) Prints a variable to stdout. void ffpprriinnttvvaarriiaabbllee (FILE *f, const oid *objid, sizet objidlen, const nneettssnnmmppvvaarriiaabblleelliisstt *variable) Prints a variable to a file descriptor. int sspprriinnttrreeaallllooccvvaalluuee (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, const oid *objid, sizet objidlen, const nneettssnnmmppvvaarriiaabblleelliisstt *variable) int ssnnpprriinnttvvaalluuee (char *buf, sizet buflen, const oid *objid, sizet objidlen, const nneettssnnmmppvvaarriiaabblleelliisstt *variable) void pprriinnttvvaalluuee (const oid *objid, sizet objidlen, const nneettssnnmmppvvaarriiaabblleelliisstt *variable) void ffpprriinnttvvaalluuee (FILE *f, const oid *objid, sizet objidlen, const nneettssnnmmppvvaarriiaabblleelliisstt *variable) int bbuuiillddooiiddsseeggmmeenntt (nneettssnnmmppvvaarriiaabblleelliisstt *var) Takes the value in VAR and turns it into an OID segment invar->name.
int bbuuiillddooiiddnnooaalllloocc (oid *in, sizet inlen, sizet *outlen, oid *prefix, sizet prefixlen, nneettssnnmmppvvaarriiaabblleelliisstt *indexes) int bbuuiillddooiidd (oid **out, sizet *outlen, oid *prefix, sizet prefixlen, nneettssnnmmppvvaarriiaabblleelliisstt *indexes) int ppaarrsseeooiiddiinnddeexxeess (oid *oidIndex, sizet oidLen, nneettssnnmmppvvaarriiaabblleelliisstt *data) int ppaarrsseeoonneeooiiddiinnddeexx (oid **oidStart, sizet *oidLen, nneettssnnmmppvvaarriiaabblleelliisstt *data, int complete) int dduummpprreeaallllooccooiiddttooiinneettaaddddrreessss (const int addrtype, const oid *objid, sizet objidlen, uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, char quotechar) int dduummpprreeaallllooccooiiddttoossttrriinngg (const oid *objid, sizet objidlen, uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, char quotechar) tree * ggeettttrreeee (const oid *objid, sizet objidlen, struct tree *subtree) Clone of getsymbol that doesn't take a buffer argument. void pprriinnttddeessccrriippttiioonn (oid *objid, sizet objidlen, int width) Prints on oid description on stdout. void ffpprriinnttddeessccrriippttiioonn (FILE *f, oid *objid, sizet objidlen, int width) Prints on oid description into a file descriptor. int ssnnpprriinnttddeessccrriippttiioonn (char *buf, sizet buflen, oid *objid, sizet objidlen, int width) int sspprriinnttrreeaallllooccddeessccrriippttiioonn (uchar **buf, sizet *buflen, sizet *outlen, int allowrealloc, oid *objid, sizet objidlen, int width) int ggeettmmoodduulleennooddee (const char *fname, const char *module, oid *objid, sizet *objidlen) int ggeettwwiillddnnooddee (const char *name, oid *objid, sizet *objidlen) int ggeettnnooddee (const char *name, oid *objid, sizet *objidlen) void cclleeaarrttrreeeeffllaaggss (register struct tree *tp) void pprriinnttooiiddrreeppoorrtt (FILE *fp) void pprriinnttooiiddrreeppoorrtteennaabblleellaabbeelleeddooiidd (void) void pprriinnttooiiddrreeppoorrtteennaabblleeooiidd (void) void pprriinnttooiiddrreeppoorrtteennaabblleessuuffffiixx (void) void pprriinnttooiiddrreeppoorrtteennaabblleessyymmbboolliicc (void) char * uuppttiimmeessttrriinngg (ulong timeticks, char *buf) Converts timeticks to hours, minutes, seconds string. oid * ssnnmmppppaarrsseeooiidd (const char *argv, oid *root, sizet *rootlen) Given a string, parses an oid out of it (if possible). const char * ppaarrsseeoocctteetthhiinntt (const char *hint, const char *value, unsigned char **newval, int *newvallen) uchar mmiibbttooaassnnttyyppee (int mibtype) int nneettssnnmmppssttrr22ooiidd (const char *S, oid *O, int L) Converts a string to its OID form. int nneettssnnmmppooiidd22cchhaarrss (char *C, int L, const oid *O) Converts an OID to its character form. int nneettssnnmmppooiidd22ssttrr (char *S, int L, oid *O) Converts an OID to its string form. int ssnnpprriinnttbbyyttyyppee (char *buf, sizet buflen, nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) int ssnnpprriinntthheexxssttrriinngg (char *buf, sizet buflen, const uchar *cp, sizet len) int ssnnpprriinnttaasscciiiissttrriinngg (char *buf, sizet buflen, const uchar *cp, sizet len) int ssnnpprriinnttoocctteettssttrriinngg (char *buf, sizet buflen, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) int ssnnpprriinnttooppaaqquuee (char *buf, sizet buflen, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) int ssnnpprriinnttoobbjjeeccttiiddeennttiiffiieerr (char *buf, sizet buflen, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) int ssnnpprriinnttttiimmeettiicckkss (char *buf, sizet buflen, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) int ssnnpprriinntthhiinntteeddiinntteeggeerr (char *buf, sizet buflen, long val, const char *hint, const char *units) int ssnnpprriinnttiinntteeggeerr (char *buf, sizet buflen, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) int ssnnpprriinnttuuiinntteeggeerr (char *buf, sizet buflen, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) int ssnnpprriinnttggaauuggee (char *buf, sizet buflen, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) int ssnnpprriinnttccoouunntteerr (char *buf, sizet buflen, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) int ssnnpprriinnttnneettwwoorrkkaaddddrreessss (char *buf, sizet buflen, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) int ssnnpprriinnttiippaaddddrreessss (char *buf, sizet buflen, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) int ssnnpprriinnttnnuullll (char *buf, sizet buflen, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) int ssnnpprriinnttbbiittssttrriinngg (char *buf, sizet buflen, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) int ssnnpprriinnttnnssaappaaddddrreessss (char *buf, sizet buflen, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) int ssnnpprriinnttccoouunntteerr6644 (char *buf, sizet buflen, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) int ssnnpprriinnttbbaaddttyyppee (char *buf, sizet buflen, const nneettssnnmmppvvaarriiaabblleelliisstt *var, const struct enumlist *enums, const char *hint, const char *units) VVaarriiaabblleess tree * ttrreeeehheeaadd tree * MMiibb oid RRFFCC11221133MMIIBB [] = { 1, 3, 6, 1, 2, 1 } PrefixList mmiibbpprreeffiixxeess [] FFuunnccttiioonn DDooccuummeennttaattiioonn iinntt sspprriinntthheexxssttrriinngglliinnee ((uucchhaarr **** bbuuff,, ssiizzeett ** bbuufflleenn,, ssiizzeett ** oouuttlleenn,, iinntt aalllloowwrreeaalllloocc,, ccoonnsstt uucchhaarr ** ccpp,, ssiizzeett lliinneelleenn)) Prints a hexadecimal string into a buffer. The characters pointed by *cp are encoded as hexadecimal string. If allowrealloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.) PPaarraammeetteerrss:: buf address of the buffer to print to. buflen address to an integer containing the size of buf. outlen incremented by the number of characters printed. allowrealloc if not zero reallocate the buffer to fit the needed size. cp the array of characters to encode. len the array length of cp. RReettuurrnnss:: 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) Definition at line 271 of file mib.c. References snmprealloc(). iinntt bbuuiillddooiidd ((ooiidd **** oouutt,, ssiizzeett ** oouuttlleenn,, ooiidd ** pprreeffiixx,, ssiizzeett pprreeffiixxlleenn,, nneettssnnmmppvvaarriiaabblleelliisstt ** iinnddeexxeess)) Definition at line 3557 of file mib.c. Referenced by netsnmptablebuildoid(), and netsnmptabledatagenerateindexoid(). iinntt bbuuiillddooiiddsseeggmmeenntt ((nneettssnnmmppvvaarriiaabblleelliisstt ** vvaarr))Takes the value in VAR and turns it into an OID segment in var->name.
PPaarraammeetteerrss:: var The variable. RReettuurrnnss:: SNMPERRSUCCESS or SNMPERRGENERR Definition at line 3421 of file mib.c. References variablelist::name, variablelist::namelength, variablelist::nameloc, SNMPFREE, variablelist::type, variablelist::val, and variablelist::vallen. vvooiidd ffpprriinnttddeessccrriippttiioonn ((FFIILLEE ** ff,, ooiidd ** oobbjjiidd,, ssiizzeett oobbjjiiddlleenn,, iinntt wwiiddtthh)) Prints on oid description into a file descriptor. PPaarraammeetteerrss:: f The file descriptor to print to. objid The object identifier. objidlen The object id length. width Number of subidentifiers. Definition at line 4401 of file mib.c. References SNMPFREE. Referenced by printdescription(). vvooiidd ffpprriinnttoobbjjiidd ((FFIILLEE ** ff,, ccoonnsstt ooiidd ** oobbjjiidd,, ssiizzeett oobbjjiiddlleenn)) Prints an oid to a file descriptor. PPaarraammeetteerrss:: f The file descriptor to print to. objid The oid to print objidlen The length of oidid. Definition at line 3149 of file mib.c. References SNMPFREE. Referenced by printobjid(). vvooiidd ffpprriinnttvvaarriiaabbllee ((FFIILLEE ** ff,, ccoonnsstt ooiidd ** oobbjjiidd,, ssiizzeett oobbjjiiddlleenn,, ccoonnsstt nneettssnnmmppvvaarriiaabblleelliisstt ** vvaarriiaabbllee)) Prints a variable to a file descriptor. PPaarraammeetteerrss:: f The file descriptor to print to. objid The object id. objidlen The length of teh object id. variable The variable to print. Definition at line 3296 of file mib.c. References SNMPFREE. Referenced by printvariable(). ssttrruucctt ttrreeee** ggeettttrreeee ((ccoonnsstt ooiidd ** oobbjjiidd,, ssiizzeett oobbjjiiddlleenn,, ssttrruucctt ttrreeee ** ssuubbttrreeee)) Clone of getsymbol that doesn't take a buffer argument. SSeeee aallssoo:: getsymbol Definition at line 4356 of file mib.c. ssttrruucctt ttrreeee** ggeettttrreeeehheeaadd ((vvooiidd)) Retrieves the tree head. RReettuurrnnss:: the tree head. Definition at line 2049 of file mib.c. iinntt ggeettwwiillddnnooddee ((ccoonnsstt cchhaarr ** nnaammee,, ooiidd ** oobbjjiidd,, ssiizzeett ** oobbjjiiddlleenn)) SSeeee aallssoo:: comments on findbesttreenode for usage after first time. Definition at line 5406 of file mib.c. Referenced by snmpparseoid(). vvooiidd iinniittmmiibb ((vvooiidd)) Initialises the mib reader. Reads in all settings from the environment. Definition at line 2537 of file mib.c. References netsnmpfixupmibdirectory(), netsnmpgetmibdirectory(), netsnmpgetenv(), and SNMPFREE. Referenced by initsnmp(). vvooiidd nneettssnnmmppffiixxuuppmmiibbddiirreeccttoorryy ((vvooiidd)) Definition at line 2490 of file mib.c. References netsnmpgetmibdirectory(), netsnmpgetenv(), netsnmpsetmibdirectory(), and SNMPFREE. Referenced by initmib(). cchhaarr** nneettssnnmmppggeettmmiibbddiirreeccttoorryy ((vvooiidd)) Definition at line 2443 of file mib.c. References netsnmpgetenv(), and netsnmpsetmibdirectory(). Referenced by initmib(), and netsnmpfixupmibdirectory(). iinntt nneettssnnmmppooiidd22cchhaarrss ((cchhaarr ** CC,, iinntt LL,, ccoonnsstt ooiidd ** OO)) Converts an OID to its character form. in example 5 . 1 . 2 . 3 . 4 . 5 = 12345 PPaarraammeetteerrss:: C The character buffer. L The length of the buffer. O The oid. RReettuurrnnss:: 0 on Sucess, 1 on failure. length Definition at line 6149 of file mib.c. Referenced by netsnmpoid2str(). iinntt nneettssnnmmppooiidd22ssttrr ((cchhaarr ** SS,, iinntt LL,, ooiidd ** OO)) Converts an OID to its string form. in example 5 . 'h' . 'e' . 'l' . 'l' . 'o' = 'hello\0' (null terminated) PPaarraammeetteerrss:: S The character string buffer. L The length of the string buffer. O The oid. RReettuurrnnss:: 0 on Sucess, 1 on failure. Definition at line 6177 of file mib.c. References netsnmpoid2chars(). vvooiidd nneettssnnmmppsseettmmiibbddiirreeccttoorryy ((ccoonnsstt cchhaarr ** ddiirr)) Definition at line 2388 of file mib.c. References SNMPFREE. Referenced by netsnmpfixupmibdirectory(), and netsnmpgetmibdirectory(). iinntt nneettssnnmmppssttrr22ooiidd ((ccoonnsstt cchhaarr ** SS,, ooiidd ** OO,, iinntt LL)) Converts a string to its OID form. in example 'hello' = 5 . 'h' . 'e' . 'l' . 'l' . 'o' PPaarraammeetteerrss:: S The string. O The oid. L The length of the oid. RReettuurrnnss:: 0 on Sucess, 1 on failure. Definition at line 6114 of file mib.c. vvooiidd pprriinnttddeessccrriippttiioonn ((ooiidd ** oobbjjiidd,, ssiizzeett oobbjjiiddlleenn,, iinntt wwiiddtthh)) Prints on oid description on stdout. SSeeee aallssoo:: ffpprriinnttddeessccrriippttiioonn Definition at line 4385 of file mib.c. References fprintdescription(). vvooiidd pprriinnttmmiibb ((FFIILLEE ** ffpp)) Prints the MIBs to the file fp. PPaarraammeetteerrss:: fp The file descriptor to print to. Definition at line 2730 of file mib.c. vvooiidd pprriinnttoobbjjiidd ((ccoonnsstt ooiidd ** oobbjjiidd,, ssiizzeett oobbjjiiddlleenn)) Prints an oid to stdout. PPaarraammeetteerrss:: objid The oid to print objidlen The length of oidid. Definition at line 3135 of file mib.c. References fprintobjid(). vvooiidd pprriinnttvvaarriiaabbllee ((ccoonnsstt ooiidd ** oobbjjiidd,, ssiizzeett oobbjjiiddlleenn,, ccoonnsstt nneettssnnmmppvvaarriiaabblleelliisstt ** vvaarriiaabbllee)) Prints a variable to stdout. PPaarraammeetteerrss:: objid The object id. objidlen The length of teh object id. variable The variable to print. Definition at line 3280 of file mib.c. References fprintvariable(). iinntt rreeaaddoobbjjiidd ((ccoonnsstt cchhaarr ** iinnppuutt,, ooiidd ** oouuttppuutt,, ssiizzeett ** oouuttlleenn)) Reads an object identifier from an input string into internal OID form. When called, outlen must hold the maximum length of the output array. PPaarraammeetteerrss:: input the input string. output the oid wirte. outlen number of subid's in output. RReettuurrnnss:: 1 if successful. If an error occurs, this function returns 0 and MAY set snmperrno.snmperrno is NOT set if SETSNMPERROR evaluates to nothing. This can
make multi-threaded use a tiny bit more robust. Definition at line 2828
of file mib.c. References SNMPFREE. Referenced by snmpparseoid(). vvooiidd sseettffuunnccttiioonn ((ssttrruucctt ttrreeee ** ssuubbttrreeee)) Set's the printing function printomat in a subtree according it's type. PPaarraammeetteerrss:: subtree The subtree to set. Definition at line 2751 of file mib.c. References sprintreallocbitstring(), sprintreallocbytype(), sprintrealloccounter(), sprintrealloccounter64(), sprintreallocgauge(), sprintreallocinteger(), sprintreallocipaddress(), sprintreallocnetworkaddress(), sprintreallocnull(), sprintreallocobjectidentifier(), sprintreallococtetstring(), sprintreallocopaque(), sprintrealloctimeticks(), and sprintreallocuinteger(). vvooiidd sshhuuttddoowwnnmmiibb ((vvooiidd)) Unloads all mibs. Definition at line 2707 of file mib.c. References SNMPFREE. Referenced by snmpshutdown(). vvooiidd ssnnmmppiinnttoogggglleeooppttiioonnssuussaaggee ((ccoonnsstt cchhaarr ** lleeaadd,, FFIILLEE ** oouuttff)) Prints out a help usage for the in* toggle options. PPaarraammeetteerrss:: lead The lead to print for every line. outf The file descriptor to write to. Definition at line 2300 of file mib.c. ooiidd** ssnnmmppppaarrsseeooiidd ((ccoonnsstt cchhaarr ** aarrggvv,, ooiidd ** rroooott,, ssiizzeett ** rroooottlleenn)) 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 NETSNMPDSLIBOIDSUFFIX, it will be appended to the input string before processing. PPaarraammeetteerrss:: argv The OID to string parse root An OID array where the results are stored. rootlen The max length of the array going in and the data length coming out. RReettuurrnnss:: The root oid pointer if successful, or NULL otherwise. Definition at line 5720 of file mib.c. References getwildnode(), and readobjid(). iinntt sspprriinnttrreeaallllooccaasscciiiissttrriinngg ((uucchhaarr **** bbuuff,, ssiizzeett ** bbuufflleenn,, ssiizzeett ** oouuttlleenn,, iinntt aalllloowwrreeaalllloocc,, ccoonnsstt uucchhaarr ** ccpp,, ssiizzeett lleenn)) Prints an ascii string into a buffer. The characters pointed by *cp are encoded as an ascii string. If allowrealloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.) PPaarraammeetteerrss:: buf address of the buffer to print to. buflen address to an integer containing the size of buf. outlen incremented by the number of characters printed. allowrealloc if not zero reallocate the buffer to fit the needed size. cp the array of characters to encode. len the array length of cp. RReettuurrnnss:: 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) Definition at line 363 of file mib.c. References snmprealloc(). Referenced by sprintreallococtetstring(). iinntt sspprriinnttrreeaallllooccbbaaddttyyppee ((uucchhaarr **** bbuuff,, ssiizzeett ** bbuufflleenn,, ssiizzeett ** oouuttlleenn,, iinntt aalllloowwrreeaalllloocc,, ccoonnsstt nneettssnnmmppvvaarriiaabblleelliisstt ** vvaarr,, ccoonnsstt ssttrruucctt eennuummlliisstt ** eennuummss,, ccoonnsstt cchhaarr ** hhiinntt,, ccoonnsstt cchhaarr ** uunniittss)) Fallback routine for a bad type, prints 'Variable has bad type' into a buffer. If allowrealloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.) PPaarraammeetteerrss:: buf Address of the buffer to print to. buflen Address to an integer containing the size of buf. outlen Incremented by the number of characters printed. allowrealloc if not zero reallocate the buffer to fit the needed size. var The variable to encode. enums The enumeration ff this variable is enumerated. may be NULL.hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
Section 3.1 for details. may be NULL. units Contents of the UNITS clause of the MIB. may be NULL. RReettuurrnnss:: 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) Definition at line 1934 of file mib.c. Referenced by sprintreallocbytype(). iinntt sspprriinnttrreeaallllooccbbiittssttrriinngg ((uucchhaarr **** bbuuff,, ssiizzeett ** bbuufflleenn,, ssiizzeett ** oouuttlleenn,, iinntt aalllloowwrreeaalllloocc,, ccoonnsstt nneettssnnmmppvvaarriiaabblleelliisstt ** vvaarr,, ccoonnsstt ssttrruucctt eennuummlliisstt ** eennuummss,, ccoonnsstt cchhaarr ** hhiinntt,, ccoonnsstt cchhaarr ** uunniittss)) Prints a bit string into a buffer. If allowrealloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.) PPaarraammeetteerrss:: buf Address of the buffer to print to. buflen Address to an integer containing the size of buf. outlen Incremented by the number of characters printed. allowrealloc if not zero reallocate the buffer to fit the needed size. var The variable to encode. enums The enumeration ff this variable is enumerated. may be NULL.hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
Section 3.1 for details. may be NULL. units Contents of the UNITS clause of the MIB. may be NULL. RReettuurrnnss:: 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) Definition at line 1795 of file mib.c. References sprintreallocbytype(), variablelist::type, variablelist::val, and variablelist::vallen. Referenced by setfunction(), and sprintreallocbytype(). iinntt sspprriinnttrreeaallllooccbbyyttyyppee ((uucchhaarr **** bbuuff,, ssiizzeett ** bbuufflleenn,, ssiizzeett ** oouuttlleenn,, iinntt aalllloowwrreeaalllloocc,, ccoonnsstt nneettssnnmmppvvaarriiaabblleelliisstt ** vvaarr,, ccoonnsstt ssttrruucctt eennuummlliisstt ** eennuummss,, ccoonnsstt cchhaarr ** hhiinntt,, ccoonnsstt cchhaarr ** uunniittss)) Universal print routine, prints a variable into a buffer according to the variable type. If allowrealloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.) PPaarraammeetteerrss:: buf Address of the buffer to print to. buflen Address to an integer containing the size of buf. outlen Incremented by the number of characters printed. allowrealloc if not zero reallocate the buffer to fit the needed size. var The variable to encode. enums The enumeration ff this variable is enumerated. may be NULL.hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
Section 3.1 for details. may be NULL. units Contents of the UNITS clause of the MIB. may be NULL. RReettuurrnnss:: 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) Definition at line 1969 of file mib.c. References sprintreallocbadtype(), sprintreallocbitstring(), sprintrealloccounter(), sprintrealloccounter64(), sprintreallocgauge(), sprintreallocinteger(), sprintreallocipaddress(), sprintreallocnull(), sprintreallocobjectidentifier(), sprintreallococtetstring(), sprintreallocopaque(), sprintrealloctimeticks(), sprintreallocuinteger(), and variablelist::type. Referenced by setfunction(), sprintreallocbitstring(), sprintrealloccounter(), sprintrealloccounter64(), sprintreallocgauge(), sprintreallocinteger(), sprintreallocipaddress(), sprintreallocnetworkaddress(), sprintreallocnull(), sprintreallocobjectidentifier(), sprintreallococtetstring(), sprintreallocopaque(), sprintrealloctimeticks(), sprintreallocuinteger(), and tablehelperhandler(). iinntt sspprriinnttrreeaallllooccccoouunntteerr ((uucchhaarr **** bbuuff,, ssiizzeett ** bbuufflleenn,, ssiizzeett ** oouuttlleenn,, iinntt aalllloowwrreeaalllloocc,, ccoonnsstt nneettssnnmmppvvaarriiaabblleelliisstt ** vvaarr,, ccoonnsstt ssttrruucctt eennuummlliisstt ** eennuummss,, ccoonnsstt cchhaarr ** hhiinntt,, ccoonnsstt cchhaarr ** uunniittss)) Prints a counter value into a buffer. If allowrealloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.) PPaarraammeetteerrss:: buf Address of the buffer to print to. buflen Address to an integer containing the size of buf. outlen Incremented by the number of characters printed. allowrealloc if not zero reallocate the buffer to fit the needed size. var The variable to encode. enums The enumeration ff this variable is enumerated. may be NULL.hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
Section 3.1 for details. may be NULL. units Contents of the UNITS clause of the MIB. may be NULL. RReettuurrnnss:: 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) Definition at line 1562 of file mib.c. References sprintreallocbytype(), variablelist::type, and variablelist::val. Referenced by setfunction(), and sprintreallocbytype(). iinntt sspprriinnttrreeaallllooccccoouunntteerr6644 ((uucchhaarr **** bbuuff,, ssiizzeett ** bbuufflleenn,, ssiizzeett ** oouuttlleenn,, iinntt aalllloowwrreeaalllloocc,, ccoonnsstt nneettssnnmmppvvaarriiaabblleelliisstt ** vvaarr,, ccoonnsstt ssttrruucctt eennuummlliisstt ** eennuummss,, ccoonnsstt cchhaarr ** hhiinntt,, ccoonnsstt cchhaarr ** uunniittss)) Prints a counter into a buffer. The variable var is encoded as a counter value. If allowrealloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.) PPaarraammeetteerrss:: buf Address of the buffer to print to. buflen Address to an integer containing the size of buf. outlen Incremented by the number of characters printed. allowrealloc if not zero reallocate the buffer to fit the needed size. var The variable to encode. enums The enumeration ff this variable is enumerated. may be NULL.hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
Section 3.1 for details. may be NULL. units Contents of the UNITS clause of the MIB. may be NULL. RReettuurrnnss:: 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) Definition at line 867 of file mib.c. References sprintreallocbytype(), variablelist::type, and variablelist::val. Referenced by setfunction(), sprintreallocbytype(), and sprintreallocopaque(). iinntt sspprriinnttrreeaallllooccggaauuggee ((uucchhaarr **** bbuuff,, ssiizzeett ** bbuufflleenn,, ssiizzeett ** oouuttlleenn,, iinntt aalllloowwrreeaalllloocc,, ccoonnsstt nneettssnnmmppvvaarriiaabblleelliisstt ** vvaarr,, ccoonnsstt ssttrruucctt eennuummlliisstt ** eennuummss,, ccoonnsstt cchhaarr ** hhiinntt,, ccoonnsstt cchhaarr ** uunniittss)) Prints a gauge value into a buffer. If allowrealloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.) PPaarraammeetteerrss:: buf Address of the buffer to print to. buflen Address to an integer containing the size of buf. outlen Incremented by the number of characters printed. allowrealloc if not zero reallocate the buffer to fit the needed size. var The variable to encode. enums The enumeration ff this variable is enumerated. may be NULL.hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
Section 3.1 for details. may be NULL. units Contents of the UNITS clause of the MIB. may be NULL. RReettuurrnnss:: 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) Definition at line 1489 of file mib.c. References sprintreallocbytype(), sprintreallochintedinteger(), variablelist::type, and variablelist::val. Referenced by setfunction(), and sprintreallocbytype(). iinntt sspprriinnttrreeaalllloocchhiinntteeddiinntteeggeerr ((uucchhaarr **** bbuuff,, ssiizzeett ** bbuufflleenn,, ssiizzeett ** oouuttlleenn,, iinntt aalllloowwrreeaalllloocc,, lloonngg vvaall,, ccoonnsstt cchhaarr ddeecciimmaallttyyppee,, ccoonnsstt cchhaarr ** hhiinntt,, ccoonnsstt cchhaarr ** uunniittss)) Prints an integer according to the hint into a buffer. If allowrealloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.) PPaarraammeetteerrss:: buf Address of the buffer to print to. buflen Address to an integer containing the size of buf. outlen Incremented by the number of characters printed. allowrealloc if not zero reallocate the buffer to fit the needed size. var The variable to encode. enums The enumeration ff this variable is enumerated. may be NULL.hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
Section 3.1 for details. may NOT be NULL. units Contents of the UNITS clause of the MIB. may be NULL. RReettuurrnnss:: 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) Definition at line 1215 of file mib.c. Referenced by sprintreallocgauge(), sprintreallocinteger(), and sprintreallocuinteger(). iinntt sspprriinnttrreeaalllloocciinntteeggeerr ((uucchhaarr **** bbuuff,, ssiizzeett ** bbuufflleenn,, ssiizzeett ** oouuttlleenn,, iinntt aalllloowwrreeaalllloocc,, ccoonnsstt nneettssnnmmppvvaarriiaabblleelliisstt ** vvaarr,, ccoonnsstt ssttrruucctt eennuummlliisstt ** eennuummss,, ccoonnsstt cchhaarr ** hhiinntt,, ccoonnsstt cchhaarr ** uunniittss)) Prints an integer into a buffer. If allowrealloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.) PPaarraammeetteerrss:: buf Address of the buffer to print to. buflen Address to an integer containing the size of buf. outlen Incremented by the number of characters printed. allowrealloc if not zero reallocate the buffer to fit the needed size. var The variable to encode. enums The enumeration ff this variable is enumerated. may be NULL.hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
Section 3.1 for details. may be NULL. units Contents of the UNITS clause of the MIB. may be NULL. RReettuurrnnss:: 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) Definition at line 1289 of file mib.c. References sprintreallocbytype(), sprintreallochintedinteger(), variablelist::type, and variablelist::val. Referenced by setfunction(), and sprintreallocbytype(). iinntt sspprriinnttrreeaalllloocciippaaddddrreessss ((uucchhaarr **** bbuuff,, ssiizzeett ** bbuufflleenn,, ssiizzeett ** oouuttlleenn,, iinntt aalllloowwrreeaalllloocc,, ccoonnsstt nneettssnnmmppvvaarriiaabblleelliisstt ** vvaarr,, ccoonnsstt ssttrruucctt eennuummlliisstt ** eennuummss,, ccoonnsstt cchhaarr ** hhiinntt,, ccoonnsstt cchhaarr ** uunniittss))Prints an ip-address into a buffer. If allowrealloc is true the buffer
will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.) PPaarraammeetteerrss:: buf Address of the buffer to print to. buflen Address to an integer containing the size of buf. outlen Incremented by the number of characters printed. allowrealloc if not zero reallocate the buffer to fit the needed size. var The variable to encode. enums The enumeration ff this variable is enumerated. may be NULL.hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
Section 3.1 for details. may be NULL. units Contents of the UNITS clause of the MIB. may be NULL. RReettuurrnnss:: 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) Definition at line 1691 of file mib.c. References snmprealloc(), sprintreallocbytype(), variablelist::type, and variablelist::val. Referenced by setfunction(), and sprintreallocbytype(). iinntt sspprriinnttrreeaallllooccnneettwwoorrkkaaddddrreessss ((uucchhaarr **** bbuuff,, ssiizzeett ** bbuufflleenn,, ssiizzeett ** oouuttlleenn,, iinntt aalllloowwrreeaalllloocc,, ccoonnsstt nneettssnnmmppvvaarriiaabblleelliisstt ** vvaarr,, ccoonnsstt ssttrruucctt eennuummlliisstt ** eennuummss,, ccoonnsstt cchhaarr ** hhiinntt,, ccoonnsstt cchhaarr ** uunniittss)) Prints a network address into a buffer. If allowrealloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.) PPaarraammeetteerrss:: buf Address of the buffer to print to. buflen Address to an integer containing the size of buf. outlen Incremented by the number of characters printed. allowrealloc if not zero reallocate the buffer to fit the needed size. var The variable to encode. enums The enumeration ff this variable is enumerated. may be NULL.hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
Section 3.1 for details. may be NULL. units Contents of the UNITS clause of the MIB. may be NULL. RReettuurrnnss:: 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) Definition at line 1625 of file mib.c. References snmprealloc(), sprintreallocbytype(), variablelist::type, variablelist::val, and variablelist::vallen. Referenced by setfunction(). iinntt sspprriinnttrreeaallllooccnnuullll ((uucchhaarr **** bbuuff,, ssiizzeett ** bbuufflleenn,, ssiizzeett ** oouuttlleenn,, iinntt aalllloowwrreeaalllloocc,, ccoonnsstt nneettssnnmmppvvaarriiaabblleelliisstt ** vvaarr,, ccoonnsstt ssttrruucctt eennuummlliisstt ** eennuummss,, ccoonnsstt cchhaarr ** hhiinntt,, ccoonnsstt cchhaarr ** uunniittss)) Prints a null value into a buffer. If allowrealloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.) PPaarraammeetteerrss:: buf Address of the buffer to print to. buflen Address to an integer containing the size of buf. outlen Incremented by the number of characters printed. allowrealloc if not zero reallocate the buffer to fit the needed size. var The variable to encode. enums The enumeration ff this variable is enumerated. may be NULL.hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
Section 3.1 for details. may be NULL. units Contents of the UNITS clause of the MIB. may be NULL. RReettuurrnnss:: 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) Definition at line 1751 of file mib.c. References sprintreallocbytype(), and variablelist::type. Referenced by setfunction(), and sprintreallocbytype(). iinntt sspprriinnttrreeaallllooccoobbjjeeccttiiddeennttiiffiieerr ((uucchhaarr **** bbuuff,, ssiizzeett ** bbuufflleenn,, ssiizzeett ** oouuttlleenn,, iinntt aalllloowwrreeaalllloocc,, ccoonnsstt nneettssnnmmppvvaarriiaabblleelliisstt ** vvaarr,, ccoonnsstt ssttrruucctt eennuummlliisstt ** eennuummss,, ccoonnsstt cchhaarr ** hhiinntt,, ccoonnsstt cchhaarr ** uunniittss)) Prints an object identifier into a buffer. If allowrealloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.) PPaarraammeetteerrss:: buf Address of the buffer to print to. buflen Address to an integer containing the size of buf. outlen Incremented by the number of characters printed. allowrealloc if not zero reallocate the buffer to fit the needed size. var The variable to encode. enums The enumeration ff this variable is enumerated. may be NULL.hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
Section 3.1 for details. may be NULL. units Contents of the UNITS clause of the MIB. may be NULL. RReettuurrnnss:: 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) Definition at line 1071 of file mib.c. References sprintreallocbytype(), variablelist::type, variablelist::val, and variablelist::vallen. Referenced by setfunction(), and sprintreallocbytype(). iinntt sspprriinnttrreeaallllooccoocctteettssttrriinngg ((uucchhaarr **** bbuuff,, ssiizzeett ** bbuufflleenn,, ssiizzeett ** oouuttlleenn,, iinntt aalllloowwrreeaalllloocc,, ccoonnsstt nneettssnnmmppvvaarriiaabblleelliisstt ** vvaarr,, ccoonnsstt ssttrruucctt eennuummlliisstt ** eennuummss,, ccoonnsstt cchhaarr ** hhiinntt,, ccoonnsstt cchhaarr ** uunniittss)) Prints an octet string into a buffer. The variable var is encoded as octet string. If allowrealloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.) PPaarraammeetteerrss:: buf Address of the buffer to print to. buflen Address to an integer containing the size of buf. outlen Incremented by the number of characters printed. allowrealloc if not zero reallocate the buffer to fit the needed size. var The variable to encode. enums The enumeration ff this variable is enumerated. may be NULL.hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
Section 3.1 for details. may be NULL. units Contents of the UNITS clause of the MIB. may be NULL. RReettuurrnnss:: 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) Definition at line 423 of file mib.c. References snmprealloc(), sprintreallocasciistring(), sprintreallocbytype(), variablelist::type, variablelist::val, and variablelist::vallen. Referenced by setfunction(), and sprintreallocbytype(). iinntt sspprriinnttrreeaallllooccooppaaqquuee ((uucchhaarr **** bbuuff,, ssiizzeett ** bbuufflleenn,, ssiizzeett ** oouuttlleenn,, iinntt aalllloowwrreeaalllloocc,, ccoonnsstt nneettssnnmmppvvaarriiaabblleelliisstt ** vvaarr,, ccoonnsstt ssttrruucctt eennuummlliisstt ** eennuummss,, ccoonnsstt cchhaarr ** hhiinntt,, ccoonnsstt cchhaarr ** uunniittss)) Prints an object identifier into a buffer. If allowrealloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.) PPaarraammeetteerrss:: buf Address of the buffer to print to. buflen Address to an integer containing the size of buf. outlen Incremented by the number of characters printed. allowrealloc if not zero reallocate the buffer to fit the needed size. var The variable to encode. enums The enumeration ff this variable is enumerated. may be NULL.hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
Section 3.1 for details. may be NULL. units Contents of the UNITS clause of the MIB. may be NULL. RReettuurrnnss:: 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) Definition at line 981 of file mib.c. References sprintreallocbytype(), sprintrealloccounter64(), variablelist::type, variablelist::val, and variablelist::vallen. Referenced by setfunction(), and sprintreallocbytype(). iinntt sspprriinnttrreeaallllooccttiimmeettiicckkss ((uucchhaarr **** bbuuff,, ssiizzeett ** bbuufflleenn,, ssiizzeett ** oouuttlleenn,, iinntt aalllloowwrreeaalllloocc,, ccoonnsstt nneettssnnmmppvvaarriiaabblleelliisstt ** vvaarr,, ccoonnsstt ssttrruucctt eennuummlliisstt ** eennuummss,, ccoonnsstt cchhaarr ** hhiinntt,, ccoonnsstt cchhaarr ** uunniittss)) Prints a timetick variable into a buffer. If allowrealloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.) PPaarraammeetteerrss:: buf Address of the buffer to print to. buflen Address to an integer containing the size of buf. outlen Incremented by the number of characters printed. allowrealloc if not zero reallocate the buffer to fit the needed size. var The variable to encode. enums The enumeration ff this variable is enumerated. may be NULL.hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
Section 3.1 for details. may be NULL. units Contents of the UNITS clause of the MIB. may be NULL. RReettuurrnnss:: 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) Definition at line 1141 of file mib.c. References sprintreallocbytype(), variablelist::type, and variablelist::val. Referenced by setfunction(), and sprintreallocbytype(). iinntt sspprriinnttrreeaallllooccuuiinntteeggeerr ((uucchhaarr **** bbuuff,, ssiizzeett ** bbuufflleenn,, ssiizzeett ** oouuttlleenn,, iinntt aalllloowwrreeaalllloocc,, ccoonnsstt nneettssnnmmppvvaarriiaabblleelliisstt ** vvaarr,, ccoonnsstt ssttrruucctt eennuummlliisstt ** eennuummss,, ccoonnsstt cchhaarr ** hhiinntt,, ccoonnsstt cchhaarr ** uunniittss)) Prints an unsigned integer into a buffer. If allowrealloc is true the buffer will be (re)allocated to fit in the needed size. (Note: *buf may change due to this.) PPaarraammeetteerrss:: buf Address of the buffer to print to. buflen Address to an integer containing the size of buf. outlen Incremented by the number of characters printed. allowrealloc if not zero reallocate the buffer to fit the needed size. var The variable to encode. enums The enumeration ff this variable is enumerated. may be NULL.hint Contents of the DISPLAY-HINT clause of the MIB. See RFC 1903
Section 3.1 for details. may be NULL. units Contents of the UNITS clause of the MIB. may be NULL. RReettuurrnnss:: 1 on success, or 0 on failure (out of memory, or buffer to small when not allowed to realloc.) Definition at line 1392 of file mib.c. References sprintreallocbytype(), sprintreallochintedinteger(), variablelist::type, and variablelist::val. Referenced by setfunction(), and sprintreallocbytype(). cchhaarr** uuppttiimmeessttrriinngg ((uulloonngg ttiimmeettiicckkss,, cchhaarr ** bbuuff)) Converts timeticks to hours, minutes, seconds string. CMU compatible does not show centiseconds. PPaarraammeetteerrss:: timeticks The timeticks to convert. buf Buffer to write to, has to be at least 40 Bytes large. RReettuurrnnss:: The buffer SSeeee aallssoo:: uptimeString Definition at line 5691 of file mib.c. VVaarriiaabbllee DDooccuummeennttaattiioonn PPrreeffiixxLLiisstt mmiibbpprreeffiixxeess[[]] IInniittiiaall vvaalluuee::.nf { {&StandardPrefix[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} } Definition at line 160 of file mib.c.net-snmp mib pa2r4siJnagna2n0d05datatype manipulation routines.(3)