blob: 54c23373809a982886fa4ee2e3270770c872e500 [file] [log] [blame]
Lev Walkinc6080fd2016-01-23 06:35:34 -08001.\" Automatically generated by Pandoc 1.16.0.2
2.\"
3.ad l
4.TH "asn1c" "1" "2016\-01\-23" "ASN.1 Compiler" "Version 0.9.28"
5.nh \" Turn off hyphenation by default.
6.SH NAME
7.PP
8asn1c \-\- the ASN.1 Compiler
9.SH SYNOPSIS
10.PP
11asn1c [\f[B]\-E\f[] [\f[B]\-F\f[]] | \f[B]\-P\f[] | \f[B]\-R\f[]]
12.PD 0
13.P
14.PD
15[\f[B]\-S\f[]\f[I]dir\f[]] [\f[B]\-X\f[]]
16.PD 0
17.P
18.PD
19[\f[B]\-W\f[]\f[I]debug\-\f[]...] [\f[B]\-f\f[]\f[I]option\f[]]
20[\f[B]\-gen\-\f[]\f[I]option\f[]]
21[\f[B]\-pdu\f[]={\f[B]all\f[]|\f[B]auto\f[]|\f[I]Type\f[]}]
22.PD 0
23.P
24.PD
25[\f[B]\-print\-\f[]\f[I]option\f[]]
26.PD 0
27.P
28.PD
29\f[I]input\-filenames\f[]...
30.SH DESCRIPTION
31.PP
32asn1c compiles ASN.1 specifications into a set of target language
33(C/C++) encoders and decoders for BER, DER, PER, XER and other encoding
34rules.
35.SH OPTIONS
36.SS Stage Selection Options
37.TP
38.B \-E
39Run the parsing stage only.
40Print the reconstructed ASN.1 text.
41.RS
42.RE
43.TP
44.B \-F
45Used together with \f[B]\-E\f[], instructs the compiler to stop after
46the ASN.1 syntax tree fixing stage and dump the reconstructed ASN.1
47specification to the standard output.
48.RS
49.RE
50.TP
51.B \-P
52Dump the compiled output to the standard output instead of creating the
53target language files on disk.
54.RS
55.RE
56.TP
57.B \-R
58Restrict the compiler to generate only the ASN.1 tables, omitting the
59usual support code.
60.RS
61.RE
62.TP
63.B \-S \f[I]directory\f[]
64Use the specified directory with ASN.1 skeleton files.
65.RS
66.RE
67.TP
68.B \-X
69Generate an XML DTD schema for the specified ASN.1 files.
70.RS
71.RE
72.SS Warning Options
73.TP
74.B \-Werror
75Treat warnings as errors; abort if any warning is produced.
76.RS
77.RE
78.TP
79.B \-Wdebug\-lexer
80Enable lexer debugging during the ASN.1 parsing stage.
81.RS
82.RE
83.TP
84.B \-Wdebug\-fixer
85Enable ASN.1 syntax tree fixer debugging during the fixing stage.
86.RS
87.RE
88.TP
89.B \-Wdebug\-compiler
90Enable debugging during the actual compile time.
91.RS
92.RE
93.SS Language Options
94.TP
95.B \-fbless\-SIZE
96Allow \f[C]SIZE()\f[] constraint for \f[C]INTEGER\f[],
97\f[C]ENUMERATED\f[], and other types for which this constraint is
98normally prohibited by the standard.
99This is a violation of ASN.1 standard, and the compiler may fail to
100produce a meaningful code.
101.RS
102.RE
103.TP
104.B \-fcompound\-names
105Using this option prevents name collisions in the target source code by
106using complex names for target language structures.
107(Name collisions may occur if the ASN.1 module reuses the same
108identifiers in multiple contexts).
109.RS
110.RE
111.TP
112.B \-findirect\-choice
113When generating code for a \f[C]CHOICE\f[] type, compile the
114\f[C]CHOICE\f[] members as indirect pointers instead of declaring them
115inline.
116Consider using this option together with \f[B]\-fno\-include\-deps\f[]
117to prevent circular references.
118.RS
119.RE
120.TP
121.B \-fincludes\-quoted
122Refer to header files in \f[C]#include\f[]s using
123\f[B]"\f[]double\f[B]"\f[] instead of \f[B]<\f[]angle\f[B]>\f[] quotes.
124.RS
125.RE
126.TP
127.B \-fknown\-extern\-type=\f[I]name\f[]
128Pretend the specified type is known.
129The compiler will assume the target language source files for the given
130type have been provided manually.
131.RS
132.RE
133.TP
134.B \-fline\-refs
135Include ASN.1 module\[aq]s line numbers in generated code comments.
136.RS
137.RE
138.TP
139.B \-fno\-constraints
140Do not generate ASN.1 subtype constraint checking code.
141This may make a shorter executable.
142.RS
143.RE
144.TP
145.B \-fno\-include\-deps
146Do not generate courtesy #include lines for non\-critical type
147dependencies.
148Helps prevent namespace collisions.
149.RS
150.RE
151.TP
152.B \-funnamed\-unions
153Enable unnamed unions in the definitions of target language\[aq]s
154structures.
155.RS
156.RE
157.TP
158.B \-fwide\-types
159Use the unbounded size data types (\f[C]INTEGER_t\f[],
160\f[C]ENUMERATED_t\f[], \f[C]REAL_t\f[]) by default, instead of using the
161native machine\[aq]s data types (long, double).
162.RS
163.RE
164.SS Codecs Generation Options
165.TP
166.B \-gen\-PER
167Generate the Packed Encoding Rules (PER) support code.
168.RS
169.RE
170.TP
171.B \-pdu={all|auto|\f[I]Type\f[]}
172Create a PDU table for specified types, or discover Protocol Data Units
173automatically.
174In case of \f[B]\-pdu=all\f[], all ASN.1 types defined in all modules
175will form a PDU table.
176In case of \f[B]\-pdu=auto\f[], all types not referenced by any other
177type will form a PDU table.
178If \f[I]Type\f[] is an ASN.1 type identifier, the identifier is added to
179the generated PDU table.
180The last form may be specified multiple times to add any number of PDUs.
181.RS
182.RE
183.SS Output Options
184.TP
185.B \-print\-constraints
186When \f[B]\-EF\f[] options are also specified, this option forces the
187compiler to explain its internal understanding of subtype constraints.
188.RS
189.RE
190.TP
191.B \-print\-lines
192Generate "\f[C]\-\-\ #line\f[]" comments in \f[B]\-E\f[] output.
193.RS
194.RE
195.SH SEE ALSO
196.PP
197\f[C]unber\f[](1), \f[C]enber\f[](1).
198.SH AUTHORS
199Lev Walkin <vlm@lionet.info>.