diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2024-03-05 13:23:40 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2024-03-05 13:28:58 +0100 |
commit | 5154e357e4eb9395a2baba7013e58aae46de7845 (patch) | |
tree | 8a26963b1a7b250869c6a3b2d491495ac38ed8d6 /library | |
parent | 5f5dbfe7fac6bb153041484646639e8c92bcb4f4 (diff) |
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
Diffstat (limited to 'library')
-rw-r--r-- | library/DIAMETER_Templates.ttcn | 18 | ||||
-rw-r--r-- | library/DIAMETER_ts29_272_Templates.ttcn | 37 | ||||
-rw-r--r-- | library/DIAMETER_ts29_273_Templates.ttcn | 1 |
3 files changed, 29 insertions, 27 deletions
diff --git a/library/DIAMETER_Templates.ttcn b/library/DIAMETER_Templates.ttcn index 98ca9bd5..5390d6e3 100644 --- a/library/DIAMETER_Templates.ttcn +++ b/library/DIAMETER_Templates.ttcn @@ -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), diff --git a/library/DIAMETER_ts29_272_Templates.ttcn b/library/DIAMETER_ts29_272_Templates.ttcn index d3c7a954..0aa5c642 100644 --- a/library/DIAMETER_ts29_272_Templates.ttcn +++ b/library/DIAMETER_ts29_272_Templates.ttcn @@ -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) } } } diff --git a/library/DIAMETER_ts29_273_Templates.ttcn b/library/DIAMETER_ts29_273_Templates.ttcn index 87d16011..c7f2a456 100644 --- a/library/DIAMETER_ts29_273_Templates.ttcn +++ b/library/DIAMETER_ts29_273_Templates.ttcn @@ -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; |