Ethereal-users: [Ethereal-users] Re: ASN.1

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: ronnie sahlberg <ronniesahlberg@xxxxxxxxx>
Date: Sat, 17 Dec 2005 20:53:16 +0000
On 12/16/05, Graeme Lunt
> You have a SEQUENCE of 4 OPTIONAL IA5Strings without any tags. So if you
> receive a CDR containing a single IA5String of length < 6 then the ASN.1
> handler can't tell if it is a isnSM, textLen, targetId or
> originalTarget.Also a field called "textLen" is an IA5String and not
> INTEGER?
>
> So I would suspect your ASN.1 definition is just wrong.
>

That only applies for BER/DER/CER.

For PER encoding this SEQUENCE is fine. PER sequences contains a
bitmap for all optional fields with bits that define which options are
present and which ones are not which will tell the receiver which
field it is that is encoded and thus there is no need for any tags to
identify the fields.


Since it is CDR (Call Data Record?) which is a telco protocol it is
likely to be PER.   (telcos like PER).



>
>   _____
>
> From: ethereal-users-bounces@xxxxxxxxxxxx
> [mailto:ethereal-users-bounces@xxxxxxxxxxxx] On Behalf Of Arnaldo Maciel
> Bellato
> Sent: 15 December 2005 21:30
> To: ethereal-users@xxxxxxxxxxxx
> Subject: [Ethereal-users] ASN.1
>
>
> Hi,
>
> I have a description in ASN.1 like below.
> But I have problem when I try decode it in c#.
> The decode give me the forward error.
>
> "E:\Arnaldo\TIM\BACKUP\ASCInSms_Teste.asn1", line 9 (ASCInSms): A0120E:
> Parsing error: expecting ')' or '!' but found typereference.
>
> isnSM IA5String (SIZE(1..10) CODE("LEFT")) OPTIONAL,
>
> Somebody wherever found this notation in ASN.1 and can help me?
>
> What mean this notation and is it right?
>
> Thanks
>
>
> ASCInSms DEFINITIONS ::=
> BEGIN
> CDR ::= SEQUENCE
> {
>  isnSM IA5String (SIZE(1..10) CODE("LEFT")) OPTIONAL,
>  textLen IA5String (SIZE(1..5) CODE("LEFT")) OPTIONAL,
>  targetId IA5String (SIZE(1..40) CODE("LEFT")) OPTIONAL,
>  originalTarget IA5String (SIZE(1..40) CODE("LEFT")) OPTIONAL
> }
> END
>
>
>