The Design and Implementation of an ASN. 1-C
A basic requirement for communication in a heterogeneous computing environment is a standard external data representation. Abstract Syntax Notation One (ASN.l) has been widely used in international standard specifications: its transfer-syntax, the Basic Encoding Rules (BER), is used as the external data representation. This paper presents a BER implementation called the ED library. The EL) library includes a number of encoding and decoding routines that may be used as primitive functions to compose encoders and decoders for arbitrarily complicated ASN.l data-types. Based on the ED library, an ASN.1-C compiler, called CASNl, is designed and implemented to free the protocol implementors from the arduous work of translating protocol- defined data-types and constructing their encoders and decoders. Given an ASN.l protocol specification, CASNl automatically translates the input ASN.1 modules into C and generates the BER encoders and decoders for the protocol defined data-types. This paper discusses the CASNl design principles, user interface, and some example applications. The performance of the ED library and generated CASNl code is also measured and discussed.