pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41114?usp=email )
Change subject: stp: define PC for IPA ASP peers ......................................................................
stp: define PC for IPA ASP peers
This allows explicitly matching what's configured in osmo-stp's "routing-key" & "point-code override dpc" VTY configs for each AS. This in turn makes the osmo-stp cfg file easy to understand by looking at the peer's (TTCN3) configuration.
There's no need to configure "point-code override opc" in the osmo-stp since by default the PC declared in the routing-key is used to apply an OPC on incoming messages over an IPA ASP.
Once we have the PC available in the TTCN3 config file, we can use it inside IPA<->M3UA test to put the value in generated M3UA messages (there's no visible changes in IPA ones because ofc the IPA signalling doesn't include the PC in the messages).
Change-Id: I9cca2f4dd38e03ab1d259ffafd904b8890778883 --- M stp/STP_Tests_IPA.cfg M stp/STP_Tests_IPA.ttcn M stp/STP_Tests_IPA_M3UA.cfg M stp/STP_Tests_IPA_M3UA.ttcn M stp/osmo-stp-ipa.confmerge 5 files changed, 39 insertions(+), 24 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/14/41114/1
diff --git a/stp/STP_Tests_IPA.cfg b/stp/STP_Tests_IPA.cfg index 8f6c24a..d8b962e 100644 --- a/stp/STP_Tests_IPA.cfg +++ b/stp/STP_Tests_IPA.cfg @@ -17,70 +17,80 @@ as_name := "ipa-as-loadshare-sender", is_server := false, remote_port := 5000, - local_port := 20000 + local_port := 20000, + point_code := 30 }, { asp_name := "ipa-asp-loadshare-sender1", as_name := "ipa-as-loadshare-sender", is_server := false, remote_port := 5000, - local_port := 20001 + local_port := 20001, + point_code := 30 }, { asp_name := "ipa-asp-loadshare-receiver0", as_name := "ipa-as-loadshare-receiver", is_server := false, remote_port := 5000, - local_port := 20002 + local_port := 20002, + point_code := 31 }, { asp_name := "ipa-asp-loadshare-receiver1", as_name := "ipa-as-loadshare-receiver", is_server := false, remote_port := 5000, - local_port := 20003 + local_port := 20003, + point_code := 31 }, { asp_name := "ipa-asp-override-sender", as_name := "ipa-as-override-sender", is_server := false, remote_port := 5000, - local_port := 20005 + local_port := 20005, + point_code := 33 }, { asp_name := "ipa-asp-override-receiver0", as_name := "ipa-as-override-receiver", is_server := false, remote_port := 5000, - local_port := 20006 + local_port := 20006, + point_code := 33 }, { asp_name := "ipa-asp-override-receiver1", as_name := "ipa-as-override-receiver", is_server := false, remote_port := 5000, - local_port := 20007 + local_port := 20007, + point_code := 33 }, { asp_name := "ipa-asp-LS0-0-0", as_name := "ipa-as-LS0-0", is_server := false, remote_port := 5000, - local_port := 20010 + local_port := 20010, + point_code := 32 }, { asp_name := "ipa-asp-LS0-1-0", as_name := "ipa-as-LS0-1", is_server := false, remote_port := 5000, - local_port := 20011 + local_port := 20011, + point_code := 32 }, { asp_name := "ipa-asp-client0", as_name := "ipa-as-client0", is_server := true, remote_port := 7001, - local_port := 6001 + local_port := 6001, + point_code := 35 } }
diff --git a/stp/STP_Tests_IPA.ttcn b/stp/STP_Tests_IPA.ttcn index b34297e..b110228 100644 --- a/stp/STP_Tests_IPA.ttcn +++ b/stp/STP_Tests_IPA.ttcn @@ -59,7 +59,9 @@ /* STP-side SCTP (or TCP) port for M3UA */ integer remote_port, /* local M3UA base port on TTCN3 side */ - integer local_port + integer local_port, + /* point code routed via this M3U */ + integer point_code }; type record of IpaConfig IpaConfigs;
diff --git a/stp/STP_Tests_IPA_M3UA.cfg b/stp/STP_Tests_IPA_M3UA.cfg index 7849d3a..5870747 100644 --- a/stp/STP_Tests_IPA_M3UA.cfg +++ b/stp/STP_Tests_IPA_M3UA.cfg @@ -17,7 +17,8 @@ as_name := "ipa-as-dynamic-asp", is_server := false, remote_port := 5000, - local_port := 40000 + local_port := 40000, + point_code := 5 } };
diff --git a/stp/STP_Tests_IPA_M3UA.ttcn b/stp/STP_Tests_IPA_M3UA.ttcn index 3ad00c7..1e7189d 100644 --- a/stp/STP_Tests_IPA_M3UA.ttcn +++ b/stp/STP_Tests_IPA_M3UA.ttcn @@ -45,14 +45,16 @@
/* Test routing of SCCP between an M3UA and an IPA ASP */ testcase TC_m3ua_to_ipa() runs on IPA_M3UA_CT { + var Misc_Helpers.ro_charstring ipa_asps := { "ipa-asp-dynamic-unknown" }; + var IpaConfigs ipa_configs := ipa_build_configs(ipa_asps); var Misc_Helpers.ro_charstring m3ua_asps := { "asp-sender" }; var M3uaConfigs m3ua_configs := m3ua_build_configs(m3ua_asps); var OCT4 rctx_sender := int2oct(m3ua_configs[0].routing_ctx, 4); var OCT4 pc_sender := int2oct(m3ua_configs[0].point_code, 4); - var OCT4 pc_receiver := int2oct(5, 4); + var OCT4 pc_receiver := int2oct(ipa_configs[0].point_code, 4);
f_init_m3ua(m3ua_configs := m3ua_configs); - f_init_ipa(); + f_init_ipa(ipa_configs := ipa_configs);
f_connect_ipa(0); /* exp_duna_after_act = false: There's no other unavailable AS configured at the STP at this point. */ @@ -76,7 +78,7 @@ var IpaConfigs ipa_configs := ipa_build_configs(ipa_asps); var Misc_Helpers.ro_charstring m3ua_asps := { "asp-sender" }; var M3uaConfigs m3ua_configs := m3ua_build_configs(m3ua_asps); - var OCT4 pc_sender := int2oct(5, 4); + var OCT4 pc_sender := int2oct(ipa_configs[0].point_code, 4); var OCT4 rctx_receiver := int2oct(m3ua_configs[0].routing_ctx, 4); var OCT4 pc_receiver := int2oct(m3ua_configs[0].point_code, 4);
@@ -108,7 +110,7 @@ var IpaConfigs ipa_configs := ipa_build_configs(ipa_asps); var Misc_Helpers.ro_charstring m3ua_asps := { "asp-sender" }; var M3uaConfigs m3ua_configs := m3ua_build_configs(m3ua_asps); - var OCT4 pc_sender := int2oct(5, 4); + var OCT4 pc_sender := int2oct(ipa_configs[0].point_code, 4); var OCT4 rctx_receiver := int2oct(m3ua_configs[0].routing_ctx, 4); var OCT4 pc_receiver := int2oct(m3ua_configs[0].point_code, 4);
@@ -143,7 +145,7 @@ var IpaConfigs ipa_configs := ipa_build_configs(ipa_asps); var Misc_Helpers.ro_charstring m3ua_asps := { "asp-sender" }; var M3uaConfigs m3ua_configs := m3ua_build_configs(m3ua_asps); - var OCT4 pc_sender := int2oct(5, 4); + var OCT4 pc_sender := int2oct(ipa_configs[0].point_code, 4); var OCT4 rctx_receiver := int2oct(m3ua_configs[0].routing_ctx, 4); var OCT4 pc_receiver := int2oct(m3ua_configs[0].point_code, 4);
diff --git a/stp/osmo-stp-ipa.confmerge b/stp/osmo-stp-ipa.confmerge index ef95384..9ef997d 100644 --- a/stp/osmo-stp-ipa.confmerge +++ b/stp/osmo-stp-ipa.confmerge @@ -9,7 +9,7 @@ local-ip 127.0.0.1 remote-ip 127.0.0.1 as ipa-as-loadshare-sender ipa - routing-key 0 6 + routing-key 0 30 point-code override dpc 31 asp ipa-asp-loadshare-sender0 asp ipa-asp-loadshare-sender1 @@ -25,7 +25,7 @@ transport-role server as ipa-as-loadshare-receiver ipa traffic-mode loadshare - routing-key 0 7 + routing-key 0 31 point-code override dpc 32 asp ipa-asp-loadshare-receiver0 asp ipa-asp-loadshare-receiver1 @@ -34,7 +34,7 @@ local-ip 127.0.0.1 remote-ip 127.0.0.1 as ipa-as-override-sender ipa - routing-key 0 6 + routing-key 0 34 point-code override dpc 33 asp ipa-asp-override-sender asp ipa-asp-override-receiver0 20006 5000 ipa @@ -49,7 +49,7 @@ transport-role server as ipa-as-override-receiver ipa traffic-mode override - routing-key 0 8 + routing-key 0 33 point-code override dpc 34 asp ipa-asp-override-receiver0 asp ipa-asp-override-receiver1 @@ -66,11 +66,11 @@ sctp-role server as ipa-as-LS0-0 ipa point-code override dpc 38 - routing-key 0 44 + routing-key 0 32 asp ipa-asp-LS0-0-0 as ipa-as-LS0-1 ipa point-code override dpc 39 - routing-key 0 45 + routing-key 0 32 asp ipa-asp-LS0-1-0 ! CLIENT asp ipa-asp-client0 6001 7001 ipa @@ -80,7 +80,7 @@ transport-role client as ipa-as-client ipa traffic-mode override - routing-key 0 9 + routing-key 0 35 point-code override dpc 35 asp ipa-asp-client0 !