Brian Waters | 13d9601 | 2017-12-08 16:53:31 -0600 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2017 Sprint |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | /**************** |
| 18 | Generated By: fdtool enhancements to diafuzzer |
| 19 | License: same as freeDiameter |
| 20 | ****************/ |
| 21 | |
| 22 | |
| 23 | /* |
| 24 | * Dictionary definitions of objects specified in ts29338_avps (e10). |
| 25 | */ |
| 26 | #include <freeDiameter/extension.h> |
| 27 | |
| 28 | #define PROTO_VER "e10" |
| 29 | #define GEN_DATE 1506697156.63 |
| 30 | |
| 31 | const char *ts29338_avps_proto_ver = PROTO_VER; |
| 32 | const double ts29338_avps_gen_date = GEN_DATE; |
| 33 | |
| 34 | /* The content of this file follows the same structure as dict_base_proto.c */ |
| 35 | |
| 36 | #define CHECK_dict_new( _type, _data, _parent, _ref ) \ |
| 37 | { \ |
| 38 | int _ret = fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref) ); \ |
| 39 | if ( _ret != 0 && _ret != EEXIST ) \ |
| 40 | return _ret; \ |
| 41 | } |
| 42 | |
| 43 | #define CHECK_dict_search( _type, _criteria, _what, _result ) \ |
| 44 | CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); |
| 45 | |
| 46 | struct local_rules_definition { |
| 47 | struct dict_avp_request avp_vendor_plus_name; |
| 48 | enum rule_position position; |
| 49 | int min; |
| 50 | int max; |
| 51 | }; |
| 52 | |
| 53 | #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) |
| 54 | |
| 55 | /* Attention! This version of the macro uses AVP_BY_NAME_AND_VENDOR, in contrast to most other copies! */ |
| 56 | #define PARSE_loc_rules( _rulearray, _parent) { \ |
| 57 | int __ar; \ |
| 58 | for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \ |
| 59 | struct dict_rule_data __data = { NULL, \ |
| 60 | (_rulearray)[__ar].position, \ |
| 61 | 0, \ |
| 62 | (_rulearray)[__ar].min, \ |
| 63 | (_rulearray)[__ar].max}; \ |
| 64 | __data.rule_order = RULE_ORDER(__data.rule_position); \ |
| 65 | CHECK_FCT( fd_dict_search( \ |
| 66 | fd_g_config->cnf_dict, \ |
| 67 | DICT_AVP, \ |
| 68 | AVP_BY_NAME_AND_VENDOR, \ |
| 69 | &(_rulearray)[__ar].avp_vendor_plus_name, \ |
| 70 | &__data.rule_avp, 0 ) ); \ |
| 71 | if ( !__data.rule_avp ) { \ |
| 72 | TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_vendor_plus_name.avp_name); \ |
| 73 | return ENOENT; \ |
| 74 | } \ |
| 75 | { \ |
| 76 | int _ret = fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &(__data), (_parent), NULL ); \ |
| 77 | if ( _ret != 0 && _ret != EEXIST ) { \ |
| 78 | TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \ |
| 79 | (_rulearray)[__ar].avp_vendor_plus_name.avp_name); \ |
| 80 | return EINVAL; \ |
| 81 | } \ |
| 82 | } \ |
| 83 | } \ |
| 84 | } |
| 85 | |
| 86 | #define CHECK_vendor_new( _data ) { \ |
| 87 | struct dict_object * vendor_found; \ |
| 88 | if (fd_dict_search(fd_g_config->cnf_dict,DICT_VENDOR,VENDOR_BY_ID,&_data.vendor_id,&vendor_found,ENOENT) == ENOENT) { \ |
| 89 | CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &_data, NULL, NULL)); \ |
| 90 | } \ |
| 91 | } |
| 92 | |
| 93 | #define enumval_def_u32( _val_, _str_ ) \ |
| 94 | { _str_, { .u32 = _val_ }} |
| 95 | |
| 96 | #define enumval_def_os( _len_, _val_, _str_ ) \ |
| 97 | { _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}} |
| 98 | |
| 99 | |
| 100 | static int dict_ts29338_avps_load_defs(char * conffile) |
| 101 | { |
| 102 | TRACE_ENTRY("%p", conffile); |
| 103 | /* Application Section */ |
| 104 | { |
| 105 | /* Create the vendors */ { |
| 106 | struct dict_vendor_data vendor_data = { 10415, "3GPP" }; |
| 107 | CHECK_dict_new(DICT_VENDOR, &vendor_data, NULL, NULL) |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | |
| 112 | /* AVP section */ |
| 113 | { |
| 114 | struct dict_object * Address_type; |
| 115 | struct dict_object * UTF8String_type; |
| 116 | struct dict_object * DiameterIdentity_type; |
| 117 | struct dict_object * DiameterURI_type; |
| 118 | struct dict_object * Time_type; |
| 119 | struct dict_object * IPFilterRule_type; |
| 120 | |
| 121 | CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Address", &Address_type); |
| 122 | CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "UTF8String", &UTF8String_type); |
| 123 | CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterIdentity", &DiameterIdentity_type); |
| 124 | CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterURI", &DiameterURI_type); |
| 125 | CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Time", &Time_type); |
| 126 | CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "IPFilterRule", &IPFilterRule_type); |
| 127 | /* SM-RP-MTI */ |
| 128 | { |
| 129 | struct dict_avp_data data = { |
| 130 | 3308, /* Code */ |
| 131 | 10415, /* Vendor */ |
| 132 | "SM-RP-MTI", /* Name */ |
| 133 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 134 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 135 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 136 | }; |
| 137 | struct dict_object *type; |
| 138 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(SM-RP-MTI)", NULL, NULL, NULL }; |
| 139 | struct dict_enumval_data t_1 = { "SM_DELIVER", { .i32=0 }}; |
| 140 | struct dict_enumval_data t_2 = { "SM_STATUS_REPORT", { .i32=1 }}; |
| 141 | /* Create the Enumerated type, and then the AVP */ |
| 142 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 143 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 144 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 145 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 146 | }; |
| 147 | /* SM-RP-SMEA */ |
| 148 | { |
| 149 | struct dict_avp_data data = { |
| 150 | 3309, /* Code */ |
| 151 | 10415, /* Vendor */ |
| 152 | "SM-RP-SMEA", /* Name */ |
| 153 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 154 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 155 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 156 | }; |
| 157 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 158 | }; |
| 159 | /* SRR-Flags */ |
| 160 | { |
| 161 | struct dict_avp_data data = { |
| 162 | 3310, /* Code */ |
| 163 | 10415, /* Vendor */ |
| 164 | "SRR-Flags", /* Name */ |
| 165 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 166 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 167 | AVP_TYPE_UNSIGNED32 /* base type of data */ |
| 168 | }; |
| 169 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 170 | }; |
| 171 | /* SM-Delivery-Not-Intended */ |
| 172 | { |
| 173 | struct dict_avp_data data = { |
| 174 | 3311, /* Code */ |
| 175 | 10415, /* Vendor */ |
| 176 | "SM-Delivery-Not-Intended", /* Name */ |
| 177 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 178 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 179 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 180 | }; |
| 181 | struct dict_object *type; |
| 182 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(SM-Delivery-Not-Intended)", NULL, NULL, NULL }; |
| 183 | struct dict_enumval_data t_1 = { "ONLY_IMSI_REQUESTED", { .i32=0 }}; |
| 184 | struct dict_enumval_data t_2 = { "ONLY_MCC_MNC_REQUESTED", { .i32=1 }}; |
| 185 | /* Create the Enumerated type, and then the AVP */ |
| 186 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 187 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 188 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 189 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 190 | }; |
| 191 | /* MWD-Status */ |
| 192 | { |
| 193 | struct dict_avp_data data = { |
| 194 | 3312, /* Code */ |
| 195 | 10415, /* Vendor */ |
| 196 | "MWD-Status", /* Name */ |
| 197 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 198 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 199 | AVP_TYPE_UNSIGNED32 /* base type of data */ |
| 200 | }; |
| 201 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 202 | }; |
| 203 | /* MME-Absent-User-Diagnostic-SM */ |
| 204 | { |
| 205 | struct dict_avp_data data = { |
| 206 | 3313, /* Code */ |
| 207 | 10415, /* Vendor */ |
| 208 | "MME-Absent-User-Diagnostic-SM", /* Name */ |
| 209 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 210 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 211 | AVP_TYPE_UNSIGNED32 /* base type of data */ |
| 212 | }; |
| 213 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 214 | }; |
| 215 | /* MSC-Absent-User-Diagnostic-SM */ |
| 216 | { |
| 217 | struct dict_avp_data data = { |
| 218 | 3314, /* Code */ |
| 219 | 10415, /* Vendor */ |
| 220 | "MSC-Absent-User-Diagnostic-SM", /* Name */ |
| 221 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 222 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 223 | AVP_TYPE_UNSIGNED32 /* base type of data */ |
| 224 | }; |
| 225 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 226 | }; |
| 227 | /* SGSN-Absent-User-Diagnostic-SM */ |
| 228 | { |
| 229 | struct dict_avp_data data = { |
| 230 | 3315, /* Code */ |
| 231 | 10415, /* Vendor */ |
| 232 | "SGSN-Absent-User-Diagnostic-SM", /* Name */ |
| 233 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 234 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 235 | AVP_TYPE_UNSIGNED32 /* base type of data */ |
| 236 | }; |
| 237 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 238 | }; |
| 239 | /* SM-Delivery-Cause */ |
| 240 | { |
| 241 | struct dict_avp_data data = { |
| 242 | 3321, /* Code */ |
| 243 | 10415, /* Vendor */ |
| 244 | "SM-Delivery-Cause", /* Name */ |
| 245 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 246 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 247 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 248 | }; |
| 249 | struct dict_object *type; |
| 250 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(SM-Delivery-Cause)", NULL, NULL, NULL }; |
| 251 | struct dict_enumval_data t_1 = { "MEMORY_CAPACITY_EXCEEDED", { .i32=0 }}; |
| 252 | struct dict_enumval_data t_2 = { "ABSENT_USER", { .i32=1 }}; |
| 253 | struct dict_enumval_data t_3 = { "SUCCESSFUL_TRANSFER", { .i32=2 }}; |
| 254 | /* Create the Enumerated type, and then the AVP */ |
| 255 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 256 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 257 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 258 | CHECK_dict_new( DICT_ENUMVAL, &t_3, type, NULL); |
| 259 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 260 | }; |
| 261 | /* Absent-User-Diagnostic-SM */ |
| 262 | { |
| 263 | struct dict_avp_data data = { |
| 264 | 3322, /* Code */ |
| 265 | 10415, /* Vendor */ |
| 266 | "Absent-User-Diagnostic-SM", /* Name */ |
| 267 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 268 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 269 | AVP_TYPE_UNSIGNED32 /* base type of data */ |
| 270 | }; |
| 271 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 272 | }; |
| 273 | /* RDR-Flags */ |
| 274 | { |
| 275 | struct dict_avp_data data = { |
| 276 | 3323, /* Code */ |
| 277 | 10415, /* Vendor */ |
| 278 | "RDR-Flags", /* Name */ |
| 279 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 280 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 281 | AVP_TYPE_UNSIGNED32 /* base type of data */ |
| 282 | }; |
| 283 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 284 | }; |
| 285 | /* Maximum-UE-Availability-Time */ |
| 286 | { |
| 287 | struct dict_avp_data data = { |
| 288 | 3329, /* Code */ |
| 289 | 10415, /* Vendor */ |
| 290 | "Maximum-UE-Availability-Time", /* Name */ |
| 291 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 292 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 293 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 294 | }; |
| 295 | CHECK_dict_new( DICT_AVP, &data, Time_type, NULL); |
| 296 | }; |
| 297 | /* SMS-GMSC-Alert-Event */ |
| 298 | { |
| 299 | struct dict_avp_data data = { |
| 300 | 3333, /* Code */ |
| 301 | 10415, /* Vendor */ |
| 302 | "SMS-GMSC-Alert-Event", /* Name */ |
| 303 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 304 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 305 | AVP_TYPE_UNSIGNED32 /* base type of data */ |
| 306 | }; |
| 307 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 308 | }; |
| 309 | /* SC-Address */ |
| 310 | { |
| 311 | struct dict_avp_data data = { |
| 312 | 3300, /* Code */ |
| 313 | 10415, /* Vendor */ |
| 314 | "SC-Address", /* Name */ |
| 315 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 316 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 317 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 318 | }; |
| 319 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 320 | }; |
| 321 | /* SM-RP-UI */ |
| 322 | { |
| 323 | struct dict_avp_data data = { |
| 324 | 3301, /* Code */ |
| 325 | 10415, /* Vendor */ |
| 326 | "SM-RP-UI", /* Name */ |
| 327 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 328 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 329 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 330 | }; |
| 331 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 332 | }; |
| 333 | /* TFR-Flags */ |
| 334 | { |
| 335 | struct dict_avp_data data = { |
| 336 | 3302, /* Code */ |
| 337 | 10415, /* Vendor */ |
| 338 | "TFR-Flags", /* Name */ |
| 339 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 340 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 341 | AVP_TYPE_UNSIGNED32 /* base type of data */ |
| 342 | }; |
| 343 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 344 | }; |
| 345 | /* SM-Enumerated-Delivery-Failure-Cause */ |
| 346 | { |
| 347 | struct dict_avp_data data = { |
| 348 | 3304, /* Code */ |
| 349 | 10415, /* Vendor */ |
| 350 | "SM-Enumerated-Delivery-Failure-Cause", /* Name */ |
| 351 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 352 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 353 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 354 | }; |
| 355 | struct dict_object *type; |
| 356 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(SM-Enumerated-Delivery-Failure-Cause)", NULL, NULL, NULL }; |
| 357 | struct dict_enumval_data t_1 = { "MEMORY_CAPACITY_EXCEEDED", { .i32=0 }}; |
| 358 | struct dict_enumval_data t_2 = { "EQUIPMENT_PROTOCOL_ERROR", { .i32=1 }}; |
| 359 | struct dict_enumval_data t_3 = { "EQUIPMENT_NOT_SM_EQUIPPED", { .i32=2 }}; |
| 360 | struct dict_enumval_data t_4 = { "UNKNOWN_SERVICE_CENTRE", { .i32=3 }}; |
| 361 | struct dict_enumval_data t_5 = { "SC_CONGESTION", { .i32=4 }}; |
| 362 | struct dict_enumval_data t_6 = { "INVALID_SME_ADDRESS", { .i32=5 }}; |
| 363 | struct dict_enumval_data t_7 = { "USER_NOT_SC_USER", { .i32=6 }}; |
| 364 | /* Create the Enumerated type, and then the AVP */ |
| 365 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 366 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 367 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 368 | CHECK_dict_new( DICT_ENUMVAL, &t_3, type, NULL); |
| 369 | CHECK_dict_new( DICT_ENUMVAL, &t_4, type, NULL); |
| 370 | CHECK_dict_new( DICT_ENUMVAL, &t_5, type, NULL); |
| 371 | CHECK_dict_new( DICT_ENUMVAL, &t_6, type, NULL); |
| 372 | CHECK_dict_new( DICT_ENUMVAL, &t_7, type, NULL); |
| 373 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 374 | }; |
| 375 | /* SM-Diagnostic-Info */ |
| 376 | { |
| 377 | struct dict_avp_data data = { |
| 378 | 3305, /* Code */ |
| 379 | 10415, /* Vendor */ |
| 380 | "SM-Diagnostic-Info", /* Name */ |
| 381 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 382 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 383 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 384 | }; |
| 385 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 386 | }; |
| 387 | /* SM-Delivery-Timer */ |
| 388 | { |
| 389 | struct dict_avp_data data = { |
| 390 | 3306, /* Code */ |
| 391 | 10415, /* Vendor */ |
| 392 | "SM-Delivery-Timer", /* Name */ |
| 393 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 394 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 395 | AVP_TYPE_UNSIGNED32 /* base type of data */ |
| 396 | }; |
| 397 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 398 | }; |
| 399 | /* SM-Delivery-Start-Time */ |
| 400 | { |
| 401 | struct dict_avp_data data = { |
| 402 | 3307, /* Code */ |
| 403 | 10415, /* Vendor */ |
| 404 | "SM-Delivery-Start-Time", /* Name */ |
| 405 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 406 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 407 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 408 | }; |
| 409 | CHECK_dict_new( DICT_AVP, &data, Time_type, NULL); |
| 410 | }; |
| 411 | /* HSS-ID */ |
| 412 | { |
| 413 | struct dict_avp_data data = { |
| 414 | 3325, /* Code */ |
| 415 | 10415, /* Vendor */ |
| 416 | "HSS-ID", /* Name */ |
| 417 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 418 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 419 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 420 | }; |
| 421 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 422 | }; |
| 423 | /* Originating-SIP-URI */ |
| 424 | { |
| 425 | struct dict_avp_data data = { |
| 426 | 3326, /* Code */ |
| 427 | 10415, /* Vendor */ |
| 428 | "Originating-SIP-URI", /* Name */ |
| 429 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 430 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 431 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 432 | }; |
| 433 | CHECK_dict_new( DICT_AVP, &data, UTF8String_type, NULL); |
| 434 | }; |
| 435 | /* Destination-SIP-URI */ |
| 436 | { |
| 437 | struct dict_avp_data data = { |
| 438 | 3327, /* Code */ |
| 439 | 10415, /* Vendor */ |
| 440 | "Destination-SIP-URI", /* Name */ |
| 441 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 442 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 443 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 444 | }; |
| 445 | CHECK_dict_new( DICT_AVP, &data, UTF8String_type, NULL); |
| 446 | }; |
| 447 | /* OFR-Flags */ |
| 448 | { |
| 449 | struct dict_avp_data data = { |
| 450 | 3328, /* Code */ |
| 451 | 10415, /* Vendor */ |
| 452 | "OFR-Flags", /* Name */ |
| 453 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 454 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 455 | AVP_TYPE_UNSIGNED32 /* base type of data */ |
| 456 | }; |
| 457 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 458 | }; |
| 459 | /* Maximum-Retransmission-Time */ |
| 460 | { |
| 461 | struct dict_avp_data data = { |
| 462 | 3330, /* Code */ |
| 463 | 10415, /* Vendor */ |
| 464 | "Maximum-Retransmission-Time", /* Name */ |
| 465 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 466 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 467 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 468 | }; |
| 469 | CHECK_dict_new( DICT_AVP, &data, Time_type, NULL); |
| 470 | }; |
| 471 | /* Requested-Retransmission-Time */ |
| 472 | { |
| 473 | struct dict_avp_data data = { |
| 474 | 3331, /* Code */ |
| 475 | 10415, /* Vendor */ |
| 476 | "Requested-Retransmission-Time", /* Name */ |
| 477 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 478 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 479 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 480 | }; |
| 481 | CHECK_dict_new( DICT_AVP, &data, Time_type, NULL); |
| 482 | }; |
| 483 | /* SMS-GMSC-Address */ |
| 484 | { |
| 485 | struct dict_avp_data data = { |
| 486 | 3332, /* Code */ |
| 487 | 10415, /* Vendor */ |
| 488 | "SMS-GMSC-Address", /* Name */ |
| 489 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 490 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 491 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 492 | }; |
| 493 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 494 | }; |
| 495 | /* SGSN-SM-Delivery-Outcome */ |
| 496 | { |
| 497 | /* Grouped */ |
| 498 | struct dict_object * avp; |
| 499 | struct dict_avp_data data = { |
| 500 | 3319, /* Code */ |
| 501 | 10415, /* Vendor */ |
| 502 | "SGSN-SM-Delivery-Outcome", /* Name */ |
| 503 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 504 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 505 | AVP_TYPE_GROUPED /* base type of data */ |
| 506 | }; |
| 507 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 508 | } |
| 509 | /* SM-Delivery-Failure-Cause */ |
| 510 | { |
| 511 | /* Grouped */ |
| 512 | struct dict_object * avp; |
| 513 | struct dict_avp_data data = { |
| 514 | 3303, /* Code */ |
| 515 | 10415, /* Vendor */ |
| 516 | "SM-Delivery-Failure-Cause", /* Name */ |
| 517 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 518 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 519 | AVP_TYPE_GROUPED /* base type of data */ |
| 520 | }; |
| 521 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 522 | } |
| 523 | /* SMSMI-Correlation-ID */ |
| 524 | { |
| 525 | /* Grouped */ |
| 526 | struct dict_object * avp; |
| 527 | struct dict_avp_data data = { |
| 528 | 3324, /* Code */ |
| 529 | 10415, /* Vendor */ |
| 530 | "SMSMI-Correlation-ID", /* Name */ |
| 531 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 532 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 533 | AVP_TYPE_GROUPED /* base type of data */ |
| 534 | }; |
| 535 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 536 | } |
| 537 | /* IP-SM-GW-SM-Delivery-Outcome */ |
| 538 | { |
| 539 | /* Grouped */ |
| 540 | struct dict_object * avp; |
| 541 | struct dict_avp_data data = { |
| 542 | 3320, /* Code */ |
| 543 | 10415, /* Vendor */ |
| 544 | "IP-SM-GW-SM-Delivery-Outcome", /* Name */ |
| 545 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 546 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 547 | AVP_TYPE_GROUPED /* base type of data */ |
| 548 | }; |
| 549 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 550 | } |
| 551 | /* MSC-SM-Delivery-Outcome */ |
| 552 | { |
| 553 | /* Grouped */ |
| 554 | struct dict_object * avp; |
| 555 | struct dict_avp_data data = { |
| 556 | 3318, /* Code */ |
| 557 | 10415, /* Vendor */ |
| 558 | "MSC-SM-Delivery-Outcome", /* Name */ |
| 559 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 560 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 561 | AVP_TYPE_GROUPED /* base type of data */ |
| 562 | }; |
| 563 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 564 | } |
| 565 | /* MME-SM-Delivery-Outcome */ |
| 566 | { |
| 567 | /* Grouped */ |
| 568 | struct dict_object * avp; |
| 569 | struct dict_avp_data data = { |
| 570 | 3317, /* Code */ |
| 571 | 10415, /* Vendor */ |
| 572 | "MME-SM-Delivery-Outcome", /* Name */ |
| 573 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 574 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 575 | AVP_TYPE_GROUPED /* base type of data */ |
| 576 | }; |
| 577 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 578 | } |
| 579 | /* SM-Delivery-Outcome */ |
| 580 | { |
| 581 | /* Grouped */ |
| 582 | struct dict_object * avp; |
| 583 | struct dict_avp_data data = { |
| 584 | 3316, /* Code */ |
| 585 | 10415, /* Vendor */ |
| 586 | "SM-Delivery-Outcome", /* Name */ |
| 587 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 588 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 589 | AVP_TYPE_GROUPED /* base type of data */ |
| 590 | }; |
| 591 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 592 | } |
| 593 | |
| 594 | |
| 595 | } |
| 596 | |
| 597 | /* Commands section */ |
| 598 | { |
| 599 | |
| 600 | } |
| 601 | |
| 602 | return 0; |
| 603 | } |
| 604 | |
| 605 | static int dict_ts29338_avps_load_rules(char * conffile) |
| 606 | { |
| 607 | /* Grouped AVP section */ |
| 608 | { |
| 609 | /* SGSN-SM-Delivery-Outcome */ |
| 610 | { |
| 611 | /* Grouped */ |
| 612 | struct dict_object * avp; |
| 613 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 10415, .avp_name = "SGSN-SM-Delivery-Outcome"}; |
| 614 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 615 | struct local_rules_definition rules[] = |
| 616 | { |
| 617 | { { .avp_vendor = 10415, .avp_name = "SM-Delivery-Cause"}, RULE_OPTIONAL, -1, -1 }, |
| 618 | { { .avp_vendor = 10415, .avp_name = "Absent-User-Diagnostic-SM"}, RULE_OPTIONAL, -1, -1 } |
| 619 | }; |
| 620 | PARSE_loc_rules( rules, avp ); |
| 621 | } |
| 622 | /* SM-Delivery-Failure-Cause */ |
| 623 | { |
| 624 | /* Grouped */ |
| 625 | struct dict_object * avp; |
| 626 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 10415, .avp_name = "SM-Delivery-Failure-Cause"}; |
| 627 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 628 | struct local_rules_definition rules[] = |
| 629 | { |
| 630 | { { .avp_vendor = 10415, .avp_name = "SM-Enumerated-Delivery-Failure-Cause"}, RULE_REQUIRED, -1, -1 }, |
| 631 | { { .avp_vendor = 10415, .avp_name = "SM-Diagnostic-Info"}, RULE_OPTIONAL, -1, -1 } |
| 632 | }; |
| 633 | PARSE_loc_rules( rules, avp ); |
| 634 | } |
| 635 | /* SMSMI-Correlation-ID */ |
| 636 | { |
| 637 | /* Grouped */ |
| 638 | struct dict_object * avp; |
| 639 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 10415, .avp_name = "SMSMI-Correlation-ID"}; |
| 640 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 641 | struct local_rules_definition rules[] = |
| 642 | { |
| 643 | { { .avp_vendor = 10415, .avp_name = "HSS-ID"}, RULE_OPTIONAL, -1, -1 }, |
| 644 | { { .avp_vendor = 10415, .avp_name = "Originating-SIP-URI"}, RULE_OPTIONAL, -1, -1 }, |
| 645 | { { .avp_vendor = 10415, .avp_name = "Destination-SIP-URI"}, RULE_OPTIONAL, -1, -1 } |
| 646 | }; |
| 647 | PARSE_loc_rules( rules, avp ); |
| 648 | } |
| 649 | /* IP-SM-GW-SM-Delivery-Outcome */ |
| 650 | { |
| 651 | /* Grouped */ |
| 652 | struct dict_object * avp; |
| 653 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 10415, .avp_name = "IP-SM-GW-SM-Delivery-Outcome"}; |
| 654 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 655 | struct local_rules_definition rules[] = |
| 656 | { |
| 657 | { { .avp_vendor = 10415, .avp_name = "SM-Delivery-Cause"}, RULE_OPTIONAL, -1, -1 }, |
| 658 | { { .avp_vendor = 10415, .avp_name = "Absent-User-Diagnostic-SM"}, RULE_OPTIONAL, -1, -1 } |
| 659 | }; |
| 660 | PARSE_loc_rules( rules, avp ); |
| 661 | } |
| 662 | /* MSC-SM-Delivery-Outcome */ |
| 663 | { |
| 664 | /* Grouped */ |
| 665 | struct dict_object * avp; |
| 666 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 10415, .avp_name = "MSC-SM-Delivery-Outcome"}; |
| 667 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 668 | struct local_rules_definition rules[] = |
| 669 | { |
| 670 | { { .avp_vendor = 10415, .avp_name = "SM-Delivery-Cause"}, RULE_OPTIONAL, -1, -1 }, |
| 671 | { { .avp_vendor = 10415, .avp_name = "Absent-User-Diagnostic-SM"}, RULE_OPTIONAL, -1, -1 } |
| 672 | }; |
| 673 | PARSE_loc_rules( rules, avp ); |
| 674 | } |
| 675 | /* MME-SM-Delivery-Outcome */ |
| 676 | { |
| 677 | /* Grouped */ |
| 678 | struct dict_object * avp; |
| 679 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 10415, .avp_name = "MME-SM-Delivery-Outcome"}; |
| 680 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 681 | struct local_rules_definition rules[] = |
| 682 | { |
| 683 | { { .avp_vendor = 10415, .avp_name = "SM-Delivery-Cause"}, RULE_OPTIONAL, -1, -1 }, |
| 684 | { { .avp_vendor = 10415, .avp_name = "Absent-User-Diagnostic-SM"}, RULE_OPTIONAL, -1, -1 } |
| 685 | }; |
| 686 | PARSE_loc_rules( rules, avp ); |
| 687 | } |
| 688 | /* SM-Delivery-Outcome */ |
| 689 | { |
| 690 | /* Grouped */ |
| 691 | struct dict_object * avp; |
| 692 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 10415, .avp_name = "SM-Delivery-Outcome"}; |
| 693 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 694 | struct local_rules_definition rules[] = |
| 695 | { |
| 696 | { { .avp_vendor = 10415, .avp_name = "MME-SM-Delivery-Outcome"}, RULE_OPTIONAL, -1, -1 }, |
| 697 | { { .avp_vendor = 10415, .avp_name = "MSC-SM-Delivery-Outcome"}, RULE_OPTIONAL, -1, -1 }, |
| 698 | { { .avp_vendor = 10415, .avp_name = "SGSN-SM-Delivery-Outcome"}, RULE_OPTIONAL, -1, -1 }, |
| 699 | { { .avp_vendor = 10415, .avp_name = "IP-SM-GW-SM-Delivery-Outcome"}, RULE_OPTIONAL, -1, -1 } |
| 700 | }; |
| 701 | PARSE_loc_rules( rules, avp ); |
| 702 | } |
| 703 | |
| 704 | } |
| 705 | |
| 706 | /* Commands section */ |
| 707 | { |
| 708 | |
| 709 | } |
| 710 | |
| 711 | LOG_D( "Extension 'Dictionary definitions for ts29338_avps (e10)' initialized"); |
| 712 | return 0; |
| 713 | } |
| 714 | |
| 715 | int dict_entry(char * conffile) |
| 716 | { |
| 717 | dict_ts29338_avps_load_defs(conffile); |
| 718 | return dict_ts29338_avps_load_rules(conffile); |
| 719 | } |
| 720 | |
| 721 | const char* dict_ts29338_avps_proto_ver(char * conffile) { |
| 722 | return ts29338_avps_proto_ver; |
| 723 | } |
| 724 | |
| 725 | const double dict_ts29338_avps_gen_ts(char * conffile) { |
| 726 | return ts29338_avps_gen_date; |
| 727 | } |
| 728 | |
| 729 | EXTENSION_ENTRY2("dict_ts29338_avps", dict_ts29338_avps_load_defs, dict_ts29338_avps_load_rules, "dict_ts29272_avps", "dict_ts29336_avps", "dict_ts29173_avps", "dict_ts29329_avps", "dict_ts29229_avps", "dict_rfc7944_avps"); |
| 730 | |
| 731 | |
| 732 | |