Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 1 | module DIAMETER_Templates { |
| 2 | |
| 3 | /* (C) 2019 by Harald Welte <laforge@gnumonks.org> |
| 4 | * All rights reserved. |
| 5 | * |
| 6 | * Released under the terms of GNU General Public License, Version 2 or |
| 7 | * (at your option) any later version. |
| 8 | * |
| 9 | * SPDX-License-Identifier: GPL-2.0-or-later |
| 10 | */ |
| 11 | |
Pau Espin Pedrol | 965ac64 | 2023-10-16 18:12:45 +0200 | [diff] [blame] | 12 | import from General_Types all; |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 13 | import from DIAMETER_Types all; |
| 14 | import from Osmocom_Types all; |
Pau Espin Pedrol | 8fa2284 | 2022-05-20 14:47:55 +0200 | [diff] [blame] | 15 | import from Misc_Helpers all; |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 16 | |
| 17 | /* https://www.iana.org/assignments/aaa-parameters/aaa-parameters.xhtml#aaa-parameters-4 */ |
| 18 | type enumerated DIAMETER_Resultcode { |
| 19 | /* Informational */ |
| 20 | DIAMETER_MULTI_ROUND_AUTH (1001), |
| 21 | |
| 22 | /* Success */ |
| 23 | DIAMETER_SUCCESS (2001), |
| 24 | DIAMETER_LIMITED_SUCCESS (2002), |
| 25 | DIAMETER_FIRST_REGISTRATION (2003), |
| 26 | DIAMETER_SUBSEQUENT_REGISTRATION (2004), |
| 27 | DIAMETER_UNREGISTERED_SERVICE (2005), |
| 28 | DIAMETER_SUCCESS_SERVER_NAME_NOT_STORED (2006), |
| 29 | DIAMETER_SERVER_SELECTION (2007), |
| 30 | DIAMETER_SUCCESS_AUTH_SENT_SERVER_NOT_STORED (2008), |
| 31 | DIAMETER_SUCCESS_RELOCATE_HA (2009), |
| 32 | |
| 33 | /* Protocol Errors */ |
| 34 | DIAMETER_COMMAND_UNSUPPORTED (3001), |
| 35 | DIAMETER_UNABLE_TO_DELIVER (3002), |
| 36 | DIAMETER_REALM_NOT_SERVED (3003), |
| 37 | DIAMETER_TOO_BUSY (3004), |
| 38 | DIAMETER_LOOP_DETECTED (3005), |
| 39 | DIAMETER_REDIRECT_INDICATION (3006), |
| 40 | DIAMETER_APPLICATION_UNSUPPORTED (3007), |
| 41 | DIAMETER_INVALID_HDR_BITS (3008), |
| 42 | DIAMETER_INVALID_AVP_BITS (3009), |
| 43 | DIAMETER_UNKNOWN_PEER (3010), |
| 44 | DIAMETER_REALM_REDIRECT_INDICATION (3011), |
| 45 | |
| 46 | /* Transient Failures */ |
| 47 | DIAMETER_AUTHENTICATION_REJECTED (4001), |
| 48 | DIAMETER_OUT_OF_SPACE (4002), |
| 49 | ELECTION_LOST (4003), |
| 50 | DIAMETER_ERROR_MIP_REPLY_FAILURE (4005), |
| 51 | DIAMETER_ERROR_HA_NOT_AVAILABLE (4006), |
| 52 | DIAMETER_ERROR_BAD_KEY (4007), |
| 53 | DIAMETER_ERROR_MIP_FILTER_NOT_SUPPORTED (4008), |
| 54 | DIAMETER_END_USER_SERVICE_DENIED (4010), |
| 55 | DIAMETER_CREDIT_CONTROL_NOT_APPLICABLE (4011), |
| 56 | DIAMETER_CREDIT_LIMIT_REACHED (4012), |
| 57 | DIAMETER_USER_NAME_REQUIRED (4013), |
| 58 | RESOURCE_FAILURE (4014), |
| 59 | |
| 60 | DIAMETER_AUTHENTICATION_DATA_UNAVAILABLE (4181), |
| 61 | DIAMETER_ERROR_CAMEL_SUBSCRIPTION_PRESENT (4882), |
| 62 | |
| 63 | /* Permanent Failure */ |
| 64 | DIAMETER_AVP_UNSUPPORTED (5001), |
| 65 | DIAMETER_UNKNOWN_SESSION_ID (5002), |
| 66 | DIAMETER_AUTHORIZATION_REJECTED (5003), |
| 67 | DIAMETER_INVALID_AVP_VALUE (5004), |
| 68 | DIAMETER_MISSING_AVP (5005), |
| 69 | DIAMETER_RESOURCES_EXCEEDED (5006), |
| 70 | DIAMETER_CONTRADICTING_AVPS (5007), |
| 71 | DIAMETER_AVP_NOT_ALLOWED (5008), |
| 72 | DIAMETER_AVP_OCCURS_TOO_MANY_TIMES (5009), |
| 73 | DIAMETER_NO_COMMON_APPLICATION (5010), |
| 74 | DIAMETER_UNSUPPORTED_VERSION (5011), |
| 75 | DIAMETER_UNABLE_TO_COMPLY (5012), |
| 76 | DIAMETER_INVALID_BIT_IN_HEADER (5013), |
| 77 | DIAMETER_INVALID_AVP_LENGTH (5014), |
| 78 | DIAMETER_INVALID_MESSAGE_LENGTH (5015), |
| 79 | DIAMETER_INVALID_AVP_BIT_COMBO (5016), |
| 80 | DIAMETER_NO_COMMON_SECURITY (5017), |
| 81 | DIAMETER_RADIUS_AVP_UNTRANSLATABLE (5018), |
| 82 | DIAMETER_ERROR_NO_FOREIGN_HA_SERVICE (5024), |
| 83 | DIAMETER_ERROR_END_TO_END_MIP_KEY_ENCRYPTION (5025), |
| 84 | DIAMETER_USER_UNKNOWN (5030), |
| 85 | DIAMETER_RATING_FAILED (5031), |
| 86 | DIAMETER_ERROR_USER_UNKNOWN (5032), |
| 87 | DIAMETER_ERROR_IDENTITIES_DONT_MATCH (5033), |
| 88 | DIAMETER_ERROR_IDENTITY_NOT_REGISTERED (5034), |
| 89 | DIAMETER_ERROR_ROAMING_NOT_ALLOWED (5035), |
| 90 | DIAMETER_ERROR_IDENTITY_ALREADY_REGISTERED (5036), |
| 91 | DIAMETER_ERROR_AUTH_SCHEME_NOT_SUPPORTED (5037), |
| 92 | DIAMETER_ERROR_IN_ASSIGNMENT_TYPE (5038), |
| 93 | DIAMETER_ERROR_TOO_MUCH_DATA (5039), |
| 94 | DIAMETER_ERROR_NOT_SUPPORTED_USER_DATA (5040), |
| 95 | DIAMETER_ERROR_MIP6_AUTH_MODE (5041), |
| 96 | UNKNOWN_BINDING_TEMPLATE_NAME (5042), |
| 97 | BINDING_FAILURE (5043), |
| 98 | MAX_BINDINGS_SET_FAILURE (5044), |
| 99 | MAXIMUM_BINDINGS_REACHED_FOR_ENDPOINT (5045), |
| 100 | SESSION_EXISTS (5046), |
| 101 | INSUFFICIENT_CLASSIFIERS (5047), |
| 102 | DIAMETER_ERROR_EAP_CODE_UNKNOWN (5048) |
| 103 | }; |
| 104 | |
Pau Espin Pedrol | 867b130 | 2024-01-24 16:14:28 +0100 | [diff] [blame] | 105 | /* RFC4006 3.1 */ |
Pau Espin Pedrol | 77fdd0b | 2022-03-08 14:03:33 +0100 | [diff] [blame] | 106 | const uint32_t c_DIAMETER_CREDIT_CONTROL_AID := 4; |
Pau Espin Pedrol | 117a94f | 2023-12-21 16:10:12 +0100 | [diff] [blame] | 107 | |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 108 | const uint32_t c_DIAMETER_3GPP_S7_AID := 16777308; |
| 109 | |
Vadim Yanitskiy | 0e8f516 | 2021-12-15 05:00:32 +0300 | [diff] [blame] | 110 | const octetstring c_def_sess_id := char2oct("ttcn3.session"); |
| 111 | |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 112 | template (value) PDU_DIAMETER |
Pau Espin Pedrol | 965ac64 | 2023-10-16 18:12:45 +0200 | [diff] [blame] | 113 | ts_DIAMETER(template (value) DIAMETER_Types.BIT8 flags, |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 114 | template (value) Command_Code cmd_code, |
| 115 | template (value) OCTET4 app_id := '00000000'O, |
Vadim Yanitskiy | 00720bd | 2021-12-12 02:05:08 +0300 | [diff] [blame] | 116 | template (value) UINT32 hbh_id := '00000000'O, |
| 117 | template (value) UINT32 ete_id := '00000000'O, |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 118 | template (value) AVP_list avps := {} |
| 119 | ) := { |
| 120 | version := 1, |
| 121 | message_length := 0, /* overwritten */ |
| 122 | RPETxxxx := flags, |
| 123 | command_code := cmd_code, |
| 124 | application_id := app_id, |
| 125 | hop_by_hop_id := hbh_id, |
| 126 | end_to_end_id := ete_id, |
| 127 | avps := avps |
| 128 | } |
| 129 | template (present) PDU_DIAMETER |
Pau Espin Pedrol | 965ac64 | 2023-10-16 18:12:45 +0200 | [diff] [blame] | 130 | tr_DIAMETER(template (present) DIAMETER_Types.BIT8 flags := ?, |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 131 | template (present) Command_Code cmd_code := ?, |
| 132 | template (present) OCTET4 app_id := ?, |
| 133 | template (present) UINT32 hbh_id := ?, |
| 134 | template (present) UINT32 ete_id := ?, |
| 135 | template (present) AVP_list avps := ?) := { |
| 136 | version := 1, |
| 137 | message_length := ?, |
| 138 | RPETxxxx := flags, |
| 139 | command_code := cmd_code, |
| 140 | application_id := app_id, |
| 141 | hop_by_hop_id := hbh_id, |
| 142 | end_to_end_id := ete_id, |
| 143 | avps := avps |
| 144 | } |
| 145 | template (present) PDU_DIAMETER |
| 146 | tr_DIAMETER_A( |
| 147 | template (present) Command_Code cmd_code := ?, |
| 148 | template (present) OCTET4 app_id := ?, |
| 149 | template (present) UINT32 hbh_id := ?, |
| 150 | template (present) UINT32 ete_id := ?, |
| 151 | template (present) AVP_list avps := ?) := |
| 152 | tr_DIAMETER('0???????'B, cmd_code, app_id, hbh_id, ete_id, avps); |
| 153 | template (present) PDU_DIAMETER |
| 154 | tr_DIAMETER_R( |
| 155 | template (present) Command_Code cmd_code := ?, |
| 156 | template (present) OCTET4 app_id := ?, |
| 157 | template (present) UINT32 hbh_id := ?, |
| 158 | template (present) UINT32 ete_id := ?, |
| 159 | template (present) AVP_list avps := ?) := |
| 160 | tr_DIAMETER('1???????'B, cmd_code, app_id, hbh_id, ete_id, avps); |
| 161 | |
| 162 | |
| 163 | template (value) AVP_Header |
| 164 | ts_DIA_Hdr(template (value) AVP_Code avp_code, |
Pau Espin Pedrol | 965ac64 | 2023-10-16 18:12:45 +0200 | [diff] [blame] | 165 | template (value) DIAMETER_Types.BIT8 flags := '01000000'B) := { |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 166 | avp_code := avp_code, |
| 167 | VMPxxxxx := flags, |
| 168 | avp_length := 0, /* overwritten */ |
| 169 | vendor_id := omit |
| 170 | } |
| 171 | template (present) AVP_Header |
| 172 | tr_DIA_Hdr(template (present) AVP_Code avp_code, |
Pau Espin Pedrol | 965ac64 | 2023-10-16 18:12:45 +0200 | [diff] [blame] | 173 | template (present) DIAMETER_Types.BIT8 flags := '0???????'B) := { |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 174 | avp_code := avp_code, |
| 175 | VMPxxxxx := flags, |
| 176 | avp_length := ?, /* overwritten */ |
| 177 | vendor_id := omit |
| 178 | } |
| 179 | |
| 180 | template (value) AVP_Header |
| 181 | ts_DIA_Hdr_3GPP(template (value) AVP_Code avp_code, |
Pau Espin Pedrol | 965ac64 | 2023-10-16 18:12:45 +0200 | [diff] [blame] | 182 | template (value) DIAMETER_Types.BIT8 flags := '11000000'B) := { |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 183 | avp_code := avp_code, |
| 184 | VMPxxxxx := flags, |
| 185 | avp_length := 0, /* overwritten */ |
| 186 | vendor_id := vendor_id_3GPP |
| 187 | } |
| 188 | template (present) AVP_Header |
| 189 | tr_DIA_Hdr_3GPP(template (present) AVP_Code avp_code, |
Pau Espin Pedrol | 965ac64 | 2023-10-16 18:12:45 +0200 | [diff] [blame] | 190 | template (present) DIAMETER_Types.BIT8 flags := '1???????'B) := { |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 191 | avp_code := avp_code, |
| 192 | VMPxxxxx := flags, |
| 193 | avp_length := ?, /* overwritten */ |
| 194 | vendor_id := vendor_id_3GPP |
| 195 | } |
| 196 | |
Pau Espin Pedrol | a2af578 | 2022-05-18 16:34:29 +0200 | [diff] [blame] | 197 | template (present) AVP_Address tr_AVP_Address(template (present) AddressType addr_type := ?, |
| 198 | template (present) octetstring addr_data := ?) := { |
| 199 | address_type := addr_type, |
| 200 | address_data := addr_data |
| 201 | } |
| 202 | |
| 203 | template (present) GenericAVP tr_AVP_SubcrId(template (present) DCC_NONE_Subscription_Id t) := { |
| 204 | avp := { |
| 205 | avp_header := tr_DIA_Hdr(c_AVP_Code_DCC_NONE_Subscription_Id), |
| 206 | avp_data := { |
| 207 | avp_DCC_NONE_Subscription_Id := t |
| 208 | } |
| 209 | } |
| 210 | } |
| 211 | |
Pau Espin Pedrol | b8cd34a | 2022-05-18 16:34:12 +0200 | [diff] [blame] | 212 | template (present) GenericAVP tr_AVP_SubcrIdType(template (present) DCC_NONE_Subscription_Id_Type t) := { |
Harald Welte | f9fb63e | 2020-04-26 18:07:19 +0200 | [diff] [blame] | 213 | avp := { |
| 214 | avp_header := tr_DIA_Hdr(c_AVP_Code_DCC_NONE_Subscription_Id_Type), |
| 215 | avp_data := { |
| 216 | avp_DCC_NONE_Subscription_Id_Type := t |
| 217 | } |
| 218 | } |
| 219 | } |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 220 | |
Pau Espin Pedrol | a2af578 | 2022-05-18 16:34:29 +0200 | [diff] [blame] | 221 | template (present) GenericAVP tr_AVP_SubcrIdData(template (present) DCC_NONE_Subscription_Id_Data t) := { |
| 222 | avp := { |
| 223 | avp_header := tr_DIA_Hdr(c_AVP_Code_DCC_NONE_Subscription_Id_Data), |
| 224 | avp_data := { |
| 225 | avp_DCC_NONE_Subscription_Id_Data := t |
| 226 | } |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | template (present) GenericAVP tr_AVP_RequestedAction(template (present) DCC_NONE_Requested_Action t := ?) := { |
| 231 | avp := { |
| 232 | avp_header := tr_DIA_Hdr(c_AVP_Code_DCC_NONE_Requested_Action), |
| 233 | avp_data := { |
| 234 | avp_DCC_NONE_Requested_Action := t |
| 235 | } |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | template (present) GenericAVP tr_AVP_MultipleServicesIndicator(template (present) DCC_NONE_Multiple_Services_Indicator t := ?) := { |
| 240 | avp := { |
| 241 | avp_header := tr_DIA_Hdr(c_AVP_Code_DCC_NONE_Multiple_Services_Indicator), |
| 242 | avp_data := { |
| 243 | avp_DCC_NONE_Multiple_Services_Indicator := t |
| 244 | } |
| 245 | } |
| 246 | } |
| 247 | |
| 248 | template (present) GenericAVP tr_AVP_ServiceContextId(template (present) DCC_NONE_Service_Context_Id id := ?) := { |
| 249 | avp := { |
| 250 | avp_header := tr_DIA_Hdr(c_AVP_Code_DCC_NONE_Service_Context_Id), |
| 251 | avp_data := { |
| 252 | avp_DCC_NONE_Service_Context_Id := id |
| 253 | } |
| 254 | } |
| 255 | } |
| 256 | |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 257 | template (value) GenericAVP ts_AVP_OriginHost(template (value) charstring host) := { |
| 258 | avp := { |
| 259 | avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Origin_Host), |
| 260 | avp_data := { |
| 261 | avp_BASE_NONE_Origin_Host := host |
| 262 | } |
| 263 | } |
| 264 | } |
| 265 | template (present) GenericAVP tr_AVP_OriginHost(template (present) charstring host := ?) := { |
| 266 | avp := { |
| 267 | avp_header := tr_DIA_Hdr(c_AVP_Code_BASE_NONE_Origin_Host), |
| 268 | avp_data := { |
| 269 | avp_BASE_NONE_Origin_Host := host |
| 270 | } |
| 271 | } |
| 272 | } |
| 273 | |
| 274 | |
| 275 | template (value) GenericAVP ts_AVP_OriginRealm(template (value) charstring realm) := { |
| 276 | avp := { |
| 277 | avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Origin_Realm), |
| 278 | avp_data := { |
| 279 | avp_BASE_NONE_Origin_Realm := realm |
| 280 | } |
| 281 | } |
| 282 | } |
| 283 | template (present) GenericAVP tr_AVP_OriginRealm(template (present) charstring realm := ?) := { |
| 284 | avp := { |
| 285 | avp_header := tr_DIA_Hdr(c_AVP_Code_BASE_NONE_Origin_Realm), |
| 286 | avp_data := { |
| 287 | avp_BASE_NONE_Origin_Realm := realm |
| 288 | } |
| 289 | } |
| 290 | } |
| 291 | |
| 292 | |
| 293 | template (value) GenericAVP ts_AVP_OriginStateId(template (value) OCTET4 state_id) := { |
| 294 | avp := { |
| 295 | avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Origin_State_Id), |
| 296 | avp_data := { |
| 297 | avp_BASE_NONE_Origin_State_Id := state_id |
| 298 | } |
| 299 | } |
| 300 | } |
Vadim Yanitskiy | f28b255 | 2021-12-11 03:49:14 +0300 | [diff] [blame] | 301 | template (present) GenericAVP tr_AVP_OriginStateId(template (present) OCTET4 state_id := ?) := { |
| 302 | avp := { |
| 303 | avp_header := tr_DIA_Hdr(c_AVP_Code_BASE_NONE_Origin_State_Id), |
| 304 | avp_data := { |
| 305 | avp_BASE_NONE_Origin_State_Id := state_id |
| 306 | } |
| 307 | } |
| 308 | } |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 309 | |
Pau Espin Pedrol | 4944a5c | 2024-01-24 17:23:01 +0100 | [diff] [blame] | 310 | template (value) GenericAVP ts_AVP_TerminationCause(template (value) BASE_NONE_Termination_Cause tc) := { |
| 311 | avp := { |
| 312 | avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Termination_Cause), |
| 313 | avp_data := { |
| 314 | avp_BASE_NONE_Termination_Cause := tc |
| 315 | } |
| 316 | } |
| 317 | } |
| 318 | |
Pau Espin Pedrol | a2af578 | 2022-05-18 16:34:29 +0200 | [diff] [blame] | 319 | template (present) GenericAVP tr_AVP_TerminationCause(template (present) BASE_NONE_Termination_Cause tc) := { |
| 320 | avp := { |
| 321 | avp_header := tr_DIA_Hdr(c_AVP_Code_BASE_NONE_Termination_Cause), |
| 322 | avp_data := { |
| 323 | avp_BASE_NONE_Termination_Cause := tc |
| 324 | } |
| 325 | } |
| 326 | } |
| 327 | |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 328 | template (value) GenericAVP ts_AVP_HostIpAddr(template (value) OCTET4 ipv4_addr) := { |
| 329 | avp := { |
| 330 | avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Host_IP_Address), |
| 331 | avp_data := { |
| 332 | avp_BASE_NONE_Host_IP_Address := { |
| 333 | address_type := IP, |
| 334 | address_data := ipv4_addr |
| 335 | } |
| 336 | } |
| 337 | } |
| 338 | } |
| 339 | |
Pau Espin Pedrol | 6601f22 | 2024-03-05 18:51:09 +0100 | [diff] [blame] | 340 | template (value) GenericAVP ts_AVP_VendorId(template (value) Vendor_Id vendor_id) := { |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 341 | avp := { |
| 342 | avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Vendor_Id, '00000000'B), |
| 343 | avp_data := { |
Pau Espin Pedrol | 6601f22 | 2024-03-05 18:51:09 +0100 | [diff] [blame] | 344 | avp_BASE_NONE_Vendor_Id := int2oct(enum2int(valueof(vendor_id)), 4) |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 345 | } |
| 346 | } |
| 347 | } |
Pau Espin Pedrol | 7aa4ad8 | 2023-08-28 18:24:24 +0200 | [diff] [blame] | 348 | private function f_tr_AVP_VendorId(template (present) Vendor_Id vendor_id) |
| 349 | return template (present) BASE_NONE_Vendor_Id { |
| 350 | if (istemplatekind(vendor_id, "?")) { |
| 351 | return ?; |
| 352 | } else { |
| 353 | var template (present) BASE_NONE_Vendor_Id c; |
| 354 | c := int2oct(enum2int(valueof(vendor_id)), 4); |
| 355 | return c; |
| 356 | } |
| 357 | } |
| 358 | template (present) GenericAVP tr_AVP_VendorId(template (present) Vendor_Id vendor_id) := { |
| 359 | avp := { |
| 360 | avp_header := tr_DIA_Hdr(c_AVP_Code_BASE_NONE_Vendor_Id), |
| 361 | avp_data := { |
| 362 | avp_BASE_NONE_Vendor_Id := f_tr_AVP_VendorId(vendor_id) |
| 363 | } |
| 364 | } |
| 365 | } |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 366 | |
| 367 | template (value) GenericAVP ts_AVP_ProductName(charstring name) := { |
| 368 | avp := { |
| 369 | avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Product_Name, '00000000'B), |
| 370 | avp_data := { |
| 371 | avp_BASE_NONE_Product_Name := char2oct(name) |
| 372 | } |
| 373 | } |
| 374 | } |
| 375 | |
| 376 | template (value) GenericAVP ts_AVP_FwRevision(octetstring fw_version) := { |
| 377 | avp := { |
| 378 | avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Firmware_Revision, '00000000'B), |
| 379 | avp_data := { |
| 380 | avp_BASE_NONE_Firmware_Revision := fw_version |
| 381 | } |
| 382 | } |
| 383 | } |
| 384 | |
| 385 | template (value) GenericAVP ts_AVP_InbSecId(template (value) OCTET4 inb_sec_id) := { |
| 386 | avp := { |
| 387 | avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Inband_Security_Id), |
| 388 | avp_data := { |
| 389 | avp_BASE_NONE_Inband_Security_Id := inb_sec_id |
| 390 | } |
| 391 | } |
| 392 | } |
| 393 | |
Pau Espin Pedrol | 462f3df | 2023-10-16 18:10:55 +0200 | [diff] [blame] | 394 | private function enum2int_Vendor_Id_tmpl(template Vendor_Id inp) return template integer |
| 395 | { |
| 396 | if (istemplatekind(inp, "omit")) { |
| 397 | return omit; |
| 398 | } else if (istemplatekind(inp, "*")) { |
| 399 | return *; |
| 400 | } else if (istemplatekind(inp, "?")) { |
| 401 | return ?; |
| 402 | } else { |
| 403 | return enum2int(valueof(inp)); |
| 404 | } |
| 405 | } |
| 406 | |
| 407 | template (present) GenericAVP tr_AVP_VendorSpecAppId(template (present) Vendor_Id vendor_id := ?, |
| 408 | template (present) uint32_t auth_app_id := ?) := { |
| 409 | avp := { |
| 410 | avp_header := tr_DIA_Hdr(c_AVP_Code_BASE_NONE_Vendor_Specific_Application_Id), |
| 411 | avp_data := { |
| 412 | avp_BASE_NONE_Vendor_Specific_Application_Id := { |
| 413 | { |
| 414 | avp := { |
| 415 | avp_header := tr_DIA_Hdr(c_AVP_Code_BASE_NONE_Vendor_Id), |
| 416 | avp_data := { |
| 417 | avp_BASE_NONE_Vendor_Id := int2oct_tmpl(enum2int_Vendor_Id_tmpl(vendor_id), 4) |
| 418 | } |
| 419 | } |
| 420 | }, { |
| 421 | avp := { |
| 422 | avp_header := tr_DIA_Hdr(c_AVP_Code_BASE_NONE_Auth_Application_Id), |
| 423 | avp_data := { |
| 424 | avp_BASE_NONE_Auth_Application_Id := int2oct_tmpl(auth_app_id, 4) |
| 425 | } |
| 426 | } |
| 427 | } |
| 428 | } |
| 429 | } |
| 430 | } |
| 431 | } |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 432 | template (value) GenericAVP ts_AVP_VendorSpecAppId(Vendor_Id vendor_id, uint32_t auth_app_id) := { |
| 433 | avp := { |
| 434 | avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Vendor_Specific_Application_Id), |
| 435 | avp_data := { |
| 436 | avp_BASE_NONE_Vendor_Specific_Application_Id := { |
| 437 | { |
| 438 | avp := { |
| 439 | avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Vendor_Id), |
| 440 | avp_data := { |
| 441 | avp_BASE_NONE_Vendor_Id := int2oct(enum2int(vendor_id), 4) |
| 442 | } |
| 443 | } |
| 444 | }, { |
| 445 | avp := { |
| 446 | avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Auth_Application_Id), |
| 447 | avp_data := { |
| 448 | avp_BASE_NONE_Auth_Application_Id := int2oct(auth_app_id, 4) |
| 449 | } |
| 450 | } |
| 451 | } |
| 452 | } |
| 453 | } |
| 454 | } |
| 455 | } |
| 456 | |
| 457 | template (value) GenericAVP ts_AVP_AuthAppId(template (value) OCTET4 auth_app_id) := { |
| 458 | avp := { |
| 459 | avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Auth_Application_Id), |
| 460 | avp_data := { |
| 461 | avp_BASE_NONE_Auth_Application_Id := auth_app_id |
| 462 | } |
| 463 | } |
| 464 | } |
Harald Welte | f400151 | 2020-04-26 21:48:34 +0200 | [diff] [blame] | 465 | template (present) GenericAVP tr_AVP_AuthAppId(template (present) OCTET4 auth_app_id := ?) := { |
| 466 | avp := { |
| 467 | avp_header := tr_DIA_Hdr(c_AVP_Code_BASE_NONE_Auth_Application_Id), |
| 468 | avp_data := { |
| 469 | avp_BASE_NONE_Auth_Application_Id := auth_app_id |
| 470 | } |
| 471 | } |
| 472 | } |
| 473 | |
| 474 | template (value) GenericAVP ts_AVP_CcReqType(template (value) DCC_NONE_CC_Request_Type r) := { |
| 475 | avp := { |
| 476 | avp_header := ts_DIA_Hdr(c_AVP_Code_DCC_NONE_CC_Request_Type), |
| 477 | avp_data := { |
| 478 | avp_DCC_NONE_CC_Request_Type := r |
| 479 | } |
| 480 | } |
| 481 | } |
| 482 | template (present) GenericAVP tr_AVP_CcReqType(template (present) DCC_NONE_CC_Request_Type r := ?) := { |
| 483 | avp := { |
| 484 | avp_header := tr_DIA_Hdr(c_AVP_Code_DCC_NONE_CC_Request_Type), |
| 485 | avp_data := { |
| 486 | avp_DCC_NONE_CC_Request_Type := r |
| 487 | } |
| 488 | } |
| 489 | } |
| 490 | |
| 491 | template (value) GenericAVP ts_AVP_CcReqNum(template (value) AVP_Unsigned32 n) := { |
| 492 | avp := { |
| 493 | avp_header := ts_DIA_Hdr(c_AVP_Code_DCC_NONE_CC_Request_Number), |
| 494 | avp_data := { |
| 495 | avp_DCC_NONE_CC_Request_Number := n |
| 496 | } |
| 497 | } |
| 498 | } |
| 499 | template (present) GenericAVP tr_AVP_CcReqNum(template (present) AVP_Unsigned32 n := ?) := { |
| 500 | avp := { |
| 501 | avp_header := tr_DIA_Hdr(c_AVP_Code_DCC_NONE_CC_Request_Number), |
| 502 | avp_data := { |
| 503 | avp_DCC_NONE_CC_Request_Number := n |
| 504 | } |
| 505 | } |
| 506 | } |
| 507 | |
Pau Espin Pedrol | a2af578 | 2022-05-18 16:34:29 +0200 | [diff] [blame] | 508 | template (present) GenericAVP tr_AVP_EventTimestamp(template (present) AVP_Unsigned32 n := ?) := { |
| 509 | avp := { |
| 510 | avp_header := tr_DIA_Hdr(c_AVP_Code_BASE_NONE_Event_Timestamp), |
| 511 | avp_data := { |
| 512 | avp_BASE_NONE_Event_Timestamp := n |
| 513 | } |
| 514 | } |
| 515 | } |
Harald Welte | f400151 | 2020-04-26 21:48:34 +0200 | [diff] [blame] | 516 | |
Pau Espin Pedrol | 7aa4ad8 | 2023-08-28 18:24:24 +0200 | [diff] [blame] | 517 | template (present) GenericAVP tr_AVP_ExperimentalResultCode(template (present) AVP_Unsigned32 n := ?) := { |
| 518 | avp := { |
| 519 | avp_header := tr_DIA_Hdr(c_AVP_Code_BASE_NONE_Experimental_Result_Code), |
| 520 | avp_data := { |
| 521 | avp_BASE_NONE_Experimental_Result_Code := n |
| 522 | } |
| 523 | } |
| 524 | } |
Pau Espin Pedrol | 6601f22 | 2024-03-05 18:51:09 +0100 | [diff] [blame] | 525 | template (value) GenericAVP ts_AVP_ExperimentalResultCode(template (value) AVP_Unsigned32 n) := { |
| 526 | avp := { |
| 527 | avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Experimental_Result_Code), |
| 528 | avp_data := { |
| 529 | avp_BASE_NONE_Experimental_Result_Code := n |
| 530 | } |
| 531 | } |
| 532 | } |
Pau Espin Pedrol | 7aa4ad8 | 2023-08-28 18:24:24 +0200 | [diff] [blame] | 533 | |
| 534 | template (present) GenericAVP tr_AVP_ExperimentalResult(template (present) Vendor_Id vendor_id := ?, |
| 535 | template (present) AVP_Unsigned32 err_code := ? |
| 536 | ) := { |
| 537 | avp := { |
| 538 | avp_header := tr_DIA_Hdr(c_AVP_Code_BASE_NONE_Experimental_Result), |
| 539 | avp_data := { |
| 540 | avp_BASE_NONE_Experimental_Result := { |
| 541 | tr_AVP_VendorId(vendor_id), |
| 542 | tr_AVP_ExperimentalResultCode(err_code) |
| 543 | } |
| 544 | } |
| 545 | } |
| 546 | } |
Pau Espin Pedrol | 6601f22 | 2024-03-05 18:51:09 +0100 | [diff] [blame] | 547 | template (value) GenericAVP ts_AVP_ExperimentalResult(template (value) Vendor_Id vendor_id := vendor_id_3GPP, |
| 548 | template (value) AVP_Unsigned32 err_code |
| 549 | ) := { |
| 550 | avp := { |
| 551 | avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Experimental_Result), |
| 552 | avp_data := { |
| 553 | avp_BASE_NONE_Experimental_Result := { |
| 554 | ts_AVP_VendorId(vendor_id), |
| 555 | ts_AVP_ExperimentalResultCode(err_code) |
| 556 | } |
| 557 | } |
| 558 | } |
| 559 | } |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 560 | |
| 561 | template (value) GenericAVP ts_AVP_SuppVendorIdRaw(uint32_t vendor_id) := { |
| 562 | avp := { |
| 563 | avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Supported_Vendor_Id), |
| 564 | avp_data := { |
| 565 | avp_BASE_NONE_Supported_Vendor_Id := int2oct(vendor_id, 4) |
| 566 | } |
| 567 | } |
| 568 | } |
| 569 | template (value) GenericAVP ts_AVP_SuppVendorId(Vendor_Id vendor_id) := |
| 570 | ts_AVP_SuppVendorIdRaw(enum2int(vendor_id)); |
| 571 | |
Pau Espin Pedrol | a7823b9 | 2024-03-11 17:55:52 +0100 | [diff] [blame] | 572 | template (value) GenericAVP ts_AVP_ResultCode(template (value) DIAMETER_Resultcode res_code) := { |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 573 | avp := { |
| 574 | avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Result_Code), |
| 575 | avp_data := { |
Pau Espin Pedrol | a7823b9 | 2024-03-11 17:55:52 +0100 | [diff] [blame] | 576 | avp_BASE_NONE_Result_Code := int2oct(enum2int(valueof(res_code)), 4) |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 577 | } |
| 578 | } |
| 579 | } |
Pau Espin Pedrol | 7aa4ad8 | 2023-08-28 18:24:24 +0200 | [diff] [blame] | 580 | private function f_tr_DIAMETER_Resultcode(template (present) DIAMETER_Resultcode res_code) |
| 581 | return template (present) BASE_NONE_Result_Code { |
| 582 | if (istemplatekind(res_code, "?")) { |
| 583 | return ?; |
| 584 | } else { |
| 585 | var template (present) BASE_NONE_Result_Code c; |
| 586 | c := int2oct(enum2int(valueof(res_code)), 4); |
| 587 | return c; |
| 588 | } |
| 589 | } |
| 590 | template (present) GenericAVP tr_AVP_ResultCode(template (present) DIAMETER_Resultcode res_code) := { |
Vadim Yanitskiy | f28b255 | 2021-12-11 03:49:14 +0300 | [diff] [blame] | 591 | avp := { |
| 592 | avp_header := tr_DIA_Hdr(c_AVP_Code_BASE_NONE_Result_Code), |
| 593 | avp_data := { |
Pau Espin Pedrol | 7aa4ad8 | 2023-08-28 18:24:24 +0200 | [diff] [blame] | 594 | avp_BASE_NONE_Result_Code := f_tr_DIAMETER_Resultcode(res_code) |
Vadim Yanitskiy | f28b255 | 2021-12-11 03:49:14 +0300 | [diff] [blame] | 595 | } |
| 596 | } |
| 597 | } |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 598 | |
| 599 | template (value) GenericAVP ts_AVP_AuthSessionState(template (value) BASE_NONE_Auth_Session_State ass := NO_STATE_MAINTAINED) := { |
| 600 | avp := { |
| 601 | avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Auth_Session_State), |
| 602 | avp_data := { |
| 603 | avp_BASE_NONE_Auth_Session_State := ass |
| 604 | } |
| 605 | } |
| 606 | } |
| 607 | template (present) GenericAVP tr_AVP_AuthSessionState(template (present) BASE_NONE_Auth_Session_State ass := ?) := { |
| 608 | avp := { |
| 609 | avp_header := tr_DIA_Hdr(c_AVP_Code_BASE_NONE_Auth_Session_State), |
| 610 | avp_data := { |
| 611 | avp_BASE_NONE_Auth_Session_State := ass |
| 612 | } |
| 613 | } |
| 614 | } |
| 615 | |
| 616 | template (value) GenericAVP ts_AVP_SessionId(template (value) octetstring session_id) := { |
| 617 | avp := { |
| 618 | avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Session_Id), |
| 619 | avp_data := { |
| 620 | avp_BASE_NONE_Session_Id := session_id |
| 621 | } |
| 622 | } |
| 623 | } |
| 624 | template (present) GenericAVP tr_AVP_SessionId(template (present) octetstring session_id := ?) := { |
| 625 | avp := { |
| 626 | avp_header := tr_DIA_Hdr(c_AVP_Code_BASE_NONE_Session_Id), |
| 627 | avp_data := { |
| 628 | avp_BASE_NONE_Session_Id := session_id |
| 629 | } |
| 630 | } |
| 631 | } |
| 632 | |
Pau Espin Pedrol | 3f19ce7 | 2023-12-21 19:09:12 +0100 | [diff] [blame] | 633 | template (value) GenericAVP ts_AVP_DestinationHost(template (value) charstring dest_host) := { |
| 634 | avp := { |
| 635 | avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Destination_Host), |
| 636 | avp_data := { |
| 637 | avp_BASE_NONE_Destination_Host := dest_host |
| 638 | } |
| 639 | } |
| 640 | } |
Pau Espin Pedrol | a2af578 | 2022-05-18 16:34:29 +0200 | [diff] [blame] | 641 | template (present) GenericAVP tr_AVP_DestinationHost(template (present) charstring host := ?) := { |
| 642 | avp := { |
| 643 | avp_header := tr_DIA_Hdr(c_AVP_Code_BASE_NONE_Destination_Host), |
| 644 | avp_data := { |
| 645 | avp_BASE_NONE_Destination_Host := host |
| 646 | } |
| 647 | } |
| 648 | } |
| 649 | |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 650 | /* 3.3 Destination Realm */ |
| 651 | template (value) GenericAVP ts_AVP_DestinationRealm(template (value) charstring dest_realm) := { |
| 652 | avp := { |
| 653 | avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Destination_Realm), |
| 654 | avp_data := { |
| 655 | avp_BASE_NONE_Destination_Realm := dest_realm |
| 656 | } |
| 657 | } |
| 658 | } |
| 659 | template (present) GenericAVP tr_AVP_DestinationRealm(template (present) charstring dest_realm := ?) := { |
| 660 | avp := { |
| 661 | avp_header := tr_DIA_Hdr(c_AVP_Code_BASE_NONE_Destination_Realm), |
| 662 | avp_data := { |
| 663 | avp_BASE_NONE_Destination_Realm := dest_realm |
| 664 | } |
| 665 | } |
| 666 | } |
| 667 | |
| 668 | /* 8.14 User-Name */ |
| 669 | template (value) GenericAVP ts_AVP_UserName(template (value) octetstring uid) := { |
| 670 | avp := { |
| 671 | avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_User_Name), |
| 672 | avp_data := { |
| 673 | avp_BASE_NONE_User_Name := uid |
| 674 | } |
| 675 | } |
| 676 | } |
| 677 | template (present) GenericAVP tr_AVP_UserName(template (present) octetstring uid := ?) := { |
| 678 | avp := { |
| 679 | avp_header := tr_DIA_Hdr(c_AVP_Code_BASE_NONE_User_Name), |
| 680 | avp_data := { |
| 681 | avp_BASE_NONE_User_Name := uid |
| 682 | } |
| 683 | } |
| 684 | } |
Pau Espin Pedrol | d9ff19e | 2024-03-11 12:16:13 +0100 | [diff] [blame] | 685 | template (value) GenericAVP ts_AVP_UserNameImsi(template (value) hexstring imsi) := ts_AVP_UserName(char2oct(hex2str(valueof(imsi)))); |
Pau Espin Pedrol | f4619d8 | 2023-10-16 18:08:07 +0200 | [diff] [blame] | 686 | template (present) GenericAVP tr_AVP_UserNameImsi(template (present) hexstring imsi := ?) := tr_AVP_UserName(char2oct_tmpl(hex2str_tmpl(imsi))); |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 687 | |
| 688 | |
Harald Welte | 6effabb | 2020-02-18 21:39:59 +0100 | [diff] [blame] | 689 | template (value) GenericAVP ts_AVP_NumOfReqVectors(template (value) UINT32 num_req := '00000004'O) := { |
| 690 | avp := { |
| 691 | avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Number_Of_Requested_Vectors), |
| 692 | avp_data := { |
| 693 | avp_AAA_3GPP_Number_Of_Requested_Vectors := num_req |
| 694 | } |
| 695 | } |
| 696 | } |
| 697 | |
| 698 | template (value) GenericAVP ts_AVP_ImmReqPref(template (value) UINT32 par := '00000000'O) := { |
| 699 | avp := { |
| 700 | avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Immediate_Response_Preferred), |
| 701 | avp_data := { |
| 702 | avp_AAA_3GPP_Immediate_Response_Preferred := par |
| 703 | } |
| 704 | } |
| 705 | } |
| 706 | |
| 707 | |
| 708 | /* 7.3.11 Requested-EUTRAN-Authentication-Info */ |
| 709 | template (value) GenericAVP ts_AVP_RequestedEutranAuthInfo(template (value) UINT32 num_vec := '00000004'O) := { |
| 710 | avp := { |
| 711 | avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Requested_EUTRAN_Authentication_Info), |
| 712 | avp_data := { |
| 713 | avp_AAA_3GPP_Requested_EUTRAN_Authentication_Info := { |
| 714 | ts_AVP_NumOfReqVectors(num_vec), |
| 715 | ts_AVP_ImmReqPref('00000000'O) |
| 716 | } |
| 717 | } |
| 718 | } |
| 719 | } |
| 720 | |
Pau Espin Pedrol | 446145a | 2023-10-10 19:12:21 +0200 | [diff] [blame] | 721 | template (present) GenericAVP tr_AVP_3GPP_SubscrRauTauTmr(template (present) uint32_t tmr := ?) := { |
| 722 | avp := { |
| 723 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Subscribed_Periodic_RAU_TAU_Timer), |
| 724 | avp_data := { |
| 725 | avp_AAA_3GPP_Subscribed_Periodic_RAU_TAU_Timer := int2oct_tmpl(tmr, 4) |
| 726 | } |
| 727 | } |
| 728 | } |
| 729 | |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 730 | template (value) GenericAVP ts_AVP_3GPP_SubscrRauTauTmr(uint32_t tmr) := { |
| 731 | avp := { |
| 732 | avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Subscribed_Periodic_RAU_TAU_Timer), |
| 733 | avp_data := { |
| 734 | avp_AAA_3GPP_Subscribed_Periodic_RAU_TAU_Timer := int2oct(tmr, 4) |
| 735 | } |
| 736 | } |
| 737 | } |
| 738 | |
Pau Espin Pedrol | 6477d73 | 2022-06-03 12:04:40 +0200 | [diff] [blame] | 739 | template (present) GenericAVP tr_AVP_PCC_3GPP_QoS_Information(template (present) AVP_list list := ?) := { |
Pau Espin Pedrol | a2af578 | 2022-05-18 16:34:29 +0200 | [diff] [blame] | 740 | avp := { |
| 741 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_PCC_3GPP_QoS_Information), |
| 742 | avp_data := { |
| 743 | avp_PCC_3GPP_QoS_Information := list |
| 744 | } |
| 745 | } |
| 746 | } |
| 747 | |
Pau Espin Pedrol | 6477d73 | 2022-06-03 12:04:40 +0200 | [diff] [blame] | 748 | template (value) GenericAVP ts_AVP_PCC_3GPP_QoS_Information(template (value) AVP_list list) := { |
| 749 | avp := { |
| 750 | avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_PCC_3GPP_QoS_Information), |
| 751 | avp_data := { |
| 752 | avp_PCC_3GPP_QoS_Information := list |
| 753 | } |
| 754 | } |
| 755 | } |
| 756 | |
| 757 | template (value) GenericAVP ts_AVP_PCC_3GPP_APN_Aggregate_Max_Bitrate_DL(uint32_t val) := { |
| 758 | avp := { |
| 759 | avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_PCC_3GPP_APN_Aggregate_Max_Bitrate_DL), |
| 760 | avp_data := { |
| 761 | avp_PCC_3GPP_APN_Aggregate_Max_Bitrate_DL := int2oct(val, 4) |
| 762 | } |
| 763 | } |
| 764 | } |
| 765 | |
| 766 | template (value) GenericAVP ts_AVP_PCC_3GPP_APN_Aggregate_Max_Bitrate_UL(uint32_t val) := { |
| 767 | avp := { |
| 768 | avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_PCC_3GPP_APN_Aggregate_Max_Bitrate_UL), |
| 769 | avp_data := { |
| 770 | avp_PCC_3GPP_APN_Aggregate_Max_Bitrate_UL := int2oct(val, 4) |
| 771 | } |
| 772 | } |
| 773 | } |
| 774 | |
| 775 | template (value) GenericAVP ts_AVP_PCC_3GPP_Default_EPS_Bearer_QoS(template (value) AVP_list list) := { |
| 776 | avp := { |
| 777 | avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_PCC_3GPP_Default_EPS_Bearer_QoS), |
| 778 | avp_data := { |
| 779 | avp_PCC_3GPP_Default_EPS_Bearer_QoS := list |
| 780 | } |
| 781 | } |
| 782 | } |
| 783 | |
Pau Espin Pedrol | 446145a | 2023-10-10 19:12:21 +0200 | [diff] [blame] | 784 | template (present) GenericAVP tr_AVP_PCC_3GPP_QoS_Class_Identifier(template (present) uint32_t val := ?) := { |
| 785 | avp := { |
| 786 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_PCC_3GPP_QoS_Class_Identifier), |
| 787 | avp_data := { |
| 788 | avp_PCC_3GPP_QoS_Class_Identifier := int2oct_tmpl(val, 4) |
| 789 | } |
| 790 | } |
| 791 | } |
| 792 | |
Pau Espin Pedrol | 6477d73 | 2022-06-03 12:04:40 +0200 | [diff] [blame] | 793 | template (value) GenericAVP ts_AVP_PCC_3GPP_QoS_Class_Identifier(uint32_t val) := { |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 794 | avp := { |
| 795 | avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_PCC_3GPP_QoS_Class_Identifier), |
| 796 | avp_data := { |
Pau Espin Pedrol | 6477d73 | 2022-06-03 12:04:40 +0200 | [diff] [blame] | 797 | avp_PCC_3GPP_QoS_Class_Identifier := int2oct(val, 4) |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 798 | } |
| 799 | } |
| 800 | } |
| 801 | |
Pau Espin Pedrol | 446145a | 2023-10-10 19:12:21 +0200 | [diff] [blame] | 802 | template (present) GenericAVP tr_AVP_3GPP_PriorityLevel(template (present) uint32_t prio := ?) := { |
| 803 | avp := { |
| 804 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_PCC_3GPP_Priority_Level), |
| 805 | avp_data := { |
| 806 | avp_PCC_3GPP_Priority_Level := int2oct_tmpl(prio, 4) |
| 807 | } |
| 808 | } |
| 809 | } |
| 810 | |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 811 | template (value) GenericAVP ts_AVP_3GPP_PriorityLevel(uint32_t prio) := { |
| 812 | avp := { |
| 813 | avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_PCC_3GPP_Priority_Level), |
| 814 | avp_data := { |
| 815 | avp_PCC_3GPP_Priority_Level := int2oct(prio, 4) |
| 816 | } |
| 817 | } |
| 818 | } |
| 819 | |
Pau Espin Pedrol | 446145a | 2023-10-10 19:12:21 +0200 | [diff] [blame] | 820 | template (present) GenericAVP tr_AVP_PCC_3GPP_AllocRetenPrio(template (present) uint32_t prio := ?) := { |
| 821 | avp := { |
| 822 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_PCC_3GPP_Allocation_Retention_Priority), |
| 823 | avp_data := { |
| 824 | avp_PCC_3GPP_Allocation_Retention_Priority := superset( |
| 825 | tr_AVP_3GPP_PriorityLevel(prio) |
| 826 | /* pre-emption capability */ |
| 827 | /* pre-emption vulnerability */ |
| 828 | ) |
| 829 | } |
| 830 | } |
| 831 | } |
Pau Espin Pedrol | 6477d73 | 2022-06-03 12:04:40 +0200 | [diff] [blame] | 832 | template (value) GenericAVP ts_AVP_PCC_3GPP_AllocRetenPrio(uint32_t prio) := { |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 833 | avp := { |
| 834 | avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_PCC_3GPP_Allocation_Retention_Priority), |
| 835 | avp_data := { |
| 836 | avp_PCC_3GPP_Allocation_Retention_Priority := { |
| 837 | ts_AVP_3GPP_PriorityLevel(prio) |
| 838 | /* pre-emption capability */ |
| 839 | /* pre-emption vulnerability */ |
| 840 | } |
| 841 | } |
| 842 | } |
| 843 | } |
| 844 | |
Pau Espin Pedrol | 446145a | 2023-10-10 19:12:21 +0200 | [diff] [blame] | 845 | /* 7.3.37 EPS-Subscribed-QoS-Profile */ |
| 846 | template (present) GenericAVP tr_AVP_3GPP_EpsSubscrQosProfile(template (present) uint32_t qos_class := ?, |
| 847 | template (present) uint32_t prio := ?) := { |
| 848 | avp := { |
| 849 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_EPS_Subscribed_QoS_Profile), |
| 850 | avp_data := { |
| 851 | avp_AAA_3GPP_EPS_Subscribed_QoS_Profile := superset( |
| 852 | tr_AVP_PCC_3GPP_QoS_Class_Identifier(qos_class), |
| 853 | tr_AVP_PCC_3GPP_AllocRetenPrio(prio) |
| 854 | ) |
| 855 | } |
| 856 | } |
| 857 | } |
| 858 | |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 859 | template (value) GenericAVP ts_AVP_3GPP_EpsSubscrQosProfile(uint32_t qos_class, uint32_t prio) := { |
| 860 | avp := { |
| 861 | avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_EPS_Subscribed_QoS_Profile), |
| 862 | avp_data := { |
| 863 | avp_AAA_3GPP_EPS_Subscribed_QoS_Profile := { |
Pau Espin Pedrol | 6477d73 | 2022-06-03 12:04:40 +0200 | [diff] [blame] | 864 | ts_AVP_PCC_3GPP_QoS_Class_Identifier(qos_class), |
| 865 | ts_AVP_PCC_3GPP_AllocRetenPrio(prio) |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 866 | } |
| 867 | } |
| 868 | } |
| 869 | } |
| 870 | |
Pau Espin Pedrol | a2af578 | 2022-05-18 16:34:29 +0200 | [diff] [blame] | 871 | template (present) GenericAVP tr_AVP_3GPP_Reporting_Reason(template (present) DCA_3GPP_Reporting_Reason r := ?) := { |
| 872 | avp := { |
| 873 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_DCA_3GPP_Reporting_Reason), |
| 874 | avp_data := { |
| 875 | avp_DCA_3GPP_Reporting_Reason := r |
| 876 | } |
| 877 | } |
| 878 | } |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 879 | |
Pau Espin Pedrol | a2af578 | 2022-05-18 16:34:29 +0200 | [diff] [blame] | 880 | template (present) GenericAVP tr_AVP_3GPP_AoCRequestType(template (present) DCA_3GPP_AoC_Request_Type t := ?) := { |
| 881 | avp := { |
| 882 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_DCA_3GPP_AoC_Request_Type), |
| 883 | avp_data := { |
| 884 | avp_DCA_3GPP_AoC_Request_Type := t |
| 885 | } |
| 886 | } |
| 887 | } |
| 888 | |
| 889 | template (present) GenericAVP tr_AVP_3GPP_ServiceInformation(template (present) AVP_list content := ?) := { |
| 890 | avp := { |
| 891 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_DCA_3GPP_Service_Information), |
| 892 | avp_data := { |
| 893 | avp_DCA_3GPP_Service_Information := content |
| 894 | } |
| 895 | } |
| 896 | } |
| 897 | |
| 898 | template (present) GenericAVP tr_AVP_3GPP_PSInformation(template (present) AVP_list content := ?) := { |
| 899 | avp := { |
| 900 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_DCA_3GPP_PS_Information), |
| 901 | avp_data := { |
| 902 | avp_DCA_3GPP_PS_Information := content |
| 903 | } |
| 904 | } |
| 905 | } |
| 906 | |
| 907 | template (present) GenericAVP tr_AVP_3GPP_ChargingId(template (present) AVP_OctetString id := ?) := { |
| 908 | avp := { |
| 909 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_GI_3GPP_3GPP_Charging_Id), |
| 910 | avp_data := { |
| 911 | avp_GI_3GPP_3GPP_Charging_Id := id |
| 912 | } |
| 913 | } |
| 914 | } |
| 915 | |
| 916 | template (present) GenericAVP tr_AVP_3GPP_PDPType(template (present) GI_3GPP_3GPP_PDP_Type t := ?) := { |
| 917 | avp := { |
| 918 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_GI_3GPP_3GPP_PDP_Type), |
| 919 | avp_data := { |
| 920 | avp_GI_3GPP_3GPP_PDP_Type := t |
| 921 | } |
| 922 | } |
| 923 | } |
| 924 | |
| 925 | template (present) GenericAVP tr_AVP_3GPP_PDPAddress(template (present) DCA_3GPP_PDP_Address addr := ?) := { |
| 926 | avp := { |
| 927 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_DCA_3GPP_PDP_Address), |
| 928 | avp_data := { |
| 929 | avp_DCA_3GPP_PDP_Address := addr |
| 930 | } |
| 931 | } |
| 932 | } |
| 933 | |
| 934 | template (present) GenericAVP tr_AVP_3GPP_SGSNAddress(template (present) DCA_3GPP_SGSN_Address addr := ?) := { |
| 935 | avp := { |
| 936 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_DCA_3GPP_SGSN_Address), |
| 937 | avp_data := { |
| 938 | avp_DCA_3GPP_SGSN_Address := addr |
| 939 | } |
| 940 | } |
| 941 | } |
| 942 | |
| 943 | template (present) GenericAVP tr_AVP_3GPP_GGSNAddress(template (present) DCA_3GPP_GGSN_Address addr := ?) := { |
| 944 | avp := { |
| 945 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_DCA_3GPP_GGSN_Address), |
| 946 | avp_data := { |
| 947 | avp_DCA_3GPP_GGSN_Address := addr |
| 948 | } |
| 949 | } |
| 950 | } |
| 951 | |
| 952 | template (present) GenericAVP tr_AVP_3GPP_SelectionMode(template (present) GI_3GPP_3GPP_Selection_Mode sm := ?) := { |
| 953 | avp := { |
| 954 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_GI_3GPP_3GPP_Selection_Mode), |
| 955 | avp_data := { |
| 956 | avp_GI_3GPP_3GPP_Selection_Mode := sm |
| 957 | } |
| 958 | } |
| 959 | } |
| 960 | |
| 961 | template (present) GenericAVP tr_AVP_3GPP_ChargingCharacteristics(template (present) GI_3GPP_3GPP_Charging_Characteristics cc := ?) := { |
| 962 | avp := { |
| 963 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_GI_3GPP_3GPP_Charging_Characteristics), |
| 964 | avp_data := { |
| 965 | avp_GI_3GPP_3GPP_Charging_Characteristics := cc |
| 966 | } |
| 967 | } |
| 968 | } |
| 969 | |
| 970 | template (present) GenericAVP tr_AVP_3GPP_SGSNMCCMNC(template (present) GI_3GPP_3GPP_SGSN_MCC_MNC smn := ?) := { |
| 971 | avp := { |
| 972 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_GI_3GPP_3GPP_SGSN_MCC_MNC), |
| 973 | avp_data := { |
| 974 | avp_GI_3GPP_3GPP_SGSN_MCC_MNC := smn |
| 975 | } |
| 976 | } |
| 977 | } |
| 978 | |
| 979 | template (present) GenericAVP tr_AVP_3GPP_NSAPI(template (present) GI_3GPP_3GPP_NSAPI nsapi := ?) := { |
| 980 | avp := { |
| 981 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_GI_3GPP_3GPP_NSAPI), |
| 982 | avp_data := { |
| 983 | avp_GI_3GPP_3GPP_NSAPI := nsapi |
| 984 | } |
| 985 | } |
| 986 | } |
| 987 | |
| 988 | template (present) GenericAVP tr_AVP_3GPP_MS_TimeZone(template (present) GI_3GPP_3GPP_MS_TimeZone ms_tz := ?) := { |
| 989 | avp := { |
| 990 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_GI_3GPP_3GPP_MS_TimeZone), |
| 991 | avp_data := { |
| 992 | avp_GI_3GPP_3GPP_MS_TimeZone := ms_tz |
| 993 | } |
| 994 | } |
| 995 | } |
| 996 | |
| 997 | template (present) GenericAVP tr_AVP_3GPP_ULI(template (present) GI_3GPP_3GPP_User_Location_Info uli := ?) := { |
| 998 | avp := { |
| 999 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_GI_3GPP_3GPP_User_Location_Info), |
| 1000 | avp_data := { |
| 1001 | avp_GI_3GPP_3GPP_User_Location_Info := uli |
| 1002 | } |
| 1003 | } |
| 1004 | } |
| 1005 | |
| 1006 | template (present) GenericAVP tr_AVP_UserEquipmentInfo(template (present) DCC_NONE_User_Equipment_Info uei := ?) := { |
| 1007 | avp := { |
| 1008 | avp_header := tr_DIA_Hdr(c_AVP_Code_DCC_NONE_User_Equipment_Info), |
| 1009 | avp_data := { |
| 1010 | avp_DCC_NONE_User_Equipment_Info := uei |
| 1011 | } |
| 1012 | } |
| 1013 | } |
| 1014 | |
| 1015 | template (present) GenericAVP tr_AVP_UserEquipmentInfoType(template (present) DCC_NONE_User_Equipment_Info_Type ueit := ?) := { |
| 1016 | avp := { |
| 1017 | avp_header := tr_DIA_Hdr(c_AVP_Code_DCC_NONE_User_Equipment_Info_Type), |
| 1018 | avp_data := { |
| 1019 | avp_DCC_NONE_User_Equipment_Info_Type := ueit |
| 1020 | } |
| 1021 | } |
| 1022 | } |
| 1023 | |
| 1024 | template (present) GenericAVP tr_AVP_UserEquipmentInfoValue(template (present) DCC_NONE_User_Equipment_Info_Value ueiv := ?) := { |
| 1025 | avp := { |
| 1026 | avp_header := tr_DIA_Hdr(c_AVP_Code_DCC_NONE_User_Equipment_Info_Value), |
| 1027 | avp_data := { |
| 1028 | avp_DCC_NONE_User_Equipment_Info_Value := ueiv |
| 1029 | } |
| 1030 | } |
| 1031 | } |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 1032 | |
Pau Espin Pedrol | 77fdd0b | 2022-03-08 14:03:33 +0100 | [diff] [blame] | 1033 | /* RFC4006 8.16 Multiple-Services-Credit-Control AVP */ |
| 1034 | template (value) GenericAVP ts_AVP_Multiple_Services_Credit_Control(template (value) AVP_list content) := { |
| 1035 | avp := { |
| 1036 | avp_header := ts_DIA_Hdr(c_AVP_Code_DCC_NONE_Multiple_Services_Credit_Control), |
| 1037 | avp_data := { |
| 1038 | avp_DCC_NONE_Multiple_Services_Credit_Control := content |
| 1039 | } |
| 1040 | } |
| 1041 | } |
Pau Espin Pedrol | a2af578 | 2022-05-18 16:34:29 +0200 | [diff] [blame] | 1042 | template (present) GenericAVP tr_AVP_Multiple_Services_Credit_Control(template (present) AVP_list content := ?) := { |
| 1043 | avp := { |
| 1044 | avp_header := tr_DIA_Hdr(c_AVP_Code_DCC_NONE_Multiple_Services_Credit_Control), |
| 1045 | avp_data := { |
| 1046 | avp_DCC_NONE_Multiple_Services_Credit_Control := content |
| 1047 | } |
| 1048 | } |
| 1049 | } |
| 1050 | |
| 1051 | /* Requested-Service-Unit AVP */ |
| 1052 | template (present) GenericAVP tr_AVP_Requested_Service_Unit(template (present) AVP_list content := ?) := { |
| 1053 | avp := { |
| 1054 | avp_header := tr_DIA_Hdr(c_AVP_Code_DCC_NONE_Requested_Service_Unit), |
| 1055 | avp_data := { |
| 1056 | avp_DCC_NONE_Requested_Service_Unit := content |
| 1057 | } |
| 1058 | } |
| 1059 | } |
| 1060 | |
| 1061 | /* Used-Service-Unit AVP */ |
| 1062 | template (present) GenericAVP tr_AVP_Used_Service_Unit(template (present) AVP_list content := ?) := { |
| 1063 | avp := { |
| 1064 | avp_header := tr_DIA_Hdr(c_AVP_Code_DCC_NONE_Used_Service_Unit), |
| 1065 | avp_data := { |
| 1066 | avp_DCC_NONE_Used_Service_Unit := content |
| 1067 | } |
| 1068 | } |
| 1069 | } |
Pau Espin Pedrol | 77fdd0b | 2022-03-08 14:03:33 +0100 | [diff] [blame] | 1070 | |
| 1071 | /* RFC4006 8.17 Granted-Service-Unit AVP */ |
| 1072 | template (value) GenericAVP ts_AVP_Granted_Service_Unit(template (value) AVP_list content) := { |
| 1073 | avp := { |
| 1074 | avp_header := ts_DIA_Hdr(c_AVP_Code_DCC_NONE_Granted_Service_Unit), |
| 1075 | avp_data := { |
| 1076 | avp_DCC_NONE_Granted_Service_Unit := content |
| 1077 | } |
| 1078 | } |
| 1079 | } |
| 1080 | |
| 1081 | /* RFC4006 8.21 CC-Time AVP */ |
| 1082 | template (value) GenericAVP ts_AVP_CC_Time(uint32_t cc_time_val) := { |
| 1083 | avp := { |
| 1084 | avp_header := ts_DIA_Hdr(c_AVP_Code_DCC_NONE_CC_Time), |
| 1085 | avp_data := { |
| 1086 | avp_DCC_NONE_CC_Time := int2oct(cc_time_val, 4) |
| 1087 | } |
| 1088 | } |
| 1089 | } |
| 1090 | |
| 1091 | /* RFC4006 8.23 CC-Total-Octets AVP */ |
| 1092 | template (value) GenericAVP ts_AVP_CC_Total_Octets(uint64_t cc_total_octets_val) := { |
| 1093 | avp := { |
| 1094 | avp_header := ts_DIA_Hdr(c_AVP_Code_DCC_NONE_CC_Total_Octets), |
| 1095 | avp_data := { |
| 1096 | avp_DCC_NONE_CC_Total_Octets := int2oct(cc_total_octets_val, 8) |
| 1097 | } |
| 1098 | } |
| 1099 | } |
| 1100 | |
| 1101 | /* RFC4006 8.33 Validity-Time AVP */ |
| 1102 | template (value) GenericAVP ts_AVP_Validity_Time(uint32_t validity_time_val) := { |
| 1103 | avp := { |
| 1104 | avp_header := ts_DIA_Hdr(c_AVP_Code_DCC_NONE_Validity_Time), |
| 1105 | avp_data := { |
| 1106 | avp_DCC_NONE_Validity_Time := int2oct(validity_time_val, 4) |
| 1107 | } |
| 1108 | } |
| 1109 | } |
| 1110 | |
Pau Espin Pedrol | 52562c9 | 2022-05-23 15:45:46 +0200 | [diff] [blame] | 1111 | template (value) GenericAVP ts_AVP_3GPP_VolumeQuotaThreshold(uint32_t volume_quota_thresh_val) := { |
| 1112 | avp := { |
| 1113 | avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_DCA_3GPP_Volume_Quota_Threshold), |
| 1114 | avp_data := { |
| 1115 | avp_DCA_3GPP_Volume_Quota_Threshold := int2oct(volume_quota_thresh_val, 4) |
| 1116 | } |
| 1117 | } |
| 1118 | } |
| 1119 | |
Pau Espin Pedrol | a2af578 | 2022-05-18 16:34:29 +0200 | [diff] [blame] | 1120 | template (present) GenericAVP tr_AVP_3GPP_CalledStationId(template (present) DNAS_NONE_Called_Station_Id id := ?) := { |
| 1121 | avp := { |
| 1122 | avp_header := tr_DIA_Hdr(c_AVP_Code_DNAS_NONE_Called_Station_Id), |
| 1123 | avp_data := { |
| 1124 | avp_DNAS_NONE_Called_Station_Id := id |
| 1125 | } |
| 1126 | } |
| 1127 | } |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 1128 | |
Pau Espin Pedrol | 44b7520 | 2023-10-23 14:37:24 +0200 | [diff] [blame] | 1129 | /* RFC6733 8.7. Auth-Request-Type AVP */ |
| 1130 | template (value) GenericAVP ts_AVP_AuthRequestType(BASE_NONE_Auth_Request_Type auth_req_type) := { |
| 1131 | avp := { |
| 1132 | avp_header := ts_DIA_Hdr(c_AVP_Code_BASE_NONE_Auth_Request_Type, '00000000'B), |
| 1133 | avp_data := { |
| 1134 | avp_BASE_NONE_Auth_Request_Type := auth_req_type |
| 1135 | } |
| 1136 | } |
| 1137 | } |
| 1138 | template (present) GenericAVP tr_AVP_AuthRequestType(template (present) BASE_NONE_Auth_Request_Type auth_req_type) := { |
| 1139 | avp := { |
| 1140 | avp_header := tr_DIA_Hdr(c_AVP_Code_BASE_NONE_Auth_Request_Type), |
| 1141 | avp_data := { |
| 1142 | avp_BASE_NONE_Auth_Request_Type := auth_req_type |
| 1143 | } |
| 1144 | } |
| 1145 | } |
| 1146 | |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 1147 | |
Vadim Yanitskiy | 0d6cbd3 | 2023-02-11 08:07:27 +0700 | [diff] [blame] | 1148 | /* 5.3.1 Capabilities Exchange Request */ |
| 1149 | template (value) PDU_DIAMETER |
| 1150 | ts_DIA_CER(octetstring host_ip, uint32_t vendor_app_id, |
| 1151 | template (value) charstring orig_host := "ttcn3.localdomain", |
| 1152 | template (value) charstring orig_realm := "localdomain", |
| 1153 | template (value) UINT32 hbh_id := '00000000'O, |
| 1154 | template (value) UINT32 ete_id := '00000000'O) := |
| 1155 | ts_DIAMETER(flags := '10000000'B, |
| 1156 | cmd_code := Capabilities_Exchange, |
| 1157 | hbh_id := hbh_id, |
| 1158 | ete_id := ete_id, |
| 1159 | avps := { |
| 1160 | ts_AVP_OriginHost(orig_host), |
| 1161 | ts_AVP_OriginRealm(orig_realm), |
| 1162 | ts_AVP_HostIpAddr(host_ip), |
| 1163 | ts_AVP_VendorId(vendor_id_3GPP), |
| 1164 | ts_AVP_ProductName("TTCN-3 Testsuite"), |
| 1165 | ts_AVP_FwRevision('00000000'O), |
| 1166 | ts_AVP_InbSecId('00000000'O), |
| 1167 | ts_AVP_AuthAppId('FFFFFFFF'O), |
| 1168 | ts_AVP_VendorSpecAppId(vendor_id_3GPP, vendor_app_id) |
| 1169 | }); |
| 1170 | |
| 1171 | |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 1172 | /* 5.3.2 Capabilities Exchange Answer */ |
| 1173 | template (value) PDU_DIAMETER |
Pau Espin Pedrol | 33b4749 | 2022-03-08 17:43:01 +0100 | [diff] [blame] | 1174 | ts_DIA_CEA_AUTH_APP_ID(template (value) UINT32 hbh_id, template (value) UINT32 ete_id, |
| 1175 | template (value) charstring origin_host, |
| 1176 | template (value) charstring origin_realm, |
| 1177 | template (value) octetstring host_ip, uint32_t auth_app_id) |
| 1178 | := ts_DIAMETER(flags:='00000000'B, cmd_code:=Capabilities_Exchange, hbh_id:=hbh_id, ete_id:=ete_id, |
| 1179 | avps := { |
| 1180 | ts_AVP_ResultCode(DIAMETER_SUCCESS), |
| 1181 | ts_AVP_OriginHost(origin_host), |
| 1182 | ts_AVP_OriginRealm(origin_realm), |
| 1183 | ts_AVP_HostIpAddr(host_ip), |
| 1184 | ts_AVP_VendorId(vendor_id_3GPP), |
| 1185 | ts_AVP_ProductName("TTCN-3 Testsuite"), |
| 1186 | ts_AVP_OriginStateId('00000001'O), |
| 1187 | ts_AVP_SuppVendorIdRaw(5535), /* 3GPP2 */ |
| 1188 | ts_AVP_SuppVendorId(vendor_id_3GPP), |
| 1189 | ts_AVP_SuppVendorIdRaw(13019), /* ETSI */ |
Pau Espin Pedrol | 33b4749 | 2022-03-08 17:43:01 +0100 | [diff] [blame] | 1190 | ts_AVP_AuthAppId(int2oct(auth_app_id, 4)), |
| 1191 | ts_AVP_InbSecId('00000000'O) |
| 1192 | }); |
| 1193 | template (value) PDU_DIAMETER |
| 1194 | ts_DIA_CEA_VENDOR_APP_ID(template (value) UINT32 hbh_id, template (value) UINT32 ete_id, |
| 1195 | template (value) charstring origin_host, |
| 1196 | template (value) charstring origin_realm, |
| 1197 | template (value) octetstring host_ip, uint32_t vendor_app_id) |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 1198 | := ts_DIAMETER(flags:='00000000'B, cmd_code:=Capabilities_Exchange, hbh_id:=hbh_id, ete_id:=ete_id, |
| 1199 | avps := { |
| 1200 | ts_AVP_ResultCode(DIAMETER_SUCCESS), |
Harald Welte | 61f73d5 | 2020-04-26 21:41:12 +0200 | [diff] [blame] | 1201 | ts_AVP_OriginHost(origin_host), |
| 1202 | ts_AVP_OriginRealm(origin_realm), |
| 1203 | ts_AVP_HostIpAddr(host_ip), |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 1204 | ts_AVP_VendorId(vendor_id_3GPP), |
| 1205 | ts_AVP_ProductName("TTCN-3 Testsuite"), |
| 1206 | ts_AVP_OriginStateId('00000001'O), |
| 1207 | ts_AVP_SuppVendorIdRaw(5535), /* 3GPP2 */ |
| 1208 | ts_AVP_SuppVendorId(vendor_id_3GPP), |
| 1209 | ts_AVP_SuppVendorIdRaw(13019), /* ETSI */ |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 1210 | ts_AVP_InbSecId('00000000'O), |
Harald Welte | 61f73d5 | 2020-04-26 21:41:12 +0200 | [diff] [blame] | 1211 | ts_AVP_VendorSpecAppId(vendor_id_3GPP, vendor_app_id) |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 1212 | }); |
Pau Espin Pedrol | 33b4749 | 2022-03-08 17:43:01 +0100 | [diff] [blame] | 1213 | function f_ts_DIA_CEA(template (value) UINT32 hbh_id, template (value) UINT32 ete_id, |
| 1214 | template (value) charstring origin_host, |
| 1215 | template (value) charstring origin_realm, |
| 1216 | template (value) octetstring host_ip, template (omit) uint32_t auth_app_id, |
| 1217 | template (omit) uint32_t vendor_app_id) |
| 1218 | return template (value) PDU_DIAMETER |
| 1219 | { |
| 1220 | var template (value) PDU_DIAMETER diam_pdu; |
| 1221 | if (istemplatekind(vendor_app_id, "omit")) { |
| 1222 | diam_pdu := ts_DIA_CEA_AUTH_APP_ID(hbh_id, ete_id, origin_host, origin_realm, host_ip, valueof(auth_app_id)); |
| 1223 | } else { |
| 1224 | diam_pdu := ts_DIA_CEA_VENDOR_APP_ID(hbh_id, ete_id, origin_host, origin_realm, host_ip, valueof(vendor_app_id)); |
| 1225 | } |
| 1226 | return diam_pdu; |
| 1227 | } |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 1228 | |
Vadim Yanitskiy | f28b255 | 2021-12-11 03:49:14 +0300 | [diff] [blame] | 1229 | /* RFC 6733, section 5.5.1 "Device-Watchdog-Request" */ |
| 1230 | template (value) PDU_DIAMETER |
| 1231 | ts_DIA_DWR(template (value) OCTET4 state_id := '00000000'O, |
| 1232 | template (value) charstring orig_host := "ttcn3.localdomain", |
| 1233 | template (value) charstring orig_realm := "localdomain", |
| 1234 | template (value) UINT32 hbh_id := '00000000'O, |
| 1235 | template (value) UINT32 ete_id := '00000000'O) := |
| 1236 | ts_DIAMETER(flags := '10000000'B, |
| 1237 | cmd_code := Device_Watchdog, |
| 1238 | app_id := '00000000'O, |
| 1239 | hbh_id := hbh_id, |
| 1240 | ete_id := ete_id, |
| 1241 | avps := { |
| 1242 | ts_AVP_OriginHost(orig_host), |
| 1243 | ts_AVP_OriginRealm(orig_realm), |
| 1244 | ts_AVP_OriginStateId(state_id) |
| 1245 | }); |
| 1246 | template (present) PDU_DIAMETER |
| 1247 | tr_DIA_DWR(template (present) OCTET4 state_id := ?, |
| 1248 | template (present) charstring orig_host := ?, |
| 1249 | template (present) charstring orig_realm := ?, |
| 1250 | template (present) UINT32 hbh_id := ?, |
| 1251 | template (present) UINT32 ete_id := ?) := |
| 1252 | tr_DIAMETER(flags := '1???????'B, |
| 1253 | cmd_code := Device_Watchdog, |
| 1254 | app_id := '00000000'O, |
| 1255 | hbh_id := hbh_id, |
| 1256 | ete_id := ete_id, |
| 1257 | avps := superset( |
| 1258 | tr_AVP_OriginHost(orig_host), |
Pau Espin Pedrol | 8dcb061 | 2023-08-28 19:16:29 +0200 | [diff] [blame] | 1259 | tr_AVP_OriginRealm(orig_realm) |
| 1260 | /* tr_AVP_OriginStateId(state_id) is optional */ |
Vadim Yanitskiy | f28b255 | 2021-12-11 03:49:14 +0300 | [diff] [blame] | 1261 | )); |
| 1262 | |
| 1263 | /* RFC 6733, section 5.5.2 "Device-Watchdog-Answer" */ |
| 1264 | template (value) PDU_DIAMETER |
| 1265 | ts_DIA_DWA(template (value) OCTET4 state_id := '00000000'O, |
| 1266 | template (value) charstring orig_host := "ttcn3.localdomain", |
| 1267 | template (value) charstring orig_realm := "localdomain", |
| 1268 | template (value) UINT32 hbh_id := '00000000'O, |
| 1269 | template (value) UINT32 ete_id := '00000000'O) := |
| 1270 | ts_DIAMETER(flags := '00000000'B, |
| 1271 | cmd_code := Device_Watchdog, |
| 1272 | app_id := '00000000'O, |
| 1273 | hbh_id := hbh_id, |
| 1274 | ete_id := ete_id, |
| 1275 | avps := { |
| 1276 | ts_AVP_ResultCode(DIAMETER_SUCCESS), |
| 1277 | ts_AVP_OriginHost(orig_host), |
| 1278 | ts_AVP_OriginRealm(orig_realm), |
| 1279 | ts_AVP_OriginStateId(state_id) |
| 1280 | }); |
| 1281 | template (present) PDU_DIAMETER |
| 1282 | tr_DIA_DWA(template (present) OCTET4 state_id := ?, |
| 1283 | template (present) charstring orig_host := ?, |
| 1284 | template (present) charstring orig_realm := ?, |
| 1285 | template (present) UINT32 hbh_id := ?, |
| 1286 | template (present) UINT32 ete_id := ?) := |
| 1287 | tr_DIAMETER(flags := '0???????'B, |
| 1288 | cmd_code := Device_Watchdog, |
| 1289 | app_id := '00000000'O, |
| 1290 | hbh_id := hbh_id, |
| 1291 | ete_id := ete_id, |
| 1292 | avps := superset( |
| 1293 | tr_AVP_ResultCode(DIAMETER_SUCCESS), |
| 1294 | tr_AVP_OriginHost(orig_host), |
Pau Espin Pedrol | 8dcb061 | 2023-08-28 19:16:29 +0200 | [diff] [blame] | 1295 | tr_AVP_OriginRealm(orig_realm) |
| 1296 | /* tr_AVP_OriginStateId(state_id) is optional */ |
Vadim Yanitskiy | f28b255 | 2021-12-11 03:49:14 +0300 | [diff] [blame] | 1297 | )); |
| 1298 | |
Pau Espin Pedrol | 8fa2284 | 2022-05-20 14:47:55 +0200 | [diff] [blame] | 1299 | function f_DIAMETER_get_avp(PDU_DIAMETER pdu, template (present) AVP_Code avp_code) |
| 1300 | return template (omit) AVP |
| 1301 | { |
| 1302 | var integer i; |
| 1303 | |
| 1304 | for (i := 0; i < lengthof(pdu.avps); i := i+1) { |
| 1305 | if (not ispresent(pdu.avps[i].avp)) { |
| 1306 | continue; |
| 1307 | } |
| 1308 | var AVP_Header hdr := pdu.avps[i].avp.avp_header; |
| 1309 | if (match(hdr.avp_code, avp_code)) { |
| 1310 | return pdu.avps[i].avp; |
| 1311 | } |
| 1312 | } |
| 1313 | return omit; |
| 1314 | } |
| 1315 | function f_DIAMETER_get_avp_or_fail(PDU_DIAMETER pdu, template (present) AVP_Code avp_code) |
| 1316 | return AVP |
| 1317 | { |
| 1318 | var template (omit) AVP avp; |
| 1319 | avp := f_DIAMETER_get_avp(pdu, avp_code); |
| 1320 | if (istemplatekind(avp, "omit")) { |
| 1321 | Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, |
| 1322 | log2str("AVP ", avp_code, " not found in ", pdu)); |
| 1323 | } |
| 1324 | return valueof(avp); |
| 1325 | } |
| 1326 | |
| 1327 | function f_AVP_Grouped_get_avp(AVP_Grouped avp_grp, template (present) AVP_Code avp_code) |
| 1328 | return template (omit) AVP |
| 1329 | { |
| 1330 | var integer i; |
| 1331 | |
| 1332 | for (i := 0; i < lengthof(avp_grp); i := i+1) { |
| 1333 | if (not ispresent(avp_grp[i].avp)) { |
| 1334 | continue; |
| 1335 | } |
| 1336 | var AVP_Header hdr := avp_grp[i].avp.avp_header; |
| 1337 | if (match(hdr.avp_code, avp_code)) { |
| 1338 | return avp_grp[i].avp; |
| 1339 | } |
| 1340 | } |
| 1341 | return omit; |
| 1342 | } |
| 1343 | function f_AVP_Grouped_get_avp_or_fail(AVP_Grouped avp_grp, template (present) AVP_Code avp_code) |
| 1344 | return AVP |
| 1345 | { |
| 1346 | var template (omit) AVP avp; |
| 1347 | avp := f_AVP_Grouped_get_avp(avp_grp, avp_code); |
| 1348 | if (istemplatekind(avp, "omit")) { |
| 1349 | Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, |
| 1350 | log2str("AVP ", avp_code, " not found in ", avp_grp)); |
| 1351 | } |
| 1352 | return valueof(avp); |
| 1353 | } |
| 1354 | |
Pau Espin Pedrol | 462f3df | 2023-10-16 18:10:55 +0200 | [diff] [blame] | 1355 | |
| 1356 | /***************************** |
| 1357 | * Cx, Dx, 3GPP TS 29.229 |
| 1358 | *****************************/ |
| 1359 | /* SIP-Auth-Data-Item, 3GPP TS 29.229 6.3.8 */ |
| 1360 | template (present) GenericAVP tr_AVP_3GPP_SIPNumAuthDataItems(template (present) uint32_t num := ?) := { |
| 1361 | avp := { |
| 1362 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_CxDx_3GPP_SIP_Number_Auth_Items), |
| 1363 | avp_data := { |
| 1364 | avp_CxDx_3GPP_SIP_Number_Auth_Items := int2oct_tmpl(num, 4) /* CxDx_3GPP_SIP_Number_Auth_Items */ |
| 1365 | } |
| 1366 | } |
| 1367 | } |
| 1368 | template (value) GenericAVP ts_AVP_3GPP_SIPNumAuthDataItems(uint32_t num) := { |
| 1369 | avp := { |
| 1370 | avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_CxDx_3GPP_SIP_Number_Auth_Items), |
| 1371 | avp_data := { |
| 1372 | avp_CxDx_3GPP_SIP_Number_Auth_Items := int2oct(num, 4) /* CxDx_3GPP_SIP_Number_Auth_Items */ |
| 1373 | } |
| 1374 | } |
| 1375 | } |
| 1376 | |
| 1377 | /* SIP-Authentication-Scheme, 3GPP TS 29.229 6.3.9 */ |
| 1378 | template (present) GenericAVP tr_AVP_3GPP_SIPAuthScheme(template (present) CxDx_3GPP_SIP_Authentication_Scheme scheme := ?) := { |
| 1379 | avp := { |
| 1380 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_CxDx_3GPP_SIP_Authentication_Scheme), |
| 1381 | avp_data := { |
| 1382 | avp_CxDx_3GPP_SIP_Authentication_Scheme := scheme |
| 1383 | } |
| 1384 | } |
| 1385 | } |
| 1386 | template (value) GenericAVP ts_AVP_3GPP_SIPAuthScheme(template (value) CxDx_3GPP_SIP_Authentication_Scheme scheme) := { |
| 1387 | avp := { |
| 1388 | avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_CxDx_3GPP_SIP_Authentication_Scheme), |
| 1389 | avp_data := { |
| 1390 | avp_CxDx_3GPP_SIP_Authentication_Scheme := scheme |
| 1391 | } |
| 1392 | } |
| 1393 | } |
| 1394 | |
| 1395 | /* SIP-Authenticate, 3GPP TS 29.229 6.3.10 */ |
| 1396 | template (present) GenericAVP tr_AVP_3GPP_SIPAuthenticate(template (present) CxDx_3GPP_SIP_Authenticate rand_autn_concatenated := ?) := { |
| 1397 | avp := { |
| 1398 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_CxDx_3GPP_SIP_Authenticate), |
| 1399 | avp_data := { |
| 1400 | avp_CxDx_3GPP_SIP_Authenticate := rand_autn_concatenated |
| 1401 | } |
| 1402 | } |
| 1403 | } |
| 1404 | template (value) GenericAVP ts_AVP_3GPP_SIPAuthenticate(template (value) CxDx_3GPP_SIP_Authenticate rand_autn_concatenated) := { |
| 1405 | avp := { |
| 1406 | avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_CxDx_3GPP_SIP_Authenticate), |
| 1407 | avp_data := { |
| 1408 | avp_CxDx_3GPP_SIP_Authenticate := rand_autn_concatenated |
| 1409 | } |
| 1410 | } |
| 1411 | } |
| 1412 | |
| 1413 | /* SIP-Authorization, 3GPP TS 29.229 6.3.11 */ |
| 1414 | template (present) GenericAVP tr_AVP_3GPP_SIPAuthorization(template (present) CxDx_3GPP_SIP_Authorization rand_autn_concatenated := ?) := { |
| 1415 | avp := { |
| 1416 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_CxDx_3GPP_SIP_Authorization), |
| 1417 | avp_data := { |
| 1418 | avp_CxDx_3GPP_SIP_Authorization := rand_autn_concatenated |
| 1419 | } |
| 1420 | } |
| 1421 | } |
| 1422 | template (value) GenericAVP ts_AVP_3GPP_SIPAuthorization(template (value) CxDx_3GPP_SIP_Authorization rand_autn_concatenated) := { |
| 1423 | avp := { |
| 1424 | avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_CxDx_3GPP_SIP_Authorization), |
| 1425 | avp_data := { |
| 1426 | avp_CxDx_3GPP_SIP_Authorization := rand_autn_concatenated |
| 1427 | } |
| 1428 | } |
| 1429 | } |
| 1430 | |
| 1431 | /* SIP-Authentication-Context, 3GPP TS 29.229 6.3.12 */ |
| 1432 | template (present) GenericAVP tr_AVP_3GPP_SIPAuthContext(template (present) CxDx_3GPP_SIP_Authentication_Context val := ?) := { |
| 1433 | avp := { |
| 1434 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_CxDx_3GPP_SIP_Authentication_Context), |
| 1435 | avp_data := { |
| 1436 | avp_CxDx_3GPP_SIP_Authentication_Context := val |
| 1437 | } |
| 1438 | } |
| 1439 | } |
| 1440 | template (value) GenericAVP ts_AVP_3GPP_SIPAuthContext(template (value) CxDx_3GPP_SIP_Authentication_Context val) := { |
| 1441 | avp := { |
| 1442 | avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_CxDx_3GPP_SIP_Authentication_Context), |
| 1443 | avp_data := { |
| 1444 | avp_CxDx_3GPP_SIP_Authentication_Context := val |
| 1445 | } |
| 1446 | } |
| 1447 | } |
| 1448 | |
| 1449 | /* SIP-Item-Number, 3GPP TS 29.229 6.3.14 */ |
| 1450 | template (present) GenericAVP tr_AVP_3GPP_SIPItemNumber(template (present) uint32_t num := ?) := { |
| 1451 | avp := { |
| 1452 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_CxDx_3GPP_SIP_Item_Number), |
| 1453 | avp_data := { |
| 1454 | avp_CxDx_3GPP_SIP_Item_Number := int2oct_tmpl(num, 4) /* CxDx_3GPP_SIP_Item_Number */ |
| 1455 | } |
| 1456 | } |
| 1457 | } |
| 1458 | template (value) GenericAVP ts_AVP_3GPP_SIPItemNumber(uint32_t num) := { |
| 1459 | avp := { |
| 1460 | avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_CxDx_3GPP_SIP_Item_Number), |
| 1461 | avp_data := { |
| 1462 | avp_CxDx_3GPP_SIP_Item_Number := int2oct(num, 4) /* CxDx_3GPP_SIP_Item_Number */ |
| 1463 | } |
| 1464 | } |
| 1465 | } |
| 1466 | |
| 1467 | /* Confidentiality-Key, 3GPP TS 29.229 6.3.27 */ |
| 1468 | template (present) GenericAVP tr_AVP_3GPP_ConfidentialityKey(template (present) CxDx_3GPP_Confidentiality_Key ckey := ?) := { |
| 1469 | avp := { |
| 1470 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_CxDx_3GPP_Confidentiality_Key), |
| 1471 | avp_data := { |
| 1472 | avp_CxDx_3GPP_Confidentiality_Key := ckey |
| 1473 | } |
| 1474 | } |
| 1475 | } |
| 1476 | template (value) GenericAVP ts_AVP_3GPP_ConfidentialityKey(template (value) CxDx_3GPP_Confidentiality_Key ckey) := { |
| 1477 | avp := { |
| 1478 | avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_CxDx_3GPP_Confidentiality_Key), |
| 1479 | avp_data := { |
| 1480 | avp_CxDx_3GPP_Confidentiality_Key := ckey |
| 1481 | } |
| 1482 | } |
| 1483 | } |
| 1484 | |
| 1485 | /* Inegrity-Key, 3GPP TS 29.229 6.3.28 */ |
| 1486 | template (present) GenericAVP tr_AVP_3GPP_IntegrityKey(template (present) CxDx_3GPP_Integrity_Key ckey := ?) := { |
| 1487 | avp := { |
| 1488 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_CxDx_3GPP_Integrity_Key), |
| 1489 | avp_data := { |
| 1490 | avp_CxDx_3GPP_Integrity_Key := ckey |
| 1491 | } |
| 1492 | } |
| 1493 | } |
| 1494 | template (value) GenericAVP ts_AVP_3GPP_IntegrityKey(template (value) CxDx_3GPP_Integrity_Key ckey) := { |
| 1495 | avp := { |
| 1496 | avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_CxDx_3GPP_Integrity_Key), |
| 1497 | avp_data := { |
| 1498 | avp_CxDx_3GPP_Integrity_Key := ckey |
| 1499 | } |
| 1500 | } |
| 1501 | } |
| 1502 | |
Pau Espin Pedrol | 965ac64 | 2023-10-16 18:12:45 +0200 | [diff] [blame] | 1503 | /* Server-Assignment-Type, 3GPP TS 29.273 8.2.3.12, 3GPP TS 29.229 6.3.15 */ |
| 1504 | template (present) GenericAVP tr_AVP_3GPP_ServerAssignmentType(template (present) CxDx_3GPP_Server_Assignment_Type t := ?) := { |
| 1505 | avp := { |
| 1506 | avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_CxDx_3GPP_Server_Assignment_Type), |
| 1507 | avp_data := { |
| 1508 | avp_CxDx_3GPP_Server_Assignment_Type := t |
| 1509 | } |
| 1510 | } |
| 1511 | } |
| 1512 | template (value) GenericAVP ts_AVP_3GPP_ServerAssignmentType(template (value) CxDx_3GPP_Server_Assignment_Type t) := { |
| 1513 | avp := { |
| 1514 | avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_CxDx_3GPP_Server_Assignment_Type), |
| 1515 | avp_data := { |
| 1516 | avp_CxDx_3GPP_Server_Assignment_Type := t |
| 1517 | } |
| 1518 | } |
| 1519 | } |
| 1520 | |
Harald Welte | d27ab24 | 2019-07-26 13:45:18 +0200 | [diff] [blame] | 1521 | } |