blob: e137a4ac4c1012ecf8b5bd8d679a1b546a292f8c [file] [log] [blame]
Brian Waters13d96012017-12-08 16:53:31 -06001/*
2* Copyright (c) 2017 Sprint
3*
4* Licensed under the Apache License, Version 2.0 (the "License");
5* you may not use this file except in compliance with the License.
6* You may obtain a copy of the License at
7*
8* http://www.apache.org/licenses/LICENSE-2.0
9*
10* Unless required by applicable law or agreed to in writing, software
11* distributed under the License is distributed on an "AS IS" BASIS,
12* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13* See the License for the specific language governing permissions and
14* limitations under the License.
15*/
16
17/****************
18 Generated By: fdtool enhancements to diafuzzer
19 License: same as freeDiameter
20****************/
21
22
23/*
24 * Dictionary definitions of objects specified in T6aT6bT7 (e20).
25 */
26#include <freeDiameter/extension.h>
27
28#define PROTO_VER "e20"
29#define GEN_DATE 1506697230.23
30
31const char *t6at6bt7_proto_ver = PROTO_VER;
32const double t6at6bt7_gen_date = GEN_DATE;
33
34/* The content of this file follows the same structure as dict_base_proto.c */
35
36#define CHECK_dict_new( _type, _data, _parent, _ref ) \
37{ \
38 int _ret = fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref) ); \
39 if ( _ret != 0 && _ret != EEXIST ) \
40 return _ret; \
41}
42
43#define CHECK_dict_search( _type, _criteria, _what, _result ) \
44 CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) );
45
46struct local_rules_definition {
47 struct dict_avp_request avp_vendor_plus_name;
48 enum rule_position position;
49 int min;
50 int max;
51};
52
53#define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 )
54
55/* Attention! This version of the macro uses AVP_BY_NAME_AND_VENDOR, in contrast to most other copies! */
56#define PARSE_loc_rules( _rulearray, _parent) { \
57 int __ar; \
58 for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \
59 struct dict_rule_data __data = { NULL, \
60 (_rulearray)[__ar].position, \
61 0, \
62 (_rulearray)[__ar].min, \
63 (_rulearray)[__ar].max}; \
64 __data.rule_order = RULE_ORDER(__data.rule_position); \
65 CHECK_FCT( fd_dict_search( \
66 fd_g_config->cnf_dict, \
67 DICT_AVP, \
68 AVP_BY_NAME_AND_VENDOR, \
69 &(_rulearray)[__ar].avp_vendor_plus_name, \
70 &__data.rule_avp, 0 ) ); \
71 if ( !__data.rule_avp ) { \
72 TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_vendor_plus_name.avp_name); \
73 return ENOENT; \
74 } \
75 { \
76 int _ret = fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &(__data), (_parent), NULL ); \
77 if ( _ret != 0 && _ret != EEXIST ) { \
78 TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \
79 (_rulearray)[__ar].avp_vendor_plus_name.avp_name); \
80 return EINVAL; \
81 } \
82 } \
83 } \
84}
85
86#define CHECK_vendor_new( _data ) { \
87 struct dict_object * vendor_found; \
88 if (fd_dict_search(fd_g_config->cnf_dict,DICT_VENDOR,VENDOR_BY_ID,&_data.vendor_id,&vendor_found,ENOENT) == ENOENT) { \
89 CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &_data, NULL, NULL)); \
90 } \
91}
92
93#define enumval_def_u32( _val_, _str_ ) \
94 { _str_, { .u32 = _val_ }}
95
96#define enumval_def_os( _len_, _val_, _str_ ) \
97 { _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}}
98
99
100static int dict_t6at6bt7_load_defs(char * conffile)
101{
102 TRACE_ENTRY("%p", conffile);
103 struct dict_object * app_id16777346;
104
105 /* Application Section */
106 {
107 {
108 struct dict_object * vendor;
109 CHECK_dict_search(DICT_VENDOR, VENDOR_BY_NAME, "3GPP", &vendor)
110 struct dict_application_data data = { 16777346, "T6aT6bT7" };
111 CHECK_dict_new( DICT_APPLICATION, &data, vendor, &app_id16777346)
112 }
113 }
114
115
116 /* AVP section */
117 {
118 struct dict_object * Address_type;
119 struct dict_object * UTF8String_type;
120 struct dict_object * DiameterIdentity_type;
121 struct dict_object * DiameterURI_type;
122 struct dict_object * Time_type;
123 struct dict_object * IPFilterRule_type;
124
125 CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Address", &Address_type);
126 CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "UTF8String", &UTF8String_type);
127 CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterIdentity", &DiameterIdentity_type);
128 CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterURI", &DiameterURI_type);
129 CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Time", &Time_type);
130 CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "IPFilterRule", &IPFilterRule_type);
131
132
133 }
134
135 /* Commands section */
136 {
137 /* Connection-Management-Request */
138 {
139 struct dict_object* cmd;
140 struct dict_cmd_data data = {
141 8388732, /* Code */
142 "Connection-Management-Request", /* Name */
143 CMD_FLAG_REQUEST | CMD_FLAG_ERROR, /* Fixed flags */
144 CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE, /* Fixed flag values */
145 };
146
147 CHECK_dict_new( DICT_COMMAND, &data , app_id16777346, &cmd)
148 }
149 /* Connection-Management-Answer */
150 {
151 struct dict_object* cmd;
152 struct dict_cmd_data data = {
153 8388732, /* Code */
154 "Connection-Management-Answer", /* Name */
155 CMD_FLAG_REQUEST, /* Fixed flags */
156 CMD_FLAG_PROXIABLE, /* Fixed flag values */
157 };
158
159 CHECK_dict_new( DICT_COMMAND, &data , app_id16777346, &cmd)
160 }
161 /* MO-Data-Request */
162 {
163 struct dict_object* cmd;
164 struct dict_cmd_data data = {
165 8388733, /* Code */
166 "MO-Data-Request", /* Name */
167 CMD_FLAG_REQUEST | CMD_FLAG_ERROR, /* Fixed flags */
168 CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE, /* Fixed flag values */
169 };
170
171 CHECK_dict_new( DICT_COMMAND, &data , app_id16777346, &cmd)
172 }
173 /* MO-Data-Answer */
174 {
175 struct dict_object* cmd;
176 struct dict_cmd_data data = {
177 8388733, /* Code */
178 "MO-Data-Answer", /* Name */
179 CMD_FLAG_REQUEST, /* Fixed flags */
180 CMD_FLAG_PROXIABLE, /* Fixed flag values */
181 };
182
183 CHECK_dict_new( DICT_COMMAND, &data , app_id16777346, &cmd)
184 }
185 /* MT-Data-Request */
186 {
187 struct dict_object* cmd;
188 struct dict_cmd_data data = {
189 8388734, /* Code */
190 "MT-Data-Request", /* Name */
191 CMD_FLAG_REQUEST | CMD_FLAG_ERROR, /* Fixed flags */
192 CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE, /* Fixed flag values */
193 };
194
195 CHECK_dict_new( DICT_COMMAND, &data , app_id16777346, &cmd)
196 }
197 /* MT-Data-Answer */
198 {
199 struct dict_object* cmd;
200 struct dict_cmd_data data = {
201 8388734, /* Code */
202 "MT-Data-Answer", /* Name */
203 CMD_FLAG_REQUEST, /* Fixed flags */
204 CMD_FLAG_PROXIABLE, /* Fixed flag values */
205 };
206
207 CHECK_dict_new( DICT_COMMAND, &data , app_id16777346, &cmd)
208 }
209
210 }
211
212 return 0;
213}
214
215static int dict_t6at6bt7_load_rules(char * conffile)
216{
217 /* Grouped AVP section */
218 {
219
220 }
221
222 /* Commands section */
223 {
224 /* Configuration-Information-Request */
225 {
226 struct dict_object* cmd;
227 CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Configuration-Information-Request", &cmd)
228 struct local_rules_definition rules[] =
229 {
230 { { .avp_vendor = 0, .avp_name = "Session-Id"}, RULE_FIXED_HEAD, -1, -1 },
231 { { .avp_vendor = 0, .avp_name = "DRMP"}, RULE_OPTIONAL, -1, -1 },
232 { { .avp_vendor = 0, .avp_name = "Auth-Session-State"}, RULE_REQUIRED, -1, -1 },
233 { { .avp_vendor = 0, .avp_name = "Origin-Host"}, RULE_REQUIRED, -1, -1 },
234 { { .avp_vendor = 0, .avp_name = "Origin-Realm"}, RULE_REQUIRED, -1, -1 },
235 { { .avp_vendor = 0, .avp_name = "Destination-Host"}, RULE_OPTIONAL, -1, -1 },
236 { { .avp_vendor = 0, .avp_name = "Destination-Realm"}, RULE_REQUIRED, -1, -1 },
237 { { .avp_vendor = 10415, .avp_name = "Supported-Features"}, RULE_OPTIONAL, -1, -1 },
238 { { .avp_vendor = 10415, .avp_name = "Monitoring-Event-Configuration"}, RULE_OPTIONAL, -1, -1 },
239 { { .avp_vendor = 0, .avp_name = "Proxy-Info"}, RULE_OPTIONAL, -1, -1 },
240 { { .avp_vendor = 0, .avp_name = "Route-Record"}, RULE_OPTIONAL, -1, -1 }
241 };
242 PARSE_loc_rules(rules, cmd);
243 }
244 /* Configuration-Information-Answer */
245 {
246 struct dict_object* cmd;
247 CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Configuration-Information-Answer", &cmd)
248 struct local_rules_definition rules[] =
249 {
250 { { .avp_vendor = 0, .avp_name = "Session-Id"}, RULE_FIXED_HEAD, -1, -1 },
251 { { .avp_vendor = 0, .avp_name = "DRMP"}, RULE_OPTIONAL, -1, -1 },
252 { { .avp_vendor = 0, .avp_name = "Result-Code"}, RULE_OPTIONAL, -1, -1 },
253 { { .avp_vendor = 0, .avp_name = "Experimental-Result"}, RULE_OPTIONAL, -1, -1 },
254 { { .avp_vendor = 0, .avp_name = "Auth-Session-State"}, RULE_REQUIRED, -1, -1 },
255 { { .avp_vendor = 0, .avp_name = "Origin-Host"}, RULE_REQUIRED, -1, -1 },
256 { { .avp_vendor = 0, .avp_name = "Origin-Realm"}, RULE_REQUIRED, -1, -1 },
257 { { .avp_vendor = 10415, .avp_name = "Supported-Features"}, RULE_OPTIONAL, -1, -1 },
258 { { .avp_vendor = 10415, .avp_name = "Monitoring-Event-Report"}, RULE_OPTIONAL, -1, -1 },
259 { { .avp_vendor = 10415, .avp_name = "Monitoring-Event-Config-Status"}, RULE_OPTIONAL, -1, -1 },
260 { { .avp_vendor = 0, .avp_name = "Failed-AVP"}, RULE_OPTIONAL, -1, -1 },
261 { { .avp_vendor = 0, .avp_name = "Proxy-Info"}, RULE_OPTIONAL, -1, -1 },
262 { { .avp_vendor = 0, .avp_name = "Route-Record"}, RULE_OPTIONAL, -1, -1 }
263 };
264 PARSE_loc_rules(rules, cmd);
265 }
266 /* Reporting-Information-Request */
267 {
268 struct dict_object* cmd;
269 CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Reporting-Information-Request", &cmd)
270 struct local_rules_definition rules[] =
271 {
272 { { .avp_vendor = 0, .avp_name = "Session-Id"}, RULE_FIXED_HEAD, -1, -1 },
273 { { .avp_vendor = 0, .avp_name = "DRMP"}, RULE_OPTIONAL, -1, -1 },
274 { { .avp_vendor = 0, .avp_name = "Auth-Session-State"}, RULE_REQUIRED, -1, -1 },
275 { { .avp_vendor = 0, .avp_name = "Origin-Host"}, RULE_REQUIRED, -1, -1 },
276 { { .avp_vendor = 0, .avp_name = "Origin-Realm"}, RULE_REQUIRED, -1, -1 },
277 { { .avp_vendor = 0, .avp_name = "Destination-Host"}, RULE_OPTIONAL, -1, -1 },
278 { { .avp_vendor = 0, .avp_name = "Destination-Realm"}, RULE_REQUIRED, -1, -1 },
279 { { .avp_vendor = 0, .avp_name = "OC-Supported-Features"}, RULE_OPTIONAL, -1, -1 },
280 { { .avp_vendor = 10415, .avp_name = "Supported-Features"}, RULE_OPTIONAL, -1, -1 },
281 { { .avp_vendor = 10415, .avp_name = "Monitoring-Event-Report"}, RULE_OPTIONAL, -1, -1 }
282 };
283 PARSE_loc_rules(rules, cmd);
284 }
285 /* Reporting-Information-Answer */
286 {
287 struct dict_object* cmd;
288 CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Reporting-Information-Answer", &cmd)
289 struct local_rules_definition rules[] =
290 {
291 { { .avp_vendor = 0, .avp_name = "Session-Id"}, RULE_FIXED_HEAD, -1, -1 },
292 { { .avp_vendor = 0, .avp_name = "DRMP"}, RULE_OPTIONAL, -1, -1 },
293 { { .avp_vendor = 0, .avp_name = "Result-Code"}, RULE_OPTIONAL, -1, -1 },
294 { { .avp_vendor = 0, .avp_name = "Experimental-Result"}, RULE_OPTIONAL, -1, -1 },
295 { { .avp_vendor = 0, .avp_name = "Auth-Session-State"}, RULE_REQUIRED, -1, -1 },
296 { { .avp_vendor = 0, .avp_name = "Origin-Host"}, RULE_REQUIRED, -1, -1 },
297 { { .avp_vendor = 0, .avp_name = "Origin-Realm"}, RULE_REQUIRED, -1, -1 },
298 { { .avp_vendor = 0, .avp_name = "OC-Supported-Features"}, RULE_OPTIONAL, -1, -1 },
299 { { .avp_vendor = 0, .avp_name = "OC-OLR"}, RULE_OPTIONAL, -1, -1 },
300 { { .avp_vendor = 0, .avp_name = "Load"}, RULE_OPTIONAL, -1, -1 },
301 { { .avp_vendor = 10415, .avp_name = "Supported-Features"}, RULE_OPTIONAL, -1, -1 },
302 { { .avp_vendor = 0, .avp_name = "Failed-AVP"}, RULE_OPTIONAL, -1, -1 },
303 { { .avp_vendor = 0, .avp_name = "Proxy-Info"}, RULE_OPTIONAL, -1, -1 },
304 { { .avp_vendor = 0, .avp_name = "Route-Record"}, RULE_OPTIONAL, -1, -1 }
305 };
306 PARSE_loc_rules(rules, cmd);
307 }
308 /* Connection-Management-Request */
309 {
310 struct dict_object* cmd;
311 CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Connection-Management-Request", &cmd)
312 struct local_rules_definition rules[] =
313 {
314 { { .avp_vendor = 0, .avp_name = "Session-Id"}, RULE_FIXED_HEAD, -1, -1 },
315 { { .avp_vendor = 10415, .avp_name = "User-Identifier"}, RULE_FIXED_HEAD, -1, -1 },
316 { { .avp_vendor = 10415, .avp_name = "Bearer-Identifier"}, RULE_FIXED_HEAD, -1, -1 },
317 { { .avp_vendor = 0, .avp_name = "DRMP"}, RULE_OPTIONAL, -1, -1 },
318 { { .avp_vendor = 0, .avp_name = "Auth-Session-State"}, RULE_REQUIRED, -1, -1 },
319 { { .avp_vendor = 0, .avp_name = "Origin-Host"}, RULE_REQUIRED, -1, -1 },
320 { { .avp_vendor = 0, .avp_name = "Origin-Realm"}, RULE_REQUIRED, -1, -1 },
321 { { .avp_vendor = 0, .avp_name = "Destination-Host"}, RULE_OPTIONAL, -1, -1 },
322 { { .avp_vendor = 0, .avp_name = "Destination-Realm"}, RULE_REQUIRED, -1, -1 },
323 { { .avp_vendor = 0, .avp_name = "OC-Supported-Features"}, RULE_OPTIONAL, -1, -1 },
324 { { .avp_vendor = 10415, .avp_name = "CMR-Flags"}, RULE_OPTIONAL, -1, -1 },
325 { { .avp_vendor = 10415, .avp_name = "Maximum-UE-Availability-Time"}, RULE_OPTIONAL, -1, -1 },
326 { { .avp_vendor = 10415, .avp_name = "Supported-Features"}, RULE_OPTIONAL, -1, -1 },
327 { { .avp_vendor = 10415, .avp_name = "Connection-Action"}, RULE_OPTIONAL, -1, -1 },
328 { { .avp_vendor = 0, .avp_name = "Service-Selection"}, RULE_OPTIONAL, -1, -1 },
329 { { .avp_vendor = 10415, .avp_name = "Serving-PLMN-Rate-Control"}, RULE_OPTIONAL, -1, -1 },
330 { { .avp_vendor = 10415, .avp_name = "Extended-PCO"}, RULE_OPTIONAL, -1, -1 },
331 { { .avp_vendor = 10415, .avp_name = "3GPP-Charging-Characteristics"}, RULE_OPTIONAL, -1, -1 },
332 { { .avp_vendor = 10415, .avp_name = "RAT-Type"}, RULE_OPTIONAL, -1, -1 },
333 { { .avp_vendor = 10415, .avp_name = "Terminal-Information"}, RULE_OPTIONAL, -1, -1 },
334 { { .avp_vendor = 10415, .avp_name = "Visited-PLMN-Id"}, RULE_OPTIONAL, -1, -1 },
335 { { .avp_vendor = 0, .avp_name = "Proxy-Info"}, RULE_OPTIONAL, -1, -1 },
336 { { .avp_vendor = 0, .avp_name = "Route-Record"}, RULE_OPTIONAL, -1, -1 }
337 };
338 PARSE_loc_rules(rules, cmd);
339 }
340 /* Connection-Management-Answer */
341 {
342 struct dict_object* cmd;
343 CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Connection-Management-Answer", &cmd)
344 struct local_rules_definition rules[] =
345 {
346 { { .avp_vendor = 0, .avp_name = "Session-Id"}, RULE_FIXED_HEAD, -1, -1 },
347 { { .avp_vendor = 0, .avp_name = "DRMP"}, RULE_OPTIONAL, -1, -1 },
348 { { .avp_vendor = 0, .avp_name = "Result-Code"}, RULE_OPTIONAL, -1, -1 },
349 { { .avp_vendor = 0, .avp_name = "Experimental-Result"}, RULE_OPTIONAL, -1, -1 },
350 { { .avp_vendor = 0, .avp_name = "Auth-Session-State"}, RULE_REQUIRED, -1, -1 },
351 { { .avp_vendor = 0, .avp_name = "Origin-Host"}, RULE_REQUIRED, -1, -1 },
352 { { .avp_vendor = 0, .avp_name = "Origin-Realm"}, RULE_REQUIRED, -1, -1 },
353 { { .avp_vendor = 0, .avp_name = "OC-Supported-Features"}, RULE_OPTIONAL, -1, -1 },
354 { { .avp_vendor = 0, .avp_name = "OC-OLR"}, RULE_OPTIONAL, -1, -1 },
355 { { .avp_vendor = 0, .avp_name = "Load"}, RULE_OPTIONAL, -1, -1 },
356 { { .avp_vendor = 10415, .avp_name = "Supported-Features"}, RULE_OPTIONAL, -1, -1 },
357 { { .avp_vendor = 10415, .avp_name = "PDN-Connection-Charging-ID"}, RULE_OPTIONAL, -1, -1 },
358 { { .avp_vendor = 10415, .avp_name = "Extended-PCO"}, RULE_OPTIONAL, -1, -1 },
359 { { .avp_vendor = 0, .avp_name = "Failed-AVP"}, RULE_OPTIONAL, -1, -1 },
360 { { .avp_vendor = 0, .avp_name = "Proxy-Info"}, RULE_OPTIONAL, -1, -1 },
361 { { .avp_vendor = 0, .avp_name = "Route-Record"}, RULE_OPTIONAL, -1, -1 }
362 };
363 PARSE_loc_rules(rules, cmd);
364 }
365 /* MO-Data-Request */
366 {
367 struct dict_object* cmd;
368 CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "MO-Data-Request", &cmd)
369 struct local_rules_definition rules[] =
370 {
371 { { .avp_vendor = 0, .avp_name = "Session-Id"}, RULE_FIXED_HEAD, -1, -1 },
372 { { .avp_vendor = 10415, .avp_name = "User-Identifier"}, RULE_FIXED_HEAD, -1, -1 },
373 { { .avp_vendor = 10415, .avp_name = "Bearer-Identifier"}, RULE_FIXED_HEAD, -1, -1 },
374 { { .avp_vendor = 0, .avp_name = "DRMP"}, RULE_OPTIONAL, -1, -1 },
375 { { .avp_vendor = 0, .avp_name = "Auth-Session-State"}, RULE_REQUIRED, -1, -1 },
376 { { .avp_vendor = 0, .avp_name = "Origin-Host"}, RULE_REQUIRED, -1, -1 },
377 { { .avp_vendor = 0, .avp_name = "Origin-Realm"}, RULE_REQUIRED, -1, -1 },
378 { { .avp_vendor = 0, .avp_name = "Destination-Host"}, RULE_OPTIONAL, -1, -1 },
379 { { .avp_vendor = 0, .avp_name = "Destination-Realm"}, RULE_REQUIRED, -1, -1 },
380 { { .avp_vendor = 0, .avp_name = "OC-Supported-Features"}, RULE_OPTIONAL, -1, -1 },
381 { { .avp_vendor = 10415, .avp_name = "Supported-Features"}, RULE_OPTIONAL, -1, -1 },
382 { { .avp_vendor = 10415, .avp_name = "Non-IP-Data"}, RULE_OPTIONAL, -1, -1 },
383 { { .avp_vendor = 0, .avp_name = "Proxy-Info"}, RULE_OPTIONAL, -1, -1 },
384 { { .avp_vendor = 0, .avp_name = "Route-Record"}, RULE_OPTIONAL, -1, -1 },
385 { { .avp_vendor = 10415, .avp_name = "RRC-Cause-Counter"}, RULE_OPTIONAL, -1, -1 }
386 };
387 PARSE_loc_rules(rules, cmd);
388 }
389 /* MO-Data-Answer */
390 {
391 struct dict_object* cmd;
392 CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "MO-Data-Answer", &cmd)
393 struct local_rules_definition rules[] =
394 {
395 { { .avp_vendor = 0, .avp_name = "Session-Id"}, RULE_FIXED_HEAD, -1, -1 },
396 { { .avp_vendor = 0, .avp_name = "DRMP"}, RULE_OPTIONAL, -1, -1 },
397 { { .avp_vendor = 0, .avp_name = "Result-Code"}, RULE_OPTIONAL, -1, -1 },
398 { { .avp_vendor = 0, .avp_name = "Experimental-Result"}, RULE_OPTIONAL, -1, -1 },
399 { { .avp_vendor = 0, .avp_name = "Auth-Session-State"}, RULE_REQUIRED, -1, -1 },
400 { { .avp_vendor = 0, .avp_name = "Origin-Host"}, RULE_REQUIRED, -1, -1 },
401 { { .avp_vendor = 0, .avp_name = "Origin-Realm"}, RULE_REQUIRED, -1, -1 },
402 { { .avp_vendor = 0, .avp_name = "OC-Supported-Features"}, RULE_OPTIONAL, -1, -1 },
403 { { .avp_vendor = 0, .avp_name = "OC-OLR"}, RULE_OPTIONAL, -1, -1 },
404 { { .avp_vendor = 0, .avp_name = "Load"}, RULE_OPTIONAL, -1, -1 },
405 { { .avp_vendor = 10415, .avp_name = "Supported-Features"}, RULE_OPTIONAL, -1, -1 },
406 { { .avp_vendor = 0, .avp_name = "Failed-AVP"}, RULE_OPTIONAL, -1, -1 },
407 { { .avp_vendor = 0, .avp_name = "Proxy-Info"}, RULE_OPTIONAL, -1, -1 },
408 { { .avp_vendor = 0, .avp_name = "Route-Record"}, RULE_OPTIONAL, -1, -1 }
409 };
410 PARSE_loc_rules(rules, cmd);
411 }
412 /* MT-Data-Request */
413 {
414 struct dict_object* cmd;
415 CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "MT-Data-Request", &cmd)
416 struct local_rules_definition rules[] =
417 {
418 { { .avp_vendor = 0, .avp_name = "Session-Id"}, RULE_FIXED_HEAD, -1, -1 },
419 { { .avp_vendor = 10415, .avp_name = "User-Identifier"}, RULE_FIXED_HEAD, -1, -1 },
420 { { .avp_vendor = 10415, .avp_name = "Bearer-Identifier"}, RULE_FIXED_HEAD, -1, -1 },
421 { { .avp_vendor = 0, .avp_name = "DRMP"}, RULE_OPTIONAL, -1, -1 },
422 { { .avp_vendor = 0, .avp_name = "Auth-Session-State"}, RULE_REQUIRED, -1, -1 },
423 { { .avp_vendor = 0, .avp_name = "Origin-Host"}, RULE_REQUIRED, -1, -1 },
424 { { .avp_vendor = 0, .avp_name = "Origin-Realm"}, RULE_REQUIRED, -1, -1 },
425 { { .avp_vendor = 0, .avp_name = "Destination-Host"}, RULE_OPTIONAL, -1, -1 },
426 { { .avp_vendor = 0, .avp_name = "Destination-Realm"}, RULE_REQUIRED, -1, -1 },
427 { { .avp_vendor = 0, .avp_name = "OC-Supported-Features"}, RULE_OPTIONAL, -1, -1 },
428 { { .avp_vendor = 10415, .avp_name = "Supported-Features"}, RULE_OPTIONAL, -1, -1 },
429 { { .avp_vendor = 10415, .avp_name = "Non-IP-Data"}, RULE_OPTIONAL, -1, -1 },
430 { { .avp_vendor = 10415, .avp_name = "SCEF-Wait-Time"}, RULE_OPTIONAL, -1, -1 },
431 { { .avp_vendor = 10415, .avp_name = "Maximum-Retransmission-Time"}, RULE_OPTIONAL, -1, -1 },
432 { { .avp_vendor = 0, .avp_name = "Proxy-Info"}, RULE_OPTIONAL, -1, -1 },
433 { { .avp_vendor = 0, .avp_name = "Route-Record"}, RULE_OPTIONAL, -1, -1 }
434 };
435 PARSE_loc_rules(rules, cmd);
436 }
437 /* MT-Data-Answer */
438 {
439 struct dict_object* cmd;
440 CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "MT-Data-Answer", &cmd)
441 struct local_rules_definition rules[] =
442 {
443 { { .avp_vendor = 0, .avp_name = "Session-Id"}, RULE_FIXED_HEAD, -1, -1 },
444 { { .avp_vendor = 0, .avp_name = "DRMP"}, RULE_OPTIONAL, -1, -1 },
445 { { .avp_vendor = 0, .avp_name = "Result-Code"}, RULE_OPTIONAL, -1, -1 },
446 { { .avp_vendor = 0, .avp_name = "Experimental-Result"}, RULE_OPTIONAL, -1, -1 },
447 { { .avp_vendor = 0, .avp_name = "Auth-Session-State"}, RULE_REQUIRED, -1, -1 },
448 { { .avp_vendor = 0, .avp_name = "Origin-Host"}, RULE_REQUIRED, -1, -1 },
449 { { .avp_vendor = 0, .avp_name = "Origin-Realm"}, RULE_REQUIRED, -1, -1 },
450 { { .avp_vendor = 0, .avp_name = "OC-Supported-Features"}, RULE_OPTIONAL, -1, -1 },
451 { { .avp_vendor = 0, .avp_name = "OC-OLR"}, RULE_OPTIONAL, -1, -1 },
452 { { .avp_vendor = 0, .avp_name = "Load"}, RULE_OPTIONAL, -1, -1 },
453 { { .avp_vendor = 10415, .avp_name = "Requested-Retransmission-Time"}, RULE_OPTIONAL, -1, -1 },
454 { { .avp_vendor = 10415, .avp_name = "Supported-Features"}, RULE_OPTIONAL, -1, -1 },
455 { { .avp_vendor = 0, .avp_name = "Failed-AVP"}, RULE_OPTIONAL, -1, -1 },
456 { { .avp_vendor = 0, .avp_name = "Proxy-Info"}, RULE_OPTIONAL, -1, -1 },
457 { { .avp_vendor = 0, .avp_name = "Route-Record"}, RULE_OPTIONAL, -1, -1 }
458 };
459 PARSE_loc_rules(rules, cmd);
460 }
461
462 }
463
464 LOG_D( "Extension 'Dictionary definitions for T6aT6bT7 (e20)' initialized");
465 return 0;
466}
467
468int dict_entry(char * conffile)
469{
470 dict_t6at6bt7_load_defs(conffile);
471 return dict_t6at6bt7_load_rules(conffile);
472}
473
474const char* dict_t6at6bt7_proto_ver(char * conffile) {
475 return t6at6bt7_proto_ver;
476}
477
478const double dict_t6at6bt7_gen_ts(char * conffile) {
479 return t6at6bt7_gen_date;
480}
481
482EXTENSION_ENTRY2("dict_t6at6bt7", dict_t6at6bt7_load_defs, dict_t6at6bt7_load_rules, "dict_ts32299_avps", "dict_ts29272_avps", "dict_ts29128_avps", "dict_S6t", "dict_ts29336_avps", "dict_ts29212_avps", "dict_ts29217_avps", "dict_ts29338_avps", "dict_ts29229_avps", "dict_ts29061_avps", "dict_draftload_avps", "dict_rfc7683_avps", "dict_rfc5778_avps", "dict_rfc7944_avps");
483
484
485