Scroll to navigation

ESNACC(1) Development ESNACC(1)


esnacc - ASN.1 compiler which generates C/C++ code suitable for encoding/decoding BER and PER


esnacc [-h] [-P] [-t] [-v] [-e] [-d] [-p] [-f] [-y] [-M] [-B] [-c] [-C] [-T table file] [-idl] [-I include directory] [-mm] [-mf] [-mo] [-l negative number] [-VDAexport=DEFINE_NAME] [-E BER|DER] [-a start number] [ASN.1 File List].SH "DESCRIPTION"

esnacc is an enhanced version of the Sample Neufeld ASN.1 C Compiler. It takes ASN.1 formatted sources and produces C or C++ source code for BER encode and decode routines as well as print and free routines for each type in the given ASN.1 modules. Alternatively, esnacc can produce type tables that can be used for table based/intepreted encoding and decoding. The type table based methods tend to be slower than their C or C++ counterparts, but they usually use less memory (table size vs. object code)

Most of the 1990 ASN.1 features are parsed although some do not affect the generated code. Fairly rigorous error checking is performed on the ASN.1 source; any errors detected will be reported (printed to stderr).

Each file in the ASN.1 file list should contain a complete ASN.1 module. ASN.1 modules that use IMPORTS feature will be compiled together. The generated source files will include each module's header file in command line order. This means it is important to order the modules from least dependent to most dependent on the command line to avoid type ordering problems. Currently, esnacc assumes that each ASN.1 file given on the command line depends on all of the others from the command line. No attempt is made to only include the header files from modules referenced in the import list for that module.

If the target language is C, esnacc generates .c and .h files. If the target language is C++, esnacc generates .cpp and .h files.



Prints a synopsis of esnacc and exits.


Enhanced SNACC was originally written by Michael Sample, but has since been modified by numerous contributors.


Copyright © 2016 Aaron Conole

2016-04-26 esnacc 1.8.1