10   Correction

MIB Designer provides some auto correction functions for ease of correction of common SMIv2 errors.

10.1   Index Range Correction

A numeric value used for an index must not have a negative value because a negative value cannot be represented by an OID sub-identifier. Therefore, all syntax definitions used for an index value, must have a range restriction which allows positive values only (including zero). This correction adds missing range restrictions or changes existing to exclude negative values for sub-index values.

10.2   INTEGER Usage Correction

The INTEGER type should be used for enumerations only in SMIv2. Thus, this correction changes occurrences of INTEGER to Integer32 where it is not part of an enumeration definition.

10.3   Case Correction

The SMI standard specifies the case of the first letter of descriptors (see “Descriptors start with a lower case letter whereas module names with an upper case letter:” on page 46).

Object identifiers have to start with a lower case letter, whereas SEQUENCE and MIB module descriptors have to start with an upper case letter, for example. Using an upper case letter as the first character of an enumeration descriptor is also a common error. Here a lower case letter is required.

The case correction function corrects the case of the first letter of descriptors.

10.4   SMI Macro Import Correction

The SMI specification language is derived from ASN.1. Although it is not ASN.1, it has inherited and used the ASN.1 MACRO elements. Because of that, macro definitions in the SMI standard have to be imported when used. The OBJECT-TYPE macro for instance, has to be imported from RFC1155-SMI (SMIv1) or SNMPv2-SMI (SMIv2) respectively.

This auto-correction function removes unecessary macro imports and adds any imports for used macros.