vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1 | .TH ASN1C 1 "\*(Dt" "ASN.1 Compiler" "ASN.1 Compiler" |
| 2 | .SH NAME |
| 3 | asn1c \- ASN.1 Compiler |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 4 | .SH SYNOPSIS |
vlm | 784a6b7 | 2004-09-23 22:06:02 +0000 | [diff] [blame] | 5 | asn1c [\fB\-E\fR [\fB-F\fR] | \fB\-P\fR | \fB\-R\fR] |
vlm | 60e7ef0 | 2004-10-13 09:13:56 +0000 | [diff] [blame] | 6 | [\fB\-S\fR\fIdir\fR] [\fB-X\fR] |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 7 | [\fB\-W\fR\fIdebug-\fR...] [\fB\-f\fR\fIoption\fR] [\fB\-gen-\fR\fIoption\fR] [\fB\-print-\fR\fIoption\fR] |
vlm | 3786fac | 2004-08-20 13:24:01 +0000 | [diff] [blame] | 8 | \fIinfile\fR... |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 9 | .SH DESCRIPTION |
vlm | 3786fac | 2004-08-20 13:24:01 +0000 | [diff] [blame] | 10 | asn1c compiles the ASN.1 specifications into the set of |
vlm | 60e7ef0 | 2004-10-13 09:13:56 +0000 | [diff] [blame] | 11 | target language (C/C++) encoders and decoders for BER, DER, XER, |
vlm | 3786fac | 2004-08-20 13:24:01 +0000 | [diff] [blame] | 12 | and other encoding standards. |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 13 | .SH OPTIONS |
| 14 | .TP |
vlm | 3786fac | 2004-08-20 13:24:01 +0000 | [diff] [blame] | 15 | \fIOverall Options\fR |
| 16 | \fB\-E \-F \-P \-R\fR |
| 17 | .BI "\-S " directory |
vlm | 60e7ef0 | 2004-10-13 09:13:56 +0000 | [diff] [blame] | 18 | \fB\-X |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 19 | .TP |
vlm | 3786fac | 2004-08-20 13:24:01 +0000 | [diff] [blame] | 20 | \fIWarning Options\fR |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 21 | .br |
vlm | 3786fac | 2004-08-20 13:24:01 +0000 | [diff] [blame] | 22 | \fB\-Werror \-Wdebug-lexer \-Wdebug-fixer \-Wdebug-compiler\fR |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 23 | .TP |
vlm | 3786fac | 2004-08-20 13:24:01 +0000 | [diff] [blame] | 24 | \fILanguage Options\fR |
vlm | 221a0b0 | 2004-08-19 13:24:58 +0000 | [diff] [blame] | 25 | .br |
vlm | 4cc4572 | 2005-07-24 08:28:39 +0000 | [diff] [blame] | 26 | \fB\-fall-defs-global \-fbless-SIZE \-fcompound-names \-findirect-choice |
vlm | 57f5c12 | 2005-06-05 09:42:42 +0000 | [diff] [blame] | 27 | .BI "\-fknown-extern-type="<name> |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 28 | \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 |
vlm | 221a0b0 | 2004-08-19 13:24:58 +0000 | [diff] [blame] | 33 | .TP |
vlm | 3786fac | 2004-08-20 13:24:01 +0000 | [diff] [blame] | 34 | \fIOutput Options\fR |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 35 | .br |
vlm | 3786fac | 2004-08-20 13:24:01 +0000 | [diff] [blame] | 36 | .B \-print-constraints \-print-lines |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 37 | .SH OVERALL OPTIONS |
| 38 | .TP |
| 39 | .B \-E |
vlm | 3786fac | 2004-08-20 13:24:01 +0000 | [diff] [blame] | 40 | Stop after the parsing stage and print the reconstructed ASN.1 |
| 41 | specification code to the standard output. |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 42 | .TP |
| 43 | .B \-F |
| 44 | Used together with \c |
| 45 | .B \-E\c |
| 46 | , instructs the compiler to stop after the ASN.1 syntax |
| 47 | tree fixing stage and dump the reconstructed ASN.1 specification |
| 48 | to the standard output. |
| 49 | .TP |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 50 | .B \-P |
| 51 | Dump the compiled output to the standard output instead of creating the |
| 52 | target language files on disk. |
| 53 | .TP |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 54 | .B \-R |
| 55 | Restrict the compiler to generate only the ASN.1 tables, |
| 56 | omitting the usual support code. |
vlm | 221a0b0 | 2004-08-19 13:24:58 +0000 | [diff] [blame] | 57 | .TP |
vlm | 3786fac | 2004-08-20 13:24:01 +0000 | [diff] [blame] | 58 | \fB\-S\fR \fIdirectory\fR |
vlm | 221a0b0 | 2004-08-19 13:24:58 +0000 | [diff] [blame] | 59 | Use the specified directory with ASN.1 skeleton files. |
vlm | 60e7ef0 | 2004-10-13 09:13:56 +0000 | [diff] [blame] | 60 | .TP |
| 61 | .B \-X |
| 62 | Generate the XML DTD schema for the specified ASN.1 files. |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 63 | .SH WARNING OPTIONS |
| 64 | .TP |
| 65 | .B \-Werror |
| 66 | Treat warnings as errors; abort if any warning is produced. |
| 67 | .TP |
| 68 | .B \-Wdebug-lexer |
| 69 | Enable lexer debugging during the ASN.1 parsing stage. |
| 70 | .TP |
| 71 | .B \-Wdebug-fixer |
| 72 | Enable ASN.1 syntax tree fixer debugging during the fixing stage. |
| 73 | .TP |
| 74 | .B \-Wdebug-compiler |
| 75 | Enable debugging during the actual compile time. |
vlm | 3786fac | 2004-08-20 13:24:01 +0000 | [diff] [blame] | 76 | .SH LANGUAGE OPTIONS |
| 77 | .TP |
vlm | 12c8f69 | 2004-09-06 08:07:29 +0000 | [diff] [blame] | 78 | .B \-fall-defs-global |
| 79 | Normally the compiler hides the definitions (asn1_DEF_xxx) of the inner |
| 80 | structure elements (members of SEQUENCE, SET and other types). This option |
| 81 | makes all such definitions global. |
| 82 | Enabling this option may pollute the namespace by making lots of asn1_DEF_xxx |
| 83 | structures globally visible, but will allow you to manipulate |
| 84 | (encode and decode) the individual members of any complex ASN.1 structure. |
| 85 | .TP |
vlm | 3786fac | 2004-08-20 13:24:01 +0000 | [diff] [blame] | 86 | .B \-fbless-SIZE |
| 87 | Allow SIZE() constraint for INTEGER, ENUMERATED, and other types for which this |
| 88 | constraint is normally prohibited by the standard. This is a violation of |
vlm | 57f5c12 | 2005-06-05 09:42:42 +0000 | [diff] [blame] | 89 | an ASN.1 standard and compiler may fail to produce meaningful code. |
| 90 | .TP |
| 91 | .B \-fcompound-names |
| 92 | Using this switch prevents name collisions in the target source code |
| 93 | by using complex names for target language structures. (Name collisions |
| 94 | may occur if the ASN.1 module reuses the same identifiers in multiple |
| 95 | contexts). |
| 96 | .TP |
vlm | 4cc4572 | 2005-07-24 08:28:39 +0000 | [diff] [blame] | 97 | .B \-findirect-choice |
| 98 | When generating code for a CHOICE type, compile the CHOICE members as indirect |
| 99 | pointers instead of declaring them inline. Consider using this option |
| 100 | together with |
| 101 | .B \-fno-include-deps |
| 102 | to prevent circular references. |
| 103 | .TP |
vlm | 57f5c12 | 2005-06-05 09:42:42 +0000 | [diff] [blame] | 104 | .BI "\-fknown-extern-type="<name> |
| 105 | Pretend the specified type is known. The compiler will assume the target |
vlm | 4cc4572 | 2005-07-24 08:28:39 +0000 | [diff] [blame] | 106 | language source files for the given type have been provided manually. |
vlm | 3786fac | 2004-08-20 13:24:01 +0000 | [diff] [blame] | 107 | .TP |
vlm | 03af0f0 | 2004-09-14 12:48:17 +0000 | [diff] [blame] | 108 | .B \-fnative-types |
| 109 | Use the native machine's data types (int, double) whenever possible, |
vlm | 20971f9 | 2004-10-02 00:10:25 +0000 | [diff] [blame] | 110 | instead of the compound INTEGER_t, ENUMERATED_t and REAL_t types. |
vlm | 3786fac | 2004-08-20 13:24:01 +0000 | [diff] [blame] | 111 | .TP |
vlm | bfc49bd | 2004-09-26 13:13:13 +0000 | [diff] [blame] | 112 | .B \-fno-constraints |
| 113 | Do not generate ASN.1 subtype constraint checking code. This may make a shorter executable. |
| 114 | .TP |
vlm | 57f5c12 | 2005-06-05 09:42:42 +0000 | [diff] [blame] | 115 | .B \-fno-include-deps |
| 116 | Do not generate courtesy #include lines for non-critical type dependencies. |
| 117 | Helps prevent namespace collisions. |
| 118 | .TP |
vlm | 3786fac | 2004-08-20 13:24:01 +0000 | [diff] [blame] | 119 | .B \-funnamed-unions |
| 120 | Enable unnamed unions in the definitions of target language's structures. |
| 121 | .TP |
vlm | 11bea88 | 2005-10-06 10:09:34 +0000 | [diff] [blame] | 122 | .B \-fskeletons-copy |
| 123 | Copy support files (skeletons) rather than symlink them. |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 124 | .SH CODECS GENERATION OPTIONS |
vlm | 11bea88 | 2005-10-06 10:09:34 +0000 | [diff] [blame] | 125 | .TP |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 126 | .B \-gen-PER |
| 127 | Generate Packed Encoding Rules (PER) support code. |
vlm | 3786fac | 2004-08-20 13:24:01 +0000 | [diff] [blame] | 128 | .SH OUTPUT OPTIONS |
| 129 | .TP |
| 130 | .B \-print-constraints |
| 131 | When -EF are also specified, this option forces the compiler to explain |
| 132 | its internal understanding of subtype constraints. |
| 133 | .TP |
| 134 | .B \-print-lines |
| 135 | Generate "-- #line" comments in \fB-E\fR output. |
vlm | 784a6b7 | 2004-09-23 22:06:02 +0000 | [diff] [blame] | 136 | .SH SEE ALSO |
| 137 | .TP |
vlm | eda244a | 2004-09-24 21:00:15 +0000 | [diff] [blame] | 138 | \&\fIunber\fR\|(1), \&\fIenber\fR\|(1) |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 139 | .SH AUTHORS |
| 140 | Lev Walkin <vlm@lionet.info> |