asterix
=======

Asterix is utility used for reading and parsing of EUROCONTROL ASTERIX protocol data from stdin, file or network multicast stream.

ASTERIX stands for All Purpose STructured EUROCONTROL SuRveillance Information EXchange.
It is an ATM Surveillance Data Binary Messaging Format which allows transmission of harmonised information between any surveillance and automation system.
ASTERIX defines the structure of the data to be exchanged over a communication medium, from the encoding of every bit of information up to the organisation of the data within a block of data - without any loss of information during the whole process.
More about ASTERIX protocol you can find here: http://www.eurocontrol.int/services/asterix

Asterix application was developed by Croatia Control Ltd.

This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See COPYING file for details.

BUILDING FOR WINDOWS
====================

You need to install Cygwin (http://www.cygwin.com/)
From asterix/src directory start following command:

make
make install

for debug version:
make MODE=DEBUG
make MODE=DEBUG install

asterix.exe will be created in asterix/install

BUILDING FOR LINUX
==================

From asterix/src directory start following command:

make
make install

for debug version:
make MODE=DEBUG
make MODE=DEBUG install

asterix.exe will be created in asterix/install

BUILDING FOR OS X
=================

You need to install the "Command Line Tools".
On 10.7 (Lion) and 10.8 (Moutain Lion), download Xcode from the Mac App Store.
After installing Xcode, go to "Xcode->Preferences->Downloads" and install the
package "Command Line Tools".

From asterix/src directory start following command:

make
make install

for debug version:
make MODE=DEBUG
make MODE=DEBUG install

asterix.exe will be created in asterix/install

USAGE
=====

asterix [-h] [-v] [-L] [-o] [-s] [-P|-O|-R|-F|-H] [-l|-x|-j|-jh] [-d filename] [-LF filename] -f filename|-i mcastaddress:ipaddress:port[:srcaddress]

Options:
   -h,--help	Show this help message
   -v,--verbose	Show more information during program execution
   -d,--def		XML protocol definitions filenames are listed in specified filename. By default are listed in config/asterix.ini
   -L,--list	List all configured ASTERIX items. Mark which items are filtered.
   -LF,--filter	Printout only items listed in configured file
   -o,--loop   		Loop the input file. Only relevant when file is data source."
   -s,--sync		Output will be printed synchronously with input file (with time delays between packets). This parameter is used only if input is from file."

Input format:
   -P,--pcap		Input is from PCAP file
   -R,--oradispcap	Input is from PCAP file and Asterix packet is encapsulated in ORADIS packet
   -O,--oradis		Asterix packet is encapsulated in ORADIS packet
   -F,--final		Asterix packet is encapsulated in FINAL packet.
   -H,--hdlc		Asterix packet is encapsulated in HDLC packet.

Output format:
   -l,--line		Output will be printed as one line per item. This format is suitable for parsing.
   -x,--xml			Output will be printed in XML format.
   -j,--json		Output will be printed in compact JSON format (one object per line).
   -jh,--jsonh		Output will be printed in human readable JSON format (one item per line).
	

Data source:
   -f filename		File generated from libpcap (tcpdump or Wireshark) or file in FINAL or HDLC format.
   					For example: -f filename.pcap
   -i m:i:p[:s]		Multicast IP address:Interface address:Port[:Source address].
   					For example: 232.1.1.12:10.17.58.37:21112:10.17.22.23
                        More than one multicast group could be defined, use @ as separator.
                                        For example: 232.1.1.13:10.17.58.37:21112:10.17.22.23@232.1.1.14:10.17.58.37:21112:10.17.22.23

WIRESHARK PLUGIN
=================

Wireshark (http://www.wireshark.org/) plugin can be created from Asterix source.
For instructions see asterix\src\asterix\wireshark-plugin\HowToBuild.txt

PYTHON MODULE
=============

Asterix can be built as Python module.

Build with:
    python setup.py build

Install:
    python setup.py install

To run unit tests:
    python -m unittest


CREDITS
=======

Jurica Baricevic	-	Created engine source (as part of converter project)
Zeljko Harjac		-	Modifications of engine source
Damir Salantic		-	Created Asterix source and part of Asterix XML files, Created Python module
Darko Markus		-	Created Asterix XML files, debuging and testing
Benjamin Bertrand	-	Created Asterix XML files, OS X building procedure
Sergey Nastasyak	-	Created Asterix XML files
Nabil Bendafi		-	Etheral plugin
Krzysztof Rutkowski -   Python function for parsing with offset

