1smi_render(3)         SMI Management Information Library         smi_render(3)
2
3
4

NAME

6       smiRenderOID,  smiRenderValue,  smiRenderNode, smiRenderType - SMI data
7       and MIB data rendering routines
8

SYNOPSIS

10       #include <smi.h>
11
12
13       char *smiRenderOID(unsigned int oidlen, SmiSubid *oid, int flags);
14
15       char *smiRenderValue(SmiValue *smiValuePtr, SmiType *smiTypePtr, int flags);
16
17       char *smiRenderNode(SmiNode *smiNodePtr, int flags);
18
19       char *smiRenderType(SmiType *smiTypePtr, int flags);
20

DESCRIPTION

22       These functions provide can be used to render OIDs, values of MIB data,
23       or names of MIB nodes or types.
24
25       The  smiRenderOID()  function renders an OID given by its length oidlen
26       and its array of sub-identifiers oid*.  The flags can be used  to  con‐
27       trol the resulting format, see FORMATS below.
28
29       The smiRenderValue() function renders a MIB data value given by smiVal‐
30       uePtr. An underlying type smiTypePtr may be supplied to support a  more
31       human friendly rendering.  The flags can be used to control the result‐
32       ing format, see FORMATS below.
33
34       The smiRenderNode() function renders the name of a node given by  smiN‐
35       odePtr.   The  flags  can  be used to control the resulting format, see
36       FORMATS below.
37
38       The smiRenderType() function renders the name of a type given  by  smi‐
39       TypePtr.   The  flags  can be used to control the resulting format, see
40       FORMATS below.
41

FORMATS

43       Each of these functions gets a last argument named  flags.  This  is  a
44       logcially  or-ed set of flags that can be used to control the format of
45       the rendered items:
46
47       SMI_RENDER_NUMERIC
48              Allow numeric representation (default).
49
50       SMI_RENDER_NAME
51              Allow a representation by name(s) if possible.
52
53       SMI_RENDER_QUALIFIED
54              In case of a name representation, force a  module  prefix,  e.g.
55              IF-MIB::ifIndex instead of just ifIndex.
56
57       SMI_RENDER_FORMAT
58              In  case  of smiRenderValue(), force the application of a format
59              specification (e.g. an SMIv2 DISPLAY-HINT) of an underlying type
60              if  the  smiTypePtr  argument is not NULL and this type contains
61              such a format specification.
62
63       SMI_RENDER_PRINTABLE
64              In case of octet string value rendering, force a printable  rep‐
65              resentation if all octets of the octet string are printable.
66
67       SMI_RENDER_UNKNOWN
68              Force  the  return  of  a  string  containing  SMI_LABEL_UNKNOWN
69              ("<unknown>"), if the rendering would fail. This way,  the  only
70              condition where NULL can be returned is the lack of memory.
71
72       SMI_RENDER_ALL
73              Apply a combination of all these flags. This supports the (hope‐
74              fully) most human friendly representations.
75

RETURN VALUE

77       All of these functions return a string, if successful, or NULL in  case
78       of a rendering failure. See also the SMI_RENDER_UNKNOWN flag above.
79

SEE ALSO

81       libsmi(3), smi.h
82

AUTHOR

84       (C)  2002  Frank  Strauss, TU Braunschweig, Germany <strauss@ibr.cs.tu-
85       bs.de>
86
87
88
89IBR                              July 24, 2002                   smi_render(3)
Impressum