MIB Smithy

  1. Up to Table of Contents

Compiler Panel

The MIB Smithy Compiler Panel provides two tabs: Tasks and Log. Together, these tabs provide information from the parser and MIB validator to aide you in ensuring SMI compliance. To show or hide the Compiler Panel, select the ViewCompiler Panel option from the main menu. The Compiler Panel can be resized using the grab bars above and to the left, which are visible if the Project, Workspace and/or Information Panels are also visible.

Compiler Panel

Figure - MIB Smithy Compiler Panel

Development Tasks

The Tasks tab lists details about any errors and warnings encountered during parsing or validation, and checkbuttons below list the total number of errors and warnings detected during the last validation. These can be checked or unchecked individually to show or hide errors or warnings to narrow the scope of your work.

All columns are sortable, so MIB Smithy can help you you can work on tasks in the order that is most comfortable to you. You may wish to address errors and warnings one file at a time, focus only on errors, work on one record type at a time, or choose to work on the most common errors first. Whether the message arises during parsing or validation, you can double-click on a message to open the appropriate record's properties or, for parse errors, open the file in a text editor at the line where the error occurred.

After making changes to correct an error or warning, you can click the check box in the X column for the message to mark it as done and delete it from the list (after a short delay in case you change your mind). If the issue is not corrected, it will return the next time you run the validation.

Types of Messages

The error and warning messages displayed in the Tasks list take one of two forms depending on when the error occurs.

Errors and warnings that occur while parsing (loading) a file include the file name, line number in which the error occurs, a description of the error and the last token (parsed symbol) read by the parser. For example, here the compiler has indicated an unrecoverable parse error on line 80 of file example.mib, and the token that was found at that point was the "OBJECT" keyword, where it was expecting either a left paren "(" character or the "::=" (colon colon equals) character sequence:

? File Location ! Description
file icon example.mib 80 error icon parse error, unexpected OBJECT, expecting "(" or "::="
file icon example.mib 80 error icon last read token == 'OBJECT'

All other errors and warnings that occur after load time (that is, during the validation or compiling stage) give similar messages. However, instead of a line number, these messages indicate the name of the record exhibiting the error. For example, the following message indicates a warning generated during validation. The TEXTUAL-CONVENTION named ExampleTC in the module named EXAMPLE-TC-MIB of file example2.mib has been defined a base type of OCTET STRING but has not been given a size (length) restriction.

? File Location ! Description
file icon example.mib ExampleTC warning icon Type 'OCTET STRING' is a character string type and should have a size limit specified.
This issue results in a warning from MIB Smithy due to the compatibility problems that it may pose. In ASN.1, the OCTET STRING type has no inherent size restriction. On the other hand, SMIv2 specifies an implicit size limit for the OCTET STRING type of 65535 octets (64k). However, much lower limits are often imposed not only by fundamental limits on the size of a packet for a given transport layer (usually UDP), but also by the capabilities of individual implementations: SNMP specifies a tiny 484 octet length as being the minimum message size that an implementation MUST support (that includes both an OCTET STRING object's value and the message/PDU wrappers, the variable's OID, etc.). For this reason, it's very nearly always a good idea to specify realistic limits for OCTET STRING variables if such limits can be chosen.

Most errors that occur during load time, other than parse errors, are recoverable and sometimes automatically correctable. Recoverable errors are those that typically generate parse errors in other compilers, but that MIB Smithy has been designed to work around. Unrecoverable errors are those that MIB Smithy cannot unambiguously work around and must be corrected before the module can be loaded successfully.

Compiler Log

The Log tab provides other progress and statistics information from the parser and compiler. Most messages printed to the Status Bar during MIB parsing and validation are logged to this tab so you can monitor progress or return to see what was done. Error and warning counts are also printed to this tab.

  1. Up to Table of Contents