smi_node



smi_node

NAME
SYNOPSIS
DESCRIPTION
FILES
SEE ALSO
AUTHOR

NAME

smiGetNode, smiGetNodeByOID, smiGetFirstNode, smiGetNextNode, smiGetParentNode, smiGetRelatedNode, smiGetFirstChildNode, smiGetNextChildNode, smiGetNodeModule, smiGetNodeType, smiGetNodeLine, smiGetFirstElement, smiGetNextElement, smiGetElementNode, smiGetFirstOption, smiGetNextOption, smiGetOptionNode, smiGetFirstRefinement, smiGetNextRefinement, smiGetRefinementModule, smiGetRefinementNode, smiGetRefinementType, smiGetRefinementWriteType − SMI type information routines

SYNOPSIS

#include <smi.h>

SmiNode *smiGetNode(SmiModule *smiModulePtr, char *node);

SmiNode *smiGetNodeByOID(unsigned int oidlen, SmiSubid oid[]);

SmiNode *smiGetFirstNode(SmiModule *smiModulePtr, SmiNodekind kinds);

SmiNode *smiGetNextNode(SmiNode *smiNodePtr, SmiNodekind kinds);

SmiNode *smiGetParentNode(SmiNode *smiNodePtr);

SmiNode *smiGetRelatedNode(SmiNode *smiNodePtr);

SmiNode *smiGetFirstChildNode(SmiNode *smiNodePtr);

SmiNode *smiGetNextChildNode(SmiNode *smiNodePtr);

SmiModule *smiGetNodeModule(SmiNode *smiNodePtr);

SmiType *smiGetNodeType(SmiNode *smiNodePtr);

int smiGetNodeLine(SmiNode *smiNodePtr);

SmiElement *smiGetFirstElement(SmiNode *smiNodePtr);

SmiElement *smiGetNextElement(SmiElement *smiElementPtr);

SmiNode *smiGetElementNode(SmiElement *smiElementPtr);

SmiOption *smiGetFirstOption(SmiNode *smiComplianceNodePtr);

SmiOption *smiGetNextOption(SmiOption *smiOptionPtr);

SmiNode *smiGetOptionNode(SmiOption *smiOptionPtr);

SmiRefinement *smiGetFirstRefinement(SmiNode *smiComplianceNodePtr);

SmiRefinement *smiGetNextRefinement(SmiRefinement *smiRefinementPtr);

SmiNode *smiGetRefinementNode(SmiRefinement *smiRefinementPtr);

SmiType *smiGetRefinementType(SmiRefinement *smiRefinementPtr);

SmiType *smiGetRefinementWriteType(SmiRefinement *smiRefinementPtr);

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;

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.

The smiGetNode() function retrieves a struct SmiNode that represents a node of any kind. Node may be either a fully qualified descriptor, a simple node name, or a numerical OID. Nodes are also found, if node contains an instance identifier suffix. If smiModulePtr is not NULL it used to limit the search to the given module. If the node is not found, smiGetNode() returns NULL.

The smiGetNodeByOID() function retrieves a struct SmiNode that matches the longest prefix of the node that is specified by the object identifier oid[] with the length oidlen. If no such node is not found, smiGetNodeByOID() returns NULL.

The smiGetFirstNode() and smiGetNextNode() functions are used to iteratively retrieve struct SmiNodes in tree pre-order. smiGetFirstNode() returns the first node defined in the module specified by smiModulePtr that is of any kind specified in the kinds bitset. Subsequent calls to smiGetNextNode() return the next node of any kind specified in the kinds bitset. If there are no more node definitions in the module, NULL is returned.

The smiGetFirstChildNode() and smiGetNextChildNode() functions are used to iteratively retrieve struct SmiNodes that represent the immediate child nodes of the node specified by smiNodePtr passed to the smiGetFirstChildNode() call.

The smiGetParentNode() function is used to retrieve a struct SmiNodes that represents the parent node of the node specified by smiNodePtr.

The smiGetRelatedNode() function is used to retrieve a struct SmiNodes that is related to the node specified by smiNodePtr. Actually, this is used for SMIv2 table augmentation entries and similar SMIng constructs.

The smiGetNodeModule() function returns the module that defines the node given by struct SmiNodePtr.

The smiGetNodeType() function returns the type of the (scalar or columnar) node given by struct SmiNodePtr. If struct SmiNodePtr does not specify a scalar or columnar node, NULL is returned.

The smiGetFirstElement() and smiGetNextElement() functions are used to iteratively retrieve struct SmiElements 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 smiNodePtr. To retrieve the node that is represented by a struct SmiElement, the smiGetElementNode() function has to be called.

The smiGetFirstOption() and smiGetNextOption() functions are used to iteratively retrieve struct SmiOptions that represent statements on optional (object or notification) groups within the compliance statement specified by smiComplianceNodePtr. The group node which is subject of such a statement can be retrieved by the smiGetOptionNode() function.

Similarly, the smiGetFirstRefinement() and smiGetNextRefinement() functions are used to iteratively retrieve struct SmiRefinements that represent statements on optional object refinements within the compliance statement specified by smiComplianceNodePtr. The node which is subject of such a refinement can be retrieved by the smiGetRefinementNode() function. The optional refined type and write-type of a refinement can be retrieved by the smiGetRefinementType() and smiGetRefinementWriteType() functions. If they are not present, NULL is returned.

The smiGetNodeLine() function returns the line number within the module where the node specified by smiNodePtr is defined.

FILES

/usr/include/smi.h SMI library header file

SEE ALSO

libsmi(3), smi_config(3), smi_type(3), smi_module(3), smi.h

AUTHOR

(C) 1999-2004 Frank Strauss, TU Braunschweig, Germany <strauss@ibr.cs.tu-bs.de>







Opportunity


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.





Free Software


Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.


Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.





Free Books


The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.


Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.





Education


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.


Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.