blob: 3c07ec7fd2225ce5a7573627c6ce6f965c584297 [file] [log] [blame]
vlmfa67ddc2004-06-03 03:38:44 +00001.TH ASN1C 1 "\*(Dt" "ASN.1 Compiler" "ASN.1 Compiler"
2.SH NAME
3asn1c \- ASN.1 Compiler
vlmfa67ddc2004-06-03 03:38:44 +00004.SH SYNOPSIS
vlm784a6b72004-09-23 22:06:02 +00005asn1c [\fB\-E\fR [\fB-F\fR] | \fB\-P\fR | \fB\-R\fR]
vlm60e7ef02004-10-13 09:13:56 +00006 [\fB\-S\fR\fIdir\fR] [\fB-X\fR]
vlm337167e2005-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]
vlm3786fac2004-08-20 13:24:01 +00008 \fIinfile\fR...
vlmfa67ddc2004-06-03 03:38:44 +00009.SH DESCRIPTION
vlm3786fac2004-08-20 13:24:01 +000010asn1c compiles the ASN.1 specifications into the set of
vlm60e7ef02004-10-13 09:13:56 +000011target language (C/C++) encoders and decoders for BER, DER, XER,
vlm3786fac2004-08-20 13:24:01 +000012and other encoding standards.
vlmfa67ddc2004-06-03 03:38:44 +000013.SH OPTIONS
14.TP
vlm3786fac2004-08-20 13:24:01 +000015\fIOverall Options\fR
16\fB\-E \-F \-P \-R\fR
17.BI "\-S " directory
vlm60e7ef02004-10-13 09:13:56 +000018\fB\-X
vlmfa67ddc2004-06-03 03:38:44 +000019.TP
vlm3786fac2004-08-20 13:24:01 +000020\fIWarning Options\fR
vlmfa67ddc2004-06-03 03:38:44 +000021.br
vlm3786fac2004-08-20 13:24:01 +000022\fB\-Werror \-Wdebug-lexer \-Wdebug-fixer \-Wdebug-compiler\fR
vlmfa67ddc2004-06-03 03:38:44 +000023.TP
vlm3786fac2004-08-20 13:24:01 +000024\fILanguage Options\fR
vlm221a0b02004-08-19 13:24:58 +000025.br
vlm4cc45722005-07-24 08:28:39 +000026\fB\-fall-defs-global \-fbless-SIZE \-fcompound-names \-findirect-choice
vlm57f5c122005-06-05 09:42:42 +000027.BI "\-fknown-extern-type="<name>
vlm337167e2005-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
vlm221a0b02004-08-19 13:24:58 +000033.TP
vlm3786fac2004-08-20 13:24:01 +000034\fIOutput Options\fR
vlmfa67ddc2004-06-03 03:38:44 +000035.br
vlm3786fac2004-08-20 13:24:01 +000036.B \-print-constraints \-print-lines
vlmfa67ddc2004-06-03 03:38:44 +000037.SH OVERALL OPTIONS
38.TP
39.B \-E
vlm3786fac2004-08-20 13:24:01 +000040Stop after the parsing stage and print the reconstructed ASN.1
41specification code to the standard output.
vlmfa67ddc2004-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
vlmfa67ddc2004-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
vlmfa67ddc2004-06-03 03:38:44 +000054.B \-R
55Restrict the compiler to generate only the ASN.1 tables,
56omitting the usual support code.
vlm221a0b02004-08-19 13:24:58 +000057.TP
vlm3786fac2004-08-20 13:24:01 +000058\fB\-S\fR \fIdirectory\fR
vlm221a0b02004-08-19 13:24:58 +000059Use the specified directory with ASN.1 skeleton files.
vlm60e7ef02004-10-13 09:13:56 +000060.TP
61.B \-X
62Generate the XML DTD schema for the specified ASN.1 files.
vlmfa67ddc2004-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.
vlm3786fac2004-08-20 13:24:01 +000076.SH LANGUAGE OPTIONS
77.TP
vlm12c8f692004-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
vlm3786fac2004-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
vlm57f5c122005-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
vlm4cc45722005-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
vlm57f5c122005-06-05 09:42:42 +0000104.BI "\-fknown-extern-type="<name>
105Pretend the specified type is known. The compiler will assume the target
vlm4cc45722005-07-24 08:28:39 +0000106language source files for the given type have been provided manually.
vlm3786fac2004-08-20 13:24:01 +0000107.TP
vlm03af0f02004-09-14 12:48:17 +0000108.B \-fnative-types
109Use the native machine's data types (int, double) whenever possible,
vlm20971f92004-10-02 00:10:25 +0000110instead of the compound INTEGER_t, ENUMERATED_t and REAL_t types.
vlm3786fac2004-08-20 13:24:01 +0000111.TP
vlmbfc49bd2004-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
vlm57f5c122005-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
vlm3786fac2004-08-20 13:24:01 +0000119.B \-funnamed-unions
120Enable unnamed unions in the definitions of target language's structures.
121.TP
vlm11bea882005-10-06 10:09:34 +0000122.B \-fskeletons-copy
123Copy support files (skeletons) rather than symlink them.
vlm337167e2005-11-26 11:25:14 +0000124.SH CODECS GENERATION OPTIONS
vlm11bea882005-10-06 10:09:34 +0000125.TP
vlm337167e2005-11-26 11:25:14 +0000126.B \-gen-PER
127Generate Packed Encoding Rules (PER) support code.
vlm3786fac2004-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.
vlm784a6b72004-09-23 22:06:02 +0000136.SH SEE ALSO
137.TP
vlmeda244a2004-09-24 21:00:15 +0000138\&\fIunber\fR\|(1), \&\fIenber\fR\|(1)
vlmfa67ddc2004-06-03 03:38:44 +0000139.SH AUTHORS
140Lev Walkin <vlm@lionet.info>