Commit cc51471d authored by garciay's avatar garciay
Browse files

Update README.md

parent e3069a85
Loading
Loading
Loading
Loading
+46 −6
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ The following STFs were or are currently involved in the evolutions of the ETSI

## Installation

The ETSI ITS protocol project builds and tests regularly on the following platforms:
The ETSI ITS protocols project builds and tests regularly on the following platforms:

  - Linux (Ubuntu)

@@ -47,7 +47,7 @@ Pre-requisites on your host machine:
    - Set the environment variable PASSWORD to your ETSI OEL account password

Procedure:
- On your host machine, open a command line session (PUTTY, DOS window...)
- On your host machine, open a command line session (PuTTY, DOS window...)
- From the ETSI ITS protocols project, clone the Vagrant folder
- In the file Vagrantfilem, odify the tag config.vm.provision replacing <username> & <password> strings by your ETSI credentials
- In the Vagrant folder, execute the following commands:
@@ -74,7 +74,7 @@ $ vagrant up
$ vagrant ssh
```

- Enjoy your tests
- Switch to the next clause (Usage)


### Using Docbox
@@ -84,7 +84,7 @@ Pre-requisites on your host machine:
- Install Docbox

Procedure:
- On your host machine, open a command line session (PUTTY, DOS window...)
- On your host machine, open a command line session (PuTTY, DOS window...)
- On your host machine, clone the ETSI ITS protocols project. NOTE that only Docbox folder and .jenkins.sh script file are required
- From the ETSI ITS protocols project root directory, execute the following commands:

@@ -136,7 +136,7 @@ Pre-requisites:
Procedure using Eclipse TITAN:

Procedure in TITAN command line:
- Open several SSH session (PUTTY...)
- Open several SSH session (PuTTY...)
- Change to the directory ~/dev/STF525_Its/src/AtsCAM/objs
- Edit the file ../etc/AtsCAM.cfg
- Update the following fields:
@@ -148,10 +148,50 @@ Procedure in TITAN command line:
$ ../bin/run-all.bash
# su - etsi
```

- The log files are located in ../logs folder. Yu can edit them using any editor or using the Eclipse TITAN log plugins
- Your machine is installed followimg one of the installation method describes in the previous clause


## Rebuild Wireshark with support of ETSI ITS Protocols

A specific version of Wireshark, based on official version 2.6.x, is available [here](https://github.com/YannGarcia/wireshark-for-ITS.git).

The following Pre-requisites applies to build it:
- Your machine is installed followimg one of the installation method describes in the previous clause
- Your are logged as 'etsi' user

The following procedure applies to build it:
- Open a SSH session (PuTTY...)
- Change to the directory ~/frameworks
- Execute the following comands to clone the project and switch to the branck

```sh
$ git clone https://github.com/YannGarcia/wireshark-for-ITS.git wireshark-for-ITS
$ git checkout ITS_Protocol_Support
```

- Create a folder ~/frameworks/wireshark-build
- Change to this folder
- Generate makefiles executing the following command

```sh
$ cmake ../wireshark-for-ITS
```

- Add specific compiler options the file epan/dissectors/CMakeFiles/dissectors.dir/flags.make:
    - Find the variable C_FLAGS
    - Append the following options: "-Wno-unused-const-variable -Wno-unsued-function "
- Build Wireshark/tshark executing the following command

```sh
$ make
```

- After the build, binaries are located in ~/frameworks/wireshark-build/run folder
- To distinguish this version of Wireshark from the others, a development tag 'ETSI ITS Protocols' is displayed on the GUI version

## How to Report a Bug

The ETSI ITS protocol project is under constant development, so it is possible that you will
The ETSI ITS protocols project is under constant development, so it is possible that you will
encounter a bug while using it. Please report bugs at cti_support at etsi dot org.
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ Vagrant.configure("2") do |config|

  # Every Vagrant development environment requires a box. You can search for
  # boxes at https://atlas.hashicorp.com/search.
  config.vm.box = "ubuntu/bionic64"
  config.vm.box = "bento/ubuntu-18.04"

  # Disable automatic box update checking. If you disable this, then
  # boxes will only be checked for updates when the user runs
+25 −32
Original line number Diff line number Diff line
@@ -19,23 +19,10 @@ g++ --version
valgrind --version
java -version

# Add vagrant user into sudo 
sudo adduser vagrant sudo

# Create esti user
sudo useradd --create-home --shell /bin/bash etsi
echo "etsi:etsi" | chpasswd 
sudo adduser etsi sudo
sudo su - etsi
if [ "${USER}" != "etsi" ]
then
    exit -1
fi

export USERNAME=$1
export PASSWORD=$2

export HOME=/home/etsi
export HOME=/home/vagrant

export PATH_DEV=${HOME}/dev
export HOME_FRAMEWORKS=${HOME}/frameworks
@@ -81,13 +68,13 @@ then
    exit -1
fi

cd /home/etsi/dev 
svn co --username $USERNAME --password $PASSWORD --non-interactive https://oldforge.etsi.org/svn/ITS/branches/STF525 ./STF525_Its 
cd /home/etsi/dev/STF525_Its/scripts
cd /home/vagrant/dev 
svn co --username $USERNAME --password $PASSWORD --non-interactive https://oldforge.vagrant.org/svn/ITS/branches/STF525 ./STF525_Its 
cd /home/vagrant/dev/STF525_Its/scripts
chmod 775 *.bash devenv.bash.ubuntu
cd /home/etsi
ln -sf /home/etsi/dev/STF525_Its/scripts/devenv.bash.ubuntu /home/etsi/devenv.bash
. /home/etsi/devenv.bash
cd /home/vagrant
ln -sf /home/vagrant/dev/STF525_Its/scripts/devenv.bash.ubuntu /home/vagrant/devenv.bash
. /home/vagrant/devenv.bash

# Install all frameworks
cd ${HOME_FRAMEWORKS}
@@ -131,7 +118,7 @@ java --version
# Install eclipse
cd ${HOME_FRAMEWORKS}

wget 'http://ftp.halifax.rwth-aachen.de/eclipse//technology/epp/downloads/release/oxygen/2/eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz' -Oeclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz
wget 'http://ftp.halifax.rwth-aachen.de/eclipse/technology/epp/downloads/release/oxygen/2/eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz' -Oeclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz
tar -zxvf ./eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz
rm -f ./eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz

@@ -139,20 +126,26 @@ rm -f ./eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz
if [ ${USERNAME} != '' ] && [ ${PASSWORD} != '' ]
then
    cd ${HOME}/tmp
    svn co --username $USERNAME --password $PASSWORD --non-interactive https://oldforge.etsi.org/svn/ITS/branches/STF525
    svn co --username $USERNAME --password $PASSWORD --non-interactive https://oldforge.vagrant.org/svn/ITS/branches/STF525
fi

cd ${HOME}/TriesAndDelete/scripts
. ${HOME}/devenv.bash
echo "" >> /etc/profile 
echo "export HOME=/home/etsi" >> /etc/profile 
echo "export LD_LIBRARY_PATH=/home/etsi/TriesAndDelete/etsi_its/lib:$LD_LIBRARY_PATH" >> /etc/profile 
echo "export PATH=/home/etsi/bin:$PATH" >> /etc/profile 
echo "cd /home/etsi" >> /etc/profile 
echo ". ./devenv.bash" >> /etc/profile 

cd /home/etsi/STF525_Its/scripts
./build_titan.bash 
. ${HOME}/devenv.bash
. /home/etsi/devenv.bash 
./update_its_project.bash
ln -sf ~/TriesAndDelete/etsi_its/lib/libItsAsn.so ~/lib/libItsAsn.so
cd ${HOME}/TriesAndDelete/etsi_its/src/TestCodec/objs
. ${HOME}/devenv.bash
../bin/testcodec_generate_makefile.bash
../bin/run_mtc.bash &
../bin/run_ptcs.bash
#ln -sf ~/TriesAndDelete/etsi_its/lib/libItsAsn.so ~/lib/libItsAsn.so
#cd ${HOME}/TriesAndDelete/etsi_its/src/TestCodec/objs
#. ${HOME}/devenv.bash
#../bin/testcodec_generate_makefile.bash
#../bin/run_mtc.bash &
#../bin/run_ptcs.bash

cd ${OLD_PWD}

+0 −1
Original line number Diff line number Diff line
@@ -79,7 +79,6 @@ RUN echo "docker-titan" > /etc/hostname \
    && wget 'http://ftp.halifax.rwth-aachen.de/eclipse//technology/epp/downloads/release/oxygen/2/eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz' -Oeclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz \
    && tar -zxvf ./eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz \
    && rm -f ./eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz \
    && cd /home/etsi/tmp \
    && echo "" >> /etc/profile \
    && echo "export HOME=/home/etsi" >> /etc/profile \
    && echo "export LD_LIBRARY_PATH=/home/etsi/TriesAndDelete/etsi_its/lib:$LD_LIBRARY_PATH" >> /etc/profile \
+204 −0
Original line number Diff line number Diff line
#!/bin/bash

# Debug mode
#set -e
set -vx

# Usage: sudo ./update_emcom_project.bash
# TODO Use git clone in temporary directory

OLDPWD=`pwd`

# Execution path
RUN_PATH="${0%/*}"

UNAME=`uname -n`
if [ "${UNAME}" == "Ubuntu64" ]
then # Win7 Virtualbox Ubuntu 16.04
    CHOWN_USER_GROUP=yann:yann
    SRC_EMCOM_PATH=/media/sf_F_DRIVE/FSCOM/ETSI/EMCOM/STF549/workspace_titan/STF549_ng112
elif [ "${UNAME}" == "ubuntu-xenial" ]
then # Vqgrant xenial-ubuntu
    CHOWN_USER_GROUP=ubuntu:ubuntu
    SRC_EMCOM_PATH=/media/sf_F_DRIVE/FSCOM/ETSI/EMCOM/STF549/workspace_titan/STF549_ng112
elif [ "${UNAME}" == "vagrant" ]
then # Vagrant xenial-ubuntu
    CHOWN_USER_GROUP=vagrant:vagrant
    SRC_EMCOM_PATH=/media/sf_F_DRIVE/FSCOM/ETSI/EMCOM/STF549/workspace_titan/STF549_ng112
elif [ "${UNAME}" == "vagrant-prov" ]
then # Vagrant ubuntu 16.04 with provisioner script to automate ITS project build & test
    CHOWN_USER_GROUP=vagrant:vagrant
#    CHOWN_USER_GROUP=ubuntu:ubuntu
    SRC_EMCOM_PATH=${HOME}/tmp/STF549_ng112
elif [ "${UNAME}" == "yann-FSCOM" ]
then # Win7 cygwin64
    CHOWN_USER_GROUP=yann:None
    SRC_EMCOM_PATH=/cygdrive/f/FSCOM/ETSI/EMCOM/STF549/workspace_titan/STF549_ng112
else # docket-titan
    CHOWN_USER_GROUP=root:root
    SRC_EMCOM_PATH=${HOME}/tmp/STF549_ng112
fi
if [ "${PATH_DEV_EMCOM}" == "" ]
then
    PATH_DEV_EMCOM=`pwd`/../etsi_emcom
fi

if [ -d ${PATH_DEV_EMCOM} ]
then
    if [ -f ${HOME}/tmp/emcom.tar.bz2 ]
    then
	      mv ${HOME}/tmp/emcom.tar.bz2 ${HOME}/tmp/emcom.tar.`date +'%Y%m%d'`.bz2
    fi
    tar jcvf ${HOME}/tmp/emcom.tar.bz2 ${PATH_DEV_EMCOM}
    rm -fr ${PATH_DEV_EMCOM}
fi

# Check if target directory exist
if [ ! -d ${PATH_DEV_EMCOM} ]
then
    mkdir -p ${PATH_DEV_EMCOM}/xsd ${PATH_DEV_EMCOM}/framework ${PATH_DEV_EMCOM}/include ${PATH_DEV_EMCOM}/bin ${PATH_DEV_EMCOM}/lib ${PATH_DEV_EMCOM}/objs ${PATH_DEV_EMCOM}/src ${PATH_DEV_EMCOM}/docs
fi

# Update XSD files
echo 'Updating XSD files'
XSD_SRC_PATH=${SRC_EMCOM_PATH}/xsd
XSD_DST_PATH=${PATH_DEV_EMCOM}/xsd
cp ${XSD_SRC_PATH}/*.xsd ${XSD_DST_PATH}
cp ${XSD_SRC_PATH}/*.dtd ${XSD_DST_PATH}

# Update ETSI Framework files
echo 'Updating ETSI Framework files'
FWK_SRC_PATH=${SRC_EMCOM_PATH}/ccsrc
FWK_DST_PATH=${PATH_DEV_EMCOM}/framework
mkdir -p ${FWK_DST_PATH}/src ${FWK_DST_PATH}/include
chmod -R 775 ${FWK_DST_PATH}
# Create link to TITAN Abstract_Socket
ln -sf $TOP/../titan.TestPorts.Common_Components.Abstract_Socket/src/Abstract_Socket.cc ${FWK_DST_PATH}/src/Abstract_Socket.cc
ln -sf $TOP/../titan.TestPorts.Common_Components.Abstract_Socket/src/Abstract_Socket.hh ${FWK_DST_PATH}/include/Abstract_Socket.hh
FWK_DIR_LIST_HH=`find ${FWK_SRC_PATH}/Protocols/ -name "*.h*" -type f`
FWK_DIR_LIST_THH=`find ${FWK_SRC_PATH}/Protocols/ -name "*.t.h*" -type f`
FWK_DIR_LIST_CC=`find ${FWK_SRC_PATH}/Protocols/ -name "*.c*" -type f`
FWK_DIR_LIST_L=`find ${FWK_SRC_PATH}/Protocols/ -name "*.l" -type f`
FWK_DIR_LIST_Y=`find ${FWK_SRC_PATH}/Protocols/ -name "*.y" -type f`
for i in ${FWK_DIR_LIST_HH}
do
	  cp $i ${FWK_DST_PATH}/include
done
for i in ${FWK_DIR_LIST_THH}
do
	  cp $i ${FWK_DST_PATH}/include
done
for i in ${FWK_DIR_LIST_CC}
do
	  cp $i ${FWK_DST_PATH}/src
done
if [ "${FWK_DIR_LIST_L}" != "" ]
then
    for i in ${FWK_DIR_LIST_L}
    do
	      cp $i ${FWK_DST_PATH}/src
    done
fi
if [ "${FWK_DIR_LIST_Y}" != "" ]
then
    for i in ${FWK_DIR_LIST_Y}
    do
	      cp $i ${FWK_DST_PATH}/src
    done
fi
FWK_DIR_LIST_HH=`find ${FWK_SRC_PATH}/Framework/ -name "*.h*" -type f`
FWK_DIR_LIST_CC=`find ${FWK_SRC_PATH}/Framework/ -name "*.c*" -type f`
for i in ${FWK_DIR_LIST_HH}
do
    cp $i ${FWK_DST_PATH}/include
done
for i in ${FWK_DIR_LIST_CC}
do
    cp $i ${FWK_DST_PATH}/src
done

# Update ATS TTCN-3 files
echo 'Update TTCN-3 files'
TTCN_3_ORG_PATH=${SRC_EMCOM_PATH}/ttcn
TTCN_3_DST_PATH=${PATH_DEV_EMCOM}/src
CC_SRC_PATH=${SRC_EMCOM_PATH}/ccsrc
TTCN_3_ATS_LIST='AtsNg112'
for i in ${TTCN_3_ATS_LIST}
do
    if [ ! -d ${TTCN_3_DST_PATH}/$i ]
    then
	      mkdir -p ${TTCN_3_DST_PATH}/$i/bin ${TTCN_3_DST_PATH}/$i/lib ${TTCN_3_DST_PATH}/$i/src ${TTCN_3_DST_PATH}/$i/include ${TTCN_3_DST_PATH}/$i/ttcn ${TTCN_3_DST_PATH}/$i/objs ${TTCN_3_DST_PATH}/$i/etc ${TTCN_3_DST_PATH}/$i/docs
	      chmod -R 775 ${TTCN_3_DST_PATH}/$i
    fi
    cp ${TTCN_3_ORG_PATH}/$i/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn
    cp ${TTCN_3_ORG_PATH}/../etc/$i/*.cfg ${TTCN_3_DST_PATH}/$i/etc
    cp ${TTCN_3_ORG_PATH}/../docs/$i/o2.cfg ${TTCN_3_DST_PATH}/$i/docs
done

# Update libraries & CC files
TTCN_3_LIB_LIST='LibEmcom/LibNg112 LibHttp LibSip LibCommon'
for i in ${TTCN_3_LIB_LIST}
do
    if [ ! -d ${TTCN_3_DST_PATH}/$i ]
    then
	      mkdir -p ${TTCN_3_DST_PATH}/$i/docs ${TTCN_3_DST_PATH}/$i/src ${TTCN_3_DST_PATH}/$i/include ${TTCN_3_DST_PATH}/$i/ttcn ${TTCN_3_DST_PATH}/$i/xsd
    fi
    cp ${TTCN_3_ORG_PATH}/$i/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn
    # Update CC files
    if [ "$i" == "LibNg112" ]
    then
	      cp ${CC_SRC_PATH}/include/$i/*.hh ${TTCN_3_DST_PATH}/$i/include
	      cp ${CC_SRC_PATH}/src/$i/*.cc ${TTCN_3_DST_PATH}/$i/src
    fi
    if [ "$i" == "LibSip" ]
    then
        cp ${TTCN_3_ORG_PATH}/$i/ttcn/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn
        cp ${TTCN_3_ORG_PATH}/$i/xsd/*.xsd ${TTCN_3_DST_PATH}/$i/xsd
        cp ${TTCN_3_ORG_PATH}/$i/xsd/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn
	      cp ${CC_SRC_PATH}/EncDec/LibSip_Encdec.cc ${TTCN_3_DST_PATH}/$i/src
	      cp ${CC_SRC_PATH}/Ports/$i/*.hh ${TTCN_3_DST_PATH}/$i/include
	      cp ${CC_SRC_PATH}/Ports/$i/*.cc ${TTCN_3_DST_PATH}/$i/src
	      cp ${CC_SRC_PATH}/include/$i/*.hh ${TTCN_3_DST_PATH}/$i/include
	      cp ${CC_SRC_PATH}/src/$i/*.cc ${TTCN_3_DST_PATH}/$i/src
    fi
done

# Generate Bison parsers is any
cd ${FWK_DST_PATH}/src
if [ "${FWK_DIR_LIST_Y}" != "" ]
then
    for i in ${FWK_DIR_LIST_Y}
    do
        BASE_NAME=$(basename "$i" .y)
        bison -dv -p${BASE_NAME}_ -b${BASE_NAME}_ ${BASE_NAME}.y #--defines=../include/${BASE_NAME}.h -o${BASE_NAME}.c
    done
fi
if [ "${FWK_DIR_LIST_L}" != "" ]
then
    for i in ${FWK_DIR_LIST_L}
    do
        BASE_NAME=$(basename "$i" .l)
        flex -Cfr -8 -Bvpp -P${BASE_NAME}_ ${BASE_NAME}.l  # -o${BASE_NAME}_flex.c ${BASE_NAME}.l
    done
    mv ${BASE_NAME}_.tab.h ../include
fi
cd -

# Apply patches
PATH_PATCHES=`pwd`/etsi_emcom_patches
if [ -d ${PATH_PATCHES} ]
then
    cp ${PATH_PATCHES}/ng112.bash ${PATH_DEV_EMCOM}/src/AtsNg112/bin
    cp ${PATH_PATCHES}/../run_mtc.bash ${PATH_DEV_EMCOM}/src/AtsNg112/bin
    cp ${PATH_PATCHES}/../run_ptcs.bash ${PATH_DEV_EMCOM}/src/AtsNg112/bin
fi

# Set rights
find ${PATH_DEV_EMCOM} -type f -exec chmod 664 {} \;
find ${PATH_DEV_EMCOM} -name "*.bash" -type f -exec chmod 775 {} \;
find ${PATH_DEV_EMCOM} -type d -exec chmod 775 {} \;
chown -R ${CHOWN_USER_GROUP} ${PATH_DEV_EMCOM}

cd ${OLDPWD}

exit 0