Changeset 127:8ee43cf85a5f in freeDiameter
- Timestamp:
- Dec 10, 2009, 2:39:55 PM (14 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/test_app.conf.sample
r120 r127 49 49 # dest-host = "server.foreign.net"; 50 50 51 # The User-Name for the message (may be useful for some routing tests). 52 # (default is not providing this AVP). 53 # user-name = "user@server.foreign.net"; 54 51 55 # The signal that triggers sending the test message 52 56 # Note: Symbolic names are now recognized, you must use integers -
extensions/test_app/ta_cli.c
r121 r127 196 196 CHECK_FCT_DO( fd_msg_add_origin ( req, 0 ), goto out ); 197 197 198 /* Set the User-Name AVP if needed*/ 199 if (ta_conf->user_name) { 200 CHECK_FCT_DO( fd_msg_avp_new ( ta_user_name, 0, &avp ), goto out ); 201 val.os.data = (unsigned char *)(ta_conf->user_name); 202 val.os.len = strlen(ta_conf->user_name); 203 CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); 204 CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); 205 } 198 206 199 207 /* Set the Test-AVP AVP */ -
extensions/test_app/ta_conf.l
r120 r127 145 145 } 146 146 147 (?i:"user-name") { 148 return USER_NAME; 149 } 150 147 151 (?i:"Signal") { 148 152 return SIGNAL; -
extensions/test_app/ta_conf.y
r120 r127 124 124 %token DEST_REALM 125 125 %token DEST_HOST 126 %token USER_NAME 126 127 %token SIGNAL 127 128 … … 147 148 | conffile dstrealm 148 149 | conffile dsthost 150 | conffile usrname 149 151 | conffile signal 150 152 ; … … 194 196 ; 195 197 198 usrname: USER_NAME '=' QSTRING ';' 199 { 200 free(ta_conf->user_name); 201 ta_conf->user_name = $3; 202 } 203 ; 204 196 205 signal: SIGNAL '=' INTEGER ';' 197 206 { -
extensions/test_app/ta_dict.c
r120 r127 49 49 struct dict_object * ta_dest_host = NULL; 50 50 struct dict_object * ta_dest_realm = NULL; 51 struct dict_object * ta_user_name = NULL; 51 52 struct dict_object * ta_res_code = NULL; 52 53 … … 102 103 CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Host", &ta_dest_host, ENOENT) ); 103 104 CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Realm", &ta_dest_realm, ENOENT) ); 105 CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "User-Name", &ta_user_name, ENOENT) ); 104 106 CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Result-Code", &ta_res_code, ENOENT) ); 105 107 -
extensions/test_app/test_app.h
r120 r127 61 61 char * dest_realm; /* default local realm */ 62 62 char * dest_host; /* default NULL */ 63 char * user_name; /* default NULL */ 63 64 int signal; /* default TEST_APP_DEFAULT_SIGNAL */ 64 65 }; … … 96 97 extern struct dict_object * ta_dest_host; 97 98 extern struct dict_object * ta_dest_realm; 99 extern struct dict_object * ta_user_name; 98 100 extern struct dict_object * ta_res_code;
Note: See TracChangeset
for help on using the changeset viewer.