asciidoc added
diff --git a/doc/FS/M3UA Protocol Emulation for TTCN-3 Toolset with TITAN, FS.adoc b/doc/FS/M3UA Protocol Emulation for TTCN-3 Toolset with TITAN, FS.adoc
new file mode 100644
index 0000000..22e2c73
--- /dev/null
+++ b/doc/FS/M3UA Protocol Emulation for TTCN-3 Toolset with TITAN, FS.adoc
@@ -0,0 +1,170 @@
+---
+Author: Ferenc Kovács
+Version: 155 17-CNL 113 537, Rev. A
+Date: 2008-01-14
+
+---
+= M3UA Protocol Emulation for TTCN-3 Toolset with TITAN, Function Specification
+:author: Ferenc Kovács
+:revnumber: 155 17-CNL 113 537, Rev. A
+:revdate: 2008-01-14
+:toc:
+
+== How to Read this Document
+
+This is the Function Specification for the M3UA Protocol Emulation (M3UA PE). M3UA PE is developed for the TTCN-3 Toolset with TITAN.
+
+== Scope
+
+The purpose of this document is to specify the functionality and configurability of the M3UA PE.
+
+= Overview
+
+It’s necessary to introduce the M3UA PE (working with an SCTP test port and SCTP implementation). The M3UA PE runs on the Application Server Process. It uses a single SCTP test port (with a single SCTP association) to communicate with the SUT. On the other side, the MTP3 users (for example, SCCP, ISUP entities) communicate with the M3UA PE using MTP3 ASPs.
+
+See the place of the M3UA PE below:
+
+image:images/The place of M3UA PE.png[alt]
+
+= Functional Specification
+
+== Implementation
+
+=== Starting the Emulation
+
+The M3UA PE can be started with the `f_M3UA_Emulation`() function from a TTCN-3 test case. It requires a single parameter of type `SCTP_Association_Address`, which describes the single SCTP association between the SUT and the M3UA PE (on the Application Server Process). The structure looks like the following.
+
+[source]
+----
+type record SCTP_Association_Address
+{
+  integer local_sctp_port,
+  charstring local_ip_addr,
+  integer remote_sctp_port,
+  charstring remote_ip_addr
+}
+----
+
+This information on the SCTP association is stored globally with the actual status of the M3UA PE (stored in the `commStatus` variable). The following scenario (see figure below) shows a usual message flow between the SUT and the M3UA PE, which builds up the SCTP association for M3UA communication in client mode. Only client mode is explained, server mode is similar.
+
+See the building of the SCTP association and the M3UA connection below:
+
+image:images/SCTP association and M3UA connection.png[alt]
+
+
+The `commStatus` changes appropriately. At first the M3UA PE is in `aSP_Down_initial_State`, but it changes to `aSP_Down_sCTP_Initialize_Done` immediately. After sending the SCTP Connect From message the state changes to `aSP_Down_sCTP_Associate_done` in case the SCTP Result was not an error message. After reception of the SCTP Communication Up message from the SUT (`aSP_Down_commUP_Received`), the M3UA PE sends a M3UA ASPUP message, waits for an M3UA ASPUP Ack message, and goes to `aSP_Down_ASPUP_Sent` state. The M3UA PE becomes `aSP_Inactive` after receiving the M3UA ASPUP Ack message, and sends a M3UA ASPAC message (`aSP_Inact_ASPAC_Sent`). Finally, after the reception of M3UA ASPAC Ack the state becomes `aSP_Active`. At this point the SCTP association and the M3UA connection is up and running.
+
+=== Initialization
+
+The SCTP part must be initialized with the `f_initialize_SCTP`() function. Setting the module parameters (described in <<_3, [3]>>) is not part of this initialization process, they’re already set at this point via config file parameters. If the M3UA PE runs in server mode an `ASP_SCTP_Listen` message will be sent out to the SUT, otherwise the association will be built (an `ASP_SCTP_ConnectFrom` message will be sent) and a timer (`T_Assoc_restart`) will be started to detect, if the M3UA PE hasn’t received the appropriate `ASP_SCTP_RESULT` message in response to the `ASP_SCTP_ConnectFrom` message. If this timer expires the M3UA PE will try to reassociate.
+
+For transferring M3UA messages as the payload of SCTP packets, the payload type must be adjusted to `_3 (= M3UA)_`. The `tsp_SCTP_PayloadProtocolID` module parameter represents this value. If this payload protocol identifier is set to `_3 (= M3UA)_`, some M3UA specific timers are started.
+
+* `T_ASPUP_resend` is started in client mode only. If we don’t receive a `PDU_M3UA_ASPUP_Ack` message in response to our PDU_M3UA_ASPUP message we need to resend it.
+* `T_ASPAC_resend` is started in client mode only. If we don’t receive a `PDU_M3UA_ASPAC_Ack` message in response to our PDU_M3UA_ASPAC message we need to resend it.
+* `T_Heartbeat` is started only if the `tsp_Enable_M3UA_Heartbeat` module parameter is set. If this timer expires, a `PDU_M3UA_Heartbeat` message is sent through the SCTP association to the M3UA peer at the SGP. This message will inform the M3UA peer, that we’re still alive at the M3UA level (SCTP has its own heartbeat mechanism implemented in the kernel).
+
+The M3UA PE transfers non-M3UA protocols (for example, if the `tsp_SCTP_PayloadProtocolID` is `_0 (= unspecified)_`) transparently via SCTP.
+
+=== The Dynamic Part
+
+The dynamic part is implemented in the `f_M3UA_ScanEvents`() function. It’s a simple infinite loop (an alt statement with repeat statements for each alternative), which sends and receives messages.
+
+See M3UA message handling in the table below:
+
+[width="100%",cols="17%,27%,28%,28%",options="header",]
+|======================================================================================================================================================
+|*Message type* |*Message name* |*Client mode* |*Server mode*
+|Transfer |`M3UA_DATA` |Can be sent or received. |Can be sent or received.
+.6+^.^|SSNM |`M3UA_DUNA` |Not implemented. |Not implemented.
+|`M3UA_DAVA` |Sent in response of a `M3UA_DAUD` message. |Sent in response of a `M3UA_DAUD` message.
+|`M3UA_DAUD` |Can be sent or received. A `M3UA_DAVA` is sent back in response. |Can be sent or received. A `M3UA_DAVA` is sent back in response.
+|`M3UA_SCON` |Not implemented. |Not implemented.
+|`M3UA_DUPU` |Not implemented. |Not implemented.
+|`M3UA_DRST` |Not implemented. |Not implemented.
+.6+^.^|ASPSM |`M3UA_ASPUP` |Sent by the client. |Received from the client. A `M3UA_ASPUP_Ack` is sent to the client.
+|`M3UA_ASPUP_Ack` |Received from the server in response of a `M3UA_ASPUP` message. |Sent to the client in response of a `M3UA_ASPUP` message.
+|`M3UA_ASPDN` |Can be sent or received. A `M3UA_ASPDN_Ack` is sent back in response. |Can be sent or received. A `M3UA_ASPDN_Ack` is sent back in response.
+|`M3UA_ASPDN_Ack` |Not implemented. |Not implemented.
+|`M3UA_BEAT` |Can be sent or received. An `M3UA_BEAT_Ack` is sent back in response. |Can be sent or received. An `M3UA_BEAT_Ack` is sent back in response.
+|`M3UA_BEAT_Ack` |Sent in response of a `M3UA_BEAT` message. |Sent in response of a `M3UA_BEAT` message.
+.4+^.^|RKM |`M3UA_REG_REQ` |Not implemented. |Not implemented.
+|`M3UA_REG_RSP` |Not implemented. |Not implemented.
+|`M3UA_DEREG_REQ` |Not implemented. |Not implemented.
+|`M3UA_DEREG_RSP` |Not implemented. |Not implemented.
+.4+^.^|ASPTM |`M3UA_ASPAC` |Sent by the client. |Received from the client. A `M3UA_ASPAC_Ack` is sent to the client.
+|`M3UA_ASPAC_Ack` |Received from the server in response of a `M3UA_ASPAC` message. |Sent to the client in response of a `M3UA_ASPAC` message.
+|`M3UA_ASPIA` |Can be sent or received. A `M3UA_ASPIA_Ack` is sent back in response. |Can be sent or received. A `M3UA_ASPIA_Ack` is sent back in response.
+|`M3UA_ASPIA_Ack` |Not implemented. |Not implemented.
+.2+^.^|MGMT |`M3UA_ERR` |Not implemented. |Not implemented.
+|`M3UA_NOTIFY` |Not implemented. |Not implemented.
+|======================================================================================================================================================
+
+
+
+The M3UA PE connected to the MTP3 user via the `MTP3_SP_PORT` port. From the MTP3 user only `ASP_MTP3_TRANSFERreq` messages can be received. If the SCTP association and the M3UA connection between the SUT and the M3UA PE is not already up (the state is not `aSP_Active`), these messages will be buffered. After the association becomes ready (the state changes to `aSP_Active`) these messages will be sent out. The `MTP3_SP_PORT` is used for receiving `ASP_MTP3_TRANSFERreq` messages from the MTP3 user, and for sending `ASP_MTP3_TRANSFERind` messages to the MTP3 user. Sending `ASP_MTP3_PAUSE`, `ASP_MTP3_RESUME`, `ASP_MTP3_STATUS` messages is not yet supported.
+
+The communication with the SUT is done via the configured SCTP association. The M3UA peer from the SGP sends the M3UA PE M3UA messages embedded in SCTP packets. These packets are received on the `SCTP_PORT`.
+
+If the SCTP protocol identifier is set to `_3 (= M3UA)_`, M3UA PE emulates M3UA protocol and maintains static SCTP connectivity with the SUT. M3UA PE implements transfer messaging for MTP3 primitives as well as various management procedures (for example, ASPSM, ASPTM, MGMT). Non-M3UA protocols are transferred transparently via SCTP. The SCTP protocol identifier is used to choose between M3UA and non-M3UA protocols.
+
+Depending on the actual mode (client or server), different kinds of M3UA messages can be received and sent. For example, the M3UA PE can’t receive `M3UA_ASPUP` messages if it is in client mode, and the M3UA PE can’t receive `M3UA_ASPUP_Ack` messages if it is in server mode. The table above shows, how M3UA messages are handled in both modes. "Not implemented" means, that the given message is just logged, M3UA PE doesn’t process it.
+
+== Logging
+
+The type of information will be logged can be categorized into the following groups. In most cases the `tsp_logVerbose` module parameter must be set (see <<_3, [3]>>) to make the log messages appear in the log files.
+
+* Log messages from the SCTP test port.
+* Changes in the state of the SCTP association.
+* The type of the message received, and the type of the message sent back in response if any.
+* If a message of a given type was received in an inappropriate state of the SCTP association, or in an inappropriate mode (client or server).
+
+== Limitations
+
+* Only a single SCTP association is supported between two endpoints. For example we can connect an IP1 and PORT1 pair to an IP2 and PORT2 pair.
+* Sending `ASP_MTP3_PAUSE`, `ASP_MTP3_RESUME`, `ASP_MTP3_STATUS` messages is not supported.
+* Multi-homing is not supported.
+
+= Terminology
+
+*Protocol Emulation*: +
+An instance which implements messages and dynamic behavior of a given protocol layer.
+
+= Abbreviations
+
+ASP:: Abstract Service Primitive
+
+M3UA:: MTP3 User Adaptation
+
+M3UA:: PE M3UA Protocol Emulation
+
+MTP3:: Message Transfer Part Level 3
+
+PE:: Protocol Emulation
+
+SCTP:: Stream Control Transmission Protocol
+
+SEP:: SS7 Signalling End Point
+
+SGP:: Signalling Gateway Process
+
+SS7:: Signalling System 7
+
+SUT:: System Under Test
+
+TTCN-3:: Testing and Test Control Notation Version 3
+
+= References
+
+[[_1]]
+[1] Programmer’s Technical Reference for the TITAN TTCN-3 Test Executor
+
+[[_2]]
+[2] ETSI ES 201 873-1 V3.2.1The Testing and Test Control Notation version 3. Part 1: Core Language
+
+[[_3]]
+[3] M3UA Protocol Emulation for TTCN-3 Toolset, User Guide
+
+[[_4]]
+[4] IETF https://tools.ietf.org/html/rfc3332[RFC 3332] +
+Signaling System 7 (SS7) Message Transfer Part 3 (MTP3) – User Adaptation Layer (M3UA)
diff --git a/doc/FS/M3UA Protocol Emulation for TTCN-3 Toolset with TITAN, FS.pdf b/doc/FS/M3UA Protocol Emulation for TTCN-3 Toolset with TITAN, FS.pdf
new file mode 100644
index 0000000..da5f3a3
--- /dev/null
+++ b/doc/FS/M3UA Protocol Emulation for TTCN-3 Toolset with TITAN, FS.pdf
Binary files differ
diff --git a/doc/FS/images/SCTP association and M3UA connection.png b/doc/FS/images/SCTP association and M3UA connection.png
new file mode 100644
index 0000000..b144f4f
--- /dev/null
+++ b/doc/FS/images/SCTP association and M3UA connection.png
Binary files differ
diff --git a/doc/FS/images/The place of M3UA PE.png b/doc/FS/images/The place of M3UA PE.png
new file mode 100644
index 0000000..7137561
--- /dev/null
+++ b/doc/FS/images/The place of M3UA PE.png
Binary files differ
diff --git a/doc/M3UA_emulation_FS.pdf b/doc/M3UA_emulation_FS.pdf
deleted file mode 100644
index 756b626..0000000
--- a/doc/M3UA_emulation_FS.pdf
+++ /dev/null
Binary files differ
diff --git a/doc/M3UA_emulation_UG.pdf b/doc/M3UA_emulation_UG.pdf
deleted file mode 100644
index b24bff6..0000000
--- a/doc/M3UA_emulation_UG.pdf
+++ /dev/null
Binary files differ
diff --git a/doc/UG/M3UA Protocol Emulation for TTCN-3 Toolset with TITAN, UG.adoc b/doc/UG/M3UA Protocol Emulation for TTCN-3 Toolset with TITAN, UG.adoc
new file mode 100644
index 0000000..18b2a99
--- /dev/null
+++ b/doc/UG/M3UA Protocol Emulation for TTCN-3 Toolset with TITAN, UG.adoc
@@ -0,0 +1,305 @@
+---
+Author: Ferenc Kovács
+Version: 198 17-CNL 113 537, Rev. A
+Date: 2008-01-14
+
+---
+= M3UA Protocol Emulation for TTCN-3 Toolset with TITAN, Function Specification
+:author: Ferenc Kovács
+:revnumber: 198 17-CNL 113 537, Rev. A
+:revdate: 2008-01-14
+:toc:
+
+== About This Document
+
+=== How to Read This Document
+
+This is the User Guide for the M3UA Protocol Emulation (M3UA PE). The M3UA PE is developed for the TTCN-3 Toolset with TITAN according to the Requirement Specification <<_5, [5]>>. This document should be read together with Function Specification <<_6, [6]>>.
+
+=== Presumed Knowledge
+
+The knowledge of the TITAN TTCN-3 Test Executor <<_2, [2]>> and the TTCN-3 language <<_1, [1]>> is essential.
+
+== System Requirements
+
+In order to operate the M3UA PE the following system requirements must be satisfied:
+
+* Any kind of Linux distribution with SCTP enabled kernel (our test system was Gentoo (Base System version 1.12.1) with version 2.6.21 SMP kernel).
+* LKSCTP <<_9, [9]>> library installed (we used version 2.6.16-1.0.6) for the SCTP test port to operate.
+
+= The Protocol Emulation
+
+== Overview
+
+The M3UA PE is developed for testing implementations of M3UA users using TTCN-3. It is assumed that the M3UA layer of the peer conforms to the same specifications as M3UA PE does.
+
+The M3UA PE is similar to the M3UA SCTP Daemon (see <<_7, [7]>>). The most important difference is that, M3UA PE is not a standalone program, it runs until the test case finishes. It handles only one SCTP association instead of many in contrast to the M3UA SCTP Daemon. We store the endpoints (local IP address/port and the remote IP address/port) of this single SCTP association.
+
+The M3UA PE communicates with the M3UA user with MTP3 ASPs. The M3UA PE receives `ASP_MTP3_TRANSFERreq` messages from the M3UA users and transfers them via SCTP to the SUT. The M3UA users receive `ASP_MTP3_TRANSFERind` messages from the emulation, which messages originate from the SUT.
+
+See the service primitives in M3UA PE below:
+
+image:images/Service primitives_M3UA PE.png[alt]
+
+
+== Installation
+
+Since M3UA PE is used as a part of the TTCN-3 test environment this requires TTCN-3 Test Executor to be installed before any operation of the M3UA PE. For more details on the installation of TTCN-3 Test Executor (see <<_4, [4]>>). An implementation of the SCTP test port is also needed for execution.
+
+=== Description of Files Implementing the M3UA PE
+
+The M3UA PE is implemented in the __M3UA_Emulation.ttcn__ file.
+
+To build an executable test suite with TITAN <<_2, [2]>> that is using M3UA PE the following files from other products shall be added to the related project.
+
+* __M3UA_Emulation.ttcn__ (This product)
+* __General_Types.ttcn__ (CNL 113 368)
+* __MTP3asp_EncDec.cc__ (CNL 113 337)
+* __MTP3asp_Types.cc__ (CNL 113 337)
+* __M3UA_Types.ttcn__ (CNL 113 536)SCTPasp_PT.cc (CNL 113 469)
+* __SCTPasp_PT.hh__ (CNL 113 469)
+* __SCTPasp_Types.ttcn__ (CNL 113 469)
+* __SCTPasp_PortType.ttcn__ (CNL 113 469)
+
+Their functionality is the following:
+
+* __General_Types.ttcn__ +
+General type definitions.
+
+* __MTP3asp_EncDec.cc__ +
+__MTP3asp_Types.ttcn__ contains two external function declarations. The implementation for these functions (`enc_MTP3_to_M3UAserver_msg`() and `dec_MTP3_to_M3UAserver_msg`()) are placed in this file. This is only needed to prevent linking errors. The functions themselves are not used.
+
+* __MTP3asp_Types.ttcn__ +
+This file contains MTP3 ASP definitions and templates we use (for example, `ASP_MTP3_TRANSFERind`, `ASP_MTP3_TRANSFERreq`, `ASP_MTP3_PAUSE`, `ASP_MTP3_RESUME`, `ASP_MTP3_STATUS`).
+
+* __M3UA_Emulation.ttcn__ +
+This file contains the dynamical part.
+
+* __M3UA_Types.ttcn__ +
+M3UA protocol module. This file contains M3UA type definitions for all M3UA message types and the appropriate encoding (RAW) and decoding (RAW) functions.
+
+* `SCTPasp` +
+The files of the SCTP test port.
+
+[[configuration]]
+== Configuration
+
+The M3UA PE uses module parameters for runtime configuration that can be set in the `[MODULE_PARAMETERS]` section of a TITAN RTE configuration file. There are a few user configurable module parameters, and a few timer settings that are not advised to be altered by the user.
+
+A list of configurable parameters is provided below.
+
+* `tsp_SCTP_Server_Mode` (optional): +
+If this parameter is `_true_` then the M3UA PE doesn’t initiate SCTP associations, but waits for the communication ups from the remote address.
+* `tsp_logVerbose` (optional): +
+This parameter allows the output of textual debug information of TTCN-3 "log" statements on the console or in log file (depending on the setting of `consoleMask` and `fileMask` parameters).
++
+NOTE: Error messages for serious errors are not affected by the `tsp_logVerbose` parameter.
++
+The default value of `tsp_logVerbose` is `_false_`.
+
+* `tsp_Timer` (optional): +
+This parameter is used only in client mode. The client will wait for an `ASP_SCTP_RESULT` message from the server for 60 seconds in response of the client’s `ASP_SCTP_ConnectFrom` message.
++
+Default value is `_60_` seconds.
+
+* `tsp_Enable_M3UA_Heartbeat` (optional): +
+This parameter enables the sending of M3UA heartbeats periodically (setting it to `_true_`).
++
+Default value is `_false_`.
+
+* `tsp_Heartbeat_Timer` (optional): +
+The value of this parameter determines the period for sending M3UA heartbeats, if enabled by `tsp_Enable_M3UA_Heartbeat` parameter.
++
+Default value is `_30_` seconds.
+
+* `tsp_ASPUP_Resend_Timer` (optional): +
+If we didn’t receive any response to our `M3UA_ASPUP` message (i.e. an `M3UA_ASPUP_Ack` message), it must be resent. Used only if `tsp_M3UA_Server_Mode` is `_false_`.
++
+Default value is `_2_` seconds.
+
+* `tsp_ASPAC_Resend_Timer` (optional): +
+If we didn’t receive any response to our `M3UA_ASPAC` message (i.e. an `M3UA_ASPAC_Ack` message), it must be resent. Used only if `tsp_M3UA_Server_Mode` is `_false_`.
++
+Default value is `_2_` seconds.
+
+* `tsp_Assoc_Restart_Timer` (optional): +
+The value of this parameter determines the period for checking if the SCTP connection is lost. If so, then the M3UA PE tries to re-establish the SCTP connection at this period. Used only if `tsp_SCTP_Server_Mode` is `_false_`.
+
+== Starting the Emulation
+
+`f_M3UA_Emulation`() function is the main function of the M3UA PE, which should be called by the user to start M3UA PE, and to set the endpoints of the SCTP association. The parameter of this function is an `SCTP_Association_Address` structure, which looks like the following.
+
+[source]
+----
+type record SCTP_Association_Address
+{
+  integer local_sctp_port;
+  charstring local_ip_address;
+  integer remote_sctp_port;
+  charstring remote_sctp_address;
+}
+----
+
+When the user wants to start the emulation in a test case, such a structure must be filled and passed to the `f_M3UA_Emulation`()function. The SCTP test port will build the association using this data.
+
+== Logging
+
+The logging mechanism logs information either to the log file or the output console. The amount and type of logging can be set in the RTE configuration file. This setting is on two levels. The TITAN parameters `ConsoleMask` and `FileMask` control the overall logging. These logging options are described in Section 7.2 of TITAN’s Programmer’s Technical Reference (see <<_3, [3]>>). The logging options specific to the M3UA PE are controlled by the M3UA PE parameter `tsp_logVerbose` (see <<configuration, Configuration>>). If `tsp_logVerbose` is selected most events are logged textually in addition to the possible logging of the sent/received messages. Since there is an MTC and there can be any number of PTCs within the M3UA PE, there are log files for the MTC itself, and for all PTCs. These files include logging from the M3UA PE and the SCTP test port.
+
+== Limitations
+
+* Only a single SCTP association is supported between two endpoints. For example we can connect an IP1 and PORT1 pair to an IP2 and PORT2 pair.
+* Sending `ASP_MTP3_PAUSE`, `ASP_MTP3_RESUME`, `ASP_MTP3_STATUS` messages is not supported.
+* Multi-homing is not supported.
+
+= Examples
+
+== Configuration File
+
+This is a simple example configuration file for testing. The relevant information can be found under the sections `TESTPORT_PARAMETERS` and `MODULE_PARAMETERS`.
+
+[source]
+----
+[LOGGING]
+LogSourceInfo := Yes
+FileMask := LOG_ALL | TTCN_DEBUG | TTCN_MATCHING
+ConsoleMask := LOG_ALL | TTCN_DEBUG | TTCN_MATCHING
+
+[EXECUTE]
+M3UA_Emulation_Test.tc_M3UA_demo_bicc
+
+[TESTPORT_PARAMETERS]
+system.SCTP_PORT.debug := "yes"
+
+[MODULE_PARAMETERS]
+M3UA_Emulation.tsp_logVerbose := true;
+M3UA_Emulation.tsp_M3UA_Server_Mode := false;
+M3UA_Emulation_Test.tsp_address :=
+{
+  local_sctp_port   := 2905,
+  local_ip_addr  := "10.6.70.19",
+  remote_sctp_port  := 2905,
+  remote_ip_addr := "159.107.193.33"
+}
+----
+
+== Test Suite
+
+This is an example how to build up the protocol stack in case of BICC test. The test function on BICC level should be started after `f_testconfig_bicc`() was called.
+
+[source]
+----
+type component BICC_CT
+{
+  port MTP3asp_PT BICC_MTP3_PORT;
+}
+
+type component MTC_CT
+{
+  var  BICC_CT vlc_BICC_COMPONENT_1;
+  var  M3UA_CT vlc_M3UA_COMPONENT_1;
+  port SCTPasp_PT SCTP_PORT;
+}
+
+function f_testconfig_bicc(SCTP_Association_Address pl_address) runs on MTC_CT
+{
+  vlc_BICC_COMPONENT_1 := BICC_CT.create;
+  vlc_M3UA_COMPONENT_1 := M3UA_CT.create;
+  connect(vlc_BICC_COMPONENT_1:BICC_MTP3_PORT,
+          vlc_M3UA_COMPONENT_1:MTP3_SP_PORT);
+  map(system:SCTP_PORT, vlc_M3UA_COMPONENT_1:SCTP_PORT);
+  vlc_M3UA_COMPONENT_1.start(f_M3UA_Emulation(pl_address));
+}
+
+function f_testconfig_end_bicc() runs on MTC_CT
+{
+  unmap(system:SCTP_PORT,
+        vlc_M3UA_COMPONENT_1:SCTP_PORT);
+  disconnect(vlc_BICC_COMPONENT_1:BICC_MTP3_PORT,
+             vlc_M3UA_COMPONENT_1:MTP3_SP_PORT);
+  vlc_M3UA_COMPONENT_1.stop;
+}
+
+testcase tc_M3UA_demo_bicc() runs on MTC_CT
+{
+  f_testconfig_bicc(tsp_address);
+  vlc_BICC_COMPONENT_1.start(f_BICC());
+  vlc_BICC_COMPONENT_1.done;
+  f_testconfig_end_bicc();
+}
+
+----
+
+= Terminology
+
+* *M3UA Protocol Emulation:* +
+Implementation of M3UA as specified in <<_6, [6]>>.
+
+* *M3UA User: Protocol:* +
+Uses services of M3UA.
+
+* *SCTP Client Mode:* +
+The M3UA PE establishes the SCTP associations. The associations established from network are ignored.
+
+* *SCTP Server Mode:* +
+The M3UA PE doesn’t establish any SCTP associations. The associations are established from the network.
+
+* *M3UA Client Mode:* +
+The M3UA PE activates the M3UA ASPs.
+
+* *M3UA Server Mode:* +
+The M3UA PE does not activate the M3UA ASPs. The M3UA is activated from the network.
+
+= Abbreviations
+
+ASP:: Abstract Service Primitive
+
+LKSCTP:: Linux Kernel Stream Control Transmission Protocol
+
+M3UA:: MTP3 User Adaptation
+
+M3UA PE:: M3UA Protocol Emulation
+
+MTP3:: Message Transfer Part Level 3
+
+PE:: Protocol Emulation
+
+SCTP:: Stream Control Transmission Protocol
+
+SS7:: Signalling System 7
+
+TTCN-3:: Testing and Test Control Notation Version 3
+
+= References
+
+[[_1]]
+[1] ETSI ES 201 873-1 V3.2.1 +
+The Testing and Test Control Notation version 3. Part 1: Core Language
+
+[[_2]]
+[2] User Guide for TITAN TTCN-3 Test Executor
+
+[[_3]]
+[3] Programmer’s Technical Reference for TITAN TTCN-3 Test Executor
+
+[[_4]]
+[4] Installation Guide for TITAN TTCN-3 Test Executor
+
+[[_5]]
+[5] TTCNv3 Requirement Specification for MSC R13
+
+[[_6]]
+[6] M3UA Protocol Emulation for TTCN-3 Toolset, Function Specification
+
+[[_7]]
+[7] http://www.rfc-editor.org/rfc/rfc2960.txt[RFC 2960] +
+Stream Control Transmission Protocol (SCTP)
+
+[[_8]]
+[8] http://www.ietf.org/rfc/rfc3332.txt[RFC 3332] +
+SS7 MTP3 User Adaptation Layer
+
+[[_9]]
+[9] LKSCTP – An implementation of the SCTP in the Linux kernel +
+http://lksctp.sourceforge.net
+
diff --git a/doc/UG/M3UA Protocol Emulation for TTCN-3 Toolset with TITAN, UG.pdf b/doc/UG/M3UA Protocol Emulation for TTCN-3 Toolset with TITAN, UG.pdf
new file mode 100644
index 0000000..492ba67
--- /dev/null
+++ b/doc/UG/M3UA Protocol Emulation for TTCN-3 Toolset with TITAN, UG.pdf
Binary files differ
diff --git a/doc/UG/images/Service primitives_M3UA PE.png b/doc/UG/images/Service primitives_M3UA PE.png
new file mode 100644
index 0000000..59831b7
--- /dev/null
+++ b/doc/UG/images/Service primitives_M3UA PE.png
Binary files differ
diff --git a/doc/change.log b/doc/change.log
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/doc/change.log