While decoding,if the value of Length of is 10000000 'B (or 80 'H),then the value field is contains indefinite length and the same can be idendified by end-of-content ( 0x00'H 0x00'H) at the beginning of next TLV structure.If the value of length is other than 10000000 'B,then value filed contains definite length.
regards kb devaraj > -----Original Message----- > From: Pino Roberto [SMTP:[EMAIL PROTECTED]] > Sent: Wednesday, September 11, 2002 8:33 PM > To: '[EMAIL PROTECTED]' > Subject: R: [ASN.1] Abount definite and indefinite lenght encoding > > Thanks for the answers... > My second question was "How can I tell to the decoder that a structure > must > be encoded with indefinite lenght and that another must be encoded with > definite lenght within the same input file? Is there any standard > identifier > in the ASN.1 definition of the structure to use?". > My question was about the ASN1 syntax to say that a structure must be > encoded with indefinite lenght. > Thanks, > Roberto > > -----Messaggio originale----- > Da: Bancroft Scott [mailto:[EMAIL PROTECTED]] > Inviato: mercoled� 11 settembre 2002 14.33 > A: '[EMAIL PROTECTED]' > Oggetto: Re: [ASN.1] Abount definite and indefinite lenght encoding > > > On Wed, 11 Sep 2002, Pino Roberto wrote: > > > Hi, > > I would like to know if it's possible with ASN.1, use different lenght > > encodings for structure in the same file. > > For example, is possible encoding a structure with indefinite lenght > > encoding and another (may be a substructure of the first one) with > definite > > lenght encoding? > > Yes, with BER the encoder is free to choose either definite or indefinite > length encodings. Of course, if an application profile dictates that > only one or the other must be used, then you are obliged to use the > specified one. > > > And if it's possibile, how can the encoder recognize structures to be > > encoded with definite lenght encoding from structures with indefinite > > lenght encoding? Is there any ASN.1 tag to use? Thanks, bye, Roberto > > I take it that you meant to say "how can the decoder ...". Yes? > > If yes, it can tell whether definite or indefinite length encoding was > used based on whether the length field has a value of hex 80. > > If no, check with the provider of the tool that you are using. > > ------------------------------------------------------------------------- > 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 > http://www.oss.com
