Imported Upstream version 0.4.8
[platform/upstream/libsmi.git] / lib / smi_node.3.in
1 .\"
2 .\" $Id: smi_node.3.in 5762 2006-08-17 08:10:17Z schoenw $
3 .\"
4 .TH smi_node 3  "March 30, 2004" "IBR" "SMI Management Information Library"
5 .SH NAME
6 .\" START OF MAN PAGE COPIES
7 smiGetNode,
8 smiGetNodeByOID,
9 smiGetFirstNode,
10 smiGetNextNode,
11 smiGetParentNode,
12 smiGetRelatedNode,
13 smiGetFirstChildNode,
14 smiGetNextChildNode,
15 smiGetNodeModule,
16 smiGetNodeType,
17 smiGetNodeLine,
18 smiGetFirstElement,
19 smiGetNextElement,
20 smiGetElementNode,
21 smiGetFirstOption,
22 smiGetNextOption,
23 smiGetOptionNode,
24 smiGetFirstRefinement,
25 smiGetNextRefinement,
26 smiGetRefinementModule,
27 smiGetRefinementNode,
28 smiGetRefinementType,
29 smiGetRefinementWriteType
30 .\" END OF MAN PAGE COPIES
31 \- SMI type
32 information routines
33 .SH SYNOPSIS
34 .nf
35 .B #include <smi.h>
36 .RS
37 .RE
38 .sp
39 .BI "SmiNode *smiGetNode(SmiModule *" smiModulePtr ", char *" node );
40 .RE
41 .sp
42 .BI "SmiNode *smiGetNodeByOID(unsigned int " oidlen ", SmiSubid " oid[] );
43 .RE
44 .sp
45 .BI "SmiNode *smiGetFirstNode(SmiModule *" smiModulePtr ", SmiNodekind " kinds );
46 .RE
47 .sp
48 .BI "SmiNode *smiGetNextNode(SmiNode *" smiNodePtr ", SmiNodekind " kinds );
49 .RE
50 .sp
51 .BI "SmiNode *smiGetParentNode(SmiNode *" smiNodePtr );
52 .RE
53 .sp
54 .BI "SmiNode *smiGetRelatedNode(SmiNode *" smiNodePtr );
55 .RE
56 .sp
57 .BI "SmiNode *smiGetFirstChildNode(SmiNode *" smiNodePtr );
58 .RE
59 .sp
60 .BI "SmiNode *smiGetNextChildNode(SmiNode *" smiNodePtr );
61 .RE
62 .sp
63 .BI "SmiModule *smiGetNodeModule(SmiNode *" smiNodePtr );
64 .RE
65 .sp
66 .BI "SmiType *smiGetNodeType(SmiNode *" smiNodePtr );
67 .RE
68 .sp
69 .BI "int smiGetNodeLine(SmiNode *" smiNodePtr );
70 .RE
71 .sp
72 .BI "SmiElement *smiGetFirstElement(SmiNode *" smiNodePtr );
73 .RE
74 .sp
75 .BI "SmiElement *smiGetNextElement(SmiElement *" smiElementPtr );
76 .RE
77 .sp
78 .BI "SmiNode *smiGetElementNode(SmiElement *" smiElementPtr );
79 .RE
80 .sp
81 .BI "SmiOption *smiGetFirstOption(SmiNode *" smiComplianceNodePtr );
82 .RE
83 .sp
84 .BI "SmiOption *smiGetNextOption(SmiOption *" smiOptionPtr );
85 .RE
86 .sp
87 .BI "SmiNode *smiGetOptionNode(SmiOption *" smiOptionPtr );
88 .RE
89 .sp
90 .BI "SmiRefinement *smiGetFirstRefinement(SmiNode *" smiComplianceNodePtr );
91 .RE
92 .sp
93 .BI "SmiRefinement *smiGetNextRefinement(SmiRefinement *" smiRefinementPtr );
94 .RE
95 .sp
96 .BI "SmiNode *smiGetRefinementNode(SmiRefinement *" smiRefinementPtr );
97 .RE
98 .sp
99 .BI "SmiType *smiGetRefinementType(SmiRefinement *" smiRefinementPtr );
100 .RE
101 .sp
102 .BI "SmiType *smiGetRefinementWriteType(SmiRefinement *" smiRefinementPtr );
103 .RE
104
105 typedef struct SmiNode {
106     SmiIdentifier       name;
107     int                 oidlen;
108     SmiSubid            *oid;         /* array of length oidlen */
109     SmiDecl             decl;
110     SmiAccess           access;
111     SmiStatus           status;
112     char                *format;
113     SmiValue            value;
114     char                *units;
115     char                *description;
116     char                *reference;
117     SmiIndexkind        indexkind;
118     int                 implied;
119     int                 create;
120     SmiNodekind         nodekind;
121 } SmiNode;
122
123 typedef struct SmiElement {
124     /* no visible attributes */
125 } SmiElement;
126
127 typedef struct SmiOption {
128     char                *description;
129 } SmiOption;
130
131 typedef struct SmiRefinement {
132     SmiAccess           access;
133     char                *description;
134 } SmiRefinement;
135
136 .fi
137 .SH DESCRIPTION
138 These functions retrieve information on any SMI node definition in the
139 object identifier tree, these are ASN.1 object identifier assignments,
140 MODULE-IDENTITYs, OBJECT-IDENTITYs, OBJECT-TYPEs, NOTIFICATION-TYPEs,
141 TRAP-TYPEs, OBJECT-GROUPs, NOTIFICATION-GROUPs, MODULE-COMPLIANCEs,
142 and AGENT-CAPABILITYs in SMIv1/v2 and node, scalar, table,
143 row, column, notification, group, and compliance statements in SMIng.
144 .PP
145 The \fBsmiGetNode()\fP function retrieves a \fBstruct SmiNode\fP that
146 represents a node of any kind. \fINode\fP may be either a
147 fully qualified descriptor, a simple node name, or a numerical OID.
148 Nodes are also found, if \fInode\fP contains an instance identifier
149 suffix.
150 If \fIsmiModulePtr\fP is not NULL it used to limit the search to the
151 given module. If the node is not found, \fBsmiGetNode()\fP returns NULL.
152 .PP
153 The \fBsmiGetNodeByOID()\fP function retrieves a \fBstruct SmiNode\fP that
154 matches the longest prefix of the node that is specified by the
155 object identifier \fIoid[]\fP with the length \fIoidlen\fP.
156 If no such node is not found, \fBsmiGetNodeByOID()\fP returns NULL.
157 .PP
158 The \fBsmiGetFirstNode()\fP and \fBsmiGetNextNode()\fP functions are
159 used to iteratively retrieve \fBstruct SmiNode\fPs in tree pre-order.
160 \fBsmiGetFirstNode()\fP returns the first node defined in the module
161 specified by \fIsmiModulePtr\fP that is of any kind specified in
162 the \fIkinds\fP bitset.
163 Subsequent calls to \fBsmiGetNextNode()\fP return the next node of
164 any kind specified in the \fIkinds\fP bitset. If there are no
165 more node definitions in the module, NULL is returned.
166 .PP
167 The \fBsmiGetFirstChildNode()\fP and \fBsmiGetNextChildNode()\fP
168 functions are used to iteratively retrieve \fBstruct SmiNode\fPs that
169 represent the immediate child nodes of the node specified
170 by \fIsmiNodePtr\fP passed to the \fBsmiGetFirstChildNode()\fP call.
171 .PP
172 The \fBsmiGetParentNode()\fP function is used to retrieve
173 a \fBstruct SmiNode\fPs that represents the parent node of the node
174 specified by \fIsmiNodePtr\fP.
175 .PP
176 The \fBsmiGetRelatedNode()\fP function is used to retrieve
177 a \fBstruct SmiNode\fPs that is related to the node specified
178 by \fIsmiNodePtr\fP. Actually, this is used for SMIv2 table augmentation
179 entries and similar SMIng constructs.
180 .PP
181 The \fBsmiGetNodeModule()\fP function returns the module that defines
182 the node given by \fIstruct SmiNodePtr\fP.
183 .PP
184 The \fBsmiGetNodeType()\fP function returns the type of
185 the (scalar or columnar) node given by \fIstruct SmiNodePtr\fP.
186 If \fIstruct SmiNodePtr\fP does not specify a scalar or columnar
187 node, NULL is returned.
188 .PP
189 The \fBsmiGetFirstElement()\fP and \fBsmiGetNextElement()\fP functions are
190 used to iteratively retrieve \fBstruct SmiElement\fPs that represent
191 elements of index clauses or notification object lists, groups of object
192 types or notification types, and mandatory groups of module compliance
193 statements. The node to which the list belongs has to be specified
194 by \fIsmiNodePtr\fP. To retrieve the node that is represented by
195 a \fBstruct SmiElement\fP, the \fBsmiGetElementNode()\fP function has
196 to be called.
197 .PP
198 The \fBsmiGetFirstOption()\fP and \fBsmiGetNextOption()\fP functions are
199 used to iteratively retrieve \fBstruct SmiOption\fPs that represent
200 statements on optional (object or notification) groups within the compliance
201 statement specified by \fIsmiComplianceNodePtr\fP. The group node which is
202 subject of such a statement can be retrieved by the \fBsmiGetOptionNode()\fP
203 function.
204 .PP
205 Similarly, the \fBsmiGetFirstRefinement()\fP and \fBsmiGetNextRefinement()\fP
206 functions are used to iteratively retrieve \fBstruct SmiRefinement\fPs that
207 represent statements on optional object refinements within the compliance
208 statement specified by \fIsmiComplianceNodePtr\fP. The node which is
209 subject of such a refinement can be retrieved by
210 the \fBsmiGetRefinementNode()\fP function. The optional refined type and
211 write-type of a refinement can be retrieved by
212 the \fBsmiGetRefinementType()\fP and \fBsmiGetRefinementWriteType()\fP
213 functions. If they are not present, NULL is returned.
214 .PP
215 The \fBsmiGetNodeLine()\fP function returns the line number within the
216 module where the node specified by \fIsmiNodePtr\fP is defined.
217 .SH "FILES"
218 .nf
219 @includedir@/smi.h    SMI library header file
220 .fi
221 .SH "SEE ALSO"
222 .BR libsmi "(3), "
223 .BR smi_config "(3), "
224 .BR smi_type "(3), "
225 .BR smi_module "(3), "
226 .BR smi.h
227 .SH "AUTHOR"
228 (C) 1999-2004 Frank Strauss, TU Braunschweig, Germany <strauss@ibr.cs.tu-bs.de>
229 .br