Invoking asn2csv
will show a usage message that
contains the command-line options. The usage statement should look like
this:
ASN2CSV, Version 2.1.x ASN.1 to CSV translation tool Copyright (c) 2004-2010 Objective Systems, Inc. All Rights Reserved. Usage: asn2csv <filename> options <filename> ASN.1 message file name options: -schema <filename> ASN.1 definition file name(s) -pdu <typename> Message PDU type name -o <filename> Output XML filename -nobcd Disable BCD conversion -noopentype Disable automatic open type decoding -paddingbyte <hexbyte> Additional padding byte -rootElement <element> Root Element Name -bitsfmt <hex|bin> BIT STRING content output format -inputFileType <binary|hextext|base64> Format of data in input file -s <separator> Field separator -minLevel <num> Set the minimum output depth -maxLevel <num> Set the maximum output depth -q Turn off all output except errors
The following table summarizes the command-line options. Required elements are listed first.
Option | Arguments | Description |
---|---|---|
<filename> | <filename> is the name of the input
BER-encoded message data to be decoded. This element is
required.
|
|
-schema | <filename> | This option is required. Us must specify a schema to apply to the input message. ASN2CSV converts the input schema items into a set of named columns and cannot name the columns without an input specification. |
-bitsfmt | <hex | bin> | -bitsfmt may be used to specify how
BIT STRING items are formatted. By default
they are expressed as hexadecimal strings; use
bin to express them as binary strings
instead.
|
-inputFileType | <binary | hextext | base64> | -inputFileType may be used to tell ASN2CSV
how the input data are formatted. By default ASN2CSV will
assume that the input data are binary, but it can also
decode hexadecimal or base64 encoded data. Whitespace in
the input is ignored when hextext is
specified.
|
-maxLevel | <level> | By default, all entries will be dumped to the output
file. Deeply-nested types may result in excessive output,
however. The -maxLevel switch causes ASN2CSV
to stop outputting data after <level> levels have
been processed.
|
-minLevel | <level> | Similar to the -maxLevel option, the
-minLevel option will cause ASN2CSV to skip
outputting top-level data types <level>
levels deep.
|
-nobcd | This option disables the conversion of BCD data types
in the output. It is used for the common
TBCD-String data type. TBCD digits are
encoded in swapped byte order and use a 0xf
digit to terminate the string. When this option is
selected, the input data are treated as OCTET
STRING s.
|
|
-noopentype | This option disables the conversion of open types in the CSV output. Typically | |
-paddingbyte | <hexbyte> | <hexbyte> is the hexadecimal value
of a padding byte that may appear in the input message.
Call data records (CDRs) are commonly continuously dumped
to files by telephony equipment. If no information is
available, the records are padding, normally by 0x00 or
0xFF bytes. The default padding byte is 0x00 .
<hexbyte> may be formatted with or
without a 0x prefix.
|
-pdu | <typename> | <typename> is the name of the PDU
data type to be decoded. This option is necessary when the
top-level data type is ambiguous.
|
-q | This option causes ASN2CSV to operate in a "quiet" mode more suitable for batch processes. Informational messages are limited and only error output will be reported. | |
-s | <separator> | By default, ASN2CSV assumes the record separator will
be a comma. When this conflicts with output data (for
example, a field may consist of City, State ),
users may use the -s switch to specify a
different separator such as a tab or pipe. Enclosing the
separator in quotation marks is necessary when using a tab
or other whitespace character.
|