
Hi !
I am having a problem with smidump with producing xml.
Default values in oid objects are not well produced:
Input: --------
svConnLocalEndPt OBJECT-TYPE SYNTAX OBJECT IDENTIFIER ACCESS read-write STATUS mandatory DESCRIPTION "The object identifier of the 1st attribute of the end point in the associated protocol specific end point table." DEFVAL { { 1 3 6 } } ::= { svConnEntry 2 }
Output: -----------
<column name="svConnLocalEndPt" oid="1.3.6.1.4.1.351.1.101.1.3.1.2" status="current"> <syntax> <type module="" name="ObjectIdentifier"/> </syntax> <access>readwrite</access> <default>0.0</default> ??????????????????????? <description> The object identifier of the 1st attribute of the end point in the associated protocol specific end point table. </description> </column>
However, this value is well produced with "smiv2" output format:
svConnLocalEndPt OBJECT-TYPE SYNTAX OBJECT IDENTIFIER MAX-ACCESS read-write STATUS current DESCRIPTION "The object identifier of the 1st attribute of the end point in the associated protocol specific end point table." DEFVAL { ccitt } OK ::= { svConnEntry 2 }
Does anyone know how I could fix this problem?
Thanks Alberto Olalla

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.

HI,
Both examples have illegal values for DEFVAL.
Regards, /david t. perkins
At 04:47 PM 9/19/2001 +0200, Alberto Olalla wrote:
Hi !
I am having a problem with smidump with producing xml.
Default values in oid objects are not well produced:
Input:
svConnLocalEndPt OBJECT-TYPE SYNTAX OBJECT IDENTIFIER ACCESS read-write STATUS mandatory DESCRIPTION "The object identifier of the 1st attribute of the end point in the associated protocol specific end point table." DEFVAL { { 1 3 6 } } ::= { svConnEntry 2 }
Output:
<column name="svConnLocalEndPt" oid="1.3.6.1.4.1.351.1.101.1.3.1.2" status="current"> <syntax> <type module="" name="ObjectIdentifier"/> </syntax> <access>readwrite</access> <default>0.0</default> ??????????????????????? <description> The object identifier of the 1st attribute of the end point in the associated protocol specific end point table. </description> </column>
However, this value is well produced with "smiv2" output format:
svConnLocalEndPt OBJECT-TYPE SYNTAX OBJECT IDENTIFIER MAX-ACCESS read-write STATUS current DESCRIPTION "The object identifier of the 1st attribute of the end point in the associated protocol specific end point table." DEFVAL { ccitt } OK ::= { svConnEntry 2 }
Does anyone know how I could fix this problem?
Thanks Alberto Olalla
participants (3)
-
Alberto Olalla
-
David T. Perkins
-
Frank Strauss