annotate extensions/app_test/atst_dict.c @ 93:3910804c84db

Ported the app_test application
author Sebastien Decugis <sdecugis@nict.go.jp>
date Mon, 07 Dec 2009 20:06:29 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
93
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1 /*********************************************************************************************************
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2 * Software License Agreement (BSD License) *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3 * Author: Sebastien Decugis <sdecugis@nict.go.jp> *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
4 * *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
5 * Copyright (c) 2009, WIDE Project and NICT *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
6 * All rights reserved. *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
7 * *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
8 * Redistribution and use of this software in source and binary forms, with or without modification, are *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
9 * permitted provided that the following conditions are met: *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
10 * *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
11 * * Redistributions of source code must retain the above *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
12 * copyright notice, this list of conditions and the *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
13 * following disclaimer. *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
14 * *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
15 * * Redistributions in binary form must reproduce the above *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
16 * copyright notice, this list of conditions and the *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
17 * following disclaimer in the documentation and/or other *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
18 * materials provided with the distribution. *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
19 * *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
20 * * Neither the name of the WIDE Project or NICT nor the *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
21 * names of its contributors may be used to endorse or *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
22 * promote products derived from this software without *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
23 * specific prior written permission of WIDE Project and *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
24 * NICT. *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
25 * *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
27 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
28 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
29 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
30 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
32 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
33 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
34 *********************************************************************************************************/
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
35
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
36 /* Install the dictionary objects */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
37
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
38 #include "app_test.h"
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
39
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
40 struct dict_object * atst_vendor = NULL;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
41 struct dict_object * atst_appli = NULL;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
42 struct dict_object * atst_cmd_r = NULL;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
43 struct dict_object * atst_cmd_a = NULL;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
44 struct dict_object * atst_avp = NULL;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
45
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
46 struct dict_object * atst_sess_id = NULL;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
47 struct dict_object * atst_origin_host = NULL;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
48 struct dict_object * atst_origin_realm = NULL;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
49 struct dict_object * atst_dest_host = NULL;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
50 struct dict_object * atst_dest_realm = NULL;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
51 struct dict_object * atst_res_code = NULL;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
52
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
53 int atst_dict_init(void)
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
54 {
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
55 TRACE_DEBUG(FULL, "Initializing the dictionary for test");
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
56
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
57 /* Create the Test Vendor */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
58 {
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
59 struct dict_vendor_data data;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
60 data.vendor_id = atst_conf->vendor_id;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
61 data.vendor_name = "app_test vendor";
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
62 CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_VENDOR, &data, NULL, &atst_vendor));
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
63 }
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
64
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
65 /* Create the Test Application */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
66 {
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
67 struct dict_application_data data;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
68 data.application_id = atst_conf->appli_id;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
69 data.application_name = "app_test application";
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
70 CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_APPLICATION, &data, atst_vendor, &atst_appli));
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
71 }
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
72
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
73 /* Create the Test-Request & Test-Answer commands */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
74 {
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
75 struct dict_cmd_data data;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
76 data.cmd_code = atst_conf->cmd_id;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
77 data.cmd_name = "Test-Request";
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
78 data.cmd_flag_mask = CMD_FLAG_PROXIABLE | CMD_FLAG_REQUEST;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
79 data.cmd_flag_val = CMD_FLAG_PROXIABLE | CMD_FLAG_REQUEST;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
80 CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_COMMAND, &data, atst_appli, &atst_cmd_r));
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
81 data.cmd_name = "Test-Answer";
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
82 data.cmd_flag_val = CMD_FLAG_PROXIABLE;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
83 CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_COMMAND, &data, atst_appli, &atst_cmd_a));
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
84 }
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
85
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
86 /* Create the Test AVP */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
87 {
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
88 struct dict_avp_data data;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
89 data.avp_code = atst_conf->avp_id;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
90 data.avp_vendor = atst_conf->vendor_id;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
91 data.avp_name = "Test-AVP";
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
92 data.avp_flag_mask = AVP_FLAG_VENDOR;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
93 data.avp_flag_val = AVP_FLAG_VENDOR;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
94 data.avp_basetype = AVP_TYPE_INTEGER32;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
95 CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_AVP, &data, NULL, &atst_avp));
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
96 }
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
97
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
98 /* Now resolve some other useful AVPs */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
99 CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Session-Id", &atst_sess_id, ENOENT) );
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
100 CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-Host", &atst_origin_host, ENOENT) );
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
101 CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-Realm", &atst_origin_realm, ENOENT) );
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
102 CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Host", &atst_dest_host, ENOENT) );
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
103 CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Realm", &atst_dest_realm, ENOENT) );
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
104 CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Result-Code", &atst_res_code, ENOENT) );
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
105
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
106 /* Create the rules for Test-Request and Test-Answer */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
107 {
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
108 struct dict_rule_data data;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
109 data.rule_min = 1;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
110 data.rule_max = 1;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
111
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
112 /* Session-Id is in first position */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
113 data.rule_avp = atst_sess_id;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
114 data.rule_position = RULE_FIXED_HEAD;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
115 data.rule_order = 1;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
116 CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &data, atst_cmd_r, NULL));
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
117 CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &data, atst_cmd_a, NULL));
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
118
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
119 data.rule_position = RULE_REQUIRED;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
120 /* Test-AVP is mandatory */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
121 data.rule_avp = atst_avp;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
122 CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &data, atst_cmd_r, NULL));
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
123 CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &data, atst_cmd_a, NULL));
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
124
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
125 /* idem for Origin Host and Realm */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
126 data.rule_avp = atst_origin_host;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
127 CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &data, atst_cmd_r, NULL));
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
128 CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &data, atst_cmd_a, NULL));
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
129
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
130 data.rule_avp = atst_origin_realm;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
131 CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &data, atst_cmd_r, NULL));
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
132 CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &data, atst_cmd_a, NULL));
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
133
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
134 /* And Result-Code is mandatory for answers only */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
135 data.rule_avp = atst_res_code;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
136 CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &data, atst_cmd_a, NULL));
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
137
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
138 /* And Destination-Realm for requests only */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
139 data.rule_avp = atst_dest_realm;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
140 CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &data, atst_cmd_r, NULL));
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
141
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
142 /* And Destination-Host optional for requests only */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
143 data.rule_position = RULE_OPTIONAL;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
144 data.rule_min = 0;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
145 data.rule_avp = atst_dest_host;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
146 CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &data, atst_cmd_r, NULL));
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
147
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
148 }
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
149
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
150 return 0;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
151 }
"Welcome to our mercurial repository"