5.2                 Compiling MIBs

Before you can compile MIB modules into AgenPro's internal format, a MIB repository has to be created where the compiled MIBs are stored. During the first startup of AgenPro you will be asked to specify a MIB repository.

Precompiled MIBs

AgenPro comes with a set of precompiled SMIv2 MIBs which are located in the repository directory of the AgenPro installation. AgenPro uses that directory as its initial default repository.

To Compile MIBs

1.   From the File menu, choose Compile MIBs (or AgenProManual00005.png from the main tool bar). A file open dialog will appear.

2.   Choose a MIB file, ZIP file or a directory and click Open. If you choose a file, then that file will be compiled and all contained MIB modules (typically one) are stored into the MIB repository

If you choose a directory or a ZIP file, then recursively all contained files will be parsed. All successfully parsed MIBs will be automatically sorted by their dependencies and then compiled into the MIB reposi­tory. Directories may also contain ZIP files.

3.   After compilation a message dialog with summary information is shown.

4.   Press Details to open the Compiler Log window (see Figure 1). It lists status information for each MIB file compiled. The number of errors in a MIB file is shown in the Errors column. Files with a zero value, have been successfully compiled and are already loaded into the MIB repository.
To view the errors detected for that file, click on that row. The SMI editor on the right hand side will load that file and you can edit it to fix the syntax errors. The error list below the editor views a detailed error description. Selecting an entry moves the editor‘s cursor to the error location. To recompile a file, simply click on one of the Import buttons of the editor.

5.   The MIB modules of the successfully compiled MIB files are automat­ically stored in the MIB repository. From there, the MIB modules can be loaded into the MIB Explorer application.
Existing MIB modules will be overwritten (updated). If you do not want to change any MIB modules that already exist in the current MIB repository, then use Compile New MIBs from the File menu.

5.2.1             Compiler Log

The Compiler Log dialog lists the status of all MIB files of a compilation run. If the compilation of a MIB file failed, the Errors column displays the a number greater than zero. The compiler log can also be copied as text to the clipboard.

If you cannot fix the errors of failed MIB files and nevertheless want to use those files, you can recompile all failed MIBs with a lenient parser mode. It is likely that lenient compiled MIB modules cause errors during code generation due to incorrect or missing information.

The file name of the MIB file is displayed in the File column, the number of errors in the Errors column, and the successfully compiled MIB modules in the file in the MIB Modules column.

Figure 1:                                 Compiler Log window with compilation errors displayed per MIB module.
AgenPro-CompilerLog.jpg

 

To Correct a MIB File

Click on the row corresponding to the MIB file you want to edit. The MIB file editor pane will load the file (see section “MIB File Editor” on page 60). You may then click on an error message below the editor to directly jump to that error location in the file.

After having fixed the error, the MIB file can be saved and compiled again by using the Import button AgenProManual00009.png.

If the compilation was successful, the Errors column for the file will display zero errors and the editor‘s status bar will display a green square.