aboutsummaryrefslogtreecommitdiffstats
path: root/asn1c/asn1c.1
blob: 5485cc98cbba4e74ef6ddba4724f837b43473be6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
.TH asn1c 1 "2014-10-23" "ASN.1 Compiler"
.if n .ad l \" Turn off justifications
.nh \" Turn off hyphenation; can damage formatting in technical documents.
.SH NAME
asn1c \(em the ASN.1 Compiler
.SH SYNOPSIS
asn1c [\fB\-E\fR [\fB-F\fR] | \fB\-P\fR | \fB\-R\fR]
      [\fB\-S\fR\fIdir\fR] [\fB-X\fR]
      [\fB\-W\fR\fIdebug-\fR...] [\fB\-f\fR\fIoption\fR] [\fB\-gen-\fR\fIoption\fR] [\fB\-pdu=\fR{\fBall\fR|\fBauto\fR|\fIType\fR}\fR]
      [\fB\-print-\fR\fIoption\fR]
      \fIinput-filenames\fR...
.SH DESCRIPTION
asn1c compiles ASN.1 specifications into a set of
target language (C/C++) encoders and decoders for BER, DER, PER, XER
and other encoding rules.
.SH OPTIONS
.SS Stage Selection Options
.TP 4
.B \-E
Run the parsing stage only.
Print the reconstructed ASN.1 text.
.TP 4
.B \-F
Used together with
.B \-E\c
, instructs the compiler to stop after the ASN.1 syntax
tree fixing stage and dump the reconstructed ASN.1 specification
to the standard output.
.TP 4
.B \-P
Dump the compiled output to the standard output instead of creating the
target language files on disk.
.TP 4
.B \-R
Restrict the compiler to generate only the ASN.1 tables,
omitting the usual support code.
.TP 4
\fB\-S\fR \fIdirectory\fR
Use the specified directory with ASN.1 skeleton files.
.TP 4
.B \-X
Generate an XML DTD schema for the specified ASN.1 files.
.SS Warning Options
.TP 4
.B \-Werror
Treat warnings as errors; abort if any warning is produced.
.TP 4
.B \-Wdebug-lexer
Enable lexer debugging during the ASN.1 parsing stage.
.TP 4
.B \-Wdebug-fixer
Enable ASN.1 syntax tree fixer debugging during the fixing stage.
.TP 4
.B \-Wdebug-compiler
Enable debugging during the actual compile time.
.SS Language Options
.TP 4
.B \-fbless-SIZE
Allow SIZE() constraint for INTEGER, ENUMERATED, and other types for which this
constraint is normally prohibited by the standard.
This is a violation of ASN.1 standard, and the compiler may
fail to\ produce a meaningful code.
.TP 4
.B \-fcompound-names
Using this option prevents name collisions in the target source code
by using complex names for target language structures.
(Name\ collisions may occur if the ASN.1 module reuses the same identifiers
in multiple contexts).
.TP 4
.B \-findirect-choice
When generating code for a CHOICE type, compile the CHOICE members as indirect
pointers instead of declaring them inline.
Consider using this option together with
.B \-fno-include-deps
to prevent circular references.
.TP 4
.B \-fincludes-quoted
Generate #include lines in "double" instead of <angle> quotes.
.TP 4
.BI "\-fknown-extern-type="<name>
Pretend the specified type is known.
The compiler will assume the target language source files
for the given type have been provided manually.
.TP 4
.B \-fline-refs
Include ASN.1 module's line numbers in generated code comments.
.TP 4
.B \-fno-constraints
Do not generate ASN.1 subtype constraint checking code.
This may make a shorter executable.
.TP 4
.B \-fno-include-deps
Do not generate courtesy #include lines for non-critical type dependencies.
Helps prevent namespace collisions.
.TP 4
.B \-funnamed-unions
Enable unnamed unions in the definitions of target language's structures.
.TP 4
.B \-fwide-types
Use the unbounded size data types (INTEGER_t, ENUMERATED_t, REAL_t) by default,
instead of the native machine's data types (long, double).
.SS Codecs Generation Options
.TP 4
.B \-gen-PER
Generate the Packed Encoding Rules (PER) support code.
.TP 4
.B \-pdu=\fR{\fBall\fR|\fBauto\fR|\fIType\fR}
Create a PDU table for specified types, or discover Protocol Data Units automatically.
In case of -pdu=\fBall\fR, all ASN.1 types defined in all modules will form a PDU table.
In case of -pdu=\fBauto\fR, all types not referenced by any other type will form a PDU table.
If\ \fIType\fR is an ASN.1 type identifier, it is added to a PDU table.
The\ last form may be specified multiple times to add any number of PDUs.
.SS Output Options
.TP 4
.B \-print-constraints
When -EF are also specified, this option forces the compiler to explain
its internal understanding of subtype constraints.
.TP 4
.B \-print-lines
Generate "-- #line" comments in \fB-E\fR output.
.SH SEE ALSO
.TP 4
\&\fIunber\fR\|(1), \&\fIenber\fR\|(1)
.SH AUTHORS
Lev Walkin <vlm@lionet.info>