Hello kb devaraj
>
> Can anyone please tell me whether the following data
> is encoded (BER) properly as per the asn.1 definitions
> attached and also whether it ensures the asn.1
> standards.
No it doesn't.
>
> Data:
>
> 30 46 A0 03 0A 01 02 A1 03 02 01 64 30 3A A0 1B
the first tag A0 should be primitive and not constructed instead of A0 (1010
0000) you should have 80 (1000 0000) because Stkt-Type is a primitive type
(ENUMERATED) and the tag should be followed immediately by 01 02 since your
are in an IMPLICIT tagging mode as specified at the start of the module.
> 30 19 02 02 0C 1C 02 01 02 02 01 15 02 01 01 04
> 0A 31 31 30 37 38 34 35 30 36 34 A0 1B 30 19 02
> 02 0C 1C 02 01 02 02 01 0A 02 01 02 04 0A 36 36
> 34 30 30 39 36 35 34 32
I think a correct encoding would be :
000000: 30 3e 80 01 02 81 01 64 30 36 a0 19 02 02 0c 1c |0>.....d06......|
000016: 02 01 02 02 01 15 02 01 01 04 0a 31 31 30 37 38 |...........11078|
000032: 34 35 30 36 34 a0 19 02 02 0c 1c 02 01 02 02 01 |45064...........|
000048: 0a 02 01 02 04 0a 36 36 34 30 30 39 36 35 34 32 |......6640096542|
StktVarPart SEQUENCE
{
type Stkt-Type = call(2)
srv-id INTEGER = 100
ele SEQUENCE_OF
{
Stkt-ele
{
data Stkt-tag
{
feature INTEGER = 3100
subfeat INTEGER = 2
type INTEGER = 21
subtype INTEGER = 1
dump OCTET_STRING = 31.31.30.37.38.34.35.30.36.34
}
}
Stkt-ele
{
data Stkt-tag
{
feature INTEGER = 3100
subfeat INTEGER = 2
type INTEGER = 10
subtype INTEGER = 2
dump OCTET_STRING = 36.36.34.30.30.39.36.35.34.32
}
}
}
}
Maybe this will help you.
Bruno KONIK - uniGone
>
> ASN.1 syntax file is:
>
> ALCATEL-IN DEFINITIONS IMPLICIT TAGS ::= BEGIN
>
> StktVarPart ::= SEQUENCE
> {
> type [0] Stkt-Type,
> srv-id [1] INTEGER,
> ele SEQUENCE OF Stkt-ele
> }
>
> Stkt-Type ::= ENUMERATED
> {
> call (2),
> televoting (5),
> management (3)
> }
>
> Stkt-ele ::= CHOICE
> {
> data [0] Stkt-tag,
> evt [1] Stkt-evt,
> obj [2] Stkt-obj
> }
>
> Stkt-tag ::= SEQUENCE
> {
> feature INTEGER,
> subfeat INTEGER,
> type INTEGER,
> subtype INTEGER,
> dump OCTET STRING
> }
>
> Stkt-evt ::= SEQUENCE
> {
> feature INTEGER,
> subfeat INTEGER,
> type INTEGER,
> subtype INTEGER,
> value INTEGER,
> dump OCTET STRING OPTIONAL
> }
>
> Stkt-obj ::= SEQUENCE
> {
> class INTEGER,
> object INTEGER,
> mn OCTET STRING OPTIONAL
> }
>
> END
>
>
> Many thanks in advance
>
> thanks and regards
> kb devaraj
>
>
>
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - Helps protect you from nasty viruses.
> http://promotions.yahoo.com/new_mail
> _______________________________________________
> ASN1 mailing list
> [EMAIL PROTECTED]
> http://lists.asn1.org/mailman/listinfo/asn1
_______________________________________________
ASN1 mailing list
[EMAIL PROTECTED]
http://lists.asn1.org/mailman/listinfo/asn1