summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-08-24 14:44:32 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-08-24 18:29:48 +0200
commit3bf31d216a18c1d6a6e298a592f873beea322939 (patch)
treebd14c2466f40f7e08b22237b208c0ab104cc1179 /library
parentda4a6958340307794394cb4a073191c0072879e0 (diff)
fix SCCPlite BSC tests: send IPA ID ACK, not GET
From libosmo-sccp.git Icffda98579e676ab6ca63c9c22cf5d151c4fe95f on, we expect an IPA ID ACK upon first connecting, not an IPA ID GET. This might be specific to the one MSC tested so far, but it's the status quo. Make the IPA server in IPA_Emulation configurable, to conform and send the IPA ID ACK upon connecting. This fixes the ttcn3-bsc-tests,SCCPlite suite, broken by above libosmo-sccp commit. For other IPA clients, it is so far required to send the IPA ID GET, so only configure the SCCPlite server in BSSAP_Adapter.ttcn to send IPA ID ACK, and leave the others unchanged. Related: OS#3500 OS#3498 Related: Icffda98579e676ab6ca63c9c22cf5d151c4fe95f (libosmo-sccp) Change-Id: I34b6296a1a408729802a9659c6524c0f67a2f4fe
Diffstat (limited to 'library')
-rw-r--r--library/BSSAP_Adapter.ttcn3
-rw-r--r--library/IPA_Emulation.ttcnpp20
2 files changed, 20 insertions, 3 deletions
diff --git a/library/BSSAP_Adapter.ttcn b/library/BSSAP_Adapter.ttcn
index ada66d2..cebdffe 100644
--- a/library/BSSAP_Adapter.ttcn
+++ b/library/BSSAP_Adapter.ttcn
@@ -107,7 +107,8 @@ function f_bssap_init(inout BSSAP_Adapter ba, in BSSAP_Configuration cfg, charst
connect(ba.vc_IPA:IPA_SP_PORT, ba.vc_WAIT:IPA_SP_PORT);
ba.vc_WAIT.start(IPA_Emulation.waiter_main());
ba.vc_IPA.start(IPA_Emulation.main_server(cfg.sctp_addr.local_ip_addr,
- cfg.sctp_addr.local_sctp_port));
+ cfg.sctp_addr.local_sctp_port,
+ true, IPA_INIT_SEND_IPA_ID_ACK));
/* wait until we received an IPA CCM ID_ACK */
ba.vc_WAIT.done;
disconnect(ba.vc_IPA:IPA_SP_PORT, ba.vc_WAIT:IPA_SP_PORT);
diff --git a/library/IPA_Emulation.ttcnpp b/library/IPA_Emulation.ttcnpp
index b10a983..5c385e6 100644
--- a/library/IPA_Emulation.ttcnpp
+++ b/library/IPA_Emulation.ttcnpp
@@ -51,6 +51,11 @@ type enumerated IpaMode {
IPA_MODE_SERVER
}
+type enumerated IpaInitBehavior {
+ IPA_INIT_SEND_IPA_ID_GET,
+ IPA_INIT_SEND_IPA_ID_ACK
+}
+
type record ASP_IPA_Unitdata {
IpaStreamId streamId,
IpaExtStreamId streamIdExt optional,
@@ -165,6 +170,7 @@ type component IPA_Emulation_CT {
var IpaMode g_mode;
var boolean g_ccm_enabled;
+ var IpaInitBehavior g_init_behavior;
var IPA_CCM_Parameters g_ccm_pars := c_IPA_default_ccm_pars;
}
@@ -425,9 +431,12 @@ function main_client(charstring remote_host, IPL4asp_Types.PortNumber remote_por
/* main function to use for a server-side IPA implementation */
function main_server(charstring local_host, IPL4asp_Types.PortNumber local_port,
- boolean ccm_enabled := true) runs on IPA_Emulation_CT {
+ boolean ccm_enabled := true,
+ IpaInitBehavior init_behavior := IPA_INIT_SEND_IPA_ID_GET)
+runs on IPA_Emulation_CT {
g_mode := IPA_MODE_SERVER;
g_ccm_enabled := ccm_enabled;
+ g_init_behavior := init_behavior;
f_bind(local_host, local_port);
ScanEvents();
}
@@ -566,7 +575,14 @@ private function ScanEvents() runs on IPA_Emulation_CT {
g_ipa_conn_id := asp_evt.connOpened.connId;
f_send_IPA_EVT(t_ASP_IPA_EVT_UD(ASP_IPA_EVENT_UP));
if (g_mode == IPA_MODE_SERVER and g_ccm_enabled) {
- f_ccm_tx(valueof(ts_IPA_ID_GET));
+ select (g_init_behavior) {
+ case (IPA_INIT_SEND_IPA_ID_GET) {
+ f_ccm_tx(valueof(ts_IPA_ID_GET));
+ }
+ case (IPA_INIT_SEND_IPA_ID_ACK) {
+ f_ccm_tx(valueof(ts_IPA_ACK));
+ }
+ }
}
}