2 /*** <<< INCLUDES [Int1] >>> ***/
4 #include <NativeInteger.h>
6 /*** <<< TYPE-DECLS [Int1] >>> ***/
10 /*** <<< FUNC-DECLS [Int1] >>> ***/
12 extern asn_TYPE_descriptor_t asn_DEF_Int1;
13 asn_struct_free_f Int1_free;
14 asn_struct_print_f Int1_print;
15 asn_constr_check_f Int1_constraint;
16 ber_type_decoder_f Int1_decode_ber;
17 der_type_encoder_f Int1_encode_der;
18 xer_type_decoder_f Int1_decode_xer;
19 xer_type_encoder_f Int1_encode_xer;
20 per_type_decoder_f Int1_decode_uper;
21 per_type_encoder_f Int1_encode_uper;
22 per_type_decoder_f Int1_decode_aper;
23 per_type_encoder_f Int1_encode_aper;
24 #define Int1_ten ((Int1_t)10)
26 /*** <<< CODE [Int1] >>> ***/
29 * This type is implemented using NativeInteger,
30 * so here we adjust the DEF accordingly.
33 /*** <<< STAT-DEFS [Int1] >>> ***/
35 static const ber_tlv_tag_t asn_DEF_Int1_tags_1[] = {
36 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
38 asn_TYPE_descriptor_t asn_DEF_Int1 = {
41 &asn_OP_NativeInteger,
43 sizeof(asn_DEF_Int1_tags_1)
44 /sizeof(asn_DEF_Int1_tags_1[0]), /* 1 */
45 asn_DEF_Int1_tags_1, /* Same as above */
46 sizeof(asn_DEF_Int1_tags_1)
47 /sizeof(asn_DEF_Int1_tags_1[0]), /* 1 */
48 { 0, 0, NativeInteger_constraint },
49 0, 0, /* No members */
54 /*** <<< INCLUDES [Int2] >>> ***/
58 /*** <<< TYPE-DECLS [Int2] >>> ***/
60 typedef Int1_t Int2_t;
62 /*** <<< FUNC-DECLS [Int2] >>> ***/
64 extern asn_per_constraints_t asn_PER_type_Int2_constr_1;
65 extern asn_TYPE_descriptor_t asn_DEF_Int2;
66 asn_struct_free_f Int2_free;
67 asn_struct_print_f Int2_print;
68 asn_constr_check_f Int2_constraint;
69 ber_type_decoder_f Int2_decode_ber;
70 der_type_encoder_f Int2_encode_der;
71 xer_type_decoder_f Int2_decode_xer;
72 xer_type_encoder_f Int2_encode_xer;
73 per_type_decoder_f Int2_decode_uper;
74 per_type_encoder_f Int2_encode_uper;
75 per_type_decoder_f Int2_decode_aper;
76 per_type_encoder_f Int2_encode_aper;
78 /*** <<< CODE [Int2] >>> ***/
81 Int2_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
82 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
86 ASN__CTFAIL(app_key, td, sptr,
87 "%s: value not given (%s:%d)",
88 td->name, __FILE__, __LINE__);
92 value = *(const long *)sptr;
94 if(1 /* No applicable constraints whatsoever */) {
95 (void)value; /* Unused variable */
96 /* Nothing is here. See below */
99 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
103 * This type is implemented using Int1,
104 * so here we adjust the DEF accordingly.
107 /*** <<< CTDEFS [Int2] >>> ***/
109 asn_per_constraints_t asn_PER_type_Int2_constr_1 CC_NOTUSED = {
110 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (0..MAX) */,
111 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
112 0, 0 /* No PER value map */
115 /*** <<< STAT-DEFS [Int2] >>> ***/
117 static const ber_tlv_tag_t asn_DEF_Int2_tags_1[] = {
118 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
120 asn_TYPE_descriptor_t asn_DEF_Int2 = {
123 &asn_OP_NativeInteger,
125 sizeof(asn_DEF_Int2_tags_1)
126 /sizeof(asn_DEF_Int2_tags_1[0]), /* 1 */
127 asn_DEF_Int2_tags_1, /* Same as above */
128 sizeof(asn_DEF_Int2_tags_1)
129 /sizeof(asn_DEF_Int2_tags_1[0]), /* 1 */
130 { 0, &asn_PER_type_Int2_constr_1, Int2_constraint },
131 0, 0, /* No members */
136 /*** <<< INCLUDES [Int3] >>> ***/
140 /*** <<< TYPE-DECLS [Int3] >>> ***/
142 typedef Int2_t Int3_t;
144 /*** <<< FUNC-DECLS [Int3] >>> ***/
146 extern asn_per_constraints_t asn_PER_type_Int3_constr_1;
147 extern asn_TYPE_descriptor_t asn_DEF_Int3;
148 asn_struct_free_f Int3_free;
149 asn_struct_print_f Int3_print;
150 asn_constr_check_f Int3_constraint;
151 ber_type_decoder_f Int3_decode_ber;
152 der_type_encoder_f Int3_encode_der;
153 xer_type_decoder_f Int3_decode_xer;
154 xer_type_encoder_f Int3_encode_xer;
155 per_type_decoder_f Int3_decode_uper;
156 per_type_encoder_f Int3_encode_uper;
157 per_type_decoder_f Int3_decode_aper;
158 per_type_encoder_f Int3_encode_aper;
160 /*** <<< CODE [Int3] >>> ***/
163 Int3_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
164 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
168 ASN__CTFAIL(app_key, td, sptr,
169 "%s: value not given (%s:%d)",
170 td->name, __FILE__, __LINE__);
174 value = *(const long *)sptr;
176 if((value >= 0 && value <= 10)) {
177 /* Constraint check succeeded */
180 ASN__CTFAIL(app_key, td, sptr,
181 "%s: constraint failed (%s:%d)",
182 td->name, __FILE__, __LINE__);
188 * This type is implemented using Int2,
189 * so here we adjust the DEF accordingly.
192 /*** <<< CTDEFS [Int3] >>> ***/
194 asn_per_constraints_t asn_PER_type_Int3_constr_1 CC_NOTUSED = {
195 { APC_CONSTRAINED, 4, 4, 0, 10 } /* (0..10) */,
196 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
197 0, 0 /* No PER value map */
200 /*** <<< STAT-DEFS [Int3] >>> ***/
202 static const ber_tlv_tag_t asn_DEF_Int3_tags_1[] = {
203 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
205 asn_TYPE_descriptor_t asn_DEF_Int3 = {
208 &asn_OP_NativeInteger,
210 sizeof(asn_DEF_Int3_tags_1)
211 /sizeof(asn_DEF_Int3_tags_1[0]), /* 1 */
212 asn_DEF_Int3_tags_1, /* Same as above */
213 sizeof(asn_DEF_Int3_tags_1)
214 /sizeof(asn_DEF_Int3_tags_1[0]), /* 1 */
215 { 0, &asn_PER_type_Int3_constr_1, Int3_constraint },
216 0, 0, /* No members */
221 /*** <<< INCLUDES [Int4] >>> ***/
225 /*** <<< TYPE-DECLS [Int4] >>> ***/
227 typedef Int3_t Int4_t;
229 /*** <<< FUNC-DECLS [Int4] >>> ***/
231 extern asn_per_constraints_t asn_PER_type_Int4_constr_1;
232 extern asn_TYPE_descriptor_t asn_DEF_Int4;
233 asn_struct_free_f Int4_free;
234 asn_struct_print_f Int4_print;
235 asn_constr_check_f Int4_constraint;
236 ber_type_decoder_f Int4_decode_ber;
237 der_type_encoder_f Int4_encode_der;
238 xer_type_decoder_f Int4_decode_xer;
239 xer_type_encoder_f Int4_encode_xer;
240 per_type_decoder_f Int4_decode_uper;
241 per_type_encoder_f Int4_encode_uper;
242 per_type_decoder_f Int4_decode_aper;
243 per_type_encoder_f Int4_encode_aper;
245 /*** <<< CODE [Int4] >>> ***/
248 Int4_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
249 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
253 ASN__CTFAIL(app_key, td, sptr,
254 "%s: value not given (%s:%d)",
255 td->name, __FILE__, __LINE__);
259 value = *(const long *)sptr;
261 if((value >= 1 && value <= 10)) {
262 /* Constraint check succeeded */
265 ASN__CTFAIL(app_key, td, sptr,
266 "%s: constraint failed (%s:%d)",
267 td->name, __FILE__, __LINE__);
273 * This type is implemented using Int3,
274 * so here we adjust the DEF accordingly.
277 /*** <<< CTDEFS [Int4] >>> ***/
279 asn_per_constraints_t asn_PER_type_Int4_constr_1 CC_NOTUSED = {
280 { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 1, 10 } /* (1..10,...) */,
281 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
282 0, 0 /* No PER value map */
285 /*** <<< STAT-DEFS [Int4] >>> ***/
287 static const ber_tlv_tag_t asn_DEF_Int4_tags_1[] = {
288 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
290 asn_TYPE_descriptor_t asn_DEF_Int4 = {
293 &asn_OP_NativeInteger,
295 sizeof(asn_DEF_Int4_tags_1)
296 /sizeof(asn_DEF_Int4_tags_1[0]), /* 1 */
297 asn_DEF_Int4_tags_1, /* Same as above */
298 sizeof(asn_DEF_Int4_tags_1)
299 /sizeof(asn_DEF_Int4_tags_1[0]), /* 1 */
300 { 0, &asn_PER_type_Int4_constr_1, Int4_constraint },
301 0, 0, /* No members */
306 /*** <<< INCLUDES [Int5] >>> ***/
310 /*** <<< TYPE-DECLS [Int5] >>> ***/
312 typedef Int4_t Int5_t;
314 /*** <<< FUNC-DECLS [Int5] >>> ***/
316 extern asn_per_constraints_t asn_PER_type_Int5_constr_1;
317 extern asn_TYPE_descriptor_t asn_DEF_Int5;
318 asn_struct_free_f Int5_free;
319 asn_struct_print_f Int5_print;
320 asn_constr_check_f Int5_constraint;
321 ber_type_decoder_f Int5_decode_ber;
322 der_type_encoder_f Int5_encode_der;
323 xer_type_decoder_f Int5_decode_xer;
324 xer_type_encoder_f Int5_encode_xer;
325 per_type_decoder_f Int5_decode_uper;
326 per_type_encoder_f Int5_encode_uper;
327 per_type_decoder_f Int5_decode_aper;
328 per_type_encoder_f Int5_encode_aper;
330 /*** <<< CODE [Int5] >>> ***/
333 Int5_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
334 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
338 ASN__CTFAIL(app_key, td, sptr,
339 "%s: value not given (%s:%d)",
340 td->name, __FILE__, __LINE__);
344 value = *(const long *)sptr;
347 /* Constraint check succeeded */
350 ASN__CTFAIL(app_key, td, sptr,
351 "%s: constraint failed (%s:%d)",
352 td->name, __FILE__, __LINE__);
358 * This type is implemented using Int4,
359 * so here we adjust the DEF accordingly.
362 /*** <<< CTDEFS [Int5] >>> ***/
364 asn_per_constraints_t asn_PER_type_Int5_constr_1 CC_NOTUSED = {
365 { APC_CONSTRAINED, 0, 0, 5, 5 } /* (5..5) */,
366 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
367 0, 0 /* No PER value map */
370 /*** <<< STAT-DEFS [Int5] >>> ***/
372 static const ber_tlv_tag_t asn_DEF_Int5_tags_1[] = {
373 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
375 asn_TYPE_descriptor_t asn_DEF_Int5 = {
378 &asn_OP_NativeInteger,
380 sizeof(asn_DEF_Int5_tags_1)
381 /sizeof(asn_DEF_Int5_tags_1[0]), /* 1 */
382 asn_DEF_Int5_tags_1, /* Same as above */
383 sizeof(asn_DEF_Int5_tags_1)
384 /sizeof(asn_DEF_Int5_tags_1[0]), /* 1 */
385 { 0, &asn_PER_type_Int5_constr_1, Int5_constraint },
386 0, 0, /* No members */
391 /*** <<< INCLUDES [ExtensibleExtensions] >>> ***/
393 #include <NativeInteger.h>
395 /*** <<< TYPE-DECLS [ExtensibleExtensions] >>> ***/
397 typedef long ExtensibleExtensions_t;
399 /*** <<< FUNC-DECLS [ExtensibleExtensions] >>> ***/
401 extern asn_TYPE_descriptor_t asn_DEF_ExtensibleExtensions;
402 asn_struct_free_f ExtensibleExtensions_free;
403 asn_struct_print_f ExtensibleExtensions_print;
404 asn_constr_check_f ExtensibleExtensions_constraint;
405 ber_type_decoder_f ExtensibleExtensions_decode_ber;
406 der_type_encoder_f ExtensibleExtensions_encode_der;
407 xer_type_decoder_f ExtensibleExtensions_decode_xer;
408 xer_type_encoder_f ExtensibleExtensions_encode_xer;
409 per_type_decoder_f ExtensibleExtensions_decode_uper;
410 per_type_encoder_f ExtensibleExtensions_encode_uper;
411 per_type_decoder_f ExtensibleExtensions_decode_aper;
412 per_type_encoder_f ExtensibleExtensions_encode_aper;
414 /*** <<< CODE [ExtensibleExtensions] >>> ***/
417 ExtensibleExtensions_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
418 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
422 ASN__CTFAIL(app_key, td, sptr,
423 "%s: value not given (%s:%d)",
424 td->name, __FILE__, __LINE__);
428 value = *(const long *)sptr;
430 if((value >= 1 && value <= 255)) {
431 /* Constraint check succeeded */
434 ASN__CTFAIL(app_key, td, sptr,
435 "%s: constraint failed (%s:%d)",
436 td->name, __FILE__, __LINE__);
442 * This type is implemented using NativeInteger,
443 * so here we adjust the DEF accordingly.
446 /*** <<< CTDEFS [ExtensibleExtensions] >>> ***/
448 static asn_per_constraints_t asn_PER_type_ExtensibleExtensions_constr_1 CC_NOTUSED = {
449 { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 255 } /* (1..255,...) */,
450 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
451 0, 0 /* No PER value map */
454 /*** <<< STAT-DEFS [ExtensibleExtensions] >>> ***/
456 static const ber_tlv_tag_t asn_DEF_ExtensibleExtensions_tags_1[] = {
457 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
459 asn_TYPE_descriptor_t asn_DEF_ExtensibleExtensions = {
460 "ExtensibleExtensions",
461 "ExtensibleExtensions",
462 &asn_OP_NativeInteger,
463 asn_DEF_ExtensibleExtensions_tags_1,
464 sizeof(asn_DEF_ExtensibleExtensions_tags_1)
465 /sizeof(asn_DEF_ExtensibleExtensions_tags_1[0]), /* 1 */
466 asn_DEF_ExtensibleExtensions_tags_1, /* Same as above */
467 sizeof(asn_DEF_ExtensibleExtensions_tags_1)
468 /sizeof(asn_DEF_ExtensibleExtensions_tags_1[0]), /* 1 */
469 { 0, &asn_PER_type_ExtensibleExtensions_constr_1, ExtensibleExtensions_constraint },
470 0, 0, /* No members */
475 /*** <<< INCLUDES [Str1] >>> ***/
477 #include <IA5String.h>
479 /*** <<< TYPE-DECLS [Str1] >>> ***/
481 typedef IA5String_t Str1_t;
483 /*** <<< FUNC-DECLS [Str1] >>> ***/
485 extern asn_per_constraints_t asn_PER_type_Str1_constr_1;
486 extern asn_TYPE_descriptor_t asn_DEF_Str1;
487 asn_struct_free_f Str1_free;
488 asn_struct_print_f Str1_print;
489 asn_constr_check_f Str1_constraint;
490 ber_type_decoder_f Str1_decode_ber;
491 der_type_encoder_f Str1_encode_der;
492 xer_type_decoder_f Str1_decode_xer;
493 xer_type_encoder_f Str1_encode_xer;
494 per_type_decoder_f Str1_decode_uper;
495 per_type_encoder_f Str1_encode_uper;
496 per_type_decoder_f Str1_decode_aper;
497 per_type_encoder_f Str1_encode_aper;
499 /*** <<< CODE [Str1] >>> ***/
502 * This type is implemented using IA5String,
503 * so here we adjust the DEF accordingly.
506 /*** <<< CTDEFS [Str1] >>> ***/
508 asn_per_constraints_t asn_PER_type_Str1_constr_1 CC_NOTUSED = {
509 { APC_CONSTRAINED, 7, 7, 0, 127 } /* (0..127) */,
510 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
511 0, 0 /* No PER character map necessary */
514 /*** <<< STAT-DEFS [Str1] >>> ***/
516 static const ber_tlv_tag_t asn_DEF_Str1_tags_1[] = {
517 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
519 asn_TYPE_descriptor_t asn_DEF_Str1 = {
524 sizeof(asn_DEF_Str1_tags_1)
525 /sizeof(asn_DEF_Str1_tags_1[0]), /* 1 */
526 asn_DEF_Str1_tags_1, /* Same as above */
527 sizeof(asn_DEF_Str1_tags_1)
528 /sizeof(asn_DEF_Str1_tags_1[0]), /* 1 */
529 { 0, &asn_PER_type_Str1_constr_1, IA5String_constraint },
530 0, 0, /* No members */
535 /*** <<< INCLUDES [Str2] >>> ***/
539 /*** <<< TYPE-DECLS [Str2] >>> ***/
541 typedef Str1_t Str2_t;
543 /*** <<< FUNC-DECLS [Str2] >>> ***/
545 extern asn_per_constraints_t asn_PER_type_Str2_constr_1;
546 extern asn_TYPE_descriptor_t asn_DEF_Str2;
547 asn_struct_free_f Str2_free;
548 asn_struct_print_f Str2_print;
549 asn_constr_check_f Str2_constraint;
550 ber_type_decoder_f Str2_decode_ber;
551 der_type_encoder_f Str2_encode_der;
552 xer_type_decoder_f Str2_decode_xer;
553 xer_type_encoder_f Str2_encode_xer;
554 per_type_decoder_f Str2_decode_uper;
555 per_type_encoder_f Str2_encode_uper;
556 per_type_decoder_f Str2_decode_aper;
557 per_type_encoder_f Str2_encode_aper;
559 /*** <<< CTABLES [Str2] >>> ***/
561 static int check_permitted_alphabet_1(const void *sptr) {
562 /* The underlying type is IA5String */
563 const IA5String_t *st = (const IA5String_t *)sptr;
564 const uint8_t *ch = st->buf;
565 const uint8_t *end = ch + st->size;
567 for(; ch < end; ch++) {
569 if(!(cv <= 127)) return -1;
575 /*** <<< CODE [Str2] >>> ***/
578 Str2_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
579 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
580 const Str1_t *st = (const Str1_t *)sptr;
584 ASN__CTFAIL(app_key, td, sptr,
585 "%s: value not given (%s:%d)",
586 td->name, __FILE__, __LINE__);
592 if(((size <= 20) || (size >= 25 && size <= 30))
593 && !check_permitted_alphabet_1(st)) {
594 /* Constraint check succeeded */
597 ASN__CTFAIL(app_key, td, sptr,
598 "%s: constraint failed (%s:%d)",
599 td->name, __FILE__, __LINE__);
605 * This type is implemented using Str1,
606 * so here we adjust the DEF accordingly.
609 /*** <<< CTDEFS [Str2] >>> ***/
611 asn_per_constraints_t asn_PER_type_Str2_constr_1 CC_NOTUSED = {
612 { APC_CONSTRAINED, 7, 7, 0, 127 } /* (0..127) */,
613 { APC_CONSTRAINED, 5, 5, 0, 30 } /* (SIZE(0..30)) */,
614 0, 0 /* No PER character map necessary */
617 /*** <<< STAT-DEFS [Str2] >>> ***/
619 static const ber_tlv_tag_t asn_DEF_Str2_tags_1[] = {
620 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
622 asn_TYPE_descriptor_t asn_DEF_Str2 = {
627 sizeof(asn_DEF_Str2_tags_1)
628 /sizeof(asn_DEF_Str2_tags_1[0]), /* 1 */
629 asn_DEF_Str2_tags_1, /* Same as above */
630 sizeof(asn_DEF_Str2_tags_1)
631 /sizeof(asn_DEF_Str2_tags_1[0]), /* 1 */
632 { 0, &asn_PER_type_Str2_constr_1, Str2_constraint },
633 0, 0, /* No members */
638 /*** <<< INCLUDES [Str3] >>> ***/
642 /*** <<< TYPE-DECLS [Str3] >>> ***/
644 typedef Str2_t Str3_t;
646 /*** <<< FUNC-DECLS [Str3] >>> ***/
648 extern asn_TYPE_descriptor_t asn_DEF_Str3;
649 asn_struct_free_f Str3_free;
650 asn_struct_print_f Str3_print;
651 asn_constr_check_f Str3_constraint;
652 ber_type_decoder_f Str3_decode_ber;
653 der_type_encoder_f Str3_encode_der;
654 xer_type_decoder_f Str3_decode_xer;
655 xer_type_encoder_f Str3_encode_xer;
656 per_type_decoder_f Str3_decode_uper;
657 per_type_encoder_f Str3_encode_uper;
658 per_type_decoder_f Str3_decode_aper;
659 per_type_encoder_f Str3_encode_aper;
661 /*** <<< CTABLES [Str3] >>> ***/
663 static const int permitted_alphabet_table_1[256] = {
664 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
665 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
666 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
667 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
668 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ABC */
669 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
670 0, 0, 0, 0, 4, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* def */
672 static const int permitted_alphabet_code2value_1[6] = {
673 65,66,67,100,101,102,};
676 static int check_permitted_alphabet_1(const void *sptr) {
677 const int *table = permitted_alphabet_table_1;
678 /* The underlying type is IA5String */
679 const IA5String_t *st = (const IA5String_t *)sptr;
680 const uint8_t *ch = st->buf;
681 const uint8_t *end = ch + st->size;
683 for(; ch < end; ch++) {
685 if(!table[cv]) return -1;
691 /*** <<< CODE [Str3] >>> ***/
694 Str3_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
695 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
696 const Str2_t *st = (const Str2_t *)sptr;
700 ASN__CTFAIL(app_key, td, sptr,
701 "%s: value not given (%s:%d)",
702 td->name, __FILE__, __LINE__);
708 if(((size >= 10 && size <= 20) || (size >= 25 && size <= 27))
709 && !check_permitted_alphabet_1(st)) {
710 /* Constraint check succeeded */
713 ASN__CTFAIL(app_key, td, sptr,
714 "%s: constraint failed (%s:%d)",
715 td->name, __FILE__, __LINE__);
720 static int asn_PER_MAP_Str3_1_v2c(unsigned int value) {
721 if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0]))
723 return permitted_alphabet_table_1[value] - 1;
725 static int asn_PER_MAP_Str3_1_c2v(unsigned int code) {
726 if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0]))
728 return permitted_alphabet_code2value_1[code];
731 * This type is implemented using Str2,
732 * so here we adjust the DEF accordingly.
735 /*** <<< CTDEFS [Str3] >>> ***/
737 static asn_per_constraints_t asn_PER_type_Str3_constr_1 CC_NOTUSED = {
738 { APC_CONSTRAINED, 3, 3, 65, 102 } /* (65..102) */,
739 { APC_CONSTRAINED, 5, 5, 10, 27 } /* (SIZE(10..27)) */,
740 asn_PER_MAP_Str3_1_v2c, /* Value to PER code map */
741 asn_PER_MAP_Str3_1_c2v /* PER code to value map */
744 /*** <<< STAT-DEFS [Str3] >>> ***/
746 static const ber_tlv_tag_t asn_DEF_Str3_tags_1[] = {
747 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
749 asn_TYPE_descriptor_t asn_DEF_Str3 = {
754 sizeof(asn_DEF_Str3_tags_1)
755 /sizeof(asn_DEF_Str3_tags_1[0]), /* 1 */
756 asn_DEF_Str3_tags_1, /* Same as above */
757 sizeof(asn_DEF_Str3_tags_1)
758 /sizeof(asn_DEF_Str3_tags_1[0]), /* 1 */
759 { 0, &asn_PER_type_Str3_constr_1, Str3_constraint },
760 0, 0, /* No members */
765 /*** <<< INCLUDES [Str4] >>> ***/
767 #include <IA5String.h>
769 /*** <<< TYPE-DECLS [Str4] >>> ***/
771 typedef IA5String_t Str4_t;
773 /*** <<< FUNC-DECLS [Str4] >>> ***/
775 extern asn_TYPE_descriptor_t asn_DEF_Str4;
776 asn_struct_free_f Str4_free;
777 asn_struct_print_f Str4_print;
778 asn_constr_check_f Str4_constraint;
779 ber_type_decoder_f Str4_decode_ber;
780 der_type_encoder_f Str4_encode_der;
781 xer_type_decoder_f Str4_decode_xer;
782 xer_type_encoder_f Str4_encode_xer;
783 per_type_decoder_f Str4_decode_uper;
784 per_type_encoder_f Str4_encode_uper;
785 per_type_decoder_f Str4_decode_aper;
786 per_type_encoder_f Str4_encode_aper;
788 /*** <<< CTABLES [Str4] >>> ***/
790 static int check_permitted_alphabet_1(const void *sptr) {
791 /* The underlying type is IA5String */
792 const IA5String_t *st = (const IA5String_t *)sptr;
793 const uint8_t *ch = st->buf;
794 const uint8_t *end = ch + st->size;
796 for(; ch < end; ch++) {
798 if(!(cv <= 127)) return -1;
804 /*** <<< CODE [Str4] >>> ***/
807 Str4_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
808 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
809 const IA5String_t *st = (const IA5String_t *)sptr;
812 ASN__CTFAIL(app_key, td, sptr,
813 "%s: value not given (%s:%d)",
814 td->name, __FILE__, __LINE__);
819 if(!check_permitted_alphabet_1(st)) {
820 /* Constraint check succeeded */
823 ASN__CTFAIL(app_key, td, sptr,
824 "%s: constraint failed (%s:%d)",
825 td->name, __FILE__, __LINE__);
831 * This type is implemented using IA5String,
832 * so here we adjust the DEF accordingly.
835 /*** <<< CTDEFS [Str4] >>> ***/
837 static asn_per_constraints_t asn_PER_type_Str4_constr_1 CC_NOTUSED = {
838 { APC_CONSTRAINED, 7, 7, 0, 127 } /* (0..127) */,
839 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
840 0, 0 /* No PER character map necessary */
843 /*** <<< STAT-DEFS [Str4] >>> ***/
845 static const ber_tlv_tag_t asn_DEF_Str4_tags_1[] = {
846 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
848 asn_TYPE_descriptor_t asn_DEF_Str4 = {
853 sizeof(asn_DEF_Str4_tags_1)
854 /sizeof(asn_DEF_Str4_tags_1[0]), /* 1 */
855 asn_DEF_Str4_tags_1, /* Same as above */
856 sizeof(asn_DEF_Str4_tags_1)
857 /sizeof(asn_DEF_Str4_tags_1[0]), /* 1 */
858 { 0, &asn_PER_type_Str4_constr_1, Str4_constraint },
859 0, 0, /* No members */
864 /*** <<< INCLUDES [PER-Visible] >>> ***/
866 #include <IA5String.h>
868 /*** <<< TYPE-DECLS [PER-Visible] >>> ***/
870 typedef IA5String_t PER_Visible_t;
872 /*** <<< FUNC-DECLS [PER-Visible] >>> ***/
874 extern asn_per_constraints_t asn_PER_type_PER_Visible_constr_1;
875 extern asn_TYPE_descriptor_t asn_DEF_PER_Visible;
876 asn_struct_free_f PER_Visible_free;
877 asn_struct_print_f PER_Visible_print;
878 asn_constr_check_f PER_Visible_constraint;
879 ber_type_decoder_f PER_Visible_decode_ber;
880 der_type_encoder_f PER_Visible_encode_der;
881 xer_type_decoder_f PER_Visible_decode_xer;
882 xer_type_encoder_f PER_Visible_encode_xer;
883 per_type_decoder_f PER_Visible_decode_uper;
884 per_type_encoder_f PER_Visible_encode_uper;
885 per_type_decoder_f PER_Visible_decode_aper;
886 per_type_encoder_f PER_Visible_encode_aper;
888 /*** <<< CTABLES [PER-Visible] >>> ***/
890 static int check_permitted_alphabet_1(const void *sptr) {
891 /* The underlying type is IA5String */
892 const IA5String_t *st = (const IA5String_t *)sptr;
893 const uint8_t *ch = st->buf;
894 const uint8_t *end = ch + st->size;
896 for(; ch < end; ch++) {
898 if(!(cv >= 65 && cv <= 70)) return -1;
904 /*** <<< CODE [PER-Visible] >>> ***/
907 PER_Visible_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
908 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
909 const IA5String_t *st = (const IA5String_t *)sptr;
912 ASN__CTFAIL(app_key, td, sptr,
913 "%s: value not given (%s:%d)",
914 td->name, __FILE__, __LINE__);
919 if(!check_permitted_alphabet_1(st)) {
920 /* Constraint check succeeded */
923 ASN__CTFAIL(app_key, td, sptr,
924 "%s: constraint failed (%s:%d)",
925 td->name, __FILE__, __LINE__);
931 * This type is implemented using IA5String,
932 * so here we adjust the DEF accordingly.
935 /*** <<< CTDEFS [PER-Visible] >>> ***/
937 asn_per_constraints_t asn_PER_type_PER_Visible_constr_1 CC_NOTUSED = {
938 { APC_CONSTRAINED, 3, 3, 65, 70 } /* (65..70) */,
939 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
940 0, 0 /* No PER character map necessary */
943 /*** <<< STAT-DEFS [PER-Visible] >>> ***/
945 static const ber_tlv_tag_t asn_DEF_PER_Visible_tags_1[] = {
946 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
948 asn_TYPE_descriptor_t asn_DEF_PER_Visible = {
952 asn_DEF_PER_Visible_tags_1,
953 sizeof(asn_DEF_PER_Visible_tags_1)
954 /sizeof(asn_DEF_PER_Visible_tags_1[0]), /* 1 */
955 asn_DEF_PER_Visible_tags_1, /* Same as above */
956 sizeof(asn_DEF_PER_Visible_tags_1)
957 /sizeof(asn_DEF_PER_Visible_tags_1[0]), /* 1 */
958 { 0, &asn_PER_type_PER_Visible_constr_1, PER_Visible_constraint },
959 0, 0, /* No members */
964 /*** <<< INCLUDES [PER-Visible-2] >>> ***/
966 #include "PER-Visible.h"
968 /*** <<< TYPE-DECLS [PER-Visible-2] >>> ***/
970 typedef PER_Visible_t PER_Visible_2_t;
972 /*** <<< FUNC-DECLS [PER-Visible-2] >>> ***/
974 extern asn_TYPE_descriptor_t asn_DEF_PER_Visible_2;
975 asn_struct_free_f PER_Visible_2_free;
976 asn_struct_print_f PER_Visible_2_print;
977 asn_constr_check_f PER_Visible_2_constraint;
978 ber_type_decoder_f PER_Visible_2_decode_ber;
979 der_type_encoder_f PER_Visible_2_encode_der;
980 xer_type_decoder_f PER_Visible_2_decode_xer;
981 xer_type_encoder_f PER_Visible_2_encode_xer;
982 per_type_decoder_f PER_Visible_2_decode_uper;
983 per_type_encoder_f PER_Visible_2_encode_uper;
984 per_type_decoder_f PER_Visible_2_decode_aper;
985 per_type_encoder_f PER_Visible_2_encode_aper;
987 /*** <<< CTABLES [PER-Visible-2] >>> ***/
989 static int check_permitted_alphabet_1(const void *sptr) {
990 /* The underlying type is IA5String */
991 const IA5String_t *st = (const IA5String_t *)sptr;
992 const uint8_t *ch = st->buf;
993 const uint8_t *end = ch + st->size;
995 for(; ch < end; ch++) {
997 if(!(cv >= 69 && cv <= 70)) return -1;
1003 /*** <<< CODE [PER-Visible-2] >>> ***/
1006 PER_Visible_2_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
1007 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
1008 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1011 ASN__CTFAIL(app_key, td, sptr,
1012 "%s: value not given (%s:%d)",
1013 td->name, __FILE__, __LINE__);
1018 if(!check_permitted_alphabet_1(st)) {
1019 /* Constraint check succeeded */
1022 ASN__CTFAIL(app_key, td, sptr,
1023 "%s: constraint failed (%s:%d)",
1024 td->name, __FILE__, __LINE__);
1030 * This type is implemented using PER_Visible,
1031 * so here we adjust the DEF accordingly.
1034 /*** <<< CTDEFS [PER-Visible-2] >>> ***/
1036 static asn_per_constraints_t asn_PER_type_PER_Visible_2_constr_1 CC_NOTUSED = {
1037 { APC_CONSTRAINED, 1, 1, 69, 70 } /* (69..70) */,
1038 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
1039 0, 0 /* No PER character map necessary */
1042 /*** <<< STAT-DEFS [PER-Visible-2] >>> ***/
1044 static const ber_tlv_tag_t asn_DEF_PER_Visible_2_tags_1[] = {
1045 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1047 asn_TYPE_descriptor_t asn_DEF_PER_Visible_2 = {
1051 asn_DEF_PER_Visible_2_tags_1,
1052 sizeof(asn_DEF_PER_Visible_2_tags_1)
1053 /sizeof(asn_DEF_PER_Visible_2_tags_1[0]), /* 1 */
1054 asn_DEF_PER_Visible_2_tags_1, /* Same as above */
1055 sizeof(asn_DEF_PER_Visible_2_tags_1)
1056 /sizeof(asn_DEF_PER_Visible_2_tags_1[0]), /* 1 */
1057 { 0, &asn_PER_type_PER_Visible_2_constr_1, PER_Visible_2_constraint },
1058 0, 0, /* No members */
1059 0 /* No specifics */
1063 /*** <<< INCLUDES [Not-PER-Visible-1] >>> ***/
1065 #include "PER-Visible.h"
1067 /*** <<< TYPE-DECLS [Not-PER-Visible-1] >>> ***/
1069 typedef PER_Visible_t Not_PER_Visible_1_t;
1071 /*** <<< FUNC-DECLS [Not-PER-Visible-1] >>> ***/
1073 extern asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_1;
1074 asn_struct_free_f Not_PER_Visible_1_free;
1075 asn_struct_print_f Not_PER_Visible_1_print;
1076 asn_constr_check_f Not_PER_Visible_1_constraint;
1077 ber_type_decoder_f Not_PER_Visible_1_decode_ber;
1078 der_type_encoder_f Not_PER_Visible_1_encode_der;
1079 xer_type_decoder_f Not_PER_Visible_1_decode_xer;
1080 xer_type_encoder_f Not_PER_Visible_1_encode_xer;
1081 per_type_decoder_f Not_PER_Visible_1_decode_uper;
1082 per_type_encoder_f Not_PER_Visible_1_encode_uper;
1083 per_type_decoder_f Not_PER_Visible_1_decode_aper;
1084 per_type_encoder_f Not_PER_Visible_1_encode_aper;
1086 /*** <<< CTABLES [Not-PER-Visible-1] >>> ***/
1088 static int check_permitted_alphabet_1(const void *sptr) {
1089 /* The underlying type is IA5String */
1090 const IA5String_t *st = (const IA5String_t *)sptr;
1091 const uint8_t *ch = st->buf;
1092 const uint8_t *end = ch + st->size;
1094 for(; ch < end; ch++) {
1096 if(!(cv >= 65 && cv <= 70)) return -1;
1102 /*** <<< CODE [Not-PER-Visible-1] >>> ***/
1105 Not_PER_Visible_1_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
1106 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
1107 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1110 ASN__CTFAIL(app_key, td, sptr,
1111 "%s: value not given (%s:%d)",
1112 td->name, __FILE__, __LINE__);
1117 if(!check_permitted_alphabet_1(st)) {
1118 /* Constraint check succeeded */
1121 ASN__CTFAIL(app_key, td, sptr,
1122 "%s: constraint failed (%s:%d)",
1123 td->name, __FILE__, __LINE__);
1129 * This type is implemented using PER_Visible,
1130 * so here we adjust the DEF accordingly.
1133 /*** <<< CTDEFS [Not-PER-Visible-1] >>> ***/
1135 static asn_per_constraints_t asn_PER_type_Not_PER_Visible_1_constr_1 CC_NOTUSED = {
1136 { APC_CONSTRAINED, 3, 3, 65, 70 } /* (65..70) */,
1137 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
1138 0, 0 /* No PER character map necessary */
1141 /*** <<< STAT-DEFS [Not-PER-Visible-1] >>> ***/
1143 static const ber_tlv_tag_t asn_DEF_Not_PER_Visible_1_tags_1[] = {
1144 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1146 asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_1 = {
1147 "Not-PER-Visible-1",
1148 "Not-PER-Visible-1",
1150 asn_DEF_Not_PER_Visible_1_tags_1,
1151 sizeof(asn_DEF_Not_PER_Visible_1_tags_1)
1152 /sizeof(asn_DEF_Not_PER_Visible_1_tags_1[0]), /* 1 */
1153 asn_DEF_Not_PER_Visible_1_tags_1, /* Same as above */
1154 sizeof(asn_DEF_Not_PER_Visible_1_tags_1)
1155 /sizeof(asn_DEF_Not_PER_Visible_1_tags_1[0]), /* 1 */
1156 { 0, &asn_PER_type_Not_PER_Visible_1_constr_1, Not_PER_Visible_1_constraint },
1157 0, 0, /* No members */
1158 0 /* No specifics */
1162 /*** <<< INCLUDES [Not-PER-Visible-2] >>> ***/
1164 #include "PER-Visible.h"
1166 /*** <<< TYPE-DECLS [Not-PER-Visible-2] >>> ***/
1168 typedef PER_Visible_t Not_PER_Visible_2_t;
1170 /*** <<< FUNC-DECLS [Not-PER-Visible-2] >>> ***/
1172 extern asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_2;
1173 asn_struct_free_f Not_PER_Visible_2_free;
1174 asn_struct_print_f Not_PER_Visible_2_print;
1175 asn_constr_check_f Not_PER_Visible_2_constraint;
1176 ber_type_decoder_f Not_PER_Visible_2_decode_ber;
1177 der_type_encoder_f Not_PER_Visible_2_encode_der;
1178 xer_type_decoder_f Not_PER_Visible_2_decode_xer;
1179 xer_type_encoder_f Not_PER_Visible_2_encode_xer;
1180 per_type_decoder_f Not_PER_Visible_2_decode_uper;
1181 per_type_encoder_f Not_PER_Visible_2_encode_uper;
1182 per_type_decoder_f Not_PER_Visible_2_decode_aper;
1183 per_type_encoder_f Not_PER_Visible_2_encode_aper;
1185 /*** <<< CTABLES [Not-PER-Visible-2] >>> ***/
1187 static int check_permitted_alphabet_1(const void *sptr) {
1188 /* The underlying type is IA5String */
1189 const IA5String_t *st = (const IA5String_t *)sptr;
1190 const uint8_t *ch = st->buf;
1191 const uint8_t *end = ch + st->size;
1193 for(; ch < end; ch++) {
1195 if(!(cv >= 65 && cv <= 66)) return -1;
1201 /*** <<< CODE [Not-PER-Visible-2] >>> ***/
1204 Not_PER_Visible_2_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
1205 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
1206 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1209 ASN__CTFAIL(app_key, td, sptr,
1210 "%s: value not given (%s:%d)",
1211 td->name, __FILE__, __LINE__);
1216 if(!check_permitted_alphabet_1(st)) {
1217 /* Constraint check succeeded */
1220 ASN__CTFAIL(app_key, td, sptr,
1221 "%s: constraint failed (%s:%d)",
1222 td->name, __FILE__, __LINE__);
1228 * This type is implemented using PER_Visible,
1229 * so here we adjust the DEF accordingly.
1232 /*** <<< CTDEFS [Not-PER-Visible-2] >>> ***/
1234 static asn_per_constraints_t asn_PER_type_Not_PER_Visible_2_constr_1 CC_NOTUSED = {
1235 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1236 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
1237 0, 0 /* No PER character map necessary */
1240 /*** <<< STAT-DEFS [Not-PER-Visible-2] >>> ***/
1242 static const ber_tlv_tag_t asn_DEF_Not_PER_Visible_2_tags_1[] = {
1243 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1245 asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_2 = {
1246 "Not-PER-Visible-2",
1247 "Not-PER-Visible-2",
1249 asn_DEF_Not_PER_Visible_2_tags_1,
1250 sizeof(asn_DEF_Not_PER_Visible_2_tags_1)
1251 /sizeof(asn_DEF_Not_PER_Visible_2_tags_1[0]), /* 1 */
1252 asn_DEF_Not_PER_Visible_2_tags_1, /* Same as above */
1253 sizeof(asn_DEF_Not_PER_Visible_2_tags_1)
1254 /sizeof(asn_DEF_Not_PER_Visible_2_tags_1[0]), /* 1 */
1255 { 0, &asn_PER_type_Not_PER_Visible_2_constr_1, Not_PER_Visible_2_constraint },
1256 0, 0, /* No members */
1257 0 /* No specifics */
1261 /*** <<< INCLUDES [Not-PER-Visible-3] >>> ***/
1263 #include "PER-Visible.h"
1265 /*** <<< TYPE-DECLS [Not-PER-Visible-3] >>> ***/
1267 typedef PER_Visible_t Not_PER_Visible_3_t;
1269 /*** <<< FUNC-DECLS [Not-PER-Visible-3] >>> ***/
1271 extern asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_3;
1272 asn_struct_free_f Not_PER_Visible_3_free;
1273 asn_struct_print_f Not_PER_Visible_3_print;
1274 asn_constr_check_f Not_PER_Visible_3_constraint;
1275 ber_type_decoder_f Not_PER_Visible_3_decode_ber;
1276 der_type_encoder_f Not_PER_Visible_3_encode_der;
1277 xer_type_decoder_f Not_PER_Visible_3_decode_xer;
1278 xer_type_encoder_f Not_PER_Visible_3_encode_xer;
1279 per_type_decoder_f Not_PER_Visible_3_decode_uper;
1280 per_type_encoder_f Not_PER_Visible_3_encode_uper;
1281 per_type_decoder_f Not_PER_Visible_3_decode_aper;
1282 per_type_encoder_f Not_PER_Visible_3_encode_aper;
1284 /*** <<< CTABLES [Not-PER-Visible-3] >>> ***/
1286 static int check_permitted_alphabet_1(const void *sptr) {
1287 /* The underlying type is IA5String */
1288 const IA5String_t *st = (const IA5String_t *)sptr;
1289 const uint8_t *ch = st->buf;
1290 const uint8_t *end = ch + st->size;
1292 for(; ch < end; ch++) {
1294 if(!(cv >= 65 && cv <= 66)) return -1;
1300 /*** <<< CODE [Not-PER-Visible-3] >>> ***/
1303 Not_PER_Visible_3_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
1304 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
1305 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1308 ASN__CTFAIL(app_key, td, sptr,
1309 "%s: value not given (%s:%d)",
1310 td->name, __FILE__, __LINE__);
1315 if(!check_permitted_alphabet_1(st)) {
1316 /* Constraint check succeeded */
1319 ASN__CTFAIL(app_key, td, sptr,
1320 "%s: constraint failed (%s:%d)",
1321 td->name, __FILE__, __LINE__);
1327 * This type is implemented using PER_Visible,
1328 * so here we adjust the DEF accordingly.
1331 /*** <<< CTDEFS [Not-PER-Visible-3] >>> ***/
1333 static asn_per_constraints_t asn_PER_type_Not_PER_Visible_3_constr_1 CC_NOTUSED = {
1334 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1335 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
1336 0, 0 /* No PER character map necessary */
1339 /*** <<< STAT-DEFS [Not-PER-Visible-3] >>> ***/
1341 static const ber_tlv_tag_t asn_DEF_Not_PER_Visible_3_tags_1[] = {
1342 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1344 asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_3 = {
1345 "Not-PER-Visible-3",
1346 "Not-PER-Visible-3",
1348 asn_DEF_Not_PER_Visible_3_tags_1,
1349 sizeof(asn_DEF_Not_PER_Visible_3_tags_1)
1350 /sizeof(asn_DEF_Not_PER_Visible_3_tags_1[0]), /* 1 */
1351 asn_DEF_Not_PER_Visible_3_tags_1, /* Same as above */
1352 sizeof(asn_DEF_Not_PER_Visible_3_tags_1)
1353 /sizeof(asn_DEF_Not_PER_Visible_3_tags_1[0]), /* 1 */
1354 { 0, &asn_PER_type_Not_PER_Visible_3_constr_1, Not_PER_Visible_3_constraint },
1355 0, 0, /* No members */
1356 0 /* No specifics */
1360 /*** <<< INCLUDES [SIZE-but-not-FROM] >>> ***/
1362 #include "PER-Visible.h"
1364 /*** <<< TYPE-DECLS [SIZE-but-not-FROM] >>> ***/
1366 typedef PER_Visible_t SIZE_but_not_FROM_t;
1368 /*** <<< FUNC-DECLS [SIZE-but-not-FROM] >>> ***/
1370 extern asn_TYPE_descriptor_t asn_DEF_SIZE_but_not_FROM;
1371 asn_struct_free_f SIZE_but_not_FROM_free;
1372 asn_struct_print_f SIZE_but_not_FROM_print;
1373 asn_constr_check_f SIZE_but_not_FROM_constraint;
1374 ber_type_decoder_f SIZE_but_not_FROM_decode_ber;
1375 der_type_encoder_f SIZE_but_not_FROM_encode_der;
1376 xer_type_decoder_f SIZE_but_not_FROM_decode_xer;
1377 xer_type_encoder_f SIZE_but_not_FROM_encode_xer;
1378 per_type_decoder_f SIZE_but_not_FROM_decode_uper;
1379 per_type_encoder_f SIZE_but_not_FROM_encode_uper;
1380 per_type_decoder_f SIZE_but_not_FROM_decode_aper;
1381 per_type_encoder_f SIZE_but_not_FROM_encode_aper;
1383 /*** <<< CTABLES [SIZE-but-not-FROM] >>> ***/
1385 static int check_permitted_alphabet_1(const void *sptr) {
1386 /* The underlying type is IA5String */
1387 const IA5String_t *st = (const IA5String_t *)sptr;
1388 const uint8_t *ch = st->buf;
1389 const uint8_t *end = ch + st->size;
1391 for(; ch < end; ch++) {
1393 if(!(cv >= 65 && cv <= 68)) return -1;
1399 /*** <<< CODE [SIZE-but-not-FROM] >>> ***/
1402 SIZE_but_not_FROM_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
1403 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
1404 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1408 ASN__CTFAIL(app_key, td, sptr,
1409 "%s: value not given (%s:%d)",
1410 td->name, __FILE__, __LINE__);
1416 if((size >= 1 && size <= 4)
1417 && !check_permitted_alphabet_1(st)) {
1418 /* Constraint check succeeded */
1421 ASN__CTFAIL(app_key, td, sptr,
1422 "%s: constraint failed (%s:%d)",
1423 td->name, __FILE__, __LINE__);
1429 * This type is implemented using PER_Visible,
1430 * so here we adjust the DEF accordingly.
1433 /*** <<< CTDEFS [SIZE-but-not-FROM] >>> ***/
1435 static asn_per_constraints_t asn_PER_type_SIZE_but_not_FROM_constr_1 CC_NOTUSED = {
1436 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1437 { APC_CONSTRAINED, 2, 2, 1, 4 } /* (SIZE(1..4)) */,
1438 0, 0 /* No PER character map necessary */
1441 /*** <<< STAT-DEFS [SIZE-but-not-FROM] >>> ***/
1443 static const ber_tlv_tag_t asn_DEF_SIZE_but_not_FROM_tags_1[] = {
1444 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1446 asn_TYPE_descriptor_t asn_DEF_SIZE_but_not_FROM = {
1447 "SIZE-but-not-FROM",
1448 "SIZE-but-not-FROM",
1450 asn_DEF_SIZE_but_not_FROM_tags_1,
1451 sizeof(asn_DEF_SIZE_but_not_FROM_tags_1)
1452 /sizeof(asn_DEF_SIZE_but_not_FROM_tags_1[0]), /* 1 */
1453 asn_DEF_SIZE_but_not_FROM_tags_1, /* Same as above */
1454 sizeof(asn_DEF_SIZE_but_not_FROM_tags_1)
1455 /sizeof(asn_DEF_SIZE_but_not_FROM_tags_1[0]), /* 1 */
1456 { 0, &asn_PER_type_SIZE_but_not_FROM_constr_1, SIZE_but_not_FROM_constraint },
1457 0, 0, /* No members */
1458 0 /* No specifics */
1462 /*** <<< INCLUDES [SIZE-and-FROM] >>> ***/
1464 #include "PER-Visible.h"
1466 /*** <<< TYPE-DECLS [SIZE-and-FROM] >>> ***/
1468 typedef PER_Visible_t SIZE_and_FROM_t;
1470 /*** <<< FUNC-DECLS [SIZE-and-FROM] >>> ***/
1472 extern asn_TYPE_descriptor_t asn_DEF_SIZE_and_FROM;
1473 asn_struct_free_f SIZE_and_FROM_free;
1474 asn_struct_print_f SIZE_and_FROM_print;
1475 asn_constr_check_f SIZE_and_FROM_constraint;
1476 ber_type_decoder_f SIZE_and_FROM_decode_ber;
1477 der_type_encoder_f SIZE_and_FROM_encode_der;
1478 xer_type_decoder_f SIZE_and_FROM_decode_xer;
1479 xer_type_encoder_f SIZE_and_FROM_encode_xer;
1480 per_type_decoder_f SIZE_and_FROM_decode_uper;
1481 per_type_encoder_f SIZE_and_FROM_encode_uper;
1482 per_type_decoder_f SIZE_and_FROM_decode_aper;
1483 per_type_encoder_f SIZE_and_FROM_encode_aper;
1485 /*** <<< CTABLES [SIZE-and-FROM] >>> ***/
1487 static int check_permitted_alphabet_1(const void *sptr) {
1488 /* The underlying type is IA5String */
1489 const IA5String_t *st = (const IA5String_t *)sptr;
1490 const uint8_t *ch = st->buf;
1491 const uint8_t *end = ch + st->size;
1493 for(; ch < end; ch++) {
1495 if(!(cv >= 65 && cv <= 68)) return -1;
1501 /*** <<< CODE [SIZE-and-FROM] >>> ***/
1504 SIZE_and_FROM_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
1505 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
1506 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1510 ASN__CTFAIL(app_key, td, sptr,
1511 "%s: value not given (%s:%d)",
1512 td->name, __FILE__, __LINE__);
1518 if((size >= 1 && size <= 4)
1519 && !check_permitted_alphabet_1(st)) {
1520 /* Constraint check succeeded */
1523 ASN__CTFAIL(app_key, td, sptr,
1524 "%s: constraint failed (%s:%d)",
1525 td->name, __FILE__, __LINE__);
1531 * This type is implemented using PER_Visible,
1532 * so here we adjust the DEF accordingly.
1535 /*** <<< CTDEFS [SIZE-and-FROM] >>> ***/
1537 static asn_per_constraints_t asn_PER_type_SIZE_and_FROM_constr_1 CC_NOTUSED = {
1538 { APC_CONSTRAINED, 2, 2, 65, 68 } /* (65..68) */,
1539 { APC_CONSTRAINED, 2, 2, 1, 4 } /* (SIZE(1..4)) */,
1540 0, 0 /* No PER character map necessary */
1543 /*** <<< STAT-DEFS [SIZE-and-FROM] >>> ***/
1545 static const ber_tlv_tag_t asn_DEF_SIZE_and_FROM_tags_1[] = {
1546 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1548 asn_TYPE_descriptor_t asn_DEF_SIZE_and_FROM = {
1552 asn_DEF_SIZE_and_FROM_tags_1,
1553 sizeof(asn_DEF_SIZE_and_FROM_tags_1)
1554 /sizeof(asn_DEF_SIZE_and_FROM_tags_1[0]), /* 1 */
1555 asn_DEF_SIZE_and_FROM_tags_1, /* Same as above */
1556 sizeof(asn_DEF_SIZE_and_FROM_tags_1)
1557 /sizeof(asn_DEF_SIZE_and_FROM_tags_1[0]), /* 1 */
1558 { 0, &asn_PER_type_SIZE_and_FROM_constr_1, SIZE_and_FROM_constraint },
1559 0, 0, /* No members */
1560 0 /* No specifics */
1564 /*** <<< INCLUDES [Neither-SIZE-nor-FROM] >>> ***/
1566 #include "PER-Visible.h"
1568 /*** <<< TYPE-DECLS [Neither-SIZE-nor-FROM] >>> ***/
1570 typedef PER_Visible_t Neither_SIZE_nor_FROM_t;
1572 /*** <<< FUNC-DECLS [Neither-SIZE-nor-FROM] >>> ***/
1574 extern asn_TYPE_descriptor_t asn_DEF_Neither_SIZE_nor_FROM;
1575 asn_struct_free_f Neither_SIZE_nor_FROM_free;
1576 asn_struct_print_f Neither_SIZE_nor_FROM_print;
1577 asn_constr_check_f Neither_SIZE_nor_FROM_constraint;
1578 ber_type_decoder_f Neither_SIZE_nor_FROM_decode_ber;
1579 der_type_encoder_f Neither_SIZE_nor_FROM_encode_der;
1580 xer_type_decoder_f Neither_SIZE_nor_FROM_decode_xer;
1581 xer_type_encoder_f Neither_SIZE_nor_FROM_encode_xer;
1582 per_type_decoder_f Neither_SIZE_nor_FROM_decode_uper;
1583 per_type_encoder_f Neither_SIZE_nor_FROM_encode_uper;
1584 per_type_decoder_f Neither_SIZE_nor_FROM_decode_aper;
1585 per_type_encoder_f Neither_SIZE_nor_FROM_encode_aper;
1587 /*** <<< CTABLES [Neither-SIZE-nor-FROM] >>> ***/
1589 static int check_permitted_alphabet_1(const void *sptr) {
1590 /* The underlying type is IA5String */
1591 const IA5String_t *st = (const IA5String_t *)sptr;
1592 const uint8_t *ch = st->buf;
1593 const uint8_t *end = ch + st->size;
1595 for(; ch < end; ch++) {
1597 if(!(cv >= 65 && cv <= 70)) return -1;
1603 /*** <<< CODE [Neither-SIZE-nor-FROM] >>> ***/
1606 Neither_SIZE_nor_FROM_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
1607 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
1608 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1611 ASN__CTFAIL(app_key, td, sptr,
1612 "%s: value not given (%s:%d)",
1613 td->name, __FILE__, __LINE__);
1618 if(!check_permitted_alphabet_1(st)) {
1619 /* Constraint check succeeded */
1622 ASN__CTFAIL(app_key, td, sptr,
1623 "%s: constraint failed (%s:%d)",
1624 td->name, __FILE__, __LINE__);
1630 * This type is implemented using PER_Visible,
1631 * so here we adjust the DEF accordingly.
1634 /*** <<< CTDEFS [Neither-SIZE-nor-FROM] >>> ***/
1636 static asn_per_constraints_t asn_PER_type_Neither_SIZE_nor_FROM_constr_1 CC_NOTUSED = {
1637 { APC_CONSTRAINED, 3, 3, 65, 70 } /* (65..70) */,
1638 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
1639 0, 0 /* No PER character map necessary */
1642 /*** <<< STAT-DEFS [Neither-SIZE-nor-FROM] >>> ***/
1644 static const ber_tlv_tag_t asn_DEF_Neither_SIZE_nor_FROM_tags_1[] = {
1645 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1647 asn_TYPE_descriptor_t asn_DEF_Neither_SIZE_nor_FROM = {
1648 "Neither-SIZE-nor-FROM",
1649 "Neither-SIZE-nor-FROM",
1651 asn_DEF_Neither_SIZE_nor_FROM_tags_1,
1652 sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1)
1653 /sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1[0]), /* 1 */
1654 asn_DEF_Neither_SIZE_nor_FROM_tags_1, /* Same as above */
1655 sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1)
1656 /sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1[0]), /* 1 */
1657 { 0, &asn_PER_type_Neither_SIZE_nor_FROM_constr_1, Neither_SIZE_nor_FROM_constraint },
1658 0, 0, /* No members */
1659 0 /* No specifics */
1663 /*** <<< INCLUDES [Utf8-4] >>> ***/
1665 #include <UTF8String.h>
1667 /*** <<< TYPE-DECLS [Utf8-4] >>> ***/
1669 typedef UTF8String_t Utf8_4_t;
1671 /*** <<< FUNC-DECLS [Utf8-4] >>> ***/
1673 extern asn_TYPE_descriptor_t asn_DEF_Utf8_4;
1674 asn_struct_free_f Utf8_4_free;
1675 asn_struct_print_f Utf8_4_print;
1676 asn_constr_check_f Utf8_4_constraint;
1677 ber_type_decoder_f Utf8_4_decode_ber;
1678 der_type_encoder_f Utf8_4_encode_der;
1679 xer_type_decoder_f Utf8_4_decode_xer;
1680 xer_type_encoder_f Utf8_4_encode_xer;
1681 per_type_decoder_f Utf8_4_decode_uper;
1682 per_type_encoder_f Utf8_4_encode_uper;
1683 per_type_decoder_f Utf8_4_decode_aper;
1684 per_type_encoder_f Utf8_4_encode_aper;
1686 /*** <<< CTABLES [Utf8-4] >>> ***/
1688 static int check_permitted_alphabet_1(const void *sptr) {
1689 if(UTF8String_length((const UTF8String_t *)sptr) < 0)
1690 return -1; /* Alphabet (sic!) test failed. */
1696 /*** <<< CODE [Utf8-4] >>> ***/
1699 Utf8_4_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
1700 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
1701 const UTF8String_t *st = (const UTF8String_t *)sptr;
1704 ASN__CTFAIL(app_key, td, sptr,
1705 "%s: value not given (%s:%d)",
1706 td->name, __FILE__, __LINE__);
1711 if(!check_permitted_alphabet_1(st)) {
1712 /* Constraint check succeeded */
1715 ASN__CTFAIL(app_key, td, sptr,
1716 "%s: constraint failed (%s:%d)",
1717 td->name, __FILE__, __LINE__);
1723 * This type is implemented using UTF8String,
1724 * so here we adjust the DEF accordingly.
1727 /*** <<< CTDEFS [Utf8-4] >>> ***/
1729 static asn_per_constraints_t asn_PER_type_Utf8_4_constr_1 CC_NOTUSED = {
1730 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1731 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1732 0, 0 /* No PER value map */
1735 /*** <<< STAT-DEFS [Utf8-4] >>> ***/
1737 static const ber_tlv_tag_t asn_DEF_Utf8_4_tags_1[] = {
1738 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
1740 asn_TYPE_descriptor_t asn_DEF_Utf8_4 = {
1744 asn_DEF_Utf8_4_tags_1,
1745 sizeof(asn_DEF_Utf8_4_tags_1)
1746 /sizeof(asn_DEF_Utf8_4_tags_1[0]), /* 1 */
1747 asn_DEF_Utf8_4_tags_1, /* Same as above */
1748 sizeof(asn_DEF_Utf8_4_tags_1)
1749 /sizeof(asn_DEF_Utf8_4_tags_1[0]), /* 1 */
1750 { 0, &asn_PER_type_Utf8_4_constr_1, Utf8_4_constraint },
1751 0, 0, /* No members */
1752 0 /* No specifics */
1756 /*** <<< INCLUDES [Utf8-3] >>> ***/
1760 /*** <<< TYPE-DECLS [Utf8-3] >>> ***/
1762 typedef Utf8_2_t Utf8_3_t;
1764 /*** <<< FUNC-DECLS [Utf8-3] >>> ***/
1766 extern asn_TYPE_descriptor_t asn_DEF_Utf8_3;
1767 asn_struct_free_f Utf8_3_free;
1768 asn_struct_print_f Utf8_3_print;
1769 asn_constr_check_f Utf8_3_constraint;
1770 ber_type_decoder_f Utf8_3_decode_ber;
1771 der_type_encoder_f Utf8_3_encode_der;
1772 xer_type_decoder_f Utf8_3_decode_xer;
1773 xer_type_encoder_f Utf8_3_encode_xer;
1774 per_type_decoder_f Utf8_3_decode_uper;
1775 per_type_encoder_f Utf8_3_encode_uper;
1776 per_type_decoder_f Utf8_3_decode_aper;
1777 per_type_encoder_f Utf8_3_encode_aper;
1779 /*** <<< CTABLES [Utf8-3] >>> ***/
1781 static const int permitted_alphabet_table_1[128] = {
1782 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
1783 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
1784 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
1785 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
1786 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15, /* ABCDEFGHIJKLMNO */
1787 16,17,18,19,20,21,22,23,24,25,26, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */
1788 0,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41, /* abcdefghijklmno */
1789 42,43,44,45,46,47,48,49,50,51,52, 0, 0, 0, 0, 0, /* pqrstuvwxyz */
1792 static int check_permitted_alphabet_1(const void *sptr) {
1793 const int *table = permitted_alphabet_table_1;
1794 /* The underlying type is UTF8String */
1795 const UTF8String_t *st = (const UTF8String_t *)sptr;
1796 const uint8_t *ch = st->buf;
1797 const uint8_t *end = ch + st->size;
1799 for(; ch < end; ch++) {
1801 if(cv >= 0x80) return -1;
1802 if(!table[cv]) return -1;
1808 /*** <<< CODE [Utf8-3] >>> ***/
1811 Utf8_3_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
1812 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
1813 const Utf8_2_t *st = (const Utf8_2_t *)sptr;
1817 ASN__CTFAIL(app_key, td, sptr,
1818 "%s: value not given (%s:%d)",
1819 td->name, __FILE__, __LINE__);
1823 size = UTF8String_length(st);
1824 if((ssize_t)size < 0) {
1825 ASN__CTFAIL(app_key, td, sptr,
1826 "%s: UTF-8: broken encoding (%s:%d)",
1827 td->name, __FILE__, __LINE__);
1831 if((size >= 1 && size <= 2)
1832 && !check_permitted_alphabet_1(st)) {
1833 /* Constraint check succeeded */
1836 ASN__CTFAIL(app_key, td, sptr,
1837 "%s: constraint failed (%s:%d)",
1838 td->name, __FILE__, __LINE__);
1844 * This type is implemented using Utf8_2,
1845 * so here we adjust the DEF accordingly.
1848 /*** <<< CTDEFS [Utf8-3] >>> ***/
1850 static asn_per_constraints_t asn_PER_type_Utf8_3_constr_1 CC_NOTUSED = {
1851 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1852 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1853 0, 0 /* No PER value map */
1856 /*** <<< STAT-DEFS [Utf8-3] >>> ***/
1858 static const ber_tlv_tag_t asn_DEF_Utf8_3_tags_1[] = {
1859 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
1861 asn_TYPE_descriptor_t asn_DEF_Utf8_3 = {
1865 asn_DEF_Utf8_3_tags_1,
1866 sizeof(asn_DEF_Utf8_3_tags_1)
1867 /sizeof(asn_DEF_Utf8_3_tags_1[0]), /* 1 */
1868 asn_DEF_Utf8_3_tags_1, /* Same as above */
1869 sizeof(asn_DEF_Utf8_3_tags_1)
1870 /sizeof(asn_DEF_Utf8_3_tags_1[0]), /* 1 */
1871 { 0, &asn_PER_type_Utf8_3_constr_1, Utf8_3_constraint },
1872 0, 0, /* No members */
1873 0 /* No specifics */
1877 /*** <<< INCLUDES [Utf8-2] >>> ***/
1881 /*** <<< TYPE-DECLS [Utf8-2] >>> ***/
1883 typedef Utf8_1_t Utf8_2_t;
1885 /*** <<< FUNC-DECLS [Utf8-2] >>> ***/
1887 extern asn_per_constraints_t asn_PER_type_Utf8_2_constr_1;
1888 extern asn_TYPE_descriptor_t asn_DEF_Utf8_2;
1889 asn_struct_free_f Utf8_2_free;
1890 asn_struct_print_f Utf8_2_print;
1891 asn_constr_check_f Utf8_2_constraint;
1892 ber_type_decoder_f Utf8_2_decode_ber;
1893 der_type_encoder_f Utf8_2_encode_der;
1894 xer_type_decoder_f Utf8_2_decode_xer;
1895 xer_type_encoder_f Utf8_2_encode_xer;
1896 per_type_decoder_f Utf8_2_decode_uper;
1897 per_type_encoder_f Utf8_2_encode_uper;
1898 per_type_decoder_f Utf8_2_decode_aper;
1899 per_type_encoder_f Utf8_2_encode_aper;
1901 /*** <<< CODE [Utf8-2] >>> ***/
1904 Utf8_2_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
1905 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
1906 const Utf8_1_t *st = (const Utf8_1_t *)sptr;
1910 ASN__CTFAIL(app_key, td, sptr,
1911 "%s: value not given (%s:%d)",
1912 td->name, __FILE__, __LINE__);
1916 size = UTF8String_length(st);
1917 if((ssize_t)size < 0) {
1918 ASN__CTFAIL(app_key, td, sptr,
1919 "%s: UTF-8: broken encoding (%s:%d)",
1920 td->name, __FILE__, __LINE__);
1924 if((size >= 1 && size <= 2)) {
1925 /* Constraint check succeeded */
1928 ASN__CTFAIL(app_key, td, sptr,
1929 "%s: constraint failed (%s:%d)",
1930 td->name, __FILE__, __LINE__);
1936 * This type is implemented using Utf8_1,
1937 * so here we adjust the DEF accordingly.
1940 /*** <<< CTDEFS [Utf8-2] >>> ***/
1942 asn_per_constraints_t asn_PER_type_Utf8_2_constr_1 CC_NOTUSED = {
1943 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1944 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1945 0, 0 /* No PER value map */
1948 /*** <<< STAT-DEFS [Utf8-2] >>> ***/
1950 static const ber_tlv_tag_t asn_DEF_Utf8_2_tags_1[] = {
1951 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
1953 asn_TYPE_descriptor_t asn_DEF_Utf8_2 = {
1957 asn_DEF_Utf8_2_tags_1,
1958 sizeof(asn_DEF_Utf8_2_tags_1)
1959 /sizeof(asn_DEF_Utf8_2_tags_1[0]), /* 1 */
1960 asn_DEF_Utf8_2_tags_1, /* Same as above */
1961 sizeof(asn_DEF_Utf8_2_tags_1)
1962 /sizeof(asn_DEF_Utf8_2_tags_1[0]), /* 1 */
1963 { 0, &asn_PER_type_Utf8_2_constr_1, Utf8_2_constraint },
1964 0, 0, /* No members */
1965 0 /* No specifics */
1969 /*** <<< INCLUDES [Utf8-1] >>> ***/
1971 #include <UTF8String.h>
1973 /*** <<< TYPE-DECLS [Utf8-1] >>> ***/
1975 typedef UTF8String_t Utf8_1_t;
1977 /*** <<< FUNC-DECLS [Utf8-1] >>> ***/
1979 extern asn_TYPE_descriptor_t asn_DEF_Utf8_1;
1980 asn_struct_free_f Utf8_1_free;
1981 asn_struct_print_f Utf8_1_print;
1982 asn_constr_check_f Utf8_1_constraint;
1983 ber_type_decoder_f Utf8_1_decode_ber;
1984 der_type_encoder_f Utf8_1_encode_der;
1985 xer_type_decoder_f Utf8_1_decode_xer;
1986 xer_type_encoder_f Utf8_1_encode_xer;
1987 per_type_decoder_f Utf8_1_decode_uper;
1988 per_type_encoder_f Utf8_1_encode_uper;
1989 per_type_decoder_f Utf8_1_decode_aper;
1990 per_type_encoder_f Utf8_1_encode_aper;
1992 /*** <<< CODE [Utf8-1] >>> ***/
1995 * This type is implemented using UTF8String,
1996 * so here we adjust the DEF accordingly.
1999 /*** <<< STAT-DEFS [Utf8-1] >>> ***/
2001 static const ber_tlv_tag_t asn_DEF_Utf8_1_tags_1[] = {
2002 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
2004 asn_TYPE_descriptor_t asn_DEF_Utf8_1 = {
2008 asn_DEF_Utf8_1_tags_1,
2009 sizeof(asn_DEF_Utf8_1_tags_1)
2010 /sizeof(asn_DEF_Utf8_1_tags_1[0]), /* 1 */
2011 asn_DEF_Utf8_1_tags_1, /* Same as above */
2012 sizeof(asn_DEF_Utf8_1_tags_1)
2013 /sizeof(asn_DEF_Utf8_1_tags_1[0]), /* 1 */
2014 { 0, 0, UTF8String_constraint },
2015 0, 0, /* No members */
2016 0 /* No specifics */
2020 /*** <<< INCLUDES [VisibleIdentifier] >>> ***/
2022 #include "Identifier.h"
2024 /*** <<< TYPE-DECLS [VisibleIdentifier] >>> ***/
2026 typedef Identifier_t VisibleIdentifier_t;
2028 /*** <<< FUNC-DECLS [VisibleIdentifier] >>> ***/
2030 extern asn_TYPE_descriptor_t asn_DEF_VisibleIdentifier;
2031 asn_struct_free_f VisibleIdentifier_free;
2032 asn_struct_print_f VisibleIdentifier_print;
2033 asn_constr_check_f VisibleIdentifier_constraint;
2034 ber_type_decoder_f VisibleIdentifier_decode_ber;
2035 der_type_encoder_f VisibleIdentifier_encode_der;
2036 xer_type_decoder_f VisibleIdentifier_decode_xer;
2037 xer_type_encoder_f VisibleIdentifier_encode_xer;
2038 per_type_decoder_f VisibleIdentifier_decode_uper;
2039 per_type_encoder_f VisibleIdentifier_encode_uper;
2040 per_type_decoder_f VisibleIdentifier_decode_aper;
2041 per_type_encoder_f VisibleIdentifier_encode_aper;
2043 /*** <<< CTABLES [VisibleIdentifier] >>> ***/
2045 static const int permitted_alphabet_table_1[256] = {
2046 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
2047 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
2048 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* $ */
2049 2, 3, 4, 5, 6, 7, 8, 9,10,11, 0, 0, 0, 0, 0, 0, /* 0123456789 */
2050 0,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26, /* ABCDEFGHIJKLMNO */
2051 27,28,29,30,31,32,33,34,35,36,37, 0, 0, 0, 0,38, /* PQRSTUVWXYZ _ */
2052 0,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53, /* abcdefghijklmno */
2053 54,55,56,57,58,59,60,61,62,63,64, 0, 0, 0, 0, 0, /* pqrstuvwxyz */
2055 static const int permitted_alphabet_code2value_1[64] = {
2056 36,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,
2057 70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,
2058 86,87,88,89,90,95,97,98,99,100,101,102,103,104,105,106,
2059 107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,
2063 static int check_permitted_alphabet_1(const void *sptr) {
2064 const int *table = permitted_alphabet_table_1;
2065 /* The underlying type is VisibleString */
2066 const VisibleString_t *st = (const VisibleString_t *)sptr;
2067 const uint8_t *ch = st->buf;
2068 const uint8_t *end = ch + st->size;
2070 for(; ch < end; ch++) {
2072 if(!table[cv]) return -1;
2078 /*** <<< CODE [VisibleIdentifier] >>> ***/
2081 VisibleIdentifier_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
2082 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
2083 const Identifier_t *st = (const Identifier_t *)sptr;
2087 ASN__CTFAIL(app_key, td, sptr,
2088 "%s: value not given (%s:%d)",
2089 td->name, __FILE__, __LINE__);
2095 if((size >= 1 && size <= 32)
2096 && !check_permitted_alphabet_1(st)) {
2097 /* Constraint check succeeded */
2100 ASN__CTFAIL(app_key, td, sptr,
2101 "%s: constraint failed (%s:%d)",
2102 td->name, __FILE__, __LINE__);
2107 static int asn_PER_MAP_VisibleIdentifier_1_v2c(unsigned int value) {
2108 if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0]))
2110 return permitted_alphabet_table_1[value] - 1;
2112 static int asn_PER_MAP_VisibleIdentifier_1_c2v(unsigned int code) {
2113 if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0]))
2115 return permitted_alphabet_code2value_1[code];
2118 * This type is implemented using Identifier,
2119 * so here we adjust the DEF accordingly.
2122 /*** <<< CTDEFS [VisibleIdentifier] >>> ***/
2124 static asn_per_constraints_t asn_PER_type_VisibleIdentifier_constr_1 CC_NOTUSED = {
2125 { APC_CONSTRAINED, 6, 6, 36, 122 } /* (36..122) */,
2126 { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */,
2127 asn_PER_MAP_VisibleIdentifier_1_v2c, /* Value to PER code map */
2128 asn_PER_MAP_VisibleIdentifier_1_c2v /* PER code to value map */
2131 /*** <<< STAT-DEFS [VisibleIdentifier] >>> ***/
2133 static const ber_tlv_tag_t asn_DEF_VisibleIdentifier_tags_1[] = {
2134 (ASN_TAG_CLASS_UNIVERSAL | (26 << 2))
2136 asn_TYPE_descriptor_t asn_DEF_VisibleIdentifier = {
2137 "VisibleIdentifier",
2138 "VisibleIdentifier",
2139 &asn_OP_VisibleString,
2140 asn_DEF_VisibleIdentifier_tags_1,
2141 sizeof(asn_DEF_VisibleIdentifier_tags_1)
2142 /sizeof(asn_DEF_VisibleIdentifier_tags_1[0]), /* 1 */
2143 asn_DEF_VisibleIdentifier_tags_1, /* Same as above */
2144 sizeof(asn_DEF_VisibleIdentifier_tags_1)
2145 /sizeof(asn_DEF_VisibleIdentifier_tags_1[0]), /* 1 */
2146 { 0, &asn_PER_type_VisibleIdentifier_constr_1, VisibleIdentifier_constraint },
2147 0, 0, /* No members */
2148 0 /* No specifics */
2152 /*** <<< INCLUDES [Sequence] >>> ***/
2156 #include <BOOLEAN.h>
2157 #include <NativeEnumerated.h>
2160 #include <constr_SEQUENCE.h>
2162 /*** <<< DEPS [Sequence] >>> ***/
2164 typedef enum enum_c {
2168 * Enumeration is extensible
2173 /*** <<< TYPE-DECLS [Sequence] >>> ***/
2175 typedef struct Sequence {
2176 Int1_t *int1_c; /* DEFAULT 3 */
2179 BOOLEAN_t *Bool; /* DEFAULT 1 */
2181 NULL_t *null; /* OPTIONAL */
2183 * This type is extensible,
2184 * possible extensions are below.
2186 Int5_t *int5_c; /* OPTIONAL */
2188 /* Context for parsing across buffer boundaries */
2189 asn_struct_ctx_t _asn_ctx;
2192 /*** <<< FUNC-DECLS [Sequence] >>> ***/
2194 /* extern asn_TYPE_descriptor_t asn_DEF_enum_c_6; // (Use -fall-defs-global to expose) */
2195 extern asn_TYPE_descriptor_t asn_DEF_Sequence;
2196 extern asn_SEQUENCE_specifics_t asn_SPC_Sequence_specs_1;
2197 extern asn_TYPE_member_t asn_MBR_Sequence_1[7];
2199 /*** <<< CODE [Sequence] >>> ***/
2202 * This type is implemented using NativeEnumerated,
2203 * so here we adjust the DEF accordingly.
2206 memb_int1_c_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
2207 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
2211 ASN__CTFAIL(app_key, td, sptr,
2212 "%s: value not given (%s:%d)",
2213 td->name, __FILE__, __LINE__);
2217 value = *(const long *)sptr;
2220 /* Constraint check succeeded */
2223 ASN__CTFAIL(app_key, td, sptr,
2224 "%s: constraint failed (%s:%d)",
2225 td->name, __FILE__, __LINE__);
2231 memb_int4_c_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
2232 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
2236 ASN__CTFAIL(app_key, td, sptr,
2237 "%s: value not given (%s:%d)",
2238 td->name, __FILE__, __LINE__);
2242 value = *(const long *)sptr;
2244 if((value >= 5 && value <= 7)) {
2245 /* Constraint check succeeded */
2248 ASN__CTFAIL(app_key, td, sptr,
2249 "%s: constraint failed (%s:%d)",
2250 td->name, __FILE__, __LINE__);
2256 memb_int5_c_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
2257 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
2261 ASN__CTFAIL(app_key, td, sptr,
2262 "%s: value not given (%s:%d)",
2263 td->name, __FILE__, __LINE__);
2267 value = *(const long *)sptr;
2270 /* Constraint check succeeded */
2273 ASN__CTFAIL(app_key, td, sptr,
2274 "%s: constraint failed (%s:%d)",
2275 td->name, __FILE__, __LINE__);
2281 /*** <<< CTDEFS [Sequence] >>> ***/
2283 static asn_per_constraints_t asn_PER_type_enum_c_constr_6 CC_NOTUSED = {
2284 { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */,
2285 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2286 0, 0 /* No PER value map */
2288 static asn_per_constraints_t asn_PER_memb_int1_c_constr_2 CC_NOTUSED = {
2289 { APC_SEMI_CONSTRAINED, -1, -1, -2, 0 } /* (-2..MAX) */,
2290 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2291 0, 0 /* No PER value map */
2293 static asn_per_constraints_t asn_PER_memb_int4_c_constr_4 CC_NOTUSED = {
2294 { APC_CONSTRAINED, 2, 2, 5, 7 } /* (5..7) */,
2295 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2296 0, 0 /* No PER value map */
2298 static asn_per_constraints_t asn_PER_memb_int5_c_constr_13 CC_NOTUSED = {
2299 { APC_CONSTRAINED, 0, 0, 5, 5 } /* (5..5) */,
2300 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2301 0, 0 /* No PER value map */
2304 /*** <<< STAT-DEFS [Sequence] >>> ***/
2306 static int asn_DFL_2_cmp_3(const void *sptr) {
2307 const Int1_t *st = sptr;
2310 return -1; /* No value is not a default value */
2313 /* Test default value 3 */
2316 static int asn_DFL_2_set_3(void **sptr) {
2320 st = (*sptr = CALLOC(1, sizeof(*st)));
2324 /* Install default value 3 */
2328 static int asn_DFL_5_cmp_1(const void *sptr) {
2329 const BOOLEAN_t *st = sptr;
2332 return -1; /* No value is not a default value */
2335 /* Test default value 1 */
2338 static int asn_DFL_5_set_1(void **sptr) {
2339 BOOLEAN_t *st = *sptr;
2342 st = (*sptr = CALLOC(1, sizeof(*st)));
2346 /* Install default value 1 */
2350 static const asn_INTEGER_enum_map_t asn_MAP_enum_c_value2enum_6[] = {
2354 /* This list is extensible */
2356 static const unsigned int asn_MAP_enum_c_enum2value_6[] = {
2360 /* This list is extensible */
2362 static const asn_INTEGER_specifics_t asn_SPC_enum_c_specs_6 = {
2363 asn_MAP_enum_c_value2enum_6, /* "tag" => N; sorted by tag */
2364 asn_MAP_enum_c_enum2value_6, /* N => "tag"; sorted by N */
2365 3, /* Number of elements in the maps */
2366 3, /* Extensions before this member */
2367 1, /* Strict enumeration */
2368 0, /* Native long size */
2371 static const ber_tlv_tag_t asn_DEF_enum_c_tags_6[] = {
2372 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
2374 static /* Use -fall-defs-global to expose */
2375 asn_TYPE_descriptor_t asn_DEF_enum_c_6 = {
2378 &asn_OP_NativeEnumerated,
2379 asn_DEF_enum_c_tags_6,
2380 sizeof(asn_DEF_enum_c_tags_6)
2381 /sizeof(asn_DEF_enum_c_tags_6[0]), /* 1 */
2382 asn_DEF_enum_c_tags_6, /* Same as above */
2383 sizeof(asn_DEF_enum_c_tags_6)
2384 /sizeof(asn_DEF_enum_c_tags_6[0]), /* 1 */
2385 { 0, &asn_PER_type_enum_c_constr_6, NativeEnumerated_constraint },
2386 0, 0, /* Defined elsewhere */
2387 &asn_SPC_enum_c_specs_6 /* Additional specs */
2390 asn_TYPE_member_t asn_MBR_Sequence_1[] = {
2391 { ATF_POINTER, 1, offsetof(struct Sequence, int1_c),
2392 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
2394 .type = &asn_DEF_Int1,
2396 { .oer_constraints = 0, .per_constraints = &asn_PER_memb_int1_c_constr_2, .general_constraints = memb_int1_c_constraint_1 },
2397 .default_value_cmp = &asn_DFL_2_cmp_3, /* Compare DEFAULT 3 */
2398 .default_value_set = &asn_DFL_2_set_3, /* Set DEFAULT 3 */
2401 { ATF_NOFLAGS, 0, offsetof(struct Sequence, int4),
2402 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
2403 .tag_mode = +1, /* EXPLICIT tag at current level */
2404 .type = &asn_DEF_Int4,
2406 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
2407 0, 0, /* No default value */
2410 { ATF_NOFLAGS, 0, offsetof(struct Sequence, int4_c),
2411 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
2413 .type = &asn_DEF_Int4,
2415 { .oer_constraints = 0, .per_constraints = &asn_PER_memb_int4_c_constr_4, .general_constraints = memb_int4_c_constraint_1 },
2416 0, 0, /* No default value */
2419 { ATF_POINTER, 1, offsetof(struct Sequence, Bool),
2420 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
2422 .type = &asn_DEF_BOOLEAN,
2424 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
2425 .default_value_cmp = &asn_DFL_5_cmp_1, /* Compare DEFAULT 1 */
2426 .default_value_set = &asn_DFL_5_set_1, /* Set DEFAULT 1 */
2429 { ATF_NOFLAGS, 0, offsetof(struct Sequence, enum_c),
2430 .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
2432 .type = &asn_DEF_enum_c_6,
2434 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
2435 0, 0, /* No default value */
2438 { ATF_POINTER, 2, offsetof(struct Sequence, null),
2439 .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)),
2441 .type = &asn_DEF_NULL,
2443 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
2444 0, 0, /* No default value */
2447 { ATF_POINTER, 1, offsetof(struct Sequence, int5_c),
2448 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
2450 .type = &asn_DEF_Int5,
2452 { .oer_constraints = 0, .per_constraints = &asn_PER_memb_int5_c_constr_13, .general_constraints = memb_int5_c_constraint_1 },
2453 0, 0, /* No default value */
2457 static const int asn_MAP_Sequence_oms_1[] = { 0, 3, 5, 6 };
2458 static const ber_tlv_tag_t asn_DEF_Sequence_tags_1[] = {
2459 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
2461 static const asn_TYPE_tag2member_t asn_MAP_Sequence_tag2el_1[] = {
2462 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool */
2463 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2 }, /* int1-c */
2464 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -1, 1 }, /* int4-c */
2465 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 6, -2, 0 }, /* int5-c */
2466 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 5, 0, 0 }, /* null */
2467 { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 4, 0, 0 }, /* enum-c */
2468 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 } /* int4 */
2470 asn_SEQUENCE_specifics_t asn_SPC_Sequence_specs_1 = {
2471 sizeof(struct Sequence),
2472 offsetof(struct Sequence, _asn_ctx),
2473 .tag2el = asn_MAP_Sequence_tag2el_1,
2474 .tag2el_count = 7, /* Count of tags in the map */
2475 asn_MAP_Sequence_oms_1, /* Optional members */
2476 3, 1, /* Root/Additions */
2477 6, /* First extension addition */
2479 asn_TYPE_descriptor_t asn_DEF_Sequence = {
2483 asn_DEF_Sequence_tags_1,
2484 sizeof(asn_DEF_Sequence_tags_1)
2485 /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
2486 asn_DEF_Sequence_tags_1, /* Same as above */
2487 sizeof(asn_DEF_Sequence_tags_1)
2488 /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
2489 { 0, 0, SEQUENCE_constraint },
2491 7, /* Elements count */
2492 &asn_SPC_Sequence_specs_1 /* Additional specs */
2496 /*** <<< INCLUDES [SequenceOf] >>> ***/
2498 #include <asn_SEQUENCE_OF.h>
2499 #include <constr_SEQUENCE_OF.h>
2501 /*** <<< FWD-DECLS [SequenceOf] >>> ***/
2505 /*** <<< TYPE-DECLS [SequenceOf] >>> ***/
2507 typedef struct SequenceOf {
2508 A_SEQUENCE_OF(struct Sequence) list;
2510 /* Context for parsing across buffer boundaries */
2511 asn_struct_ctx_t _asn_ctx;
2514 /*** <<< FUNC-DECLS [SequenceOf] >>> ***/
2516 extern asn_TYPE_descriptor_t asn_DEF_SequenceOf;
2518 /*** <<< POST-INCLUDE [SequenceOf] >>> ***/
2520 #include "Sequence.h"
2522 /*** <<< CTDEFS [SequenceOf] >>> ***/
2524 static asn_per_constraints_t asn_PER_type_SequenceOf_constr_1 CC_NOTUSED = {
2525 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2526 { APC_CONSTRAINED, 1, 1, 1, 2 } /* (SIZE(1..2)) */,
2527 0, 0 /* No PER value map */
2530 /*** <<< STAT-DEFS [SequenceOf] >>> ***/
2532 static asn_TYPE_member_t asn_MBR_SequenceOf_1[] = {
2533 { ATF_POINTER, 0, 0,
2534 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
2536 .type = &asn_DEF_Sequence,
2538 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
2539 0, 0, /* No default value */
2543 static const ber_tlv_tag_t asn_DEF_SequenceOf_tags_1[] = {
2544 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
2546 static asn_SET_OF_specifics_t asn_SPC_SequenceOf_specs_1 = {
2547 sizeof(struct SequenceOf),
2548 offsetof(struct SequenceOf, _asn_ctx),
2549 0, /* XER encoding is XMLDelimitedItemList */
2551 asn_TYPE_descriptor_t asn_DEF_SequenceOf = {
2554 &asn_OP_SEQUENCE_OF,
2555 asn_DEF_SequenceOf_tags_1,
2556 sizeof(asn_DEF_SequenceOf_tags_1)
2557 /sizeof(asn_DEF_SequenceOf_tags_1[0]), /* 1 */
2558 asn_DEF_SequenceOf_tags_1, /* Same as above */
2559 sizeof(asn_DEF_SequenceOf_tags_1)
2560 /sizeof(asn_DEF_SequenceOf_tags_1[0]), /* 1 */
2561 { 0, &asn_PER_type_SequenceOf_constr_1, SEQUENCE_OF_constraint },
2562 asn_MBR_SequenceOf_1,
2563 1, /* Single element */
2564 &asn_SPC_SequenceOf_specs_1 /* Additional specs */
2568 /*** <<< INCLUDES [Enum0] >>> ***/
2570 #include <NativeEnumerated.h>
2572 /*** <<< DEPS [Enum0] >>> ***/
2574 typedef enum Enum0 {
2579 /*** <<< TYPE-DECLS [Enum0] >>> ***/
2581 typedef long Enum0_t;
2583 /*** <<< FUNC-DECLS [Enum0] >>> ***/
2585 extern asn_TYPE_descriptor_t asn_DEF_Enum0;
2586 asn_struct_free_f Enum0_free;
2587 asn_struct_print_f Enum0_print;
2588 asn_constr_check_f Enum0_constraint;
2589 ber_type_decoder_f Enum0_decode_ber;
2590 der_type_encoder_f Enum0_encode_der;
2591 xer_type_decoder_f Enum0_decode_xer;
2592 xer_type_encoder_f Enum0_encode_xer;
2593 per_type_decoder_f Enum0_decode_uper;
2594 per_type_encoder_f Enum0_encode_uper;
2595 per_type_decoder_f Enum0_decode_aper;
2596 per_type_encoder_f Enum0_encode_aper;
2598 /*** <<< CODE [Enum0] >>> ***/
2601 * This type is implemented using NativeEnumerated,
2602 * so here we adjust the DEF accordingly.
2605 /*** <<< CTDEFS [Enum0] >>> ***/
2607 static asn_per_constraints_t asn_PER_type_Enum0_constr_1 CC_NOTUSED = {
2608 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
2609 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2610 0, 0 /* No PER value map */
2613 /*** <<< STAT-DEFS [Enum0] >>> ***/
2615 static const asn_INTEGER_enum_map_t asn_MAP_Enum0_value2enum_1[] = {
2619 static const unsigned int asn_MAP_Enum0_enum2value_1[] = {
2623 static const asn_INTEGER_specifics_t asn_SPC_Enum0_specs_1 = {
2624 asn_MAP_Enum0_value2enum_1, /* "tag" => N; sorted by tag */
2625 asn_MAP_Enum0_enum2value_1, /* N => "tag"; sorted by N */
2626 2, /* Number of elements in the maps */
2627 0, /* Enumeration is not extensible */
2628 1, /* Strict enumeration */
2629 0, /* Native long size */
2632 static const ber_tlv_tag_t asn_DEF_Enum0_tags_1[] = {
2633 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
2635 asn_TYPE_descriptor_t asn_DEF_Enum0 = {
2638 &asn_OP_NativeEnumerated,
2639 asn_DEF_Enum0_tags_1,
2640 sizeof(asn_DEF_Enum0_tags_1)
2641 /sizeof(asn_DEF_Enum0_tags_1[0]), /* 1 */
2642 asn_DEF_Enum0_tags_1, /* Same as above */
2643 sizeof(asn_DEF_Enum0_tags_1)
2644 /sizeof(asn_DEF_Enum0_tags_1[0]), /* 1 */
2645 { 0, &asn_PER_type_Enum0_constr_1, NativeEnumerated_constraint },
2646 0, 0, /* Defined elsewhere */
2647 &asn_SPC_Enum0_specs_1 /* Additional specs */
2651 /*** <<< INCLUDES [Enum1] >>> ***/
2653 #include <NativeEnumerated.h>
2655 /*** <<< DEPS [Enum1] >>> ***/
2657 typedef enum Enum1 {
2662 /*** <<< TYPE-DECLS [Enum1] >>> ***/
2664 typedef long Enum1_t;
2666 /*** <<< FUNC-DECLS [Enum1] >>> ***/
2668 extern asn_TYPE_descriptor_t asn_DEF_Enum1;
2669 asn_struct_free_f Enum1_free;
2670 asn_struct_print_f Enum1_print;
2671 asn_constr_check_f Enum1_constraint;
2672 ber_type_decoder_f Enum1_decode_ber;
2673 der_type_encoder_f Enum1_encode_der;
2674 xer_type_decoder_f Enum1_decode_xer;
2675 xer_type_encoder_f Enum1_encode_xer;
2676 per_type_decoder_f Enum1_decode_uper;
2677 per_type_encoder_f Enum1_encode_uper;
2678 per_type_decoder_f Enum1_decode_aper;
2679 per_type_encoder_f Enum1_encode_aper;
2681 /*** <<< CODE [Enum1] >>> ***/
2684 Enum1_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
2685 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
2689 ASN__CTFAIL(app_key, td, sptr,
2690 "%s: value not given (%s:%d)",
2691 td->name, __FILE__, __LINE__);
2695 value = *(const long *)sptr;
2698 /* Constraint check succeeded */
2701 ASN__CTFAIL(app_key, td, sptr,
2702 "%s: constraint failed (%s:%d)",
2703 td->name, __FILE__, __LINE__);
2709 * This type is implemented using NativeEnumerated,
2710 * so here we adjust the DEF accordingly.
2713 /*** <<< CTDEFS [Enum1] >>> ***/
2715 static asn_per_constraints_t asn_PER_type_Enum1_constr_1 CC_NOTUSED = {
2716 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
2717 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2718 0, 0 /* No PER value map */
2721 /*** <<< STAT-DEFS [Enum1] >>> ***/
2723 static const asn_INTEGER_enum_map_t asn_MAP_Enum1_value2enum_1[] = {
2727 static const unsigned int asn_MAP_Enum1_enum2value_1[] = {
2731 static const asn_INTEGER_specifics_t asn_SPC_Enum1_specs_1 = {
2732 asn_MAP_Enum1_value2enum_1, /* "tag" => N; sorted by tag */
2733 asn_MAP_Enum1_enum2value_1, /* N => "tag"; sorted by N */
2734 2, /* Number of elements in the maps */
2735 0, /* Enumeration is not extensible */
2736 1, /* Strict enumeration */
2737 0, /* Native long size */
2740 static const ber_tlv_tag_t asn_DEF_Enum1_tags_1[] = {
2741 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
2743 asn_TYPE_descriptor_t asn_DEF_Enum1 = {
2746 &asn_OP_NativeEnumerated,
2747 asn_DEF_Enum1_tags_1,
2748 sizeof(asn_DEF_Enum1_tags_1)
2749 /sizeof(asn_DEF_Enum1_tags_1[0]), /* 1 */
2750 asn_DEF_Enum1_tags_1, /* Same as above */
2751 sizeof(asn_DEF_Enum1_tags_1)
2752 /sizeof(asn_DEF_Enum1_tags_1[0]), /* 1 */
2753 { 0, &asn_PER_type_Enum1_constr_1, Enum1_constraint },
2754 0, 0, /* Defined elsewhere */
2755 &asn_SPC_Enum1_specs_1 /* Additional specs */
2759 /*** <<< INCLUDES [Identifier] >>> ***/
2761 #include <VisibleString.h>
2763 /*** <<< TYPE-DECLS [Identifier] >>> ***/
2765 typedef VisibleString_t Identifier_t;
2767 /*** <<< FUNC-DECLS [Identifier] >>> ***/
2769 extern asn_per_constraints_t asn_PER_type_Identifier_constr_1;
2770 extern asn_TYPE_descriptor_t asn_DEF_Identifier;
2771 asn_struct_free_f Identifier_free;
2772 asn_struct_print_f Identifier_print;
2773 asn_constr_check_f Identifier_constraint;
2774 ber_type_decoder_f Identifier_decode_ber;
2775 der_type_encoder_f Identifier_encode_der;
2776 xer_type_decoder_f Identifier_decode_xer;
2777 xer_type_encoder_f Identifier_encode_xer;
2778 per_type_decoder_f Identifier_decode_uper;
2779 per_type_encoder_f Identifier_encode_uper;
2780 per_type_decoder_f Identifier_decode_aper;
2781 per_type_encoder_f Identifier_encode_aper;
2783 /*** <<< CTABLES [Identifier] >>> ***/
2785 static const int permitted_alphabet_table_1[256] = {
2786 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
2787 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
2788 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* $ */
2789 2, 3, 4, 5, 6, 7, 8, 9,10,11, 0, 0, 0, 0, 0, 0, /* 0123456789 */
2790 0,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26, /* ABCDEFGHIJKLMNO */
2791 27,28,29,30,31,32,33,34,35,36,37, 0, 0, 0, 0,38, /* PQRSTUVWXYZ _ */
2792 0,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53, /* abcdefghijklmno */
2793 54,55,56,57,58,59,60,61,62,63,64, 0, 0, 0, 0, 0, /* pqrstuvwxyz */
2795 static const int permitted_alphabet_code2value_1[64] = {
2796 36,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,
2797 70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,
2798 86,87,88,89,90,95,97,98,99,100,101,102,103,104,105,106,
2799 107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,
2803 static int check_permitted_alphabet_1(const void *sptr) {
2804 const int *table = permitted_alphabet_table_1;
2805 /* The underlying type is VisibleString */
2806 const VisibleString_t *st = (const VisibleString_t *)sptr;
2807 const uint8_t *ch = st->buf;
2808 const uint8_t *end = ch + st->size;
2810 for(; ch < end; ch++) {
2812 if(!table[cv]) return -1;
2818 /*** <<< CODE [Identifier] >>> ***/
2821 Identifier_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
2822 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
2823 const VisibleString_t *st = (const VisibleString_t *)sptr;
2827 ASN__CTFAIL(app_key, td, sptr,
2828 "%s: value not given (%s:%d)",
2829 td->name, __FILE__, __LINE__);
2835 if((size >= 1 && size <= 32)
2836 && !check_permitted_alphabet_1(st)) {
2837 /* Constraint check succeeded */
2840 ASN__CTFAIL(app_key, td, sptr,
2841 "%s: constraint failed (%s:%d)",
2842 td->name, __FILE__, __LINE__);
2847 static int asn_PER_MAP_Identifier_1_v2c(unsigned int value) {
2848 if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0]))
2850 return permitted_alphabet_table_1[value] - 1;
2852 static int asn_PER_MAP_Identifier_1_c2v(unsigned int code) {
2853 if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0]))
2855 return permitted_alphabet_code2value_1[code];
2858 * This type is implemented using VisibleString,
2859 * so here we adjust the DEF accordingly.
2862 /*** <<< CTDEFS [Identifier] >>> ***/
2864 asn_per_constraints_t asn_PER_type_Identifier_constr_1 CC_NOTUSED = {
2865 { APC_CONSTRAINED, 6, 6, 36, 122 } /* (36..122) */,
2866 { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */,
2867 asn_PER_MAP_Identifier_1_v2c, /* Value to PER code map */
2868 asn_PER_MAP_Identifier_1_c2v /* PER code to value map */
2871 /*** <<< STAT-DEFS [Identifier] >>> ***/
2873 static const ber_tlv_tag_t asn_DEF_Identifier_tags_1[] = {
2874 (ASN_TAG_CLASS_UNIVERSAL | (26 << 2))
2876 asn_TYPE_descriptor_t asn_DEF_Identifier = {
2879 &asn_OP_VisibleString,
2880 asn_DEF_Identifier_tags_1,
2881 sizeof(asn_DEF_Identifier_tags_1)
2882 /sizeof(asn_DEF_Identifier_tags_1[0]), /* 1 */
2883 asn_DEF_Identifier_tags_1, /* Same as above */
2884 sizeof(asn_DEF_Identifier_tags_1)
2885 /sizeof(asn_DEF_Identifier_tags_1[0]), /* 1 */
2886 { 0, &asn_PER_type_Identifier_constr_1, Identifier_constraint },
2887 0, 0, /* No members */
2888 0 /* No specifics */
2892 /*** <<< asn_constant.h >>> ***/
2895 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
2898 #ifndef _ASN_CONSTANT_H
2899 #define _ASN_CONSTANT_H
2905 #define maxIdentifier (32)
2912 #endif /* _ASN_CONSTANT_H */