Debian Codegraph @

doc/man/asn1c.1

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