X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=doc%2Fman%2Fasn1c.1;fp=doc%2Fman%2Fasn1c.1;h=93d47c9821b446a2e7d4de320063177aec50bb81;hb=70ee6fc793ec8e828067a3569849b6c216054497;hp=0000000000000000000000000000000000000000;hpb=59f84608ec15c016958a6e0e0ddd813f376c0925;p=com%2Fasn1c.git diff --git a/doc/man/asn1c.1 b/doc/man/asn1c.1 new file mode 100644 index 0000000..93d47c9 --- /dev/null +++ b/doc/man/asn1c.1 @@ -0,0 +1,332 @@ +.\"t +.\" Automatically generated by Pandoc 1.19.2.1 +.\" +.ad l +.TH "asn1c" "1" "2017\-09\-01" "ASN.1 Compiler" "Version 0.9.29" +.nh \" Turn off hyphenation by default. +.SH NAME +.PP +asn1c \-\- the ASN.1 Compiler +.SH SYNOPSIS +.PP +asn1c [\f[B]\-E\f[] [\f[B]\-F\f[]] | \f[B]\-P\f[] | \f[B]\-R\f[]] +.PD 0 +.P +.PD +[\f[B]\-S\f[]\f[I]dir\f[]] [\f[B]\-X\f[]] +.PD 0 +.P +.PD +[\f[B]\-W\f[]\f[I]debug\-\f[]...] [\f[B]\-f\f[]\f[I]option\f[]] +[\f[B]\-gen\-\f[]\f[I]option\f[]] +[\f[B]\-pdu\f[]={\f[B]all\f[]|\f[B]auto\f[]|\f[I]Type\f[]}] +.PD 0 +.P +.PD +[\f[B]\-print\-\f[]\f[I]option\f[]] +.PD 0 +.P +.PD +\f[I]input\-filenames\f[]... +.SH DESCRIPTION +.PP +asn1c compiles ASN.1 specifications into a set of target language +(C/C++) encoders and decoders for BER, DER, PER, XER, OER and other +encoding rules. +.SH OPTIONS +.SS Stage Selection Options +.TP +.B \-E +Run the parsing stage only. +Print the reconstructed ASN.1 text. +.RS +.RE +.TP +.B \-F +Used together with \f[B]\-E\f[], instructs the compiler to stop after +the ASN.1 syntax tree fixing stage and dump the reconstructed ASN.1 +specification to the standard output. +.RS +.RE +.TP +.B \-P +Dump the compiled output to the standard output instead of creating the +target language files on disk. +.RS +.RE +.TP +.B \-R +Restrict the compiler to generate only the ASN.1 tables, omitting the +usual support code. +.RS +.RE +.TP +.B \-S \f[I]directory\f[] +Use the specified directory with ASN.1 skeleton files. +.RS +.RE +.TP +.B \-X +Generate an XML DTD schema for the specified ASN.1 files. +.RS +.RE +.SS Warning Options +.TP +.B \-Werror +Treat warnings as errors; abort if any warning is produced. +.RS +.RE +.TP +.B \-Wdebug\-lexer +Enable lexer debugging during the ASN.1 lexing stage. +.RS +.RE +.TP +.B \-Wdebug\-parser +Enable lexer debugging during the ASN.1 parsing stage. +.RS +.RE +.TP +.B \-Wdebug\-fixer +Enable ASN.1 syntax tree fixer debugging during the fixing stage. +.RS +.RE +.TP +.B \-Wdebug\-compiler +Enable debugging during the actual compile time. +.RS +.RE +.SS Language Options +.TP +.B \-fbless\-SIZE +Allow \f[C]SIZE()\f[] constraint for \f[C]INTEGER\f[], +\f[C]ENUMERATED\f[], 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. +.RS +.RE +.TP +.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). +.RS +.RE +.TP +.B \-findirect\-choice +When generating code for a \f[C]CHOICE\f[] type, compile the +\f[C]CHOICE\f[] members as indirect pointers instead of declaring them +inline. +Consider using this option together with \f[B]\-fno\-include\-deps\f[] +to prevent circular references. +.RS +.RE +.TP +.B \-fincludes\-quoted +Refer to header files in \f[C]#include\f[]s using +\f[B]"\f[]double\f[B]"\f[] instead of \f[B]<\f[]angle\f[B]>\f[] quotes. +.RS +.RE +.TP +.B \-fknown\-extern\-type=\f[I]name\f[] +Pretend the specified type is known. +The compiler will assume the target language source files for the given +type have been provided manually. +.RS +.RE +.TP +.B \-fline\-refs +Include ASN.1 module\[aq]s line numbers in generated code comments. +.RS +.RE +.TP +.B \-fno\-constraints +Do not generate ASN.1 subtype constraint checking code. +This may make a shorter executable. +.RS +.RE +.TP +.B \-fno\-include\-deps +Do not generate courtesy #include lines for non\-critical type +dependencies. +Helps prevent namespace collisions. +.RS +.RE +.TP +.B \-funnamed\-unions +Enable unnamed unions in the definitions of target language\[aq]s +structures. +.RS +.RE +.TP +.B \-fwide\-types +Use the unbounded size data types (\f[C]INTEGER_t\f[], +\f[C]ENUMERATED_t\f[], \f[C]REAL_t\f[]) by default, instead of using the +native machine\[aq]s data types (long, double). +.RS +.RE +.SS Codecs Generation Options +.TP +.B \-gen\-OER +Generate the Octet Encoding Rules (OER) support code. +.RS +.RE +.TP +.B \-gen\-PER +Generate the Packed Encoding Rules (PER) support code. +.RS +.RE +.TP +.B \-pdu={all|auto|\f[I]Type\f[]} +Create a PDU table for specified types, or discover Protocol Data Units +automatically. +In case of \f[B]\-pdu=all\f[], all ASN.1 types defined in all modules +will form a PDU table. +In case of \f[B]\-pdu=auto\f[], all types not referenced by any other +type will form a PDU table. +If \f[I]Type\f[] is an ASN.1 type identifier, the identifier is added to +the generated PDU table. +The last form may be specified multiple times to add any number of PDUs. +.RS +.RE +.SS Output Options +.TP +.B \-print\-constraints +When \f[B]\-EF\f[] options are also specified, this option forces the +compiler to explain its internal understanding of subtype constraints. +.RS +.RE +.TP +.B \-print\-lines +Generate "\f[C]\-\-\ #line\f[]" comments in \f[B]\-E\f[] output. +.RS +.RE +.SH TRANSFER SYNTAXES +.PP +The ASN.1 family of standards define a number of ways to encode data, +including byte\-oriented (e.g., BER), bit\-oriented (e.g., PER), and +textual (e.g., XER). +Some encoding variants (e.g., DER) are just stricter variants of the +more general encodings (e.g., BER). +.PP +The interoperability table below specifies which API functions can be +used to exchange data in a compatible manner. +If you need to \f[I]produce\f[] data conforming to the standard +specified in the column 1, use the API function in the column 2. +If you need to \f[I]process\f[] data conforming to the standard(s) +specified in the column 3, use the API function specified in column 4. +See the \f[C]asn1c\-usage.pdf\f[] for details. +.PP +.TS +tab(@); +lw(14.6n) lw(18.5n) lw(13.6n) lw(13.6n). +T{ +Encoding +T}@T{ +API function +T}@T{ +Understood by +T}@T{ +API function +T} +_ +T{ +BER +T}@T{ +der_encode() +T}@T{ +BER +T}@T{ +ber_decode() +T} +T{ +DER +T}@T{ +der_encode() +T}@T{ +DER, BER +T}@T{ +ber_decode() +T} +T{ +CER +T}@T{ +\f[I]not supported\f[] +T}@T{ +CER, BER +T}@T{ +ber_decode() +T} +T{ +BASIC\-OER +T}@T{ +oer_encode() +T}@T{ +*\-OER +T}@T{ +oer_decode() +T} +T{ +CANONICAL\-OER +T}@T{ +oer_encode() +T}@T{ +*\-OER +T}@T{ +oer_decode() +T} +T{ +BASIC\-UPER +T}@T{ +uper_encode() +T}@T{ +*\-UPER +T}@T{ +uper_decode() +T} +T{ +CANONICAL\-UPER +T}@T{ +uper_encode() +T}@T{ +*\-UPER +T}@T{ +uper_decode() +T} +T{ +*\-APER +T}@T{ +\f[I]not supported\f[] +T}@T{ +*\-APER +T}@T{ +\f[I]not supported\f[] +T} +T{ +BASIC\-XER +T}@T{ +xer_encode(...) +T}@T{ +*\-XER +T}@T{ +xer_decode() +T} +T{ +CANONICAL\-XER +T}@T{ +xer_encode (XER_F_CANONICAL) +T}@T{ +*\-XER +T}@T{ +xer_decode() +T} +.TE +.PP +*) Asterisk means both BASIC and CANONICAL variants. +.SH SEE ALSO +.PP +\f[C]unber\f[](1), \f[C]enber\f[](1). +.SH AUTHORS +Lev Walkin .