1 /*********************************************************************************************************
2 * Software License Agreement (BSD License)                                                               *
3 * Author: Francois Bard <francois@tera.ics.keio.ac.jp>							 *
4 *													 *
5 * Copyright (c) 2010, Teraoka Laboratory, Keio University						 *
6 * All rights reserved.											 *
7 * 													 *
8 * Redistribution and use of this software in source and binary forms, with or without modification, are  *
9 * permitted provided that the following conditions are met:						 *
10 * 													 *
11 * * Redistributions of source code must retain the above 						 *
12 *   copyright notice, this list of conditions and the 							 *
13 *   following disclaimer.										 *
14 *    													 *
15 * * Redistributions in binary form must reproduce the above 						 *
16 *   copyright notice, this list of conditions and the 							 *
17 *   following disclaimer in the documentation and/or other						 *
18 *   materials provided with the distribution.								 *
19 * 													 *
20 * * Neither the name of the Teraoka Laboratory nor the 							 *
21 *   names of its contributors may be used to endorse or 						 *
22 *   promote products derived from this software without 						 *
23 *   specific prior written permission of Teraoka Laboratory 						 *
24 *   													 *
25 * 													 *
26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED *
27 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
28 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR *
29 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 	 *
30 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 	 *
31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR *
32 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF   *
33 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.								 *
34 *********************************************************************************************************/
35 
36 /*
37 
38 The following table complete the one in RFC 5777. The AVPs are implemented in the order of the table.
39 We try to keep the structure of the grouped AVP by declaring the contained AVPs just before the grouped AVP they depend on.
40 The number of '+' indicates the depth of the contained AVP.
41 
42 DEPTH	NAME					AVP	RFC	TYPE			NOTES
43 
44 ++	Vendor-Id				266	3588	Unsigned32
45 ++	QoS-Profile-Id				573	5777	Unsigned32
46 +	QoS-Profile-Template			574	5777	Grouped
47 	QoS-Capability				578	5777	Grouped
48 +++	QoS-Parameters				576	5777	Grouped			no specific AVPs? see RFC 5624
49 +++	QoS-Profile-Template			--------------------------------
50 +++	Treatment-Action			572	5777	Enumerated		Type is Enumerated. See Errata 2334 for RFC5777
51 ++	Excess-Treatment			577	5777	Grouped
52 ++	QoS-Parameters				--------------------------------
53 ++	QoS-Profile-Template			--------------------------------
54 ++	QoS-Semantics				575	5777	Enumerated
55 ++	Treatment-Action			--------------------------------
56 +++	Timezone-Offset				571	5777	Integer32
57 +++	Timezone-Flag				570	5777	Enumerated
58 +++	Absolute-End-Fractional-Seconds		569	5777	Unsigned32
59 +++	Absolute-End-Time			568	5777	Time
60 +++	Absolute-Start-Fractional-Seconds	567	5777	Unsigned32
61 +++	Absolute-Start-Time			566	5777	Time
62 +++	Month-Of-Year-Mask			565	5777	Unsigned32
63 +++	Day-Of-Month-Mask			564	5777	Unsigned32
64 +++	Day-Of-Week-Mask			563	5777	Unsigned32
65 +++	Time-Of-Day-End				562	5777	Unsigned32
66 +++	Time-Of-Day-Start			561	5777	Unsigned32
67 ++	Time-Of-Day-Condition			560	5777	Grouped			Some AVPs were omitted. See Errata 2333 for RFC5777
68 +++++	High-User-Priority			559	5777	Unsigned32
69 +++++	Low-User-Priority			558	5777	Unsigned32
70 ++++	User-Priority-Range			557	5777	Grouped
71 +++++	S-VID-Start				553	5777	Unsigned32
72 +++++	S-VID-End				554	5777	Unsigned32
73 +++++	C-VID-Start				555	5777	Unsigned32
74 +++++	C-VID-End				556	5777	Unsigned32
75 ++++	VLAN-ID-Range				552	5777	Grouped
76 +++++	ETH-SAP					551	5777	OctetString
77 +++++	ETH-Ether-Type				550	5777	OctetString
78 ++++	ETH-Proto-Type				549	5777	Grouped
79 +++	ETH-Option				548	5777	Grouped
80 ++++	Negated					517	5777	Enumerated
81 ++++	ICMP-Code				547	5777	Integer32		Changed from Enumerated for implementation reason. See AVP for details.
82 ++++	ICMP-Type-Number			546	5777	Enumerated
83 +++	ICMP-Type				545	5777	Grouped
84 ++++	Negated					--------------------------------
85 ++++	TCP-Flag-Type				544	5777	Unsigned32
86 +++	TCP-Flags				543	5777	Grouped
87 ++++	TCP-Option-Type				541	5777	Enumerated
88 ++++	TCP-Option-Value			542	5777	OctetString
89 ++++	Negated					--------------------------------
90 +++	TCP-Option				540	5777	Grouped
91 ++++	IP-Option-Type				538	5777	Enumerated
92 ++++	IP-Option-Value				539	5777	OctetString
93 ++++	Negated					--------------------------------
94 +++	IP-Option				537	5777	Grouped
95 +++	Fragmentation-Flag			536	5777	Enumerated
96 +++	Diffserv-Code-Point			535	5777	Enumerated
97 ++++	IP-Address				518	5777	Address
98 +++++	IP-Address-Start			520	5777	Address
99 +++++	IP-Address-End				521	5777	Address
100 ++++	IP-Address-Range			519	5777	Grouped
101 +++++	IP-Address				--------------------------------
102 +++++	IP-Mask-Bit-Mask-Width			523	5777	Unsigned32		Name is IP-Mask-Bit-Mask-Width. See Errata 2335 for RFC5777
103 ++++	IP-Address-Mask				522	5777	Grouped
104 ++++	MAC-Address				524	5777	OctetString
105 +++++	MAC-Address				--------------------------------
106 +++++	MAC-Address-Mask-Pattern		526	5777	OctetString
107 ++++	MAC-Address-Mask			525	5777	Grouped
108 ++++	EUI64-Address				527	5777	OctetString
109 +++++	EUI64-Address				--------------------------------
110 +++++	EUI64-Address-Mask-Pattern		529	5777	OctetString
111 ++++	EUI64-Address-Mask			528	5777	Grouped
112 ++++	Port					530	5777	Integer32
113 +++++	Port-Start				532	5777	Integer32
114 +++++	Port-End				533	5777	Integer32
115 ++++	Port-Range				531	5777	Grouped
116 ++++	Negated					--------------------------------
117 ++++	Use-Assigned-Address			534	5777	Enumerated
118 +++	From-Spec				515	5777	Grouped
119 ++++	------------------------------------------------------------------------
120 ++++	-----------------same dependencies as From-Spec-------------------------
121 ++++	------------------------------------------------------------------------
122 +++	To-Spec					516	5777	Grouped
123 +++	Direction				514	5777	Enumerated
124 +++	Protocol				513	5777	Enumerated
125 +++	Classifier-ID				512	5777	OctetString
126 ++	Classifier				511	5777	Grouped
127 ++	Filter-Rule-Precedence			510	5777	Unsigned32
128 +	Filter-Rule				509	5777	Grouped			careful if we have to change vendor specifics or such.
129 	QoS-Resources				508	5777	Grouped
130 
131 */
132 
133 
134 
135 
136 
137 /****************************************************************************************************************************************
138 *																	*
139 * This table contains the Enumerated AVPs whose values are managed by the IANA.								*
140 *																	*
141 * Note : The ICMP-Code AVP (AVP Code 547) has been changed to type Integer32. See AVP for details					*
142 *                                                                                                       				*
143 * AVP	NAME			LAST UPDATED	LAST CHECKED	SOURCE                                                  		*
144 * 546	ICMP-Type-Number	2010-04-22	2010-07-02	http://www.iana.org/assignments/icmp-parameters         		*
145 * 541	TCP-Option-Type		2010-06-22	2010-07-02	http://www.iana.org/assignments/tcp-parameters/tcp-parameters.txt	*
146 * 538	IP-Option-Type		2007-02-15	2010-07-02	http://www.iana.org/assignments/ip-parameters				*
147 * 535	Diffserv-Code-Point	2010-05-11	2010-07-02	http://www.iana.org/assignments/dscp-registry/dscp-registry.txt		*
148 * 513   Protocol                2004-01-26      2010-07-02	http://www.iana.org/assignments/ips-protocols                           *
149 *																	*
150 ****************************************************************************************************************************************/
151 
152 
153 /*
154 
155 NOTES
156 
157 Sections 10.2 and 10.3 of the RFC5777 have been ignored
158 
159 */
160 
161 
162 #include <freeDiameter/extension.h>
163 
164 /* The content of this file follows the same structure as dict_base_proto.c */
165 
166 #define CHECK_dict_new( _type, _data, _parent, _ref )	\
167 	CHECK_FCT(  fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref))  );
168 
169 #define CHECK_dict_search( _type, _criteria, _what, _result )	\
170 	CHECK_FCT(  fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) );
171 
172 struct local_rules_definition {
173 	char 			*avp_name;
174 	enum rule_position	position;
175 	int 			min;
176 	int			max;
177 };
178 
179 #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 )
180 
181 #define PARSE_loc_rules( _rulearray, _parent) {								\
182 	int __ar;											\
183 	for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) {			\
184 		struct dict_rule_data __data = { NULL, 							\
185 			(_rulearray)[__ar].position,							\
186 			0, 										\
187 			(_rulearray)[__ar].min,								\
188 			(_rulearray)[__ar].max};							\
189 		__data.rule_order = RULE_ORDER(__data.rule_position);					\
190 		CHECK_FCT(  fd_dict_search( 								\
191 			fd_g_config->cnf_dict,								\
192 			DICT_AVP, 									\
193 			AVP_BY_NAME, 									\
194 			(_rulearray)[__ar].avp_name, 							\
195 			&__data.rule_avp, 0 ) );							\
196 		if ( !__data.rule_avp ) {								\
197 			TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_name );		\
198 			return ENOENT;									\
199 		}											\
200 		CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL),	\
201 			{							        		\
202 				TRACE_DEBUG(INFO, "Error on rule with AVP '%s'",      			\
203 					 (_rulearray)[__ar].avp_name );		      			\
204 				return EINVAL;					      			\
205 			} );							      			\
206 	}									      			\
207 }
208 
209 #define enumval_def_u32( _val_, _str_ ) \
210 		{ _str_, 		{ .u32 = _val_ }}
211 
212 #define enumval_def_os( _len_, _val_, _str_ ) \
213 		{ _str_, 		{ .os = { .data = (unsigned char *)_val_, .len = _len_ }}}
214 
215 
216 
217 
218 /* Defines if there are any */
219 
220 // No result-Code or values to define in RFC5777, we proceed
221 
222 /* Dictionary */
223 
dict_rfc5777_init(char * conffile)224 int dict_rfc5777_init(char * conffile)
225 {
226 	struct dict_object * rfc5777;
227 	{
228 		struct dict_application_data data = { 5777, "Traffic Classification and Quality of Service (QoS) Attributes for Diameter (RFC 5777)" };
229 		CHECK_dict_new( DICT_APPLICATION, &data , NULL, &rfc5777);
230 	}
231 
232 	/* AVP section */
233 	{
234 		/* Loading the derived data formats */
235 
236 		struct dict_object * Address_type;
237 		struct dict_object * Time_type;
238 
239 		CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Address", &Address_type);
240 		CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Time", &Time_type);
241 
242 		/* Vendor_Id - RFC 3588 */
243 
244 			/*
245 			Implemented in the base protocol
246 			*/
247 
248 		/* QoS-Profile-Id - RFC 5777 */
249 		{
250 			/*
251 
252 			*/
253 
254 			struct dict_avp_data data = {
255 					573, 					/* Code */
256 					0, 					/* Vendor */
257 					"QoS-Profile-Id", 			/* Name */
258 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
259 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
260 					AVP_TYPE_UNSIGNED32			/* base type of data */
261 					};
262 
263 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
264 		}
265 
266 		/* QoS-Profile-Template - RFC 5777 */
267 		{
268 			/*
269 
270 			*/
271 			struct dict_object * avp;
272 			struct dict_avp_data data = {
273 					574, 					/* Code */
274 					0, 					/* Vendor */
275 					"QoS-Profile-Template",			/* Name */
276 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
277 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
278 					AVP_TYPE_GROUPED 			/* base type of data */
279 					};
280 
281 			struct local_rules_definition rules[] =
282 						{ 	 {  "Vendor-Id",	RULE_REQUIRED,	-1, 1 }
283 							,{  "QoS-Profile-Id",	RULE_REQUIRED,	-1, 1 }
284 						};
285 
286 			CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
287 			PARSE_loc_rules( rules, avp );
288 		}
289 
290 		/* QoS-Capability - RFC 5777 */
291 		{
292 			/*
293 
294 			*/
295 			struct dict_object * avp;
296 			struct dict_avp_data data = {
297 					578, 					/* Code */
298 					0, 					/* Vendor */
299 					"QoS-Capability",			/* Name */
300 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
301 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
302 					AVP_TYPE_GROUPED 			/* base type of data */
303 					};
304 
305 			struct local_rules_definition rules[] =
306 						{ 	 {  "QoS-Profile-Template", RULE_REQUIRED, -1, -1 }
307 						};
308 
309 			CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
310 			PARSE_loc_rules( rules, avp );
311 		}
312 
313 		/* QoS-Parameters - RFC 5777 */
314 		{
315 			/*
316 
317 			*/
318 			struct dict_object * avp;
319 			struct dict_avp_data data = {
320 					576, 					/* Code */
321 					0, 					/* Vendor */
322 					"QoS-Parameters",			/* Name */
323 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
324 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
325 					AVP_TYPE_GROUPED 			/* base type of data */
326 					};
327 
328 			struct local_rules_definition rules[] =
329 						{		//empty??
330 						};
331 
332 			CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
333 			PARSE_loc_rules( rules, avp );
334 		}
335 
336 		/* QoS-Profile-Template - RFC 5777 */
337 
338 			/*
339 			Implemented higher
340 			*/
341 
342 
343 		/* Treatment-Action - RFC 5777 */
344 		{
345 			/*
346 
347 			*/
348 			struct dict_object 	* 	type;
349 			struct dict_type_data	 	tdata = { AVP_TYPE_INTEGER32,	"Enumerated(Treatment-Action)"	, NULL, NULL, NULL };
350 			struct dict_enumval_data 	t_0 = { "drop",		{ .i32 = 0 }};
351 			struct dict_enumval_data 	t_1 = { "shape", 	{ .i32 = 1 }};
352 			struct dict_enumval_data 	t_2 = { "mark",		{ .i32 = 2 }};
353 			struct dict_enumval_data 	t_3 = { "permit", 	{ .i32 = 3 }};
354 
355 			struct dict_avp_data 	data = {
356 					572, 					/* Code */
357 					0, 					/* Vendor */
358 					"Treatment-Action",			/* Name */
359 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
360 					AVP_FLAG_MANDATORY,			/* Fixed flag values */
361 					AVP_TYPE_INTEGER32 			/* base type of data */
362 					};
363 			/* Create the Enumerated type, and then the AVP */
364 			CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
365 			CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL);
366 			CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL);
367 			CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL);
368 			CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL);
369 			CHECK_dict_new( DICT_AVP, &data , type, NULL);
370 		}
371 
372 
373 		/* Excess-Treatment - RFC 5777 */
374 		{
375 			/*
376 
377 			*/
378 			struct dict_object * avp;
379 			struct dict_avp_data data = {
380 					577, 					/* Code */
381 					0, 					/* Vendor */
382 					"Excess-Treatment",			/* Name */
383 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
384 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
385 					AVP_TYPE_GROUPED 			/* base type of data */
386 					};
387 
388 			struct local_rules_definition rules[] =
389 						{ 	 {  "Treatment-Action",		RULE_REQUIRED, -1, 1 }
390 							,{  "QoS-Profile-Template",	RULE_OPTIONAL, -1, 1 }
391 							,{  "QoS-Parameters",		RULE_OPTIONAL, -1, 1 }
392 						};
393 
394 			CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
395 			PARSE_loc_rules( rules, avp );
396 		}
397 
398 		/* QoS-Parameters - RFC 5777 */
399 
400 			/*
401 			Implemented higher
402 			*/
403 
404 		/* QoS-Profile-Template - RFC 5777 */
405 
406 			/*
407 			Implemented higher
408 			*/
409 
410 		/* QoS-Semantics - RFC 5777 */
411 		{
412 			/*
413 
414 			*/
415 			struct dict_object 	* 	type;
416 			struct dict_type_data	 	tdata = { AVP_TYPE_INTEGER32,	"Enumerated(QoS-Semantics)"	, NULL, NULL, NULL };
417 			struct dict_enumval_data 	t_0 = { "QoS-Desired",		{ .i32 = 0 }};
418 			struct dict_enumval_data 	t_1 = { "QoS-Available", 	{ .i32 = 1 }};
419 			struct dict_enumval_data 	t_2 = { "QoS-Delivered",	{ .i32 = 2 }};
420 			struct dict_enumval_data 	t_3 = { "Minimum-QoS", 		{ .i32 = 3 }};
421 			struct dict_enumval_data 	t_4 = { "QoS-Authorized", 	{ .i32 = 4 }};
422 
423 			struct dict_avp_data 	data = {
424 					575, 					/* Code */
425 					0, 					/* Vendor */
426 					"QoS-Semantics",			/* Name */
427 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
428 					AVP_FLAG_MANDATORY,			/* Fixed flag values */
429 					AVP_TYPE_INTEGER32 			/* base type of data */
430 					};
431 			/* Create the Enumerated type, and then the AVP */
432 			CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
433 			CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL);
434 			CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL);
435 			CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL);
436 			CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL);
437 			CHECK_dict_new( DICT_ENUMVAL, &t_4 , type, NULL);
438 			CHECK_dict_new( DICT_AVP, &data , type, NULL);
439 		}
440 
441 
442 
443 		/* Treatment-Action - RFC 5777 */
444 
445 			/*
446 			Implemented higher
447 			*/
448 
449 		/* Timezone-Offset - RFC 5777 */
450 		{
451 			/*
452 
453 			*/
454 
455 			struct dict_avp_data data = {
456 					571, 					/* Code */
457 					0, 					/* Vendor */
458 					"Timezone-Offset", 			/* Name */
459 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
460 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
461 					AVP_TYPE_INTEGER32			/* base type of data */
462 					};
463 
464 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
465 		}
466 
467 		/* Timezone-Flag - RFC 5777 */
468 		{
469 			/*
470 
471 			*/
472 			struct dict_object 	* 	type;
473 			struct dict_type_data	 	tdata = { AVP_TYPE_INTEGER32,	"Enumerated(Timezone-Flag)"	, NULL, NULL, NULL };
474 			struct dict_enumval_data 	t_0 = { "UTC",		{ .i32 = 0 }};
475 			struct dict_enumval_data 	t_1 = { "LOCAL", 	{ .i32 = 1 }};
476 			struct dict_enumval_data 	t_2 = { "OFFSET",	{ .i32 = 2 }};
477 
478 			struct dict_avp_data 	data = {
479 					570, 					/* Code */
480 					0, 					/* Vendor */
481 					"Timezone-Flag",			/* Name */
482 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
483 					AVP_FLAG_MANDATORY,			/* Fixed flag values */
484 					AVP_TYPE_INTEGER32 			/* base type of data */
485 					};
486 			/* Create the Enumerated type, and then the AVP */
487 			CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
488 			CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL);
489 			CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL);
490 			CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL);
491 			CHECK_dict_new( DICT_AVP, &data , type, NULL);
492 		}
493 
494 
495 		/* Absolute-End-Fractional-Seconds - RFC 5777 */
496 		{
497 			/*
498 
499 			*/
500 
501 			struct dict_avp_data data = {
502 					569, 					/* Code */
503 					0, 					/* Vendor */
504 					"Absolute-End-Fractional-Seconds", 	/* Name */
505 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
506 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
507 					AVP_TYPE_UNSIGNED32			/* base type of data */
508 					};
509 
510 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
511 		}
512 
513 		/* Absolute-End-Time - RFC 5777 */
514 		{
515 			/*
516 
517 			*/
518 			struct dict_avp_data data = {
519 					568, 					/* Code */
520 					0, 					/* Vendor */
521 					"Absolute-End-Time", 			/* Name */
522 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
523 					AVP_FLAG_MANDATORY,			/* Fixed flag values */
524 					AVP_TYPE_OCTETSTRING 			/* base type of data */
525 					};
526 			CHECK_dict_new( DICT_AVP, &data , Time_type, NULL);
527 		}
528 
529 		/* Absolute-Start-Fractional-Seconds - RFC 5777 */
530 		{
531 			/*
532 
533 			*/
534 
535 			struct dict_avp_data data = {
536 					567, 					/* Code */
537 					0, 					/* Vendor */
538 					"Absolute-Start-Fractional-Seconds", 	/* Name */
539 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
540 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
541 					AVP_TYPE_UNSIGNED32			/* base type of data */
542 					};
543 
544 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
545 		}
546 
547 		/* Absolute-Start-Time - RFC 5777 */
548 		{
549 			/*
550 
551 			*/
552 			struct dict_avp_data data = {
553 					566, 					/* Code */
554 					0, 					/* Vendor */
555 					"Absolute-Start-Time", 			/* Name */
556 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
557 					AVP_FLAG_MANDATORY,			/* Fixed flag values */
558 					AVP_TYPE_OCTETSTRING 			/* base type of data */
559 					};
560 			CHECK_dict_new( DICT_AVP, &data , Time_type, NULL);
561 		}
562 
563 		/* Month-Of-Year-Mask - RFC 5777 */
564 		{
565 			/*
566 
567 			*/
568 
569 			struct dict_avp_data data = {
570 					565, 					/* Code */
571 					0, 					/* Vendor */
572 					"Month-Of-Year-Mask", 			/* Name */
573 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
574 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
575 					AVP_TYPE_UNSIGNED32			/* base type of data */
576 					};
577 
578 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
579 		}
580 
581 		/* Day-Of-Month-Mask - RFC 5777 */
582 		{
583 			/*
584 
585 			*/
586 
587 			struct dict_avp_data data = {
588 					564, 					/* Code */
589 					0, 					/* Vendor */
590 					"Day-Of-Month-Mask", 			/* Name */
591 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
592 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
593 					AVP_TYPE_UNSIGNED32			/* base type of data */
594 					};
595 
596 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
597 		}
598 
599 		/* Day-Of-Week-Mask - RFC 5777 */
600 		{
601 			/*
602 
603 			*/
604 
605 			struct dict_avp_data data = {
606 					563, 					/* Code */
607 					0, 					/* Vendor */
608 					"Day-Of-Week-Mask", 			/* Name */
609 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
610 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
611 					AVP_TYPE_UNSIGNED32			/* base type of data */
612 					};
613 
614 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
615 		}
616 
617 		/* Time-Of-Day-End - RFC 5777 */
618 		{
619 			/*
620 
621 			*/
622 
623 			struct dict_avp_data data = {
624 					562, 					/* Code */
625 					0, 					/* Vendor */
626 					"Time-Of-Day-End", 			/* Name */
627 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
628 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
629 					AVP_TYPE_UNSIGNED32			/* base type of data */
630 					};
631 
632 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
633 		}
634 
635 		/* Time-Of-Day-Start - RFC 5777 */
636 		{
637 			/*
638 
639 			*/
640 
641 			struct dict_avp_data data = {
642 					561, 					/* Code */
643 					0, 					/* Vendor */
644 					"Time-Of-Day-Start", 			/* Name */
645 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
646 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
647 					AVP_TYPE_UNSIGNED32			/* base type of data */
648 					};
649 
650 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
651 		}
652 
653 		/* Time-Of-Day-Condition - RFC 5777 */
654 		{
655 			/*
656 
657 			*/
658 			struct dict_object * avp;
659 			struct dict_avp_data data = {
660 					560, 					/* Code */
661 					0, 					/* Vendor */
662 					"Time-Of-Day-Condition", 		/* Name */
663 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
664 					AVP_FLAG_MANDATORY,			/* Fixed flag values */
665 					AVP_TYPE_GROUPED 			/* base type of data */
666 					};
667 			struct local_rules_definition rules[] =
668 						{ 	 {  "Time-Of-Day-Start", 	RULE_OPTIONAL, -1, 1 }
669 							,{  "Time-Of-Day-End",		RULE_OPTIONAL, -1, 1 }
670 							,{  "Day-Of-Week-Mask",		RULE_OPTIONAL, -1, 1 }
671 							,{  "Day-Of-Month-Mask",	RULE_OPTIONAL, -1, 1 }
672 							,{  "Month-Of-Year-Mask",	RULE_OPTIONAL, -1, 1 }
673 							,{  "Absolute-Start-Time",	RULE_OPTIONAL, -1, 1 }
674 							,{  "Absolute-End-Time",	RULE_OPTIONAL, -1, 1 }
675 							,{  "Timezone-Flag",		RULE_OPTIONAL, -1, 1 }
676 						};
677 
678 			CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
679 			PARSE_loc_rules( rules, avp );
680 		}
681 
682 		/* High-User-Priority - RFC 5777*/
683 		{
684 			/*
685 
686 			*/
687 
688 			struct dict_avp_data data = {
689 					559, 					/* Code */
690 					0, 					/* Vendor */
691 					"High-User-Priority", 			/* Name */
692 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
693 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
694 					AVP_TYPE_UNSIGNED32			/* base type of data */
695 					};
696 
697 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
698 		}
699 
700 		/* Low-User-Priority - RFC 5777 */
701 		{
702 			/*
703 
704 			*/
705 
706 			struct dict_avp_data data = {
707 					558, 					/* Code */
708 					0, 					/* Vendor */
709 					"Low-User-Priority", 			/* Name */
710 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
711 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
712 					AVP_TYPE_UNSIGNED32			/* base type of data */
713 					};
714 
715 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
716 		}
717 
718 		/* User-Priority-Range - RFC 5777 */
719 		{
720 			/*
721 
722 			*/
723 			struct dict_object * avp;
724 			struct dict_avp_data data = {
725 					557, 					/* Code */
726 					0, 					/* Vendor */
727 					"User-Priority-Range", 			/* Name */
728 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
729 					AVP_FLAG_MANDATORY,			/* Fixed flag values */
730 					AVP_TYPE_GROUPED 			/* base type of data */
731 					};
732 			struct local_rules_definition rules[] =
733 						{ 	 {  "Low-User-Priority", 	RULE_OPTIONAL, -1, -1 }
734 							,{  "High-User-Priority",	RULE_OPTIONAL, -1, -1 }
735 						};
736 
737 			CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
738 			PARSE_loc_rules( rules, avp );
739 		}
740 		/* S-VID-Start - RFC 5777 */
741 		{
742 			/*
743 
744 			*/
745 
746 			struct dict_avp_data data = {
747 					553, 					/* Code */
748 					0, 					/* Vendor */
749 					"S-VID-Start", 				/* Name */
750 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
751 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
752 					AVP_TYPE_UNSIGNED32			/* base type of data */
753 					};
754 
755 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
756 		}
757 
758 		/* S-VID-End - RFC 5777 */
759 		{
760 			/*
761 
762 			*/
763 
764 			struct dict_avp_data data = {
765 					554, 					/* Code */
766 					0, 					/* Vendor */
767 					"S-VID-End", 				/* Name */
768 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
769 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
770 					AVP_TYPE_UNSIGNED32			/* base type of data */
771 					};
772 
773 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
774 		}
775 
776 		/* C-VID-Start - RFC 5777 */
777 		{
778 			/*
779 
780 			*/
781 
782 			struct dict_avp_data data = {
783 					555, 					/* Code */
784 					0, 					/* Vendor */
785 					"C-VID-Start",	 			/* Name */
786 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
787 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
788 					AVP_TYPE_UNSIGNED32			/* base type of data */
789 					};
790 
791 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
792 		}
793 
794 		/* C-VID-End - RFC 5777 */
795 		{
796 			/*
797 
798 			*/
799 
800 			struct dict_avp_data data = {
801 					556, 					/* Code */
802 					0, 					/* Vendor */
803 					"C-VID-End",	 			/* Name */
804 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
805 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
806 					AVP_TYPE_UNSIGNED32			/* base type of data */
807 					};
808 
809 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
810 		}
811 
812 		/* VLAN-ID-Range - RFC 5777 */
813 		{
814 			/*
815 
816 			*/
817 			struct dict_object * avp;
818 			struct dict_avp_data data = {
819 					552, 					/* Code */
820 					0, 					/* Vendor */
821 					"VLAN-ID-Range",			/* Name */
822 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
823 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
824 					AVP_TYPE_GROUPED 			/* base type of data */
825 					};
826 
827 			struct local_rules_definition rules[] =
828 						{ 	 {  "S-VID-Start",	RULE_OPTIONAL, -1, 1 }
829 							,{  "S-VID-End",	RULE_OPTIONAL, -1, 1 }
830 							,{  "C-VID-Start",	RULE_OPTIONAL, -1, 1 }
831 							,{  "C-VID-End",	RULE_OPTIONAL, -1, 1 }
832 						};
833 
834 			CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
835 			PARSE_loc_rules( rules, avp );
836 		}
837 
838 		/* ETH-SAP - RFC 5777 */
839 		{
840 			/*
841 
842 			*/
843 
844 			struct dict_avp_data data = {
845 					551, 					/* Code */
846 					0, 					/* Vendor */
847 					"ETH-SAP",				/* Name */
848 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
849 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
850 					AVP_TYPE_OCTETSTRING			/* base type of data */
851 					};
852 
853 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
854 		}
855 
856 		/* ETH-Ether-Type - RFC 5777 */
857 		{
858 			/*
859 
860 			*/
861 
862 			struct dict_avp_data data = {
863 					550, 					/* Code */
864 					0, 					/* Vendor */
865 					"ETH-Ether-Type",			/* Name */
866 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
867 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
868 					AVP_TYPE_OCTETSTRING			/* base type of data */
869 					};
870 
871 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
872 		}
873 
874 		/* ETH-Proto-Type - RFC 5777 */
875 		{
876 			/*
877 
878 			*/
879 			struct dict_object * avp;
880 			struct dict_avp_data data = {
881 					549, 					/* Code */
882 					0, 					/* Vendor */
883 					"ETH-Proto-Type",			/* Name */
884 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
885 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
886 					AVP_TYPE_GROUPED 			/* base type of data */
887 					};
888 
889 			struct local_rules_definition rules[] =
890 						{ 	 {  "ETH-Ether-Type",	RULE_OPTIONAL, -1, -1 }
891 							,{  "ETH-SAP",		RULE_OPTIONAL, -1, -1 }
892 						};
893 
894 			CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
895 			PARSE_loc_rules( rules, avp );
896 		}
897 
898 		/* ETH-Option - RFC 5777 */
899 		{
900 			/*
901 
902 			*/
903 			struct dict_object * avp;
904 			struct dict_avp_data data = {
905 					548, 					/* Code */
906 					0, 					/* Vendor */
907 					"ETH-Option",				/* Name */
908 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
909 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
910 					AVP_TYPE_GROUPED 			/* base type of data */
911 					};
912 
913 			struct local_rules_definition rules[] =
914 						{ 	 {  "ETH-Proto-Type",		RULE_REQUIRED, -1, 1 }
915 							,{  "VLAN-ID-Range",		RULE_OPTIONAL, -1, -1 }
916 							,{  "User-Priority-Range",	RULE_OPTIONAL, -1, 1 }
917 						};
918 
919 			CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
920 			PARSE_loc_rules( rules, avp );
921 		}
922 
923 		/* Negated - RFC 5777 */
924 		{
925 			/*
926 
927 			*/
928 			struct dict_object 	* 	type;
929 			struct dict_type_data	 	tdata = { AVP_TYPE_INTEGER32,	"Enumerated(Negated)"	, NULL, NULL, NULL };
930 			struct dict_enumval_data 	t_0 = { "False",	{ .i32 = 0 }};
931 			struct dict_enumval_data 	t_1 = { "True", 	{ .i32 = 1 }};
932 
933 			struct dict_avp_data 	data = {
934 					517, 					/* Code */
935 					0, 					/* Vendor */
936 					"Negated",				/* Name */
937 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
938 					AVP_FLAG_MANDATORY,			/* Fixed flag values */
939 					AVP_TYPE_INTEGER32 			/* base type of data */
940 					};
941 			/* Create the Enumerated type, and then the AVP */
942 			CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
943 			CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL);
944 			CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL);
945 			CHECK_dict_new( DICT_AVP, &data , type, NULL);
946 		}
947 
948 		/* ICMP-Code - RFC 5777 */
949 		{
950 			/*
951 
952 			Here is what the RFC 5777 says :
953 
954 			The ICMP-Code AVP (AVP Code 547) is of type Enumerated and the values
955 			are managed by IANA under the ICMP Type Numbers registry as defined
956 			in [RFC2780].
957 
958 			The problem is (please refer to http://www.iana.org/assignments/icmp-parameters ) :
959 			Many of the ICMP types (AVP 456, see next AVP) have a "code" field (defined in this AVP).
960 
961 			It means that the enum values defined in the current ICMP-Code AVP are not constants.
962 
963 			We take the liberty of changing the Type of this AVP.
964 
965 			NEW TYPE : Integer32
966 
967 			*/
968 
969 			struct dict_avp_data data = {
970 					547, 					/* Code */
971 					0, 					/* Vendor */
972 					"ICMP-Code", 				/* Name */
973 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
974 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
975 					AVP_TYPE_INTEGER32			/* base type of data */
976 					};
977 
978 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
979 		}
980 
981 		/* ICMP-Type-Number - RFC 5777 */
982 		{
983 			/*
984 
985 			The ICMP-Type-Number AVP (AVP Code 546) is of type Enumerated and the
986 			values are managed by IANA under the ICMP Type Numbers registry as
987 			defined in [RFC2780].
988 
989 			The RFC2780 then redirect us to the IANA.
990 
991 			The Values have been copied from the following page :
992 			http://www.iana.org/assignments/icmp-parameters
993 
994 			Last updated : 2010-04-22
995 
996 			*/
997 			struct dict_object 	* 	type;
998 			struct dict_type_data	 	tdata = { AVP_TYPE_INTEGER32,	"Enumerated(ICMP-Type-Number)"	, NULL, NULL, NULL };
999 			struct dict_enumval_data 	t_0  = { "Echo Reply",			{ .i32 = 0 }};
1000 			struct dict_enumval_data 	t_3  = { "Destination Unreachable", 	{ .i32 = 3 }};
1001 			struct dict_enumval_data 	t_4  = { "Source Quench",		{ .i32 = 4 }};
1002 			struct dict_enumval_data 	t_5  = { "Redirect",			{ .i32 = 5 }};
1003 			struct dict_enumval_data 	t_6  = { "Alternate Host Address",	{ .i32 = 6 }};
1004 			struct dict_enumval_data 	t_8  = { "Echo",			{ .i32 = 8 }};
1005 			struct dict_enumval_data 	t_9  = { "Router Advertisement",	{ .i32 = 9 }};
1006 			struct dict_enumval_data 	t_10 = { "Router Solicitation",		{ .i32 = 10 }};
1007 			struct dict_enumval_data 	t_11 = { "Time Exceeded",		{ .i32 = 11 }};
1008 			struct dict_enumval_data 	t_12 = { "Parameter Problem",		{ .i32 = 12 }};
1009 			struct dict_enumval_data 	t_13 = { "Timestamp",			{ .i32 = 13 }};
1010 			struct dict_enumval_data 	t_14 = { "Timestamp Reply",		{ .i32 = 14 }};
1011 			struct dict_enumval_data 	t_15 = { "Information Request",		{ .i32 = 15 }};
1012 			struct dict_enumval_data 	t_16 = { "Information Reply",		{ .i32 = 16 }};
1013 			struct dict_enumval_data 	t_17 = { "Address Mask Request",	{ .i32 = 17 }};
1014 			struct dict_enumval_data 	t_18 = { "Address Mask Reply",		{ .i32 = 18 }};
1015 			struct dict_enumval_data 	t_30 = { "Traceroute",			{ .i32 = 30 }};
1016 			struct dict_enumval_data 	t_31 = { "Datagram Conversion Error",	{ .i32 = 31 }};
1017 			struct dict_enumval_data 	t_32 = { "Mobile Host Redirect",	{ .i32 = 32 }};
1018 			struct dict_enumval_data 	t_33 = { "IPv6 Where-Are-You",		{ .i32 = 33 }};
1019 			struct dict_enumval_data 	t_34 = { "IPv6 I-Am-Here",		{ .i32 = 34 }};
1020 			struct dict_enumval_data 	t_35 = { "Mobile Registration Request",	{ .i32 = 35 }};
1021 			struct dict_enumval_data 	t_36 = { "Mobile Registration Reply  ",	{ .i32 = 36 }};
1022 			struct dict_enumval_data 	t_37 = { "Domain Name Request",		{ .i32 = 37 }};
1023 			struct dict_enumval_data 	t_38 = { "Domain Name Reply",		{ .i32 = 38 }};
1024 			struct dict_enumval_data 	t_39 = { "SKIP",			{ .i32 = 39 }};
1025 			struct dict_enumval_data 	t_40 = { "Photuris",			{ .i32 = 40 }};
1026 			struct dict_enumval_data 	t_41 = { "ICMP messages utilized by experimental mobility protocols such as Seamoby",{ .i32 = 41 }};
1027 
1028 			struct dict_avp_data 	data = {
1029 					546, 					/* Code */
1030 					0, 					/* Vendor */
1031 					"ICMP-Type-Number",			/* Name */
1032 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1033 					AVP_FLAG_MANDATORY,			/* Fixed flag values */
1034 					AVP_TYPE_INTEGER32 			/* base type of data */
1035 					};
1036 			/* Create the Enumerated type, and then the AVP */
1037 			CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
1038 			CHECK_dict_new( DICT_ENUMVAL, &t_0  , type, NULL);
1039 			CHECK_dict_new( DICT_ENUMVAL, &t_3  , type, NULL);
1040 			CHECK_dict_new( DICT_ENUMVAL, &t_4  , type, NULL);
1041 			CHECK_dict_new( DICT_ENUMVAL, &t_5  , type, NULL);
1042 			CHECK_dict_new( DICT_ENUMVAL, &t_6  , type, NULL);
1043 			CHECK_dict_new( DICT_ENUMVAL, &t_8  , type, NULL);
1044 			CHECK_dict_new( DICT_ENUMVAL, &t_9  , type, NULL);
1045 			CHECK_dict_new( DICT_ENUMVAL, &t_10 , type, NULL);
1046 			CHECK_dict_new( DICT_ENUMVAL, &t_11 , type, NULL);
1047 			CHECK_dict_new( DICT_ENUMVAL, &t_12 , type, NULL);
1048 			CHECK_dict_new( DICT_ENUMVAL, &t_13 , type, NULL);
1049 			CHECK_dict_new( DICT_ENUMVAL, &t_14 , type, NULL);
1050 			CHECK_dict_new( DICT_ENUMVAL, &t_15 , type, NULL);
1051 			CHECK_dict_new( DICT_ENUMVAL, &t_16 , type, NULL);
1052 			CHECK_dict_new( DICT_ENUMVAL, &t_17 , type, NULL);
1053 			CHECK_dict_new( DICT_ENUMVAL, &t_18 , type, NULL);
1054 			CHECK_dict_new( DICT_ENUMVAL, &t_30 , type, NULL);
1055 			CHECK_dict_new( DICT_ENUMVAL, &t_31 , type, NULL);
1056 			CHECK_dict_new( DICT_ENUMVAL, &t_32 , type, NULL);
1057 			CHECK_dict_new( DICT_ENUMVAL, &t_33 , type, NULL);
1058 			CHECK_dict_new( DICT_ENUMVAL, &t_34 , type, NULL);
1059 			CHECK_dict_new( DICT_ENUMVAL, &t_35 , type, NULL);
1060 			CHECK_dict_new( DICT_ENUMVAL, &t_36 , type, NULL);
1061 			CHECK_dict_new( DICT_ENUMVAL, &t_37 , type, NULL);
1062 			CHECK_dict_new( DICT_ENUMVAL, &t_38 , type, NULL);
1063 			CHECK_dict_new( DICT_ENUMVAL, &t_39 , type, NULL);
1064 			CHECK_dict_new( DICT_ENUMVAL, &t_40 , type, NULL);
1065 			CHECK_dict_new( DICT_ENUMVAL, &t_41 , type, NULL);
1066 			CHECK_dict_new( DICT_AVP, &data , type, NULL);
1067 		}
1068 
1069 		/* ICMP-Type - RFC 5777 */
1070 		{
1071 			/*
1072 
1073 			*/
1074 			struct dict_object * avp;
1075 			struct dict_avp_data data = {
1076 					545, 					/* Code */
1077 					0, 					/* Vendor */
1078 					"ICMP-Type",				/* Name */
1079 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1080 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1081 					AVP_TYPE_GROUPED 			/* base type of data */
1082 					};
1083 
1084 			struct local_rules_definition rules[] =
1085 						{ 	 {  "ICMP-Type-Number",	RULE_REQUIRED, -1, 1 }
1086 							,{  "ICMP-Code",	RULE_OPTIONAL, -1, -1 }
1087 							,{  "Negated",		RULE_OPTIONAL, -1, 1 }
1088 						};
1089 
1090 			CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
1091 			PARSE_loc_rules( rules, avp );
1092 		}
1093 
1094 		/* Negated - RFC 5777 */
1095 
1096 			/*
1097 			Implemented higher
1098 			*/
1099 
1100 		/* TCP-Flag-Type - RFC 5777 */
1101 		{
1102 			/*
1103 
1104 			*/
1105 
1106 			struct dict_avp_data data = {
1107 					544, 					/* Code */
1108 					0, 					/* Vendor */
1109 					"TCP-Flag-Type",			/* Name */
1110 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1111 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1112 					AVP_TYPE_UNSIGNED32			/* base type of data */
1113 					};
1114 
1115 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
1116 		}
1117 
1118 		/* TCP-Flags - RFC 5777 */
1119 		{
1120 			/*
1121 
1122 			*/
1123 			struct dict_object * avp;
1124 			struct dict_avp_data data = {
1125 					543, 					/* Code */
1126 					0, 					/* Vendor */
1127 					"TCP-Flags",				/* Name */
1128 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1129 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1130 					AVP_TYPE_GROUPED 			/* base type of data */
1131 					};
1132 
1133 			struct local_rules_definition rules[] =
1134 						{ 	 {  "TCP-Flag-Type",	RULE_REQUIRED, -1, 1 }
1135 							,{  "Negated",		RULE_OPTIONAL, -1, 1 }
1136 						};
1137 
1138 			CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
1139 			PARSE_loc_rules( rules, avp );
1140 		}
1141 
1142 		/* TCP-Option-Type - RFC 5777 */
1143 		{
1144 			/*
1145 			The TCP-Option-Type AVP (AVP Code 541) is of type Enumerated and the
1146 			values are managed by IANA under the TCP Option Numbers registry as
1147 			defined in [RFC2780].
1148 
1149 			The RFC2780 then redirect us to the IANA.
1150 
1151 			The Values have been copied from the following page :
1152 			http://www.iana.org/assignments/tcp-parameters/tcp-parameters.txt
1153 
1154 			Last updated : 2010-06-22
1155 
1156 			*/
1157 			struct dict_object 	* 	type;
1158 			struct dict_type_data	 	tdata = { AVP_TYPE_INTEGER32,	"Enumerated(TCP-Option-Type)"	, NULL, NULL, NULL };
1159 			struct dict_enumval_data 	t_0   = { "End of Option List",			{ .i32 = 0  }};
1160 			struct dict_enumval_data 	t_1   = { "No-Operation",			{ .i32 = 1  }};
1161 			struct dict_enumval_data 	t_2   = { "Maximum Segment Size",		{ .i32 = 2  }};
1162 			struct dict_enumval_data 	t_3   = { "WSOPT - Window Scale",		{ .i32 = 3  }};
1163 			struct dict_enumval_data 	t_4   = { "SACK Permitted",			{ .i32 = 4  }};
1164 			struct dict_enumval_data 	t_5   = { "SACK",				{ .i32 = 5  }};
1165 			struct dict_enumval_data 	t_6   = { "Echo",				{ .i32 = 6  }};
1166 			struct dict_enumval_data 	t_7   = { "Echo Reply",				{ .i32 = 7  }};
1167 			struct dict_enumval_data 	t_8   = { "TSOPT - Time Stamp Option",		{ .i32 = 8  }};
1168 			struct dict_enumval_data 	t_9   = { "Partial Order Connection Permitted",	{ .i32 = 9  }};
1169 			struct dict_enumval_data 	t_10  = { "Partial Order Service Profile",	{ .i32 = 10 }};
1170 			struct dict_enumval_data 	t_11  = { "CC",					{ .i32 = 11 }};
1171 			struct dict_enumval_data 	t_12  = { "CC.NEW",				{ .i32 = 12 }};
1172 			struct dict_enumval_data 	t_13  = { "CC.ECHO",				{ .i32 = 13 }};
1173 			struct dict_enumval_data 	t_14  = { "TCP Alternate Checksum Request",	{ .i32 = 14 }};
1174 			struct dict_enumval_data 	t_15  = { "TCP Alternate Checksum Data",	{ .i32 = 15 }};
1175 			struct dict_enumval_data 	t_16  = { "Skeeter",				{ .i32 = 16 }};
1176 			struct dict_enumval_data 	t_17  = { "Bubba",				{ .i32 = 17 }};
1177 			struct dict_enumval_data 	t_18  = { "Trailer Checksum Option",		{ .i32 = 18 }};
1178 			struct dict_enumval_data 	t_19  = { "MD5 Signature Option",		{ .i32 = 19 }};
1179 			struct dict_enumval_data 	t_20  = { "SCPS Capabilities",			{ .i32 = 20 }};
1180 			struct dict_enumval_data 	t_21  = { "Selective Negative Acknowledgements",{ .i32 = 21 }};
1181 			struct dict_enumval_data 	t_22  = { "Record Boundaries",			{ .i32 = 22 }};
1182 			struct dict_enumval_data 	t_23  = { "Corruption experienced",		{ .i32 = 23 }};
1183 			struct dict_enumval_data 	t_24  = { "SNAP",				{ .i32 = 24 }};
1184 			struct dict_enumval_data 	t_26  = { "TCP Compression Filter",		{ .i32 = 26 }};
1185 			struct dict_enumval_data 	t_27  = { "Quick-Start Response",		{ .i32 = 27 }};
1186 			struct dict_enumval_data 	t_28  = { "User Timeout Option",		{ .i32 = 28 }};
1187 			struct dict_enumval_data 	t_29  = { "TCP Authentication Option (TCP-AO)",	{ .i32 = 29 }};
1188 
1189 			struct dict_avp_data 	data = {
1190 					541, 					/* Code */
1191 					0, 					/* Vendor */
1192 					"TCP-Option-Type",			/* Name */
1193 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1194 					AVP_FLAG_MANDATORY,			/* Fixed flag values */
1195 					AVP_TYPE_INTEGER32 			/* base type of data */
1196 					};
1197 			/* Create the Enumerated type, and then the AVP */
1198 			CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
1199 			CHECK_dict_new( DICT_ENUMVAL, &t_0  , type, NULL);
1200 			CHECK_dict_new( DICT_ENUMVAL, &t_1  , type, NULL);
1201 			CHECK_dict_new( DICT_ENUMVAL, &t_2  , type, NULL);
1202 			CHECK_dict_new( DICT_ENUMVAL, &t_3  , type, NULL);
1203 			CHECK_dict_new( DICT_ENUMVAL, &t_4  , type, NULL);
1204 			CHECK_dict_new( DICT_ENUMVAL, &t_5  , type, NULL);
1205 			CHECK_dict_new( DICT_ENUMVAL, &t_6  , type, NULL);
1206 			CHECK_dict_new( DICT_ENUMVAL, &t_7  , type, NULL);
1207 			CHECK_dict_new( DICT_ENUMVAL, &t_8  , type, NULL);
1208 			CHECK_dict_new( DICT_ENUMVAL, &t_9  , type, NULL);
1209 			CHECK_dict_new( DICT_ENUMVAL, &t_10 , type, NULL);
1210 			CHECK_dict_new( DICT_ENUMVAL, &t_11 , type, NULL);
1211 			CHECK_dict_new( DICT_ENUMVAL, &t_12 , type, NULL);
1212 			CHECK_dict_new( DICT_ENUMVAL, &t_13 , type, NULL);
1213 			CHECK_dict_new( DICT_ENUMVAL, &t_14 , type, NULL);
1214 			CHECK_dict_new( DICT_ENUMVAL, &t_15 , type, NULL);
1215 			CHECK_dict_new( DICT_ENUMVAL, &t_16 , type, NULL);
1216 			CHECK_dict_new( DICT_ENUMVAL, &t_17 , type, NULL);
1217 			CHECK_dict_new( DICT_ENUMVAL, &t_18 , type, NULL);
1218 			CHECK_dict_new( DICT_ENUMVAL, &t_19 , type, NULL);
1219 			CHECK_dict_new( DICT_ENUMVAL, &t_20 , type, NULL);
1220 			CHECK_dict_new( DICT_ENUMVAL, &t_21 , type, NULL);
1221 			CHECK_dict_new( DICT_ENUMVAL, &t_22 , type, NULL);
1222 			CHECK_dict_new( DICT_ENUMVAL, &t_23 , type, NULL);
1223 			CHECK_dict_new( DICT_ENUMVAL, &t_24 , type, NULL);
1224 			CHECK_dict_new( DICT_ENUMVAL, &t_26 , type, NULL);
1225 			CHECK_dict_new( DICT_ENUMVAL, &t_27 , type, NULL);
1226 			CHECK_dict_new( DICT_ENUMVAL, &t_28 , type, NULL);
1227 			CHECK_dict_new( DICT_ENUMVAL, &t_29 , type, NULL);
1228 			CHECK_dict_new( DICT_AVP, &data , type, NULL);
1229 		}
1230 
1231 		/* TCP-Option-Value - RFC 5777 */
1232 		{
1233 			/*
1234 
1235 			*/
1236 
1237 			struct dict_avp_data data = {
1238 					542, 					/* Code */
1239 					0, 					/* Vendor */
1240 					"TCP-Option-Value",			/* Name */
1241 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1242 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1243 					AVP_TYPE_OCTETSTRING			/* base type of data */
1244 					};
1245 
1246 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
1247 		}
1248 
1249 		/* Negated - RFC 5777 */
1250 
1251 			/*
1252 			Implemented higher
1253 			*/
1254 
1255 		/* TCP-Option - RFC 5777 */
1256 		{
1257 			/*
1258 
1259 			*/
1260 			struct dict_object * avp;
1261 			struct dict_avp_data data = {
1262 					540, 					/* Code */
1263 					0, 					/* Vendor */
1264 					"TCP-Option",				/* Name */
1265 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1266 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1267 					AVP_TYPE_GROUPED 			/* base type of data */
1268 					};
1269 
1270 			struct local_rules_definition rules[] =
1271 						{ 	 {  "TCP-Option-Type",	RULE_REQUIRED, -1, 1 }
1272 							,{  "TCP-Option-Value",	RULE_OPTIONAL, -1, -1 }
1273 							,{  "Negated",		RULE_OPTIONAL, -1, 1 }
1274 						};
1275 
1276 			CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
1277 			PARSE_loc_rules( rules, avp );
1278 		}
1279 
1280 		/* IP-Option-Type - RFC 5777 */
1281 		{
1282 			/*
1283 
1284 			The IP-Option-Type AVP (AVP Code 538) is of type Enumerated and the
1285 			values are managed by IANA under the IP Option Numbers registry as
1286 			defined in [RFC2780].
1287 
1288 			The RFC2780 then redirect us to the IANA.
1289 
1290 			The Values have been copied from the following page :
1291 			http://www.iana.org/assignments/ip-parameters
1292 
1293 			Last updated : 2007-02-15
1294 
1295 			*/
1296 			struct dict_object 	* 	type;
1297 			struct dict_type_data	 	tdata = { AVP_TYPE_INTEGER32,	"Enumerated(IP-Option-Type)"	, NULL, NULL, NULL };
1298 			struct dict_enumval_data 	t_0   = { "End of Options List    [RFC791,JBP]",	{ .i32 = 0   }};
1299 			struct dict_enumval_data 	t_1   = { "No Operation           [RFC791,JBP]", 	{ .i32 = 1   }};
1300 			struct dict_enumval_data 	t_2   = { "Security                  [RFC1108]", 	{ .i32 = 2   }};
1301 			struct dict_enumval_data 	t_3   = { "Loose Source Route     [RFC791,JBP]", 	{ .i32 = 3   }};
1302 			struct dict_enumval_data 	t_4   = { "Time Stamp             [RFC791,JBP]", 	{ .i32 = 4   }};
1303 			struct dict_enumval_data 	t_5   = { "Extended Security         [RFC1108]", 	{ .i32 = 5   }};
1304 			struct dict_enumval_data 	t_6   = { "Commercial Security           [???]", 	{ .i32 = 6   }};
1305 			struct dict_enumval_data 	t_7   = { "Record Route           [RFC791,JBP]", 	{ .i32 = 7   }};
1306 			struct dict_enumval_data 	t_8   = { "Stream ID              [RFC791,JBP]", 	{ .i32 = 8   }};
1307 			struct dict_enumval_data 	t_9   = { "Strict Source Route    [RFC791,JBP]", 	{ .i32 = 9   }};
1308 			struct dict_enumval_data 	t_10  = { "Experimental Measurement      [ZSu]", 	{ .i32 = 10  }};
1309 			struct dict_enumval_data 	t_11  = { "MTU Probe                 [RFC1191]*", 	{ .i32 = 11  }};
1310 			struct dict_enumval_data 	t_12  = { "MTU Reply                 [RFC1191]*", 	{ .i32 = 12  }};
1311 			struct dict_enumval_data 	t_13  = { "Experimental Flow Control    [Finn]", 	{ .i32 = 13  }};
1312 			struct dict_enumval_data 	t_14  = { "Expermental Access Control [Estrin]", 	{ .i32 = 14  }};
1313 			struct dict_enumval_data 	t_15  = { "???                      [VerSteeg]", 	{ .i32 = 15  }};
1314 			struct dict_enumval_data 	t_16  = { "IMI Traffic Descriptor        [Lee]", 	{ .i32 = 16  }};
1315 			struct dict_enumval_data 	t_17  = { "Extended Internet Protocol[RFC1385]", 	{ .i32 = 17  }};
1316 			struct dict_enumval_data 	t_18  = { "Traceroute		   [RFC1393]", 		{ .i32 = 18  }};
1317 			struct dict_enumval_data 	t_19  = { "Address Extension    [Ullmann IPv7]", 	{ .i32 = 19  }};
1318 			struct dict_enumval_data 	t_20  = { "Router Alert              [RFC2113]", 	{ .i32 = 20  }};
1319 			struct dict_enumval_data 	t_21  = { "Selective Directed Broadcast[Graff]", 	{ .i32 = 21  }};
1320 			struct dict_enumval_data 	t_23  = { "Dynamic Packet State        [Malis]", 	{ .i32 = 23  }};
1321 			struct dict_enumval_data 	t_24  = { "Upstream Multicast Pkt. [Farinacci]", 	{ .i32 = 24  }};
1322 			struct dict_enumval_data 	t_25  = { "Quick-Start 		   [RFC4782]", 		{ .i32 = 25  }};
1323 
1324 			struct dict_avp_data 	data = {
1325 					538, 					/* Code */
1326 					0, 					/* Vendor */
1327 					"IP-Option-Type",			/* Name */
1328 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1329 					AVP_FLAG_MANDATORY,			/* Fixed flag values */
1330 					AVP_TYPE_INTEGER32 			/* base type of data */
1331 					};
1332 			/* Create the Enumerated type, and then the AVP */
1333 			CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
1334 			CHECK_dict_new( DICT_ENUMVAL, &t_0  , type, NULL);
1335 			CHECK_dict_new( DICT_ENUMVAL, &t_1  , type, NULL);
1336 			CHECK_dict_new( DICT_ENUMVAL, &t_2  , type, NULL);
1337 			CHECK_dict_new( DICT_ENUMVAL, &t_3  , type, NULL);
1338 			CHECK_dict_new( DICT_ENUMVAL, &t_4  , type, NULL);
1339 			CHECK_dict_new( DICT_ENUMVAL, &t_5  , type, NULL);
1340 			CHECK_dict_new( DICT_ENUMVAL, &t_6  , type, NULL);
1341 			CHECK_dict_new( DICT_ENUMVAL, &t_7  , type, NULL);
1342 			CHECK_dict_new( DICT_ENUMVAL, &t_8  , type, NULL);
1343 			CHECK_dict_new( DICT_ENUMVAL, &t_9  , type, NULL);
1344 			CHECK_dict_new( DICT_ENUMVAL, &t_10 , type, NULL);
1345 			CHECK_dict_new( DICT_ENUMVAL, &t_11 , type, NULL);
1346 			CHECK_dict_new( DICT_ENUMVAL, &t_12 , type, NULL);
1347 			CHECK_dict_new( DICT_ENUMVAL, &t_13 , type, NULL);
1348 			CHECK_dict_new( DICT_ENUMVAL, &t_14 , type, NULL);
1349 			CHECK_dict_new( DICT_ENUMVAL, &t_15 , type, NULL);
1350 			CHECK_dict_new( DICT_ENUMVAL, &t_16 , type, NULL);
1351 			CHECK_dict_new( DICT_ENUMVAL, &t_17 , type, NULL);
1352 			CHECK_dict_new( DICT_ENUMVAL, &t_18 , type, NULL);
1353 			CHECK_dict_new( DICT_ENUMVAL, &t_19 , type, NULL);
1354 			CHECK_dict_new( DICT_ENUMVAL, &t_20 , type, NULL);
1355 			CHECK_dict_new( DICT_ENUMVAL, &t_21 , type, NULL);
1356 			CHECK_dict_new( DICT_ENUMVAL, &t_23 , type, NULL);
1357 			CHECK_dict_new( DICT_ENUMVAL, &t_24 , type, NULL);
1358 			CHECK_dict_new( DICT_ENUMVAL, &t_25 , type, NULL);
1359 			CHECK_dict_new( DICT_AVP, &data , type, NULL);
1360 		}
1361 
1362 		/* IP-Option-Value - RFC 5777 */
1363 		{
1364 			/*
1365 
1366 			*/
1367 
1368 			struct dict_avp_data data = {
1369 					539, 					/* Code */
1370 					0, 					/* Vendor */
1371 					"IP-Option-Value",			/* Name */
1372 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1373 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1374 					AVP_TYPE_OCTETSTRING			/* base type of data */
1375 					};
1376 
1377 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
1378 		}
1379 
1380 		/* Negated - RFC 5777 */
1381 
1382 			/*
1383 			Implemented higher
1384 			*/
1385 
1386 		/* IP-Option - RFC 5777 */
1387 		{
1388 			/*
1389 
1390 			*/
1391 			struct dict_object * avp;
1392 			struct dict_avp_data data = {
1393 					537, 					/* Code */
1394 					0, 					/* Vendor */
1395 					"IP-Option",				/* Name */
1396 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1397 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1398 					AVP_TYPE_GROUPED 			/* base type of data */
1399 					};
1400 
1401 			struct local_rules_definition rules[] =
1402 						{ 	 {  "IP-Option-Type",	RULE_REQUIRED, -1, 1 }
1403 							,{  "IP-Option-Value",	RULE_OPTIONAL, -1, -1 }
1404 							,{  "Negated",		RULE_OPTIONAL, -1, 1 }
1405 						};
1406 
1407 			CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
1408 			PARSE_loc_rules( rules, avp );
1409 		}
1410 
1411 		/* Fragmentation-Flag - RFC 5777 */
1412 		{
1413 			/*
1414 
1415 			*/
1416 			struct dict_object 	* 	type;
1417 			struct dict_type_data	 	tdata = { AVP_TYPE_INTEGER32,	"Enumerated(Fragmentation-Flag)"	, NULL, NULL, NULL };
1418 			struct dict_enumval_data 	t_0 = { "DF",	{ .i32 = 0 }};
1419 			struct dict_enumval_data 	t_1 = { "MF", 	{ .i32 = 1 }};
1420 
1421 			struct dict_avp_data 	data = {
1422 					536, 					/* Code */
1423 					0, 					/* Vendor */
1424 					"Fragmentation-Flag",			/* Name */
1425 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1426 					AVP_FLAG_MANDATORY,			/* Fixed flag values */
1427 					AVP_TYPE_INTEGER32 			/* base type of data */
1428 					};
1429 			/* Create the Enumerated type, and then the AVP */
1430 			CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
1431 			CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL);
1432 			CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL);
1433 			CHECK_dict_new( DICT_AVP, &data , type, NULL);
1434 		}
1435 
1436 		/* Diffserv-Code-Point - RFC 5777 */
1437 		{
1438 			/*
1439 			The Diffserv-Code-Point AVP (AVP Code 535) is of type Enumerated and
1440 			specifies the Differentiated Services Field Codepoints to match in
1441 			the IP header.  The values are managed by IANA under the
1442 			Differentiated Services Field Codepoints registry as defined in
1443 			[RFC2474].
1444 
1445 			The RFC2474 then redirect us to the IANA.
1446 
1447 			The Values have been copied from the following page :
1448 			http://www.iana.org/assignments/dscp-registry/dscp-registry.txt
1449 
1450 			Last updated in code : 2010-05-11
1451 
1452 			*/
1453 			struct dict_object 	* 	type;
1454 			struct dict_type_data	 	tdata = { AVP_TYPE_INTEGER32,	"Enumerated(Diffserv-Code-Point)"	, NULL, NULL, NULL };
1455 			struct dict_enumval_data 	t_0  = { "CS0",		{ .i32 = 0 }};
1456 			struct dict_enumval_data 	t_8  = { "CS1",		{ .i32 = 8 }};
1457 			struct dict_enumval_data 	t_16 = { "CS2",		{ .i32 = 16 }};
1458 			struct dict_enumval_data 	t_24 = { "CS3",		{ .i32 = 24 }};
1459 			struct dict_enumval_data 	t_32 = { "CS4",		{ .i32 = 32 }};
1460 			struct dict_enumval_data 	t_40 = { "CS5",		{ .i32 = 40 }};
1461 			struct dict_enumval_data 	t_48 = { "CS6",		{ .i32 = 48 }};
1462 			struct dict_enumval_data 	t_56 = { "CS7",		{ .i32 = 56 }};
1463 			struct dict_enumval_data 	t_10 = { "AF11",	{ .i32 = 10 }};
1464 			struct dict_enumval_data 	t_12 = { "AF12",	{ .i32 = 12 }};
1465 			struct dict_enumval_data 	t_14 = { "AF13",	{ .i32 = 14 }};
1466 			struct dict_enumval_data 	t_18 = { "AF21",	{ .i32 = 18 }};
1467 			struct dict_enumval_data 	t_20 = { "AF22",	{ .i32 = 20 }};
1468 			struct dict_enumval_data 	t_22 = { "AF23",	{ .i32 = 22 }};
1469 			struct dict_enumval_data 	t_26 = { "AF31",	{ .i32 = 26 }};
1470 			struct dict_enumval_data 	t_28 = { "AF32",	{ .i32 = 28 }};
1471 			struct dict_enumval_data 	t_30 = { "AF33",	{ .i32 = 30 }};
1472 			struct dict_enumval_data 	t_34 = { "AF41",	{ .i32 = 34 }};
1473 			struct dict_enumval_data 	t_36 = { "AF42",	{ .i32 = 36 }};
1474 			struct dict_enumval_data 	t_38 = { "AF43",	{ .i32 = 38 }};
1475 			struct dict_enumval_data 	t_46 = { "EF PHB",	{ .i32 = 46 }};
1476 			struct dict_enumval_data 	t_44 = { "VOICE-ADMIT",	{ .i32 = 44 }};
1477 
1478 			struct dict_avp_data 	data = {
1479 					535, 					/* Code */
1480 					0, 					/* Vendor */
1481 					"Diffserv-Code-Point",			/* Name */
1482 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1483 					AVP_FLAG_MANDATORY,			/* Fixed flag values */
1484 					AVP_TYPE_INTEGER32 			/* base type of data */
1485 					};
1486 			/* Create the Enumerated type, and then the AVP */
1487 			CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
1488 			CHECK_dict_new( DICT_ENUMVAL, &t_0  , type, NULL);
1489 			CHECK_dict_new( DICT_ENUMVAL, &t_8  , type, NULL);
1490 			CHECK_dict_new( DICT_ENUMVAL, &t_16 , type, NULL);
1491 			CHECK_dict_new( DICT_ENUMVAL, &t_24 , type, NULL);
1492 			CHECK_dict_new( DICT_ENUMVAL, &t_32 , type, NULL);
1493 			CHECK_dict_new( DICT_ENUMVAL, &t_40 , type, NULL);
1494 			CHECK_dict_new( DICT_ENUMVAL, &t_48 , type, NULL);
1495 			CHECK_dict_new( DICT_ENUMVAL, &t_56 , type, NULL);
1496 			CHECK_dict_new( DICT_ENUMVAL, &t_10 , type, NULL);
1497 			CHECK_dict_new( DICT_ENUMVAL, &t_12 , type, NULL);
1498 			CHECK_dict_new( DICT_ENUMVAL, &t_14 , type, NULL);
1499 			CHECK_dict_new( DICT_ENUMVAL, &t_18 , type, NULL);
1500 			CHECK_dict_new( DICT_ENUMVAL, &t_20 , type, NULL);
1501 			CHECK_dict_new( DICT_ENUMVAL, &t_22 , type, NULL);
1502 			CHECK_dict_new( DICT_ENUMVAL, &t_26 , type, NULL);
1503 			CHECK_dict_new( DICT_ENUMVAL, &t_28 , type, NULL);
1504 			CHECK_dict_new( DICT_ENUMVAL, &t_30 , type, NULL);
1505 			CHECK_dict_new( DICT_ENUMVAL, &t_34 , type, NULL);
1506 			CHECK_dict_new( DICT_ENUMVAL, &t_36 , type, NULL);
1507 			CHECK_dict_new( DICT_ENUMVAL, &t_38 , type, NULL);
1508 			CHECK_dict_new( DICT_ENUMVAL, &t_46 , type, NULL);
1509 			CHECK_dict_new( DICT_ENUMVAL, &t_44 , type, NULL);
1510 			CHECK_dict_new( DICT_AVP, &data , type, NULL);
1511 		}
1512 
1513 		/* IP-Address - RFC 5777 */
1514 		{
1515 			/*
1516 
1517 			*/
1518 
1519 			struct dict_avp_data data = {
1520 					518, 					/* Code */
1521 					0, 					/* Vendor */
1522 					"IP-Address",				/* Name */
1523 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1524 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1525 					AVP_TYPE_OCTETSTRING			/* base type of data */
1526 					};
1527 
1528 			CHECK_dict_new( DICT_AVP, &data , Address_type, NULL);
1529 		}
1530 
1531 		/* IP-Address-Start - RFC 5777 */
1532 		{
1533 			/*
1534 
1535 			*/
1536 
1537 			struct dict_avp_data data = {
1538 					520, 					/* Code */
1539 					0, 					/* Vendor */
1540 					"IP-Address-Start",			/* Name */
1541 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1542 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1543 					AVP_TYPE_OCTETSTRING			/* base type of data */
1544 					};
1545 
1546 			CHECK_dict_new( DICT_AVP, &data , Address_type, NULL);
1547 		}
1548 
1549 		/* IP-Address-End - RFC 5777 */
1550 		{
1551 			/*
1552 
1553 			*/
1554 
1555 			struct dict_avp_data data = {
1556 					521, 					/* Code */
1557 					0, 					/* Vendor */
1558 					"IP-Address-End",			/* Name */
1559 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1560 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1561 					AVP_TYPE_OCTETSTRING			/* base type of data */
1562 					};
1563 
1564 			CHECK_dict_new( DICT_AVP, &data , Address_type, NULL);
1565 		}
1566 
1567 		/* IP-Address-Range - RFC 5777 */
1568 		{
1569 			/*
1570 
1571 			*/
1572 			struct dict_object * avp;
1573 			struct dict_avp_data data = {
1574 					519, 					/* Code */
1575 					0, 					/* Vendor */
1576 					"IP-Address-Range",			/* Name */
1577 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1578 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1579 					AVP_TYPE_GROUPED 			/* base type of data */
1580 					};
1581 
1582 			struct local_rules_definition rules[] =
1583 						{ 	 {  "IP-Address-Start",	RULE_OPTIONAL, -1, 1 }
1584 							,{  "IP-Address-End",	RULE_OPTIONAL, -1, 1 }
1585 						};
1586 
1587 			CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
1588 			PARSE_loc_rules( rules, avp );
1589 		}
1590 
1591 		/* IP-Address - RFC 5777 */
1592 
1593 			/*
1594 			Implemented higher
1595 			*/
1596 
1597 		/* IP-Mask-Bit-Mask-Width - RFC 5777 */
1598 		{
1599 			/*
1600 
1601 			*/
1602 
1603 			struct dict_avp_data data = {
1604 					523, 					/* Code */
1605 					0, 					/* Vendor */
1606 					"IP-Mask-Bit-Mask-Width",		/* Name */
1607 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1608 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1609 					AVP_TYPE_UNSIGNED32			/* base type of data */
1610 					};
1611 
1612 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
1613 		}
1614 
1615 		/* IP-Address-Mask - RFC 5777 */
1616 		{
1617 			/*
1618 
1619 			*/
1620 			struct dict_object * avp;
1621 			struct dict_avp_data data = {
1622 					522, 					/* Code */
1623 					0, 					/* Vendor */
1624 					"IP-Address-Mask",			/* Name */
1625 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1626 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1627 					AVP_TYPE_GROUPED 			/* base type of data */
1628 					};
1629 
1630 			struct local_rules_definition rules[] =
1631 						{ 	 {  "IP-Address",		RULE_REQUIRED, -1, 1 }
1632 							,{  "IP-Mask-Bit-Mask-Width",	RULE_REQUIRED, -1, 1 }
1633 						};
1634 
1635 			CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
1636 			PARSE_loc_rules( rules, avp );
1637 		}
1638 
1639 		/* MAC-Address - RFC 5777 */
1640 		{
1641 			/*
1642 
1643 			*/
1644 
1645 			struct dict_avp_data data = {
1646 					524, 					/* Code */
1647 					0, 					/* Vendor */
1648 					"MAC-Address",				/* Name */
1649 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1650 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1651 					AVP_TYPE_OCTETSTRING			/* base type of data */
1652 					};
1653 
1654 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
1655 		}
1656 
1657 		/* MAC-Address - RFC 5777 */
1658 
1659 			/*
1660 			Implemented higher
1661 			*/
1662 
1663 		/* MAC-Address-Mask-Pattern - RFC 5777 */
1664 		{
1665 			/*
1666 
1667 			*/
1668 
1669 			struct dict_avp_data data = {
1670 					526, 					/* Code */
1671 					0, 					/* Vendor */
1672 					"MAC-Address-Mask-Pattern",		/* Name */
1673 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1674 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1675 					AVP_TYPE_OCTETSTRING			/* base type of data */
1676 					};
1677 
1678 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
1679 		}
1680 
1681 		/* MAC-Address-Mask - RFC 5777 */
1682 		{
1683 			/*
1684 
1685 			*/
1686 			struct dict_object * avp;
1687 			struct dict_avp_data data = {
1688 					525, 					/* Code */
1689 					0, 					/* Vendor */
1690 					"MAC-Address-Mask",			/* Name */
1691 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1692 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1693 					AVP_TYPE_GROUPED 			/* base type of data */
1694 					};
1695 
1696 			struct local_rules_definition rules[] =
1697 						{ 	 {  "MAC-Address",		RULE_REQUIRED, -1, 1 }
1698 							,{  "MAC-Address-Mask-Pattern",	RULE_REQUIRED, -1, 1 }
1699 						};
1700 
1701 			CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
1702 			PARSE_loc_rules( rules, avp );
1703 		}
1704 
1705 		/* EUI64-Address - RFC 5777 */
1706 		{
1707 			/*
1708 
1709 			*/
1710 
1711 			struct dict_avp_data data = {
1712 					527, 					/* Code */
1713 					0, 					/* Vendor */
1714 					"EUI64-Address",			/* Name */
1715 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1716 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1717 					AVP_TYPE_OCTETSTRING			/* base type of data */
1718 					};
1719 
1720 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
1721 		}
1722 
1723 		/* EUI64-Address - RFC 5777 */
1724 
1725 			/*
1726 			Implemented higher
1727 			*/
1728 
1729 		/* EUI64-Address-Mask-Pattern - RFC 5777 */
1730 		{
1731 			/*
1732 
1733 			*/
1734 
1735 			struct dict_avp_data data = {
1736 					529, 					/* Code */
1737 					0, 					/* Vendor */
1738 					"EUI64-Address-Mask-Pattern",		/* Name */
1739 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1740 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1741 					AVP_TYPE_OCTETSTRING			/* base type of data */
1742 					};
1743 
1744 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
1745 		}
1746 
1747 		/* EUI64-Address-Mask - RFC 5777 */
1748 		{
1749 			/*
1750 
1751 			*/
1752 			struct dict_object * avp;
1753 			struct dict_avp_data data = {
1754 					528, 					/* Code */
1755 					0, 					/* Vendor */
1756 					"EUI64-Address-Mask",			/* Name */
1757 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1758 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1759 					AVP_TYPE_GROUPED 			/* base type of data */
1760 					};
1761 
1762 			struct local_rules_definition rules[] =
1763 						{ 	 {  "EUI64-Address",			RULE_REQUIRED, -1, 1 }
1764 							,{  "EUI64-Address-Mask-Pattern",	RULE_REQUIRED, -1, 1 }
1765 						};
1766 
1767 			CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
1768 			PARSE_loc_rules( rules, avp );
1769 		}
1770 
1771 		/* Port - RFC 5777 */
1772 		{
1773 			/*
1774 
1775 			*/
1776 
1777 			struct dict_avp_data data = {
1778 					530, 					/* Code */
1779 					0, 					/* Vendor */
1780 					"Port",					/* Name */
1781 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1782 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1783 					AVP_TYPE_INTEGER32			/* base type of data */
1784 					};
1785 
1786 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
1787 		}
1788 
1789 		/* Port-Start - RFC 5777 */
1790 		{
1791 			/*
1792 
1793 			*/
1794 
1795 			struct dict_avp_data data = {
1796 					532, 					/* Code */
1797 					0, 					/* Vendor */
1798 					"Port-Start",				/* Name */
1799 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1800 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1801 					AVP_TYPE_INTEGER32			/* base type of data */
1802 					};
1803 
1804 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
1805 		}
1806 
1807 		/* Port-End - RFC 5777 */
1808 		{
1809 			/*
1810 
1811 			*/
1812 
1813 			struct dict_avp_data data = {
1814 					533, 					/* Code */
1815 					0, 					/* Vendor */
1816 					"Port-End",				/* Name */
1817 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1818 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1819 					AVP_TYPE_INTEGER32			/* base type of data */
1820 					};
1821 
1822 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
1823 		}
1824 
1825 		/* Port-Range - RFC 5777 */
1826 		{
1827 			/*
1828 
1829 			*/
1830 			struct dict_object * avp;
1831 			struct dict_avp_data data = {
1832 					531, 					/* Code */
1833 					0, 					/* Vendor */
1834 					"Port-Range",				/* Name */
1835 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1836 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1837 					AVP_TYPE_GROUPED 			/* base type of data */
1838 					};
1839 
1840 			struct local_rules_definition rules[] =
1841 						{ 	 {  "Port-Start",	RULE_OPTIONAL, -1, 1 }
1842 							,{  "Port-End",		RULE_OPTIONAL, -1, 1 }
1843 						};
1844 
1845 			CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
1846 			PARSE_loc_rules( rules, avp );
1847 		}
1848 
1849 		/* Negated - RFC 5777 */
1850 
1851 			/*
1852 			Implemented higher
1853 			*/
1854 
1855 		/* Use-Assigned-Address - RFC 5777 */
1856 		{
1857 			/*
1858 
1859 			*/
1860 			struct dict_object 	* 	type;
1861 			struct dict_type_data	 	tdata = { AVP_TYPE_INTEGER32,	"Enumerated(Use-Assigned-Address)"	, NULL, NULL, NULL };
1862 			struct dict_enumval_data 	t_0 = { "False",	{ .i32 = 0 }};
1863 			struct dict_enumval_data 	t_1 = { "True", 	{ .i32 = 1 }};
1864 
1865 			struct dict_avp_data 	data = {
1866 					534, 					/* Code */
1867 					0, 					/* Vendor */
1868 					"Use-Assigned-Address",			/* Name */
1869 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1870 					AVP_FLAG_MANDATORY,			/* Fixed flag values */
1871 					AVP_TYPE_INTEGER32 			/* base type of data */
1872 					};
1873 			/* Create the Enumerated type, and then the AVP */
1874 			CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
1875 			CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL);
1876 			CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL);
1877 			CHECK_dict_new( DICT_AVP, &data , type, NULL);
1878 		}
1879 
1880 		/* From-Spec - RFC 5777 */
1881 		{
1882 			/*
1883 
1884 			*/
1885 			struct dict_object * avp;
1886 			struct dict_avp_data data = {
1887 					515, 					/* Code */
1888 					0, 					/* Vendor */
1889 					"From-Spec",				/* Name */
1890 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1891 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1892 					AVP_TYPE_GROUPED 			/* base type of data */
1893 					};
1894 
1895 			struct local_rules_definition rules[] =
1896 						{ 	 {  "IP-Address",		RULE_OPTIONAL, -1, -1 }
1897 							,{  "IP-Address-Range",		RULE_OPTIONAL, -1, -1 }
1898 							,{  "IP-Address-Mask",		RULE_OPTIONAL, -1, -1 }
1899 							,{  "MAC-Address",		RULE_OPTIONAL, -1, -1 }
1900 							,{  "MAC-Address-Mask",		RULE_OPTIONAL, -1, -1 }
1901 							,{  "EUI64-Address",		RULE_OPTIONAL, -1, -1 }
1902 							,{  "EUI64-Address-Mask",	RULE_OPTIONAL, -1, -1 }
1903 							,{  "Port",			RULE_OPTIONAL, -1, -1 }
1904 							,{  "Port-Range",		RULE_OPTIONAL, -1, -1 }
1905 							,{  "Negated",			RULE_OPTIONAL, -1, 1 }
1906 							,{  "Use-Assigned-Address",	RULE_OPTIONAL, -1, 1 }
1907 						};
1908 
1909 			CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
1910 			PARSE_loc_rules( rules, avp );
1911 		}
1912 
1913 		/* To-Spec - RFC 5777 */
1914 		{
1915 			/*
1916 
1917 			*/
1918 			struct dict_object * avp;
1919 			struct dict_avp_data data = {
1920 					516, 					/* Code */
1921 					0, 					/* Vendor */
1922 					"To-Spec",				/* Name */
1923 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1924 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
1925 					AVP_TYPE_GROUPED 			/* base type of data */
1926 					};
1927 
1928 			struct local_rules_definition rules[] =
1929 						{ 	 {  "IP-Address",		RULE_OPTIONAL, -1, -1 }
1930 							,{  "IP-Address-Range",		RULE_OPTIONAL, -1, -1 }
1931 							,{  "IP-Address-Mask",		RULE_OPTIONAL, -1, -1 }
1932 							,{  "MAC-Address",		RULE_OPTIONAL, -1, -1 }
1933 							,{  "MAC-Address-Mask",		RULE_OPTIONAL, -1, -1 }
1934 							,{  "EUI64-Address",		RULE_OPTIONAL, -1, -1 }
1935 							,{  "EUI64-Address-Mask",	RULE_OPTIONAL, -1, -1 }
1936 							,{  "Port",			RULE_OPTIONAL, -1, -1 }
1937 							,{  "Port-Range",		RULE_OPTIONAL, -1, -1 }
1938 							,{  "Negated",			RULE_OPTIONAL, -1, 1 }
1939 							,{  "Use-Assigned-Address",	RULE_OPTIONAL, -1, 1 }
1940 						};
1941 
1942 			CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
1943 			PARSE_loc_rules( rules, avp );
1944 		}
1945 
1946 		/* Direction - RFC 5777 */
1947 		{
1948 			/*
1949 
1950 			*/
1951 			struct dict_object 	* 	type;
1952 			struct dict_type_data	 	tdata = { AVP_TYPE_INTEGER32,	"Enumerated(Direction)"	, NULL, NULL, NULL };
1953 			struct dict_enumval_data 	t_0 = { "IN",	{ .i32 = 0 }};
1954 			struct dict_enumval_data 	t_1 = { "OUT", 	{ .i32 = 1 }};
1955 			struct dict_enumval_data 	t_2 = { "BOTH", { .i32 = 2 }};
1956 
1957 			struct dict_avp_data 	data = {
1958 					514, 					/* Code */
1959 					0, 					/* Vendor */
1960 					"Direction",				/* Name */
1961 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
1962 					AVP_FLAG_MANDATORY,			/* Fixed flag values */
1963 					AVP_TYPE_INTEGER32 			/* base type of data */
1964 					};
1965 			/* Create the Enumerated type, and then the AVP */
1966 			CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
1967 			CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL);
1968 			CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL);
1969 			CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL);
1970 			CHECK_dict_new( DICT_AVP, &data , type, NULL);
1971 		}
1972 
1973 		/* Protocol - RFC 5777 */
1974 		{
1975 			/*
1976 			The Protocol AVP (AVP Code 513) is of type Enumerated and specifies
1977 			the protocol being matched.  The attributes included in the
1978 			Classifier AVP MUST be consistent with the value of the Protocol AVP.
1979 			Exactly zero or one Protocol AVP may be contained within a Classifier
1980 			AVP.  If the Protocol AVP is omitted from the classifier, then
1981 			comparison of the protocol of the packet is irrelevant.  The values
1982 			for this AVP are managed by IANA under the Protocol Numbers registry
1983 			as defined in [RFC3643].
1984 
1985 			The RFC3643 then redirects us to the IANA.
1986 
1987 			The Values have been copied from the following page :
1988 			http://www.iana.org/assignments/ips-protocols
1989 
1990 			Last updated : 2004-01-26
1991 			*/
1992 			struct dict_object 	* 	type;
1993 			struct dict_type_data	 	tdata = { AVP_TYPE_INTEGER32,	"Enumerated(Protocol)"	, NULL, NULL, NULL };
1994 			struct dict_enumval_data 	t_0 = { "Reserved",						{ .i32 = 0 }};
1995 			struct dict_enumval_data 	t_1 = { "FCIP (Fibre Channel Over TCP/IP)", 			{ .i32 = 1 }};
1996 			struct dict_enumval_data 	t_2 = { "iFCP (A Protocol for Internet Fibre Channel)", 	{ .i32 = 2 }};
1997 
1998 			struct dict_avp_data 	data = {
1999 					513, 					/* Code */
2000 					0, 					/* Vendor */
2001 					"Protocol",				/* Name */
2002 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
2003 					AVP_FLAG_MANDATORY,			/* Fixed flag values */
2004 					AVP_TYPE_INTEGER32 			/* base type of data */
2005 					};
2006 			/* Create the Enumerated type, and then the AVP */
2007 			CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
2008 			CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL);
2009 			CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL);
2010 			CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL);
2011 			CHECK_dict_new( DICT_AVP, &data , type, NULL);
2012 		}
2013 
2014 		/* Classifier-ID - RFC 5777 */
2015 		{
2016 			/*
2017 
2018 			*/
2019 
2020 			struct dict_avp_data data = {
2021 					512, 					/* Code */
2022 					0, 					/* Vendor */
2023 					"Classifier-ID",			/* Name */
2024 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
2025 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
2026 					AVP_TYPE_OCTETSTRING			/* base type of data */
2027 					};
2028 
2029 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
2030 		}
2031 
2032 		/* Classifier - RFC 5777 */
2033 		{
2034 			/*
2035 
2036 			*/
2037 			struct dict_object * avp;
2038 			struct dict_avp_data data = {
2039 					511, 					/* Code */
2040 					0, 					/* Vendor */
2041 					"Classifier",				/* Name */
2042 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
2043 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
2044 					AVP_TYPE_GROUPED 			/* base type of data */
2045 					};
2046 
2047 			struct local_rules_definition rules[] =
2048 						{ 	 {  "Classifier-ID",		RULE_REQUIRED, -1, 1 }
2049 							,{  "Protocol",			RULE_OPTIONAL, -1, 1 }
2050 							,{  "Direction",		RULE_OPTIONAL, -1, 1 }
2051 							,{  "From-Spec",		RULE_OPTIONAL, -1, -1 }
2052 							,{  "To-Spec",			RULE_OPTIONAL, -1, -1 }
2053 							,{  "Diffserv-Code-Point",	RULE_OPTIONAL, -1, -1 }
2054 							,{  "Fragmentation-Flag",	RULE_OPTIONAL, -1, 1 }
2055 							,{  "IP-Option",		RULE_OPTIONAL, -1, -1 }
2056 							,{  "TCP-Option",		RULE_OPTIONAL, -1, -1 }
2057 							,{  "TCP-Flags",		RULE_OPTIONAL, -1, 1 }
2058 							,{  "ICMP-Type",		RULE_OPTIONAL, -1, -1 }
2059 							,{  "ETH-Option",		RULE_OPTIONAL, -1, -1 }
2060 						};
2061 
2062 			CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
2063 			PARSE_loc_rules( rules, avp );
2064 		}
2065 
2066 		/* Filter-Rule-Precedence - RFC 5777 */
2067 		{
2068 			/*
2069 
2070 			*/
2071 
2072 			struct dict_avp_data data = {
2073 					510, 					/* Code */
2074 					0, 					/* Vendor */
2075 					"Filter-Rule-Precedence",		/* Name */
2076 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
2077 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
2078 					AVP_TYPE_UNSIGNED32			/* base type of data */
2079 					};
2080 
2081 			CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
2082 		}
2083 
2084 		/* Filter-Rule - RFC 5777 */
2085 		{
2086 			/*
2087 
2088 			*/
2089 			struct dict_object * avp;
2090 			struct dict_avp_data data = {
2091 					509, 					/* Code */
2092 					0, 					/* Vendor */
2093 					"Filter-Rule",				/* Name */
2094 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
2095 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
2096 					AVP_TYPE_GROUPED 			/* base type of data */
2097 					};
2098 
2099 			struct local_rules_definition rules[] =
2100 						{ 	 {  "Filter-Rule-Precedence",	RULE_OPTIONAL, -1, 1 }
2101 							,{  "Classifier",		RULE_OPTIONAL, -1, 1 }
2102 							,{  "Time-Of-Day-Condition",	RULE_OPTIONAL, -1, -1 }
2103 							,{  "Treatment-Action",		RULE_OPTIONAL, -1, 1 }
2104 							,{  "QoS-Semantics",		RULE_OPTIONAL, -1, 1 }
2105 							,{  "QoS-Profile-Template",	RULE_OPTIONAL, -1, 1 }
2106 							,{  "QoS-Parameters",		RULE_OPTIONAL, -1, 1 }
2107 							,{  "Excess-Treatment",		RULE_OPTIONAL, -1, 1 }
2108 						};
2109 
2110 			CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
2111 			PARSE_loc_rules( rules, avp );
2112 		}
2113 
2114 		/* QoS-Resources - RFC 5777 */
2115 		{
2116 			/*
2117 
2118 			*/
2119 			struct dict_object * avp;
2120 			struct dict_avp_data data = {
2121 					508, 					/* Code */
2122 					0, 					/* Vendor */
2123 					"QoS-Resources",			/* Name */
2124 					AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, 	/* Fixed flags */
2125 					AVP_FLAG_MANDATORY,		 	/* Fixed flag values */
2126 					AVP_TYPE_GROUPED 			/* base type of data */
2127 					};
2128 
2129 			struct local_rules_definition rules[] =
2130 						{ 	 {  "Filter-Rule", 		RULE_REQUIRED, -1, -1 }
2131 						};
2132 
2133 			CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
2134 			PARSE_loc_rules( rules, avp );
2135 		}
2136 	}
2137 
2138 	LOG_D( "Dictionary Extension 'Traffic Classification and Quality of Service (QoS) Attributes for Diameter (RFC 5777)' initialized");
2139 	return 0;
2140 }
2141 EXTENSION_ENTRY("dict_rfc5777", dict_rfc5777_init);
2142