home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.protocols.iso
- Path: sparky!uunet!walter!porthos!sabre!wlc
- From: wlc@sabre.bellcore.com (Wei-Lee Chen)
- Subject: Re: ASN.1 -> C API (was ASN.1 tools information)
- Reply-To: wlc@sabre.bellcore.com (Wei-Lee Chen)
- Organization: Bellcore, Livingston, NJ
- Date: Tue, 21 Jul 92 16:42:13 GMT
- Message-ID: <1992Jul21.164213.17120@porthos.cc.bellcore.com>
- References: <Jul.4.13.21.15.1992.16175@caip.rutgers.edu> <1992Jul7.062240.28306@mel.dit.csiro.au> <Jul.7.21.52.48.1992.25963@caip.rutgers.edu> <1992Jul9.181147.9215@porthos.cc.bellcore.com> <24878@sophia.inria.fr>
- Sender: netnews@porthos.cc.bellcore.com (USENET System Software)
- Lines: 57
-
- In article <24878@sophia.inria.fr>, huitema@mitsou.inria.fr (Christian Huitema) writes:
-
- |>
- |> 4) Regarding "extensible" data types, as mentioned by Bancroft Scott. We seem
- |> to have a problem here. Take the exemple of a type:
- |> X ::= SEQUENCE {
- |> a[0] Foo,
- |> b[1] Bar }
-
- To allow the above expression to be extensible. Currently in the standards,
- the typical way is to add a clause as below:
-
- "The abstract syntax name may be used when the presentation data values
- are modified to include
-
- ....
- - new tagged elements within a SEQUENCE;
- ..."
-
- I assume the existing compiler which supports the extensibility rules
- will need to use a compiler-specific directive to mark that X is extensible.
- There is a CD corrigendum for X.208 to use format syntax to express
- extensible. For example,
-
-
- X ::= SEQUENCE {
- a[0] Foo,
- b[1] Bar, ... }
-
-
- |> Which get extented in a revised version of a protocol into:
- |> X ::=SEQUENCE {
- |> a[0] Foo,
- |> b[1] Bar,
- |> c[2] NewData OPTIONAL }
- |> I would suppose that the initial version is translated in C as:
- |> typedef struct {
- |> Foo a,
- |> Bar b }
-
- The initial version may be translated in C as:
-
- typedef struct {
- Foo a,
- Bar b,
- Any extension }
- since it is known to be extensible in contrast to the expression for a
- non-extensible SEQUENCE.
-
- |> Now, just explain me how I am supposed to pass information on the extra
- |> component "NewData", should it be present?
- |>
-
- See above.
-
-
- Wei-Lee
-