
Hi,
I just inherited some scripts which use the SMI tools (smilint, smidump) and am pretty new to this. So if this question is basic, pl excuse me; I have already searched the archives ...
When checking a set MIB modules using smilint, I get the following errors-
[...snip...] nortelPC-standardTextualConventionsV1_CC0066B.mib:42: [1] {} type `Gauge32' may only be defined in SMI/SPPI base modules nortelPC-standardTextualConventionsV1_CC0066B.mib:43: [1] {} type `Counter32' may only be defined in SMI/SPPI base modules nortelPC-standardTextualConventionsV1_CC0066B.mib:44: [1] {} type `Unsigned32' may only be defined in SMI/SPPI base modules nortelPC-standardTextualConventionsV1_CC0066B.mib:45: [1] {} type `Integer32' may only be defined in SMI/SPPI base modules nortelPC-textualConventionsV1_CC0066B.mib:57: [1] {} type `Unsigned64' may only be defined in SMI/SPPI base modules nortelPC-textualConventionsV1_CC0066B.mib:194: [2] {enum-zero} number enumeration contains zero value in SMIv1 MIB nortelPC-frameRelayUniV1_CC0066B.mib:36: [0] {} the SPPI construct/keyword `Unsigned64' may not be used in a MIB [end]
How do I define/setup a base module (since that seems to be core of the problem)? Is there anything else I am missing?
Thanks,
- Raj.

Hi!
Rajbal> I just inherited some scripts which use the SMI tools Rajbal> (smilint, smidump) and am pretty new to this. So if this Rajbal> question is basic, pl excuse me; I have already searched the Rajbal> archives ...
Rajbal> When checking a set MIB modules using smilint, I get the Rajbal> following errors-
Rajbal> [...snip...] Rajbal> nortelPC-standardTextualConventionsV1_CC0066B.mib:42: [1] {} type Rajbal> `Gauge32' may only be defined in SMI/SPPI base modules Rajbal> nortelPC-standardTextualConventionsV1_CC0066B.mib:43: [1] {} type Rajbal> `Counter32' may only be defined in SMI/SPPI base modules Rajbal> nortelPC-standardTextualConventionsV1_CC0066B.mib:44: [1] {} type Rajbal> `Unsigned32' may only be defined in SMI/SPPI base modules Rajbal> nortelPC-standardTextualConventionsV1_CC0066B.mib:45: [1] {} type Rajbal> `Integer32' may only be defined in SMI/SPPI base modules Rajbal> nortelPC-textualConventionsV1_CC0066B.mib:57: [1] {} type `Unsigned64' Rajbal> may only be defined in SMI/SPPI base modules Rajbal> nortelPC-textualConventionsV1_CC0066B.mib:194: [2] {enum-zero} number Rajbal> enumeration contains zero value in SMIv1 MIB Rajbal> nortelPC-frameRelayUniV1_CC0066B.mib:36: [0] {} the SPPI Rajbal> construct/keyword `Unsigned64' may not be used in a MIB Rajbal> [end]
Rajbal> How do I define/setup a base module (since that seems to be Rajbal> core of the problem)? Is there anything else I am missing?
The error message may be misleading. It means that these descriptors (Gauge32, etc.) are well defined by the SMI language specification (in modules that are part of the language specification). So, when libsmi finds a definition for these types, it is only valid if the current module is such a base module (SNMPv2-SMI in case of SMIv2). You are not allowed to have a definition of these types in your own modules.
-frank

Hi!
Rajbal> I just inherited some scripts which use the SMI tools Rajbal> (smilint, smidump) and am pretty new to this. So if this Rajbal> question is basic, pl excuse me; I have already searched the Rajbal> archives ...
Rajbal> When checking a set MIB modules using smilint, I get the Rajbal> following errors-
Rajbal> [...snip...] Rajbal> nortelPC-standardTextualConventionsV1_CC0066B.mib:42: [1] {} type Rajbal> `Gauge32' may only be defined in SMI/SPPI base modules Rajbal> nortelPC-standardTextualConventionsV1_CC0066B.mib:43: [1] {} type Rajbal> `Counter32' may only be defined in SMI/SPPI base modules Rajbal> nortelPC-standardTextualConventionsV1_CC0066B.mib:44: [1] {} type Rajbal> `Unsigned32' may only be defined in SMI/SPPI base modules Rajbal> nortelPC-standardTextualConventionsV1_CC0066B.mib:45: [1] {} type Rajbal> `Integer32' may only be defined in SMI/SPPI base modules Rajbal> nortelPC-textualConventionsV1_CC0066B.mib:57: [1] {} type `Unsigned64' Rajbal> may only be defined in SMI/SPPI base modules Rajbal> nortelPC-textualConventionsV1_CC0066B.mib:194: [2] {enum-zero} number Rajbal> enumeration contains zero value in SMIv1 MIB Rajbal> nortelPC-frameRelayUniV1_CC0066B.mib:36: [0] {} the SPPI Rajbal> construct/keyword `Unsigned64' may not be used in a MIB Rajbal> [end]
Rajbal> How do I define/setup a base module (since that seems to be Rajbal> core of the problem)? Is there anything else I am missing?
Frank> The error message may be misleading. It means that these descriptors Frank> (Gauge32, etc.) are well defined by the SMI language specification (in Frank> modules that are part of the language specification). So, when libsmi Frank> finds a definition for these types, it is only valid if the current Frank> module is such a base module (SNMPv2-SMI in case of SMIv2). You are Frank> not allowed to have a definition of these types in your own modules.
David Perkins gave me a hint, that this is not true if your module is an SMIv1 module. Thanks, Dave! In this case it seems that your module is in fact SMIv1, so the level 1 error message should be turned into a warning in tis case.
I would recommend however, that you don't define types that are originally defined in SNMPv2-SMI in a module not named SNMPv2-SMI, so that you don't have to change every IMPORT clause in other modules that make use of these types. If you have to use the historic SMIv1 language for any reasons, you could use the output of "smidump -f smiv1 SNMPv2-SMI" and stick with the module name SNMPv2-SMI from which you import the mentioned types.
-frank
participants (2)
-
Frank Strauss
-
Rajbal Balan