
Hi!
Alberto> I am having a problem with smidump with producing xml. Alberto> Default values in oid objects are not well produced:
Alberto> Input: Alberto> DEFVAL { { 1 3 6 } } Alberto> Output: Alberto> <default>0.0</default>
Alberto> However, this value is well produced with "smiv2" output format:
Alberto> DEFVAL { ccitt } OK
Alberto> Does anyone know how I could fix this problem?
Both are wrong. ;-) Although, `ccitt' is a good looking identifier name, it does not represent 1.3.6, which would be `internet'.
The underlying problem is the input MIB module and the fact that the SMIv2 parser does not complain about it. RFC 2578, Section 7.9 says:
The value of the DEFVAL clause must, of course, correspond to the SYNTAX clause for the object. If the value is an OBJECT IDENTIFIER, then it must be expressed as a single ASN.1 identifier, and not as a collection of sub-identifiers.
So, your module should say
DEFVAL { internet }
(and internet has to be imported), and the XML output of smidump should be fine (printing the correct numerical OID).
I also fixed the parser in the CVS repository, so that it now reports warnings like:
BUG-MIB:12: OBJECT IDENTIFIER default values must be expressed as a single identifier
-frank -- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to libsmi-request@ibr.cs.tu-bs.de. !! See http://www.ibr.cs.tu-bs.de/projects/libsmi/ for more information.