blob: 9906d3abe15af5f0f0fdd01a5a3dec30526a275c [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 ts29273_avps (e20).
25 */
26#include <freeDiameter/extension.h>
27
28#define PROTO_VER "e20"
29#define GEN_DATE 1506697133.32
30
31const char *ts29273_avps_proto_ver = PROTO_VER;
32const double ts29273_avps_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_ts29273_avps_load_defs(char * conffile)
101{
102 TRACE_ENTRY("%p", conffile);
103 /* Application Section */
104 {
105 /* Create the vendors */ {
106 struct dict_vendor_data vendor_data = { 10415, "3GPP" };
107 CHECK_dict_new(DICT_VENDOR, &vendor_data, NULL, NULL)
108 }
109 }
110
111
112 /* AVP section */
113 {
114 struct dict_object * Address_type;
115 struct dict_object * UTF8String_type;
116 struct dict_object * DiameterIdentity_type;
117 struct dict_object * DiameterURI_type;
118 struct dict_object * Time_type;
119 struct dict_object * IPFilterRule_type;
120
121 CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Address", &Address_type);
122 CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "UTF8String", &UTF8String_type);
123 CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterIdentity", &DiameterIdentity_type);
124 CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterURI", &DiameterURI_type);
125 CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Time", &Time_type);
126 CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "IPFilterRule", &IPFilterRule_type);
127 /* ANID */
128 {
129 struct dict_avp_data data = {
130 1504, /* Code */
131 10415, /* Vendor */
132 "ANID", /* Name */
133 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
134 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */
135 AVP_TYPE_OCTETSTRING /* base type of data */
136 };
137 CHECK_dict_new( DICT_AVP, &data, UTF8String_type, NULL);
138 };
139 /* AN-Trusted */
140 {
141 struct dict_avp_data data = {
142 1503, /* Code */
143 10415, /* Vendor */
144 "AN-Trusted", /* Name */
145 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
146 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */
147 AVP_TYPE_INTEGER32 /* base type of data */
148 };
149 struct dict_object *type;
150 struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(AN-Trusted)", NULL, NULL, NULL };
151 struct dict_enumval_data t_1 = { "TRUSTED", { .i32=0 }};
152 struct dict_enumval_data t_2 = { "UNTRUSTED", { .i32=1 }};
153 /* Create the Enumerated type, and then the AVP */
154 CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type);
155 CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL);
156 CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL);
157 CHECK_dict_new( DICT_AVP, &data, type, NULL);
158 };
159 /* MIP-FA-RK */
160 {
161 struct dict_avp_data data = {
162 1506, /* Code */
163 10415, /* Vendor */
164 "MIP-FA-RK", /* Name */
165 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
166 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */
167 AVP_TYPE_OCTETSTRING /* base type of data */
168 };
169 CHECK_dict_new( DICT_AVP, &data, NULL, NULL);
170 };
171 /* MIP-FA-RK-SPI */
172 {
173 struct dict_avp_data data = {
174 1507, /* Code */
175 10415, /* Vendor */
176 "MIP-FA-RK-SPI", /* Name */
177 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
178 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */
179 AVP_TYPE_UNSIGNED32 /* base type of data */
180 };
181 CHECK_dict_new( DICT_AVP, &data, NULL, NULL);
182 };
183 /* Full-Network-Name */
184 {
185 struct dict_avp_data data = {
186 1516, /* Code */
187 10415, /* Vendor */
188 "Full-Network-Name", /* Name */
189 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
190 AVP_FLAG_VENDOR, /* Fixed flag values */
191 AVP_TYPE_OCTETSTRING /* base type of data */
192 };
193 CHECK_dict_new( DICT_AVP, &data, NULL, NULL);
194 };
195 /* Short-Network-Name */
196 {
197 struct dict_avp_data data = {
198 1517, /* Code */
199 10415, /* Vendor */
200 "Short-Network-Name", /* Name */
201 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
202 AVP_FLAG_VENDOR, /* Fixed flag values */
203 AVP_TYPE_OCTETSTRING /* base type of data */
204 };
205 CHECK_dict_new( DICT_AVP, &data, NULL, NULL);
206 };
207 /* Mobile-Node-Identifier */
208 {
209 struct dict_avp_data data = {
210 506, /* Code */
211 10415, /* Vendor */
212 "Mobile-Node-Identifier", /* Name */
213 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
214 AVP_FLAG_MANDATORY, /* Fixed flag values */
215 AVP_TYPE_OCTETSTRING /* base type of data */
216 };
217 CHECK_dict_new( DICT_AVP, &data, UTF8String_type, NULL);
218 };
219 /* AAA-Failure-Indication */
220 {
221 struct dict_avp_data data = {
222 1518, /* Code */
223 10415, /* Vendor */
224 "AAA-Failure-Indication", /* Name */
225 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
226 AVP_FLAG_VENDOR, /* Fixed flag values */
227 AVP_TYPE_UNSIGNED32 /* base type of data */
228 };
229 CHECK_dict_new( DICT_AVP, &data, NULL, NULL);
230 };
231 /* Transport-Access-Type */
232 {
233 struct dict_avp_data data = {
234 1519, /* Code */
235 10415, /* Vendor */
236 "Transport-Access-Type", /* Name */
237 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
238 AVP_FLAG_VENDOR, /* Fixed flag values */
239 AVP_TYPE_INTEGER32 /* base type of data */
240 };
241 struct dict_object *type;
242 struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Transport-Access-Type)", NULL, NULL, NULL };
243 struct dict_enumval_data t_1 = { "BBF", { .i32=0 }};
244 /* Create the Enumerated type, and then the AVP */
245 CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type);
246 CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL);
247 CHECK_dict_new( DICT_AVP, &data, type, NULL);
248 };
249 /* Visited-Network-Identifier */
250 {
251 struct dict_avp_data data = {
252 600, /* Code */
253 10415, /* Vendor */
254 "Visited-Network-Identifier", /* Name */
255 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
256 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */
257 AVP_TYPE_OCTETSTRING /* base type of data */
258 };
259 CHECK_dict_new( DICT_AVP, &data, NULL, NULL);
260 };
261 /* DER-Flags */
262 {
263 struct dict_avp_data data = {
264 1520, /* Code */
265 10415, /* Vendor */
266 "DER-Flags", /* Name */
267 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
268 AVP_FLAG_VENDOR, /* Fixed flag values */
269 AVP_TYPE_UNSIGNED32 /* base type of data */
270 };
271 CHECK_dict_new( DICT_AVP, &data, NULL, NULL);
272 };
273 /* DEA-Flags */
274 {
275 struct dict_avp_data data = {
276 1521, /* Code */
277 10415, /* Vendor */
278 "DEA-Flags", /* Name */
279 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
280 AVP_FLAG_VENDOR, /* Fixed flag values */
281 AVP_TYPE_UNSIGNED32 /* base type of data */
282 };
283 CHECK_dict_new( DICT_AVP, &data, NULL, NULL);
284 };
285 /* SSID */
286 {
287 struct dict_avp_data data = {
288 1524, /* Code */
289 10415, /* Vendor */
290 "SSID", /* Name */
291 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
292 AVP_FLAG_VENDOR, /* Fixed flag values */
293 AVP_TYPE_OCTETSTRING /* base type of data */
294 };
295 CHECK_dict_new( DICT_AVP, &data, UTF8String_type, NULL);
296 };
297 /* HESSID */
298 {
299 struct dict_avp_data data = {
300 1525, /* Code */
301 10415, /* Vendor */
302 "HESSID", /* Name */
303 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
304 AVP_FLAG_VENDOR, /* Fixed flag values */
305 AVP_TYPE_OCTETSTRING /* base type of data */
306 };
307 CHECK_dict_new( DICT_AVP, &data, UTF8String_type, NULL);
308 };
309 /* TWAN-Connection-Mode */
310 {
311 struct dict_avp_data data = {
312 1527, /* Code */
313 10415, /* Vendor */
314 "TWAN-Connection-Mode", /* Name */
315 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
316 AVP_FLAG_VENDOR, /* Fixed flag values */
317 AVP_TYPE_UNSIGNED32 /* base type of data */
318 };
319 CHECK_dict_new( DICT_AVP, &data, NULL, NULL);
320 };
321 /* Connectivity-Flags */
322 {
323 struct dict_avp_data data = {
324 1529, /* Code */
325 10415, /* Vendor */
326 "Connectivity-Flags", /* Name */
327 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
328 AVP_FLAG_VENDOR, /* Fixed flag values */
329 AVP_TYPE_UNSIGNED32 /* base type of data */
330 };
331 CHECK_dict_new( DICT_AVP, &data, NULL, NULL);
332 };
333 /* TWAN-PCO */
334 {
335 struct dict_avp_data data = {
336 1530, /* Code */
337 10415, /* Vendor */
338 "TWAN-PCO", /* Name */
339 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
340 AVP_FLAG_VENDOR, /* Fixed flag values */
341 AVP_TYPE_OCTETSTRING /* base type of data */
342 };
343 CHECK_dict_new( DICT_AVP, &data, NULL, NULL);
344 };
345 /* TWAG-CP-Address */
346 {
347 struct dict_avp_data data = {
348 1531, /* Code */
349 10415, /* Vendor */
350 "TWAG-CP-Address", /* Name */
351 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
352 AVP_FLAG_VENDOR, /* Fixed flag values */
353 AVP_TYPE_OCTETSTRING /* base type of data */
354 };
355 CHECK_dict_new( DICT_AVP, &data, Address_type, NULL);
356 };
357 /* TWAG-UP-Address */
358 {
359 struct dict_avp_data data = {
360 1532, /* Code */
361 10415, /* Vendor */
362 "TWAG-UP-Address", /* Name */
363 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
364 AVP_FLAG_VENDOR, /* Fixed flag values */
365 AVP_TYPE_OCTETSTRING /* base type of data */
366 };
367 CHECK_dict_new( DICT_AVP, &data, UTF8String_type, NULL);
368 };
369 /* TWAN-S2a-Failure-Cause */
370 {
371 struct dict_avp_data data = {
372 1533, /* Code */
373 10415, /* Vendor */
374 "TWAN-S2a-Failure-Cause", /* Name */
375 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
376 AVP_FLAG_VENDOR, /* Fixed flag values */
377 AVP_TYPE_UNSIGNED32 /* base type of data */
378 };
379 CHECK_dict_new( DICT_AVP, &data, NULL, NULL);
380 };
381 /* SM-Back-Off-Timer */
382 {
383 struct dict_avp_data data = {
384 1534, /* Code */
385 10415, /* Vendor */
386 "SM-Back-Off-Timer", /* Name */
387 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
388 AVP_FLAG_VENDOR, /* Fixed flag values */
389 AVP_TYPE_UNSIGNED32 /* base type of data */
390 };
391 CHECK_dict_new( DICT_AVP, &data, NULL, NULL);
392 };
393 /* WLCP-Key */
394 {
395 struct dict_avp_data data = {
396 1535, /* Code */
397 10415, /* Vendor */
398 "WLCP-Key", /* Name */
399 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
400 AVP_FLAG_VENDOR, /* Fixed flag values */
401 AVP_TYPE_OCTETSTRING /* base type of data */
402 };
403 CHECK_dict_new( DICT_AVP, &data, NULL, NULL);
404 };
405 /* Emergency-Services */
406 {
407 struct dict_avp_data data = {
408 1538, /* Code */
409 10415, /* Vendor */
410 "Emergency-Services", /* Name */
411 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
412 AVP_FLAG_VENDOR, /* Fixed flag values */
413 AVP_TYPE_UNSIGNED32 /* base type of data */
414 };
415 CHECK_dict_new( DICT_AVP, &data, NULL, NULL);
416 };
417 /* IMEI-Check-In-VPLMN-Result */
418 {
419 struct dict_avp_data data = {
420 1540, /* Code */
421 10415, /* Vendor */
422 "IMEI-Check-In-VPLMN-Result", /* Name */
423 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
424 AVP_FLAG_VENDOR, /* Fixed flag values */
425 AVP_TYPE_UNSIGNED32 /* base type of data */
426 };
427 CHECK_dict_new( DICT_AVP, &data, NULL, NULL);
428 };
429 /* Non-3GPP-IP-Access */
430 {
431 struct dict_avp_data data = {
432 1501, /* Code */
433 10415, /* Vendor */
434 "Non-3GPP-IP-Access", /* Name */
435 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
436 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */
437 AVP_TYPE_INTEGER32 /* base type of data */
438 };
439 struct dict_object *type;
440 struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Non-3GPP-IP-Access)", NULL, NULL, NULL };
441 struct dict_enumval_data t_1 = { "NON_3GPP_SUBSCRIPTION_ALLOWED", { .i32=0 }};
442 struct dict_enumval_data t_2 = { "NON_3GPP_SUBSCRIPTION_BARRED", { .i32=1 }};
443 /* Create the Enumerated type, and then the AVP */
444 CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type);
445 CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL);
446 CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL);
447 CHECK_dict_new( DICT_AVP, &data, type, NULL);
448 };
449 /* Non-3GPP-IP-Access-APN */
450 {
451 struct dict_avp_data data = {
452 1502, /* Code */
453 10415, /* Vendor */
454 "Non-3GPP-IP-Access-APN", /* Name */
455 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
456 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */
457 AVP_TYPE_INTEGER32 /* base type of data */
458 };
459 struct dict_object *type;
460 struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Non-3GPP-IP-Access-APN)", NULL, NULL, NULL };
461 struct dict_enumval_data t_1 = { "Non_3GPP_APNS_ENABLE", { .i32=0 }};
462 struct dict_enumval_data t_2 = { "Non_3GPP_APNS_DISABLE", { .i32=1 }};
463 /* Create the Enumerated type, and then the AVP */
464 CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type);
465 CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL);
466 CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL);
467 CHECK_dict_new( DICT_AVP, &data, type, NULL);
468 };
469 /* PPR-Flags */
470 {
471 struct dict_avp_data data = {
472 1508, /* Code */
473 10415, /* Vendor */
474 "PPR-Flags", /* Name */
475 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
476 AVP_FLAG_VENDOR, /* Fixed flag values */
477 AVP_TYPE_UNSIGNED32 /* base type of data */
478 };
479 CHECK_dict_new( DICT_AVP, &data, NULL, NULL);
480 };
481 /* TWAN-Default-APN-Context-Id */
482 {
483 struct dict_avp_data data = {
484 1512, /* Code */
485 10415, /* Vendor */
486 "TWAN-Default-APN-Context-Id", /* Name */
487 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
488 AVP_FLAG_VENDOR, /* Fixed flag values */
489 AVP_TYPE_UNSIGNED32 /* base type of data */
490 };
491 CHECK_dict_new( DICT_AVP, &data, NULL, NULL);
492 };
493 /* Access-Authorization-Flags */
494 {
495 struct dict_avp_data data = {
496 1511, /* Code */
497 10415, /* Vendor */
498 "Access-Authorization-Flags", /* Name */
499 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
500 AVP_FLAG_VENDOR, /* Fixed flag values */
501 AVP_TYPE_UNSIGNED32 /* base type of data */
502 };
503 CHECK_dict_new( DICT_AVP, &data, NULL, NULL);
504 };
505 /* Service-Selection */
506 {
507 struct dict_avp_data data = {
508 493, /* Code */
509 10415, /* Vendor */
510 "Service-Selection", /* Name */
511 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
512 AVP_FLAG_MANDATORY, /* Fixed flag values */
513 AVP_TYPE_OCTETSTRING /* base type of data */
514 };
515 CHECK_dict_new( DICT_AVP, &data, UTF8String_type, NULL);
516 };
517 /* 3GPP-AAA-Server-Name */
518 {
519 struct dict_avp_data data = {
520 318, /* Code */
521 10415, /* Vendor */
522 "3GPP-AAA-Server-Name", /* Name */
523 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
524 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */
525 AVP_TYPE_OCTETSTRING /* base type of data */
526 };
527 CHECK_dict_new( DICT_AVP, &data, DiameterIdentity_type, NULL);
528 };
529 /* ERP-Authorization */
530 {
531 struct dict_avp_data data = {
532 1541, /* Code */
533 10415, /* Vendor */
534 "ERP-Authorization", /* Name */
535 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
536 AVP_FLAG_VENDOR, /* Fixed flag values */
537 AVP_TYPE_UNSIGNED32 /* base type of data */
538 };
539 CHECK_dict_new( DICT_AVP, &data, NULL, NULL);
540 };
541 /* MIP6-Feature-Vector */
542 {
543 struct dict_avp_data data = {
544 124, /* Code */
545 10415, /* Vendor */
546 "MIP6-Feature-Vector", /* Name */
547 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
548 AVP_FLAG_MANDATORY, /* Fixed flag values */
549 AVP_TYPE_UNSIGNED64 /* base type of data */
550 };
551 CHECK_dict_new( DICT_AVP, &data, NULL, NULL);
552 };
553 /* Origination-Time-Stamp */
554 {
555 struct dict_avp_data data = {
556 1536, /* Code */
557 10415, /* Vendor */
558 "Origination-Time-Stamp", /* Name */
559 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
560 AVP_FLAG_VENDOR, /* Fixed flag values */
561 AVP_TYPE_UNSIGNED64 /* base type of data */
562 };
563 CHECK_dict_new( DICT_AVP, &data, NULL, NULL);
564 };
565 /* Maximum-Wait-Time */
566 {
567 struct dict_avp_data data = {
568 1537, /* Code */
569 10415, /* Vendor */
570 "Maximum-Wait-Time", /* Name */
571 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
572 AVP_FLAG_VENDOR, /* Fixed flag values */
573 AVP_TYPE_UNSIGNED32 /* base type of data */
574 };
575 CHECK_dict_new( DICT_AVP, &data, NULL, NULL);
576 };
577 /* Access-Network-Info */
578 {
579 /* Grouped */
580 struct dict_object * avp;
581 struct dict_avp_data data = {
582 1526, /* Code */
583 10415, /* Vendor */
584 "Access-Network-Info", /* Name */
585 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
586 AVP_FLAG_VENDOR, /* Fixed flag values */
587 AVP_TYPE_GROUPED /* base type of data */
588 };
589 CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
590 }
591 /* MIP6-Agent-Info */
592 {
593 /* Grouped */
594 struct dict_object * avp;
595 struct dict_avp_data data = {
596 486, /* Code */
597 10415, /* Vendor */
598 "MIP6-Agent-Info", /* Name */
599 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
600 AVP_FLAG_MANDATORY, /* Fixed flag values */
601 AVP_TYPE_GROUPED /* base type of data */
602 };
603 CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
604 }
605 /* WLAN-Identifier */
606 {
607 /* Grouped */
608 struct dict_object * avp;
609 struct dict_avp_data data = {
610 1509, /* Code */
611 10415, /* Vendor */
612 "WLAN-Identifier", /* Name */
613 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
614 AVP_FLAG_VENDOR, /* Fixed flag values */
615 AVP_TYPE_GROUPED /* base type of data */
616 };
617 CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
618 }
619 /* TWAN-Connectivity-Parameters */
620 {
621 /* Grouped */
622 struct dict_object * avp;
623 struct dict_avp_data data = {
624 1528, /* Code */
625 10415, /* Vendor */
626 "TWAN-Connectivity-Parameters", /* Name */
627 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
628 AVP_FLAG_VENDOR, /* Fixed flag values */
629 AVP_TYPE_GROUPED /* base type of data */
630 };
631 CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
632 }
633 /* TWAN-Access-Info */
634 {
635 /* Grouped */
636 struct dict_object * avp;
637 struct dict_avp_data data = {
638 1510, /* Code */
639 10415, /* Vendor */
640 "TWAN-Access-Info", /* Name */
641 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
642 AVP_FLAG_VENDOR, /* Fixed flag values */
643 AVP_TYPE_GROUPED /* base type of data */
644 };
645 CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
646 }
647 /* Trace-Info */
648 {
649 /* Grouped */
650 struct dict_object * avp;
651 struct dict_avp_data data = {
652 1505, /* Code */
653 10415, /* Vendor */
654 "Trace-Info", /* Name */
655 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
656 AVP_FLAG_VENDOR, /* Fixed flag values */
657 AVP_TYPE_GROUPED /* base type of data */
658 };
659 CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
660 }
661 /* Non-3GPP-User-Data */
662 {
663 /* Grouped */
664 struct dict_object * avp;
665 struct dict_avp_data data = {
666 1500, /* Code */
667 10415, /* Vendor */
668 "Non-3GPP-User-Data", /* Name */
669 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
670 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */
671 AVP_TYPE_GROUPED /* base type of data */
672 };
673 CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
674 }
675
676
677 }
678
679 /* Commands section */
680 {
681
682 }
683
684 return 0;
685}
686
687static int dict_ts29273_avps_load_rules(char * conffile)
688{
689 /* Grouped AVP section */
690 {
691 /* Access-Network-Info */
692 {
693 /* Grouped */
694 struct dict_object * avp;
695 struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 10415, .avp_name = "Access-Network-Info"};
696 CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp)
697 struct local_rules_definition rules[] =
698 {
699 { { .avp_vendor = 10415, .avp_name = "SSID"}, RULE_OPTIONAL, -1, -1 },
700 { { .avp_vendor = 10415, .avp_name = "BSSID"}, RULE_OPTIONAL, -1, -1 },
701 { { .avp_vendor = 0, .avp_name = "Location-Information"}, RULE_OPTIONAL, -1, -1 },
702 { { .avp_vendor = 0, .avp_name = "Location-Data"}, RULE_OPTIONAL, -1, -1 },
703 { { .avp_vendor = 0, .avp_name = "Operator-Name"}, RULE_OPTIONAL, -1, -1 },
704 { { .avp_vendor = 13019, .avp_name = "Logical-Access-Id"}, RULE_OPTIONAL, -1, -1 }
705 };
706 PARSE_loc_rules( rules, avp );
707 }
708 /* MIP6-Agent-Info */
709 {
710 /* Grouped */
711 struct dict_object * avp;
712 struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 10415, .avp_name = "MIP6-Agent-Info"};
713 CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp)
714 struct local_rules_definition rules[] =
715 {
716 { { .avp_vendor = 0, .avp_name = "MIP-Home-Agent-Address"}, RULE_OPTIONAL, -1, 2 },
717 { { .avp_vendor = 0, .avp_name = "MIP-Home-Agent-Host"}, RULE_OPTIONAL, -1, -1 },
718 { { .avp_vendor = 0, .avp_name = "MIP6-Home-Link-Prefix"}, RULE_OPTIONAL, -1, -1 }
719 };
720 PARSE_loc_rules( rules, avp );
721 }
722 /* WLAN-Identifier */
723 {
724 /* Grouped */
725 struct dict_object * avp;
726 struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 10415, .avp_name = "WLAN-Identifier"};
727 CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp)
728 struct local_rules_definition rules[] =
729 {
730 { { .avp_vendor = 10415, .avp_name = "SSID"}, RULE_OPTIONAL, -1, -1 },
731 { { .avp_vendor = 10415, .avp_name = "HESSID"}, RULE_OPTIONAL, -1, -1 }
732 };
733 PARSE_loc_rules( rules, avp );
734 }
735 /* TWAN-Connectivity-Parameters */
736 {
737 /* Grouped */
738 struct dict_object * avp;
739 struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 10415, .avp_name = "TWAN-Connectivity-Parameters"};
740 CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp)
741 struct local_rules_definition rules[] =
742 {
743 { { .avp_vendor = 10415, .avp_name = "Connectivity-Flags"}, RULE_OPTIONAL, -1, -1 },
744 { { .avp_vendor = 10415, .avp_name = "Service-Selection"}, RULE_OPTIONAL, -1, -1 },
745 { { .avp_vendor = 10415, .avp_name = "PDN-Type"}, RULE_OPTIONAL, -1, -1 },
746 { { .avp_vendor = 10415, .avp_name = "Served-Party-IP-Address"}, RULE_OPTIONAL, -1, 2 },
747 { { .avp_vendor = 10415, .avp_name = "TWAN-PCO"}, RULE_OPTIONAL, -1, -1 },
748 { { .avp_vendor = 10415, .avp_name = "TWAG-UP-Address"}, RULE_OPTIONAL, -1, -1 },
749 { { .avp_vendor = 10415, .avp_name = "TWAN-S2a-Failure-Cause"}, RULE_OPTIONAL, -1, -1 },
750 { { .avp_vendor = 10415, .avp_name = "SM-Back-Off-Timer"}, RULE_OPTIONAL, -1, -1 }
751 };
752 PARSE_loc_rules( rules, avp );
753 }
754 /* TWAN-Access-Info */
755 {
756 /* Grouped */
757 struct dict_object * avp;
758 struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 10415, .avp_name = "TWAN-Access-Info"};
759 CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp)
760 struct local_rules_definition rules[] =
761 {
762 { { .avp_vendor = 10415, .avp_name = "Access-Authorization-Flags"}, RULE_OPTIONAL, -1, -1 },
763 { { .avp_vendor = 10415, .avp_name = "WLAN-Identifier"}, RULE_OPTIONAL, -1, -1 }
764 };
765 PARSE_loc_rules( rules, avp );
766 }
767 /* Trace-Info */
768 {
769 /* Grouped */
770 struct dict_object * avp;
771 struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 10415, .avp_name = "Trace-Info"};
772 CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp)
773 struct local_rules_definition rules[] =
774 {
775 { { .avp_vendor = 10415, .avp_name = "Trace-Data"}, RULE_OPTIONAL, -1, -1 },
776 { { .avp_vendor = 10415, .avp_name = "Trace-Reference"}, RULE_OPTIONAL, -1, -1 }
777 };
778 PARSE_loc_rules( rules, avp );
779 }
780 /* Non-3GPP-User-Data */
781 {
782 /* Grouped */
783 struct dict_object * avp;
784 struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 10415, .avp_name = "Non-3GPP-User-Data"};
785 CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp)
786 struct local_rules_definition rules[] =
787 {
788 { { .avp_vendor = 0, .avp_name = "Subscription-Id"}, RULE_OPTIONAL, -1, -1 },
789 { { .avp_vendor = 10415, .avp_name = "Non-3GPP-IP-Access"}, RULE_OPTIONAL, -1, -1 },
790 { { .avp_vendor = 10415, .avp_name = "Non-3GPP-IP-Access-APN"}, RULE_OPTIONAL, -1, -1 },
791 { { .avp_vendor = 10415, .avp_name = "RAT-Type"}, RULE_OPTIONAL, -1, -1 },
792 { { .avp_vendor = 0, .avp_name = "Session-Timeout"}, RULE_OPTIONAL, -1, -1 },
793 { { .avp_vendor = 10415, .avp_name = "MIP6-Feature-Vector"}, RULE_OPTIONAL, -1, -1 },
794 { { .avp_vendor = 10415, .avp_name = "AMBR"}, RULE_OPTIONAL, -1, -1 },
795 { { .avp_vendor = 10415, .avp_name = "3GPP-Charging-Characteristics"}, RULE_OPTIONAL, -1, -1 },
796 { { .avp_vendor = 10415, .avp_name = "Context-Identifier"}, RULE_OPTIONAL, -1, -1 },
797 { { .avp_vendor = 10415, .avp_name = "APN-OI-Replacement"}, RULE_OPTIONAL, -1, -1 },
798 { { .avp_vendor = 10415, .avp_name = "APN-Configuration"}, RULE_OPTIONAL, -1, -1 },
799 { { .avp_vendor = 10415, .avp_name = "Trace-Info"}, RULE_OPTIONAL, -1, -1 },
800 { { .avp_vendor = 10415, .avp_name = "TWAN-Default-APN-Context-Id"}, RULE_OPTIONAL, -1, -1 },
801 { { .avp_vendor = 10415, .avp_name = "TWAN-Access-Info"}, RULE_OPTIONAL, -1, -1 },
802 { { .avp_vendor = 10415, .avp_name = "Emergency-Info"}, RULE_OPTIONAL, -1, -1 },
803 { { .avp_vendor = 10415, .avp_name = "ERP-Authorization"}, RULE_OPTIONAL, -1, -1 }
804 };
805 PARSE_loc_rules( rules, avp );
806 }
807
808 }
809
810 /* Commands section */
811 {
812
813 }
814
815 LOG_D( "Extension 'Dictionary definitions for ts29273_avps (e20)' initialized");
816 return 0;
817}
818
819int dict_entry(char * conffile)
820{
821 dict_ts29273_avps_load_defs(conffile);
822 return dict_ts29273_avps_load_rules(conffile);
823}
824
825const char* dict_ts29273_avps_proto_ver(char * conffile) {
826 return ts29273_avps_proto_ver;
827}
828
829const double dict_ts29273_avps_gen_ts(char * conffile) {
830 return ts29273_avps_gen_date;
831}
832
833EXTENSION_ENTRY2("dict_ts29273_avps", dict_ts29273_avps_load_defs, dict_ts29273_avps_load_rules, "dict_ts32299_avps", "dict_ts29272_avps", "dict_ts29212_avps", "dict_ts29229_avps", "dict_rfc5778_avps", "dict_ts29061_avps", "dict_rfc4006bis_avps", "dict_rfc6942_avps", "dict_rfc7155_avps", "dict_rfc4072_avps", "dict_rfc5447_avps", "dict_rfc7683_avps", "dict_rfc6734_avps", "dict_rfc4004_avps", "dict_rfc5580_avps", "dict_rfc5777_avps", "dict_draftload_avps", "dict_etsi283034_avps", "dict_rfc7944_avps");
834
835
836