Commits (97)
......@@ -14,3 +14,7 @@
path = ttcn/LibIms
url = https://forge.etsi.org/rep/LIBS/LibIms.git
branch = TTF006
[submodule "titan-test-system-framework"]
path = titan-test-system-framework
url = https://labs.etsi.org/rep/cti-tools/titan-test-system-framework.git
branch = devel
Copyright 2022 ETSI
Copyright 2019 ETSI
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
......
-include config.mk
ifeq (,$(ATS))
$(error ATS shall be defined)
endif
ifeq (,$(TOPDIR))
TOPDIR := .
endif
ifeq (,$(TTCN3_DIR))
$(error TTCN3_DIR shall be defined in config.mk)
endif
first: all
define IncludeModule
undefine sources
undefine modules
undefine includes
include $(1)/module.mk
$$(foreach S, $$(sources), $$(eval all_sources += $(1)/$$(S)))
$$(foreach I, $$(includes), $$(eval all_includes += $(1)/$$(I)))
$$(foreach M, $$(modules), $$(eval $$(call IncludeModule, $$(if $$(filter /%, $$(M)), $$(M), $(1)/$$(M)))))
endef
all_includes := $(TTCN3_DIR)/include $(TTCN3_DIR)/src /usr/include/libxml2
defines += TITAN_RUNTIME_2 _NO_SOFTLINKS_ $(ATS) AS_USE_SSL
libs += $(TTCN3_DIR)/lib/libttcn3-rt2-parallel.a -lstdc++fs
ifeq (Windows_NT,$(OS))
# Silence linker warnings.
LDFLAGS += -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc
defines += WIN32
libs += $(patsubst %, -L%/lib, $(OPENSSL_DIR))
all_includes += $(addsuffix /include, $(OPENSSL_DIR))
libs += $(WPCAP_DLL_PATH)
else
defines += LINUX
libs += -lpcap -lrt -lpthread
endif
libs += -lssl -lcrypto -lxml2 -L$(OSIP_LIB) -losipparser2
$(eval $(call IncludeModule, $(TOPDIR)/ttcn/$(ATS)))
outdir := $(TOPDIR)/build/$(ATS)
bindir := $(TOPDIR)/bin
sources := $(sort $(all_sources))
includes := $(outdir) $(outdir)/.. $(all_includes) $(NPCAP_INCLUDE) $(OSIP_INCLUDE)
ifeq (Windows_NT,$(OS))
EXE=.exe
endif
ttcn_sources := $(filter %.ttcn , $(sources))
ttcn3_sources := $(filter %.ttcn3, $(sources))
xsd_sources := $(filter %.xsd, $(sources))
tt_sources := $(ttcn_sources) $(ttcn3_sources) $(xsd_sources)
cc_sources := $(filter %.cc, $(sources))
gen_ttcn_sources := $(addprefix $(outdir)/, $(notdir $(patsubst %.ttcn, %.cc, $(ttcn_sources))))
gen_ttcn_headers := $(addprefix $(outdir)/, $(notdir $(patsubst %.ttcn, %.hh, $(ttcn_sources))))
gen_ttcn3_sources := $(addprefix $(outdir)/, $(notdir $(patsubst %.ttcn3, %.cc, $(ttcn3_sources))))
gen_ttcn3_headers := $(addprefix $(outdir)/, $(notdir $(patsubst %.ttcn3, %.hh, $(ttcn3_sources))))
gen_xsd_sources := $(addprefix $(outdir)/, $(notdir $(patsubst %.xsd, %.cc, $(xsd_sources))))
gen_xsd_headers := $(addprefix $(outdir)/, $(notdir $(patsubst %.xsd, %.hh, $(xsd_sources))))
gen_sources := $(gen_ttcn_sources) $(gen_ttcn3_sources) $(gen_xsd_sources)
gen_headers := $(gen_ttcn_headers) $(gen_ttcn3_headers) $(gen_xsd_headers)
gen_objects := $(patsubst %.cc, %.o, $(gen_sources))
cc_objects := $(patsubst %.cc, $(outdir)/%.o, $(cc_sources))
.PHONY: all FORCE echo
all: $(bindir) $(outdir) $(bindir)/$(ATS)$(EXE)
echo_sources:
@echo -e "$(addsuffix \n,$(all_sources))"
echo: echo_sources
@echo -e "sources:\n $(addsuffix \n, $(sources))"
@echo -e "gen_sources:\n $(addsuffix \n, $(gen_sources))"
@echo -e "gen_objects:\n $(addsuffix \n, $(gen_objects))"
@echo -e "cc_objects:\n $(addsuffix \n, $(cc_objects))"
@echo -e "includes:\n $(addsuffix \n, $(includes))"
@echo -e "defines: $(addsuffix \n, $(defines))"
clean:
rm -f $(outdir)/$(ATS)$(EXE) $(gen_objects) $(gen_sources) $(gen_headers) $(cc_objects) $(outdir)/.generate
regen: force_regen $(outdir)/.generate
force_regen:
rm -f $(outdir)/.generate
$(outdir) $(bindir):
mkdir -p $@
$(bindir)/$(ATS)$(EXE): $(gen_objects) $(cc_objects)
g++ -g -O0 -std=c++17 -o $@ $(LDFLAGS) $(gen_objects) $(cc_objects) $(libs)
$(gen_objects) :%.o :%.cc
g++ -g -O0 -std=c++17 -c $(addprefix -D, $(defines)) $(addprefix -I, $(includes)) -o $@ $<
$(cc_objects) : $(outdir)/%.o : %.cc
mkdir -p $(dir $@)
g++ -g -O0 -std=c++17 -c $(addprefix -D, $(defines)) $(addprefix -I, $(includes)) -o $@ $<
$(gen_sources): $(outdir)/.generate
$(outdir)/.generate: Makefile $(tt_sources)
$(TTCN3_DIR)/bin/compiler $(TTCN3_COMPILER_OPTIONS) -o $(outdir) $(tt_sources)
touch $@
$(foreach S, $(ttcn_sources), $(eval $(outdir)/$(notdir $(patsubst %.ttcn, %.cc, $(S))): $(S)))
$(foreach S, $(ttcn3_sources), $(eval $(outdir)/$(notdir $(patsubst %.ttcn3, %.cc, $(S))): $(S)))
$(foreach S, $(xsd_sources), $(eval $(outdir)/$(notdir $(patsubst %.xsd, %.cc, $(S))): $(S)))
# Voice and Video over LTE/Emergency VoLTE Interoperability Tests
## Introduction
This repositories contains the test specifications and test adapter code
for interoprability tests to ETSI TS 1037 950-2 (Core Network and Interoperability Testing (INT); Network Interoperability Test Description for emergency services over VoLTE; (3GPP™ Release 15); Part 2: Test Descriptions).
## Contact information
Email at cti_support at etsi dot org
## License
The content of this repository and the files contained are released under the BSD-3-Clause License.
See the attached LICENSE file or visit
https://forge.etsi.org/legal-matters
## Standard links
- ETSI TS 103 795-1: "Core Network and Interoperability Testing (INT); Network Interoperability Test Description for emergency services over VoLTE; (3GPP™ Release 15); Part 1: Test Purposes (TP)"
- ETSI TS 124 229: "Digital cellular telecommunications system (Phase 2+) (GSM); Universal Mobile Telecommunications System (UMTS); LTE; 5G; IP multimedia call control protocol based on Session Initiation Protocol (SIP) and Session Description Protocol (SDP); Stage 3 (3GPP TS 24.229 Release 15)"
- ETSI TS 129 165: "Digital cellular telecommunications system (Phase 2+) (GSM); Universal Mobile Telecommunications System (UMTS); LTE; 5G; Inter-IMS Network to Network Interface (NNI) (3GPP TS 29.165 Release 15)"
- ETSI TS 129 228: "Digital cellular telecommunications system (Phase 2+) (GSM); Universal Mobile Telecommunications System (UMTS); LTE; IP Multimedia (IM) Subsystem Cx and Dx Interfaces; Signalling flows and message contents (3GPP TS 29.228 Release 15)".
- ETSI TS 129 229: "Digital cellular telecommunications system (Phase 2+) (GSM); Universal Mobile Telecommunications System (UMTS); LTE; Cx and Dx interfaces based on the Diameter protocol; Protocol details (3GPP TS 29.229 Release 15)"
## RFC links
-
NOTE All draft can be found in the 'IETF XML Registry', accessible [here](https://www.iana.org/assignments/xml-registry/xml-registry.xhtml)
# Installation
The ETSI Emergency VoLTE Interoperability Tests project builds and tests regularly on the following platforms:
- Linux (Ubuntu)
Note: The [OpenSSL](https://www.openssl.org) version > 1.1.x is also required.
## How to do it?
They are two different methods:
- Using [Vagrant](https://www.vagrantup.com/)
- Using [Docker](https://www.docker.com/)
How to choose one of these methods is depending of your host system.
NOTE: In all case, if you want to setup an continuous integration process (e.g. Jenkins), Docker is the best choice.
### The host system is Windows
The both methods require a virtual machine. You can use either VirtualBox or WMware.
In this case, the easiest way is to use Vagrant.
### The host system is Linux
Vagrant requires a virtual machine. You can use either VirtualBox or WMware.
Docker does not need a virtual machine, so it is the more efficant way.
## Using TITAN compiler on a Docker image
In this configuration, TITAN compiler is located on a Docker image and the sources and the outputs are located on the host.
Pre-requisites on your host machine:
- Install Docker
Procedure on the host machine:
- Open a Terminal
- Clone the ETSI Emergency VoLTE Interoperability Test System
- From the ETSI Emergency VoLTE Interoperability Test System root directory, build the Docker image executing the following commands:
```sh
$ cd ./virtualization/docker
$ docker build --no-cache --tag alpine-emergency-iop -f Dockerfile --force-rm .
$ docker images
```
To build the Emergency VoLTE Interoperability Test Suite, execute the following command:
```sh
$ ./docker-run.sh build
```
Possble other options are 'clean' to remove all the build outputs or 'rebuild' to force a build of the Test Suite after a 'clean'.
To retrieve the list of the available test cases, execute the following command:
```sh
$ ./docker-run.sh list
```
Before to execute the Emergency VoLTE Interoperability Test Suite, prepare, edit and update the configuration file:
```sh
$ ln -sf ../../etc/AtsXxx/AtsXxx_yyy.cf_ ../../etc/AtsXxx/AtsXxx.cfg
$ vi ../../etc/AtsXxx/AtsXxx.cfg # To update it
```
To execute the Emergency VoLTE Interoperability Test Suite, execute the following command:
```sh
$ ./docker-run.sh run
```
<b>Notes</b>:
- The Emergency VoLTE Interoperability Test System is listening on port 443
- Updating the file etc/AtsXxx/AtsXxx.cfg is about (e.g. etc/AtsBCF/AtsBCF.cfg):
. Selecting the test(s) to be executed
. Updating value of PICs and PIXITs
. Updating HTTP port setting
## Using development Docker image
In this configuration, the TITAN compiler, the sources and the outputs are located on the Docker image.
Pre-requisites on your host machine:
- Install Docker
Procedure for a Windows host machine:
- On your host machine, open a the Docker Quickstart Terminal
- On your host machine, clone the ETSI EEmergency Communications project. NOTE that only Docker folder and .jenkins.sh script file are required
- From the ETSI Emergency VoLTE Interoperability Tests project root directory, execute the following commands:
```sh
$ ./.jenkins.sh
...
```
NOTE The creation and the installations will take some time to achieve
- Start the container
```sh
$ ./docker/run-container.sh
...
```
- Switch to the next clause (Usage)
## Using Vagrant
Pre-requisites on your host machine:
- Install [Virtualbox](https://www.virtualbox.org/manual/ch01.html)
- Install [Vagrant](https://www.vagrantup.com/intro/getting-started/)
- Install Vagrant plugin vagrant-vbguest
- Credentials to access [ETSI forge](https://forge.etsi.org/gitlab/users/sign_in)
- Set the environment variable USERNAME to your ETSI EOL account user name
- Set the environment variable PASSWORD to your ETSI EOL account password
Procedure:
- On your host machine, open a command line session (PuTTY, DOS window...)
- From the ETSI Emergency VoLTE Interoperability Tests project, clone the Vagrant folder
- In the file Vagrantfile, modify the tag config.vm.provision replacing <username> & <password> strings by your ETSI credentials
- In the Vagrant folder, execute the following commands:
```sh
$ vagrant up --provider virtualbox --provision
...
```
NOTE The creation and the installations will take some time to achieve
- Stop vagrant virtual machine
```sh
$ vagrant halt
...
```
- Update the file 'Vagrantfile' to match with your networks configuration
- Re-start the vagrant virtual machine and log to to the machine
```sh
$ vagrant up
...
$ vagrant ssh
```
- Switch to the next clause (Usage)
NOTE The user password is vagrant.
## From scratch
Pre-requisites:
- Install Virtualbox
Procedure:
- Install a new Linux Virtual machine (Mint, Debian...)
- Update your system with the latest version of kernel and security packages
- Install the following packages (According to the Linux chosen, the package naming can be different)
autoconf
bison
build-essential
cmake
curl
dos2unix
doxygen
emacs
expect
flex
g++:latest
gcc:latest
graphviz
gdb
git-core
gnutls-bin
libglib2.0-dev
libpcap-dev
libgcrypt-dev
libncurses5-dev
libssl-dev
libtool-bin
libtool
libwireshark-dev
libxml2-dev
lsof
ntp
pkg-config
qt5-default
qtmultimedia5-dev
libqt5svg5-dev
subversion
sudo
sshpass
tcpdump
texlive-font-utils
tshark
valgrind
vim
vsftpd
xutils-dev
tree
tzdata
unzip
wget
xsltproc
- In your home directory, create the following folders:
- $HOME/frameworks,
- $HOME/dev
- $HOME/lib
- In $HOME/frameworks, build the following package:
- Eclipse IDE for C/C++ Developers, according the procedure specified [here](https://www.eclipse.org/cdt/)
- TITAN, according the procedure specified [here](https://github.com/eclipse/titan.core)
- Import the TITAN plugin into your Eclipse IDE, according the procedure specified [here](https://github.com/eclipse/titan.core)
- Install LibOSIP framework
```sh
$ cd ${HOME}/frameworks
$ git clone https://git.savannah.gnu.org/git/osip.git ./osip
$ cd osip
$ ./autogen.sh
$ ./configure --prefix=/home/etsi
$ make && make install
```
- Clone the ETSI Emergency VoLTE Interoperability Tests project into $HOME/dev folder
```sh
$ git clone --recurse-submodules --branch devel https://forge.etsi.org/rep/int/vxlte/emergency-iop.git
```
- Apply patches
```sh
$ cd /home/etsi/dev/emergency-iop/
$ ./install.sh
```
- Update your default environment with the content of the script $HOME/dev/emergency-iop/scripts/devenv.bash.ubuntu
- Switch to the next clause (Usage)
# Generate certificates for TLS and Emergency VoLTE Interoperability security support
This clause describes how generate certificates desrived from Let's encrypt certificate. These certificate will be used for TS mutual authentication.
<b>NOTE:</b>
- Certficates shall be renewed every 3 months
- The port 80 shall be vailable for standalone validation
Pre-requisites:
- You need to install python and [certbot](https://manpages.ubuntu.com/manpages/impish/en/man1/certbot.1.html).
To generate certifcates, execute the following command:
```sh
$ export REQUESTS_CA_BUNDLE=$(dirname `python -c "import certifi; print(certifi.where())"`)
$ mkdir -p $HOME/var/ssl
$ sudo certbot certonly --debug --emergency-iop-tls-cert --config-dir $HOME/var/ssl --work-dir $HOME/var/ssl --logs-dir $HOME/var/ssl --standalone --agree-tos --email <your email> -d <your domain> -w $HOME/var/ssl/
```
<b>NOTE:</b> For testing certificate generation and renewal, use the certbot's --dry-run option.
# Usage
This clause describes how to compile and execute an Abstract Test Suite.
The procedures below illustrate how to run the CAM test suite. The same procedures will apply for any other ETSI Emergency Communications test suite.
Pre-requisites:
- Your machine is installed following one of the installation method describes in the previous clause
- Your are logged as 'etsi' or 'vagrant' user
Procedure in TITAN command line:
- Open several SSH session (PuTTY...)
- Change to the directory ~/dev/emergency-iop/
- Build the test suite you want to exectue (e.g. LIS test suite)
```sh
$ cd ~/dev/emergency-iop/
$ export ATS=AtsImsIot
$ make
...
```
- Edit the file ../etc/AtsImsIot/AtsImsIot.cfg
- Update the following fields:
- system.httpPort.params
- system.SIPP.params
- system.DIAMETER.params
- To run the test suitem, execute the following command:
```sh
$ cd ~/dev/emergency-iop/scripts
$ ./run-all.bash
...
```
- The log files are located in ../logs/AtsImsIot folder. You can edit them using any editor or using the Eclipse TITAN log plugins
# How to Report a Bug
The ETSI Emergency VoLTE Interoperability Tests 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.
This diff is collapsed.
sources := \
LibDiameter_EncDec.cc
#include "LibNg112_EncdecDeclarations.hh"
#include "json_codec.hh"
#include "loggers.hh"
namespace LibNg112__EncdecDeclarations { // TODO File to be removed
/* BITSTRING enc__DequeueRegistrationRequest(const LibNg112__DequeueRegistration::DequeueRegistrationRequest& p) {
loggers::get_instance().log_msg(">>> enc__DequeueRegistrationRequest: ", (const Base_Type&)p);
OCTETSTRING os;
json_codec codec;
codec.encode(p, os);
return oct2bit(os);
}
INTEGER dec__DequeueRegistrationRequest(BITSTRING& pdu, LibNg112__DequeueRegistration::DequeueRegistrationRequest& p) {
loggers::get_instance().log_msg(">>> dec__DequeueRegistrationRequest: ", pdu);
OCTETSTRING os = bit2oct(pdu);
json_codec codec;
codec.decode(os, p);
return 0;
}
BITSTRING enc__DequeueRegistrationResponse(const LibNg112__DequeueRegistration::DequeueRegistrationResponse& p) {
loggers::get_instance().log_msg(">>> enc__DequeueRegistrationResponse: ", (const Base_Type&)p);
OCTETSTRING os;
json_codec codec;
codec.encode(p, os);
return oct2bit(os);
}
INTEGER dec__DequeueRegistrationResponse(BITSTRING& pdu, LibNg112__DequeueRegistration::DequeueRegistrationResponse& p) {
loggers::get_instance().log_msg(">>> dec__DequeueRegistrationResponse: ", pdu);
OCTETSTRING os = bit2oct(pdu);
json_codec codec;
codec.decode(os, p);
return 0;
}
BITSTRING enc__ServiceStatePayload(const LibNg112__SubscriptionPayloads::ServiceStatePayload& p) {
loggers::get_instance().log_msg(">>> enc__ServiceStatePayload: ", (const Base_Type&)p);
OCTETSTRING os;
json_codec codec;
codec.encode(p, os);
return oct2bit(os);
}
INTEGER dec__ServiceStatePayload(BITSTRING& pdu, LibNg112__SubscriptionPayloads::ServiceStatePayload& p) {
loggers::get_instance().log_msg(">>> dec__ServiceStatePayload: ", pdu);
OCTETSTRING os = bit2oct(pdu);
json_codec codec;
codec.decode(os, p);
return 0;
}
BITSTRING enc__ElementStatePayload(const LibNg112__SubscriptionPayloads::ElementStatePayload& p) {
loggers::get_instance().log_msg(">>> enc__ElementStatePayload: ", (const Base_Type&)p);
OCTETSTRING os;
json_codec codec;
codec.encode(p, os);
return oct2bit(os);
}
INTEGER dec__ElementStatePayload(BITSTRING& pdu, LibNg112__SubscriptionPayloads::ElementStatePayload& p) {
loggers::get_instance().log_msg(">>> dec__ElementStatePayload: ", pdu);
OCTETSTRING os = bit2oct(pdu);
json_codec codec;
codec.decode(os, p);
return 0;
}
BITSTRING enc__SecurityPosturePayload(const LibNg112__SubscriptionPayloads::SecurityPosturePayload& p) {
loggers::get_instance().log_msg(">>> enc__SecurityPosturePayload: ", (const Base_Type&)p);
OCTETSTRING os;
json_codec codec;
codec.encode(p, os);
return oct2bit(os);
}
INTEGER dec__SecurityPosturePayload(BITSTRING& pdu, LibNg112__SubscriptionPayloads::SecurityPosturePayload& p) {
loggers::get_instance().log_msg(">>> dec__QueueStdec__SecurityPosturePayloadtePayload: ", pdu);
OCTETSTRING os = bit2oct(pdu);
json_codec codec;
codec.decode(os, p);
return 0;
}
BITSTRING enc__QueueStatePayload(const LibNg112__SubscriptionPayloads::QueueStatePayload& p) {
loggers::get_instance().log_msg(">>> enc__QueueStatePayload: ", (const Base_Type&)p);
OCTETSTRING os;
json_codec codec;
codec.encode(p, os);
return oct2bit(os);
}
INTEGER dec__QueueStatePayload(BITSTRING& pdu, LibNg112__SubscriptionPayloads::QueueStatePayload& p) {
loggers::get_instance().log_msg(">>> dec__QueueStatePayload: ", pdu);
OCTETSTRING os = bit2oct(pdu);
json_codec codec;
codec.decode(os, p);
return 0;
}
*/
} // End of namespace LibNg112__EncdecDeclarations
sources := LibNg112_EncDec.cc
#include "LibMsrp_EncDecDeclarations.hh"
#include "loggers.hh"
namespace LibMsrp__EncDecDeclarations {
BITSTRING fx__enc__MsrpURI(const LibMsrp__TypesAndValues::MsrpURI& p) {
loggers::get_instance().log_msg(">>> BITSTRING fx__enc__MsrpURI: ", p);
float duration;
std::string tag(" BITSTRING fx__enc__MsrpURI");
loggers::get_instance().set_start_time(tag);
OCTETSTRING os;
// TODO
loggers::get_instance().set_stop_time(tag, duration);
return oct2bit(os);
}
INTEGER fx__dec__MsrpURI(BITSTRING&, LibMsrp__TypesAndValues::MsrpURI& p) { return INTEGER(0); }
} // End of module LibMsrp__EncDecDeclarations
\ No newline at end of file
sources := \
LibMsrp_EncDec.cc
#include "LibSip_EncdecDeclarations.hh"
#include "LibSip_XMLTypes.hh"
#include "sip_codec_register_request.hh"
#include "sip_codec_invite_request.hh"
#include "sip_codec_options_request.hh"
#include "sip_codec_bye_request.hh"
#include "sip_codec_ack_request.hh"
#include "sip_codec_subscribe_request.hh"
#include "sip_codec_notify_request.hh"
#include "sip_codec_info_request.hh"
#include "sip_codec_message_request.hh"
#include "sip_codec_message_body.hh"
#include "sip_codec_response.hh"
#include "loggers.hh"
namespace LibSip__EncdecDeclarations {
BITSTRING fx__enc__Request(const LibSip__SIPTypesAndValues::Request& p) {
loggers::get_instance().log_msg(">>> fx__enc__Request: ", p);
float duration;
std::string tag("fx__enc__Request");
loggers::get_instance().set_start_time(tag);
OCTETSTRING os;
sip_codec_request codec;
if (codec.encode(p, os) == -1) {
loggers::get_instance().warning("fx__enc__Request -1 result code was returned");
return int2bit(0, 1);
}
loggers::get_instance().set_stop_time(tag, duration);
return oct2bit(os);
}
BITSTRING fx__enc__REGISTER__Request(const LibSip__SIPTypesAndValues::REGISTER__Request& p) {
loggers::get_instance().log_msg(">>> fx__enc__REGISTER__Request: ", p);
float duration;
std::string tag("fx__enc__REGISTER__Request");
loggers::get_instance().set_start_time(tag);
OCTETSTRING os;
sip_codec_register_request codec;
if (codec.encode(p, os) == -1) {
loggers::get_instance().warning("fx__enc__REGISTER__Request: -1 result code was returned");
return int2bit(0, 1);
}
loggers::get_instance().set_stop_time(tag, duration);
return oct2bit(os);
}
BITSTRING fx__enc__INVITE__Request(const LibSip__SIPTypesAndValues::INVITE__Request& p) {
loggers::get_instance().log_msg(">>> fx__enc__INVITE__Request: ", p);
float duration;
std::string tag("fx__enc__INVITE__Request");
loggers::get_instance().set_start_time(tag);
OCTETSTRING os;
sip_codec_invite_request codec;
if (codec.encode(p, os) == -1) {
loggers::get_instance().warning("fx__enc__INVITE__Request: -1 result code was returned");
return int2bit(0, 1);
}
loggers::get_instance().set_stop_time(tag, duration);
return oct2bit(os);
}
BITSTRING fx__enc__OPTIONS__Request(const LibSip__SIPTypesAndValues::OPTIONS__Request& p) {
loggers::get_instance().log_msg(">>> fx__enc__OPTIONS__Request: ", p);
float duration;
std::string tag("fx__enc__OPTIONS__Request");
loggers::get_instance().set_start_time(tag);
OCTETSTRING os;
sip_codec_options_request codec;
if (codec.encode(p, os) == -1) {
loggers::get_instance().warning("fx__enc__OPTIONS__Request: -1 result code was returned");
return int2bit(0, 1);
}
loggers::get_instance().set_stop_time(tag, duration);
return oct2bit(os);
}
BITSTRING fx__enc__BYE__Request(const LibSip__SIPTypesAndValues::BYE__Request& p) {
loggers::get_instance().log_msg(">>> fx__enc__BYE__Request: ", p);
float duration;
std::string tag("fx__enc__BYE__Request");
loggers::get_instance().set_start_time(tag);
OCTETSTRING os;
sip_codec_bye_request codec;
if (codec.encode(p, os) == -1) {
loggers::get_instance().warning("fx__enc__BYE__Request: -1 result code was returned");
return int2bit(0, 1);
}
loggers::get_instance().set_stop_time(tag, duration);
return oct2bit(os);
}
BITSTRING fx__enc__ACK__Request(const LibSip__SIPTypesAndValues::ACK__Request& p) {
loggers::get_instance().log_msg(">>> fx__enc__ACK__Request: ", p);
float duration;
std::string tag("fx__enc__ACK__Request");
loggers::get_instance().set_start_time(tag);
OCTETSTRING os;
sip_codec_ack_request codec;
if (codec.encode(p, os) == -1) {
loggers::get_instance().warning("fx__enc__ACK__Request: -1 result code was returned");
return int2bit(0, 1);
}
loggers::get_instance().set_stop_time(tag, duration);
return oct2bit(os);
}
BITSTRING fx__enc__CANCEL__Request(const LibSip__SIPTypesAndValues::CANCEL__Request& p) { return BITSTRING(); }
BITSTRING fx__enc__PRACK__Request(const LibSip__SIPTypesAndValues::PRACK__Request& p) { return BITSTRING(); }
BITSTRING fx__enc__NOTIFY__Request(const LibSip__SIPTypesAndValues::NOTIFY__Request& p) {
loggers::get_instance().log_msg(">>> fx__enc__NOTIFY__Request: ", p);
float duration;
std::string tag("fx__enc__NOTIFY__Request");
loggers::get_instance().set_start_time(tag);
OCTETSTRING os;
sip_codec_notify_request codec;
if (codec.encode(p, os) == -1) {
loggers::get_instance().warning("fx__enc__NOTIFY__Request: -1 result code was returned");
return int2bit(0, 1);
}
loggers::get_instance().set_stop_time(tag, duration);
return oct2bit(os);
}
BITSTRING fx__enc__SUBSCRIBE__Request(const LibSip__SIPTypesAndValues::SUBSCRIBE__Request& p) {
loggers::get_instance().log_msg(">>> fx__enc__SUBSCRIBE__Request: ", p);
float duration;
std::string tag("fx__enc__SUBSCRIBE__Request");
loggers::get_instance().set_start_time(tag);
OCTETSTRING os;
sip_codec_subscribe_request codec;
if (codec.encode(p, os) == -1) {
loggers::get_instance().warning("fx__enc__SUBSCRIBE__Request: -1 result code was returned");
return int2bit(0, 1);
}
loggers::get_instance().set_stop_time(tag, duration);
return oct2bit(os);
}
BITSTRING fx__enc__MESSAGE__Request(const LibSip__SIPTypesAndValues::MESSAGE__Request& p) {
loggers::get_instance().log_msg(">>> fx__enc__MESSAGE__Request: ", p);
float duration;
std::string tag("fx__enc__MESSAGE__Request");
loggers::get_instance().set_start_time(tag);
OCTETSTRING os;
sip_codec_message_request codec;
if (codec.encode(p, os) == -1) {
loggers::get_instance().warning("fx__enc__MESSAGE__Request: -1 result code was returned");
return int2bit(0, 1);
}
loggers::get_instance().set_stop_time(tag, duration);
return oct2bit(os);
}
BITSTRING fx__enc__PUBLISH__Request(const LibSip__SIPTypesAndValues::PUBLISH__Request& p) { return BITSTRING(); }
BITSTRING fx__enc__UPDATE__Request(const LibSip__SIPTypesAndValues::UPDATE__Request& p) { return BITSTRING(); }
BITSTRING fx__enc__REFER__Request(const LibSip__SIPTypesAndValues::REFER__Request& p) { return BITSTRING(); }
BITSTRING fx__enc__INFO__Request(const LibSip__SIPTypesAndValues::INFO__Request& p) {
loggers::get_instance().log_msg(">>> fx__enc__INFO__Request: ", p);
float duration;
std::string tag("fx__enc__INFO__Request");
loggers::get_instance().set_start_time(tag);
OCTETSTRING os;
sip_codec_info_request codec;
if (codec.encode(p, os) == -1) {
loggers::get_instance().warning("fx__enc__INFO__Request: -1 result code was returned");
return int2bit(0, 1);
}
loggers::get_instance().set_stop_time(tag, duration);
return oct2bit(os);
}
BITSTRING fx__enc__Response(const LibSip__SIPTypesAndValues::Response& p) {
loggers::get_instance().log_msg(">>> fx__enc__Response: ", p);
float duration;
std::string tag("fx__enc__Response");
loggers::get_instance().set_start_time(tag);
OCTETSTRING os;
sip_codec_response codec;
if (codec.encode(p, os) == -1) {
loggers::get_instance().warning("fx__enc__Response: -1 result code was returned");
return int2bit(0, 1);
}
loggers::get_instance().set_stop_time(tag, duration);
return oct2bit(os);
}
BITSTRING fx__enc__Raw(const CHARSTRING& p) { return BITSTRING(); }
BITSTRING fx__enc__SMS(const LibSip__SimpleMsgSummaryTypes::SimpleMsgSummary& pdu) { return BITSTRING(); }
BITSTRING fx__enc__MessageBody(const LibSip__MessageBodyTypes::MessageBody& pdu) {
loggers::get_instance().log_msg(">>> fx__enc__MessageBody: ", pdu);
float duration;
std::string tag("fx__enc__MessageBody");
loggers::get_instance().set_start_time(tag);
OCTETSTRING os;
sip_codec_message_body codec;
if (codec.encode(pdu, os) == -1) {
loggers::get_instance().warning("fx__enc__MessageBody: -1 result code was returned");
return int2bit(0, 1);
}
loggers::get_instance().set_stop_time(tag, duration);
return oct2bit(os);
}
INTEGER fx__dec__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::Request& p) {
loggers::get_instance().log_msg(">>> fx__dec__Request: ", pdu);
OCTETSTRING os = bit2oct(pdu);
sip_codec_request codec;
codec.decode(os, p);
return 0;
}
INTEGER fx__dec__REGISTER__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::REGISTER__Request& p) {
loggers::get_instance().log_msg(">>> fx__dec__REGISTER__Request: ", pdu);
OCTETSTRING os = bit2oct(pdu);
sip_codec_register_request codec;
codec.decode(os, p);
return 0;
}
INTEGER fx__dec__INVITE__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::INVITE__Request& p) {
loggers::get_instance().log_msg(">>> fx__dec__INVITE__Request: ", pdu);
OCTETSTRING os = bit2oct(pdu);
sip_codec_invite_request codec;
codec.decode(os, p);
return 0;
}
INTEGER fx__dec__OPTIONS__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::OPTIONS__Request& p) {
loggers::get_instance().log_msg(">>> fx__dec__OPTIONS__Request: ", pdu);
OCTETSTRING os = bit2oct(pdu);
sip_codec_options_request codec;
codec.decode(os, p);
return 0;
}
INTEGER fx__dec__BYE__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::BYE__Request& p) {
loggers::get_instance().log_msg(">>> fx__dec__BYE__Request: ", pdu);
OCTETSTRING os = bit2oct(pdu);
sip_codec_bye_request codec;
codec.decode(os, p);
return 0;
}
INTEGER fx__dec__ACK__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::ACK__Request& p) {
loggers::get_instance().log_msg(">>> fx__dec__ACK__Request: ", pdu);
OCTETSTRING os = bit2oct(pdu);
sip_codec_ack_request codec;
codec.decode(os, p);
return 0;
}
INTEGER fx__dec__CANCEL__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::CANCEL__Request& p) { return INTEGER(0); }
INTEGER fx__dec__PRACK__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::PRACK__Request& p) { return INTEGER(0); }
INTEGER fx__dec__NOTIFY__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::NOTIFY__Request& p) {
loggers::get_instance().log_msg(">>> fx__dec__NOTIFY__Request: ", pdu);
OCTETSTRING os = bit2oct(pdu);
sip_codec_notify_request codec;
codec.decode(os, p);
return 0;
}
INTEGER fx__dec__SUBSCRIBE__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::SUBSCRIBE__Request& p) {
loggers::get_instance().log_msg(">>> fx__dec__SUBSCRIBE__Request: ", pdu);
OCTETSTRING os = bit2oct(pdu);
sip_codec_subscribe_request codec;
codec.decode(os, p);
return 0;
}
INTEGER fx__dec__MESSAGE__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::MESSAGE__Request& p) {
loggers::get_instance().log_msg(">>> fx__dec__MESSAGE__Request: ", pdu);
OCTETSTRING os = bit2oct(pdu);
sip_codec_message_request codec;
codec.decode(os, p);
return 0;
}
INTEGER fx__dec__PUBLISH__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::PUBLISH__Request& p) { return INTEGER(0); }
INTEGER fx__dec__UPDATE__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::UPDATE__Request& p) { return INTEGER(0); }
INTEGER fx__dec__REFER__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::REFER__Request& p) { return INTEGER(0); }
INTEGER fx__dec__INFO__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::INFO__Request& p) {
loggers::get_instance().log_msg(">>> fx__dec__INFO__Request: ", pdu);
OCTETSTRING os = bit2oct(pdu);
sip_codec_info_request codec;
codec.decode(os, p);
return 0;
}
INTEGER fx__dec__Response(BITSTRING& pdu, LibSip__SIPTypesAndValues::Response& p) {
loggers::get_instance().log_msg(">>> fx__dec__Response: ", pdu);
OCTETSTRING os = bit2oct(pdu);
sip_codec_response codec;
codec.decode(os, p);
return 0;
}
INTEGER fx__dec__SMS(BITSTRING& pdu, LibSip__SimpleMsgSummaryTypes::SimpleMsgSummary& p) { return INTEGER(0); }
INTEGER fx__dec__MessageBody(BITSTRING& pdu, LibSip__MessageBodyTypes::MessageBody& p) {
loggers::get_instance().log_msg(">>> fx__dec__MessageBody: ", pdu);
OCTETSTRING os = bit2oct(pdu);
sip_codec_message_body codec;
codec.decode(os, p);
return 0;
}
} // End of namespace LibSip__EncdecDeclarations
#include "LibSip_SMSFunctions.hh"
#include "loggers.hh"
namespace LibSip__SMSFunctions {
HEXSTRING fx__GetSC__TimeStamp(const INTEGER& p__TimeZone) { return int2hex(0, 14); };
} // End of namespace LibSip__SMSFunctions
#include <algorithm>
#include <string>
#include <regex>
#include <openssl/md5.h>
#include "LibSip_Steps.hh"
#include "loggers.hh"
#include "converter.hh"
namespace LibSip__Steps {
int calculate_md5(const std::string& p_data, std::string& p_md5)
{
loggers::get_instance().log(">>> calculate_md5: %s", p_data.c_str());
MD5_CTX md5_context;
::MD5_Init(&md5_context);
loggers::get_instance().log("calculate_md5: length=%d", p_data.length());
::MD5_Update(&md5_context, p_data.c_str(), p_data.length()); // TODO Add support of block size > 512
const size_t digestlen = 16;
unsigned char digest[digestlen];
::MD5_Final(digest, &md5_context);
p_md5 = converter::get_instance().bytes_to_hexa(std::vector<unsigned char>(digest, digest + digestlen));
loggers::get_instance().log("<<< calculate_md5: %s", p_md5.c_str());
return 0;
}
CHARSTRING fx__rndStr() {
static const char alphanum[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
static int length = 10;
char s[length] = { 0 };
for (int i = 0; i < length - 1; ++i) {
s[i] = alphanum[rand() % (sizeof(alphanum) - 1)];
} // End of 'for' statement
return CHARSTRING(s);
};
CHARSTRING fx__putInLowercase(const CHARSTRING& p__string) {
std::string s(static_cast<const char*>(p__string));
std::transform(s.begin(), s.end(), s.begin(), ::tolower);
return CHARSTRING(s.c_str());
};
CHARSTRING fx__getIpAddr(const CHARSTRING& p__host__name) { return CHARSTRING(""); };
CHARSTRING fx__calculateDigestResponse(const CHARSTRING& p__nonce, const CHARSTRING& p__cnonce, const CHARSTRING& p__user, const CHARSTRING& p__realm, const CHARSTRING& p__passwd, const CHARSTRING& p__alg, const CHARSTRING& p__nonceCount, const CHARSTRING& p__method, const CHARSTRING& p__qop, const CHARSTRING& p__URI, const CHARSTRING& p__HEntity) {
loggers::get_instance().log(">>> fx__calculateDigestResponse");
// Buid a1=USERNAME:REALM:PASSWORD
std::string a1(static_cast<const char*>(p__user));
a1 += ":";
a1 += static_cast<const char*>(p__realm);
a1 += ":";
a1 += static_cast<const char*>(p__passwd);
if (a1.find("\"") != std::string::npos) {
a1 = std::regex_replace(a1, std::regex("\""), "");
}
loggers::get_instance().log("fx__calculateDigestResponse: a1='%s'", a1.c_str());
std::string md5_a1;
calculate_md5(a1, md5_a1);
// Buid a2=METHOD:DIGESTURI
std::string a2(static_cast<const char*>(p__method));
a2 += ":";
a2 += static_cast<const char*>(p__URI);
if (a2.find("\"") != std::string::npos) {
a2 = std::regex_replace(a2, std::regex("\""), ""); // TODO Move to converter
}
loggers::get_instance().log("fx__calculateDigestResponse: a2='%s'", a2.c_str());
std::string md5_a2;
calculate_md5(a2, md5_a2);
// Buid resp=HA1:NONCE:HA2
std::string resp(md5_a1);
resp += ":";
resp += static_cast<const char*>(p__nonce);
resp += ":";
resp += md5_a2;
loggers::get_instance().log("fx__calculateDigestResponse: resp='%s'", resp.c_str());
std::string md5_resp;
calculate_md5(resp, md5_resp);
// Convert into Base64
std::vector<unsigned char> u = converter::get_instance().string_to_bytes(md5_resp);
md5_resp = converter::get_instance().bytes_to_string(converter::get_instance().buffer_to_base64(u));
loggers::get_instance().log("<<< fx__calculateDigestResponse: '%s'", md5_resp.c_str());
return CHARSTRING(md5_resp.c_str());
};
CHARSTRING fx__encodeBase64(const CHARSTRING& p__value) {
std::vector<unsigned char> s(static_cast<const char*>(p__value), static_cast<const char*>(p__value) + p__value.lengthof());
std::vector<unsigned char> o = converter::get_instance().buffer_to_base64(s);
return CHARSTRING(o.size(), (const char*)o.data());
};
CHARSTRING fx__decodeBase64(const CHARSTRING& p__value) {
std::vector<unsigned char> s(static_cast<const char*>(p__value), static_cast<const char*>(p__value) + p__value.lengthof());
std::vector<unsigned char> o = converter::get_instance().base64_to_buffer(s);
return CHARSTRING(o.size(), (const char*)o.data());
};
} // End of namespace LibSip__Steps
#include "LibSip_Templates.hh"
#include "loggers.hh"
namespace LibSip__Templates {
INTEGER fx__calculateXMLBodyLen(const LibSip__XMLTypes::XmlBody& p__mb) { return INTEGER(0); };
} // End of namespace LibSip__Templates
sources := \
LibSip_Encdec.cc \
LibSip_SMSFunctions_Encdec.cc \
LibSip_Steps_Encdec.cc \
LibSip_Templates_Encdec.cc
#include "DataPort.hh"
#include "loggers.hh"
namespace AtsImsIot__TestSystem {
DataPort::DataPort(const char *par_port_name): DataPort_BASE(par_port_name), _cfg_params(), _layer_params(), _layer(nullptr), _time_key("DataPort::outgoing_send") {
// Nothing to do
} // End of constructor
DataPort::~DataPort() {
loggers::get_instance().log(">>> DataPort::~DataPort");
if (_layer != nullptr) {
delete _layer;
}
} // End of destructor
void DataPort::set_parameter(const char * parameter_name, const char * parameter_value)
{
loggers::get_instance().log("DataPort::set_parameter: %s=%s", parameter_name, parameter_value);
_cfg_params.insert(std::pair<std::string, std::string>(std::string(parameter_name), std::string(parameter_value)));
}
/*void DataPort::Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error) {}*/
void DataPort::Handle_Fd_Event_Error(int /*fd*/)
{
}
void DataPort::Handle_Fd_Event_Writable(int /*fd*/)
{
}
void DataPort::Handle_Fd_Event_Readable(int /*fd*/)
{
}
/*void DataPort::Handle_Timeout(double time_since_last_call) {}*/
void DataPort::user_map(const char * system_port)
{
loggers::get_instance().log(">>> DataPort::user_map: %s", system_port);
} // End of user_map method
void DataPort::user_unmap(const char * system_port)
{
loggers::get_instance().log(">>> DataPort::user_unmap: %s", system_port);
// Reset layers
if (_layer != nullptr) {
delete _layer;
_layer = nullptr;
}
} // End of user_unmap method
void DataPort::user_start()
{
loggers::get_instance().log(">>> DataPort::user_start");
} // End of user_start method
void DataPort::user_stop()
{
loggers::get_instance().log(">>> DataPort::user_stop");
} // End of user_stop method
}
#pragma once
#include "AtsImsIot_TestSystem.hh"
#include "layer.hh"
#include "params.hh"
namespace AtsImsIot__TestSystem {
class DataPort : public DataPort_BASE {
params _cfg_params;
params _layer_params;
layer* _layer;
std::string _time_key;
public:
DataPort(const char *par_port_name);
~DataPort();
void set_parameter(const char *parameter_name, const char *parameter_value);
void receiveMsg (const LibSip__SIPTypesAndValues::Request& p_ind, const params& p_params) {};
void receiveMsg (const LibSip__SIPTypesAndValues::Response& p_ind, const params& p_params) {};
void receiveMsg (const LibMsrp__TypesAndValues::SEND__request& p_ind, const params& p_params) {};
void receiveMsg (const LibMsrp__TypesAndValues::RECEIVE__response& p_ind, const params& p_params) {};
private:
/* void Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error); */
void Handle_Fd_Event_Error(int fd);
void Handle_Fd_Event_Writable(int fd);
void Handle_Fd_Event_Readable(int fd);
/* void Handle_Timeout(double time_since_last_call); */
protected:
void user_map(const char *system_port);
void user_unmap(const char *system_port);
void user_start();
void user_stop();
protected:
}; // End of class DataPort
}
sources := DataPort.cc
includes := .
#include "ImsMonitorDiameterPort.hh"
#include "diameter_layer_factory.hh"
#include "loggers.hh"
namespace AtsImsIot__TestSystem {
ImsMonitorDiameterPort::ImsMonitorDiameterPort(const char *par_port_name): ImsMonitorDiameterPort_BASE(par_port_name), _cfg_params(), _layer_params(), _layer(nullptr), _time_key("ImsMonitorDiameterPort::outgoing_send") {
// Nothing to do
} // End of constructor
ImsMonitorDiameterPort::~ImsMonitorDiameterPort() {
loggers::get_instance().log(">>> ImsMonitorDiameterPort::~ImsMonitorDiameterPort");
if (_layer != nullptr) {
delete _layer;
}
} // End of destructor
void ImsMonitorDiameterPort::set_parameter(const char * parameter_name, const char * parameter_value)
{
loggers::get_instance().log("ImsMonitorDiameterPort::set_parameter: %s=%s", parameter_name, parameter_value);
_cfg_params.insert(std::pair<std::string, std::string>(std::string(parameter_name), std::string(parameter_value)));
}
/*void ImsMonitorDiameterPort::Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error) {}*/
void ImsMonitorDiameterPort::Handle_Fd_Event_Error(int /*fd*/)
{
}
void ImsMonitorDiameterPort::Handle_Fd_Event_Writable(int /*fd*/)
{
}
void ImsMonitorDiameterPort::Handle_Fd_Event_Readable(int /*fd*/)
{
}
/*void ImsMonitorDiameterPort::Handle_Timeout(double time_since_last_call) {}*/
void ImsMonitorDiameterPort::user_map(const char * system_port)
{
loggers::get_instance().log(">>> ImsMonitorDiameterPort::user_map: %s", system_port);
// Build layer stack
/*params::iterator it = _cfg_params.find(std::string("params"));
if (it != _cfg_params.end()) {
loggers::get_instance().log("ImsMonitorDiameterPort::user_map: %s", it->second.c_str());
// Setup parameters
params::convert(_layer_params, it->second); // TODO This _layer_params seems to be useless
// Create layer
_layer = layer_stack_builder::get_instance()->create_layer_stack(it->second.c_str());
if (static_cast<diameter_layer *>(_layer) == nullptr) {
loggers::get_instance().error("ImsMonitorDiameterPort::user_map: Invalid stack configuration: %s", it->second.c_str());
}
static_cast<diameter_layer *>(_layer)->add_upper_port(this);
} else {*/
loggers::get_instance().error("ImsMonitorDiameterPort::user_map: No layers defined in configuration file");
/*}*/
} // End of user_map method
void ImsMonitorDiameterPort::user_unmap(const char * system_port)
{
loggers::get_instance().log(">>> ImsMonitorDiameterPort::user_unmap: %s", system_port);
// Reset layers
if (_layer != nullptr) {
delete _layer;
_layer = nullptr;
}
} // End of user_unmap method
void ImsMonitorDiameterPort::user_start()
{
loggers::get_instance().log(">>> ImsMonitorDiameterPort::user_start");
} // End of user_start method
void ImsMonitorDiameterPort::user_stop()
{
loggers::get_instance().log(">>> ImsMonitorDiameterPort::user_stop");
} // End of user_stop method
void ImsMonitorDiameterPort::receiveMsg (const LibDiameter__TypesAndValues::DIAMETER__MSG& p_ind, const params& p_params) {
loggers::get_instance().log_msg(">>> ImsMonitorDiameterPort::receive_msg: ", p_ind);
// Sanity check
if (!p_ind.is_bound()) {
return;
}
incoming_message(p_ind);
} // End of method receiveMsg
}
#pragma once
#include "AtsImsIot_TestSystem.hh"
#include "LibDiameter_TypesAndValues.hh"
#include "layer.hh"
#include "params.hh"
namespace AtsImsIot__TestSystem {
class ImsMonitorDiameterPort : public ImsMonitorDiameterPort_BASE {
params _cfg_params;
params _layer_params;
layer* _layer;
std::string _time_key;
public:
ImsMonitorDiameterPort(const char *par_port_name);
~ImsMonitorDiameterPort();
void set_parameter(const char *parameter_name, const char *parameter_value);
void receiveMsg (const LibDiameter__TypesAndValues::DIAMETER__MSG& p_ind, const params& p_params);
private:
/* void Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error); */
void Handle_Fd_Event_Error(int fd);
void Handle_Fd_Event_Writable(int fd);
void Handle_Fd_Event_Readable(int fd);
/* void Handle_Timeout(double time_since_last_call); */
protected:
void user_map(const char *system_port);
void user_unmap(const char *system_port);
void user_start();
void user_stop();
}; // End of class ImsMonitorDiameterPort
}