On Wed, 31 Oct 2001, Parag wrote:
> MEDIA-GATEWAY-CONTROL DEFINITIONS AUTOMATIC TAGS::= BEGIN
>
> MegacoMessage ::= SEQUENCE
> {
> authHeader AuthenticationHeader OPTIONAL,
> mess Message
> }
> AuthenticationHeader ::= SEQUENCE
> {
> secParmIndex SecurityParmIndex,
> seqNum SequenceNum,
> ad AuthData
> }
>
> SecurityParmIndex ::= OCTET STRING(SIZE(4))
>
> SequenceNum ::= OCTET STRING(SIZE(4))
>
> AuthData ::= OCTET STRING (SIZE (12..32))
>
> Message ::= SEQUENCE
> { version INTEGER(0..99),
> -- The version of the protocol defined here is equal to 1.
> mId MId, -- Name/address of message originator
> messageBody CHOICE
> {
> messageError ErrorDescriptor,
> transactions SEQUENCE OF Transaction
> },
> ...
> }
>
> END
>
> The above ASN.1 partial structure is specified for MEGACO. We are
> implementing encoding and decoding in BER without the help of any tool
> or compiler. We are stuck with the Tagging issues. Kindly specify the
> solution and how the tagging is to be carried out for the above
> substructure without the help of any tool or compiler.
Why on Earth would you want to do such a thing? There are a lot of
excellent ASN.1 toolkits available, ranging from freeware to industrial
strenth tools. See http://asn1.elibel.tm.fr/en/links/index.htm#tools for
a list of some of them.
Anyway, the module below was generated by using the OSS ASN.1 compiler
-list option. Do yourself a favor and use an existing tool; you will
get to market faster and with a lot fewer bugs.
MEDIA-GATEWAY-CONTROL
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
MegacoMessage ::= SEQUENCE {
authHeader [0] AuthenticationHeader OPTIONAL,
mess [1] Message
}
AuthenticationHeader ::= SEQUENCE {
secParmIndex [0] SecurityParmIndex,
seqNum [1] SequenceNum,
ad [2] AuthData
}
SecurityParmIndex ::= OCTET STRING (SIZE (4))
SequenceNum ::= OCTET STRING (SIZE (4))
AuthData ::= OCTET STRING (SIZE (12..32))
Message ::= SEQUENCE {
version [0] INTEGER (0..99),
mId [1] MId,
messageBody [2] EXPLICIT CHOICE {
messageError [0] ErrorDescriptor,
transactions [1] SEQUENCE OF Transaction
},
...
}
ErrorDescriptor ::= INTEGER
Transaction ::= INTEGER
MId ::= INTEGER
END
-------------------------------------------------------------------------
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