File: smi_node.3

package info (click to toggle)
libsmi 0.4.3-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 22,180 kB
  • ctags: 8,219
  • sloc: ansic: 41,578; java: 13,722; yacc: 9,003; sh: 8,191; lex: 1,477; makefile: 442
file content (229 lines) | stat: -rw-r--r-- 7,697 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
.\"
.\" $Id: smi_node.3.in 1639 2004-03-30 15:24:17Z strauss $
.\"
.TH smi_node 3  "March 30, 2004" "IBR" "SMI Management Information Library"
.SH NAME
.\" START OF MAN PAGE COPIES
smiGetNode,
smiGetNodeByOID,
smiGetFirstNode,
smiGetNextNode,
smiGetParentNode,
smiGetRelatedNode,
smiGetFirstChildNode,
smiGetNextChildNode,
smiGetNodeModule,
smiGetNodeType,
smiGetNodeLine,
smiGetFirstElement,
smiGetNextElement,
smiGetElementNode,
smiGetFirstOption,
smiGetNextOption,
smiGetOptionNode,
smiGetFirstRefinement,
smiGetNextRefinement,
smiGetRefinementModule,
smiGetRefinementNode,
smiGetRefinementType,
smiGetRefinementWriteType
.\" END OF MAN PAGE COPIES
\- SMI type
information routines
.SH SYNOPSIS
.nf
.B #include <smi.h>
.RS
.RE
.sp
.BI "SmiNode *smiGetNode(SmiModule *" smiModulePtr ", char *" node );
.RE
.sp
.BI "SmiNode *smiGetNodeByOID(unsigned int " oidlen ", Subid " oid[] );
.RE
.sp
.BI "SmiNode *smiGetFirstNode(SmiModule *" smiModulePtr ", SmiNodekind " kinds );
.RE
.sp
.BI "SmiNode *smiGetNextNode(SmiNode *" smiNodePtr ", SmiNodekind " kinds );
.RE
.sp
.BI "SmiNode *smiGetParentNode(SmiNode *" smiNodePtr );
.RE
.sp
.BI "SmiNode *smiGetRelatedNode(SmiNode *" smiNodePtr );
.RE
.sp
.BI "SmiNode *smiGetFirstChildNode(SmiNode *" smiNodePtr );
.RE
.sp
.BI "SmiNode *smiGetNextChildNode(SmiNode *" smiNodePtr );
.RE
.sp
.BI "SmiModule *smiGetNodeModule(SmiNode *" smiNodePtr );
.RE
.sp
.BI "SmiType *smiGetNodeType(SmiNode *" smiNodePtr );
.RE
.sp
.BI "int smiGetNodeLine(SmiNode *" smiNodePtr );
.RE
.sp
.BI "SmiElement *smiGetFirstElement(SmiNode *" smiNodePtr );
.RE
.sp
.BI "SmiElement *smiGetNextElement(SmiElement *" smiElementPtr );
.RE
.sp
.BI "SmiNode *smiGetElementNode(SmiElement *" smiElementPtr );
.RE
.sp
.BI "SmiOption *smiGetFirstOption(SmiNode *" smiComplianceNodePtr );
.RE
.sp
.BI "SmiOption *smiGetNextOption(SmiOption *" smiOptionPtr );
.RE
.sp
.BI "SmiNode *smiGetOptionNode(SmiOption *" smiOptionPtr );
.RE
.sp
.BI "SmiRefinement *smiGetFirstRefinement(SmiNode *" smiComplianceNodePtr );
.RE
.sp
.BI "SmiRefinement *smiGetNextRefinement(SmiRefinement *" smiRefinementPtr );
.RE
.sp
.BI "SmiNode *smiGetRefinementNode(SmiRefinement *" smiRefinementPtr );
.RE
.sp
.BI "SmiType *smiGetRefinementType(SmiRefinement *" smiRefinementPtr );
.RE
.sp
.BI "SmiType *smiGetRefinementWriteType(SmiRefinement *" smiRefinementPtr );
.RE

typedef struct SmiNode {
    SmiIdentifier       name;
    int                 oidlen;
    SmiSubid            *oid;         /* array of length oidlen */
    SmiDecl             decl;
    SmiAccess           access;
    SmiStatus           status;
    char                *format;
    SmiValue            value;
    char                *units;
    char                *description;
    char                *reference;
    SmiIndexkind        indexkind;
    int                 implied;
    int                 create;
    SmiNodekind         nodekind;
} SmiNode;

typedef struct SmiElement {
    /* no visible attributes */
} SmiElement;

typedef struct SmiOption {
    char                *description;
} SmiOption;

typedef struct SmiRefinement {
    SmiAccess           access;
    char                *description;
} SmiRefinement;

.fi
.SH DESCRIPTION
These functions retrieve information on any SMI node definition in the
object identifier tree, these are ASN.1 object identifier assignments,
MODULE-IDENTITYs, OBJECT-IDENTITYs, OBJECT-TYPEs, NOTIFICATION-TYPEs,
TRAP-TYPEs, OBJECT-GROUPs, NOTIFICATION-GROUPs, MODULE-COMPLIANCEs,
and AGENT-CAPABILITYs in SMIv1/v2 and node, scalar, table,
row, column, notification, group, and compliance statements in SMIng.
.PP
The \fBsmiGetNode()\fP function retrieves a \fBstruct SmiNode\fP that
represents a node of any kind. \fINode\fP may be either a
fully qualified descriptor, a simple node name, or a numerical OID.
Nodes are also found, if \fInode\fP contains an instance identifier
suffix.
If \fIsmiModulePtr\fP is not NULL it used to limit the search to the
given module. If the node is not found, \fBsmiGetNode()\fP returns NULL.
.PP
The \fBsmiGetNodeByOID()\fP function retrieves a \fBstruct SmiNode\fP that
matches the longest prefix of the node that is specified by the
object identifier \fIoid[]\fP with the length \fIoidlen\fP.
If no such node is not found, \fBsmiGetNodeByOID()\fP returns NULL.
.PP
The \fBsmiGetFirstNode()\fP and \fBsmiGetNextNode()\fP functions are
used to iteratively retrieve \fBstruct SmiNode\fPs in tree pre-order.
\fBsmiGetFirstNode()\fP returns the first node defined in the module
specified by \fIsmiModulePtr\fP that is of any kind specified in
the \fIkinds\fP bitset.
Subsequent calls to \fBsmiGetNextNode()\fP return the next node of
any kind specified in the \fIkinds\fP bitset. If there are no
more node definitions in the module, NULL is returned.
.PP
The \fBsmiGetFirstChildNode()\fP and \fBsmiGetNextChildNode()\fP
functions are used to iteratively retrieve \fBstruct SmiNode\fPs that
represent the immediate child nodes of the node specified
by \fIsmiNodePtr\fP passed to the \fBsmiGetFirstChildNode()\fP call.
.PP
The \fBsmiGetParentNode()\fP function is used to retrieve
a \fBstruct SmiNode\fPs that represents the parent node of the node
specified by \fIsmiNodePtr\fP.
.PP
The \fBsmiGetRelatedNode()\fP function is used to retrieve
a \fBstruct SmiNode\fPs that is related to the node specified
by \fIsmiNodePtr\fP. Actually, this is used for SMIv2 table augmentation
entries and similar SMIng constructs.
.PP
The \fBsmiGetNodeModule()\fP function returns the module that defines
the node given by \fIstruct SmiNodePtr\fP.
.PP
The \fBsmiGetNodeType()\fP function returns the type of
the (scalar or columnar) node given by \fIstruct SmiNodePtr\fP.
If \fIstruct SmiNodePtr\fP does not specify a scalar or columnar
node, NULL is returned.
.PP
The \fBsmiGetFirstElement()\fP and \fBsmiGetNextElement()\fP functions are
used to iteratively retrieve \fBstruct SmiElement\fPs that represent
elements of index clauses or notification object lists, groups of object
types or notification types, and mandatory groups of module compliance
statements. The node to which the list belongs has to be specified
by \fIsmiNodePtr\fP. To retrieve the node that is represented by
a \fBstruct SmiElement\fP, the \fBsmiGetElementNode()\fP function has
to be called.
.PP
The \fBsmiGetFirstOption()\fP and \fBsmiGetNextOption()\fP functions are
used to iteratively retrieve \fBstruct SmiOption\fPs that represent
statements on optional (object or notification) groups within the compliance
statement specified by \fIsmiComplianceNodePtr\fP. The group node which is
subject of such a statement can be retrieved by the \fBsmiGetOptionNode()\fP
function.
.PP
Similarly, the \fBsmiGetFirstRefinement()\fP and \fBsmiGetNextRefinement()\fP
functions are used to iteratively retrieve \fBstruct SmiRefinement\fPs that
represent statements on optional object refinements within the compliance
statement specified by \fIsmiComplianceNodePtr\fP. The node which is
subject of such a refinement can be retrieved by
the \fBsmiGetRefinementNode()\fP function. The optional refined type and
write-type of a refinement can be retrieved by
the \fBsmiGetRefinementType()\fP and \fBsmiGetRefinementWriteType()\fP
functions. If they are not present, NULL is returned.
.PP
The \fBsmiGetNodeLine()\fP function returns the line number within the
module where the node specified by \fIsmiNodePtr\fP is defined.
.SH "FILES"
.nf
/usr/local/include/smi.h    SMI library header file
.fi
.SH "SEE ALSO"
.BR libsmi "(3), "
.BR smi_config "(3), "
.BR smi_type "(3), "
.BR smi_module "(3), "
.BR smi.h
.SH "AUTHOR"
(C) 1999-2004 Frank Strauss, TU Braunschweig, Germany <strauss@ibr.cs.tu-bs.de>
.br