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 rfc4006bis_avps. |
| 25 | */ |
| 26 | #include <freeDiameter/extension.h> |
| 27 | |
| 28 | #define PROTO_VER "unspecified" |
| 29 | #define GEN_DATE 1506697143.49 |
| 30 | |
| 31 | const char *rfc4006bis_avps_proto_ver = PROTO_VER; |
| 32 | const double rfc4006bis_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_rfc4006bis_avps_load_defs(char * conffile) |
| 101 | { |
| 102 | TRACE_ENTRY("%p", conffile); |
| 103 | |
| 104 | /* AVP section */ |
| 105 | { |
| 106 | struct dict_object * Address_type; |
| 107 | struct dict_object * UTF8String_type; |
| 108 | struct dict_object * DiameterIdentity_type; |
| 109 | struct dict_object * DiameterURI_type; |
| 110 | struct dict_object * Time_type; |
| 111 | struct dict_object * IPFilterRule_type; |
| 112 | |
| 113 | CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Address", &Address_type); |
| 114 | CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "UTF8String", &UTF8String_type); |
| 115 | CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterIdentity", &DiameterIdentity_type); |
| 116 | CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterURI", &DiameterURI_type); |
| 117 | CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Time", &Time_type); |
| 118 | CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "IPFilterRule", &IPFilterRule_type); |
| 119 | /* CC-Correlation-Id */ |
| 120 | { |
| 121 | struct dict_avp_data data = { |
| 122 | 411, /* Code */ |
| 123 | 0, /* Vendor */ |
| 124 | "CC-Correlation-Id", /* Name */ |
| 125 | AVP_FLAG_VENDOR, /* Fixed flags */ |
| 126 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 127 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 128 | }; |
| 129 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 130 | }; |
| 131 | /* CC-Input-Octets */ |
| 132 | { |
| 133 | struct dict_avp_data data = { |
| 134 | 412, /* Code */ |
| 135 | 0, /* Vendor */ |
| 136 | "CC-Input-Octets", /* Name */ |
| 137 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 138 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 139 | AVP_TYPE_UNSIGNED64 /* base type of data */ |
| 140 | }; |
| 141 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 142 | }; |
| 143 | /* CC-Output-Octets */ |
| 144 | { |
| 145 | struct dict_avp_data data = { |
| 146 | 414, /* Code */ |
| 147 | 0, /* Vendor */ |
| 148 | "CC-Output-Octets", /* Name */ |
| 149 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 150 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 151 | AVP_TYPE_UNSIGNED64 /* base type of data */ |
| 152 | }; |
| 153 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 154 | }; |
| 155 | /* CC-Request-Number */ |
| 156 | { |
| 157 | struct dict_avp_data data = { |
| 158 | 415, /* Code */ |
| 159 | 0, /* Vendor */ |
| 160 | "CC-Request-Number", /* Name */ |
| 161 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 162 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 163 | AVP_TYPE_UNSIGNED32 /* base type of data */ |
| 164 | }; |
| 165 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 166 | }; |
| 167 | /* CC-Request-Type */ |
| 168 | { |
| 169 | struct dict_avp_data data = { |
| 170 | 416, /* Code */ |
| 171 | 0, /* Vendor */ |
| 172 | "CC-Request-Type", /* Name */ |
| 173 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 174 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 175 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 176 | }; |
| 177 | struct dict_object *type; |
| 178 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(CC-Request-Type)", NULL, NULL, NULL }; |
| 179 | struct dict_enumval_data t_1 = { "INITIAL_REQUEST", { .i32=1 }}; |
| 180 | struct dict_enumval_data t_2 = { "UPDATE_REQUEST", { .i32=2 }}; |
| 181 | struct dict_enumval_data t_3 = { "TERMINATION_REQUEST", { .i32=3 }}; |
| 182 | struct dict_enumval_data t_4 = { "EVENT_REQUEST", { .i32=4 }}; |
| 183 | /* Create the Enumerated type, and then the AVP */ |
| 184 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 185 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 186 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 187 | CHECK_dict_new( DICT_ENUMVAL, &t_3, type, NULL); |
| 188 | CHECK_dict_new( DICT_ENUMVAL, &t_4, type, NULL); |
| 189 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 190 | }; |
| 191 | /* CC-Service-Specific-Units */ |
| 192 | { |
| 193 | struct dict_avp_data data = { |
| 194 | 417, /* Code */ |
| 195 | 0, /* Vendor */ |
| 196 | "CC-Service-Specific-Units", /* Name */ |
| 197 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 198 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 199 | AVP_TYPE_UNSIGNED64 /* base type of data */ |
| 200 | }; |
| 201 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 202 | }; |
| 203 | /* CC-Session-Failover */ |
| 204 | { |
| 205 | struct dict_avp_data data = { |
| 206 | 418, /* Code */ |
| 207 | 0, /* Vendor */ |
| 208 | "CC-Session-Failover", /* Name */ |
| 209 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 210 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 211 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 212 | }; |
| 213 | struct dict_object *type; |
| 214 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(CC-Session-Failover)", NULL, NULL, NULL }; |
| 215 | struct dict_enumval_data t_1 = { "FAILOVER_NOT_SUPPORTED", { .i32=0 }}; |
| 216 | struct dict_enumval_data t_2 = { "FAILOVER_SUPPORTED", { .i32=1 }}; |
| 217 | /* Create the Enumerated type, and then the AVP */ |
| 218 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 219 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 220 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 221 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 222 | }; |
| 223 | /* CC-Sub-Session-Id */ |
| 224 | { |
| 225 | struct dict_avp_data data = { |
| 226 | 419, /* Code */ |
| 227 | 0, /* Vendor */ |
| 228 | "CC-Sub-Session-Id", /* Name */ |
| 229 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 230 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 231 | AVP_TYPE_UNSIGNED64 /* base type of data */ |
| 232 | }; |
| 233 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 234 | }; |
| 235 | /* CC-Time */ |
| 236 | { |
| 237 | struct dict_avp_data data = { |
| 238 | 420, /* Code */ |
| 239 | 0, /* Vendor */ |
| 240 | "CC-Time", /* Name */ |
| 241 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 242 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 243 | AVP_TYPE_UNSIGNED32 /* base type of data */ |
| 244 | }; |
| 245 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 246 | }; |
| 247 | /* CC-Total-Octets */ |
| 248 | { |
| 249 | struct dict_avp_data data = { |
| 250 | 421, /* Code */ |
| 251 | 0, /* Vendor */ |
| 252 | "CC-Total-Octets", /* Name */ |
| 253 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 254 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 255 | AVP_TYPE_UNSIGNED64 /* base type of data */ |
| 256 | }; |
| 257 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 258 | }; |
| 259 | /* CC-Unit-Type */ |
| 260 | { |
| 261 | struct dict_avp_data data = { |
| 262 | 454, /* Code */ |
| 263 | 0, /* Vendor */ |
| 264 | "CC-Unit-Type", /* Name */ |
| 265 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 266 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 267 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 268 | }; |
| 269 | struct dict_object *type; |
| 270 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(CC-Unit-Type)", NULL, NULL, NULL }; |
| 271 | struct dict_enumval_data t_1 = { "TIME", { .i32=0 }}; |
| 272 | struct dict_enumval_data t_2 = { "MONEY", { .i32=1 }}; |
| 273 | struct dict_enumval_data t_3 = { "TOTAL_OCTETS", { .i32=2 }}; |
| 274 | struct dict_enumval_data t_4 = { "INPUT_OCTETS", { .i32=3 }}; |
| 275 | struct dict_enumval_data t_5 = { "OUTPUT_OCTETS", { .i32=4 }}; |
| 276 | struct dict_enumval_data t_6 = { "SERVICE_SPECIFIC_UNITS", { .i32=5 }}; |
| 277 | /* Create the Enumerated type, and then the AVP */ |
| 278 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 279 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 280 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 281 | CHECK_dict_new( DICT_ENUMVAL, &t_3, type, NULL); |
| 282 | CHECK_dict_new( DICT_ENUMVAL, &t_4, type, NULL); |
| 283 | CHECK_dict_new( DICT_ENUMVAL, &t_5, type, NULL); |
| 284 | CHECK_dict_new( DICT_ENUMVAL, &t_6, type, NULL); |
| 285 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 286 | }; |
| 287 | /* Check-Balance-Result */ |
| 288 | { |
| 289 | struct dict_avp_data data = { |
| 290 | 422, /* Code */ |
| 291 | 0, /* Vendor */ |
| 292 | "Check-Balance-Result", /* Name */ |
| 293 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 294 | AVP_FLAG_MANDATORY, /* 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, "Enumerated(Check-Balance-Result)", NULL, NULL, NULL }; |
| 299 | struct dict_enumval_data t_1 = { "ENOUGH_CREDIT", { .i32=0 }}; |
| 300 | struct dict_enumval_data t_2 = { "NO_CREDIT", { .i32=1 }}; |
| 301 | /* Create the Enumerated type, and then the AVP */ |
| 302 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 303 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 304 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 305 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 306 | }; |
| 307 | /* Cost-Unit */ |
| 308 | { |
| 309 | struct dict_avp_data data = { |
| 310 | 424, /* Code */ |
| 311 | 0, /* Vendor */ |
| 312 | "Cost-Unit", /* Name */ |
| 313 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 314 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 315 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 316 | }; |
| 317 | CHECK_dict_new( DICT_AVP, &data, UTF8String_type, NULL); |
| 318 | }; |
| 319 | /* Credit-Control */ |
| 320 | { |
| 321 | struct dict_avp_data data = { |
| 322 | 426, /* Code */ |
| 323 | 0, /* Vendor */ |
| 324 | "Credit-Control", /* Name */ |
| 325 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 326 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 327 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 328 | }; |
| 329 | struct dict_object *type; |
| 330 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Credit-Control)", NULL, NULL, NULL }; |
| 331 | struct dict_enumval_data t_1 = { "CREDIT_AUTHORIZATION", { .i32=0 }}; |
| 332 | struct dict_enumval_data t_2 = { "RE_AUTHORIZATION", { .i32=1 }}; |
| 333 | /* Create the Enumerated type, and then the AVP */ |
| 334 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 335 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 336 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 337 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 338 | }; |
| 339 | /* Credit-Control-Failure-Handling */ |
| 340 | { |
| 341 | struct dict_avp_data data = { |
| 342 | 427, /* Code */ |
| 343 | 0, /* Vendor */ |
| 344 | "Credit-Control-Failure-Handling", /* Name */ |
| 345 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 346 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 347 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 348 | }; |
| 349 | struct dict_object *type; |
| 350 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Credit-Control-Failure-Handling)", NULL, NULL, NULL }; |
| 351 | struct dict_enumval_data t_1 = { "TERMINATE", { .i32=0 }}; |
| 352 | struct dict_enumval_data t_2 = { "CONTINUE", { .i32=1 }}; |
| 353 | struct dict_enumval_data t_3 = { "RETRY_AND_TERMINATE", { .i32=2 }}; |
| 354 | /* Create the Enumerated type, and then the AVP */ |
| 355 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 356 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 357 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 358 | CHECK_dict_new( DICT_ENUMVAL, &t_3, type, NULL); |
| 359 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 360 | }; |
| 361 | /* Currency-Code */ |
| 362 | { |
| 363 | struct dict_avp_data data = { |
| 364 | 425, /* Code */ |
| 365 | 0, /* Vendor */ |
| 366 | "Currency-Code", /* Name */ |
| 367 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 368 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 369 | AVP_TYPE_UNSIGNED32 /* base type of data */ |
| 370 | }; |
| 371 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 372 | }; |
| 373 | /* Direct-Debiting-Failure-Handling */ |
| 374 | { |
| 375 | struct dict_avp_data data = { |
| 376 | 428, /* Code */ |
| 377 | 0, /* Vendor */ |
| 378 | "Direct-Debiting-Failure-Handling", /* Name */ |
| 379 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 380 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 381 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 382 | }; |
| 383 | struct dict_object *type; |
| 384 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Direct-Debiting-Failure-Handling)", NULL, NULL, NULL }; |
| 385 | struct dict_enumval_data t_1 = { "TERMINATE_OR_BUFFER", { .i32=0 }}; |
| 386 | struct dict_enumval_data t_2 = { "CONTINUE", { .i32=1 }}; |
| 387 | /* Create the Enumerated type, and then the AVP */ |
| 388 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 389 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 390 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 391 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 392 | }; |
| 393 | /* Exponent */ |
| 394 | { |
| 395 | struct dict_avp_data data = { |
| 396 | 429, /* Code */ |
| 397 | 0, /* Vendor */ |
| 398 | "Exponent", /* Name */ |
| 399 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 400 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 401 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 402 | }; |
| 403 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 404 | }; |
| 405 | /* Final-Unit-Action */ |
| 406 | { |
| 407 | struct dict_avp_data data = { |
| 408 | 449, /* Code */ |
| 409 | 0, /* Vendor */ |
| 410 | "Final-Unit-Action", /* Name */ |
| 411 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 412 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 413 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 414 | }; |
| 415 | struct dict_object *type; |
| 416 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Final-Unit-Action)", NULL, NULL, NULL }; |
| 417 | struct dict_enumval_data t_1 = { "TERMINATE", { .i32=0 }}; |
| 418 | struct dict_enumval_data t_2 = { "REDIRECT", { .i32=1 }}; |
| 419 | struct dict_enumval_data t_3 = { "RESTRICT_ACCESS", { .i32=2 }}; |
| 420 | /* Create the Enumerated type, and then the AVP */ |
| 421 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 422 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 423 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 424 | CHECK_dict_new( DICT_ENUMVAL, &t_3, type, NULL); |
| 425 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 426 | }; |
| 427 | /* G-S-U-Pool-Identifier */ |
| 428 | { |
| 429 | struct dict_avp_data data = { |
| 430 | 453, /* Code */ |
| 431 | 0, /* Vendor */ |
| 432 | "G-S-U-Pool-Identifier", /* Name */ |
| 433 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 434 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 435 | AVP_TYPE_UNSIGNED32 /* base type of data */ |
| 436 | }; |
| 437 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 438 | }; |
| 439 | /* Multiple-Services-Indicator */ |
| 440 | { |
| 441 | struct dict_avp_data data = { |
| 442 | 455, /* Code */ |
| 443 | 0, /* Vendor */ |
| 444 | "Multiple-Services-Indicator", /* Name */ |
| 445 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 446 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 447 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 448 | }; |
| 449 | struct dict_object *type; |
| 450 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Multiple-Services-Indicator)", NULL, NULL, NULL }; |
| 451 | struct dict_enumval_data t_1 = { "MULTIPLE_SERVICES_NOT_SUPPORTED", { .i32=0 }}; |
| 452 | struct dict_enumval_data t_2 = { "MULTIPLE_SERVICES_SUPPORTED", { .i32=1 }}; |
| 453 | /* Create the Enumerated type, and then the AVP */ |
| 454 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 455 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 456 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 457 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 458 | }; |
| 459 | /* Rating-Group */ |
| 460 | { |
| 461 | struct dict_avp_data data = { |
| 462 | 432, /* Code */ |
| 463 | 0, /* Vendor */ |
| 464 | "Rating-Group", /* Name */ |
| 465 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 466 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 467 | AVP_TYPE_UNSIGNED32 /* base type of data */ |
| 468 | }; |
| 469 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 470 | }; |
| 471 | /* Redirect-Address-Type */ |
| 472 | { |
| 473 | struct dict_avp_data data = { |
| 474 | 433, /* Code */ |
| 475 | 0, /* Vendor */ |
| 476 | "Redirect-Address-Type", /* Name */ |
| 477 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 478 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 479 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 480 | }; |
| 481 | struct dict_object *type; |
| 482 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Redirect-Address-Type)", NULL, NULL, NULL }; |
| 483 | struct dict_enumval_data t_1 = { "IPv4_Address", { .i32=0 }}; |
| 484 | struct dict_enumval_data t_2 = { "IPv6_Address", { .i32=1 }}; |
| 485 | struct dict_enumval_data t_3 = { "URL", { .i32=2 }}; |
| 486 | struct dict_enumval_data t_4 = { "SIP_URI", { .i32=3 }}; |
| 487 | /* Create the Enumerated type, and then the AVP */ |
| 488 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 489 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 490 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 491 | CHECK_dict_new( DICT_ENUMVAL, &t_3, type, NULL); |
| 492 | CHECK_dict_new( DICT_ENUMVAL, &t_4, type, NULL); |
| 493 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 494 | }; |
| 495 | /* Redirect-Server-Address */ |
| 496 | { |
| 497 | struct dict_avp_data data = { |
| 498 | 435, /* Code */ |
| 499 | 0, /* Vendor */ |
| 500 | "Redirect-Server-Address", /* Name */ |
| 501 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 502 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 503 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 504 | }; |
| 505 | CHECK_dict_new( DICT_AVP, &data, UTF8String_type, NULL); |
| 506 | }; |
| 507 | /* Redirect-Address-IPAddress */ |
| 508 | { |
| 509 | struct dict_avp_data data = { |
| 510 | 99996, /* Code */ |
| 511 | 0, /* Vendor */ |
| 512 | "Redirect-Address-IPAddress", /* Name */ |
| 513 | AVP_FLAG_VENDOR, /* Fixed flags */ |
| 514 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 515 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 516 | }; |
| 517 | CHECK_dict_new( DICT_AVP, &data, Address_type, NULL); |
| 518 | }; |
| 519 | /* Redirect-Address-URL */ |
| 520 | { |
| 521 | struct dict_avp_data data = { |
| 522 | 99997, /* Code */ |
| 523 | 0, /* Vendor */ |
| 524 | "Redirect-Address-URL", /* Name */ |
| 525 | AVP_FLAG_VENDOR, /* Fixed flags */ |
| 526 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 527 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 528 | }; |
| 529 | CHECK_dict_new( DICT_AVP, &data, UTF8String_type, NULL); |
| 530 | }; |
| 531 | /* Redirect-Address-SIP-URI */ |
| 532 | { |
| 533 | struct dict_avp_data data = { |
| 534 | 99998, /* Code */ |
| 535 | 0, /* Vendor */ |
| 536 | "Redirect-Address-SIP-URI", /* Name */ |
| 537 | AVP_FLAG_VENDOR, /* Fixed flags */ |
| 538 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 539 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 540 | }; |
| 541 | CHECK_dict_new( DICT_AVP, &data, UTF8String_type, NULL); |
| 542 | }; |
| 543 | /* Requested-Action */ |
| 544 | { |
| 545 | struct dict_avp_data data = { |
| 546 | 436, /* Code */ |
| 547 | 0, /* Vendor */ |
| 548 | "Requested-Action", /* Name */ |
| 549 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 550 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 551 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 552 | }; |
| 553 | struct dict_object *type; |
| 554 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Requested-Action)", NULL, NULL, NULL }; |
| 555 | struct dict_enumval_data t_1 = { "DIRECT_DEBITING", { .i32=0 }}; |
| 556 | struct dict_enumval_data t_2 = { "REFUND_ACCOUNT", { .i32=1 }}; |
| 557 | struct dict_enumval_data t_3 = { "CHECK_BALANCE", { .i32=2 }}; |
| 558 | struct dict_enumval_data t_4 = { "PRICE_ENQUIRY", { .i32=3 }}; |
| 559 | /* Create the Enumerated type, and then the AVP */ |
| 560 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 561 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 562 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 563 | CHECK_dict_new( DICT_ENUMVAL, &t_3, type, NULL); |
| 564 | CHECK_dict_new( DICT_ENUMVAL, &t_4, type, NULL); |
| 565 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 566 | }; |
| 567 | /* Restriction-Filter-Rule */ |
| 568 | { |
| 569 | struct dict_avp_data data = { |
| 570 | 438, /* Code */ |
| 571 | 0, /* Vendor */ |
| 572 | "Restriction-Filter-Rule", /* Name */ |
| 573 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 574 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 575 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 576 | }; |
| 577 | CHECK_dict_new( DICT_AVP, &data, IPFilterRule_type, NULL); |
| 578 | }; |
| 579 | /* Service-Context-Id */ |
| 580 | { |
| 581 | struct dict_avp_data data = { |
| 582 | 461, /* Code */ |
| 583 | 0, /* Vendor */ |
| 584 | "Service-Context-Id", /* Name */ |
| 585 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 586 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 587 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 588 | }; |
| 589 | CHECK_dict_new( DICT_AVP, &data, UTF8String_type, NULL); |
| 590 | }; |
| 591 | /* Service-Identifier */ |
| 592 | { |
| 593 | struct dict_avp_data data = { |
| 594 | 439, /* Code */ |
| 595 | 0, /* Vendor */ |
| 596 | "Service-Identifier", /* Name */ |
| 597 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 598 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 599 | AVP_TYPE_UNSIGNED32 /* base type of data */ |
| 600 | }; |
| 601 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 602 | }; |
| 603 | /* Service-Parameter-Type */ |
| 604 | { |
| 605 | struct dict_avp_data data = { |
| 606 | 441, /* Code */ |
| 607 | 0, /* Vendor */ |
| 608 | "Service-Parameter-Type", /* Name */ |
| 609 | AVP_FLAG_VENDOR, /* Fixed flags */ |
| 610 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 611 | AVP_TYPE_UNSIGNED32 /* base type of data */ |
| 612 | }; |
| 613 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 614 | }; |
| 615 | /* Service-Parameter-Value */ |
| 616 | { |
| 617 | struct dict_avp_data data = { |
| 618 | 442, /* Code */ |
| 619 | 0, /* Vendor */ |
| 620 | "Service-Parameter-Value", /* Name */ |
| 621 | AVP_FLAG_VENDOR, /* Fixed flags */ |
| 622 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 623 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 624 | }; |
| 625 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 626 | }; |
| 627 | /* Subscription-Id-Data */ |
| 628 | { |
| 629 | struct dict_avp_data data = { |
| 630 | 444, /* Code */ |
| 631 | 0, /* Vendor */ |
| 632 | "Subscription-Id-Data", /* Name */ |
| 633 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 634 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 635 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 636 | }; |
| 637 | CHECK_dict_new( DICT_AVP, &data, UTF8String_type, NULL); |
| 638 | }; |
| 639 | /* Subscription-Id-Type */ |
| 640 | { |
| 641 | struct dict_avp_data data = { |
| 642 | 450, /* Code */ |
| 643 | 0, /* Vendor */ |
| 644 | "Subscription-Id-Type", /* Name */ |
| 645 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 646 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 647 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 648 | }; |
| 649 | struct dict_object *type; |
| 650 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Subscription-Id-Type)", NULL, NULL, NULL }; |
| 651 | struct dict_enumval_data t_1 = { "END_USER_E164", { .i32=0 }}; |
| 652 | struct dict_enumval_data t_2 = { "END_USER_IMSI", { .i32=1 }}; |
| 653 | struct dict_enumval_data t_3 = { "END_USER_SIP_URI", { .i32=2 }}; |
| 654 | struct dict_enumval_data t_4 = { "END_USER_NAI", { .i32=3 }}; |
| 655 | struct dict_enumval_data t_5 = { "END_USER_PRIVATE", { .i32=4 }}; |
| 656 | /* Create the Enumerated type, and then the AVP */ |
| 657 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 658 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 659 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 660 | CHECK_dict_new( DICT_ENUMVAL, &t_3, type, NULL); |
| 661 | CHECK_dict_new( DICT_ENUMVAL, &t_4, type, NULL); |
| 662 | CHECK_dict_new( DICT_ENUMVAL, &t_5, type, NULL); |
| 663 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 664 | }; |
| 665 | /* Subscription-Id-E164 */ |
| 666 | { |
| 667 | struct dict_avp_data data = { |
| 668 | 99990, /* Code */ |
| 669 | 0, /* Vendor */ |
| 670 | "Subscription-Id-E164", /* Name */ |
| 671 | AVP_FLAG_VENDOR, /* Fixed flags */ |
| 672 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 673 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 674 | }; |
| 675 | CHECK_dict_new( DICT_AVP, &data, UTF8String_type, NULL); |
| 676 | }; |
| 677 | /* Subscription-Id-IMSI */ |
| 678 | { |
| 679 | struct dict_avp_data data = { |
| 680 | 99991, /* Code */ |
| 681 | 0, /* Vendor */ |
| 682 | "Subscription-Id-IMSI", /* Name */ |
| 683 | AVP_FLAG_VENDOR, /* Fixed flags */ |
| 684 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 685 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 686 | }; |
| 687 | CHECK_dict_new( DICT_AVP, &data, UTF8String_type, NULL); |
| 688 | }; |
| 689 | /* Subscription-Id-SIP-URI */ |
| 690 | { |
| 691 | struct dict_avp_data data = { |
| 692 | 99992, /* Code */ |
| 693 | 0, /* Vendor */ |
| 694 | "Subscription-Id-SIP-URI", /* Name */ |
| 695 | AVP_FLAG_VENDOR, /* Fixed flags */ |
| 696 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 697 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 698 | }; |
| 699 | CHECK_dict_new( DICT_AVP, &data, UTF8String_type, NULL); |
| 700 | }; |
| 701 | /* Subscription-Id-NAI */ |
| 702 | { |
| 703 | struct dict_avp_data data = { |
| 704 | 99993, /* Code */ |
| 705 | 0, /* Vendor */ |
| 706 | "Subscription-Id-NAI", /* Name */ |
| 707 | AVP_FLAG_VENDOR, /* Fixed flags */ |
| 708 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 709 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 710 | }; |
| 711 | CHECK_dict_new( DICT_AVP, &data, UTF8String_type, NULL); |
| 712 | }; |
| 713 | /* Subscription-Id-Private */ |
| 714 | { |
| 715 | struct dict_avp_data data = { |
| 716 | 99994, /* Code */ |
| 717 | 0, /* Vendor */ |
| 718 | "Subscription-Id-Private", /* Name */ |
| 719 | AVP_FLAG_VENDOR, /* Fixed flags */ |
| 720 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 721 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 722 | }; |
| 723 | CHECK_dict_new( DICT_AVP, &data, UTF8String_type, NULL); |
| 724 | }; |
| 725 | /* Tariff-Change-Usage */ |
| 726 | { |
| 727 | struct dict_avp_data data = { |
| 728 | 452, /* Code */ |
| 729 | 0, /* Vendor */ |
| 730 | "Tariff-Change-Usage", /* Name */ |
| 731 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 732 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 733 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 734 | }; |
| 735 | struct dict_object *type; |
| 736 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Tariff-Change-Usage)", NULL, NULL, NULL }; |
| 737 | struct dict_enumval_data t_1 = { "UNIT_BEFORE_TARIFF_CHANGE", { .i32=0 }}; |
| 738 | struct dict_enumval_data t_2 = { "UNIT_AFTER_TARIFF_CHANGE", { .i32=1 }}; |
| 739 | struct dict_enumval_data t_3 = { "UNIT_INDETERMINATE", { .i32=2 }}; |
| 740 | /* Create the Enumerated type, and then the AVP */ |
| 741 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 742 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 743 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 744 | CHECK_dict_new( DICT_ENUMVAL, &t_3, type, NULL); |
| 745 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 746 | }; |
| 747 | /* Tariff-Time-Change */ |
| 748 | { |
| 749 | struct dict_avp_data data = { |
| 750 | 451, /* Code */ |
| 751 | 0, /* Vendor */ |
| 752 | "Tariff-Time-Change", /* Name */ |
| 753 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 754 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 755 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 756 | }; |
| 757 | CHECK_dict_new( DICT_AVP, &data, Time_type, NULL); |
| 758 | }; |
| 759 | /* User-Equipment-Info-Type */ |
| 760 | { |
| 761 | struct dict_avp_data data = { |
| 762 | 459, /* Code */ |
| 763 | 0, /* Vendor */ |
| 764 | "User-Equipment-Info-Type", /* Name */ |
| 765 | AVP_FLAG_VENDOR, /* Fixed flags */ |
| 766 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 767 | AVP_TYPE_INTEGER32 /* base type of data */ |
| 768 | }; |
| 769 | struct dict_object *type; |
| 770 | struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(User-Equipment-Info-Type)", NULL, NULL, NULL }; |
| 771 | struct dict_enumval_data t_1 = { "IMEISV", { .i32=0 }}; |
| 772 | struct dict_enumval_data t_2 = { "MAC", { .i32=1 }}; |
| 773 | struct dict_enumval_data t_3 = { "EUI64", { .i32=2 }}; |
| 774 | struct dict_enumval_data t_4 = { "MODIFIED_EUI64", { .i32=3 }}; |
| 775 | /* Create the Enumerated type, and then the AVP */ |
| 776 | CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 777 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 778 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 779 | CHECK_dict_new( DICT_ENUMVAL, &t_3, type, NULL); |
| 780 | CHECK_dict_new( DICT_ENUMVAL, &t_4, type, NULL); |
| 781 | CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| 782 | }; |
| 783 | /* User-Equipment-Info-Value */ |
| 784 | { |
| 785 | struct dict_avp_data data = { |
| 786 | 460, /* Code */ |
| 787 | 0, /* Vendor */ |
| 788 | "User-Equipment-Info-Value", /* Name */ |
| 789 | AVP_FLAG_VENDOR, /* Fixed flags */ |
| 790 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 791 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 792 | }; |
| 793 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 794 | }; |
| 795 | /* User-Equipment-Info-IMEISV */ |
| 796 | { |
| 797 | struct dict_avp_data data = { |
| 798 | 99984, /* Code */ |
| 799 | 0, /* Vendor */ |
| 800 | "User-Equipment-Info-IMEISV", /* Name */ |
| 801 | AVP_FLAG_VENDOR, /* Fixed flags */ |
| 802 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 803 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 804 | }; |
| 805 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 806 | }; |
| 807 | /* User-Equipment-Info-MAC */ |
| 808 | { |
| 809 | struct dict_avp_data data = { |
| 810 | 99985, /* Code */ |
| 811 | 0, /* Vendor */ |
| 812 | "User-Equipment-Info-MAC", /* Name */ |
| 813 | AVP_FLAG_VENDOR, /* Fixed flags */ |
| 814 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 815 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 816 | }; |
| 817 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 818 | }; |
| 819 | /* User-Equipment-Info-EUI64 */ |
| 820 | { |
| 821 | struct dict_avp_data data = { |
| 822 | 99986, /* Code */ |
| 823 | 0, /* Vendor */ |
| 824 | "User-Equipment-Info-EUI64", /* Name */ |
| 825 | AVP_FLAG_VENDOR, /* Fixed flags */ |
| 826 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 827 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 828 | }; |
| 829 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 830 | }; |
| 831 | /* User-Equipment-Info-ModifiedEUI64 */ |
| 832 | { |
| 833 | struct dict_avp_data data = { |
| 834 | 99987, /* Code */ |
| 835 | 0, /* Vendor */ |
| 836 | "User-Equipment-Info-ModifiedEUI64", /* Name */ |
| 837 | AVP_FLAG_VENDOR, /* Fixed flags */ |
| 838 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 839 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 840 | }; |
| 841 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 842 | }; |
| 843 | /* User-Equipment-Info-IMEI */ |
| 844 | { |
| 845 | struct dict_avp_data data = { |
| 846 | 99988, /* Code */ |
| 847 | 0, /* Vendor */ |
| 848 | "User-Equipment-Info-IMEI", /* Name */ |
| 849 | AVP_FLAG_VENDOR, /* Fixed flags */ |
| 850 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 851 | AVP_TYPE_OCTETSTRING /* base type of data */ |
| 852 | }; |
| 853 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 854 | }; |
| 855 | /* Value-Digits */ |
| 856 | { |
| 857 | struct dict_avp_data data = { |
| 858 | 447, /* Code */ |
| 859 | 0, /* Vendor */ |
| 860 | "Value-Digits", /* Name */ |
| 861 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 862 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 863 | AVP_TYPE_INTEGER64 /* base type of data */ |
| 864 | }; |
| 865 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 866 | }; |
| 867 | /* Validity-Time */ |
| 868 | { |
| 869 | struct dict_avp_data data = { |
| 870 | 448, /* Code */ |
| 871 | 0, /* Vendor */ |
| 872 | "Validity-Time", /* Name */ |
| 873 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 874 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 875 | AVP_TYPE_UNSIGNED32 /* base type of data */ |
| 876 | }; |
| 877 | CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| 878 | }; |
| 879 | /* Subscription-Id-Extension */ |
| 880 | { |
| 881 | /* Grouped */ |
| 882 | struct dict_object * avp; |
| 883 | struct dict_avp_data data = { |
| 884 | 99989, /* Code */ |
| 885 | 0, /* Vendor */ |
| 886 | "Subscription-Id-Extension", /* Name */ |
| 887 | AVP_FLAG_VENDOR, /* Fixed flags */ |
| 888 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 889 | AVP_TYPE_GROUPED /* base type of data */ |
| 890 | }; |
| 891 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 892 | } |
| 893 | /* Subscription-Id */ |
| 894 | { |
| 895 | /* Grouped */ |
| 896 | struct dict_object * avp; |
| 897 | struct dict_avp_data data = { |
| 898 | 443, /* Code */ |
| 899 | 0, /* Vendor */ |
| 900 | "Subscription-Id", /* Name */ |
| 901 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 902 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 903 | AVP_TYPE_GROUPED /* base type of data */ |
| 904 | }; |
| 905 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 906 | } |
| 907 | /* Service-Parameter-Info */ |
| 908 | { |
| 909 | /* Grouped */ |
| 910 | struct dict_object * avp; |
| 911 | struct dict_avp_data data = { |
| 912 | 440, /* Code */ |
| 913 | 0, /* Vendor */ |
| 914 | "Service-Parameter-Info", /* Name */ |
| 915 | AVP_FLAG_VENDOR, /* Fixed flags */ |
| 916 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 917 | AVP_TYPE_GROUPED /* base type of data */ |
| 918 | }; |
| 919 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 920 | } |
| 921 | /* User-Equipment-Info */ |
| 922 | { |
| 923 | /* Grouped */ |
| 924 | struct dict_object * avp; |
| 925 | struct dict_avp_data data = { |
| 926 | 458, /* Code */ |
| 927 | 0, /* Vendor */ |
| 928 | "User-Equipment-Info", /* Name */ |
| 929 | AVP_FLAG_VENDOR, /* Fixed flags */ |
| 930 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 931 | AVP_TYPE_GROUPED /* base type of data */ |
| 932 | }; |
| 933 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 934 | } |
| 935 | /* Unit-Value */ |
| 936 | { |
| 937 | /* Grouped */ |
| 938 | struct dict_object * avp; |
| 939 | struct dict_avp_data data = { |
| 940 | 445, /* Code */ |
| 941 | 0, /* Vendor */ |
| 942 | "Unit-Value", /* Name */ |
| 943 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 944 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 945 | AVP_TYPE_GROUPED /* base type of data */ |
| 946 | }; |
| 947 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 948 | } |
| 949 | /* Redirect-Server-Extension */ |
| 950 | { |
| 951 | /* Grouped */ |
| 952 | struct dict_object * avp; |
| 953 | struct dict_avp_data data = { |
| 954 | 99995, /* Code */ |
| 955 | 0, /* Vendor */ |
| 956 | "Redirect-Server-Extension", /* Name */ |
| 957 | AVP_FLAG_VENDOR, /* Fixed flags */ |
| 958 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 959 | AVP_TYPE_GROUPED /* base type of data */ |
| 960 | }; |
| 961 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 962 | } |
| 963 | /* Redirect-Server */ |
| 964 | { |
| 965 | /* Grouped */ |
| 966 | struct dict_object * avp; |
| 967 | struct dict_avp_data data = { |
| 968 | 434, /* Code */ |
| 969 | 0, /* Vendor */ |
| 970 | "Redirect-Server", /* Name */ |
| 971 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 972 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 973 | AVP_TYPE_GROUPED /* base type of data */ |
| 974 | }; |
| 975 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 976 | } |
| 977 | /* User-Equipment-Info-Extension */ |
| 978 | { |
| 979 | /* Grouped */ |
| 980 | struct dict_object * avp; |
| 981 | struct dict_avp_data data = { |
| 982 | 99983, /* Code */ |
| 983 | 0, /* Vendor */ |
| 984 | "User-Equipment-Info-Extension", /* Name */ |
| 985 | AVP_FLAG_VENDOR, /* Fixed flags */ |
| 986 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 987 | AVP_TYPE_GROUPED /* base type of data */ |
| 988 | }; |
| 989 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 990 | } |
| 991 | /* G-S-U-Pool-Reference */ |
| 992 | { |
| 993 | /* Grouped */ |
| 994 | struct dict_object * avp; |
| 995 | struct dict_avp_data data = { |
| 996 | 457, /* Code */ |
| 997 | 0, /* Vendor */ |
| 998 | "G-S-U-Pool-Reference", /* Name */ |
| 999 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 1000 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 1001 | AVP_TYPE_GROUPED /* base type of data */ |
| 1002 | }; |
| 1003 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 1004 | } |
| 1005 | /* Final-Unit-Indication */ |
| 1006 | { |
| 1007 | /* Grouped */ |
| 1008 | struct dict_object * avp; |
| 1009 | struct dict_avp_data data = { |
| 1010 | 430, /* Code */ |
| 1011 | 0, /* Vendor */ |
| 1012 | "Final-Unit-Indication", /* Name */ |
| 1013 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 1014 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 1015 | AVP_TYPE_GROUPED /* base type of data */ |
| 1016 | }; |
| 1017 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 1018 | } |
| 1019 | /* CC-Money */ |
| 1020 | { |
| 1021 | /* Grouped */ |
| 1022 | struct dict_object * avp; |
| 1023 | struct dict_avp_data data = { |
| 1024 | 413, /* Code */ |
| 1025 | 0, /* Vendor */ |
| 1026 | "CC-Money", /* Name */ |
| 1027 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 1028 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 1029 | AVP_TYPE_GROUPED /* base type of data */ |
| 1030 | }; |
| 1031 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 1032 | } |
| 1033 | /* Cost-Information */ |
| 1034 | { |
| 1035 | /* Grouped */ |
| 1036 | struct dict_object * avp; |
| 1037 | struct dict_avp_data data = { |
| 1038 | 423, /* Code */ |
| 1039 | 0, /* Vendor */ |
| 1040 | "Cost-Information", /* Name */ |
| 1041 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 1042 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 1043 | AVP_TYPE_GROUPED /* base type of data */ |
| 1044 | }; |
| 1045 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 1046 | } |
| 1047 | /* Used-Service-Unit */ |
| 1048 | { |
| 1049 | /* Grouped */ |
| 1050 | struct dict_object * avp; |
| 1051 | struct dict_avp_data data = { |
| 1052 | 446, /* Code */ |
| 1053 | 0, /* Vendor */ |
| 1054 | "Used-Service-Unit", /* Name */ |
| 1055 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 1056 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 1057 | AVP_TYPE_GROUPED /* base type of data */ |
| 1058 | }; |
| 1059 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 1060 | } |
| 1061 | /* Requested-Service-Unit */ |
| 1062 | { |
| 1063 | /* Grouped */ |
| 1064 | struct dict_object * avp; |
| 1065 | struct dict_avp_data data = { |
| 1066 | 437, /* Code */ |
| 1067 | 0, /* Vendor */ |
| 1068 | "Requested-Service-Unit", /* Name */ |
| 1069 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 1070 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 1071 | AVP_TYPE_GROUPED /* base type of data */ |
| 1072 | }; |
| 1073 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 1074 | } |
| 1075 | /* Granted-Service-Unit */ |
| 1076 | { |
| 1077 | /* Grouped */ |
| 1078 | struct dict_object * avp; |
| 1079 | struct dict_avp_data data = { |
| 1080 | 431, /* Code */ |
| 1081 | 0, /* Vendor */ |
| 1082 | "Granted-Service-Unit", /* Name */ |
| 1083 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 1084 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 1085 | AVP_TYPE_GROUPED /* base type of data */ |
| 1086 | }; |
| 1087 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 1088 | } |
| 1089 | /* QoS-Final-Unit-Indication */ |
| 1090 | { |
| 1091 | /* Grouped */ |
| 1092 | struct dict_object * avp; |
| 1093 | struct dict_avp_data data = { |
| 1094 | 99999, /* Code */ |
| 1095 | 0, /* Vendor */ |
| 1096 | "QoS-Final-Unit-Indication", /* Name */ |
| 1097 | AVP_FLAG_VENDOR, /* Fixed flags */ |
| 1098 | AVP_FLAG_VENDOR, /* Fixed flag values */ |
| 1099 | AVP_TYPE_GROUPED /* base type of data */ |
| 1100 | }; |
| 1101 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 1102 | } |
| 1103 | /* Multiple-Services-Credit-Control */ |
| 1104 | { |
| 1105 | /* Grouped */ |
| 1106 | struct dict_object * avp; |
| 1107 | struct dict_avp_data data = { |
| 1108 | 456, /* Code */ |
| 1109 | 0, /* Vendor */ |
| 1110 | "Multiple-Services-Credit-Control", /* Name */ |
| 1111 | AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| 1112 | AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| 1113 | AVP_TYPE_GROUPED /* base type of data */ |
| 1114 | }; |
| 1115 | CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| 1116 | } |
| 1117 | |
| 1118 | |
| 1119 | } |
| 1120 | |
| 1121 | /* Commands section */ |
| 1122 | { |
| 1123 | |
| 1124 | } |
| 1125 | |
| 1126 | return 0; |
| 1127 | } |
| 1128 | |
| 1129 | static int dict_rfc4006bis_avps_load_rules(char * conffile) |
| 1130 | { |
| 1131 | /* Grouped AVP section */ |
| 1132 | { |
| 1133 | /* Subscription-Id-Extension */ |
| 1134 | { |
| 1135 | /* Grouped */ |
| 1136 | struct dict_object * avp; |
| 1137 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 0, .avp_name = "Subscription-Id-Extension"}; |
| 1138 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 1139 | struct local_rules_definition rules[] = |
| 1140 | { |
| 1141 | { { .avp_vendor = 0, .avp_name = "Subscription-Id-E164"}, RULE_OPTIONAL, -1, -1 }, |
| 1142 | { { .avp_vendor = 0, .avp_name = "Subscription-Id-IMSI"}, RULE_OPTIONAL, -1, -1 }, |
| 1143 | { { .avp_vendor = 0, .avp_name = "Subscription-Id-SIP-URI"}, RULE_OPTIONAL, -1, -1 }, |
| 1144 | { { .avp_vendor = 0, .avp_name = "Subscription-Id-NAI"}, RULE_OPTIONAL, -1, -1 }, |
| 1145 | { { .avp_vendor = 0, .avp_name = "Subscription-Id-Private"}, RULE_OPTIONAL, -1, -1 } |
| 1146 | }; |
| 1147 | PARSE_loc_rules( rules, avp ); |
| 1148 | } |
| 1149 | /* Subscription-Id */ |
| 1150 | { |
| 1151 | /* Grouped */ |
| 1152 | struct dict_object * avp; |
| 1153 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 0, .avp_name = "Subscription-Id"}; |
| 1154 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 1155 | struct local_rules_definition rules[] = |
| 1156 | { |
| 1157 | { { .avp_vendor = 0, .avp_name = "Subscription-Id-Type"}, RULE_REQUIRED, -1, -1 }, |
| 1158 | { { .avp_vendor = 0, .avp_name = "Subscription-Id-Data"}, RULE_REQUIRED, -1, -1 } |
| 1159 | }; |
| 1160 | PARSE_loc_rules( rules, avp ); |
| 1161 | } |
| 1162 | /* Service-Parameter-Info */ |
| 1163 | { |
| 1164 | /* Grouped */ |
| 1165 | struct dict_object * avp; |
| 1166 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 0, .avp_name = "Service-Parameter-Info"}; |
| 1167 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 1168 | struct local_rules_definition rules[] = |
| 1169 | { |
| 1170 | { { .avp_vendor = 0, .avp_name = "Service-Parameter-Type"}, RULE_REQUIRED, -1, -1 }, |
| 1171 | { { .avp_vendor = 0, .avp_name = "Service-Parameter-Value"}, RULE_REQUIRED, -1, -1 } |
| 1172 | }; |
| 1173 | PARSE_loc_rules( rules, avp ); |
| 1174 | } |
| 1175 | /* User-Equipment-Info */ |
| 1176 | { |
| 1177 | /* Grouped */ |
| 1178 | struct dict_object * avp; |
| 1179 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 0, .avp_name = "User-Equipment-Info"}; |
| 1180 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 1181 | struct local_rules_definition rules[] = |
| 1182 | { |
| 1183 | { { .avp_vendor = 0, .avp_name = "User-Equipment-Info-Type"}, RULE_REQUIRED, -1, -1 }, |
| 1184 | { { .avp_vendor = 0, .avp_name = "User-Equipment-Info-Value"}, RULE_REQUIRED, -1, -1 } |
| 1185 | }; |
| 1186 | PARSE_loc_rules( rules, avp ); |
| 1187 | } |
| 1188 | /* Unit-Value */ |
| 1189 | { |
| 1190 | /* Grouped */ |
| 1191 | struct dict_object * avp; |
| 1192 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 0, .avp_name = "Unit-Value"}; |
| 1193 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 1194 | struct local_rules_definition rules[] = |
| 1195 | { |
| 1196 | { { .avp_vendor = 0, .avp_name = "Value-Digits"}, RULE_REQUIRED, -1, -1 }, |
| 1197 | { { .avp_vendor = 0, .avp_name = "Exponent"}, RULE_OPTIONAL, -1, -1 } |
| 1198 | }; |
| 1199 | PARSE_loc_rules( rules, avp ); |
| 1200 | } |
| 1201 | /* Redirect-Server-Extension */ |
| 1202 | { |
| 1203 | /* Grouped */ |
| 1204 | struct dict_object * avp; |
| 1205 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 0, .avp_name = "Redirect-Server-Extension"}; |
| 1206 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 1207 | struct local_rules_definition rules[] = |
| 1208 | { |
| 1209 | { { .avp_vendor = 0, .avp_name = "Redirect-Address-IPAddress"}, RULE_OPTIONAL, -1, -1 }, |
| 1210 | { { .avp_vendor = 0, .avp_name = "Redirect-Address-URL"}, RULE_OPTIONAL, -1, -1 }, |
| 1211 | { { .avp_vendor = 0, .avp_name = "Redirect-Address-SIP-URI"}, RULE_OPTIONAL, -1, -1 } |
| 1212 | }; |
| 1213 | PARSE_loc_rules( rules, avp ); |
| 1214 | } |
| 1215 | /* Redirect-Server */ |
| 1216 | { |
| 1217 | /* Grouped */ |
| 1218 | struct dict_object * avp; |
| 1219 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 0, .avp_name = "Redirect-Server"}; |
| 1220 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 1221 | struct local_rules_definition rules[] = |
| 1222 | { |
| 1223 | { { .avp_vendor = 0, .avp_name = "Redirect-Address-Type"}, RULE_REQUIRED, -1, -1 }, |
| 1224 | { { .avp_vendor = 0, .avp_name = "Redirect-Server-Address"}, RULE_REQUIRED, -1, -1 } |
| 1225 | }; |
| 1226 | PARSE_loc_rules( rules, avp ); |
| 1227 | } |
| 1228 | /* User-Equipment-Info-Extension */ |
| 1229 | { |
| 1230 | /* Grouped */ |
| 1231 | struct dict_object * avp; |
| 1232 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 0, .avp_name = "User-Equipment-Info-Extension"}; |
| 1233 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 1234 | struct local_rules_definition rules[] = |
| 1235 | { |
| 1236 | { { .avp_vendor = 0, .avp_name = "User-Equipment-Info-IMEISV"}, RULE_OPTIONAL, -1, -1 }, |
| 1237 | { { .avp_vendor = 0, .avp_name = "User-Equipment-Info-MAC"}, RULE_OPTIONAL, -1, -1 }, |
| 1238 | { { .avp_vendor = 0, .avp_name = "User-Equipment-Info-EUI64"}, RULE_OPTIONAL, -1, -1 }, |
| 1239 | { { .avp_vendor = 0, .avp_name = "User-Equipment-Info-ModifiedEUI64"}, RULE_OPTIONAL, -1, -1 }, |
| 1240 | { { .avp_vendor = 0, .avp_name = "User-Equipment-Info-IMEI"}, RULE_OPTIONAL, -1, -1 } |
| 1241 | }; |
| 1242 | PARSE_loc_rules( rules, avp ); |
| 1243 | } |
| 1244 | /* G-S-U-Pool-Reference */ |
| 1245 | { |
| 1246 | /* Grouped */ |
| 1247 | struct dict_object * avp; |
| 1248 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 0, .avp_name = "G-S-U-Pool-Reference"}; |
| 1249 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 1250 | struct local_rules_definition rules[] = |
| 1251 | { |
| 1252 | { { .avp_vendor = 0, .avp_name = "G-S-U-Pool-Identifier"}, RULE_REQUIRED, -1, -1 }, |
| 1253 | { { .avp_vendor = 0, .avp_name = "CC-Unit-Type"}, RULE_REQUIRED, -1, -1 }, |
| 1254 | { { .avp_vendor = 0, .avp_name = "Unit-Value"}, RULE_REQUIRED, -1, -1 } |
| 1255 | }; |
| 1256 | PARSE_loc_rules( rules, avp ); |
| 1257 | } |
| 1258 | /* Final-Unit-Indication */ |
| 1259 | { |
| 1260 | /* Grouped */ |
| 1261 | struct dict_object * avp; |
| 1262 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 0, .avp_name = "Final-Unit-Indication"}; |
| 1263 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 1264 | struct local_rules_definition rules[] = |
| 1265 | { |
| 1266 | { { .avp_vendor = 0, .avp_name = "Final-Unit-Action"}, RULE_REQUIRED, -1, -1 }, |
| 1267 | { { .avp_vendor = 0, .avp_name = "Restriction-Filter-Rule"}, RULE_OPTIONAL, -1, -1 }, |
| 1268 | { { .avp_vendor = 0, .avp_name = "Filter-Id"}, RULE_OPTIONAL, -1, -1 }, |
| 1269 | { { .avp_vendor = 0, .avp_name = "Redirect-Server"}, RULE_OPTIONAL, -1, -1 } |
| 1270 | }; |
| 1271 | PARSE_loc_rules( rules, avp ); |
| 1272 | } |
| 1273 | /* CC-Money */ |
| 1274 | { |
| 1275 | /* Grouped */ |
| 1276 | struct dict_object * avp; |
| 1277 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 0, .avp_name = "CC-Money"}; |
| 1278 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 1279 | struct local_rules_definition rules[] = |
| 1280 | { |
| 1281 | { { .avp_vendor = 0, .avp_name = "Unit-Value"}, RULE_REQUIRED, -1, -1 }, |
| 1282 | { { .avp_vendor = 0, .avp_name = "Currency-Code"}, RULE_OPTIONAL, -1, -1 } |
| 1283 | }; |
| 1284 | PARSE_loc_rules( rules, avp ); |
| 1285 | } |
| 1286 | /* Cost-Information */ |
| 1287 | { |
| 1288 | /* Grouped */ |
| 1289 | struct dict_object * avp; |
| 1290 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 0, .avp_name = "Cost-Information"}; |
| 1291 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 1292 | struct local_rules_definition rules[] = |
| 1293 | { |
| 1294 | { { .avp_vendor = 0, .avp_name = "Unit-Value"}, RULE_REQUIRED, -1, -1 }, |
| 1295 | { { .avp_vendor = 0, .avp_name = "Currency-Code"}, RULE_REQUIRED, -1, -1 }, |
| 1296 | { { .avp_vendor = 0, .avp_name = "Cost-Unit"}, RULE_OPTIONAL, -1, -1 } |
| 1297 | }; |
| 1298 | PARSE_loc_rules( rules, avp ); |
| 1299 | } |
| 1300 | /* Used-Service-Unit */ |
| 1301 | { |
| 1302 | /* Grouped */ |
| 1303 | struct dict_object * avp; |
| 1304 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 0, .avp_name = "Used-Service-Unit"}; |
| 1305 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 1306 | struct local_rules_definition rules[] = |
| 1307 | { |
| 1308 | { { .avp_vendor = 0, .avp_name = "Tariff-Change-Usage"}, RULE_OPTIONAL, -1, -1 }, |
| 1309 | { { .avp_vendor = 0, .avp_name = "CC-Time"}, RULE_OPTIONAL, -1, -1 }, |
| 1310 | { { .avp_vendor = 0, .avp_name = "CC-Money"}, RULE_OPTIONAL, -1, -1 }, |
| 1311 | { { .avp_vendor = 0, .avp_name = "CC-Total-Octets"}, RULE_OPTIONAL, -1, -1 }, |
| 1312 | { { .avp_vendor = 0, .avp_name = "CC-Input-Octets"}, RULE_OPTIONAL, -1, -1 }, |
| 1313 | { { .avp_vendor = 0, .avp_name = "CC-Output-Octets"}, RULE_OPTIONAL, -1, -1 }, |
| 1314 | { { .avp_vendor = 0, .avp_name = "CC-Service-Specific-Units"}, RULE_OPTIONAL, -1, -1 } |
| 1315 | }; |
| 1316 | PARSE_loc_rules( rules, avp ); |
| 1317 | } |
| 1318 | /* Requested-Service-Unit */ |
| 1319 | { |
| 1320 | /* Grouped */ |
| 1321 | struct dict_object * avp; |
| 1322 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 0, .avp_name = "Requested-Service-Unit"}; |
| 1323 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 1324 | struct local_rules_definition rules[] = |
| 1325 | { |
| 1326 | { { .avp_vendor = 0, .avp_name = "CC-Time"}, RULE_OPTIONAL, -1, -1 }, |
| 1327 | { { .avp_vendor = 0, .avp_name = "CC-Money"}, RULE_OPTIONAL, -1, -1 }, |
| 1328 | { { .avp_vendor = 0, .avp_name = "CC-Total-Octets"}, RULE_OPTIONAL, -1, -1 }, |
| 1329 | { { .avp_vendor = 0, .avp_name = "CC-Input-Octets"}, RULE_OPTIONAL, -1, -1 }, |
| 1330 | { { .avp_vendor = 0, .avp_name = "CC-Output-Octets"}, RULE_OPTIONAL, -1, -1 }, |
| 1331 | { { .avp_vendor = 0, .avp_name = "CC-Service-Specific-Units"}, RULE_OPTIONAL, -1, -1 } |
| 1332 | }; |
| 1333 | PARSE_loc_rules( rules, avp ); |
| 1334 | } |
| 1335 | /* Granted-Service-Unit */ |
| 1336 | { |
| 1337 | /* Grouped */ |
| 1338 | struct dict_object * avp; |
| 1339 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 0, .avp_name = "Granted-Service-Unit"}; |
| 1340 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 1341 | struct local_rules_definition rules[] = |
| 1342 | { |
| 1343 | { { .avp_vendor = 0, .avp_name = "Tariff-Time-Change"}, RULE_OPTIONAL, -1, -1 }, |
| 1344 | { { .avp_vendor = 0, .avp_name = "CC-Time"}, RULE_OPTIONAL, -1, -1 }, |
| 1345 | { { .avp_vendor = 0, .avp_name = "CC-Money"}, RULE_OPTIONAL, -1, -1 }, |
| 1346 | { { .avp_vendor = 0, .avp_name = "CC-Total-Octets"}, RULE_OPTIONAL, -1, -1 }, |
| 1347 | { { .avp_vendor = 0, .avp_name = "CC-Input-Octets"}, RULE_OPTIONAL, -1, -1 }, |
| 1348 | { { .avp_vendor = 0, .avp_name = "CC-Output-Octets"}, RULE_OPTIONAL, -1, -1 }, |
| 1349 | { { .avp_vendor = 0, .avp_name = "CC-Service-Specific-Units"}, RULE_OPTIONAL, -1, -1 } |
| 1350 | }; |
| 1351 | PARSE_loc_rules( rules, avp ); |
| 1352 | } |
| 1353 | /* QoS-Final-Unit-Indication */ |
| 1354 | { |
| 1355 | /* Grouped */ |
| 1356 | struct dict_object * avp; |
| 1357 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 0, .avp_name = "QoS-Final-Unit-Indication"}; |
| 1358 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 1359 | struct local_rules_definition rules[] = |
| 1360 | { |
| 1361 | { { .avp_vendor = 0, .avp_name = "Final-Unit-Action"}, RULE_REQUIRED, -1, -1 }, |
| 1362 | { { .avp_vendor = 0, .avp_name = "Filter-Rule"}, RULE_OPTIONAL, -1, -1 }, |
| 1363 | { { .avp_vendor = 0, .avp_name = "Filter-Id"}, RULE_OPTIONAL, -1, -1 }, |
| 1364 | { { .avp_vendor = 0, .avp_name = "Redirect-Server-Extension"}, RULE_OPTIONAL, -1, -1 } |
| 1365 | }; |
| 1366 | PARSE_loc_rules( rules, avp ); |
| 1367 | } |
| 1368 | /* Multiple-Services-Credit-Control */ |
| 1369 | { |
| 1370 | /* Grouped */ |
| 1371 | struct dict_object * avp; |
| 1372 | struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 0, .avp_name = "Multiple-Services-Credit-Control"}; |
| 1373 | CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| 1374 | struct local_rules_definition rules[] = |
| 1375 | { |
| 1376 | { { .avp_vendor = 0, .avp_name = "Granted-Service-Unit"}, RULE_OPTIONAL, -1, -1 }, |
| 1377 | { { .avp_vendor = 0, .avp_name = "Requested-Service-Unit"}, RULE_OPTIONAL, -1, -1 }, |
| 1378 | { { .avp_vendor = 0, .avp_name = "Used-Service-Unit"}, RULE_OPTIONAL, -1, -1 }, |
| 1379 | { { .avp_vendor = 0, .avp_name = "Tariff-Change-Usage"}, RULE_OPTIONAL, -1, -1 }, |
| 1380 | { { .avp_vendor = 0, .avp_name = "Service-Identifier"}, RULE_OPTIONAL, -1, -1 }, |
| 1381 | { { .avp_vendor = 0, .avp_name = "Rating-Group"}, RULE_OPTIONAL, -1, -1 }, |
| 1382 | { { .avp_vendor = 0, .avp_name = "G-S-U-Pool-Reference"}, RULE_OPTIONAL, -1, -1 }, |
| 1383 | { { .avp_vendor = 0, .avp_name = "Validity-Time"}, RULE_OPTIONAL, -1, -1 }, |
| 1384 | { { .avp_vendor = 0, .avp_name = "Result-Code"}, RULE_OPTIONAL, -1, -1 }, |
| 1385 | { { .avp_vendor = 0, .avp_name = "Final-Unit-Indication"}, RULE_OPTIONAL, -1, -1 }, |
| 1386 | { { .avp_vendor = 0, .avp_name = "QoS-Final-Unit-Indication"}, RULE_OPTIONAL, -1, -1 } |
| 1387 | }; |
| 1388 | PARSE_loc_rules( rules, avp ); |
| 1389 | } |
| 1390 | |
| 1391 | } |
| 1392 | |
| 1393 | /* Commands section */ |
| 1394 | { |
| 1395 | |
| 1396 | } |
| 1397 | |
| 1398 | LOG_D( "Extension 'Dictionary definitions for rfc4006bis_avps (None)' initialized"); |
| 1399 | return 0; |
| 1400 | } |
| 1401 | |
| 1402 | int dict_entry(char * conffile) |
| 1403 | { |
| 1404 | dict_rfc4006bis_avps_load_defs(conffile); |
| 1405 | return dict_rfc4006bis_avps_load_rules(conffile); |
| 1406 | } |
| 1407 | |
| 1408 | const char* dict_rfc4006bis_avps_proto_ver(char * conffile) { |
| 1409 | return rfc4006bis_avps_proto_ver; |
| 1410 | } |
| 1411 | |
| 1412 | const double dict_rfc4006bis_avps_gen_ts(char * conffile) { |
| 1413 | return rfc4006bis_avps_gen_date; |
| 1414 | } |
| 1415 | |
| 1416 | EXTENSION_ENTRY2("dict_rfc4006bis_avps", dict_rfc4006bis_avps_load_defs, dict_rfc4006bis_avps_load_rules, "dict_rfc7155_avps", "dict_rfc5777_avps"); |
| 1417 | |
| 1418 | |
| 1419 | |