GSUP_Types: Add missing message_class to EPDGTunnel* messages
Related: OS#6091
Change-Id: Ib7d6156402645867cadc8d3e0ffdd07247a1abd2
diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn
index 7d6af7a..10955e7 100644
--- a/library/GSUP_Types.ttcn
+++ b/library/GSUP_Types.ttcn
@@ -693,29 +693,57 @@
/* EPDG Tunnel */
-template (value) GSUP_PDU ts_GSUP_EPDGTunnel_REQ(hexstring imsi, GSUP_CnDomain dom := OSMO_GSUP_CN_DOMAIN_PS,
- template (omit) octetstring source_name := omit) :=
- ts_GSUP(OSMO_GSUP_MSGT_EPDG_TUNNEL_REQUEST, f_gen_ts_ies(imsi, dom := dom,
- source_name := source_name));
+template (value) GSUP_PDU ts_GSUP_EPDGTunnel_REQ(hexstring imsi,
+ GSUP_Message_Class message_class := OSMO_GSUP_MESSAGE_CLASS_IPSEC_EPDG,
+ GSUP_CnDomain dom := OSMO_GSUP_CN_DOMAIN_PS,
+ template (omit) octetstring source_name := omit) :=
+ ts_GSUP(OSMO_GSUP_MSGT_EPDG_TUNNEL_REQUEST, f_gen_ts_ies(imsi,
+ message_class := message_class,
+ dom := dom,
+ source_name := source_name));
-template (present) GSUP_PDU tr_GSUP_EPDGTunnel_REQ(template (present) hexstring imsi := ?) :=
- tr_GSUP_IMSI(OSMO_GSUP_MSGT_EPDG_TUNNEL_REQUEST, imsi);
+template (present) GSUP_PDU tr_GSUP_EPDGTunnel_REQ(template (present) hexstring imsi := ?,
+ template (present) GSUP_Message_Class message_class := OSMO_GSUP_MESSAGE_CLASS_IPSEC_EPDG) :=
+ tr_GSUP(OSMO_GSUP_MSGT_EPDG_TUNNEL_REQUEST,
+ f_gen_tr_ies(imsi,
+ message_class := message_class));
-template (value) GSUP_PDU ts_GSUP_EPDGTunnel_RES(hexstring imsi, octetstring destination_name := ''O) :=
- ts_GSUP(OSMO_GSUP_MSGT_EPDG_TUNNEL_RESULT, { valueof(ts_GSUP_IE_IMSI(imsi)),
- valueof(ts_GSUP_IE_Destination_Name(destination_name))});
-template (present) GSUP_PDU tr_GSUP_EPDGTunnel_RES(template (present) hexstring imsi, template octetstring destination_name := omit) :=
- tr_GSUP(OSMO_GSUP_MSGT_EPDG_TUNNEL_RESULT, f_gen_tr_ies(imsi, destination_name := destination_name));
+template (value) GSUP_PDU ts_GSUP_EPDGTunnel_RES(hexstring imsi,
+ GSUP_Message_Class message_class := OSMO_GSUP_MESSAGE_CLASS_IPSEC_EPDG,
+ octetstring destination_name := ''O) :=
+ ts_GSUP(OSMO_GSUP_MSGT_EPDG_TUNNEL_RESULT, {
+ valueof(ts_GSUP_IE_IMSI(imsi)),
+ valueof(ts_GSUP_IE_Message_Class(message_class)),
+ valueof(ts_GSUP_IE_Destination_Name(destination_name))
+ });
-template (value) GSUP_PDU ts_GSUP_EPDGTunnel_ERR(hexstring imsi, integer cause) :=
+template (present) GSUP_PDU tr_GSUP_EPDGTunnel_RES(template (present) hexstring imsi,
+ template (present) GSUP_Message_Class message_class := OSMO_GSUP_MESSAGE_CLASS_IPSEC_EPDG,
+ template octetstring destination_name := omit) :=
+ tr_GSUP(OSMO_GSUP_MSGT_EPDG_TUNNEL_RESULT,
+ f_gen_tr_ies(imsi,
+ message_class := message_class,
+ destination_name := destination_name));
+
+template (value) GSUP_PDU ts_GSUP_EPDGTunnel_ERR(hexstring imsi,
+ GSUP_Message_Class message_class := OSMO_GSUP_MESSAGE_CLASS_IPSEC_EPDG,
+ integer cause := 0) :=
ts_GSUP(OSMO_GSUP_MSGT_EPDG_TUNNEL_ERROR, {
- valueof(ts_GSUP_IE_IMSI(imsi)), valueof(ts_GSUP_IE_Cause(cause)) });
+ valueof(ts_GSUP_IE_IMSI(imsi)),
+ valueof(ts_GSUP_IE_Cause(cause)),
+ valueof(ts_GSUP_IE_Message_Class(message_class))
+ });
-template (present) GSUP_PDU tr_GSUP_EPDGTunnel_ERR(template (present) hexstring imsi, template (present) integer cause := ?,
- template octetstring destination_name := omit) :=
+template (present) GSUP_PDU tr_GSUP_EPDGTunnel_ERR(template (present) hexstring imsi,
+ template (present) GSUP_Message_Class message_class := OSMO_GSUP_MESSAGE_CLASS_IPSEC_EPDG,
+ template (present) integer cause := ?,
+ template octetstring destination_name := omit) :=
tr_GSUP(OSMO_GSUP_MSGT_EPDG_TUNNEL_ERROR,
- f_gen_tr_ies(imsi, cause := cause, destination_name := destination_name));
+ f_gen_tr_ies(imsi,
+ message_class := message_class,
+ cause := cause,
+ destination_name := destination_name));
template (value) GSUP_IE ts_GSUP_IE_CancelType(GSUP_CancelType ctype) := {
@@ -1391,10 +1419,11 @@
}
private function f_gen_ts_ies(hexstring imsi,
- template hexstring imei := omit,
- template GSUP_CnDomain dom := omit,
- template octetstring source_name := omit,
- template octetstring destination_name := omit
+ template (omit) GSUP_Message_Class message_class := omit,
+ template (omit) hexstring imei := omit,
+ template (omit) GSUP_CnDomain dom := omit,
+ template (omit) octetstring source_name := omit,
+ template (omit) octetstring destination_name := omit
) return GSUP_IEs {
var GSUP_IEs ies := {
valueof(ts_GSUP_IE_IMSI(imsi))
@@ -1408,6 +1437,10 @@
ies := ies & { valueof(ts_GSUP_IE_IMEI(valueof(imei))) };
}
+ if (isvalue(message_class)) {
+ ies := ies & { valueof(ts_GSUP_IE_Message_Class(valueof(message_class))) };
+ }
+
if (isvalue(source_name)) {
ies := ies & { valueof(ts_GSUP_IE_Source_Name(valueof(source_name))) };
}
@@ -1420,6 +1453,7 @@
}
private function f_gen_tr_ies(template hexstring imsi,
+ template GSUP_Message_Class message_class := omit,
template integer cause := omit,
template hexstring msisdn := omit,
template GSUP_IMEIResult imei_result := omit,
@@ -1446,6 +1480,11 @@
idx := idx + 1;
}
+ if (isvalue(message_class)) {
+ ies[idx] := tr_GSUP_IE_Message_Class(message_class);
+ idx := idx + 1;
+ }
+
if (isvalue(source_name)) {
ies[idx] := tr_GSUP_IE_Source_Name(source_name);
idx := idx + 1;