summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-04-23 17:41:46 +0200
committerHarald Welte <laforge@gnumonks.org>2019-04-25 20:07:11 +0000
commit3e16b4d2f3892674435ede15d57404432419d7db (patch)
tree1c3539d039df25b79e726341f38b57a4e444cd9c
parent3ca0ce13b253fdc3bb9b52f1f0d19f829c68100f (diff)
RAN_Adapter: Support build without IPA / BSSAP support
-rw-r--r--library/RAN_Adapter.ttcnpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/library/RAN_Adapter.ttcnpp b/library/RAN_Adapter.ttcnpp
index a96c6ef2..ae7934e6 100644
--- a/library/RAN_Adapter.ttcnpp
+++ b/library/RAN_Adapter.ttcnpp
@@ -22,7 +22,9 @@ import from SCCP_Templates all;
import from SCTPasp_Types all;
import from SCTPasp_PortType all;
+#ifdef RAN_EMULATION_BSSAP
import from BSSMAP_Templates all;
+#endif
import from RAN_Emulation all;
type record RAN_Adapter {
@@ -96,6 +98,7 @@ function f_ran_adapter_init(inout RAN_Adapter ba, in RAN_Configuration cfg, char
connect(ba.vc_M3UA:MTP3_SP_PORT, ba.vc_SCCP:MTP3_SCCP_PORT);
ba.vc_M3UA.start(f_M3UA_Emulation(cfg.sctp_addr, cfg.rctx));
}
+#ifdef IPA_EMULATION_SCCP
case (BSSAP_TRANSPORT_SCCPlite_SERVER) {
ba.vc_IPA := IPA_Emulation_CT.create(id & "-IPA");
map(ba.vc_IPA:IPA_PORT, system:IPA_CODEC_PT);
@@ -129,7 +132,8 @@ function f_ran_adapter_init(inout RAN_Adapter ba, in RAN_Configuration cfg, char
ba.vc_WAIT.done;
disconnect(ba.vc_IPA:IPA_SP_PORT, ba.vc_WAIT:IPA_SP_PORT);
}
-#endif
+#endif /* SCCP */
+#endif /* BSSAP */
case else {
setverdict(fail, "Unsuppored RAN_Transport");
mtc.stop;
@@ -147,8 +151,10 @@ function f_ran_adapter_init(inout RAN_Adapter ba, in RAN_Configuration cfg, char
#endif
if (cfg.transport == BSSAP_TRANSPORT_SCCPlite_SERVER or
cfg.transport == BSSAP_TRANSPORT_SCCPlite_CLIENT) {
+#ifdef IPA_EMULATION_MGCP
/* connect IPA MGCP port with BSSMAP MGCP port */
connect(ba.vc_IPA:IPA_MGCP_PORT, ba.vc_RAN:MGCP);
+#endif
}
/* start the BSSMAP emulation */
ba.vc_RAN.start(RAN_Emulation.main(valueof(ops), ""));