Blame lib/smi_node.3

Packit 022b05
.\"
Packit 022b05
.\" $Id: smi_node.3.in 5762 2006-08-17 08:10:17Z schoenw $
Packit 022b05
.\"
Packit 022b05
.TH smi_node 3  "March 30, 2004" "IBR" "SMI Management Information Library"
Packit 022b05
.SH NAME
Packit 022b05
.\" START OF MAN PAGE COPIES
Packit 022b05
smiGetNode,
Packit 022b05
smiGetNodeByOID,
Packit 022b05
smiGetFirstNode,
Packit 022b05
smiGetNextNode,
Packit 022b05
smiGetParentNode,
Packit 022b05
smiGetRelatedNode,
Packit 022b05
smiGetFirstChildNode,
Packit 022b05
smiGetNextChildNode,
Packit 022b05
smiGetNodeModule,
Packit 022b05
smiGetNodeType,
Packit 022b05
smiGetNodeLine,
Packit 022b05
smiGetFirstElement,
Packit 022b05
smiGetNextElement,
Packit 022b05
smiGetElementNode,
Packit 022b05
smiGetFirstOption,
Packit 022b05
smiGetNextOption,
Packit 022b05
smiGetOptionNode,
Packit 022b05
smiGetFirstRefinement,
Packit 022b05
smiGetNextRefinement,
Packit 022b05
smiGetRefinementModule,
Packit 022b05
smiGetRefinementNode,
Packit 022b05
smiGetRefinementType,
Packit 022b05
smiGetRefinementWriteType
Packit 022b05
.\" END OF MAN PAGE COPIES
Packit 022b05
\- SMI type
Packit 022b05
information routines
Packit 022b05
.SH SYNOPSIS
Packit 022b05
.nf
Packit 022b05
.B #include <smi.h>
Packit 022b05
.RS
Packit 022b05
.RE
Packit 022b05
.sp
Packit 022b05
.BI "SmiNode *smiGetNode(SmiModule *" smiModulePtr ", char *" node );
Packit 022b05
.RE
Packit 022b05
.sp
Packit 022b05
.BI "SmiNode *smiGetNodeByOID(unsigned int " oidlen ", SmiSubid " oid[] );
Packit 022b05
.RE
Packit 022b05
.sp
Packit 022b05
.BI "SmiNode *smiGetFirstNode(SmiModule *" smiModulePtr ", SmiNodekind " kinds );
Packit 022b05
.RE
Packit 022b05
.sp
Packit 022b05
.BI "SmiNode *smiGetNextNode(SmiNode *" smiNodePtr ", SmiNodekind " kinds );
Packit 022b05
.RE
Packit 022b05
.sp
Packit 022b05
.BI "SmiNode *smiGetParentNode(SmiNode *" smiNodePtr );
Packit 022b05
.RE
Packit 022b05
.sp
Packit 022b05
.BI "SmiNode *smiGetRelatedNode(SmiNode *" smiNodePtr );
Packit 022b05
.RE
Packit 022b05
.sp
Packit 022b05
.BI "SmiNode *smiGetFirstChildNode(SmiNode *" smiNodePtr );
Packit 022b05
.RE
Packit 022b05
.sp
Packit 022b05
.BI "SmiNode *smiGetNextChildNode(SmiNode *" smiNodePtr );
Packit 022b05
.RE
Packit 022b05
.sp
Packit 022b05
.BI "SmiModule *smiGetNodeModule(SmiNode *" smiNodePtr );
Packit 022b05
.RE
Packit 022b05
.sp
Packit 022b05
.BI "SmiType *smiGetNodeType(SmiNode *" smiNodePtr );
Packit 022b05
.RE
Packit 022b05
.sp
Packit 022b05
.BI "int smiGetNodeLine(SmiNode *" smiNodePtr );
Packit 022b05
.RE
Packit 022b05
.sp
Packit 022b05
.BI "SmiElement *smiGetFirstElement(SmiNode *" smiNodePtr );
Packit 022b05
.RE
Packit 022b05
.sp
Packit 022b05
.BI "SmiElement *smiGetNextElement(SmiElement *" smiElementPtr );
Packit 022b05
.RE
Packit 022b05
.sp
Packit 022b05
.BI "SmiNode *smiGetElementNode(SmiElement *" smiElementPtr );
Packit 022b05
.RE
Packit 022b05
.sp
Packit 022b05
.BI "SmiOption *smiGetFirstOption(SmiNode *" smiComplianceNodePtr );
Packit 022b05
.RE
Packit 022b05
.sp
Packit 022b05
.BI "SmiOption *smiGetNextOption(SmiOption *" smiOptionPtr );
Packit 022b05
.RE
Packit 022b05
.sp
Packit 022b05
.BI "SmiNode *smiGetOptionNode(SmiOption *" smiOptionPtr );
Packit 022b05
.RE
Packit 022b05
.sp
Packit 022b05
.BI "SmiRefinement *smiGetFirstRefinement(SmiNode *" smiComplianceNodePtr );
Packit 022b05
.RE
Packit 022b05
.sp
Packit 022b05
.BI "SmiRefinement *smiGetNextRefinement(SmiRefinement *" smiRefinementPtr );
Packit 022b05
.RE
Packit 022b05
.sp
Packit 022b05
.BI "SmiNode *smiGetRefinementNode(SmiRefinement *" smiRefinementPtr );
Packit 022b05
.RE
Packit 022b05
.sp
Packit 022b05
.BI "SmiType *smiGetRefinementType(SmiRefinement *" smiRefinementPtr );
Packit 022b05
.RE
Packit 022b05
.sp
Packit 022b05
.BI "SmiType *smiGetRefinementWriteType(SmiRefinement *" smiRefinementPtr );
Packit 022b05
.RE
Packit 022b05
Packit 022b05
typedef struct SmiNode {
Packit 022b05
    SmiIdentifier       name;
Packit 022b05
    int                 oidlen;
Packit 022b05
    SmiSubid            *oid;         /* array of length oidlen */
Packit 022b05
    SmiDecl             decl;
Packit 022b05
    SmiAccess           access;
Packit 022b05
    SmiStatus           status;
Packit 022b05
    char                *format;
Packit 022b05
    SmiValue            value;
Packit 022b05
    char                *units;
Packit 022b05
    char                *description;
Packit 022b05
    char                *reference;
Packit 022b05
    SmiIndexkind        indexkind;
Packit 022b05
    int                 implied;
Packit 022b05
    int                 create;
Packit 022b05
    SmiNodekind         nodekind;
Packit 022b05
} SmiNode;
Packit 022b05
Packit 022b05
typedef struct SmiElement {
Packit 022b05
    /* no visible attributes */
Packit 022b05
} SmiElement;
Packit 022b05
Packit 022b05
typedef struct SmiOption {
Packit 022b05
    char                *description;
Packit 022b05
} SmiOption;
Packit 022b05
Packit 022b05
typedef struct SmiRefinement {
Packit 022b05
    SmiAccess           access;
Packit 022b05
    char                *description;
Packit 022b05
} SmiRefinement;
Packit 022b05
Packit 022b05
.fi
Packit 022b05
.SH DESCRIPTION
Packit 022b05
These functions retrieve information on any SMI node definition in the
Packit 022b05
object identifier tree, these are ASN.1 object identifier assignments,
Packit 022b05
MODULE-IDENTITYs, OBJECT-IDENTITYs, OBJECT-TYPEs, NOTIFICATION-TYPEs,
Packit 022b05
TRAP-TYPEs, OBJECT-GROUPs, NOTIFICATION-GROUPs, MODULE-COMPLIANCEs,
Packit 022b05
and AGENT-CAPABILITYs in SMIv1/v2 and node, scalar, table,
Packit 022b05
row, column, notification, group, and compliance statements in SMIng.
Packit 022b05
.PP
Packit 022b05
The \fBsmiGetNode()\fP function retrieves a \fBstruct SmiNode\fP that
Packit 022b05
represents a node of any kind. \fINode\fP may be either a
Packit 022b05
fully qualified descriptor, a simple node name, or a numerical OID.
Packit 022b05
Nodes are also found, if \fInode\fP contains an instance identifier
Packit 022b05
suffix.
Packit 022b05
If \fIsmiModulePtr\fP is not NULL it used to limit the search to the
Packit 022b05
given module. If the node is not found, \fBsmiGetNode()\fP returns NULL.
Packit 022b05
.PP
Packit 022b05
The \fBsmiGetNodeByOID()\fP function retrieves a \fBstruct SmiNode\fP that
Packit 022b05
matches the longest prefix of the node that is specified by the
Packit 022b05
object identifier \fIoid[]\fP with the length \fIoidlen\fP.
Packit 022b05
If no such node is not found, \fBsmiGetNodeByOID()\fP returns NULL.
Packit 022b05
.PP
Packit 022b05
The \fBsmiGetFirstNode()\fP and \fBsmiGetNextNode()\fP functions are
Packit 022b05
used to iteratively retrieve \fBstruct SmiNode\fPs in tree pre-order.
Packit 022b05
\fBsmiGetFirstNode()\fP returns the first node defined in the module
Packit 022b05
specified by \fIsmiModulePtr\fP that is of any kind specified in
Packit 022b05
the \fIkinds\fP bitset.
Packit 022b05
Subsequent calls to \fBsmiGetNextNode()\fP return the next node of
Packit 022b05
any kind specified in the \fIkinds\fP bitset. If there are no
Packit 022b05
more node definitions in the module, NULL is returned.
Packit 022b05
.PP
Packit 022b05
The \fBsmiGetFirstChildNode()\fP and \fBsmiGetNextChildNode()\fP
Packit 022b05
functions are used to iteratively retrieve \fBstruct SmiNode\fPs that
Packit 022b05
represent the immediate child nodes of the node specified
Packit 022b05
by \fIsmiNodePtr\fP passed to the \fBsmiGetFirstChildNode()\fP call.
Packit 022b05
.PP
Packit 022b05
The \fBsmiGetParentNode()\fP function is used to retrieve
Packit 022b05
a \fBstruct SmiNode\fPs that represents the parent node of the node
Packit 022b05
specified by \fIsmiNodePtr\fP.
Packit 022b05
.PP
Packit 022b05
The \fBsmiGetRelatedNode()\fP function is used to retrieve
Packit 022b05
a \fBstruct SmiNode\fPs that is related to the node specified
Packit 022b05
by \fIsmiNodePtr\fP. Actually, this is used for SMIv2 table augmentation
Packit 022b05
entries and similar SMIng constructs.
Packit 022b05
.PP
Packit 022b05
The \fBsmiGetNodeModule()\fP function returns the module that defines
Packit 022b05
the node given by \fIstruct SmiNodePtr\fP.
Packit 022b05
.PP
Packit 022b05
The \fBsmiGetNodeType()\fP function returns the type of
Packit 022b05
the (scalar or columnar) node given by \fIstruct SmiNodePtr\fP.
Packit 022b05
If \fIstruct SmiNodePtr\fP does not specify a scalar or columnar
Packit 022b05
node, NULL is returned.
Packit 022b05
.PP
Packit 022b05
The \fBsmiGetFirstElement()\fP and \fBsmiGetNextElement()\fP functions are
Packit 022b05
used to iteratively retrieve \fBstruct SmiElement\fPs that represent
Packit 022b05
elements of index clauses or notification object lists, groups of object
Packit 022b05
types or notification types, and mandatory groups of module compliance
Packit 022b05
statements. The node to which the list belongs has to be specified
Packit 022b05
by \fIsmiNodePtr\fP. To retrieve the node that is represented by
Packit 022b05
a \fBstruct SmiElement\fP, the \fBsmiGetElementNode()\fP function has
Packit 022b05
to be called.
Packit 022b05
.PP
Packit 022b05
The \fBsmiGetFirstOption()\fP and \fBsmiGetNextOption()\fP functions are
Packit 022b05
used to iteratively retrieve \fBstruct SmiOption\fPs that represent
Packit 022b05
statements on optional (object or notification) groups within the compliance
Packit 022b05
statement specified by \fIsmiComplianceNodePtr\fP. The group node which is
Packit 022b05
subject of such a statement can be retrieved by the \fBsmiGetOptionNode()\fP
Packit 022b05
function.
Packit 022b05
.PP
Packit 022b05
Similarly, the \fBsmiGetFirstRefinement()\fP and \fBsmiGetNextRefinement()\fP
Packit 022b05
functions are used to iteratively retrieve \fBstruct SmiRefinement\fPs that
Packit 022b05
represent statements on optional object refinements within the compliance
Packit 022b05
statement specified by \fIsmiComplianceNodePtr\fP. The node which is
Packit 022b05
subject of such a refinement can be retrieved by
Packit 022b05
the \fBsmiGetRefinementNode()\fP function. The optional refined type and
Packit 022b05
write-type of a refinement can be retrieved by
Packit 022b05
the \fBsmiGetRefinementType()\fP and \fBsmiGetRefinementWriteType()\fP
Packit 022b05
functions. If they are not present, NULL is returned.
Packit 022b05
.PP
Packit 022b05
The \fBsmiGetNodeLine()\fP function returns the line number within the
Packit 022b05
module where the node specified by \fIsmiNodePtr\fP is defined.
Packit 022b05
.SH "FILES"
Packit 022b05
.nf
Packit 022b05
${prefix}/include/smi.h    SMI library header file
Packit 022b05
.fi
Packit 022b05
.SH "SEE ALSO"
Packit 022b05
.BR libsmi "(3), "
Packit 022b05
.BR smi_config "(3), "
Packit 022b05
.BR smi_type "(3), "
Packit 022b05
.BR smi_module "(3), "
Packit 022b05
.BR smi.h
Packit 022b05
.SH "AUTHOR"
Packit 022b05
(C) 1999-2004 Frank Strauss, TU Braunschweig, Germany <strauss@ibr.cs.tu-bs.de>
Packit 022b05
.br