pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28123
)
Change subject: ggsn: Append MS TimeZone IE to CreatePDPCtxReq
......................................................................
ggsn: Append MS TimeZone IE to CreatePDPCtxReq
TS 29.060 states that it shall be included for primary PDP context
activation if the information is available, so let's add it by default.
Change-Id: I8c7e491a07cadfe09403504a82d34e412673a531
---
M ggsn_tests/GGSN_Tests.ttcn
M library/GTP_Templates.ttcn
2 files changed, 51 insertions(+), 9 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn
index c1ef7fb..c18e78e 100644
--- a/ggsn_tests/GGSN_Tests.ttcn
+++ b/ggsn_tests/GGSN_Tests.ttcn
@@ -100,7 +100,8 @@
OCT1 ratType optional,
UserLocationInformation uli optional,
OCT2 charging_char optional,
- OCT8 imeisv optional
+ OCT8 imeisv optional,
+ MS_TimeZone ms_tz optional
}
type component GT_CT {
@@ -359,7 +360,8 @@
}
},
charging_char := '0000'O,
- imeisv := f_rnd_imeisv()
+ imeisv := f_rnd_imeisv(),
+ ms_tz := f_ts_MS_TimeZone('03'O, '01'B)
}
/* send GTP-C for a given context and increment sequence number */
@@ -520,7 +522,7 @@
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, ctx.charging_char, ctx.imeisv));
+ ctx.uli, ctx.charging_char, ctx.imeisv, ctx.ms_tz));
T_default.start;
d := activate(pingpong());
if (Gx_PROC.checkstate("Connected")) {
@@ -2016,7 +2018,8 @@
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].charging_char,
ctx[next_req_ctx].imeisv));
+ ctx[next_req_ctx].uli, ctx[next_req_ctx].charging_char,
ctx[next_req_ctx].imeisv,
+ ctx[next_req_ctx].ms_tz));
next_req_ctx := next_req_ctx + 1;
if (next_req_ctx < num_ctx) {
T_next.start;
@@ -2130,7 +2133,8 @@
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.charging_char, ctx.imeisv));
+ ctx.uli, ctx.charging_char, ctx.imeisv,
+ ctx.ms_tz));
next_req_ctx := next_req_ctx + 1;
}
T_next.start;
diff --git a/library/GTP_Templates.ttcn b/library/GTP_Templates.ttcn
index 22d8632..493da8f 100644
--- a/library/GTP_Templates.ttcn
+++ b/library/GTP_Templates.ttcn
@@ -139,6 +139,42 @@
imeisv := imeisv
}
+ // MS Time Zone - 7.7.52
+ template (value) MS_TimeZone ts_MS_TimeZone(template (value) OCT1 timeZone :=
'00'O,
+ template (value) BIT2 daylightSavingTime := '00'B) := {
+ type_gtpc := '99'O,
+ lengthf := 2,
+ timeZone := timeZone,
+ daylightSavingTime := daylightSavingTime,
+ spare1 := '000'B,
+ sgsnAttempsToUpdateMS := '0'B, /* propietary, use it as spare */
+ spare2 := '00'B
+ }
+ function f_ts_MS_TimeZone(template (omit) OCT1 timeZone, template (omit) BIT2
daylightSavingTime)
+ return template (omit) MS_TimeZone {
+ if (istemplatekind(timeZone, "omit") and istemplatekind(daylightSavingTime,
"omit")) {
+ return omit;
+ }
+ if (istemplatekind(timeZone, "omit")) {
+ return ts_MS_TimeZone(daylightSavingTime := daylightSavingTime);
+ }
+ if (istemplatekind(daylightSavingTime, "omit")) {
+ return ts_MS_TimeZone(timeZone);
+ }
+ return ts_MS_TimeZone(timeZone, daylightSavingTime);
+ }
+
+ template (present) MS_TimeZone tr_MS_TimeZone(template (present) OCT1 timeZone := ?,
+ template (present) BIT2 daylightSavingTime := ?) := {
+ type_gtpc := '99'O,
+ lengthf := 2,
+ timeZone := timeZone,
+ daylightSavingTime := daylightSavingTime,
+ spare1 := '000'B,
+ sgsnAttempsToUpdateMS := '0'B, /* propietary, use it as spare */
+ spare2 := '00'B
+ }
+
/* Charging Characteristics IE TS 29.060 7.7.23 */
template ChargingCharacteristics_GTPC ts_ChargingCharacteristics(template (value) OCT2
chargingChar) := {
type_gtpc := '1A'O,
@@ -400,7 +436,8 @@
template (omit) OCT1 ratType := omit,
template (omit) UserLocationInformation uli := omit,
template (omit) OCT2 charging_char := omit,
- template (omit) OCT8 imeisv := omit) := {
+ template (omit) OCT8 imeisv := omit,
+ template(omit) MS_TimeZone ms_tz := omit) := {
createPDPContextRequest := {
imsi := ts_Imsi(imsi),
rai := omit,
@@ -441,7 +478,7 @@
aPN_Restriction := omit,
ratType := f_ts_RATType(ratType),
userLocationInformation := uli,
- mS_TimeZone := omit,
+ mS_TimeZone := ms_tz,
imeisv := f_ts_IMEISV(imeisv),
camelChargingInformationContainer := omit,
additionalTraceInfo := omit,
@@ -465,13 +502,14 @@
template (omit) OCT1 ratType := omit,
template (omit) UserLocationInformation uli := omit,
template (omit) OCT2 charging_char := omit,
- template (omit) OCT8 imeisv := omit) := {
+ template (omit) OCT8 imeisv := omit,
+ template(omit) MS_TimeZone ms_tz := 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,
- charging_char, imeisv)), seq)
+ charging_char, imeisv, ms_tz)), seq)
}
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28123
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: I8c7e491a07cadfe09403504a82d34e412673a531
Gerrit-Change-Number: 28123
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged