| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#include <freeDiameter/extension.h> |
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
#define CHECK_dict_new( _type, _data, _parent, _ref ) \ |
| 10 |
CHECK_FCT( fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref)) ); |
| 11 |
|
| 12 |
#define CHECK_dict_search( _type, _criteria, _what, _result ) \ |
| 13 |
CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); |
| 14 |
|
| 15 |
struct local_rules_definition { |
| 16 |
char *avp_name; |
| 17 |
enum rule_position position; |
| 18 |
int min; |
| 19 |
int max; |
| 20 |
}; |
| 21 |
|
| 22 |
#define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) |
| 23 |
|
| 24 |
#define PARSE_loc_rules( _rulearray, _parent) { \ |
| 25 |
int __ar; \ |
| 26 |
for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \ |
| 27 |
struct dict_rule_data __data = { NULL, \ |
| 28 |
(_rulearray)[__ar].position, \ |
| 29 |
0, \ |
| 30 |
(_rulearray)[__ar].min, \ |
| 31 |
(_rulearray)[__ar].max}; \ |
| 32 |
__data.rule_order = RULE_ORDER(__data.rule_position); \ |
| 33 |
CHECK_FCT( fd_dict_search( \ |
| 34 |
fd_g_config->cnf_dict, \ |
| 35 |
DICT_AVP, \ |
| 36 |
AVP_BY_NAME, \ |
| 37 |
(_rulearray)[__ar].avp_name, \ |
| 38 |
&__data.rule_avp, 0 ) ); \ |
| 39 |
if ( !__data.rule_avp ) { \ |
| 40 |
TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_name ); \ |
| 41 |
return ENOENT; \ |
| 42 |
} \ |
| 43 |
CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL), \ |
| 44 |
{ \ |
| 45 |
TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \ |
| 46 |
(_rulearray)[__ar].avp_name ); \ |
| 47 |
return EINVAL; \ |
| 48 |
} ); \ |
| 49 |
} \ |
| 50 |
} |
| 51 |
|
| 52 |
#define enumval_def_u32( _val_, _str_ ) \ |
| 53 |
{ _str_, { .u32 = _val_ }} |
| 54 |
|
| 55 |
#define enumval_def_os( _len_, _val_, _str_ ) \ |
| 56 |
{ _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}} |
| 57 |
|
| 58 |
|
| 59 |
static int dict_dcca_3gpp_entry(char * conffile) |
| 60 |
{ |
| 61 |
TRACE_ENTRY("%p", conffile); |
| 62 |
|
| 63 |
|
| 64 |
{ |
| 65 |
|
| 66 |
{ |
| 67 |
struct dict_vendor_data vendor_data = { 10415, "3GPP" }; |
| 68 |
CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data, NULL, NULL)); |
| 69 |
} |
| 70 |
|
| 71 |
} |
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
{ |
| 76 |
struct dict_object * Address_type; |
| 77 |
struct dict_object * UTF8String_type; |
| 78 |
struct dict_object * DiameterIdentity_type; |
| 79 |
struct dict_object * DiameterURI_type; |
| 80 |
struct dict_object * Time_type; |
| 81 |
|
| 82 |
CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Address", &Address_type); |
| 83 |
CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "UTF8String", &UTF8String_type); |
| 84 |
CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterIdentity", &DiameterIdentity_type); |
| 85 |
CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterURI", &DiameterURI_type); |
| 86 |
CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Time", &Time_type); |
| 87 |
|
| 88 |
|
| 89 |
{ |
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
struct dict_object *type; |
| 122 |
struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Reporting-Reason)" , NULL, NULL, NULL }; |
| 123 |
struct dict_enumval_data t_1 = { "QHT", { .i32 = 1 }}; |
| 124 |
struct dict_enumval_data t_2 = { "FINAL", { .i32 = 2 }}; |
| 125 |
struct dict_enumval_data t_3 = { "QUOTA_EXHAUSTED", { .i32 = 3 }}; |
| 126 |
struct dict_enumval_data t_4 = { "VALIDITY_TIME", { .i32 = 4 }}; |
| 127 |
struct dict_enumval_data t_5 = { "OTHER_QUOTA_TYPE", { .i32 = 5 }}; |
| 128 |
struct dict_enumval_data t_6 = { "RATING_CONDITION_CHANGE", { .i32 = 6 }}; |
| 129 |
struct dict_enumval_data t_7 = { "FORCED_REAUTHORIZATION", { .i32 = 7 }}; |
| 130 |
struct dict_enumval_data t_8 = { "POOL_EXHAUSTED", { .i32 = 8 }}; |
| 131 |
|
| 132 |
struct dict_avp_data data = { |
| 133 |
872, |
| 134 |
10415, |
| 135 |
"Reporting-Reason", |
| 136 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 137 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 138 |
AVP_TYPE_INTEGER32 |
| 139 |
}; |
| 140 |
|
| 141 |
CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); |
| 142 |
CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); |
| 143 |
CHECK_dict_new( DICT_ENUMVAL, &t_5 , type, NULL); |
| 144 |
CHECK_dict_new( DICT_ENUMVAL, &t_8 , type, NULL); |
| 145 |
CHECK_dict_new( DICT_AVP, &data , type, NULL); |
| 146 |
} |
| 147 |
|
| 148 |
|
| 149 |
{ |
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
struct dict_avp_data data = { |
| 156 |
1264, |
| 157 |
10415, |
| 158 |
"Trigger", |
| 159 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 160 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 161 |
AVP_TYPE_GROUPED |
| 162 |
}; |
| 163 |
CHECK_dict_new( DICT_AVP, &data , NULL, NULL); |
| 164 |
} |
| 165 |
|
| 166 |
|
| 167 |
{ |
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
|
| 181 |
struct dict_object *type; |
| 182 |
struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Trigger-Type)" , NULL, NULL, NULL }; |
| 183 |
struct dict_enumval_data t_1 = { "CHANGE_IN_SGSN_IP_ADDRESS", { .i32 = 1 }}; |
| 184 |
struct dict_enumval_data t_2 = { "CHANGEINQOS_ANY", { .i32 = 2 }}; |
| 185 |
struct dict_enumval_data t_4 = { "CHANGEINRAT", { .i32 = 4 }}; |
| 186 |
|
| 187 |
struct dict_avp_data data = { |
| 188 |
870, |
| 189 |
10415, |
| 190 |
"Trigger-Type", |
| 191 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 192 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 193 |
AVP_TYPE_INTEGER32 |
| 194 |
}; |
| 195 |
|
| 196 |
CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); |
| 197 |
CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); |
| 198 |
CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); |
| 199 |
CHECK_dict_new( DICT_ENUMVAL, &t_4 , type, NULL); |
| 200 |
CHECK_dict_new( DICT_AVP, &data , type, NULL); |
| 201 |
} |
| 202 |
|
| 203 |
|
| 204 |
{ |
| 205 |
|
| 206 |
|
| 207 |
|
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
|
| 212 |
struct dict_avp_data data = { |
| 213 |
873, |
| 214 |
10415, |
| 215 |
"Service-Information", |
| 216 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 217 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 218 |
AVP_TYPE_GROUPED |
| 219 |
}; |
| 220 |
CHECK_dict_new( DICT_AVP, &data , NULL, NULL); |
| 221 |
} |
| 222 |
|
| 223 |
|
| 224 |
{ |
| 225 |
|
| 226 |
|
| 227 |
|
| 228 |
|
| 229 |
|
| 230 |
|
| 231 |
struct dict_avp_data data = { |
| 232 |
874, |
| 233 |
10415, |
| 234 |
"PS-Information", |
| 235 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 236 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 237 |
AVP_TYPE_GROUPED |
| 238 |
}; |
| 239 |
CHECK_dict_new( DICT_AVP, &data , NULL, NULL); |
| 240 |
} |
| 241 |
|
| 242 |
|
| 243 |
{ |
| 244 |
|
| 245 |
|
| 246 |
|
| 247 |
|
| 248 |
|
| 249 |
|
| 250 |
struct dict_avp_data data = { |
| 251 |
1227, |
| 252 |
10415, |
| 253 |
"PDP-Address", |
| 254 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 255 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 256 |
AVP_TYPE_OCTETSTRING |
| 257 |
}; |
| 258 |
CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); |
| 259 |
} |
| 260 |
|
| 261 |
|
| 262 |
{ |
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
struct dict_avp_data data = { |
| 268 |
1, |
| 269 |
10415, |
| 270 |
"3GPP-IMSI", |
| 271 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 272 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 273 |
AVP_TYPE_OCTETSTRING |
| 274 |
}; |
| 275 |
CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); |
| 276 |
} |
| 277 |
|
| 278 |
|
| 279 |
{ |
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
|
| 285 |
|
| 286 |
|
| 287 |
|
| 288 |
|
| 289 |
|
| 290 |
struct dict_avp_data data = { |
| 291 |
2, |
| 292 |
10415, |
| 293 |
"3GPP-Charging-Id", |
| 294 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 295 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 296 |
AVP_TYPE_UNSIGNED32 |
| 297 |
}; |
| 298 |
CHECK_dict_new( DICT_AVP, &data , NULL, NULL); |
| 299 |
} |
| 300 |
|
| 301 |
|
| 302 |
{ |
| 303 |
|
| 304 |
|
| 305 |
|
| 306 |
|
| 307 |
|
| 308 |
|
| 309 |
|
| 310 |
|
| 311 |
|
| 312 |
struct dict_avp_data data = { |
| 313 |
3, |
| 314 |
10415, |
| 315 |
"3GPP-PDP-Type", |
| 316 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 317 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 318 |
AVP_TYPE_UNSIGNED32 |
| 319 |
}; |
| 320 |
CHECK_dict_new( DICT_AVP, &data , NULL, NULL); |
| 321 |
} |
| 322 |
|
| 323 |
|
| 324 |
{ |
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
|
| 329 |
|
| 330 |
|
| 331 |
|
| 332 |
struct dict_avp_data data = { |
| 333 |
4, |
| 334 |
10415, |
| 335 |
"3GPP-CG-Address", |
| 336 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 337 |
AVP_FLAG_VENDOR, |
| 338 |
AVP_TYPE_OCTETSTRING |
| 339 |
}; |
| 340 |
CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); |
| 341 |
} |
| 342 |
|
| 343 |
|
| 344 |
{ |
| 345 |
|
| 346 |
|
| 347 |
|
| 348 |
|
| 349 |
|
| 350 |
|
| 351 |
|
| 352 |
|
| 353 |
|
| 354 |
|
| 355 |
struct dict_avp_data data = { |
| 356 |
5, |
| 357 |
10415, |
| 358 |
"3GPP-GPRS-Negotiated-QoS-Profile", |
| 359 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 360 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 361 |
AVP_TYPE_OCTETSTRING |
| 362 |
}; |
| 363 |
CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); |
| 364 |
} |
| 365 |
|
| 366 |
|
| 367 |
{ |
| 368 |
|
| 369 |
|
| 370 |
|
| 371 |
|
| 372 |
|
| 373 |
|
| 374 |
|
| 375 |
struct dict_avp_data data = { |
| 376 |
6, |
| 377 |
10415, |
| 378 |
"3GPP-SGSN-Address", |
| 379 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 380 |
AVP_FLAG_VENDOR, |
| 381 |
AVP_TYPE_OCTETSTRING |
| 382 |
}; |
| 383 |
CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); |
| 384 |
} |
| 385 |
|
| 386 |
|
| 387 |
{ |
| 388 |
|
| 389 |
|
| 390 |
|
| 391 |
|
| 392 |
|
| 393 |
|
| 394 |
|
| 395 |
struct dict_avp_data data = { |
| 396 |
7, |
| 397 |
10415, |
| 398 |
"3GPP-GGSN-Address", |
| 399 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 400 |
AVP_FLAG_VENDOR, |
| 401 |
AVP_TYPE_OCTETSTRING |
| 402 |
}; |
| 403 |
CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); |
| 404 |
} |
| 405 |
|
| 406 |
|
| 407 |
{ |
| 408 |
|
| 409 |
|
| 410 |
|
| 411 |
|
| 412 |
|
| 413 |
|
| 414 |
|
| 415 |
|
| 416 |
struct dict_avp_data data = { |
| 417 |
8, |
| 418 |
10415, |
| 419 |
"3GPP-IMSI-MCC-MNC", |
| 420 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 421 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 422 |
AVP_TYPE_OCTETSTRING |
| 423 |
}; |
| 424 |
CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); |
| 425 |
} |
| 426 |
|
| 427 |
|
| 428 |
{ |
| 429 |
|
| 430 |
|
| 431 |
|
| 432 |
|
| 433 |
|
| 434 |
|
| 435 |
|
| 436 |
|
| 437 |
struct dict_avp_data data = { |
| 438 |
9, |
| 439 |
10415, |
| 440 |
"3GPP-GGSN-MCC-MNC", |
| 441 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 442 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 443 |
AVP_TYPE_OCTETSTRING |
| 444 |
}; |
| 445 |
CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); |
| 446 |
} |
| 447 |
|
| 448 |
|
| 449 |
{ |
| 450 |
|
| 451 |
|
| 452 |
|
| 453 |
|
| 454 |
|
| 455 |
|
| 456 |
struct dict_avp_data data = { |
| 457 |
10, |
| 458 |
10415, |
| 459 |
"3GPP-NSAPI", |
| 460 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 461 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 462 |
AVP_TYPE_OCTETSTRING |
| 463 |
}; |
| 464 |
CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); |
| 465 |
} |
| 466 |
|
| 467 |
|
| 468 |
{ |
| 469 |
|
| 470 |
|
| 471 |
|
| 472 |
|
| 473 |
|
| 474 |
|
| 475 |
|
| 476 |
struct dict_avp_data data = { |
| 477 |
11, |
| 478 |
10415, |
| 479 |
"3GPP-Session-Stop-Indicator", |
| 480 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 481 |
AVP_FLAG_VENDOR, |
| 482 |
AVP_TYPE_OCTETSTRING |
| 483 |
}; |
| 484 |
CHECK_dict_new( DICT_AVP, &data , NULL, NULL); |
| 485 |
} |
| 486 |
|
| 487 |
|
| 488 |
{ |
| 489 |
|
| 490 |
|
| 491 |
|
| 492 |
|
| 493 |
|
| 494 |
|
| 495 |
struct dict_avp_data data = { |
| 496 |
12, |
| 497 |
10415, |
| 498 |
"3GPP-Selection-Mode", |
| 499 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 500 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 501 |
AVP_TYPE_OCTETSTRING |
| 502 |
}; |
| 503 |
CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); |
| 504 |
} |
| 505 |
|
| 506 |
|
| 507 |
{ |
| 508 |
|
| 509 |
|
| 510 |
|
| 511 |
|
| 512 |
|
| 513 |
|
| 514 |
|
| 515 |
|
| 516 |
struct dict_avp_data data = { |
| 517 |
13, |
| 518 |
10415, |
| 519 |
"3GPP-Charging-Characteristics", |
| 520 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 521 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 522 |
AVP_TYPE_OCTETSTRING |
| 523 |
}; |
| 524 |
CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); |
| 525 |
} |
| 526 |
|
| 527 |
|
| 528 |
{ |
| 529 |
|
| 530 |
|
| 531 |
|
| 532 |
|
| 533 |
struct dict_avp_data data = { |
| 534 |
14, |
| 535 |
10415, |
| 536 |
"3GPP-CG-IPv6-Address", |
| 537 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 538 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 539 |
AVP_TYPE_OCTETSTRING |
| 540 |
}; |
| 541 |
CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); |
| 542 |
} |
| 543 |
|
| 544 |
|
| 545 |
{ |
| 546 |
|
| 547 |
|
| 548 |
|
| 549 |
|
| 550 |
struct dict_avp_data data = { |
| 551 |
15, |
| 552 |
10415, |
| 553 |
"3GPP-SGSN-IPv6-Address", |
| 554 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 555 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 556 |
AVP_TYPE_OCTETSTRING |
| 557 |
}; |
| 558 |
CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); |
| 559 |
} |
| 560 |
|
| 561 |
|
| 562 |
{ |
| 563 |
|
| 564 |
|
| 565 |
|
| 566 |
|
| 567 |
struct dict_avp_data data = { |
| 568 |
16, |
| 569 |
10415, |
| 570 |
"3GPP-GGSN-IPv6-Address", |
| 571 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 572 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 573 |
AVP_TYPE_OCTETSTRING |
| 574 |
}; |
| 575 |
CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); |
| 576 |
} |
| 577 |
|
| 578 |
|
| 579 |
{ |
| 580 |
|
| 581 |
|
| 582 |
|
| 583 |
|
| 584 |
|
| 585 |
|
| 586 |
struct dict_avp_data data = { |
| 587 |
17, |
| 588 |
10415, |
| 589 |
"3GPP-GGSN-IPv6-DNS-Servers", |
| 590 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 591 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 592 |
AVP_TYPE_OCTETSTRING |
| 593 |
}; |
| 594 |
CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); |
| 595 |
} |
| 596 |
|
| 597 |
|
| 598 |
{ |
| 599 |
|
| 600 |
|
| 601 |
|
| 602 |
|
| 603 |
|
| 604 |
|
| 605 |
|
| 606 |
|
| 607 |
struct dict_avp_data data = { |
| 608 |
18, |
| 609 |
10415, |
| 610 |
"3GPP-SGSN-MCC-MNC", |
| 611 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 612 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 613 |
AVP_TYPE_OCTETSTRING |
| 614 |
}; |
| 615 |
CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); |
| 616 |
} |
| 617 |
|
| 618 |
|
| 619 |
|
| 620 |
|
| 621 |
{ |
| 622 |
|
| 623 |
|
| 624 |
|
| 625 |
struct dict_avp_data data = { |
| 626 |
20, |
| 627 |
10415, |
| 628 |
"3GPP-IMEISV", |
| 629 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 630 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 631 |
AVP_TYPE_OCTETSTRING |
| 632 |
}; |
| 633 |
CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); |
| 634 |
} |
| 635 |
|
| 636 |
|
| 637 |
{ |
| 638 |
|
| 639 |
|
| 640 |
|
| 641 |
|
| 642 |
|
| 643 |
|
| 644 |
|
| 645 |
|
| 646 |
|
| 647 |
struct dict_avp_data data = { |
| 648 |
21, |
| 649 |
10415, |
| 650 |
"3GPP-RAT-Type", |
| 651 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 652 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 653 |
AVP_TYPE_OCTETSTRING |
| 654 |
}; |
| 655 |
CHECK_dict_new( DICT_AVP, &data , NULL, NULL); |
| 656 |
} |
| 657 |
|
| 658 |
|
| 659 |
{ |
| 660 |
|
| 661 |
|
| 662 |
|
| 663 |
|
| 664 |
|
| 665 |
|
| 666 |
|
| 667 |
|
| 668 |
struct dict_avp_data data = { |
| 669 |
22, |
| 670 |
10415, |
| 671 |
"3GPP-User-Location-Info", |
| 672 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 673 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 674 |
AVP_TYPE_OCTETSTRING |
| 675 |
}; |
| 676 |
CHECK_dict_new( DICT_AVP, &data , NULL, NULL); |
| 677 |
} |
| 678 |
|
| 679 |
|
| 680 |
{ |
| 681 |
|
| 682 |
|
| 683 |
|
| 684 |
|
| 685 |
|
| 686 |
|
| 687 |
|
| 688 |
struct dict_avp_data data = { |
| 689 |
23, |
| 690 |
10415, |
| 691 |
"3GPP-MS-TimeZone", |
| 692 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 693 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 694 |
AVP_TYPE_OCTETSTRING |
| 695 |
}; |
| 696 |
CHECK_dict_new( DICT_AVP, &data , NULL, NULL); |
| 697 |
} |
| 698 |
|
| 699 |
|
| 700 |
|
| 701 |
|
| 702 |
|
| 703 |
|
| 704 |
|
| 705 |
{ |
| 706 |
|
| 707 |
|
| 708 |
|
| 709 |
|
| 710 |
|
| 711 |
|
| 712 |
|
| 713 |
struct dict_object *type; |
| 714 |
struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(PDP-Context-Type)" , NULL, NULL, NULL }; |
| 715 |
struct dict_enumval_data t_0 = { "PRIMARY", { .i32 = 0 }}; |
| 716 |
struct dict_enumval_data t_1 = { "SECONDARY", { .i32 = 1 }}; |
| 717 |
|
| 718 |
struct dict_avp_data data = { |
| 719 |
1247, |
| 720 |
10415, |
| 721 |
"PDP-Context-Type", |
| 722 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 723 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 724 |
AVP_TYPE_INTEGER32 |
| 725 |
}; |
| 726 |
|
| 727 |
CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); |
| 728 |
CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); |
| 729 |
CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); |
| 730 |
CHECK_dict_new( DICT_AVP, &data , type, NULL); |
| 731 |
} |
| 732 |
|
| 733 |
|
| 734 |
{ |
| 735 |
|
| 736 |
|
| 737 |
|
| 738 |
|
| 739 |
|
| 740 |
struct dict_avp_data data = { |
| 741 |
876, |
| 742 |
10415, |
| 743 |
"IMS-Information", |
| 744 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 745 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 746 |
AVP_TYPE_GROUPED |
| 747 |
}; |
| 748 |
CHECK_dict_new( DICT_AVP, &data , NULL, NULL); |
| 749 |
} |
| 750 |
|
| 751 |
|
| 752 |
{ |
| 753 |
|
| 754 |
|
| 755 |
|
| 756 |
|
| 757 |
|
| 758 |
|
| 759 |
|
| 760 |
struct dict_avp_data data = { |
| 761 |
841, |
| 762 |
10415, |
| 763 |
"IMS-Charging-Identifier", |
| 764 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 765 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 766 |
AVP_TYPE_OCTETSTRING |
| 767 |
}; |
| 768 |
CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); |
| 769 |
} |
| 770 |
|
| 771 |
|
| 772 |
|
| 773 |
|
| 774 |
|
| 775 |
{ |
| 776 |
|
| 777 |
|
| 778 |
|
| 779 |
|
| 780 |
|
| 781 |
|
| 782 |
struct dict_avp_data data = { |
| 783 |
515, |
| 784 |
10415, |
| 785 |
"Max-Requested-Bandwidth-UL", |
| 786 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 787 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 788 |
AVP_TYPE_UNSIGNED32 |
| 789 |
}; |
| 790 |
CHECK_dict_new( DICT_AVP, &data , NULL, NULL); |
| 791 |
} |
| 792 |
|
| 793 |
|
| 794 |
{ |
| 795 |
|
| 796 |
|
| 797 |
|
| 798 |
|
| 799 |
|
| 800 |
struct dict_avp_data data = { |
| 801 |
516, |
| 802 |
10415, |
| 803 |
"Max-Requested-Bandwidth-DL", |
| 804 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 805 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 806 |
AVP_TYPE_UNSIGNED32 |
| 807 |
}; |
| 808 |
CHECK_dict_new( DICT_AVP, &data , NULL, NULL); |
| 809 |
} |
| 810 |
|
| 811 |
|
| 812 |
{ |
| 813 |
|
| 814 |
|
| 815 |
|
| 816 |
|
| 817 |
|
| 818 |
|
| 819 |
|
| 820 |
|
| 821 |
|
| 822 |
|
| 823 |
struct dict_avp_data data = { |
| 824 |
1016, |
| 825 |
10415, |
| 826 |
"QoS-Information", |
| 827 |
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, |
| 828 |
AVP_FLAG_VENDOR, |
| 829 |
AVP_TYPE_GROUPED |
| 830 |
}; |
| 831 |
CHECK_dict_new( DICT_AVP, &data , NULL, NULL); |
| 832 |
} |
| 833 |
} |
| 834 |
|
| 835 |
|
| 836 |
|
| 837 |
TRACE_DEBUG(INFO, "Extension 'Dictionary definitions for DCCA 3GPP' initialized"); |
| 838 |
return 0; |
| 839 |
} |
| 840 |
|
| 841 |
EXTENSION_ENTRY("dict_dcca_3gpp", dict_dcca_3gpp_entry, "dict_dcca"); |