Changeset 884:277aa200033b in freeDiameter for extensions/dict_dcca/dict_dcca.c
- Timestamp:
- Nov 14, 2012, 7:50:14 PM (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/dict_dcca/dict_dcca.c
-
Property
exe
set to
*
r869 r884 147 147 } 148 148 149 /* CC-Money */150 {151 /*152 Grouped153 */154 155 struct dict_avp_data data = {156 413, /* Code */157 0, /* Vendor */158 "CC-Money", /* Name */159 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */160 AVP_FLAG_MANDATORY, /* Fixed flag values */161 AVP_TYPE_GROUPED /* base type of data */162 };163 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);164 }165 166 149 /* CC-Output-Octets */ 167 150 { … … 381 364 } 382 365 383 /* Cost-Information */384 {385 /*386 Grouped387 */388 389 struct dict_avp_data data = {390 423, /* Code */391 0, /* Vendor */392 "Cost-Information", /* Name */393 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */394 AVP_FLAG_MANDATORY, /* Fixed flag values */395 AVP_TYPE_GROUPED /* base type of data */396 };397 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);398 }399 400 366 /* Cost-Unit */ 401 367 { … … 483 449 CHECK_dict_new( DICT_AVP, &data , NULL, NULL); 484 450 } 485 451 486 452 /* Direct-Debiting-Failure-Handling */ 487 453 { … … 553 519 CHECK_dict_new( DICT_AVP, &data , type, NULL); 554 520 } 555 556 /* Final-Unit-Indication */ 557 { 558 /* 559 Grouped 560 */ 561 562 struct dict_avp_data data = { 563 430, /* Code */ 564 0, /* Vendor */ 565 "Final-Unit-Indication", /* Name */ 566 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ 567 AVP_FLAG_MANDATORY, /* Fixed flag values */ 568 AVP_TYPE_GROUPED /* base type of data */ 569 }; 570 CHECK_dict_new( DICT_AVP, &data , NULL, NULL); 571 } 572 573 /* Granted-Service-Unit */ 574 { 575 /* 576 Grouped 577 */ 578 579 struct dict_avp_data data = { 580 431, /* Code */ 581 0, /* Vendor */ 582 "Granted-Service-Unit", /* Name */ 583 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ 584 AVP_FLAG_MANDATORY, /* Fixed flag values */ 585 AVP_TYPE_GROUPED /* base type of data */ 586 }; 587 CHECK_dict_new( DICT_AVP, &data , NULL, NULL); 588 } 589 521 590 522 /* G-S-U-Pool-Identifier */ 591 523 { … … 600 532 AVP_FLAG_MANDATORY, /* Fixed flag values */ 601 533 AVP_TYPE_UNSIGNED32 /* base type of data */ 602 };603 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);604 }605 606 /* G-S-U-Pool-Reference */607 {608 /*609 Grouped610 */611 612 struct dict_avp_data data = {613 457, /* Code */614 0, /* Vendor */615 "G-S-U-Pool-Reference", /* Name */616 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */617 AVP_FLAG_MANDATORY, /* Fixed flag values */618 AVP_TYPE_GROUPED /* base type of data */619 };620 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);621 }622 623 /* Multiple-Services-Credit-Control */624 {625 /*626 Grouped627 */628 629 struct dict_avp_data data = {630 456, /* Code */631 0, /* Vendor */632 "Multiple-Services-Credit-Control", /* Name */633 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */634 AVP_FLAG_MANDATORY, /* Fixed flag values */635 AVP_TYPE_GROUPED /* base type of data */636 534 }; 637 535 CHECK_dict_new( DICT_AVP, &data , NULL, NULL); … … 709 607 CHECK_dict_new( DICT_AVP, &data , type, NULL); 710 608 } 711 712 /* Redirect-Server */ 713 { 714 /* 715 Grouped 716 */ 717 718 struct dict_avp_data data = { 719 434, /* Code */ 720 0, /* Vendor */ 721 "Redirect-Server", /* Name */ 722 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ 723 AVP_FLAG_MANDATORY, /* Fixed flag values */ 724 AVP_TYPE_GROUPED /* base type of data */ 725 }; 726 CHECK_dict_new( DICT_AVP, &data , NULL, NULL); 727 } 728 609 729 610 /* Redirect-Server-Address */ 730 611 { … … 773 654 } 774 655 775 /* Requested-Service-Unit */776 {777 /*778 Grouped779 */780 781 struct dict_avp_data data = {782 437, /* Code */783 0, /* Vendor */784 "Requested-Service-Unit", /* Name */785 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */786 AVP_FLAG_MANDATORY, /* Fixed flag values */787 AVP_TYPE_GROUPED /* base type of data */788 };789 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);790 }791 792 656 /* Restriction-Filter-Rule */ 793 657 { … … 805 669 CHECK_dict_new( DICT_AVP, &data , IPFilterRule_type, NULL); 806 670 } 807 808 671 /*Service-Context-Id */ 809 672 { … … 838 701 } 839 702 840 /* Service-Parameter-Info */841 {842 /*843 Grouped844 */845 846 struct dict_avp_data data = {847 440, /* Code */848 0, /* Vendor */849 "Service-Parameter-Info", /* Name */850 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */851 AVP_FLAG_MANDATORY, /* Fixed flag values */852 AVP_TYPE_GROUPED /* base type of data */853 };854 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);855 }856 857 703 /* Service-Parameter-Type */ 858 704 { … … 887 733 } 888 734 889 /* Subscription-Id */890 {891 /*892 Grouped893 */894 895 struct dict_avp_data data = {896 443, /* Code */897 0, /* Vendor */898 "Subscription-Id", /* Name */899 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */900 AVP_FLAG_MANDATORY, /* Fixed flag values */901 AVP_TYPE_GROUPED /* base type of data */902 };903 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);904 }905 906 735 /* Subscription-Id-Data */ 907 736 { … … 992 821 }; 993 822 CHECK_dict_new( DICT_AVP, &data , Time_type, NULL); 994 }995 996 /* Unit-Value */997 {998 /*999 Grouped1000 */1001 1002 struct dict_avp_data data = {1003 445, /* Code */1004 0, /* Vendor */1005 "Unit-Value", /* Name */1006 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */1007 AVP_FLAG_MANDATORY, /* Fixed flag values */1008 AVP_TYPE_GROUPED /* base type of data */1009 };1010 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);1011 }1012 1013 /* Used-Service-Unit */1014 {1015 /*1016 Grouped1017 */1018 1019 struct dict_avp_data data = {1020 446, /* Code */1021 0, /* Vendor */1022 "Used-Service-Unit", /* Name */1023 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */1024 AVP_FLAG_MANDATORY, /* Fixed flag values */1025 AVP_TYPE_GROUPED /* base type of data */1026 };1027 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);1028 }1029 1030 /* User-Equipment-Info */1031 {1032 /*1033 Grouped1034 */1035 1036 struct dict_avp_data data = {1037 458, /* Code */1038 0, /* Vendor */1039 "User-Equipment-Info", /* Name */1040 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */1041 AVP_FLAG_MANDATORY, /* Fixed flag values */1042 AVP_TYPE_GROUPED /* base type of data */1043 };1044 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);1045 823 } 1046 824 … … 1120 898 CHECK_dict_new( DICT_AVP, &data , NULL, NULL); 1121 899 } 1122 900 901 902 /* Grouped AVPs below since they have dependencies on types above */ 903 904 /* Redirect-Server */ 905 { 906 /* 907 Grouped 908 */ 909 struct dict_object * avp; 910 struct dict_avp_data data = { 911 434, /* Code */ 912 0, /* Vendor */ 913 "Redirect-Server", /* Name */ 914 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ 915 AVP_FLAG_MANDATORY, /* Fixed flag values */ 916 AVP_TYPE_GROUPED /* base type of data */ 917 }; 918 struct local_rules_definition rules[] = { 919 { "Redirect-Address-Type", RULE_REQUIRED, -1, 1 }, 920 { "Redirect-Server-Address", RULE_REQUIRED, -1, 1 } 921 }; 922 CHECK_dict_new( DICT_AVP, &data , NULL, &avp); 923 PARSE_loc_rules( rules, avp ); 924 } 925 926 /* Service-Parameter-Info */ 927 { 928 /* 929 Grouped 930 */ 931 struct dict_object * avp; 932 struct dict_avp_data data = { 933 440, /* Code */ 934 0, /* Vendor */ 935 "Service-Parameter-Info", /* Name */ 936 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ 937 AVP_FLAG_MANDATORY, /* Fixed flag values */ 938 AVP_TYPE_GROUPED /* base type of data */ 939 }; 940 struct local_rules_definition rules[] = { 941 { "Service-Parameter-Type", RULE_REQUIRED, -1, 1 }, 942 { "Service-Parameter-Value", RULE_REQUIRED, -1, 1 } 943 }; 944 CHECK_dict_new( DICT_AVP, &data , NULL, &avp); 945 PARSE_loc_rules( rules, avp ); 946 } 947 948 /* Subscription-Id */ 949 { 950 /* 951 Grouped 952 */ 953 struct dict_object * avp; 954 struct dict_avp_data data = { 955 443, /* Code */ 956 0, /* Vendor */ 957 "Subscription-Id", /* Name */ 958 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ 959 AVP_FLAG_MANDATORY, /* Fixed flag values */ 960 AVP_TYPE_GROUPED /* base type of data */ 961 }; 962 struct local_rules_definition rules[] = { 963 { "Subscription-Id-Type", RULE_REQUIRED, -1, 1 }, 964 { "Subscription-Id-Data", RULE_REQUIRED, -1, 1 } 965 }; 966 CHECK_dict_new( DICT_AVP, &data , NULL, &avp); 967 PARSE_loc_rules( rules, avp ); 968 } 969 970 /* Unit-Value */ 971 { 972 /* 973 Grouped 974 */ 975 struct dict_object * avp; 976 struct dict_avp_data data = { 977 445, /* Code */ 978 0, /* Vendor */ 979 "Unit-Value", /* Name */ 980 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ 981 AVP_FLAG_MANDATORY, /* Fixed flag values */ 982 AVP_TYPE_GROUPED /* base type of data */ 983 }; 984 struct local_rules_definition rules[] = { 985 { "Value-Digits", RULE_REQUIRED, -1, 1 }, 986 { "Exponent", RULE_OPTIONAL, -1, 1 } 987 }; 988 CHECK_dict_new( DICT_AVP, &data , NULL, &avp); 989 PARSE_loc_rules( rules, avp ); 990 } 991 992 /* User-Equipment-Info */ 993 { 994 /* 995 Grouped 996 */ 997 struct dict_object * avp; 998 struct dict_avp_data data = { 999 458, /* Code */ 1000 0, /* Vendor */ 1001 "User-Equipment-Info", /* Name */ 1002 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ 1003 AVP_FLAG_MANDATORY, /* Fixed flag values */ 1004 AVP_TYPE_GROUPED /* base type of data */ 1005 }; 1006 struct local_rules_definition rules[] = { 1007 { "User-Equipment-Info-Type", RULE_REQUIRED, -1, 1 }, 1008 { "User-Equipment-Info-Value", RULE_REQUIRED, -1, 1 } 1009 }; 1010 CHECK_dict_new( DICT_AVP, &data , NULL, &avp); 1011 PARSE_loc_rules( rules, avp ); 1012 } 1013 1014 /* grouped AVPs using grouped AVPs */ 1015 1016 /* CC-Money */ 1017 { 1018 /* 1019 Grouped 1020 */ 1021 struct dict_object * avp; 1022 struct dict_avp_data data = { 1023 413, /* Code */ 1024 0, /* Vendor */ 1025 "CC-Money", /* Name */ 1026 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ 1027 AVP_FLAG_MANDATORY, /* Fixed flag values */ 1028 AVP_TYPE_GROUPED /* base type of data */ 1029 }; 1030 struct local_rules_definition rules[] = { 1031 { "Unit-Value", RULE_REQUIRED, -1, 1 }, 1032 { "Currency-Code", RULE_OPTIONAL, -1, 1 } 1033 }; 1034 CHECK_dict_new( DICT_AVP, &data , NULL, &avp); 1035 PARSE_loc_rules( rules, avp ); 1036 } 1037 1038 /* Cost-Information */ 1039 { 1040 /* 1041 Grouped 1042 */ 1043 struct dict_object * avp; 1044 struct dict_avp_data data = { 1045 423, /* Code */ 1046 0, /* Vendor */ 1047 "Cost-Information", /* Name */ 1048 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ 1049 AVP_FLAG_MANDATORY, /* Fixed flag values */ 1050 AVP_TYPE_GROUPED /* base type of data */ 1051 }; 1052 struct local_rules_definition rules[] = { 1053 { "Unit-Value", RULE_REQUIRED, -1, 1 }, 1054 { "Currency-Code", RULE_REQUIRED, -1, 1 }, 1055 { "Cost-Unit", RULE_OPTIONAL, -1, 1 } 1056 }; 1057 CHECK_dict_new( DICT_AVP, &data , NULL, &avp); 1058 PARSE_loc_rules( rules, avp ); 1059 } 1060 1061 /* Final-Unit-Indication */ 1062 { 1063 /* 1064 Grouped 1065 */ 1066 struct dict_object * avp; 1067 struct dict_avp_data data = { 1068 430, /* Code */ 1069 0, /* Vendor */ 1070 "Final-Unit-Indication", /* Name */ 1071 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ 1072 AVP_FLAG_MANDATORY, /* Fixed flag values */ 1073 AVP_TYPE_GROUPED /* base type of data */ 1074 }; 1075 struct local_rules_definition rules[] = { 1076 { "Final-Unit-Action", RULE_REQUIRED, -1, 1 }, 1077 { "Restriction-Filter-Rule", RULE_OPTIONAL, -1, -1 }, 1078 { "Filter-Id", RULE_OPTIONAL, -1, -1 }, 1079 { "Redirect-Server", RULE_OPTIONAL, -1, 1 }, 1080 }; 1081 CHECK_dict_new( DICT_AVP, &data , NULL, &avp); 1082 PARSE_loc_rules( rules, avp ); 1083 } 1084 1085 /* Granted-Service-Unit */ 1086 { 1087 /* 1088 Grouped 1089 */ 1090 struct dict_object * avp; 1091 struct dict_avp_data data = { 1092 431, /* Code */ 1093 0, /* Vendor */ 1094 "Granted-Service-Unit", /* Name */ 1095 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ 1096 AVP_FLAG_MANDATORY, /* Fixed flag values */ 1097 AVP_TYPE_GROUPED /* base type of data */ 1098 }; 1099 struct local_rules_definition rules[] = { 1100 { "Tariff-Time-Change", RULE_OPTIONAL, -1, 1 }, 1101 { "CC-Time", RULE_OPTIONAL, -1, 1 }, 1102 { "CC-Money", RULE_OPTIONAL, -1, 1 }, 1103 { "CC-Total-Octets", RULE_OPTIONAL, -1, 1 }, 1104 { "CC-Input-Octets", RULE_OPTIONAL, -1, 1 }, 1105 { "CC-Output-Octets", RULE_OPTIONAL, -1, 1 }, 1106 { "CC-Service-Specific-Units", RULE_OPTIONAL, -1, 1 } 1107 /* plus any additional AVPs { "AVP", RULE_OPTIONAL, -1, -1 } */ 1108 }; 1109 CHECK_dict_new( DICT_AVP, &data , NULL, &avp); 1110 PARSE_loc_rules( rules, avp ); 1111 } 1112 1113 /* G-S-U-Pool-Reference */ 1114 { 1115 /* 1116 Grouped 1117 */ 1118 struct dict_object * avp; 1119 struct dict_avp_data data = { 1120 457, /* Code */ 1121 0, /* Vendor */ 1122 "G-S-U-Pool-Reference", /* Name */ 1123 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ 1124 AVP_FLAG_MANDATORY, /* Fixed flag values */ 1125 AVP_TYPE_GROUPED /* base type of data */ 1126 }; 1127 struct local_rules_definition rules[] = { 1128 { "G-S-U-Pool-Identifier", RULE_REQUIRED, -1, 1 }, 1129 { "CC-Unit-Type", RULE_REQUIRED, -1, 1 }, 1130 { "Unit-Value", RULE_REQUIRED, -1, 1 } 1131 }; 1132 CHECK_dict_new( DICT_AVP, &data , NULL, &avp); 1133 PARSE_loc_rules( rules, avp ); 1134 } 1135 1136 /* Requested-Service-Unit */ 1137 { 1138 /* 1139 Grouped 1140 */ 1141 struct dict_object * avp; 1142 struct dict_avp_data data = { 1143 437, /* Code */ 1144 0, /* Vendor */ 1145 "Requested-Service-Unit", /* Name */ 1146 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ 1147 AVP_FLAG_MANDATORY, /* Fixed flag values */ 1148 AVP_TYPE_GROUPED /* base type of data */ 1149 }; 1150 struct local_rules_definition rules[] = { 1151 { "CC-Time", RULE_OPTIONAL, -1, 1 }, 1152 { "CC-Money", RULE_OPTIONAL, -1, 1 }, 1153 { "CC-Total-Octets", RULE_OPTIONAL, -1, 1 }, 1154 { "CC-Input-Octets", RULE_OPTIONAL, -1, 1 }, 1155 { "CC-Output-Octets", RULE_OPTIONAL, -1, 1 }, 1156 { "CC-Service-Specific-Units", RULE_OPTIONAL, -1, 1 } 1157 /* plus any additional AVPs { "AVP", RULE_OPTIONAL, -1, -1 } */ 1158 }; 1159 CHECK_dict_new( DICT_AVP, &data , NULL, &avp); 1160 PARSE_loc_rules( rules, avp ); 1161 } 1162 1163 /* Used-Service-Unit */ 1164 { 1165 /* 1166 Grouped 1167 */ 1168 struct dict_object * avp; 1169 struct dict_avp_data data = { 1170 446, /* Code */ 1171 0, /* Vendor */ 1172 "Used-Service-Unit", /* Name */ 1173 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ 1174 AVP_FLAG_MANDATORY, /* Fixed flag values */ 1175 AVP_TYPE_GROUPED /* base type of data */ 1176 }; 1177 struct local_rules_definition rules[] = { 1178 { "Tariff-Change-Usage", RULE_OPTIONAL, -1, 1 }, 1179 { "CC-Time", RULE_OPTIONAL, -1, 1 }, 1180 { "CC-Money", RULE_OPTIONAL, -1, 1 }, 1181 { "CC-Total-Octets", RULE_OPTIONAL, -1, 1 }, 1182 { "CC-Input-Octets", RULE_OPTIONAL, -1, 1 }, 1183 { "CC-Output-Octets", RULE_OPTIONAL, -1, 1 }, 1184 { "CC-Service-Specific-Units", RULE_OPTIONAL, -1, 1 } 1185 /* plus any additional AVPs { "AVP", RULE_OPTIONAL, -1, -1 } */ 1186 }; 1187 CHECK_dict_new( DICT_AVP, &data , NULL, &avp); 1188 PARSE_loc_rules( rules, avp ); 1189 } 1190 1191 /* at least three levels of grouping */ 1192 /* Multiple-Services-Credit-Control */ 1193 { 1194 /* 1195 Grouped 1196 */ 1197 struct dict_object * avp; 1198 struct dict_avp_data data = { 1199 456, /* Code */ 1200 0, /* Vendor */ 1201 "Multiple-Services-Credit-Control", /* Name */ 1202 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ 1203 AVP_FLAG_MANDATORY, /* Fixed flag values */ 1204 AVP_TYPE_GROUPED /* base type of data */ 1205 }; 1206 struct local_rules_definition rules[] = { 1207 { "Granted-Service-Unit", RULE_OPTIONAL, -1, 1 }, 1208 { "Requested-Service-Unit", RULE_OPTIONAL, -1, 1 }, 1209 { "Used-Service-Unit", RULE_OPTIONAL, -1, -1 }, 1210 { "Tariff-Change-Usage", RULE_OPTIONAL, -1, 1 }, 1211 { "Service-Identifier", RULE_OPTIONAL, -1, -1 }, 1212 { "Rating-Group", RULE_OPTIONAL, -1, 1 }, 1213 { "G-S-U-Pool-Reference", RULE_OPTIONAL, -1, -1 }, 1214 { "Validity-Time", RULE_OPTIONAL, -1, 1 }, 1215 { "Result-Code", RULE_OPTIONAL, -1, 1 }, 1216 { "Final-Unit-Indication", RULE_OPTIONAL, -1, 1 } 1217 /* plus any additional AVPs { "AVP", RULE_OPTIONAL, -1, -1 } */ 1218 }; 1219 CHECK_dict_new( DICT_AVP, &data , NULL, &avp); 1220 PARSE_loc_rules( rules, avp ); 1221 } 1222 1223 1123 1224 } 1124 1225 -
Property
exe
set to
Note: See TracChangeset
for help on using the changeset viewer.