
Hello,
although I'm very new to this list I have a question ... ;)
I'm trying to dump a MIB file in xml format using smidump. When doing this I get some error outpur like this:
QUANTE-MIB-V1.txt:135: macro `OBJECT-TYPE' has not been imported from module `RFC-1212' QUANTE-MIB-V1.txt:143: macro `OBJECT-TYPE' has not been imported from module `RFC-1212' ... QUANTE-MIB-V1.txt:366: macro `TRAP-TYPE' has not been imported from module `RFC-1215' QUANTE-MIB-V1.txt:367: syntax error, unexpected '{', expecting UPPERCASE_IDENTIFIER or LOWERCASE_IDENTIFIER or NUMBER QUANTE-MIB-V1.txt:368: syntax error, unexpected VARIABLES QUANTE-MIB-V1.txt:369: syntax error, unexpected DESCRIPTION QUANTE-MIB-V1.txt:375: syntax error, unexpected VARIABLES ...
and so on. Does anyone know what's going on there? BTW: I'm using libsmi-0.4.2.
Best regards and thanks in advance, Volker Göbbels

On Wed, Jun 09, 2004 at 03:35:17PM +0200, Volker Goebbels wrote:
I'm trying to dump a MIB file in xml format using smidump. When doing this I get some error outpur like this:
QUANTE-MIB-V1.txt:135: macro `OBJECT-TYPE' has not been imported from module `RFC-1212' QUANTE-MIB-V1.txt:143: macro `OBJECT-TYPE' has not been imported from module `RFC-1212' ... QUANTE-MIB-V1.txt:366: macro `TRAP-TYPE' has not been imported from module `RFC-1215' QUANTE-MIB-V1.txt:367: syntax error, unexpected '{', expecting UPPERCASE_IDENTIFIER or LOWERCASE_IDENTIFIER or NUMBER QUANTE-MIB-V1.txt:368: syntax error, unexpected VARIABLES QUANTE-MIB-V1.txt:369: syntax error, unexpected DESCRIPTION QUANTE-MIB-V1.txt:375: syntax error, unexpected VARIABLES ...
and so on. Does anyone know what's going on there? BTW: I'm using libsmi-0.4.2.
The most likely explanation is that QUANTE-MIB-V1 is not valid SMI.
/js

Volker Goebbels wrote:
Hello,
although I'm very new to this list I have a question ... ;)
I'm trying to dump a MIB file in xml format using smidump. When doing this I get some error outpur like this:
QUANTE-MIB-V1.txt:135: macro `OBJECT-TYPE' has not been imported from module `RFC-1212' QUANTE-MIB-V1.txt:143: macro `OBJECT-TYPE' has not been imported from module `RFC-1212' ... QUANTE-MIB-V1.txt:366: macro `TRAP-TYPE' has not been imported from module `RFC-1215' QUANTE-MIB-V1.txt:367: syntax error, unexpected '{', expecting UPPERCASE_IDENTIFIER or LOWERCASE_IDENTIFIER or NUMBER QUANTE-MIB-V1.txt:368: syntax error, unexpected VARIABLES QUANTE-MIB-V1.txt:369: syntax error, unexpected DESCRIPTION QUANTE-MIB-V1.txt:375: syntax error, unexpected VARIABLES ...
and so on. Does anyone know what's going on there? BTW: I'm using libsmi-0.4.2.
Your MIB contains some errors. I hope the messages above are clear enough to fix them.
In contrast to some other SMI parsers that try to tolerate errors in MIB modules which could lead to undiscovered errors in applications that use such parsers, libsmi is very strict and its checks are based on the SMI RFCs. I strongly suggest to first fix the errors before compiling the MIB modules for further use, even if you are not the original author of the MIB module. For checking the validity of a MIB module, the tools smilint is the better choice.

Hello,
first of all, thanks for the _fast_ reply ;)
Does anyone know what's going on there? BTW: I'm using libsmi-0.4.2.
Your MIB contains some errors. I hope the messages above are clear enough to fix them.
In contrast to some other SMI parsers that try to tolerate errors in MIB modules which could lead to undiscovered errors in applications that use such parsers, libsmi is very strict and its checks are based on the SMI RFCs. I strongly suggest to first fix the errors before compiling the MIB modules for further use, even if you are not the original author of the MIB module. For checking the validity of a MIB module, the tools smilint is the better choice.
smilint did a good job and I discovered several missing imports and syntax errors in the TRAP-TYPE definitions. Since I'm ideed not the author of the MIB I was a bit surprised because the MIB claims to be produced by mosy so I didn't expect syntax errors. Now smidump works pretty well and I'm thinking about building a small PHP extension to import the libsmi functionality into PHP ...
Best regards, Volker Göbbels
participants (4)
-
"Dr. Volker Göbbels"
-
Frank Strauß
-
Juergen Schoenwaelder
-
Volker Goebbels