UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

ASN.1-C compiler for automatic protocol implementation Yang, Yueli


One of the basic requirements of communication protocols in a heterogeneous computer network is a standard external data-transfer representation. Abstract Syntax Notation One (ASN.1) has been widely used in international standard specifications. Its transfer-syntax of Basic Encoding Rules (BER) is applied as the standard external data representation. This thesis presents an efficient BER implementation, called the ED library. The ED 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.1 data-types. The Performance of the ED library is measured and discussed. Based on the ED library, an ASN.1-C compiler, called CASN1, is designed and implemented to release communication software programmers from the arduous work of translating protocol-defined data-types and constructing their encoders and decoders. Given an ASN.1 protocol specification, CASN1 automatically translates the input ASN.1 modules into C and generates the BER encoders and decoders for the protocol denned data-types. This thesis discusses the design principles, user interface, internal structures, and the implementation and of CASN1. Example applications are given. Both the ED library and CASN1 are implemented in C on UNIX 4.2 BSD using the YACC and LEX tools.

Item Media

Item Citations and Data


For non-commercial purposes only, such as research, private study and education. Additional conditions apply, see Terms of Use https://open.library.ubc.ca/terms_of_use.