
Hi ,
I made my Error handler and then I was able to direct these Error messages to the file as U said. Thanks for that
I also tried the printing the default values the same way dumpCorba (This is the driver which prints out the default values). But It gives me defalut values as 0 for the variables which do not have any default value.
Will U please throw some light on it, as how can I avoid getting these 0 values. As for some MIB variables of mine, there are variables which have the default values as 0.
Thanks & regards, Amit Save.
-----Original Message----- From: Juergen Schoenwaelder [mailto:schoenw@ibr.cs.tu-bs.de] Sent: Wednesday, February 13, 2002 8:38 PM To: save@agere.com Cc: libsmi@ibr.cs.tu-bs.de Subject: Re: [libsmi] Errors & Deafult Values
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

Save, Amit Prabhakar (Amit) writes:
Amit> I also tried the printing the default values the same way Amit> dumpCorba (This is the driver which prints out the default Amit> values). But It gives me defalut values as 0 for the variables Amit> which do not have any default value.
Amit> Will U please throw some light on it, as how can I avoid getting Amit> these 0 values. As for some MIB variables of mine, there are Amit> variables which have the default values as 0.
Several dump driver print default values. Try
smidump -f smiv2 IF-MIB | grep DEFVAL
just to see that it works. If you think you have found a bug, please post enough information so that we can reproduce the bug. Otherwise, we won't believe there is a bug. ;-)
/js
participants (2)
-
Juergen Schoenwaelder
-
Save, Amit Prabhakar (Amit)