home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / protocol / iso / 959 < prev    next >
Encoding:
Text File  |  1992-07-21  |  2.2 KB  |  70 lines

  1. Newsgroups: comp.protocols.iso
  2. Path: sparky!uunet!walter!porthos!sabre!wlc
  3. From: wlc@sabre.bellcore.com (Wei-Lee Chen)
  4. Subject: Re: ASN.1 -> C API (was ASN.1 tools information)
  5. Reply-To: wlc@sabre.bellcore.com (Wei-Lee Chen)
  6. Organization: Bellcore, Livingston, NJ
  7. Date: Tue, 21 Jul 92 16:42:13 GMT
  8. Message-ID: <1992Jul21.164213.17120@porthos.cc.bellcore.com>
  9. 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>
  10. Sender: netnews@porthos.cc.bellcore.com (USENET System Software)
  11. Lines: 57
  12.  
  13. In article <24878@sophia.inria.fr>, huitema@mitsou.inria.fr (Christian Huitema) writes:
  14.  
  15. |> 
  16. |> 4) Regarding "extensible" data types, as mentioned by Bancroft Scott. We seem
  17. |> to have a problem here. Take the exemple of a type:
  18. |>    X ::= SEQUENCE {
  19. |>      a[0] Foo,
  20. |>      b[1] Bar }
  21.  
  22.    To allow the above expression to be extensible.  Currently in the standards,
  23.    the typical way is to add a clause as below:
  24.  
  25.       "The abstract syntax name may be used when the presentation data values 
  26.        are modified to include
  27.   
  28.        ....
  29.        - new tagged elements within a SEQUENCE;
  30.        ..."
  31.  
  32.    I assume the existing compiler which supports the extensibility rules
  33.    will need to use a compiler-specific directive to mark that X is extensible.
  34.    There is a CD corrigendum for X.208 to use format syntax to express 
  35.    extensible. For example, 
  36.     
  37.  
  38.       X ::= SEQUENCE {
  39.      a[0] Foo,
  40.     b[1] Bar, ... }    
  41.  
  42.  
  43. |> Which get extented in a revised version of a protocol into:
  44. |>    X ::=SEQUENCE {
  45. |>      a[0] Foo,
  46. |>      b[1] Bar,
  47. |>      c[2] NewData OPTIONAL } 
  48. |> I would suppose that the initial version is translated in C as:
  49. |>   typedef struct {
  50. |>       Foo a,
  51. |>       Bar b }
  52.  
  53.    The initial version may be translated in C as:
  54.  
  55.      typedef struct {
  56.           Foo  a,
  57.           Bar  b,
  58.           Any  extension }
  59.    since it is known to be extensible in contrast to the expression for a
  60.    non-extensible SEQUENCE.
  61.  
  62. |> Now, just explain me how I am supposed to pass information on the extra
  63. |> component "NewData", should it be present?
  64. |> 
  65.  
  66.    See above.
  67.  
  68.  
  69. Wei-Lee
  70.