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 ts29329_avps (e20). |
| 25 | */ |
| 26 | #include <freeDiameter/extension.h> |
| 27 | |
| 28 | #define PROTO_VER "e20" |
| 29 | #define GEN_DATE 1506697146.88 |
| 30 | |
| 31 | const char *ts29329_avps_proto_ver = PROTO_VER; |
| 32 | const double ts29329_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_ts29329_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 | /* MSISDN */ |
| 128 | { |
| 129 | struct dict_avp_data data = { |
| 130 | 701, /* Code */ |
| 131 | 10415, /* Vendor */ |
| 132 | "MSISDN", /* Name */ |
| 133 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 134 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 135 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 136 | }; |
| 137 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 138 | }; |
| 139 | /* User-Data */ |
| 140 | { |
| 141 | struct dict_avp_data data = { |
| 142 | 702, /* Code */ |
| 143 | 10415, /* Vendor */ |
| 144 | "User-Data", /* Name */ |
| 145 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 146 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 147 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 148 | }; |
| 149 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 150 | }; |
| 151 | /* Data-Reference */ |
| 152 | { |
| 153 | struct dict_avp_data data = { |
| 154 | 703, /* Code */ |
| 155 | 10415, /* Vendor */ |
| 156 | "Data-Reference", /* Name */ |
| 157 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 158 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 159 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 160 | }; |
| 161 | struct dict_object *type; |
| 162 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Data-Reference)", NULL, NULL, NULL }; |
| 163 | struct dict_enumval_data t_1 = { "RepositoryData", { .i32=0 }}; |
| 164 | struct dict_enumval_data t_2 = { "IMSPublicIdentity", { .i32=10 }}; |
| 165 | struct dict_enumval_data t_3 = { "IMSUserState", { .i32=11 }}; |
| 166 | struct dict_enumval_data t_4 = { "S_CSCFName", { .i32=12 }}; |
| 167 | struct dict_enumval_data t_5 = { "InitialFilterCriteria", { .i32=13 }}; |
| 168 | struct dict_enumval_data t_6 = { "LocationInformation", { .i32=14 }}; |
| 169 | struct dict_enumval_data t_7 = { "UserState", { .i32=15 }}; |
| 170 | struct dict_enumval_data t_8 = { "ChargingInformation", { .i32=16 }}; |
| 171 | struct dict_enumval_data t_9 = { "MSISDN", { .i32=17 }}; |
| 172 | struct dict_enumval_data t_10 = { "PSIActivation", { .i32=18 }}; |
| 173 | struct dict_enumval_data t_11 = { "DSAI", { .i32=19 }}; |
| 174 | struct dict_enumval_data t_12 = { "ServiceLevelTraceInfo", { .i32=21 }}; |
| 175 | struct dict_enumval_data t_13 = { "IPAddressSecureBindingInformation", { .i32=22 }}; |
| 176 | struct dict_enumval_data t_14 = { "ServicePriorityLevel", { .i32=23 }}; |
| 177 | struct dict_enumval_data t_15 = { "SMSRegistrationInfo", { .i32=24 }}; |
| 178 | struct dict_enumval_data t_16 = { "UEReachabilityForIP", { .i32=25 }}; |
| 179 | struct dict_enumval_data t_17 = { "TADSinformation", { .i32=26 }}; |
| 180 | struct dict_enumval_data t_18 = { "STN_SR", { .i32=27 }}; |
| 181 | struct dict_enumval_data t_19 = { "UE_SRVCC_Capability", { .i32=28 }}; |
| 182 | struct dict_enumval_data t_20 = { "ExtendedPriority", { .i32=29 }}; |
| 183 | struct dict_enumval_data t_21 = { "CSRN", { .i32=30 }}; |
| 184 | struct dict_enumval_data t_22 = { "ReferenceLocationInformation", { .i32=31 }}; |
| 185 | struct dict_enumval_data t_23 = { "IMSI", { .i32=32 }}; |
| 186 | struct dict_enumval_data t_24 = { "IMSPrivateUserIdentity", { .i32=33 }}; |
| 187 | /* Create the Enumerated type, and then the AVP */ |
| 188 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 189 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 190 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 191 | CHECK_dict_new( DICT_ENUMVAL, &t_3, type, NULL); |
| 192 | CHECK_dict_new( DICT_ENUMVAL, &t_4, type, NULL); |
| 193 | CHECK_dict_new( DICT_ENUMVAL, &t_5, type, NULL); |
| 194 | CHECK_dict_new( DICT_ENUMVAL, &t_6, type, NULL); |
| 195 | CHECK_dict_new( DICT_ENUMVAL, &t_7, type, NULL); |
| 196 | CHECK_dict_new( DICT_ENUMVAL, &t_8, type, NULL); |
| 197 | CHECK_dict_new( DICT_ENUMVAL, &t_9, type, NULL); |
| 198 | CHECK_dict_new( DICT_ENUMVAL, &t_10, type, NULL); |
| 199 | CHECK_dict_new( DICT_ENUMVAL, &t_11, type, NULL); |
| 200 | CHECK_dict_new( DICT_ENUMVAL, &t_12, type, NULL); |
| 201 | CHECK_dict_new( DICT_ENUMVAL, &t_13, type, NULL); |
| 202 | CHECK_dict_new( DICT_ENUMVAL, &t_14, type, NULL); |
| 203 | CHECK_dict_new( DICT_ENUMVAL, &t_15, type, NULL); |
| 204 | CHECK_dict_new( DICT_ENUMVAL, &t_16, type, NULL); |
| 205 | CHECK_dict_new( DICT_ENUMVAL, &t_17, type, NULL); |
| 206 | CHECK_dict_new( DICT_ENUMVAL, &t_18, type, NULL); |
| 207 | CHECK_dict_new( DICT_ENUMVAL, &t_19, type, NULL); |
| 208 | CHECK_dict_new( DICT_ENUMVAL, &t_20, type, NULL); |
| 209 | CHECK_dict_new( DICT_ENUMVAL, &t_21, type, NULL); |
| 210 | CHECK_dict_new( DICT_ENUMVAL, &t_22, type, NULL); |
| 211 | CHECK_dict_new( DICT_ENUMVAL, &t_23, type, NULL); |
| 212 | CHECK_dict_new( DICT_ENUMVAL, &t_24, type, NULL); |
| 213 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 214 | }; |
| 215 | /* Service-Indication */ |
| 216 | { |
| 217 | struct dict_avp_data data = { |
| 218 | 704, /* Code */ |
| 219 | 10415, /* Vendor */ |
| 220 | "Service-Indication", /* Name */ |
| 221 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 222 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 223 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 224 | }; |
| 225 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 226 | }; |
| 227 | /* Subs-Req-Type */ |
| 228 | { |
| 229 | struct dict_avp_data data = { |
| 230 | 705, /* Code */ |
| 231 | 10415, /* Vendor */ |
| 232 | "Subs-Req-Type", /* Name */ |
| 233 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 234 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 235 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 236 | }; |
| 237 | struct dict_object *type; |
| 238 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Subs-Req-Type)", NULL, NULL, NULL }; |
| 239 | struct dict_enumval_data t_1 = { "Subscribe", { .i32=0 }}; |
| 240 | struct dict_enumval_data t_2 = { "Unsubscribe", { .i32=1 }}; |
| 241 | /* Create the Enumerated type, and then the AVP */ |
| 242 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 243 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 244 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 245 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 246 | }; |
| 247 | /* Requested-Domain */ |
| 248 | { |
| 249 | struct dict_avp_data data = { |
| 250 | 706, /* Code */ |
| 251 | 10415, /* Vendor */ |
| 252 | "Requested-Domain", /* Name */ |
| 253 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 254 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 255 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 256 | }; |
| 257 | struct dict_object *type; |
| 258 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Requested-Domain)", NULL, NULL, NULL }; |
| 259 | struct dict_enumval_data t_1 = { "CS_Domain", { .i32=0 }}; |
| 260 | struct dict_enumval_data t_2 = { "PS_Domain", { .i32=1 }}; |
| 261 | /* Create the Enumerated type, and then the AVP */ |
| 262 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 263 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 264 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 265 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 266 | }; |
| 267 | /* Current-Location */ |
| 268 | { |
| 269 | struct dict_avp_data data = { |
| 270 | 707, /* Code */ |
| 271 | 10415, /* Vendor */ |
| 272 | "Current-Location", /* Name */ |
| 273 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 274 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 275 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 276 | }; |
| 277 | struct dict_object *type; |
| 278 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Current-Location)", NULL, NULL, NULL }; |
| 279 | struct dict_enumval_data t_1 = { "DoNotNeedInitiateActiveLocationRetrieval", { .i32=0 }}; |
| 280 | struct dict_enumval_data t_2 = { "InitiateActiveLocationRetrieval", { .i32=1 }}; |
| 281 | /* Create the Enumerated type, and then the AVP */ |
| 282 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 283 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 284 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 285 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 286 | }; |
| 287 | /* Identity-Set */ |
| 288 | { |
| 289 | struct dict_avp_data data = { |
| 290 | 708, /* Code */ |
| 291 | 10415, /* Vendor */ |
| 292 | "Identity-Set", /* Name */ |
| 293 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 294 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 295 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 296 | }; |
| 297 | struct dict_object *type; |
| 298 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Identity-Set)", NULL, NULL, NULL }; |
| 299 | struct dict_enumval_data t_1 = { "ALL_IDENTITIES", { .i32=0 }}; |
| 300 | struct dict_enumval_data t_2 = { "REGISTERED_IDENTITIES", { .i32=1 }}; |
| 301 | struct dict_enumval_data t_3 = { "IMPLICIT_IDENTITIES", { .i32=2 }}; |
| 302 | struct dict_enumval_data t_4 = { "ALIAS_IDENTITIES", { .i32=3 }}; |
| 303 | /* Create the Enumerated type, and then the AVP */ |
| 304 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 305 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 306 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 307 | CHECK_dict_new( DICT_ENUMVAL, &t_3, type, NULL); |
| 308 | CHECK_dict_new( DICT_ENUMVAL, &t_4, type, NULL); |
| 309 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 310 | }; |
| 311 | /* Expiry-Time */ |
| 312 | { |
| 313 | struct dict_avp_data data = { |
| 314 | 709, /* Code */ |
| 315 | 10415, /* Vendor */ |
| 316 | "Expiry-Time", /* Name */ |
| 317 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 318 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 319 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 320 | }; |
| 321 | CHECK_dict_new( DICT_AVP, &data, Time_type, NULL); |
| 322 | }; |
| 323 | /* Send-Data-Indication */ |
| 324 | { |
| 325 | struct dict_avp_data data = { |
| 326 | 710, /* Code */ |
| 327 | 10415, /* Vendor */ |
| 328 | "Send-Data-Indication", /* Name */ |
| 329 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 330 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 331 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 332 | }; |
| 333 | struct dict_object *type; |
| 334 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Send-Data-Indication)", NULL, NULL, NULL }; |
| 335 | struct dict_enumval_data t_1 = { "USER_DATA_NOT_REQUESTED", { .i32=0 }}; |
| 336 | struct dict_enumval_data t_2 = { "USER_DATA_REQUESTED", { .i32=1 }}; |
| 337 | /* Create the Enumerated type, and then the AVP */ |
| 338 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 339 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 340 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 341 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 342 | }; |
| 343 | /* DSAI-Tag */ |
| 344 | { |
| 345 | struct dict_avp_data data = { |
| 346 | 711, /* Code */ |
| 347 | 10415, /* Vendor */ |
| 348 | "DSAI-Tag", /* Name */ |
| 349 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 350 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 351 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 352 | }; |
| 353 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 354 | }; |
| 355 | /* Wildcarded-Public-Identity */ |
| 356 | { |
| 357 | struct dict_avp_data data = { |
| 358 | 634, /* Code */ |
| 359 | 10415, /* Vendor */ |
| 360 | "Wildcarded-Public-Identity", /* Name */ |
| 361 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 362 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 363 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 364 | }; |
| 365 | CHECK_dict_new( DICT_AVP, &data, UTF8String_type, NULL); |
| 366 | }; |
| 367 | /* Wildcarded-IMPU */ |
| 368 | { |
| 369 | struct dict_avp_data data = { |
| 370 | 636, /* Code */ |
| 371 | 10415, /* Vendor */ |
| 372 | "Wildcarded-IMPU", /* Name */ |
| 373 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 374 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 375 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 376 | }; |
| 377 | CHECK_dict_new( DICT_AVP, &data, UTF8String_type, NULL); |
| 378 | }; |
| 379 | /* One-Time-Notification */ |
| 380 | { |
| 381 | struct dict_avp_data data = { |
| 382 | 712, /* Code */ |
| 383 | 10415, /* Vendor */ |
| 384 | "One-Time-Notification", /* Name */ |
| 385 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 386 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 387 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 388 | }; |
| 389 | struct dict_object *type; |
| 390 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(One-Time-Notification)", NULL, NULL, NULL }; |
| 391 | struct dict_enumval_data t_1 = { "ONE_TIME_NOTIFICATION_REQUESTED", { .i32=0 }}; |
| 392 | struct dict_enumval_data t_2 = { "IP", { .i32=25 }}; |
| 393 | /* Create the Enumerated type, and then the AVP */ |
| 394 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 395 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 396 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 397 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 398 | }; |
| 399 | /* Requested-Nodes */ |
| 400 | { |
| 401 | struct dict_avp_data data = { |
| 402 | 713, /* Code */ |
| 403 | 10415, /* Vendor */ |
| 404 | "Requested-Nodes", /* Name */ |
| 405 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 406 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 407 | AVP_TYPE_UNSIGNED32 /* base type of data */ |
| 408 | }; |
| 409 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 410 | }; |
| 411 | /* Serving-Node-Indication */ |
| 412 | { |
| 413 | struct dict_avp_data data = { |
| 414 | 714, /* Code */ |
| 415 | 10415, /* Vendor */ |
| 416 | "Serving-Node-Indication", /* Name */ |
| 417 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 418 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 419 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 420 | }; |
| 421 | struct dict_object *type; |
| 422 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Serving-Node-Indication)", NULL, NULL, NULL }; |
| 423 | struct dict_enumval_data t_1 = { "ONLY_SERVING_NODES_REQUIRED", { .i32=0 }}; |
| 424 | /* Create the Enumerated type, and then the AVP */ |
| 425 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 426 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 427 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 428 | }; |
| 429 | /* Sequence-Number */ |
| 430 | { |
| 431 | struct dict_avp_data data = { |
| 432 | 716, /* Code */ |
| 433 | 10415, /* Vendor */ |
| 434 | "Sequence-Number", /* Name */ |
| 435 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 436 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 437 | AVP_TYPE_UNSIGNED32 /* base type of data */ |
| 438 | }; |
| 439 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 440 | }; |
| 441 | /* Pre-paging-Supported */ |
| 442 | { |
| 443 | struct dict_avp_data data = { |
| 444 | 717, /* Code */ |
| 445 | 10415, /* Vendor */ |
| 446 | "Pre-paging-Supported", /* Name */ |
| 447 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 448 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 449 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 450 | }; |
| 451 | struct dict_object *type; |
| 452 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Pre-paging-Supported)", NULL, NULL, NULL }; |
| 453 | struct dict_enumval_data t_1 = { "PREPAGING_NOT_SUPPORTED", { .i32=0 }}; |
| 454 | struct dict_enumval_data t_2 = { "PREPAGING_SUPPORTED", { .i32=1 }}; |
| 455 | /* Create the Enumerated type, and then the AVP */ |
| 456 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 457 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 458 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 459 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 460 | }; |
| 461 | /* Local-Time-Zone-Indication */ |
| 462 | { |
| 463 | struct dict_avp_data data = { |
| 464 | 718, /* Code */ |
| 465 | 10415, /* Vendor */ |
| 466 | "Local-Time-Zone-Indication", /* Name */ |
| 467 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 468 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 469 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 470 | }; |
| 471 | struct dict_object *type; |
| 472 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Local-Time-Zone-Indication)", NULL, NULL, NULL }; |
| 473 | struct dict_enumval_data t_1 = { "ONLY_LOCAL_TIME_ZONE_REQUESTED", { .i32=0 }}; |
| 474 | struct dict_enumval_data t_2 = { "LOCAL_TIME_ZONE_WITH_LOCATION_INFO_REQUESTED", { .i32=1 }}; |
| 475 | /* Create the Enumerated type, and then the AVP */ |
| 476 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 477 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 478 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 479 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 480 | }; |
| 481 | /* UDR-Flags */ |
| 482 | { |
| 483 | struct dict_avp_data data = { |
| 484 | 719, /* Code */ |
| 485 | 10415, /* Vendor */ |
| 486 | "UDR-Flags", /* Name */ |
| 487 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 488 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 489 | AVP_TYPE_UNSIGNED32 /* base type of data */ |
| 490 | }; |
| 491 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 492 | }; |
| 493 | /* Call-Reference-Number */ |
| 494 | { |
| 495 | struct dict_avp_data data = { |
| 496 | 721, /* Code */ |
| 497 | 10415, /* Vendor */ |
| 498 | "Call-Reference-Number", /* Name */ |
| 499 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 500 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 501 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 502 | }; |
| 503 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 504 | }; |
| 505 | /* AS-Number */ |
| 506 | { |
| 507 | struct dict_avp_data data = { |
| 508 | 722, /* Code */ |
| 509 | 10415, /* Vendor */ |
| 510 | "AS-Number", /* Name */ |
| 511 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 512 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 513 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 514 | }; |
| 515 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 516 | }; |
| 517 | /* User-Identity */ |
| 518 | { |
| 519 | /* Grouped */ |
| 520 | struct dict_object * avp; |
| 521 | struct dict_avp_data data = { |
| 522 | 700, /* Code */ |
| 523 | 10415, /* Vendor */ |
| 524 | "User-Identity", /* Name */ |
| 525 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 526 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 527 | AVP_TYPE_GROUPED /* base type of data */ |
| 528 | }; |
| 529 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 530 | } |
| 531 | /* Call-Reference-Info */ |
| 532 | { |
| 533 | /* Grouped */ |
| 534 | struct dict_object * avp; |
| 535 | struct dict_avp_data data = { |
| 536 | 720, /* Code */ |
| 537 | 10415, /* Vendor */ |
| 538 | "Call-Reference-Info", /* Name */ |
| 539 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 540 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 541 | AVP_TYPE_GROUPED /* base type of data */ |
| 542 | }; |
| 543 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 544 | } |
| 545 | /* Repository-Data-ID */ |
| 546 | { |
| 547 | /* Grouped */ |
| 548 | struct dict_object * avp; |
| 549 | struct dict_avp_data data = { |
| 550 | 715, /* Code */ |
| 551 | 10415, /* Vendor */ |
| 552 | "Repository-Data-ID", /* Name */ |
| 553 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 554 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 555 | AVP_TYPE_GROUPED /* base type of data */ |
| 556 | }; |
| 557 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 558 | } |
| 559 | |
| 560 | |
| 561 | } |
| 562 | |
| 563 | /* Commands section */ |
| 564 | { |
| 565 | |
| 566 | } |
| 567 | |
| 568 | return 0; |
| 569 | } |
| 570 | |
| 571 | static int dict_ts29329_avps_load_rules(char * conffile) |
| 572 | { |
| 573 | /* Grouped AVP section */ |
| 574 | { |
| 575 | /* User-Identity */ |
| 576 | { |
| 577 | /* Grouped */ |
| 578 | struct dict_object * avp; |
| 579 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 10415, .avp_name = "User-Identity"}; |
| 580 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 581 | struct local_rules_definition rules[] = |
| 582 | { |
| 583 | { { .avp_vendor = 10415, .avp_name = "Public-Identity"}, RULE_OPTIONAL, -1, -1 }, |
| 584 | { { .avp_vendor = 10415, .avp_name = "MSISDN"}, RULE_OPTIONAL, -1, -1 } |
| 585 | }; |
| 586 | PARSE_loc_rules( rules, avp ); |
| 587 | } |
| 588 | /* Call-Reference-Info */ |
| 589 | { |
| 590 | /* Grouped */ |
| 591 | struct dict_object * avp; |
| 592 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 10415, .avp_name = "Call-Reference-Info"}; |
| 593 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 594 | struct local_rules_definition rules[] = |
| 595 | { |
| 596 | { { .avp_vendor = 10415, .avp_name = "Call-Reference-Number"}, RULE_REQUIRED, -1, -1 }, |
| 597 | { { .avp_vendor = 10415, .avp_name = "AS-Number"}, RULE_REQUIRED, -1, -1 } |
| 598 | }; |
| 599 | PARSE_loc_rules( rules, avp ); |
| 600 | } |
| 601 | /* Repository-Data-ID */ |
| 602 | { |
| 603 | /* Grouped */ |
| 604 | struct dict_object * avp; |
| 605 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 10415, .avp_name = "Repository-Data-ID"}; |
| 606 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 607 | struct local_rules_definition rules[] = |
| 608 | { |
| 609 | { { .avp_vendor = 10415, .avp_name = "Service-Indication"}, RULE_REQUIRED, -1, -1 }, |
| 610 | { { .avp_vendor = 10415, .avp_name = "Sequence-Number"}, RULE_REQUIRED, -1, -1 } |
| 611 | }; |
| 612 | PARSE_loc_rules( rules, avp ); |
| 613 | } |
| 614 | |
| 615 | } |
| 616 | |
| 617 | /* Commands section */ |
| 618 | { |
| 619 | |
| 620 | } |
| 621 | |
| 622 | LOG_D( "Extension 'Dictionary definitions for ts29329_avps (e20)' initialized"); |
| 623 | return 0; |
| 624 | } |
| 625 | |
| 626 | int dict_entry(char * conffile) |
| 627 | { |
| 628 | dict_ts29329_avps_load_defs(conffile); |
| 629 | return dict_ts29329_avps_load_rules(conffile); |
| 630 | } |
| 631 | |
| 632 | const char* dict_ts29329_avps_proto_ver(char * conffile) { |
| 633 | return ts29329_avps_proto_ver; |
| 634 | } |
| 635 | |
| 636 | const double dict_ts29329_avps_gen_ts(char * conffile) { |
| 637 | return ts29329_avps_gen_date; |
| 638 | } |
| 639 | |
| 640 | EXTENSION_ENTRY2("dict_ts29329_avps", dict_ts29329_avps_load_defs, dict_ts29329_avps_load_rules, "dict_ts29229_avps", "dict_draftload_avps", "dict_rfc7683_avps", "dict_rfc7944_avps"); |
| 641 | |
| 642 | |
| 643 | |