On Thu, 26 Oct 2000, Olivier DUBUISSON wrote:
 
> Rajmohan wrote:
> >
> > I need a clarification in PER.
> >
> > What is the significance of OPTIONAL element in extension?
> >
> > eg:   ASNSTRUCT        ::= SEQUENCE
> >        {
> >            nonStandard        INTEGER,
> >            ....
> >            extnA                 BOOLEAN,
> >            extnB                 INTEGER (0..65535) OPTIONAL
> >       }
> >
> >  Here, how to encode the extension elements in extension and with the OPTIONAL
> > bit?
>
> This is described in the books:
> [...] Each bit equals 1 if the corresponding extension is present in the
> value (whether this extension is mandatory or marked OPTIONAL or DEFAULT), 0
> otherwise.
 
Olivier answered your second question, but your first question was not
answered.  Extension addition items are all "optional" for versions of
implementations in which those items are not defined (e.g., in version 1
of ASNSTRUCT extnA and extnB are not defined), but in versions of
implementations in which the extension additions are defined (e.g., let's
say extnA and extnB are defined in version 2) an extension addition item
which is not marked OPTIONAL is *mandatory* as far as that version goes,
and those items that are marked OPTIONAL are optional to that version.  
Thus, if extnA and extnB above are defined in version 2 but not version 1,
a version 2 implementation is required to always transmit extnA *if it is
originating the message* because it is not marked OPTIONAL, but can omit
extnB.  If it is not originating the message (e.g., it is forwarding a
message that was received from a version 1 implementation) then it is free
to omit extnA and extnB if it was not present in the message.  An
implication of this is that you can never have extnB present in a message
if extnA is absent.

-------------------------------------------------------------------------
Bancroft Scott                               Toll Free    :1-888-OSS-ASN1
OSS Nokalva                                  International:1-732-302-0750
[EMAIL PROTECTED]                                 Tech Support :1-732-302-9669 x-1
1-732-302-9669 x-200                         Fax          :1-732-302-0023

Reply via email to