pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27421 )
Change subject: ggsn: Rename diameter generic ports to Gx ......................................................................
ggsn: Rename diameter generic ports to Gx
We'll start emulating other Diameter-based interfaces soon (Gy), so let's rename existing stuff which is Gx specific. The DIAMETER_Emulation only supports handling 1 application-id per component, and that's fine anyway since the OCS is in general expected to run in a different conn/node from PCRF.
Change-Id: I1eb03d907b46c4bb24491f390ef468e831190e08 --- M ggsn_tests/GGSN_Tests.ttcn 1 file changed, 19 insertions(+), 19 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/21/27421/1
diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn index eb09555..7a7ff97 100644 --- a/ggsn_tests/GGSN_Tests.ttcn +++ b/ggsn_tests/GGSN_Tests.ttcn @@ -125,9 +125,9 @@ var integer g_use_echo_intval := 0; /* 0 = disabled */
/* emulated PCRF, used with m_ggsn_impl = GGSN_IMPL_OPEN5GS */ - var DIAMETER_Emulation_CT vc_DIAMETER; - port DIAMETER_PT DIAMETER_UNIT; - port DIAMETEREM_PROC_PT DIAMETER_PROC; + var DIAMETER_Emulation_CT vc_Gx; + port DIAMETER_PT Gx_UNIT; + port DIAMETEREM_PROC_PT Gx_PROC; }
private function f_init_vty() runs on GT_CT { @@ -208,17 +208,17 @@ remote_sctp_port := -1, local_ip := m_bind_ip_gtpc, local_sctp_port := PCRF_PORT, - origin_host := "ttcn3ggsntest.localdomain", + origin_host := "pcrf.localdomain", origin_realm := "localdomain", vendor_app_id := c_DIAMETER_3GPP_Gx_AID }; - vc_DIAMETER := DIAMETER_Emulation_CT.create(id); - map(vc_DIAMETER:DIAMETER, system:DIAMETER_CODEC_PT); - connect(vc_DIAMETER:DIAMETER_UNIT, self:DIAMETER_UNIT); - connect(vc_DIAMETER:DIAMETER_PROC, self:DIAMETER_PROC); - vc_DIAMETER.start(DIAMETER_Emulation.main(ops, pars, id)); + vc_Gx := DIAMETER_Emulation_CT.create(id); + map(vc_Gx:DIAMETER, system:DIAMETER_CODEC_PT); + connect(vc_Gx:DIAMETER_UNIT, self:Gx_UNIT); + connect(vc_Gx:DIAMETER_PROC, self:Gx_PROC); + vc_Gx.start(DIAMETER_Emulation.main(ops, pars, id));
- f_diameter_wait_capability(DIAMETER_UNIT); + f_diameter_wait_capability(Gx_UNIT); /* Give some time for our emulation to get out of SUSPECT list of SUT (3 watchdong ping-pongs): * RFC6733 sec 5.1 * RFC3539 sec 3.4.1 [5] @@ -426,7 +426,7 @@
private altstep as_DIA_CCR(DCC_NONE_CC_Request_Type req_type) runs on GT_CT { var PDU_DIAMETER rx_dia; - [] DIAMETER_UNIT.receive(tr_DIA_CCR(req_type := req_type)) -> value rx_dia { + [] Gx_UNIT.receive(tr_DIA_CCR(req_type := req_type)) -> value rx_dia { var template (omit) AVP avp; var octetstring sess_id; var AVP_Unsigned32 req_num; @@ -437,10 +437,10 @@ avp := f_DIAMETER_get_avp(rx_dia, c_AVP_Code_DCC_NONE_CC_Request_Number); req_num := valueof(avp.avp_data.avp_DCC_NONE_CC_Request_Number);
- DIAMETER_UNIT.send(ts_DIA_CCA(rx_dia.hop_by_hop_id, rx_dia.end_to_end_id, sess_id, + Gx_UNIT.send(ts_DIA_CCA(rx_dia.hop_by_hop_id, rx_dia.end_to_end_id, sess_id, req_type, req_num)); } - [] DIAMETER_UNIT.receive(PDU_DIAMETER:?) -> value rx_dia { + [] Gx_UNIT.receive(PDU_DIAMETER:?) -> value rx_dia { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("Received unexpected DIAMETER ", rx_dia)); } @@ -458,7 +458,7 @@ g_sgsn_ip_c, g_sgsn_ip_u, ctx.msisdn, ctx.pco_req, ctx.ratType, ctx.uli)); T_default.start; d := activate(pingpong()); - if (DIAMETER_PROC.checkstate("Connected")) { + if (Gx_PROC.checkstate("Connected")) { as_DIA_CCR(INITIAL_REQUEST); } alt { @@ -520,7 +520,7 @@ f_send_gtpc(ts_GTPC_DeletePDP(g_peer_c, g_c_seq_nr, ctx.teic_remote, ctx.nsapi, teardown_ind)); T_default.start; d := activate(pingpong()); - if (DIAMETER_PROC.checkstate("Connected") and expect_diameter) { + if (Gx_PROC.checkstate("Connected") and expect_diameter) { as_DIA_CCR(TERMINATION_REQUEST); } alt { @@ -1937,7 +1937,7 @@
T_next.start; alt { - [DIAMETER_PROC.checkstate("Connected")] as_DIA_CCR(INITIAL_REQUEST) { repeat; } + [Gx_PROC.checkstate("Connected")] as_DIA_CCR(INITIAL_REQUEST) { repeat; } [] pingpong(); [] T_next.timeout { f_send_gtpc(ts_GTPC_CreatePDP(g_peer_c, g_c_seq_nr, ctx[next_req_ctx].imsi, g_restart_ctr, @@ -1991,7 +1991,7 @@ rx_resp_ctx := 0; T_next.start; alt { - [DIAMETER_PROC.checkstate("Connected")] as_DIA_CCR(TERMINATION_REQUEST) { repeat; } + [Gx_PROC.checkstate("Connected")] as_DIA_CCR(TERMINATION_REQUEST) { repeat; } [] pingpong(); [] T_next.timeout { f_send_gtpc(ts_GTPC_DeletePDP(g_peer_c, g_c_seq_nr, ctx[next_req_ctx].teic_remote, ctx[next_req_ctx].nsapi, '1'B)); @@ -2043,7 +2043,7 @@
T_next.start; alt { - [DIAMETER_PROC.checkstate("Connected")] as_DIA_CCR(INITIAL_REQUEST) { repeat; } + [Gx_PROC.checkstate("Connected")] as_DIA_CCR(INITIAL_REQUEST) { repeat; } [] pingpong(); [] T_next.timeout { if (cont_req) { @@ -2092,7 +2092,7 @@ rx_resp_ctx := 0; T_next.start; alt { - [DIAMETER_PROC.checkstate("Connected")] as_DIA_CCR(TERMINATION_REQUEST) { repeat; } + [Gx_PROC.checkstate("Connected")] as_DIA_CCR(TERMINATION_REQUEST) { repeat; } [] pingpong(); [] T_next.timeout { f_send_gtpc(ts_GTPC_DeletePDP(g_peer_c, g_c_seq_nr, teic_list[next_req_ctx], '0001'B, '1'B));