my asn.1 module cannot be compiled. i receive syntax error.
can anyone help me out, giving me tips ?

THANKS in Advance

Here is my module :

IPv4Header DEFINITIONS ::=
BEGIN

        IPHeader ::= SEQUENCE
        {
                version         INTEGER(0..15),
                ipheaderlength  INTEGER(5..15),
                typeofservice   OCTET STRING,
                totallength     INTEGER(0..65535),
                identification  INTEGER(0..65535),
                flags           Flagtype,
                fragmentoffset  INTEGER(0..8191),
                timetolive      INTEGER(0..255),
                protocoll       INTEGER(0..255),
                headerchecksum  INTEGER(0..65535),
                sourceadress    IPadress,
                destinadress    IPadress,
                options         INTEGER(0..2147483647)
        }

        Flagtypes ::= SEQUENCE OF INTEGER


        Flagtype Flagtypes ::=
        {
                flag1   INTEGER DEFAULT 0,
                flag2   INTEGER(0|1),
                flag3   INTEGER(0|1)
        }

The above definition is incorrect. I believe you meant to have

        Flagtype ::= SEQUENCE
        {
                flag1   INTEGER DEFAULT 0,
                flag2   INTEGER(0|1),
                flag3   INTEGER(0|1)
        }

Why do you have Flagtypes? Please explain what you're trying to achieve and perhaps I can suggest something better.

Which tagging environment would you expect to use? If you use explicit tagging, which is the default, you will see a tagging error since the tags for flag1 and flag2 would be the same.

        IPadress ::= SEQUENCE
        {
                field1  INTEGER(0..255),
                flied2  IA5STRING DEFAULT ".",
                field3  INTEGER(0..255),
                field4  IA5STRING DEFAULT ".",
                field5  INTEGER(0..255),
                field6  IA5STRING DEFAULT ".",
                field7  INTEGER(0..255)
        }
END

The correct spelling is IA5String.

=====================================================================
Conrad Sigona                    Voice Mail     : 1-732-302-9669 x400
OSS Nokalva                      Fax            : 1-614-388-4156
[EMAIL PROTECTED]                   My direct line : 1-315-845-1773
_______________________________________________
Asn1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1

Reply via email to