blob: 3c07ec7fd2225ce5a7573627c6ce6f965c584297 [file] [log] [blame]
Lev Walkinf15320b2004-06-03 03:38:44 +00001.TH ASN1C 1 "\*(Dt" "ASN.1 Compiler" "ASN.1 Compiler"
2.SH NAME
3asn1c \- ASN.1 Compiler
Lev Walkinf15320b2004-06-03 03:38:44 +00004.SH SYNOPSIS
Lev Walkin06b8d7a2004-09-23 22:06:02 +00005asn1c [\fB\-E\fR [\fB-F\fR] | \fB\-P\fR | \fB\-R\fR]
Lev Walkinf7484512004-10-13 09:13:56 +00006 [\fB\-S\fR\fIdir\fR] [\fB-X\fR]
Lev Walkin59b176e2005-11-26 11:25:14 +00007 [\fB\-W\fR\fIdebug-\fR...] [\fB\-f\fR\fIoption\fR] [\fB\-gen-\fR\fIoption\fR] [\fB\-print-\fR\fIoption\fR]
Lev Walkin15385612004-08-20 13:24:01 +00008 \fIinfile\fR...
Lev Walkinf15320b2004-06-03 03:38:44 +00009.SH DESCRIPTION
Lev Walkin15385612004-08-20 13:24:01 +000010asn1c compiles the ASN.1 specifications into the set of
Lev Walkinf7484512004-10-13 09:13:56 +000011target language (C/C++) encoders and decoders for BER, DER, XER,
Lev Walkin15385612004-08-20 13:24:01 +000012and other encoding standards.
Lev Walkinf15320b2004-06-03 03:38:44 +000013.SH OPTIONS
14.TP
Lev Walkin15385612004-08-20 13:24:01 +000015\fIOverall Options\fR
16\fB\-E \-F \-P \-R\fR
17.BI "\-S " directory
Lev Walkinf7484512004-10-13 09:13:56 +000018\fB\-X
Lev Walkinf15320b2004-06-03 03:38:44 +000019.TP
Lev Walkin15385612004-08-20 13:24:01 +000020\fIWarning Options\fR
Lev Walkinf15320b2004-06-03 03:38:44 +000021.br
Lev Walkin15385612004-08-20 13:24:01 +000022\fB\-Werror \-Wdebug-lexer \-Wdebug-fixer \-Wdebug-compiler\fR
Lev Walkinf15320b2004-06-03 03:38:44 +000023.TP
Lev Walkin15385612004-08-20 13:24:01 +000024\fILanguage Options\fR
Lev Walkin3aed7ff2004-08-19 13:24:58 +000025.br
Lev Walkin72a0f5a2005-07-24 08:28:39 +000026\fB\-fall-defs-global \-fbless-SIZE \-fcompound-names \-findirect-choice
Lev Walkin7c655122005-06-05 09:42:42 +000027.BI "\-fknown-extern-type="<name>
Lev Walkin59b176e2005-11-26 11:25:14 +000028\fB\-fnative-types \-fno-constraints \-fno-include-deps \-funnamed-unions \-fskeletons-copy
29.TP
30\fICodecs Generation Options\fR
31.br
32.B \-gen-PER
Lev Walkin3aed7ff2004-08-19 13:24:58 +000033.TP
Lev Walkin15385612004-08-20 13:24:01 +000034\fIOutput Options\fR
Lev Walkinf15320b2004-06-03 03:38:44 +000035.br
Lev Walkin15385612004-08-20 13:24:01 +000036.B \-print-constraints \-print-lines
Lev Walkinf15320b2004-06-03 03:38:44 +000037.SH OVERALL OPTIONS
38.TP
39.B \-E
Lev Walkin15385612004-08-20 13:24:01 +000040Stop after the parsing stage and print the reconstructed ASN.1
41specification code to the standard output.
Lev Walkinf15320b2004-06-03 03:38:44 +000042.TP
43.B \-F
44Used together with \c
45.B \-E\c
46, instructs the compiler to stop after the ASN.1 syntax
47tree fixing stage and dump the reconstructed ASN.1 specification
48to the standard output.
49.TP
Lev Walkinf15320b2004-06-03 03:38:44 +000050.B \-P
51Dump the compiled output to the standard output instead of creating the
52target language files on disk.
53.TP
Lev Walkinf15320b2004-06-03 03:38:44 +000054.B \-R
55Restrict the compiler to generate only the ASN.1 tables,
56omitting the usual support code.
Lev Walkin3aed7ff2004-08-19 13:24:58 +000057.TP
Lev Walkin15385612004-08-20 13:24:01 +000058\fB\-S\fR \fIdirectory\fR
Lev Walkin3aed7ff2004-08-19 13:24:58 +000059Use the specified directory with ASN.1 skeleton files.
Lev Walkinf7484512004-10-13 09:13:56 +000060.TP
61.B \-X
62Generate the XML DTD schema for the specified ASN.1 files.
Lev Walkinf15320b2004-06-03 03:38:44 +000063.SH WARNING OPTIONS
64.TP
65.B \-Werror
66Treat warnings as errors; abort if any warning is produced.
67.TP
68.B \-Wdebug-lexer
69Enable lexer debugging during the ASN.1 parsing stage.
70.TP
71.B \-Wdebug-fixer
72Enable ASN.1 syntax tree fixer debugging during the fixing stage.
73.TP
74.B \-Wdebug-compiler
75Enable debugging during the actual compile time.
Lev Walkin15385612004-08-20 13:24:01 +000076.SH LANGUAGE OPTIONS
77.TP
Lev Walkindd32b592004-09-06 08:07:29 +000078.B \-fall-defs-global
79Normally the compiler hides the definitions (asn1_DEF_xxx) of the inner
80structure elements (members of SEQUENCE, SET and other types). This option
81makes all such definitions global.
82Enabling this option may pollute the namespace by making lots of asn1_DEF_xxx
83structures globally visible, but will allow you to manipulate
84(encode and decode) the individual members of any complex ASN.1 structure.
85.TP
Lev Walkin15385612004-08-20 13:24:01 +000086.B \-fbless-SIZE
87Allow SIZE() constraint for INTEGER, ENUMERATED, and other types for which this
88constraint is normally prohibited by the standard. This is a violation of
Lev Walkin7c655122005-06-05 09:42:42 +000089an ASN.1 standard and compiler may fail to produce meaningful code.
90.TP
91.B \-fcompound-names
92Using this switch prevents name collisions in the target source code
93by using complex names for target language structures. (Name collisions
94may occur if the ASN.1 module reuses the same identifiers in multiple
95contexts).
96.TP
Lev Walkin72a0f5a2005-07-24 08:28:39 +000097.B \-findirect-choice
98When generating code for a CHOICE type, compile the CHOICE members as indirect
99pointers instead of declaring them inline. Consider using this option
100together with
101.B \-fno-include-deps
102to prevent circular references.
103.TP
Lev Walkin7c655122005-06-05 09:42:42 +0000104.BI "\-fknown-extern-type="<name>
105Pretend the specified type is known. The compiler will assume the target
Lev Walkin72a0f5a2005-07-24 08:28:39 +0000106language source files for the given type have been provided manually.
Lev Walkin15385612004-08-20 13:24:01 +0000107.TP
Lev Walkin99301892004-09-14 12:48:17 +0000108.B \-fnative-types
109Use the native machine's data types (int, double) whenever possible,
Lev Walkin7c9e9232004-10-02 00:10:25 +0000110instead of the compound INTEGER_t, ENUMERATED_t and REAL_t types.
Lev Walkin15385612004-08-20 13:24:01 +0000111.TP
Lev Walkin4e940a02004-09-26 13:13:13 +0000112.B \-fno-constraints
113Do not generate ASN.1 subtype constraint checking code. This may make a shorter executable.
114.TP
Lev Walkin7c655122005-06-05 09:42:42 +0000115.B \-fno-include-deps
116Do not generate courtesy #include lines for non-critical type dependencies.
117Helps prevent namespace collisions.
118.TP
Lev Walkin15385612004-08-20 13:24:01 +0000119.B \-funnamed-unions
120Enable unnamed unions in the definitions of target language's structures.
121.TP
Lev Walkina895afb2005-10-06 10:09:34 +0000122.B \-fskeletons-copy
123Copy support files (skeletons) rather than symlink them.
Lev Walkin59b176e2005-11-26 11:25:14 +0000124.SH CODECS GENERATION OPTIONS
Lev Walkina895afb2005-10-06 10:09:34 +0000125.TP
Lev Walkin59b176e2005-11-26 11:25:14 +0000126.B \-gen-PER
127Generate Packed Encoding Rules (PER) support code.
Lev Walkin15385612004-08-20 13:24:01 +0000128.SH OUTPUT OPTIONS
129.TP
130.B \-print-constraints
131When -EF are also specified, this option forces the compiler to explain
132its internal understanding of subtype constraints.
133.TP
134.B \-print-lines
135Generate "-- #line" comments in \fB-E\fR output.
Lev Walkin06b8d7a2004-09-23 22:06:02 +0000136.SH SEE ALSO
137.TP
Lev Walkin12984672004-09-24 21:00:15 +0000138\&\fIunber\fR\|(1), \&\fIenber\fR\|(1)
Lev Walkinf15320b2004-06-03 03:38:44 +0000139.SH AUTHORS
140Lev Walkin <vlm@lionet.info>