Changeset 1227:34c2ae08176f in freeDiameter
- Timestamp:
- Jul 18, 2013, 1:48:53 AM (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/dict_dcca_starent/dict_dcca_starent.c
r1120 r1227 22 22 #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) 23 23 24 /* Attention! This version of the macro uses AVP_BY_NAME_ALL_VENDORS, in contrast to most other copies! */ 24 25 #define PARSE_loc_rules( _rulearray, _parent) { \ 25 26 int __ar; \ … … 34 35 fd_g_config->cnf_dict, \ 35 36 DICT_AVP, \ 36 AVP_BY_NAME ,\37 AVP_BY_NAME_ALL_VENDORS, \ 37 38 (_rulearray)[__ar].avp_name, \ 38 39 &__data.rule_avp, 0 ) ); \ … … 283 284 284 285 286 /* Rules section */ 287 288 /* SN-Total-Used-Service-Unit */ 289 { 290 struct dict_object *rule_avp; 291 struct dict_avp_request vpa; 292 vpa.avp_vendor = 8164; 293 vpa.avp_name = "SN-Total-Used-Service-Unit"; 294 CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); 295 struct local_rules_definition rules[] = { 296 { "Tariff-Change-Usage", RULE_OPTIONAL, -1, 1 }, 297 { "CC-Time", RULE_OPTIONAL, -1, 1 }, 298 { "CC-Total-Octets", RULE_OPTIONAL, -1, 1 }, 299 { "CC-Input-Octets", RULE_OPTIONAL, -1, 1 }, 300 { "CC-Output-Octets", RULE_OPTIONAL, -1, 1 }, 301 { "CC-Service-Specific-Units", RULE_OPTIONAL, -1, 1 }, 302 { "Reporting-Reason", RULE_OPTIONAL, -1, 1 } 303 }; 304 PARSE_loc_rules( rules, rule_avp ); 305 } 306 307 /* SN-Usage-Monitoring-Control */ 308 { 309 struct dict_object *rule_avp; 310 struct dict_avp_request vpa; 311 vpa.avp_vendor = 8164; 312 vpa.avp_name = "SN-Usage-Monitoring-Control"; 313 CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); 314 struct local_rules_definition rules[] = { 315 { "SN-Monitoring-Key", RULE_OPTIONAL, -1, 1 }, 316 { "SN-Usage-Monitoring", RULE_OPTIONAL, -1, 1 }, 317 { "SN-Usage-Volume", RULE_OPTIONAL, -1, 1 }, 318 }; 319 PARSE_loc_rules( rules, rule_avp ); 320 } 321 285 322 LOG_D( "Extension 'Dictionary definitions for DCCA Starent' initialized"); 286 323 return 0;
Note: See TracChangeset
for help on using the changeset viewer.