WIP: dia2gsup: add Cx
This commit is contained in:
parent
428e4d049d
commit
e885fc21cb
|
@ -36,7 +36,7 @@ DIR=../library
|
||||||
FILES="Misc_Helpers.ttcn General_Types.ttcn GSM_Types.ttcn Osmocom_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc "
|
FILES="Misc_Helpers.ttcn General_Types.ttcn GSM_Types.ttcn Osmocom_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc "
|
||||||
FILES+="Osmocom_CTRL_Types.ttcn "
|
FILES+="Osmocom_CTRL_Types.ttcn "
|
||||||
FILES+="L3_Common.ttcn "
|
FILES+="L3_Common.ttcn "
|
||||||
FILES+="DIAMETER_Types.ttcn DIAMETER_CodecPort.ttcn DIAMETER_CodecPort_CtrlFunct.ttcn DIAMETER_CodecPort_CtrlFunctDef.cc DIAMETER_Emulation.ttcn DIAMETER_Templates.ttcn DIAMETER_ts29_229_Templates.ttcn "
|
FILES+="DIAMETER_Types.ttcn DIAMETER_CodecPort.ttcn DIAMETER_CodecPort_CtrlFunct.ttcn DIAMETER_CodecPort_CtrlFunctDef.cc DIAMETER_Emulation.ttcn DIAMETER_Templates.ttcn DIAMETER_ts29_229_Templates.ttcn DIAMETER_ts29_273_Templates.ttcn DIAMETER_rfc5447_Templates.ttcn "
|
||||||
FILES+="IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc
|
FILES+="IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc
|
||||||
IPA_Emulation.ttcnpp "
|
IPA_Emulation.ttcnpp "
|
||||||
FILES+="GSUP_Types.ttcn GSUP_Emulation.ttcn "
|
FILES+="GSUP_Types.ttcn GSUP_Emulation.ttcn "
|
||||||
|
|
|
@ -547,7 +547,7 @@ template (present) GenericAVP tr_AVP_ExperimentalResult(template (present) Vendo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template (value) GenericAVP ts_AVP_ExperimentalResultCode(template (value) AVP_Unsigned32 n) := {
|
template (value) GenericAVP ts_AVP_ExperimentalResultCode(template (value) octetstring n) := {
|
||||||
avp := {
|
avp := {
|
||||||
avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Experimental_Result_Code),
|
avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Experimental_Result_Code),
|
||||||
avp_data := {
|
avp_data := {
|
||||||
|
@ -556,8 +556,8 @@ template (value) GenericAVP ts_AVP_ExperimentalResultCode(template (value) AVP_U
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template (value) GenericAVP ts_AVP_ExperimentalResult(template (value) Vendor_Id vendor_id
|
template (value) GenericAVP ts_AVP_ExperimentalResult(Vendor_Id vendor_id,
|
||||||
template (value) AVP_Unsigned32 err_code
|
template (value) octetstring err_code
|
||||||
) := {
|
) := {
|
||||||
avp := {
|
avp := {
|
||||||
avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Experimental_Result),
|
avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Experimental_Result),
|
||||||
|
@ -2154,7 +2154,7 @@ function f_validate_gy_cc_report(PDU_DIAMETER rx_dia, template (present) DCA_3GP
|
||||||
* Cx, Dx, 3GPP TS 29.229
|
* Cx, Dx, 3GPP TS 29.229
|
||||||
*****************************/
|
*****************************/
|
||||||
/* Server-Name, 3GPP TS 29.229 6.3.3 */
|
/* Server-Name, 3GPP TS 29.229 6.3.3 */
|
||||||
template (present) GenericAVP tr_AVP_3GPP_ServerName(template (present) CxDx_3GPP_Server_Name server_name := ?) := {
|
template (present) GenericAVP tr_AVP_3GPP_ServerName(template (present) CxDx_3GPP_Server_Name server_name) := {
|
||||||
avp := {
|
avp := {
|
||||||
avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_CxDx_3GPP_Server_Name),
|
avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_CxDx_3GPP_Server_Name),
|
||||||
avp_data := {
|
avp_data := {
|
||||||
|
@ -2162,7 +2162,8 @@ template (present) GenericAVP tr_AVP_3GPP_ServerName(template (present) CxDx_3GP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
template (value) GenericAVP ts_AVP_3GPP_ServerName(CxDx_3GPP_Server_Name server_name) := {
|
|
||||||
|
template (value) GenericAVP ts_AVP_3GPP_ServerName(template (value) CxDx_3GPP_Server_Name server_name) := {
|
||||||
avp := {
|
avp := {
|
||||||
avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_CxDx_3GPP_Server_Name),
|
avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_CxDx_3GPP_Server_Name),
|
||||||
avp_data := {
|
avp_data := {
|
||||||
|
|
|
@ -11,6 +11,17 @@ module DIAMETER_ts29_229_Templates {
|
||||||
* Templates for AVPs and messages for TS 29.229
|
* Templates for AVPs and messages for TS 29.229
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import from General_Types all;
|
||||||
|
import from DIAMETER_Types all;
|
||||||
|
import from DIAMETER_Templates all;
|
||||||
|
import from DIAMETER_rfc5447_Templates all;
|
||||||
|
import from DIAMETER_ts29_273_Templates all;
|
||||||
|
import from Osmocom_Types all;
|
||||||
|
import from Misc_Helpers all;
|
||||||
|
|
||||||
|
/* 3GPP TS 29.273 Section 8.2 */
|
||||||
|
const uint32_t c_DIAMETER_3GPP_Cx_AID := 16777216;
|
||||||
|
|
||||||
/* Multimedia-Auth-Request, 3GPP TS 29.229 8.2.2.1 Authentication Procedure */
|
/* Multimedia-Auth-Request, 3GPP TS 29.229 8.2.2.1 Authentication Procedure */
|
||||||
template (present) PDU_DIAMETER
|
template (present) PDU_DIAMETER
|
||||||
tr_DIA_Cx_MAR(template (present) hexstring imsi := ?,
|
tr_DIA_Cx_MAR(template (present) hexstring imsi := ?,
|
||||||
|
@ -18,12 +29,12 @@ tr_DIA_Cx_MAR(template (present) hexstring imsi := ?,
|
||||||
template (present) charstring orig_host := ?,
|
template (present) charstring orig_host := ?,
|
||||||
template (present) charstring orig_realm := ?,
|
template (present) charstring orig_realm := ?,
|
||||||
template (present) charstring dest_realm := ?,
|
template (present) charstring dest_realm := ?,
|
||||||
template (present) charstring server_name := ?,
|
template (present) octetstring server_name := ?,
|
||||||
template (present) UINT32 hbh_id := ?,
|
template (present) UINT32 hbh_id := ?,
|
||||||
template (present) UINT32 ete_id := ?) :=
|
template (present) UINT32 ete_id := ?) :=
|
||||||
tr_DIAMETER(flags := '1???????'B,
|
tr_DIAMETER(flags := '1???????'B,
|
||||||
cmd_code := Multimedia_Auth,
|
cmd_code := Multimedia_Auth,
|
||||||
app_id := int2oct(c_DIAMETER_3GPP_SWx_AID, 4),
|
app_id := int2oct(c_DIAMETER_3GPP_Cx_AID, 4),
|
||||||
hbh_id := hbh_id, ete_id := ete_id,
|
hbh_id := hbh_id, ete_id := ete_id,
|
||||||
avps := superset(
|
avps := superset(
|
||||||
tr_AVP_SessionId(sess_id),
|
tr_AVP_SessionId(sess_id),
|
||||||
|
@ -34,24 +45,25 @@ tr_DIA_Cx_MAR(template (present) hexstring imsi := ?,
|
||||||
tr_AVP_DestinationRealm(dest_realm),
|
tr_AVP_DestinationRealm(dest_realm),
|
||||||
tr_AVP_UserNameImsi(imsi),
|
tr_AVP_UserNameImsi(imsi),
|
||||||
tr_AVP_3GPP_SIPAuthDataItem(?),
|
tr_AVP_3GPP_SIPAuthDataItem(?),
|
||||||
tr_AVP_3GPP_SIPNumAuthDataItems(?)
|
tr_AVP_3GPP_SIPNumAuthDataItems(?),
|
||||||
tr_AVP_3GPP_ServerName(server_name),
|
tr_AVP_3GPP_ServerName(server_name)
|
||||||
));
|
));
|
||||||
|
|
||||||
/* Multimedia-Auth-Answer, 3GPP TS 29.273 8.2.2.1 Authentication Procedure */
|
/* Multimedia-Auth-Answer, 3GPP TS 29.273 8.2.2.1 Authentication Procedure */
|
||||||
template (value) PDU_DIAMETER
|
template (value) PDU_DIAMETER
|
||||||
ts_DIA_Cx_MAA(template (value) hexstring imsi,
|
ts_DIA_Cx_MAA(template (value) hexstring imsi,
|
||||||
template (value) GenericAVP sip_auth_data_item,
|
template (value) GenericAVP sip_auth_data_item,
|
||||||
template (value) uint32_t vendor_app_id := c_DIAMETER_3GPP_SWx_AID,
|
template (value) uint32_t vendor_app_id := c_DIAMETER_3GPP_Cx_AID,
|
||||||
template (value) octetstring sess_id := c_def_sess_id,
|
template (value) octetstring sess_id := c_def_sess_id,
|
||||||
template (value) charstring orig_host := "hss.localdomain",
|
template (value) charstring orig_host := "hss.localdomain",
|
||||||
template (value) charstring orig_realm := "localdomain",
|
template (value) charstring orig_realm := "localdomain",
|
||||||
template (value) uint32_t result_code := 2001,
|
template (value) octetstring server_name,
|
||||||
|
template (value) UINT32 exp_result := '000007d1'O, /* 2001 */
|
||||||
template (value) UINT32 hbh_id := '00000000'O,
|
template (value) UINT32 hbh_id := '00000000'O,
|
||||||
template (value) UINT32 ete_id := '00000000'O) :=
|
template (value) UINT32 ete_id := '00000000'O) :=
|
||||||
ts_DIAMETER(flags := '01000000'B,
|
ts_DIAMETER(flags := '01000000'B,
|
||||||
cmd_code := Multimedia_Auth,
|
cmd_code := Multimedia_Auth,
|
||||||
app_id := int2oct(c_DIAMETER_3GPP_SWx_AID, 4),
|
app_id := int2oct(c_DIAMETER_3GPP_Cx_AID, 4),
|
||||||
hbh_id := hbh_id,
|
hbh_id := hbh_id,
|
||||||
ete_id := ete_id,
|
ete_id := ete_id,
|
||||||
avps := {
|
avps := {
|
||||||
|
@ -63,8 +75,8 @@ ts_DIA_Cx_MAA(template (value) hexstring imsi,
|
||||||
ts_AVP_OriginRealm(orig_realm),
|
ts_AVP_OriginRealm(orig_realm),
|
||||||
ts_AVP_UserNameImsi(valueof(imsi)),
|
ts_AVP_UserNameImsi(valueof(imsi)),
|
||||||
sip_auth_data_item,
|
sip_auth_data_item,
|
||||||
tr_AVP_3GPP_ServerName(server_name),
|
ts_AVP_3GPP_ServerName(server_name),
|
||||||
ts_AVP_3GPP_SIPNumAuthDataItems(1),
|
ts_AVP_3GPP_SIPNumAuthDataItems(1)
|
||||||
});
|
});
|
||||||
|
|
||||||
/* Server-Assignment-Request,
|
/* Server-Assignment-Request,
|
||||||
|
@ -82,7 +94,7 @@ tr_DIA_SWx_SAR(template (present) hexstring imsi := ?,
|
||||||
template (present) charstring service_selection := ?) :=
|
template (present) charstring service_selection := ?) :=
|
||||||
tr_DIAMETER(flags := '1???????'B,
|
tr_DIAMETER(flags := '1???????'B,
|
||||||
cmd_code := Server_Assignment,
|
cmd_code := Server_Assignment,
|
||||||
app_id := int2oct(c_DIAMETER_3GPP_SWx_AID, 4),
|
app_id := int2oct(c_DIAMETER_3GPP_Cx_AID, 4),
|
||||||
hbh_id := hbh_id, ete_id := ete_id,
|
hbh_id := hbh_id, ete_id := ete_id,
|
||||||
avps := superset(
|
avps := superset(
|
||||||
tr_AVP_SessionId(sess_id),
|
tr_AVP_SessionId(sess_id),
|
||||||
|
@ -95,4 +107,4 @@ tr_DIA_SWx_SAR(template (present) hexstring imsi := ?,
|
||||||
tr_AVP_3GPP_ServerAssignmentType(server_ass_type),
|
tr_AVP_3GPP_ServerAssignmentType(server_ass_type),
|
||||||
tr_AVP_ServiceSelection(service_selection)
|
tr_AVP_ServiceSelection(service_selection)
|
||||||
));
|
));
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue