Change in osmo-ttcn3-hacks[master]: ggsn: Append ChargingCharacteristics IE to CreatePdpCtxReq
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28091 ) Change subject: ggsn: Append ChargingCharacteristics IE to CreatePdpCtxReq ...................................................................... ggsn: Append ChargingCharacteristics IE to CreatePdpCtxReq This IE is conditionally added if the HLR provides it to the SGSN. Let's add it by default so that we test code paths where GGSN parses it. Related: SYS#5925 Change-Id: Ia0f74041d2107afeaa36b94e33474370b7b07c0e --- M ggsn_tests/GGSN_Tests.ttcn M library/GTP_Templates.ttcn 2 files changed, 26 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/91/28091/1 diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn index b67645d..e3d9341 100644 --- a/ggsn_tests/GGSN_Tests.ttcn +++ b/ggsn_tests/GGSN_Tests.ttcn @@ -98,7 +98,8 @@ /* TEI (Control) remote side */ OCT4 teic_remote, OCT1 ratType optional, - UserLocationInformation uli optional + UserLocationInformation uli optional, + OCT2 charging_char optional } type component GT_CT { @@ -350,7 +351,8 @@ geographicLocation := { geographicLocationCGI := ts_GeographicLocationCGI('262'H, '42F'H, '0001'O, '0002'O) } - } + }, + charging_char := '0000'O } /* send GTP-C for a given context and increment sequence number */ @@ -510,7 +512,8 @@ log("sending CreatePDP"); f_send_gtpc(ts_GTPC_CreatePDP(g_peer_c, g_c_seq_nr, ctx.imsi, g_restart_ctr, ctx.teid, ctx.teic, ctx.nsapi, ctx.eua, ctx.apn, - g_sgsn_ip_c, g_sgsn_ip_u, ctx.msisdn, ctx.pco_req, ctx.ratType, ctx.uli)); + g_sgsn_ip_c, g_sgsn_ip_u, ctx.msisdn, ctx.pco_req, ctx.ratType, + ctx.uli, ctx.charging_char)); T_default.start; d := activate(pingpong()); if (Gx_PROC.checkstate("Connected")) { @@ -2006,7 +2009,7 @@ ctx[next_req_ctx].teid, ctx[next_req_ctx].teic, ctx[next_req_ctx].nsapi, ctx[next_req_ctx].eua, ctx[next_req_ctx].apn, g_sgsn_ip_c, g_sgsn_ip_u, ctx[next_req_ctx].msisdn, ctx[next_req_ctx].pco_req, ctx[next_req_ctx].ratType, - ctx[next_req_ctx].uli)); + ctx[next_req_ctx].uli, ctx[next_req_ctx].charging_char)); next_req_ctx := next_req_ctx + 1; if (next_req_ctx < num_ctx) { T_next.start; @@ -2120,7 +2123,7 @@ ctx.teid, ctx.teic, ctx.nsapi, ctx.eua, ctx.apn, g_sgsn_ip_c, g_sgsn_ip_u, ctx.msisdn, ctx.pco_req, ctx.ratType, - ctx.uli)); + ctx.uli, ctx.charging_char)); next_req_ctx := next_req_ctx + 1; } T_next.start; diff --git a/library/GTP_Templates.ttcn b/library/GTP_Templates.ttcn index 049614a..e6315a8 100644 --- a/library/GTP_Templates.ttcn +++ b/library/GTP_Templates.ttcn @@ -119,6 +119,18 @@ restartCounter := restart_counter } + /* Charging Characteristics IE TS 29.060 7.7.23 */ + template ChargingCharacteristics_GTPC ts_ChargingCharacteristics(template (value) OCT2 chargingChar) := { + type_gtpc := '1A'O, + chargingChar := chargingChar + } + + template ChargingCharacteristics_GTPC tr_ChargingCharacteristics(template OCT2 chargingChar) := { + type_gtpc := '1A'O, + chargingChar := chargingChar + } + + /* template matching reception of GTP-C echo-request */ template Gtp1cUnitdata tr_GTPC_MsgType(template GtpPeer peer, template OCT1 msg_type, template OCT4 teid, template GTPC_PDUs pdus := ?) := { peer := peer, @@ -359,7 +371,8 @@ octetstring sgsn_ip_sign, octetstring sgsn_ip_data, octetstring msisdn, template ProtConfigOptions pco := omit, template (omit) OCT1 ratType := omit, - template (omit) UserLocationInformation uli := omit) := { + template (omit) UserLocationInformation uli := omit, + template (omit) OCT2 charging_char := omit) := { createPDPContextRequest := { imsi := ts_Imsi(imsi), rai := omit, @@ -383,7 +396,7 @@ unused := '0000'B }, linked_nsapi := omit, - charging_char := omit, + charging_char := ts_ChargingCharacteristics(charging_char), trace_ref := omit, trace_type := omit, endUserAddress := eua, @@ -422,12 +435,13 @@ octetstring sgsn_ip_data, octetstring msisdn, template ProtConfigOptions pco := omit, template (omit) OCT1 ratType := omit, - template (omit) UserLocationInformation uli := omit) := { + template (omit) UserLocationInformation uli := omit, + template (omit) OCT2 charging_char := omit) := { peer := peer, gtpc := ts_GTP1C_PDU(createPDPContextRequest, '00000000'O, valueof(ts_CreatePdpPDU(imsi, restart_ctr, teid_data, teid_ctrl, nsapi, eua, apn, sgsn_ip_sign, - sgsn_ip_data, msisdn, pco, ratType, uli)), seq) + sgsn_ip_data, msisdn, pco, ratType, uli, charging_char)), seq) } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28091 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ia0f74041d2107afeaa36b94e33474370b7b07c0e Gerrit-Change-Number: 28091 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-MessageType: newchange
participants (1)
-
pespin