
Hi,
what goes wrong with SNMPv2-CONF and SNMPv2-SMI MIBs? The mibs are the mibs installed with libsmi. Should thy be fixed or is it a bug at libsmi?
I tested with version 0.4.8 and current head.
claus-kleins-macbook-pro:mibs clausklein$ /usr/local/bin/smidump -f smiv2 -m -s -l 3 /usr/local/share/mibs/ietf/SNMPv2-{SMI,CONF} > /dev/ null /usr/local/share/mibs/ietf/SNMPv2-SMI:191: [2] {range-bounds} range limit exceeds underlying basetype /usr/local/share/mibs/ietf/SNMPv2-SMI:191: [2] {range-exchanged} range limits must be `lower-bound .. upper-bound' /usr/local/share/mibs/ietf/SNMPv2-SMI:196: [2] {range-bounds} range limit exceeds underlying basetype /usr/local/share/mibs/ietf/SNMPv2-SMI:196: [2] {range-exchanged} range limits must be `lower-bound .. upper-bound' /usr/local/share/mibs/ietf/SNMPv2-SMI:202: [2] {range-bounds} range limit exceeds underlying basetype /usr/local/share/mibs/ietf/SNMPv2-SMI:202: [2] {range-exchanged} range limits must be `lower-bound .. upper-bound' /usr/local/share/mibs/ietf/SNMPv2-SMI:207: [2] {range-bounds} range limit exceeds underlying basetype /usr/local/share/mibs/ietf/SNMPv2-SMI:207: [2] {range-exchanged} range limits must be `lower-bound .. upper-bound' /usr/local/share/mibs/ietf/SNMPv2-SMI:217: [2] {range-exchanged} range limits must be `lower-bound .. upper-bound' smidump: module `/usr/local/share/mibs/ietf/SNMPv2-SMI' contains errors, expect flawed output /usr/local/share/mibs/ietf/SNMPv2-CONF:4: [2] {import-failed} identifier `ObjectSyntax' cannot be imported from module `SNMPv2-SMI' smidump: module `/usr/local/share/mibs/ietf/SNMPv2-CONF' contains errors, expect flawed output smidump: aborting due to severe parsing errors smidump: use the -k option to force continuation claus-kleins-macbook-pro:mibs clausklein$
###########################################
I cannot fix the SNMPV2-SMI mib because it the range is OK:
-- this wraps Counter32 ::= [APPLICATION 1] IMPLICIT INTEGER (0..4294967295)
-- this doesn't wrap Gauge32 ::= [APPLICATION 2] IMPLICIT INTEGER (0..4294967295)
-- an unsigned 32-bit quantity -- indistinguishable from Gauge32 Unsigned32 ::= [APPLICATION 2] IMPLICIT INTEGER (0..4294967295)
-- hundredths of seconds since an epoch TimeTicks ::= [APPLICATION 3] IMPLICIT INTEGER (0..4294967295)
#################################
When I fix this {import-failed} identifier `ObjectSyntax' cannot be imported from module `SNMPv2-SMI' the result is shown below:
claus-kleins-macbook-pro:mibs clausklein$ /usr/local/bin/smidump -f smiv2 -m -s -l 8 ./SNMPv2-CONF | diff -uwB - ./SNMPv2-CONF /usr/local/share/mibs/ietf/SNMPv2-SMI:155: [5] {identifier-basetype- redefined} warning: definition of identifier `Integer32' which is already a SMI or SPPI basetype /usr/local/share/mibs/ietf/SNMPv2-SMI:191: [2] {range-bounds} range limit exceeds underlying basetype /usr/local/share/mibs/ietf/SNMPv2-SMI:191: [2] {range-exchanged} range limits must be `lower-bound .. upper-bound' /usr/local/share/mibs/ietf/SNMPv2-SMI:196: [2] {range-bounds} range limit exceeds underlying basetype /usr/local/share/mibs/ietf/SNMPv2-SMI:196: [2] {range-exchanged} range limits must be `lower-bound .. upper-bound' /usr/local/share/mibs/ietf/SNMPv2-SMI:202: [2] {range-bounds} range limit exceeds underlying basetype /usr/local/share/mibs/ietf/SNMPv2-SMI:202: [2] {range-exchanged} range limits must be `lower-bound .. upper-bound' /usr/local/share/mibs/ietf/SNMPv2-SMI:200: [5] {identifier-basetype- redefined} warning: definition of identifier `Unsigned32' which is already a SMI or SPPI basetype /usr/local/share/mibs/ietf/SNMPv2-SMI:207: [2] {range-bounds} range limit exceeds underlying basetype /usr/local/share/mibs/ietf/SNMPv2-SMI:207: [2] {range-exchanged} range limits must be `lower-bound .. upper-bound' /usr/local/share/mibs/ietf/SNMPv2-SMI:217: [2] {range-exchanged} range limits must be `lower-bound .. upper-bound' /usr/local/share/mibs/ietf/SNMPv2-SMI:350: [5] {node-implicit} warning: implicit node definition /usr/local/share/mibs/ietf/SNMPv2-SMI:37: [5] {type-without-format} warning: type `ExtUTCTime' has no format specification /usr/local/share/mibs/ietf/SNMPv2-SMI:155: [5] {type-without-format} warning: type `Integer32' has no format specification /usr/local/share/mibs/ietf/SNMPv2-SMI:184: [5] {type-without-format} warning: type `IpAddress' has no format specification /usr/local/share/mibs/ietf/SNMPv2-SMI:189: [5] {type-without-format} warning: type `Counter32' has no format specification /usr/local/share/mibs/ietf/SNMPv2-SMI:194: [5] {type-without-format} warning: type `Gauge32' has no format specification /usr/local/share/mibs/ietf/SNMPv2-SMI:200: [5] {type-without-format} warning: type `Unsigned32' has no format specification /usr/local/share/mibs/ietf/SNMPv2-SMI:205: [5] {type-without-format} warning: type `TimeTicks' has no format specification /usr/local/share/mibs/ietf/SNMPv2-SMI:210: [5] {type-without-format} warning: type `Opaque' has no format specification /usr/local/share/mibs/ietf/SNMPv2-SMI:215: [5] {type-without-format} warning: type `Counter64' has no format specification --- - 2010-09-03 21:52:59.000000000 +0200 +++ ./SNMPv2-CONF 2010-09-03 21:48:40.000000000 +0200 @@ -1,11 +1,319 @@ --- --- This SMIv2 module has been generated by smidump 0.4.8. Do not edit. --- - SNMPv2-CONF DEFINITIONS ::= BEGIN
-IMPORTS - NotificationName, ObjectName +IMPORTS ObjectName, NotificationName +-- , ObjectSyntax FROM SNMPv2-SMI;
-END -- end of module SNMPv2-CONF. +-- definitions for conformance groups + +OBJECT-GROUP MACRO ::= +BEGIN + TYPE NOTATION ::= + ObjectsPart + "STATUS" Status + "DESCRIPTION" Text + ReferPart + + VALUE NOTATION ::= + value(VALUE OBJECT IDENTIFIER) + + ObjectsPart ::= + "OBJECTS" "{" Objects "}" + Objects ::= + Object + | Objects "," Object + Object ::= + value(ObjectName) + + Status ::= + "current" + | "deprecated" + | "obsolete" + + ReferPart ::= + "REFERENCE" Text + | empty + + -- a character string as defined in [2] + Text ::= value(IA5String) +END + +-- more definitions for conformance groups + +NOTIFICATION-GROUP MACRO ::= +BEGIN + TYPE NOTATION ::= + NotificationsPart + "STATUS" Status + "DESCRIPTION" Text + ReferPart + + VALUE NOTATION ::= + value(VALUE OBJECT IDENTIFIER) + + NotificationsPart ::= + "NOTIFICATIONS" "{" Notifications "}" + Notifications ::= + Notification + | Notifications "," Notification + Notification ::= + value(NotificationName) + + Status ::= + "current" + | "deprecated" + | "obsolete" + + ReferPart ::= + "REFERENCE" Text + | empty + + -- a character string as defined in [2] + Text ::= value(IA5String) +END + +-- definitions for compliance statements + +MODULE-COMPLIANCE MACRO ::= +BEGIN + TYPE NOTATION ::= + "STATUS" Status + "DESCRIPTION" Text + ReferPart + ModulePart + + VALUE NOTATION ::= + value(VALUE OBJECT IDENTIFIER) + + Status ::= + "current" + | "deprecated" + | "obsolete" + + ReferPart ::= + "REFERENCE" Text + | empty + + ModulePart ::= + Modules + Modules ::= + Module + | Modules Module + Module ::= + -- name of module -- + "MODULE" ModuleName + MandatoryPart + CompliancePart + + ModuleName ::= + -- identifier must start with uppercase letter + identifier ModuleIdentifier + -- must not be empty unless contained + -- in MIB Module + | empty + ModuleIdentifier ::= + value(OBJECT IDENTIFIER) + | empty + + MandatoryPart ::= + "MANDATORY-GROUPS" "{" Groups "}" + | empty + + Groups ::= + Group + | Groups "," Group + Group ::= + value(OBJECT IDENTIFIER) + + CompliancePart ::= + Compliances + | empty + + Compliances ::= + Compliance + | Compliances Compliance + Compliance ::= + ComplianceGroup + | Object + + ComplianceGroup ::= + "GROUP" value(OBJECT IDENTIFIER) + "DESCRIPTION" Text + + Object ::= + "OBJECT" value(ObjectName) + SyntaxPart + WriteSyntaxPart + AccessPart + "DESCRIPTION" Text + + -- must be a refinement for object's SYNTAX clause + SyntaxPart ::= "SYNTAX" Syntax + | empty + + -- must be a refinement for object's SYNTAX clause + WriteSyntaxPart ::= "WRITE-SYNTAX" Syntax + | empty + + Syntax ::= -- Must be one of the following: + -- a base type (or its refinement), + -- a textual convention (or its refinement), or + -- a BITS pseudo-type + type + | "BITS" "{" NamedBits "}" + + NamedBits ::= NamedBit + | NamedBits "," NamedBit + + NamedBit ::= identifier "(" number ")" -- number is nonnegative + + AccessPart ::= + "MIN-ACCESS" Access + | empty + Access ::= + "not-accessible" + | "accessible-for-notify" + | "read-only" + | "read-write" + | "read-create" + + -- a character string as defined in [2] + Text ::= value(IA5String) +END + +-- definitions for capabilities statements + +AGENT-CAPABILITIES MACRO ::= +BEGIN + TYPE NOTATION ::= + "PRODUCT-RELEASE" Text + "STATUS" Status + "DESCRIPTION" Text + ReferPart + ModulePart + + VALUE NOTATION ::= + value(VALUE OBJECT IDENTIFIER) + + Status ::= + "current" + | "obsolete" + + ReferPart ::= + "REFERENCE" Text + | empty + + ModulePart ::= + Modules + | empty + Modules ::= + Module + | Modules Module + Module ::= + -- name of module -- + "SUPPORTS" ModuleName + "INCLUDES" "{" Groups "}" + VariationPart + + ModuleName ::= + -- identifier must start with uppercase letter + identifier ModuleIdentifier + ModuleIdentifier ::= + value(OBJECT IDENTIFIER) + | empty + + Groups ::= + Group + | Groups "," Group + Group ::= + value(OBJECT IDENTIFIER) + + VariationPart ::= + Variations + | empty + Variations ::= + Variation + | Variations Variation + + Variation ::= + ObjectVariation + | NotificationVariation + + NotificationVariation ::= + "VARIATION" value(NotificationName) + AccessPart + "DESCRIPTION" Text + + ObjectVariation ::= + "VARIATION" value(ObjectName) + SyntaxPart + WriteSyntaxPart + AccessPart + CreationPart + DefValPart + "DESCRIPTION" Text + + -- must be a refinement for object's SYNTAX clause + SyntaxPart ::= "SYNTAX" Syntax + | empty + + WriteSyntaxPart ::= "WRITE-SYNTAX" Syntax + | empty + + Syntax ::= -- Must be one of the following: + -- a base type (or its refinement), + -- a textual convention (or its refinement), or + -- a BITS pseudo-type + type + | "BITS" "{" NamedBits "}" + + NamedBits ::= NamedBit + | NamedBits "," NamedBit + + NamedBit ::= identifier "(" number ")" -- number is nonnegative + + AccessPart ::= + "ACCESS" Access + | empty + + Access ::= + "not-implemented" + -- only "not-implemented" for notifications + | "accessible-for-notify" + | "read-only" + | "read-write" + | "read-create" + -- following is for backward-compatibility only + | "write-only" + + CreationPart ::= + "CREATION-REQUIRES" "{" Cells "}" + | empty + Cells ::= + Cell + | Cells "," Cell + Cell ::= + value(ObjectName) + + DefValPart ::= "DEFVAL" "{" Defvalue "}" + | empty + + Defvalue ::= -- must be valid for the object's syntax + -- in this macro's SYNTAX clause, if present, + -- or if not, in object's OBJECT-TYPE macro + value(ObjectSyntax) + | "{" BitsValue "}" + + BitsValue ::= BitNames + | empty + + BitNames ::= BitName + | BitNames "," BitName + + BitName ::= identifier + + -- a character string as defined in [2] + Text ::= value(IA5String) +END + +END claus-kleins-macbook-pro:mibs clausklein$