2 .\" Automatically generated by Pandoc 1.19.2.1
5 .TH "asn1c" "1" "2017\-09\-01" "ASN.1 Compiler" "Version 0.9.29"
6 .nh \" Turn off hyphenation by default.
9 asn1c \-\- the ASN.1 Compiler
12 asn1c [\f[B]\-E\f[] [\f[B]\-F\f[]] | \f[B]\-P\f[] | \f[B]\-R\f[]]
16 [\f[B]\-S\f[]\f[I]dir\f[]] [\f[B]\-X\f[]]
20 [\f[B]\-W\f[]\f[I]debug\-\f[]...] [\f[B]\-f\f[]\f[I]option\f[]]
21 [\f[B]\-gen\-\f[]\f[I]option\f[]]
22 [\f[B]\-pdu\f[]={\f[B]all\f[]|\f[B]auto\f[]|\f[I]Type\f[]}]
26 [\f[B]\-print\-\f[]\f[I]option\f[]]
30 \f[I]input\-filenames\f[]...
33 asn1c compiles ASN.1 specifications into a set of target language
34 (C/C++) encoders and decoders for BER, DER, PER, XER, OER and other
37 .SS Stage Selection Options
40 Run the parsing stage only.
41 Print the reconstructed ASN.1 text.
46 Used together with \f[B]\-E\f[], instructs the compiler to stop after
47 the ASN.1 syntax tree fixing stage and dump the reconstructed ASN.1
48 specification to the standard output.
53 Dump the compiled output to the standard output instead of creating the
54 target language files on disk.
59 Restrict the compiler to generate only the ASN.1 tables, omitting the
64 .B \-S \f[I]directory\f[]
65 Use the specified directory with ASN.1 skeleton files.
70 Generate an XML DTD schema for the specified ASN.1 files.
76 Treat warnings as errors; abort if any warning is produced.
81 Enable lexer debugging during the ASN.1 lexing stage.
86 Enable lexer debugging during the ASN.1 parsing stage.
91 Enable ASN.1 syntax tree fixer debugging during the fixing stage.
96 Enable debugging during the actual compile time.
102 Allow \f[C]SIZE()\f[] constraint for \f[C]INTEGER\f[],
103 \f[C]ENUMERATED\f[], and other types for which this constraint is
104 normally prohibited by the standard.
105 This is a violation of ASN.1 standard, and the compiler may fail to
106 produce a meaningful code.
110 .B \-fcompound\-names
111 Using this option prevents name collisions in the target source code by
112 using complex names for target language structures.
113 (Name collisions may occur if the ASN.1 module reuses the same
114 identifiers in multiple contexts).
118 .B \-findirect\-choice
119 When generating code for a \f[C]CHOICE\f[] type, compile the
120 \f[C]CHOICE\f[] members as indirect pointers instead of declaring them
122 Consider using this option together with \f[B]\-fno\-include\-deps\f[]
123 to prevent circular references.
127 .B \-fincludes\-quoted
128 Refer to header files in \f[C]#include\f[]s using
129 \f[B]"\f[]double\f[B]"\f[] instead of \f[B]<\f[]angle\f[B]>\f[] quotes.
133 .B \-fknown\-extern\-type=\f[I]name\f[]
134 Pretend the specified type is known.
135 The compiler will assume the target language source files for the given
136 type have been provided manually.
141 Include ASN.1 module\[aq]s line numbers in generated code comments.
145 .B \-fno\-constraints
146 Do not generate ASN.1 subtype constraint checking code.
147 This may make a shorter executable.
151 .B \-fno\-include\-deps
152 Do not generate courtesy #include lines for non\-critical type
154 Helps prevent namespace collisions.
158 .B \-funnamed\-unions
159 Enable unnamed unions in the definitions of target language\[aq]s
165 Use the unbounded size data types (\f[C]INTEGER_t\f[],
166 \f[C]ENUMERATED_t\f[], \f[C]REAL_t\f[]) by default, instead of using the
167 native machine\[aq]s data types (long, double).
170 .SS Codecs Generation Options
173 Generate the Octet Encoding Rules (OER) support code.
178 Generate the Packed Encoding Rules (PER) support code.
182 .B \-pdu={all|auto|\f[I]Type\f[]}
183 Create a PDU table for specified types, or discover Protocol Data Units
185 In case of \f[B]\-pdu=all\f[], all ASN.1 types defined in all modules
186 will form a PDU table.
187 In case of \f[B]\-pdu=auto\f[], all types not referenced by any other
188 type will form a PDU table.
189 If \f[I]Type\f[] is an ASN.1 type identifier, the identifier is added to
190 the generated PDU table.
191 The last form may be specified multiple times to add any number of PDUs.
196 .B \-print\-constraints
197 When \f[B]\-EF\f[] options are also specified, this option forces the
198 compiler to explain its internal understanding of subtype constraints.
203 Generate "\f[C]\-\-\ #line\f[]" comments in \f[B]\-E\f[] output.
206 .SH TRANSFER SYNTAXES
208 The ASN.1 family of standards define a number of ways to encode data,
209 including byte\-oriented (e.g., BER), bit\-oriented (e.g., PER), and
211 Some encoding variants (e.g., DER) are just stricter variants of the
212 more general encodings (e.g., BER).
214 The interoperability table below specifies which API functions can be
215 used to exchange data in a compatible manner.
216 If you need to \f[I]produce\f[] data conforming to the standard
217 specified in the column 1, use the API function in the column 2.
218 If you need to \f[I]process\f[] data conforming to the standard(s)
219 specified in the column 3, use the API function specified in column 4.
220 See the \f[C]asn1c\-usage.pdf\f[] for details.
224 lw(14.6n) lw(18.5n) lw(13.6n) lw(13.6n).
256 \f[I]not supported\f[]
301 \f[I]not supported\f[]
305 \f[I]not supported\f[]
319 xer_encode (XER_F_CANONICAL)
327 *) Asterisk means both BASIC and CANONICAL variants.
330 \f[C]unber\f[](1), \f[C]enber\f[](1).
332 Lev Walkin <vlm@lionet.info>.