epdg: Introduce test TC_authinfo_MAA_unknown_user
Related: OS#6391
Change-Id: Ie4d9d019ed56401e7e19197b4a777a1e6a55e7ee
diff --git a/library/DIAMETER_Templates.ttcn b/library/DIAMETER_Templates.ttcn
index 5390d6e..338899f 100644
--- a/library/DIAMETER_Templates.ttcn
+++ b/library/DIAMETER_Templates.ttcn
@@ -337,11 +337,11 @@
}
}
-template (value) GenericAVP ts_AVP_VendorId(Vendor_Id vendor_id) := {
+template (value) GenericAVP ts_AVP_VendorId(template (value) Vendor_Id vendor_id) := {
avp := {
avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Vendor_Id, '00000000'B),
avp_data := {
- avp_BASE_NONE_Vendor_Id := int2oct(enum2int(vendor_id), 4)
+ avp_BASE_NONE_Vendor_Id := int2oct(enum2int(valueof(vendor_id)), 4)
}
}
}
@@ -522,6 +522,14 @@
}
}
}
+template (value) GenericAVP ts_AVP_ExperimentalResultCode(template (value) AVP_Unsigned32 n) := {
+ avp := {
+ avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Experimental_Result_Code),
+ avp_data := {
+ avp_BASE_NONE_Experimental_Result_Code := n
+ }
+ }
+}
template (present) GenericAVP tr_AVP_ExperimentalResult(template (present) Vendor_Id vendor_id := ?,
template (present) AVP_Unsigned32 err_code := ?
@@ -536,6 +544,19 @@
}
}
}
+template (value) GenericAVP ts_AVP_ExperimentalResult(template (value) Vendor_Id vendor_id := vendor_id_3GPP,
+ template (value) AVP_Unsigned32 err_code
+ ) := {
+ avp := {
+ avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Experimental_Result),
+ avp_data := {
+ avp_BASE_NONE_Experimental_Result := {
+ ts_AVP_VendorId(vendor_id),
+ ts_AVP_ExperimentalResultCode(err_code)
+ }
+ }
+ }
+}
template (value) GenericAVP ts_AVP_SuppVendorIdRaw(uint32_t vendor_id) := {
avp := {
diff --git a/library/DIAMETER_ts29_273_Templates.ttcn b/library/DIAMETER_ts29_273_Templates.ttcn
index 899dfb4..f0ac442 100644
--- a/library/DIAMETER_ts29_273_Templates.ttcn
+++ b/library/DIAMETER_ts29_273_Templates.ttcn
@@ -180,6 +180,30 @@
ts_AVP_3GPP_SIPNumAuthDataItems(1)
});
+template (value) PDU_DIAMETER
+ts_DIA_SWx_MAA_result(template (value) hexstring imsi,
+ template (value) GenericAVP result,
+ template (value) uint32_t vendor_app_id := c_DIAMETER_3GPP_SWx_AID,
+ template (value) octetstring sess_id := c_def_sess_id,
+ template (value) charstring orig_host := "hss.localdomain",
+ template (value) charstring orig_realm := "localdomain",
+ template (value) UINT32 hbh_id := '00000000'O,
+ template (value) UINT32 ete_id := '00000000'O) :=
+ ts_DIAMETER(flags := '01000000'B,
+ cmd_code := Multimedia_Auth,
+ app_id := int2oct(c_DIAMETER_3GPP_SWx_AID, 4),
+ hbh_id := hbh_id,
+ ete_id := ete_id,
+ avps := {
+ ts_AVP_SessionId(sess_id),
+ ts_AVP_VendorSpecAppId(vendor_id_3GPP, valueof(vendor_app_id)),
+ result,
+ ts_AVP_AuthSessionState(NO_STATE_MAINTAINED),
+ ts_AVP_OriginHost(orig_host),
+ ts_AVP_OriginRealm(orig_realm),
+ ts_AVP_UserNameImsi(valueof(imsi))
+ });
+
/* Server-Assignment-Request,
* 3GPP TS 29.273 8.1.2.2.2 UE/PDN Registration/DeRegistration Notification
* 3GPP TS 29.273 8.2.2.3 Non-3GPP IP Access Registration Procedure */
diff --git a/library/GSUP_Templates.ttcn b/library/GSUP_Templates.ttcn
index 9daf9c0..6d14b02 100644
--- a/library/GSUP_Templates.ttcn
+++ b/library/GSUP_Templates.ttcn
@@ -374,7 +374,7 @@
ts_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT, {
valueof(ts_GSUP_IE_IMSI(imsi)), auth_tuple });
-template GSUP_PDU tr_GSUP_SAI_ERR(template hexstring imsi, template integer cause) :=
+template GSUP_PDU tr_GSUP_SAI_ERR(template hexstring imsi, template (present) integer cause := ?) :=
tr_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_ERROR, {
tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_Cause(cause) });