
Hi, I'm using LibSmi 0.2.16 to compile the MIB files. Also, I'm directing the compiled MIB to a text file Will any one of U solve two issues I'm having.
1) How do U get the default Values of a MIB variable.
2) I'm directing my compiled MIB to one text file. Also, I would like to direct the parsing errors to another text file. How do I do this ? I tried this by changing stderr in main function to a local file. But this does not direct the messages occuring during the compilation time.
Like, ./MIBs/rfc1213.my:7: parse error, expecting `DEFINITIONS'
Such messages always come on standard output.
Thanks & regards, Amit Save

Save, Amit Prabhakar (Amit) writes:
Amit> Hi, I'm using LibSmi 0.2.16 to compile the MIB files. Also, I'm Amit> directing the compiled MIB to a text file Will any one of U Amit> solve two issues I'm having.
Amit> 1) How do U get the default Values of a MIB variable.
Look at one of the dump drivers which print default values as an example how it works.
Amit> 2) I'm directing my compiled MIB to one text file. Also, I Amit> would like to direct the parsing errors to another text file. Amit> How do I do this ? I tried this by changing stderr in main Amit> function to a local file. But this does not direct the messages Amit> occuring during the compilation time.
Amit> Like, ./MIBs/rfc1213.my:7: parse error, expecting `DEFINITIONS'
Amit> Such messages always come on standard output.
The error messages usually go to standard error.
Anyway, look at smilint.c as an example how to install your own error message handler. smilint uses its own handler if you use the -s or the -m flags.
/js
participants (2)
-
Juergen Schoenwaelder
-
Save, Amit Prabhakar (Amit)