Changeset 1271:fd398055521c in freeDiameter for contrib
- Timestamp:
- May 21, 2014, 7:37:14 PM (10 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
contrib/test_Gx/main_gx.c
r1257 r1271 14 14 /* The content of this file follows the same structure as dict_base_proto.c */ 15 15 16 #if 0 16 17 #define CHECK_dict_new( _type, _data, _parent, _ref ) \ 17 18 CHECK_FCT( fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref)) ); 18 19 #define CHECK_dict_search( _type, _criteria, _what, _result ) \ 20 CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); 19 #endif 21 20 22 21 void dump_sess_eyec(struct session *sess, const char *); 23 struct local_rules_definition { 24 char *avp_name; 25 enum rule_position position; 26 int min; 27 int max; 28 }; 29 30 #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) 31 32 #define PARSE_loc_rules( _rulearray, _parent) { \ 33 int __ar; \ 34 for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \ 35 struct dict_rule_data __data = { NULL, \ 36 (_rulearray)[__ar].position, \ 37 0, \ 38 (_rulearray)[__ar].min, \ 39 (_rulearray)[__ar].max}; \ 40 __data.rule_order = RULE_ORDER(__data.rule_position); \ 41 CHECK_FCT( fd_dict_search( \ 42 fd_g_config->cnf_dict, \ 43 DICT_AVP, \ 44 AVP_BY_NAME, \ 45 (_rulearray)[__ar].avp_name, \ 46 &__data.rule_avp, 0 ) ); \ 47 if ( !__data.rule_avp ) { \ 48 TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_name ); \ 49 return ENOENT; \ 50 } \ 51 CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL), \ 52 { \ 53 TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \ 54 (_rulearray)[__ar].avp_name ); \ 55 return EINVAL; \ 56 } ); \ 57 } \ 58 } 59 60 #define enumval_def_u32( _val_, _str_ ) \ 61 { _str_, { .u32 = _val_ }} 62 63 #define enumval_def_os( _len_, _val_, _str_ ) \ 64 { _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}} 65 66 67 22 68 23 static int ccr_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act); 69 24 static int reauth_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act); … … 288 243 289 244 290 TRACE_DEBUG(INFO, "Extension ' Dictionary definitions for DCCA (rfc4006)' initialized");245 TRACE_DEBUG(INFO, "Extension 'Gx' initialized"); 291 246 return 0; 292 247 } … … 861 816 return 0; 862 817 } 863 EXTENSION_ENTRY( "app_gx", app_gx_entry, "dict_dcca ");818 EXTENSION_ENTRY( "app_gx", app_gx_entry, "dict_dcca_3gpp"); 864 819 //EXTENSION_ENTRY( "app_gx", gx_entry);
Note: See TracChangeset
for help on using the changeset viewer.