Skip to content

Overly strict when parsing MIB files #25

@steveohara

Description

@steveohara

One of the problems we are getting on an increasingly common basis is Mibble not being able to parse MIB files that all other MIB tools (e.g. iReasoning) can handle without issue.
It seems to boil down to the strictness of the parser adhering to the standard - other tools are a lot more accommodating.

Here is a typical example of loading a rack PDU MIB from Austin Hughes;

Warning: in InfraSolutionX-MIB.txt: line 6:
    value identifier 'AustinHughes' doesn't start with a lowercase
    character

	AustinHughes				OBJECT IDENTIFIER ::= { enterprises 34550 }	
	^
Warning: in InfraSolutionX-MIB.txt: line 7:
    value identifier 'InfraSolutionX' doesn't start with a lowercase
    character

	  InfraSolutionX			OBJECT IDENTIFIER ::= { AustinHughes 10 }
	  ^
Warning: in InfraSolutionX-MIB.txt: line 8:
    value identifier 'InfraBox' doesn't start with a lowercase
    character

	    InfraBox				OBJECT IDENTIFIER ::= { InfraSolutionX 1 }
	    ^
Warning: in InfraSolutionX-MIB.txt: line 12:
    value identifier 'FrontHandleControl' doesn't start with a
    lowercase character

		FrontHandleControl				OBJECT IDENTIFIER ::= { handleControl 1 }
		^
Warning: in InfraSolutionX-MIB.txt: line 13:
    value identifier 'RearHandleControl' doesn't start with a
    lowercase character

		RearHandleControl				OBJECT IDENTIFIER ::= { handleControl 2 }
		^
Warning: in InfraSolutionX-MIB.txt: line 124:
    value identifier 'InfraBoxAdmin' doesn't start with a lowercase
    character

	InfraBoxAdmin			OBJECT IDENTIFIER ::= { InfraBox 1 }
	^
Warning: in InfraSolutionX-MIB.txt: line 125:
    value identifier 'InfraBoxModel' doesn't start with a lowercase
    character
[InfraSolutionX-MIB.txt](https://github.com/cederberg/mibble/files/801539/InfraSolutionX-MIB.txt)
etc etc

What are your thoughts?
Would it be possible to introduce a flag to indicate non-strict mode?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions