asn1c: asn1c (c = compiler) – tool generates C code for parsing ASN1 (BER, DER, …) read more: asn1c-usage.pdf, asn1c-quick.pdf asn1c installation: Install on own computer (Unix) sudo apt-get update -y sudo apt-get install -y asn1c Or install from: https://github.com/vlm/asn1c Install on aisa (from Windows) Connect to aisa.fi.muni.cz using Putty or ssh, with xlogin and faculty password Create home/local(if does not exist), home/Lab4 (use mkdir) Copy copy_to_aisa.zip to your home/local (use WinSCP to copy, or scp) Change directory cd Lab4 Unzip with: unzip copy_to_aisa.zip Change access permissions: chmod 777 asn1-install.sh Install compiler with: ./asn1-install.sh Test whether installed properly: asn1c -help asn1c – basic usage: 0. Define ASN1 grammar - created example sod.asn1 1. Prepare the C and H files (using asn1 compiler) for the ASN.1 structures: asn1c –fnative-types sod.asn1 Compiled AlgorithmIdentifier.c Compiled AlgorithmIdentifier.h Compiled LDSSecurityObjectVersion.c Compiled LDSSecurityObjectVersion.h Compiled DigestAlgorithmIdentifier.c Compiled DigestAlgorithmIdentifier.h Compiled LDSSecurityObject.c Compiled LDSSecurityObject.h Compiled DataGroupHash.c Compiled DataGroupHash.h Compiled DataGroupNumber.c Compiled DataGroupNumber.h Symlinked /usr/local/share/asn1c/ANY.h -> ANY.h Symlinked /usr/local/share/asn1c/ANY.c -> ANY.c Symlinked /usr/local/share/asn1c/INTEGER.h -> INTEGER.h Symlinked /usr/local/share/asn1c/NativeEnumerated.h -> NativeEnumerated.h Symlinked /usr/local/share/asn1c/INTEGER.c -> INTEGER.c 2. Use structures in program - sod_sample.c 3. Compile a sample application: Remove converter_example.c: rm converter_example.c Compile: gcc *.c -o LDSview -I. -DPDU=LDSSecurityObject And execute: ./LDSview LDSview will parse lds.bin according structure defined in sod.asn1