ASN.1 Tools for C — Details

ASN.1/C Compiler

The ASN.1 compiler is a standalone program that takes one or more input files, where each input file contains one or more ASN.1 modules. The compiler verifies that the specification is valid, and generates:

  • diagnostic messages and optionally an output ASN.1 listing
  • easy to use C language data structures to be included in your application
  • a control table for use by the space-optimized or lean encoder/decoder
  • a time-optimized encoder/decoder.

(the Lean Encoder Decoder is provided in a separate package)

Cross compiling is supported by the ASN.1 Tools for C. Cross compiling enables a developer to produce files that can be used on a different operating system than the one the compiler runs on. Maximize your investment with the ability to cross-compile. Learn more about cross-compilation.


Encoder/Decoder

The OSS encoders/decoders provide, among many other features, the ossEncode() and ossDecode() functions. The ossEncode() function takes data placed by your application program in the compiler-generated C data structures and converts it to a string of bytes encoded according to BER, CER, PER, OER, COER, DER, XER, CXER or EXER.

TLV Print Utility

This utility, included with the ASN.1 Tools for C, takes a BER or DER encoding in ASCII or binary format from an input file and writes it to an output file in one of three different type-length-value (TLV) formats.

The other function, ossDecode(), takes a string of bytes that have been encoded according to BER, CER, PER, OER, COER, DER, XER, CXER or EXER and performs the inverse operation of the encoder, resulting in a C data structure that you can easily manipulate.

The space-optimized encoder/decoder (SOED) is so named because its emphasis is on minimizing use of memory, especially when the abstract syntax is large or complex. Both the encoder and decoder possess a simple yet flexible memory management interface as well as a wealth of tracing, error trapping, diagnostic and recovery capabilities.

More functionality

Runtime functions, supporting PDU copying, comparing, printing and more, make your application development process easier.

The time-optimized encoder/decoder (TOED) has a program call interface identical to the space-optimized encoder/decoder's and performs the same function (except that it does not possess any tracing capability), but its emphasis is on minimizing CPU utilization.


The OSS runtime libraries have been ported to 500+ platforms, including many embedded platforms.

Interpretive ASN.1 API

The Interpretive ASN.1 API (IAAPI), included at no extra cost in the ASN.1 Tools for C, can be used in conjunction with the regular ASN.1/C compiler (when the ASN.1 schema is compiled at the time when the application is developed), or with OSS' Compile-And-Go Library (CAGL) (when the schema is compiled dynamically at runtime).

IAAPI provides means to get information about the details of a compiled ASN.1 schema, including the types it defines (say, a record with multiple components), the fields of a type (say, an integer and a string) and the constraints associated with them (say, a smaller-than-10 integer). This information allows developers to write code that parses the content of a message, which is particularly useful when its structure is unknown at application development time. Similarly, developers can write code to create, field by field, a new message, so long as its format obeys the schema compiled.

IAAPI supports ASN.1 BER, CER, DER, PER, OER, XER, CXER and E-XER

Standards Conformance

This powerful software conforms fully to the ASN.1 standards listed below:

  • ITU-T X.696 (ISO/IEC 8825-7) - Octet Encoding Rules (OER) Base Protocol

  • ITU-T X.680 (ISO/IEC 8824-1) - Abstract Syntax Notation One (ASN.1): Specification of Basic Notation

  • ITU-T X.681 (ISO/IEC 8824-2) - Abstract Syntax Notation One (ASN.1): Information Object Specification

  • ITU-T X.682 (ISO/IEC 8824-3) - Abstract Syntax Notation One (ASN.1): Constraint Specification

  • ITU-T X.683 (ISO/IEC 8824-4) - Abstract Syntax Notation One (ASN.1): Parameterization of ASN.1 Specifications

  • ITU-T X.690 (ISO/IEC 8825-1) - ASN.1 Encoding Rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)

  • ITU-T X.691 (ISO/IEC 8825-2) - ASN.1 Encoding Rules: Specification of Packed Encoding Rules (PER)

  • ITU-T X.692 (ISO/IEC 8825-3) - ASN.1 Encoding Rules: Specification of Encoding Control Notation (ECN)

  • ITU-T X.693 (ISO/IEC 8825-4) - ASN.1 Encoding Rules: Specification of XML Encoding Rules (XER). This includes the Canonical XML Encoding Rules (CXER) specification, and Extended XML Encoding Rules (E-XER).
Quick Links

Resources
icon

More information about how to create, compile and link your ASN.1 application using the ASN.1/C Tools.


Free Trial
download

Download the ASN.1/C Tools today!




24x7 Tech Support

contact

We are here: 24 hours a day, 7 days a week.

  • Phone: 1-888-OSS-2761 (USA and Canada)
  • Phone: 1-732-302-9669 (International)
  • Fax: 1-732-302-0023
  • Email: support@oss.com

Quickly receive answers to your support questions.