Next: Miscellaneous classes
Up: Technical Overview over the
Previous: The SASClient class for
MIB modules allow an SNMP managed agent to let users know about the
structure and format of data available on the agent. The MIB modules
are usually specified in a MIB module file, which needs to be parsed
to understand the syntax and structure of the data available on the
agent.
The MibModule class provides a means to parse and use the
data available in a MIB module file. Each MibModule instance is
created from a MIB module file, and you can load and unload MIB
modules by creating and deleting these instances. The instance
contains all the nodes of the MIB tree as well as defined traps and
textual conventions. A few utility methods and variables are provided,
e.g. getNode() to search the module for a node matching a
specified OID.
The MibModule class makes use of a number of other classes, some
of which are useful for getting additional information on the MIB
module, or specific nodes in the MIB:
- The MibMacro class is used
to parse MIB macros, and only OBJECT-TYPE and TRAP-TYPE
macros are supported. Any parsing of MIB modules would instantiate the
macros for the module being parsed. The MibTrap class is used to
keep data on trap types defined in a module.
- The MibNode class represents a node in the parsed MIB tree. A list of
instances of this class is contained in a MibModule and represents the
MIB tree. This class may also be contained in anSnmpOID instance. A
number of attributes and methods in the MibNode class are provided to
simplify development of applications using the MIB definitions.
- The LeafSyntax class is used to represent any unique syntax,
including textual conventions, that is defined in a MIB module. For
example, INTEGER (SIZE(1..5)), would have it's own
LeafSyntax class instance that represents this syntax. For leaf nodes
in the MIB tree, the MibNode instance contains a
LeafSyntax reference. Thus for a MIB leaf node, LeafSyntax can
be used to determine if a value is within the allowed range, for
example.
Next: Miscellaneous classes
Up: Technical Overview over the
Previous: The SASClient class for
root
8/4/1997