smi_node(3)

πŸ’– NAME πŸ’–

okay bestie, welcome to smi_node(3) from the SMI Management Information Library β€” this is the page for the SMI type information routines. The whole squad is: 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 ✨

here's the exact prototype block, no cap β€” copy it character for character πŸ’…

#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 *smiGetFirstAlias(SmiNode *smiNodePtr);

SmiNode *smiGetNextAlias(SmiNode *smiNodePtr);

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 🌸

okay so these functions are your little info goblins for any SMI node definition in the object identifier tree. We're talking 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 β€” plus node, scalar, table, row, column, notification, group, and compliance statements in SMIng. iconic. πŸ‘‘

  • smiGetNode() β€” 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's used to limit the search to the given module. If the node is not found, smiGetNode() returns NULL.
  • smiGetNodeByOID() β€” retrieves a struct SmiNode that matches the longest prefix of the node specified by the object identifier oid[] with the length oidlen. If no such node is found, smiGetNodeByOID() returns NULL.
  • smiGetFirstNode() and smiGetNextNode() β€” 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.
  • smiGetFirstAlias() and smiGetNextAlias() β€” used to iteratively retrieve struct SmiNodes that have the same object identifier as the smiNodePtr given as an argument. There is always one alias node, which is the smiNodePtr itself.
  • smiGetFirstChildNode() and smiGetNextChildNode() β€” used to iteratively retrieve struct SmiNodes that represent the immediate child nodes of the node specified by smiNodePtr passed to the smiGetFirstChildNode() call.
  • smiGetParentNode() β€” used to retrieve a struct SmiNode that represents the parent node of the node specified by smiNodePtr.
  • smiGetRelatedNode() β€” used to retrieve a struct SmiNode that is related to the node specified by smiNodePtr. Actually, this is used for SMIv2 table augmentation entries and similar SMIng constructs.
  • smiGetNodeModule() β€” returns the module that defines the node given by struct SmiNodePtr.
  • smiGetNodeType() β€” 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.
  • smiGetFirstElement() and smiGetNextElement() β€” 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.
  • smiGetFirstOption() and smiGetNextOption() β€” 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.
  • smiGetFirstRefinement() and smiGetNextRefinement() β€” similarly, 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.
  • smiGetNodeLine() β€” returns the line number within the module where the node specified by smiNodePtr is defined.

πŸŽ€ FILES πŸŽ€

  • ${prefix}/include/smi.h β€” SMI library header file

πŸ¦‹ SEE ALSO πŸ¦‹

libsmi(3), smi_config(3), smi_type(3), smi_module(3), smi.h β€” go read these next, bestie, iykyk πŸ’–


πŸ‘‘ AUTHOR πŸ‘‘

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

mwah πŸ’‹ β€” this page is from IBR, dated March 30, 2004, and it's the smi_node(3) manual page. bye bestie! πŸŽ€

πŸ“¦ where this page comes from