MIB Browser

MIB Browser Reference


MIB Browser Reference diagram


The "MIB Browser" scripting interface provides access to compiled MIB objects, and their definitions. You can also compile MIBs from the command line using the methods of this interface.

Links

MIBBrowser (top level object)

The top level object used to navigate SNMP MIB definitions and to compile raw MIB files in ASN.1 format into Unbrowse SNMP. When you compile SNMP MIBs into Unbrowse SNMP, they are converted into a compact fast loading format called the *.VOSMI. This allows Unbrowse SNMP to load and search MIB modules rapidly.

Creating the top level object

VBScript

Set Mibbrowser = CreateObject("UnbrowseSNMP.MIBBrowser")

Ruby

browser = WIN32OLE.New("UnbrowseSNMP.MIBBrowser")

Events

None

Properties and Methods

NameParametersAccessDescription
CompileASNString - full path to the MIB file

MIBModule Object - Return value
NACompiles the specified MIB file and return a MIBModule object containing all the information about the objects in the MIB
SaveAsString - file nameNASave the compiled file into this file name. Usually this is the file "modulename".vosmi
GetErrorResultNumeric - ResultNA0 - if the MIB compilation was a success
1 - if failure due to errors
2 - if warnings present, but success
GetErrorSummaryNumeric - Return number of errors

Numeric - Return number of warnings
NAReturns the number of errors and warnings that resulted from a CompileASN method
SetPathString - pathNAAdd a semicolon separated list of paths to search from IMPORTED MIBs while compiling
GetModuleMIBModule object - returnNAReturns the MIB module object
GetModuleIndex
Collection of NodesNAAll the SNMP objects defined in this module
ErrorTextString ReadError text that resulted from a CompileASN or Compile operation
ErrorMessageSeverity
NumericRead
Write
A number from 0 to 9.
This controls the granularity of the error messages
StrictnessNumericRead
Write
A number from 0 to 9.
This controls how strict the MIB compiler is
AddPathString - path to addNAAdds a path to the list of paths to search for IMPORTed MIB definition files
EnableDeepSearchBoolReadDeep Searching is an advanced feature of Unbrowse SNMP.
When set to true: Unbrowse SNMP does not assume any naming convention for MIB files. So, as while searching for IMPORTed modules, it scans the the module definition ASN.1 block looking for a match.
OpenString - path of compiled file

MIB Module object - Return value
NAOpen a pre-compiled MIB Module stored in the given VOSMI file.


MIBModule

Corresponds to a single SNMP MIB module.

Events

None

Properties and Methods

NameParametersAccessDescription
NameStringRead
Write
The name of the MIB module
DatabasePathStringReadThe full path of the compiled MIB module file.

The compiled MIB module files are typically stored in the Unbrowse MIB repository with the extension *.VOSMI
PathStringRead
Write
The full path of the plain MIB file.

Plain MIB files are the normal ASN.1 MIB definition files.
OrganizationStringRead
Write
Organization name
ContactInfoStringRead
Write
Contact information
DescriptionStringRead
Write
Description section from the MIB definition
ReferenceStringRead
Write
Reference
FindNodeByNameString - Node name

MIBNode object - Return value
NAThis method searches the MIB module for a given node by name (eg, sysUpTime).
FindBestOIDMatchString - OID

MIB Node object - Return value
NASearch the MIB module for a node with an OID with the longest match of the input OID.

If an exact match is found, that node is returned.
ChildNodesCollection of MIBNode objectsNAA collection of all the node defined in this MIB module


MIBNode

Corresponds to a single node defined in the MIB module

Events

None

Properties and Methods

NameParametersAccessDescription
NameStringRead
Write
The name of the node.

Example : "sysUpTime"
OIDStringRead
Write
The OID of the node.
DescriptionStringRead
Write
The description of the node as specified in the MIB definition.
NodeTypeNumeric -

see NodeTypeEnum
ReadThe node type. See the NodeTypeEnum for a list of valid NodeTypes.
OIDNameStringReadThe full name of the node

Example: ".iso.dod.internet.mgmt"
ShortOIDNumericRead
Write
The last digit of the OID
FindNodeByNameString - node name

MIBNode object - return value
NASearch all the children of this node for a given name
Type
MIBNodeType object - return valueReadYou can use the MIBNodeType object for more information about the type of the node.
ChildrenCollection of MIBNode objectsReadAll the immediate children of this node


MIBNodeType

An SNMP Type object.

Events

None

Properties and Methods

NameParametersAccessDescription
NameStringRead
Write
Name of the type
Description
StringRead
Write
Description
FindNameForNumberNumeric - a numeric enum value

String - the name for the enum
NAThis method is used to lookup enumerated name value pairs in the type definition.

Example :

Set MyType = Mod.FindNodeByName("ifType").Type
TypeStr = MyType.FindNameForNumber (6)

Will return "Ethernet/CSMA-CD"
BaseTypeNumeric - see the BaseType enumeration NAThe base type.

See the basetype enum for a list of all valid basetypes.


Enumerations

BaseType enumeration

typedef enum VSmiBaseType {
    VSMI_BASETYPE_UNKNOWN                = 0,  
    VSMI_BASETYPE_INTEGER32              = 1,  
    VSMI_BASETYPE_OCTETSTRING            = 2,
    VSMI_BASETYPE_OBJECTIDENTIFIER       = 3,
    VSMI_BASETYPE_UNSIGNED32             = 4,
    VSMI_BASETYPE_INTEGER64              = 5,  
    VSMI_BASETYPE_UNSIGNED64             = 6,  
    VSMI_BASETYPE_FLOAT32                = 7,  
    VSMI_BASETYPE_FLOAT64                = 8,  
    VSMI_BASETYPE_FLOAT128               = 9,  
    VSMI_BASETYPE_ENUM                   = 10,
    VSMI_BASETYPE_BITS                   = 11 
} VSmiBaseType;

NodeType enumeration

typedef enum VSmiNodeType {
        VSMI_NODETYPE_UNKNOWN                   = 0,
        VSMI_NODETYPE_LEAF                      = 1,
        VSMI_NODETYPE_COMPLIANCE                = 2,
        VSMI_NODETYPE_CONFORMANCE               = 3,
        VSMI_NODETYPE_OBJECT                    = 4,
        VSMI_NODETYPE_NOTIFICATION              = 5,
        VSMI_NODETYPE_TABLE                     = 6,
        VSMI_NODETYPE_TABLEENTRY                = 7,
        VSMI_NODETYPE_OBJECTGROUP               = 8,
        VSMI_NODETYPE_NOTIFICATIONGROUP         = 9,
        VSMI_NODETYPE_MODULEIDENTITY            = 10,
        VSMI_NODETYPE_OBJECTIDENTITY            = 11,
        VSMI_NODETYPE_INDEXLEAF                 = 12,
        VSMI_NODETYPE_INDEXLEAF_EXT             = 13
} VSmiNodeType;