From 2fce7887f480614491c9e983555c67921ea29d81 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 15 Apr 2019 11:48:05 +0200 Subject: RAN_Emulation: Modularize protocol support The RAN_Emulation currently unconditionally provides BSSAP and MGCP support. Let's re-structure the code so that support for those protocols is now possible to enable/disable at compile time. This patch is in preparation of introducing RANAP support in RAN_Emulation. Change-Id: Id53ba3ff05f9946230e0e4a759245de14a0f9fbd Related: OS#2856 --- bsc-nat/BSC_MS_ConnectionHandler.ttcn | 1 + bsc-nat/MSC_ConnectionHandler.ttcn | 1 + bsc-nat/gen_links.sh | 2 +- bsc-nat/regen_makefile.sh | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) (limited to 'bsc-nat') diff --git a/bsc-nat/BSC_MS_ConnectionHandler.ttcn b/bsc-nat/BSC_MS_ConnectionHandler.ttcn index 63d0451c..e52b678f 100644 --- a/bsc-nat/BSC_MS_ConnectionHandler.ttcn +++ b/bsc-nat/BSC_MS_ConnectionHandler.ttcn @@ -53,6 +53,7 @@ const RanOps BSC_MS_RanOps := { unitdata_cb := refers(UnitdataCallback), decode_dtap := false, role_ms := true, + protocol := RAN_PROTOCOL_BSSAP, sccp_addr_local := omit, sccp_addr_peer := omit } diff --git a/bsc-nat/MSC_ConnectionHandler.ttcn b/bsc-nat/MSC_ConnectionHandler.ttcn index 383b67b1..8635a296 100644 --- a/bsc-nat/MSC_ConnectionHandler.ttcn +++ b/bsc-nat/MSC_ConnectionHandler.ttcn @@ -59,6 +59,7 @@ const RanOps MSC_RanOps := { unitdata_cb := refers(UnitdataCallback), decode_dtap := false, role_ms := false, + protocol := RAN_PROTOCOL_BSSAP, sccp_addr_local := omit, sccp_addr_peer := omit } diff --git a/bsc-nat/gen_links.sh b/bsc-nat/gen_links.sh index e54eec48..16e32b78 100755 --- a/bsc-nat/gen_links.sh +++ b/bsc-nat/gen_links.sh @@ -47,7 +47,7 @@ FILES="RTP_EncDec.cc RTP_Types.ttcn" gen_links $DIR $FILES DIR=../library -FILES="Misc_Helpers.ttcn 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.ttcnpp L3_Templates.ttcn BSSMAP_Templates.ttcn RAN_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn BSSAP_CodecPort.ttcn" +FILES="Misc_Helpers.ttcn 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.ttcnpp L3_Templates.ttcn BSSMAP_Templates.ttcn RAN_Emulation.ttcnpp MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn BSSAP_CodecPort.ttcn" gen_links $DIR $FILES ignore_pp_results diff --git a/bsc-nat/regen_makefile.sh b/bsc-nat/regen_makefile.sh index c5fe64c4..f49df7e2 100755 --- a/bsc-nat/regen_makefile.sh +++ b/bsc-nat/regen_makefile.sh @@ -4,6 +4,6 @@ MAIN=BSCNAT_Tests.ttcn FILES="*.ttcn *.ttcnpp SCCP_EncDec.cc IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc RTP_EncDec.cc SDP_EncDec.cc *.c MGCP_CodecPort_CtrlFunctDef.cc" -export CPPFLAGS_TTCN3="-DIPA_EMULATION_SCCP -DIPA_EMULATION_MGCP -DUSE_MTP3_DISTRIBUTOR" +export CPPFLAGS_TTCN3="-DIPA_EMULATION_SCCP -DIPA_EMULATION_MGCP -DRAN_EMULATION_BSSAP -DRAN_EMULATION_MGCP -DUSE_MTP3_DISTRIBUTOR" ../regen-makefile.sh $MAIN $FILES -- cgit v1.2.3