aboutsummaryrefslogtreecommitdiffstats
path: root/bsc-nat
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-04-15 11:48:05 +0200
committerHarald Welte <laforge@gnumonks.org>2019-04-25 20:07:11 +0000
commit2fce7887f480614491c9e983555c67921ea29d81 (patch)
treefab79ac61c966a1fa0e77b526e6fa8cbdf3c0362 /bsc-nat
parent8a397ae7ba029418c670348375a5795e38d93923 (diff)
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
Diffstat (limited to 'bsc-nat')
-rw-r--r--bsc-nat/BSC_MS_ConnectionHandler.ttcn1
-rw-r--r--bsc-nat/MSC_ConnectionHandler.ttcn1
-rwxr-xr-xbsc-nat/gen_links.sh2
-rwxr-xr-xbsc-nat/regen_makefile.sh2
4 files changed, 4 insertions, 2 deletions
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