IPWorks SNMP 2020 Java Edition

Questions / Feedback?

LoadMib Method

Parses the file FileName and adds the parsed nodes to the collection of existing nodes.

Syntax

public void loadMib(String fileName);

Remarks

This method can be used to load and parse a MIB file into the class.

Some MIB modules contain references to other modules within their imports sections. When loading a MIB that contains external imports, the ImportSymbols event will fire for each external reference. These modules must be loaded if possible to generate a complete representation for the loaded MIB.

It is possible for the component to attempt to load all external references automatically. To do this, use Config and set "AutoLoadMibs=True". Setting this configuration property causes the class to attempt to find and load any external references included in the current MIB. The class will only find external modules if they reside in the same directory as the current module. Alternatively, the class can load additional modules by calling LoadMib while inside the ImportSymbols event.

If the AutoLoadMibs config setting is set to False, and no explicit action is taken to load necessary modules inside the ImportSymbols event, some symbols may remain unresolved. These symbols will not appear in the MibNode hierarchy until the module containing their definition is loaded. Order is unimportant when loading additional MIB modules. A complete list of unresolved symbols can be found by retrieving the UndefinedSymbols config setting (comma separated list of symbols).

Note that FileName also accepts MIB data. If MIB data is used, the class will expect the NodeFileName to be at the beginning of the string, surrounded by "[]". For example:

[RFC-1215]RFC-1215 DEFINITIONS ::= BEGIN......END

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks SNMP 2020 Java Edition - Version 20.0 [Build 8202]