summaryrefslogtreecommitdiffstats
path: root/sgsn
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2018-07-31 00:30:11 +0200
committerlynxis lazus <lynxis@fe80.eu>2018-08-13 16:23:50 +0000
commit2c12b24a47dbabd6269b6dd4ffde066fcca6c2ed (patch)
tree7d65e5686cb803fe5867bdf7d5a0d5c799129d4d /sgsn
parentf4ac4cea516f22f9a229b3ba109bdfebf5019e7c (diff)
NS_Emulation: support multiple instances at the same time
The NS_Emulation has configuration values hardcoded or bound to module parameters which prevents multiple instances. Replace the module parameter based configuration with configuration given when starting the NS_Emaulation. Change-Id: I9128f9ad5c372779c38799269393137ba52576cd
Diffstat (limited to 'sgsn')
-rw-r--r--sgsn/SGSN_Tests.default12
-rw-r--r--sgsn/SGSN_Tests.ttcn11
2 files changed, 16 insertions, 7 deletions
diff --git a/sgsn/SGSN_Tests.default b/sgsn/SGSN_Tests.default
index 3957e82..82682e2 100644
--- a/sgsn/SGSN_Tests.default
+++ b/sgsn/SGSN_Tests.default
@@ -20,12 +20,12 @@ FileMask := LOG_ALL | TTCN_MATCHING;
[MODULE_PARAMETERS]
-#NS_Emulation.mp_local_ip := "192.168.100.239"
-NS_Emulation.mp_local_udp_port := 21000
-#NS_Emulation.mp_remote_ip := "192.168.100.196"
-NS_Emulation.mp_remote_udp_port := 23000
-NS_Emulation.mp_nsvci := 97
-NS_Emulation.mp_nsei := 96
+SGSN_Tests.mp_nsconfig := {
+ local_udp_port := 21000,
+ remote_udp_port := 23000,
+ nsvci := 97,
+ nsei := 96
+}
Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoSGSN";
[MAIN_CONTROLLER]
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 6c94d14..d2db909 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -43,6 +43,15 @@ modulepar {
charstring mp_hlr_ip := "127.0.0.1";
integer mp_hlr_port := 4222;
charstring mp_ggsn_ip := "127.0.0.2";
+
+ NSConfiguration mp_nsconfig := {
+ local_udp_port := 23000,
+ local_ip := "127.0.0.1",
+ remote_udp_port := 21000,
+ remote_ip := "127.0.0.1",
+ nsvci := 0,
+ nsei := 2342
+ };
};
type record GbInstance {
@@ -106,7 +115,7 @@ private function f_init_gb(inout GbInstance gb, charstring id) runs on test_CT {
/* connect lower end of NS emulation to NS codec port (on top of IPL4) */
map(gb.vc_NS:NSCP, system:NS_CODEC_PORT);
- gb.vc_NS.start(NSStart());
+ gb.vc_NS.start(NSStart(mp_nsconfig));
gb.vc_BSSGP.start(BssgpStart(gb.cfg));
}