BSSMAP_Emulation: use BSSAP_CodecPort

So far, BSSMAP_Emulation used the SCCPasp_SP_PORT directly, explicitly
calling BSSAP encode/decode functions while processing the primitives.

Let's clean this up and use the BSSAP_CodecPort which has meanwhile
been developed as a dual-faced port that can be stacked between SCCPasp
and the user to avoid any manual encode/decode function calls.

Change-Id: Icded789d18f3469f74e16f552df2c7ac44ac4294
diff --git a/bsc-nat/BSC_MS_ConnectionHandler.ttcn b/bsc-nat/BSC_MS_ConnectionHandler.ttcn
index a385525..876d2ec 100644
--- a/bsc-nat/BSC_MS_ConnectionHandler.ttcn
+++ b/bsc-nat/BSC_MS_ConnectionHandler.ttcn
@@ -4,6 +4,7 @@
 import from Osmocom_Types all;
 import from SCCPasp_Types all;
 import from BSSAP_Types all;
+import from BSSAP_CodecPort all;
 import from BSSMAP_Emulation all;
 import from BSSMAP_Templates all;
 
@@ -28,7 +29,7 @@
 
 /* Callback function from general BSSMAP_Emulation whenever a new incoming
  * SCCP connection arrivces. Must create + start a new component */
-private function CreateCallback(ASP_SCCP_N_CONNECT_ind conn_ind, charstring id)
+private function CreateCallback(BSSAP_N_CONNECT_ind conn_ind, charstring id)
 runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr {
 	log("Incoming SCCP Connection on BSC ?!?");
 	self.stop;
diff --git a/bsc-nat/BSC_MS_Simulation.ttcn b/bsc-nat/BSC_MS_Simulation.ttcn
index eab7fe9..b9414a3 100644
--- a/bsc-nat/BSC_MS_Simulation.ttcn
+++ b/bsc-nat/BSC_MS_Simulation.ttcn
@@ -8,6 +8,7 @@
 import from SCCPasp_Types all;
 import from SCCP_Emulation all;
 
+import from BSSAP_CodecPort all;
 import from BSSMAP_Emulation all;
 
 import from BSC_MS_ConnectionHandler all;
@@ -53,7 +54,7 @@
 	connect(vc_IPA:MTP3_SP_PORT, vc_SCCP:MTP3_SCCP_PORT);
 
 	/* connect BSSMAP dispatcher to upper side of SCCP */
-	connect(vc_BSSMAP:SCCP, vc_SCCP:SCCP_SP_PORT);
+	connect(vc_BSSMAP:BSSAP, vc_SCCP:SCCP_SP_PORT);
 
 	/* connect BSSMAP dispatcher to IPA_Emulation MGCP */
 	connect(vc_BSSMAP:MGCP, vc_IPA:IPA_MGCP_PORT);
diff --git a/bsc-nat/MSC_ConnectionHandler.ttcn b/bsc-nat/MSC_ConnectionHandler.ttcn
index 3fc11e9..b038ce5 100644
--- a/bsc-nat/MSC_ConnectionHandler.ttcn
+++ b/bsc-nat/MSC_ConnectionHandler.ttcn
@@ -4,6 +4,7 @@
 import from Osmocom_Types all;
 import from SCCPasp_Types all;
 import from BSSAP_Types all;
+import from BSSAP_CodecPort all;
 import from BSSMAP_Emulation all;
 import from BSSMAP_Templates all;
 
@@ -26,7 +27,7 @@
 
 /* Callback function from general BSSMAP_Emulation whenever a new incoming
  * SCCP connection arrivces. Must create + start a new component */
-private function CreateCallback(ASP_SCCP_N_CONNECT_ind conn_ind, charstring id)
+private function CreateCallback(BSSAP_N_CONNECT_ind conn_ind, charstring id)
 runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr {
 	var MSC_ConnHdlr vc_conn;
 	/* Create a new BSSAP_ConnHdlr component */
diff --git a/bsc-nat/MSC_Simulation.ttcn b/bsc-nat/MSC_Simulation.ttcn
index f9fb0d4..7e39ca1 100755
--- a/bsc-nat/MSC_Simulation.ttcn
+++ b/bsc-nat/MSC_Simulation.ttcn
@@ -51,7 +51,7 @@
 	connect(vc_IPA:MTP3_SP_PORT, vc_SCCP:MTP3_SCCP_PORT);
 
 	/* connect BSSNAP dispatcher to upper side of SCCP */
-	connect(vc_BSSMAP:SCCP, vc_SCCP:SCCP_SP_PORT);
+	connect(vc_BSSMAP:BSSAP, vc_SCCP:SCCP_SP_PORT);
 
 	if (mp_mgcp_uses_udp == false) {
 		/* connect BSSMAP dispatcher to IPA_Emulation MGCP */
diff --git a/bsc-nat/gen_links.sh b/bsc-nat/gen_links.sh
index 9846d9a..9a45c89 100755
--- a/bsc-nat/gen_links.sh
+++ b/bsc-nat/gen_links.sh
@@ -55,5 +55,5 @@
 gen_links $DIR $FILES
 
 DIR=../library
-FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc RSL_Types.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn"
+FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc RSL_Types.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn BSSAP_CodecPort.ttcn"
 gen_links $DIR $FILES