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

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

From: "Graeme Lunt" <graeme.lunt@xxxxxxxxx>
Date: Fri, 16 Dec 2005 12:47:44 -0000
Hi,
 
I personally haven't come across a CODE constraint in the ASN.1 definition - but it sounds like it may be a proprietary compiler directive.
 
However, even if you comment out the CODE constraint, you still have some dubious ASN.1.
 
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.
 
Graeme
 


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