Are ranges allowed in SEQUENCEs?

I am compiling some private mibs with libsmi 0.2.14 and am getting errors. However these mibs compile correctly with another mib compiler (Epilogue). I am trying to figure out whether these problems are because the libsmi is less forgiving then Epilogue, or because of a problem in libsmi. Basically, I try to create a sequence as follows:
ChrComHWEquipmentEntry ::= SEQUENCE { a Integer32 (0..65535), b INTEGER, c INTEGER (1..3) }
When compiled, I get the following errors:
test2.mib:24: subtyping not allowed in SEQUENCE test2.mib:26: subtyping not allowed in SEQUENCE (in other words, "a" and "c" have do not work, but "b" does)
Basically, it seems like libsmi does not like you to put in range limitations. When I examined x.680 (the asn.1 spec), I was unable to prove that the range format is valid in that location. Basically, I needed to get from the "Constraint section" (ie all of the xxxconstraint rules) over to SubtypeElements. However, the language rules do not seem complete, in that I cannot find the definition for "GeneralConstraint".
Does anyone know what the correct syntax is? If so do you know of an official document discussing this topic?
Thanks, Andy
gastone@lucent.com
PS: Below is my test mib file, my config file, & a dump of the smidump output:
ChrComHWEquipment-MIB
DEFINITIONS ::= BEGIN
IMPORTS OBJECT-TYPE, Integer32 FROM SNMPv2-SMI;
-- chrComHWEquipment Table
chr MODULE-IDENTITY LAST-UPDATED "9905170000Z" ORGANIZATION "Cc." CONTACT-INFO "Cm" DESCRIPTION "Tis" REVISION "9905170000Z" DESCRIPTION "Cka" ::= { 1 3695 }
ChrComHWEquipmentEntry ::= SEQUENCE { a Integer32 (0..65535), b INTEGER, c INTEGER (1..3)
}
a OBJECT-TYPE SYNTAX Integer32 (0..65535) MAX-ACCESS read-only STATUS current DESCRIPTION "" ::= { 1 10 }
b OBJECT-TYPE SYNTAX Integer32 (0..65535) MAX-ACCESS read-only STATUS current DESCRIPTION "" ::= { 1 11 }
c OBJECT-TYPE SYNTAX Integer32 (0..65535) MAX-ACCESS read-only STATUS current DESCRIPTION "" ::= { 1 12 }
END
And my compilation line with errors:
N:\chr_sim\devices\metropolis\mib>/chr_sim/framework/controller\smidump.exe -f python -c test.cfg -o ChrComHWEquipment.py test2.mib /chr_sim/framework/controller\smidump.exe -f python -c test.cfg -o ChrComHWEquipment.py test2.mib test2.mib:11: macro `MODULE-IDENTITY' has not been imported from module `SNMPv2-SMI' test2.mib:24: subtyping not allowed in SEQUENCE test2.mib:26: subtyping not allowed in SEQUENCE test2.mib:30: node `a' must be contained in at least one conformance group test2.mib:38: node `b' must be contained in at least one conformance group test2.mib:46: node `c' must be contained in at least one conformance group smidump: module `test2.mib' contains errors, expect flawed output
And finally my cfg file:
path \chr_emb\mib;\chr_vxworks\target\src\snmpv1\mibs;\chr_sim\framework\controller\libsmi\mibs\ietf\
level 4
load rfc1155-smi load rfc1213
-- !! 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.
participants (1)
-
Andy Stone