Small improvements to DIAMETER_ts29_272_Templates.ttcn

* Move Service-Selection template to the TS 29.272 since it belongs
  there.
* Set some parameter types to "template (value)" which makes it easier
  for users, since both a template and a value can then be passed.

Change-Id: Ic57b2c5ec0a953f9a1751d4ce4ad441daafd3c87
This commit is contained in:
Pau Espin 2024-03-05 13:23:40 +01:00
parent 5f5dbfe7fa
commit 5154e357e4
4 changed files with 30 additions and 28 deletions

View File

@ -55,7 +55,7 @@ FILES+="Osmocom_CTRL_Types.ttcn "
FILES+="L3_Common.ttcn "
FILES+="DNS_Helpers.ttcn "
FILES+="DIAMETER_Types.ttcn DIAMETER_CodecPort.ttcn DIAMETER_CodecPort_CtrlFunct.ttcn DIAMETER_CodecPort_CtrlFunctDef.cc DIAMETER_Emulation.ttcn "
FILES+="DIAMETER_Templates.ttcn DIAMETER_rfc5447_Templates.ttcn DIAMETER_ts29_273_Templates.ttcn "
FILES+="DIAMETER_Templates.ttcn DIAMETER_rfc5447_Templates.ttcn DIAMETER_ts29_272_Templates.ttcn DIAMETER_ts29_273_Templates.ttcn "
FILES+="IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc
IPA_Emulation.ttcnpp "
FILES+="PCO_Types.ttcn GSUP_Types.ttcn GSUP_Templates.ttcn GSUP_Emulation.ttcn "

View File

@ -715,24 +715,6 @@ template (value) GenericAVP ts_AVP_3GPP_SubscrRauTauTmr(uint32_t tmr) := {
}
}
/* Service-Selection, TS 29.272 7.3.36, TS 29.273 5.2.3.5, (RFC 5778) */
template (present) GenericAVP tr_AVP_ServiceSelection(template (present) charstring apn := ?) := {
avp := {
avp_header := tr_DIA_Hdr(c_AVP_Code_MIPv6_NONE_Service_Selection),
avp_data := {
avp_MIPv6_NONE_Service_Selection := char2oct_tmpl(apn)
}
}
}
template (value) GenericAVP ts_AVP_ServiceSelection(charstring apn) := {
avp := {
avp_header := ts_DIA_Hdr(c_AVP_Code_MIPv6_NONE_Service_Selection),
avp_data := {
avp_MIPv6_NONE_Service_Selection := char2oct(apn)
}
}
}
template (present) GenericAVP tr_AVP_PCC_3GPP_QoS_Information(template (present) AVP_list list := ?) := {
avp := {
avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_PCC_3GPP_QoS_Information),

View File

@ -238,11 +238,11 @@ template (present) GenericAVP tr_AVP_3GPP_ContextId(template (present) uint32_t
}
}
}
template (value) GenericAVP ts_AVP_3GPP_ContextId(uint32_t ctx) := {
template (value) GenericAVP ts_AVP_3GPP_ContextId(template (value) uint32_t ctx) := {
avp := {
avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Context_Identifier),
avp_data := {
avp_AAA_3GPP_Context_Identifier := int2oct(ctx, 4)
avp_AAA_3GPP_Context_Identifier := int2oct(valueof(ctx), 4)
}
}
}
@ -345,8 +345,9 @@ template (present) GenericAVP tr_AVP_3GPP_ApnConfig(template (present) uint32_t
}
}
}
template (value) GenericAVP ts_AVP_3GPP_ApnConfig(uint32_t ctx, AAA_3GPP_PDN_Type pdn_type,
charstring apn) := {
template (value) GenericAVP ts_AVP_3GPP_ApnConfig(template (value) uint32_t ctx,
template (value) AAA_3GPP_PDN_Type pdn_type,
template (value) charstring apn) := {
avp := {
avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_APN_Configuration),
avp_data := {
@ -360,6 +361,23 @@ template (value) GenericAVP ts_AVP_3GPP_ApnConfig(uint32_t ctx, AAA_3GPP_PDN_Typ
}
}
/* Service-Selection, TS 29.272 7.3.36, TS 29.273 5.2.3.5, (RFC 5778) */
template (present) GenericAVP tr_AVP_ServiceSelection(template (present) charstring apn := ?) := {
avp := {
avp_header := tr_DIA_Hdr(c_AVP_Code_MIPv6_NONE_Service_Selection),
avp_data := {
avp_MIPv6_NONE_Service_Selection := char2oct_tmpl(apn)
}
}
}
template (value) GenericAVP ts_AVP_ServiceSelection(template (value) charstring apn) := {
avp := {
avp_header := ts_DIA_Hdr(c_AVP_Code_MIPv6_NONE_Service_Selection),
avp_data := {
avp_MIPv6_NONE_Service_Selection := char2oct(valueof(apn))
}
}
}
/* TS 29.272 7.3.41 AMBR */
template (present) GenericAVP tr_AVP_3GPP_AMBR(template (present) uint32_t ul := ?, template (present) uint32_t dl := ?) := {
@ -373,7 +391,8 @@ template (present) GenericAVP tr_AVP_3GPP_AMBR(template (present) uint32_t ul :=
}
}
}
template (value) GenericAVP ts_AVP_3GPP_AMBR(uint32_t ul, uint32_t dl) := {
template (value) GenericAVP ts_AVP_3GPP_AMBR(template (value) uint32_t ul,
template (value) uint32_t dl) := {
avp := {
avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_AMBR),
avp_data := {
@ -394,11 +413,11 @@ template (present) GenericAVP tr_AVP_3GPP_MaxReqBwUL(template (present) uint32_t
}
}
template (value) GenericAVP ts_AVP_3GPP_MaxReqBwUL(uint32_t bw) := {
template (value) GenericAVP ts_AVP_3GPP_MaxReqBwUL(template (value) uint32_t bw) := {
avp := {
avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_RX_3GPP_Max_Requested_Bandwidth_UL),
avp_data := {
avp_RX_3GPP_Max_Requested_Bandwidth_UL := int2oct(bw, 4)
avp_RX_3GPP_Max_Requested_Bandwidth_UL := int2oct(valueof(bw), 4)
}
}
}
@ -412,11 +431,11 @@ template (present) GenericAVP tr_AVP_3GPP_MaxReqBwDL(template (present) uint32_t
}
}
template (value) GenericAVP ts_AVP_3GPP_MaxReqBwDL(uint32_t bw) := {
template (value) GenericAVP ts_AVP_3GPP_MaxReqBwDL(template (value) uint32_t bw) := {
avp := {
avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_RX_3GPP_Max_Requested_Bandwidth_DL),
avp_data := {
avp_RX_3GPP_Max_Requested_Bandwidth_DL := int2oct(bw, 4)
avp_RX_3GPP_Max_Requested_Bandwidth_DL := int2oct(valueof(bw), 4)
}
}
}

View File

@ -15,6 +15,7 @@ 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_272_Templates all;
import from Osmocom_Types all;
import from Misc_Helpers all;