4 Setup
A few things need to be setup, before MIB Designer can be used to edit or create MIB modules. Please follow the steps set forth below.
When MIB Designer is started for the first time it asks to create a MIB repository. A MIB repository is a directory where MIB Designer stores MIB information using an internal format. A new MIB repository is created by simply creating an empty folder.
Please make sure when selecting the MIB repository directory that its name is shown at the bottom of the MIB repository selection window within the file name field before you press OK (see Figure 2-1).
Later, the MIB repository can be changed by choosing from the main menu. Switching from the current MIB repository to any other MIB repository does not alter any data of the repositories.
Figure2-1: MIB repository selection dialog
MIB files may be imported into a MIB repository as follows:
1. Use the menu (
) to import a single MIB file, check its syntax and - if it is OK - to add it to the MIB repository and load it for editing.
2. If the MIB file has errors, a text editor will be opened (shown by Figure 2-2). The encountered errors are listed above the edit area. Once the MIB file is correct, the Import button (
) can be used to save and import the corrected file. If the file has still errors then these errors will be displayed in the editor.
MIB file ZIP archives must have a file extension of ‘.ZIP’ or ‘.zip’ to be recognized by the MIB compiler.
3. Use the menu (
) to add a directory or a list of files to the MIB repository by updating any existing MIB modules By opening a directory all files in that sub-tree are sorted by their import dependencies and then loaded into the repository. ZIP archives found in the sub-tree are opened and the included MIB files are sorted and loaded into the repository as if the archives were unpacked.
4. After having processed all MIB files, MIB Designer will report any errors in a message box. The detailed error messages can be viewed by choosing from that message box. The Compiler Log window is then shown as illustrated by Figure 2-3. The compiler log table can be printed from the log table’s context menu and sorted by column by clicking on the column’s header. By double clicking on a row corresponding to a failed MIB file, thus a row marked with a stop (
) sign, the MIB file editor can be opened to correct the syntax error. After pressing the editors Import button, the corresponding row will be updated in the compiler log table.
5. Use the menu to add a directory or a list of files to the repository without updating/changing any existing MIB modules. As for the rest this method behaves similar to the above.
6. Use the menu if the MIB module has errors that you want to correct with MIB Designer. Please check the imported MIB module immediately after loading as described in section “Refactor Object Names and Descriptions” on page 36, because it may contain errors although it has been loaded successfully. This option reduces the error checking of the SMI parser to a reasonable minimum to facilitate the process of correcting broken MIB modules.
Section “Error Messages” on page 74 shows a list of all error messages.
Caution: By pressing OK on the MIB deletion confirmation dialog, the MIB will be removed from the repository without providing any means for undoing the deletion!
MIB modules are removed from the MIB repository by choosing (
) from the main menu. A shuffle dialog is opened which allows selecting the MIB module(s) to be deleted. By pressing OK, all MIB modules on the right list will be deleted. Because there is no Undo for this action, a confirmation dialog is shown.
If a MIB module depends on a MIB module that is added to the right list, the dependent MIB module will also be moved to the right.
Figure2-4: Deleting MIB modules.