diff options
author | Lev Walkin <vlm@lionet.info> | 2004-09-10 15:49:15 +0000 |
---|---|---|
committer | Lev Walkin <vlm@lionet.info> | 2004-09-10 15:49:15 +0000 |
commit | 906654e1d7553fdc4c4eec40c13d87e5b610cbb5 (patch) | |
tree | b0d6bd9c91b2251cc22e6071d5de1c9f59dc0bd4 /tests | |
parent | fa30126db68138de5e8e62af8b8d04e30f1cf2b8 (diff) |
refactored tagging support
Diffstat (limited to 'tests')
-rw-r--r-- | tests/19-param-OK.asn1.-P | 4 | ||||
-rw-r--r-- | tests/31-set-of-OK.asn1.-P | 6 | ||||
-rw-r--r-- | tests/39-sequence-of-OK.asn1.-P | 3 | ||||
-rw-r--r-- | tests/42-real-life-OK.asn1.-PR | 10 | ||||
-rw-r--r-- | tests/43-recursion-OK.asn1.-P | 5 | ||||
-rw-r--r-- | tests/44-choice-in-sequence-OK.asn1.-P | 4 | ||||
-rw-r--r-- | tests/46-redefine-OK.asn1.-PR | 9 | ||||
-rw-r--r-- | tests/47-set-ext-OK.asn1.-P | 4 | ||||
-rw-r--r-- | tests/50-constraint-OK.asn1.-P | 114 | ||||
-rw-r--r-- | tests/60-any-OK.asn1.-P | 2 | ||||
-rw-r--r-- | tests/65-multi-tag-OK.asn1 | 29 | ||||
-rw-r--r-- | tests/65-multi-tag-OK.asn1.-P | 774 |
12 files changed, 841 insertions, 123 deletions
diff --git a/tests/19-param-OK.asn1.-P b/tests/19-param-OK.asn1.-P index ec393c08..bed6a5ff 100644 --- a/tests/19-param-OK.asn1.-P +++ b/tests/19-param-OK.asn1.-P @@ -117,7 +117,6 @@ asn1_TYPE_descriptor_t asn1_DEF_toBeSigned = { asn1_DEF_toBeSigned_tags, sizeof(asn1_DEF_toBeSigned_tags) /sizeof(asn1_DEF_toBeSigned_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_toBeSigned, 3, /* Elements count */ @@ -174,7 +173,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Certificate = { asn1_DEF_Certificate_tags, sizeof(asn1_DEF_Certificate_tags) /sizeof(asn1_DEF_Certificate_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_Certificate, 3, /* Elements count */ @@ -231,7 +229,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Name = { asn1_DEF_Name_tags, sizeof(asn1_DEF_Name_tags) /sizeof(asn1_DEF_Name_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_Name, 1, /* Single element */ @@ -343,7 +340,6 @@ asn1_TYPE_descriptor_t asn1_DEF_RelativeDistinguishedName = { asn1_DEF_RelativeDistinguishedName_tags, sizeof(asn1_DEF_RelativeDistinguishedName_tags) /sizeof(asn1_DEF_RelativeDistinguishedName_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_RelativeDistinguishedName, 1, /* Single element */ diff --git a/tests/31-set-of-OK.asn1.-P b/tests/31-set-of-OK.asn1.-P index b3c6ce63..e28455ae 100644 --- a/tests/31-set-of-OK.asn1.-P +++ b/tests/31-set-of-OK.asn1.-P @@ -48,7 +48,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Forest = { asn1_DEF_Forest_tags, sizeof(asn1_DEF_Forest_tags) /sizeof(asn1_DEF_Forest_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_Forest, 1, /* Single element */ @@ -120,7 +119,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Tree = { asn1_DEF_Tree_tags, sizeof(asn1_DEF_Tree_tags) /sizeof(asn1_DEF_Tree_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_Tree, 2, /* Elements count */ @@ -213,7 +211,6 @@ asn1_TYPE_descriptor_t asn1_DEF_trees = { asn1_DEF_trees_tags, sizeof(asn1_DEF_trees_tags) /sizeof(asn1_DEF_trees_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_trees, 1, /* Single element */ @@ -255,7 +252,6 @@ asn1_TYPE_descriptor_t asn1_DEF_anything_member = { asn1_DEF_anything_member_tags, sizeof(asn1_DEF_anything_member_tags) /sizeof(asn1_DEF_anything_member_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_anything_member, 1, /* Elements count */ @@ -290,7 +286,6 @@ asn1_TYPE_descriptor_t asn1_DEF_anything = { asn1_DEF_anything_tags, sizeof(asn1_DEF_anything_tags) /sizeof(asn1_DEF_anything_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_anything, 1, /* Single element */ @@ -343,7 +338,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Stuff = { asn1_DEF_Stuff_tags, sizeof(asn1_DEF_Stuff_tags) /sizeof(asn1_DEF_Stuff_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_Stuff, 2, /* Elements count */ diff --git a/tests/39-sequence-of-OK.asn1.-P b/tests/39-sequence-of-OK.asn1.-P index 2b8df8b1..a1f622bf 100644 --- a/tests/39-sequence-of-OK.asn1.-P +++ b/tests/39-sequence-of-OK.asn1.-P @@ -57,7 +57,6 @@ asn1_TYPE_descriptor_t asn1_DEF_collection = { asn1_DEF_collection_tags, sizeof(asn1_DEF_collection_tags) /sizeof(asn1_DEF_collection_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_collection, 1, /* Single element */ @@ -106,7 +105,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T = { asn1_DEF_T_tags, sizeof(asn1_DEF_T_tags) /sizeof(asn1_DEF_T_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_T, 2, /* Elements count */ @@ -179,7 +177,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T2 = { asn1_DEF_T2_tags, sizeof(asn1_DEF_T2_tags) /sizeof(asn1_DEF_T2_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_T2, 2, /* Elements count */ diff --git a/tests/42-real-life-OK.asn1.-PR b/tests/42-real-life-OK.asn1.-PR index 4cdd0392..385dcb9c 100644 --- a/tests/42-real-life-OK.asn1.-PR +++ b/tests/42-real-life-OK.asn1.-PR @@ -93,7 +93,6 @@ asn1_TYPE_descriptor_t asn1_DEF_varsets = { asn1_DEF_varsets_tags, sizeof(asn1_DEF_varsets_tags) /sizeof(asn1_DEF_varsets_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_varsets, 1, /* Single element */ @@ -142,7 +141,6 @@ asn1_TYPE_descriptor_t asn1_DEF_LogLine = { asn1_DEF_LogLine_tags, sizeof(asn1_DEF_LogLine_tags) /sizeof(asn1_DEF_LogLine_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_LogLine, 2, /* Elements count */ @@ -235,7 +233,6 @@ asn1_TYPE_descriptor_t asn1_DEF_vparts = { asn1_DEF_vparts_tags, sizeof(asn1_DEF_vparts_tags) /sizeof(asn1_DEF_vparts_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_vparts, 1, /* Single element */ @@ -284,7 +281,6 @@ asn1_TYPE_descriptor_t asn1_DEF_VariablePartSet = { asn1_DEF_VariablePartSet_tags, sizeof(asn1_DEF_VariablePartSet_tags) /sizeof(asn1_DEF_VariablePartSet_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_VariablePartSet, 2, /* Elements count */ @@ -405,7 +401,6 @@ asn1_TYPE_descriptor_t asn1_DEF_vset = { asn1_DEF_vset_tags, sizeof(asn1_DEF_vset_tags) /sizeof(asn1_DEF_vset_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_vset, 1, /* Single element */ @@ -455,7 +450,6 @@ asn1_TYPE_descriptor_t asn1_DEF_vrange = { asn1_DEF_vrange_tags, sizeof(asn1_DEF_vrange_tags) /sizeof(asn1_DEF_vrange_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_vrange, 2, /* Elements count */ @@ -501,7 +495,6 @@ asn1_TYPE_descriptor_t asn1_DEF_VariablePart = { CHOICE_outmost_tag, 0, /* No explicit tags (pointer) */ 0, /* No explicit tags (count) */ - 0, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_VariablePart, 2, /* Elements count */ @@ -590,7 +583,6 @@ asn1_TYPE_descriptor_t asn1_DEF_email = { asn1_DEF_email_tags, sizeof(asn1_DEF_email_tags) /sizeof(asn1_DEF_email_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_email, 1, /* Single element */ @@ -640,7 +632,6 @@ asn1_TYPE_descriptor_t asn1_DEF_notify = { asn1_DEF_notify_tags, sizeof(asn1_DEF_notify_tags) /sizeof(asn1_DEF_notify_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_notify, 2, /* Elements count */ @@ -689,7 +680,6 @@ asn1_TYPE_descriptor_t asn1_DEF_ActionItem = { asn1_DEF_ActionItem_tags, sizeof(asn1_DEF_ActionItem_tags) /sizeof(asn1_DEF_ActionItem_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_ActionItem, 2, /* Elements count */ diff --git a/tests/43-recursion-OK.asn1.-P b/tests/43-recursion-OK.asn1.-P index c89e881f..18c02d7c 100644 --- a/tests/43-recursion-OK.asn1.-P +++ b/tests/43-recursion-OK.asn1.-P @@ -66,7 +66,6 @@ asn1_TYPE_descriptor_t asn1_DEF_t_member1 = { asn1_DEF_t_member1_tags, sizeof(asn1_DEF_t_member1_tags) /sizeof(asn1_DEF_t_member1_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_t_member1, 1, /* Single element */ @@ -101,7 +100,6 @@ asn1_TYPE_descriptor_t asn1_DEF_t_member2 = { asn1_DEF_t_member2_tags, sizeof(asn1_DEF_t_member2_tags) /sizeof(asn1_DEF_t_member2_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_t_member2, 1, /* Single element */ @@ -166,7 +164,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Test_structure_1 = { asn1_DEF_Test_structure_1_tags, sizeof(asn1_DEF_Test_structure_1_tags) /sizeof(asn1_DEF_Test_structure_1_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_Test_structure_1, 4, /* Elements count */ @@ -244,7 +241,6 @@ asn1_TYPE_descriptor_t asn1_DEF_or = { asn1_DEF_or_tags, sizeof(asn1_DEF_or_tags) /sizeof(asn1_DEF_or_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_or, 1, /* Single element */ @@ -306,7 +302,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Choice_1 = { CHOICE_outmost_tag, 0, /* No explicit tags (pointer) */ 0, /* No explicit tags (count) */ - 0, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_Choice_1, 4, /* Elements count */ diff --git a/tests/44-choice-in-sequence-OK.asn1.-P b/tests/44-choice-in-sequence-OK.asn1.-P index 413ff00d..107cdb8d 100644 --- a/tests/44-choice-in-sequence-OK.asn1.-P +++ b/tests/44-choice-in-sequence-OK.asn1.-P @@ -108,7 +108,6 @@ asn1_TYPE_descriptor_t asn1_DEF_e = { CHOICE_outmost_tag, 0, /* No explicit tags (pointer) */ 0, /* No explicit tags (count) */ - 0, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_e, 2, /* Elements count */ @@ -155,7 +154,6 @@ asn1_TYPE_descriptor_t asn1_DEF_h = { CHOICE_outmost_tag, 0, /* No explicit tags (pointer) */ 0, /* No explicit tags (count) */ - 0, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_h, 2, /* Elements count */ @@ -219,7 +217,6 @@ asn1_TYPE_descriptor_t asn1_DEF_b = { CHOICE_outmost_tag, 0, /* No explicit tags (pointer) */ 0, /* No explicit tags (count) */ - 0, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_b, 4, /* Elements count */ @@ -272,7 +269,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T = { asn1_DEF_T_tags, sizeof(asn1_DEF_T_tags) /sizeof(asn1_DEF_T_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_T, 2, /* Elements count */ diff --git a/tests/46-redefine-OK.asn1.-PR b/tests/46-redefine-OK.asn1.-PR index c78b29f5..ea256a82 100644 --- a/tests/46-redefine-OK.asn1.-PR +++ b/tests/46-redefine-OK.asn1.-PR @@ -49,8 +49,7 @@ ber_dec_rval_t PrimitiveType_decode_ber(asn1_TYPE_descriptor_t *td, void **structure, void *bufptr, size_t size, int tag_mode) { PrimitiveType_inherit_TYPE_descriptor(td); - return td->ber_decoder(td, structure, - bufptr, size, tag_mode); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); } der_enc_rval_t @@ -92,7 +91,6 @@ asn1_TYPE_descriptor_t asn1_DEF_PrimitiveType = { asn1_DEF_PrimitiveType_tags, sizeof(asn1_DEF_PrimitiveType_tags) /sizeof(asn1_DEF_PrimitiveType_tags[0]), /* 1 */ - 1, /* Tags to skip */ -0, /* Unknown yet */ 0, 0, /* No members */ 0 /* No specifics */ @@ -154,7 +152,6 @@ asn1_TYPE_descriptor_t asn1_DEF_ConstructedType = { asn1_DEF_ConstructedType_tags, sizeof(asn1_DEF_ConstructedType_tags) /sizeof(asn1_DEF_ConstructedType_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_ConstructedType, 1, /* Elements count */ @@ -212,8 +209,7 @@ ber_dec_rval_t T_decode_ber(asn1_TYPE_descriptor_t *td, void **structure, void *bufptr, size_t size, int tag_mode) { T_inherit_TYPE_descriptor(td); - return td->ber_decoder(td, structure, - bufptr, size, tag_mode); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); } der_enc_rval_t @@ -255,7 +251,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T = { asn1_DEF_T_tags, sizeof(asn1_DEF_T_tags) /sizeof(asn1_DEF_T_tags[0]), /* 1 */ - 1, /* Tags to skip */ -0, /* Unknown yet */ 0, 0, /* Defined elsewhere */ 0 /* No specifics */ diff --git a/tests/47-set-ext-OK.asn1.-P b/tests/47-set-ext-OK.asn1.-P index 8354a16c..5a3e2c10 100644 --- a/tests/47-set-ext-OK.asn1.-P +++ b/tests/47-set-ext-OK.asn1.-P @@ -73,7 +73,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T1 = { asn1_DEF_T1_tags, sizeof(asn1_DEF_T1_tags) /sizeof(asn1_DEF_T1_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_T1, 1, /* Elements count */ @@ -155,7 +154,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T2 = { asn1_DEF_T2_tags, sizeof(asn1_DEF_T2_tags) /sizeof(asn1_DEF_T2_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_T2, 1, /* Elements count */ @@ -227,7 +225,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T3 = { CHOICE_outmost_tag, 0, /* No explicit tags (pointer) */ 0, /* No explicit tags (count) */ - 0, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_T3, 1, /* Elements count */ @@ -299,7 +296,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T4 = { CHOICE_outmost_tag, 0, /* No explicit tags (pointer) */ 0, /* No explicit tags (count) */ - 0, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_T4, 1, /* Elements count */ diff --git a/tests/50-constraint-OK.asn1.-P b/tests/50-constraint-OK.asn1.-P index 3ae2200a..4459f535 100644 --- a/tests/50-constraint-OK.asn1.-P +++ b/tests/50-constraint-OK.asn1.-P @@ -49,8 +49,7 @@ ber_dec_rval_t Int1_decode_ber(asn1_TYPE_descriptor_t *td, void **structure, void *bufptr, size_t size, int tag_mode) { Int1_inherit_TYPE_descriptor(td); - return td->ber_decoder(td, structure, - bufptr, size, tag_mode); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); } der_enc_rval_t @@ -92,7 +91,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Int1 = { asn1_DEF_Int1_tags, sizeof(asn1_DEF_Int1_tags) /sizeof(asn1_DEF_Int1_tags[0]), /* 1 */ - 1, /* Tags to skip */ -0, /* Unknown yet */ 0, 0, /* No members */ 0 /* No specifics */ @@ -167,8 +165,7 @@ ber_dec_rval_t Int2_decode_ber(asn1_TYPE_descriptor_t *td, void **structure, void *bufptr, size_t size, int tag_mode) { Int2_inherit_TYPE_descriptor(td); - return td->ber_decoder(td, structure, - bufptr, size, tag_mode); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); } der_enc_rval_t @@ -197,7 +194,7 @@ Int2_free(asn1_TYPE_descriptor_t *td, /*** <<< STAT-DEFS [Int2] >>> ***/ static ber_tlv_tag_t asn1_DEF_Int2_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (0 << 2)) + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn1_TYPE_descriptor_t asn1_DEF_Int2 = { "Int2", @@ -210,7 +207,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Int2 = { asn1_DEF_Int2_tags, sizeof(asn1_DEF_Int2_tags) /sizeof(asn1_DEF_Int2_tags[0]), /* 1 */ - 1, /* Tags to skip */ -0, /* Unknown yet */ 0, 0, /* No members */ 0 /* No specifics */ @@ -289,8 +285,7 @@ ber_dec_rval_t Int3_decode_ber(asn1_TYPE_descriptor_t *td, void **structure, void *bufptr, size_t size, int tag_mode) { Int3_inherit_TYPE_descriptor(td); - return td->ber_decoder(td, structure, - bufptr, size, tag_mode); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); } der_enc_rval_t @@ -319,7 +314,7 @@ Int3_free(asn1_TYPE_descriptor_t *td, /*** <<< STAT-DEFS [Int3] >>> ***/ static ber_tlv_tag_t asn1_DEF_Int3_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (0 << 2)) + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn1_TYPE_descriptor_t asn1_DEF_Int3 = { "Int3", @@ -332,7 +327,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Int3 = { asn1_DEF_Int3_tags, sizeof(asn1_DEF_Int3_tags) /sizeof(asn1_DEF_Int3_tags[0]), /* 1 */ - 1, /* Tags to skip */ -0, /* Unknown yet */ 0, 0, /* No members */ 0 /* No specifics */ @@ -411,8 +405,7 @@ ber_dec_rval_t Int4_decode_ber(asn1_TYPE_descriptor_t *td, void **structure, void *bufptr, size_t size, int tag_mode) { Int4_inherit_TYPE_descriptor(td); - return td->ber_decoder(td, structure, - bufptr, size, tag_mode); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); } der_enc_rval_t @@ -441,7 +434,7 @@ Int4_free(asn1_TYPE_descriptor_t *td, /*** <<< STAT-DEFS [Int4] >>> ***/ static ber_tlv_tag_t asn1_DEF_Int4_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (0 << 2)) + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn1_TYPE_descriptor_t asn1_DEF_Int4 = { "Int4", @@ -454,7 +447,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Int4 = { asn1_DEF_Int4_tags, sizeof(asn1_DEF_Int4_tags) /sizeof(asn1_DEF_Int4_tags[0]), /* 1 */ - 1, /* Tags to skip */ -0, /* Unknown yet */ 0, 0, /* No members */ 0 /* No specifics */ @@ -533,8 +525,7 @@ ber_dec_rval_t Int5_decode_ber(asn1_TYPE_descriptor_t *td, void **structure, void *bufptr, size_t size, int tag_mode) { Int5_inherit_TYPE_descriptor(td); - return td->ber_decoder(td, structure, - bufptr, size, tag_mode); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); } der_enc_rval_t @@ -563,7 +554,7 @@ Int5_free(asn1_TYPE_descriptor_t *td, /*** <<< STAT-DEFS [Int5] >>> ***/ static ber_tlv_tag_t asn1_DEF_Int5_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (0 << 2)) + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn1_TYPE_descriptor_t asn1_DEF_Int5 = { "Int5", @@ -576,7 +567,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Int5 = { asn1_DEF_Int5_tags, sizeof(asn1_DEF_Int5_tags) /sizeof(asn1_DEF_Int5_tags[0]), /* 1 */ - 1, /* Tags to skip */ -0, /* Unknown yet */ 0, 0, /* No members */ 0 /* No specifics */ @@ -655,8 +645,7 @@ ber_dec_rval_t ExtensibleExtensions_decode_ber(asn1_TYPE_descriptor_t *td, void **structure, void *bufptr, size_t size, int tag_mode) { ExtensibleExtensions_inherit_TYPE_descriptor(td); - return td->ber_decoder(td, structure, - bufptr, size, tag_mode); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); } der_enc_rval_t @@ -698,7 +687,6 @@ asn1_TYPE_descriptor_t asn1_DEF_ExtensibleExtensions = { asn1_DEF_ExtensibleExtensions_tags, sizeof(asn1_DEF_ExtensibleExtensions_tags) /sizeof(asn1_DEF_ExtensibleExtensions_tags[0]), /* 1 */ - 1, /* Tags to skip */ -0, /* Unknown yet */ 0, 0, /* No members */ 0 /* No specifics */ @@ -755,8 +743,7 @@ ber_dec_rval_t Str1_decode_ber(asn1_TYPE_descriptor_t *td, void **structure, void *bufptr, size_t size, int tag_mode) { Str1_inherit_TYPE_descriptor(td); - return td->ber_decoder(td, structure, - bufptr, size, tag_mode); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); } der_enc_rval_t @@ -798,7 +785,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Str1 = { asn1_DEF_Str1_tags, sizeof(asn1_DEF_Str1_tags) /sizeof(asn1_DEF_Str1_tags[0]), /* 1 */ - 1, /* Tags to skip */ -0, /* Unknown yet */ 0, 0, /* No members */ 0 /* No specifics */ @@ -889,8 +875,7 @@ ber_dec_rval_t Str2_decode_ber(asn1_TYPE_descriptor_t *td, void **structure, void *bufptr, size_t size, int tag_mode) { Str2_inherit_TYPE_descriptor(td); - return td->ber_decoder(td, structure, - bufptr, size, tag_mode); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); } der_enc_rval_t @@ -919,7 +904,7 @@ Str2_free(asn1_TYPE_descriptor_t *td, /*** <<< STAT-DEFS [Str2] >>> ***/ static ber_tlv_tag_t asn1_DEF_Str2_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (0 << 2)) + (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)) }; asn1_TYPE_descriptor_t asn1_DEF_Str2 = { "Str2", @@ -932,7 +917,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Str2 = { asn1_DEF_Str2_tags, sizeof(asn1_DEF_Str2_tags) /sizeof(asn1_DEF_Str2_tags[0]), /* 1 */ - 1, /* Tags to skip */ -0, /* Unknown yet */ 0, 0, /* No members */ 0 /* No specifics */ @@ -1034,8 +1018,7 @@ ber_dec_rval_t Str3_decode_ber(asn1_TYPE_descriptor_t *td, void **structure, void *bufptr, size_t size, int tag_mode) { Str3_inherit_TYPE_descriptor(td); - return td->ber_decoder(td, structure, - bufptr, size, tag_mode); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); } der_enc_rval_t @@ -1064,7 +1047,7 @@ Str3_free(asn1_TYPE_descriptor_t *td, /*** <<< STAT-DEFS [Str3] >>> ***/ static ber_tlv_tag_t asn1_DEF_Str3_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (0 << 2)) + (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)) }; asn1_TYPE_descriptor_t asn1_DEF_Str3 = { "Str3", @@ -1077,7 +1060,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Str3 = { asn1_DEF_Str3_tags, sizeof(asn1_DEF_Str3_tags) /sizeof(asn1_DEF_Str3_tags[0]), /* 1 */ - 1, /* Tags to skip */ -0, /* Unknown yet */ 0, 0, /* No members */ 0 /* No specifics */ @@ -1165,8 +1147,7 @@ ber_dec_rval_t Str4_decode_ber(asn1_TYPE_descriptor_t *td, void **structure, void *bufptr, size_t size, int tag_mode) { Str4_inherit_TYPE_descriptor(td); - return td->ber_decoder(td, structure, - bufptr, size, tag_mode); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); } der_enc_rval_t @@ -1208,7 +1189,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Str4 = { asn1_DEF_Str4_tags, sizeof(asn1_DEF_Str4_tags) /sizeof(asn1_DEF_Str4_tags[0]), /* 1 */ - 1, /* Tags to skip */ -0, /* Unknown yet */ 0, 0, /* No members */ 0 /* No specifics */ @@ -1296,8 +1276,7 @@ ber_dec_rval_t PER_Visible_decode_ber(asn1_TYPE_descriptor_t *td, void **structure, void *bufptr, size_t size, int tag_mode) { PER_Visible_inherit_TYPE_descriptor(td); - return td->ber_decoder(td, structure, - bufptr, size, tag_mode); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); } der_enc_rval_t @@ -1339,7 +1318,6 @@ asn1_TYPE_descriptor_t asn1_DEF_PER_Visible = { asn1_DEF_PER_Visible_tags, sizeof(asn1_DEF_PER_Visible_tags) /sizeof(asn1_DEF_PER_Visible_tags[0]), /* 1 */ - 1, /* Tags to skip */ -0, /* Unknown yet */ 0, 0, /* No members */ 0 /* No specifics */ @@ -1427,8 +1405,7 @@ ber_dec_rval_t PER_Visible_2_decode_ber(asn1_TYPE_descriptor_t *td, void **structure, void *bufptr, size_t size, int tag_mode) { PER_Visible_2_inherit_TYPE_descriptor(td); - return td->ber_decoder(td, structure, - bufptr, size, tag_mode); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); } der_enc_rval_t @@ -1457,7 +1434,7 @@ PER_Visible_2_free(asn1_TYPE_descriptor_t *td, /*** <<< STAT-DEFS [PER-Visible-2] >>> ***/ static ber_tlv_tag_t asn1_DEF_PER_Visible_2_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (0 << 2)) + (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)) }; asn1_TYPE_descriptor_t asn1_DEF_PER_Visible_2 = { "PER-Visible-2", @@ -1470,7 +1447,6 @@ asn1_TYPE_descriptor_t asn1_DEF_PER_Visible_2 = { asn1_DEF_PER_Visible_2_tags, sizeof(asn1_DEF_PER_Visible_2_tags) /sizeof(asn1_DEF_PER_Visible_2_tags[0]), /* 1 */ - 1, /* Tags to skip */ -0, /* Unknown yet */ 0, 0, /* No members */ 0 /* No specifics */ @@ -1558,8 +1534,7 @@ ber_dec_rval_t Not_PER_Visible_1_decode_ber(asn1_TYPE_descriptor_t *td, void **structure, void *bufptr, size_t size, int tag_mode) { Not_PER_Visible_1_inherit_TYPE_descriptor(td); - return td->ber_decoder(td, structure, - bufptr, size, tag_mode); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); } der_enc_rval_t @@ -1588,7 +1563,7 @@ Not_PER_Visible_1_free(asn1_TYPE_descriptor_t *td, /*** <<< STAT-DEFS [Not-PER-Visible-1] >>> ***/ static ber_tlv_tag_t asn1_DEF_Not_PER_Visible_1_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (0 << 2)) + (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)) }; asn1_TYPE_descriptor_t asn1_DEF_Not_PER_Visible_1 = { "Not-PER-Visible-1", @@ -1601,7 +1576,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Not_PER_Visible_1 = { asn1_DEF_Not_PER_Visible_1_tags, sizeof(asn1_DEF_Not_PER_Visible_1_tags) /sizeof(asn1_DEF_Not_PER_Visible_1_tags[0]), /* 1 */ - 1, /* Tags to skip */ -0, /* Unknown yet */ 0, 0, /* No members */ 0 /* No specifics */ @@ -1689,8 +1663,7 @@ ber_dec_rval_t Not_PER_Visible_2_decode_ber(asn1_TYPE_descriptor_t *td, void **structure, void *bufptr, size_t size, int tag_mode) { Not_PER_Visible_2_inherit_TYPE_descriptor(td); - return td->ber_decoder(td, structure, - bufptr, size, tag_mode); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); } der_enc_rval_t @@ -1719,7 +1692,7 @@ Not_PER_Visible_2_free(asn1_TYPE_descriptor_t *td, /*** <<< STAT-DEFS [Not-PER-Visible-2] >>> ***/ static ber_tlv_tag_t asn1_DEF_Not_PER_Visible_2_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (0 << 2)) + (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)) }; asn1_TYPE_descriptor_t asn1_DEF_Not_PER_Visible_2 = { "Not-PER-Visible-2", @@ -1732,7 +1705,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Not_PER_Visible_2 = { asn1_DEF_Not_PER_Visible_2_tags, sizeof(asn1_DEF_Not_PER_Visible_2_tags) /sizeof(asn1_DEF_Not_PER_Visible_2_tags[0]), /* 1 */ - 1, /* Tags to skip */ -0, /* Unknown yet */ 0, 0, /* No members */ 0 /* No specifics */ @@ -1820,8 +1792,7 @@ ber_dec_rval_t Not_PER_Visible_3_decode_ber(asn1_TYPE_descriptor_t *td, void **structure, void *bufptr, size_t size, int tag_mode) { Not_PER_Visible_3_inherit_TYPE_descriptor(td); - return td->ber_decoder(td, structure, - bufptr, size, tag_mode); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); } der_enc_rval_t @@ -1850,7 +1821,7 @@ Not_PER_Visible_3_free(asn1_TYPE_descriptor_t *td, /*** <<< STAT-DEFS [Not-PER-Visible-3] >>> ***/ static ber_tlv_tag_t asn1_DEF_Not_PER_Visible_3_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (0 << 2)) + (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)) }; asn1_TYPE_descriptor_t asn1_DEF_Not_PER_Visible_3 = { "Not-PER-Visible-3", @@ -1863,7 +1834,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Not_PER_Visible_3 = { asn1_DEF_Not_PER_Visible_3_tags, sizeof(asn1_DEF_Not_PER_Visible_3_tags) /sizeof(asn1_DEF_Not_PER_Visible_3_tags[0]), /* 1 */ - 1, /* Tags to skip */ -0, /* Unknown yet */ 0, 0, /* No members */ 0 /* No specifics */ @@ -1954,8 +1924,7 @@ ber_dec_rval_t SIZE_but_not_FROM_decode_ber(asn1_TYPE_descriptor_t *td, void **structure, void *bufptr, size_t size, int tag_mode) { SIZE_but_not_FROM_inherit_TYPE_descriptor(td); - return td->ber_decoder(td, structure, - bufptr, size, tag_mode); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); } der_enc_rval_t @@ -1984,7 +1953,7 @@ SIZE_but_not_FROM_free(asn1_TYPE_descriptor_t *td, /*** <<< STAT-DEFS [SIZE-but-not-FROM] >>> ***/ static ber_tlv_tag_t asn1_DEF_SIZE_but_not_FROM_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (0 << 2)) + (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)) }; asn1_TYPE_descriptor_t asn1_DEF_SIZE_but_not_FROM = { "SIZE-but-not-FROM", @@ -1997,7 +1966,6 @@ asn1_TYPE_descriptor_t asn1_DEF_SIZE_but_not_FROM = { asn1_DEF_SIZE_but_not_FROM_tags, sizeof(asn1_DEF_SIZE_but_not_FROM_tags) /sizeof(asn1_DEF_SIZE_but_not_FROM_tags[0]), /* 1 */ - 1, /* Tags to skip */ -0, /* Unknown yet */ 0, 0, /* No members */ 0 /* No specifics */ @@ -2088,8 +2056,7 @@ ber_dec_rval_t SIZE_and_FROM_decode_ber(asn1_TYPE_descriptor_t *td, void **structure, void *bufptr, size_t size, int tag_mode) { SIZE_and_FROM_inherit_TYPE_descriptor(td); - return td->ber_decoder(td, structure, - bufptr, size, tag_mode); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); } der_enc_rval_t @@ -2118,7 +2085,7 @@ SIZE_and_FROM_free(asn1_TYPE_descriptor_t *td, /*** <<< STAT-DEFS [SIZE-and-FROM] >>> ***/ static ber_tlv_tag_t asn1_DEF_SIZE_and_FROM_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (0 << 2)) + (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)) }; asn1_TYPE_descriptor_t asn1_DEF_SIZE_and_FROM = { "SIZE-and-FROM", @@ -2131,7 +2098,6 @@ asn1_TYPE_descriptor_t asn1_DEF_SIZE_and_FROM = { asn1_DEF_SIZE_and_FROM_tags, sizeof(asn1_DEF_SIZE_and_FROM_tags) /sizeof(asn1_DEF_SIZE_and_FROM_tags[0]), /* 1 */ - 1, /* Tags to skip */ -0, /* Unknown yet */ 0, 0, /* No members */ 0 /* No specifics */ @@ -2219,8 +2185,7 @@ ber_dec_rval_t Neither_SIZE_nor_FROM_decode_ber(asn1_TYPE_descriptor_t *td, void **structure, void *bufptr, size_t size, int tag_mode) { Neither_SIZE_nor_FROM_inherit_TYPE_descriptor(td); - return td->ber_decoder(td, structure, - bufptr, size, tag_mode); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); } der_enc_rval_t @@ -2249,7 +2214,7 @@ Neither_SIZE_nor_FROM_free(asn1_TYPE_descriptor_t *td, /*** <<< STAT-DEFS [Neither-SIZE-nor-FROM] >>> ***/ static ber_tlv_tag_t asn1_DEF_Neither_SIZE_nor_FROM_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (0 << 2)) + (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)) }; asn1_TYPE_descriptor_t asn1_DEF_Neither_SIZE_nor_FROM = { "Neither-SIZE-nor-FROM", @@ -2262,7 +2227,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Neither_SIZE_nor_FROM = { asn1_DEF_Neither_SIZE_nor_FROM_tags, sizeof(asn1_DEF_Neither_SIZE_nor_FROM_tags) /sizeof(asn1_DEF_Neither_SIZE_nor_FROM_tags[0]), /* 1 */ - 1, /* Tags to skip */ -0, /* Unknown yet */ 0, 0, /* No members */ 0 /* No specifics */ @@ -2367,8 +2331,7 @@ ber_dec_rval_t Utf8_3_decode_ber(asn1_TYPE_descriptor_t *td, void **structure, void *bufptr, size_t size, int tag_mode) { Utf8_3_inherit_TYPE_descriptor(td); - return td->ber_decoder(td, structure, - bufptr, size, tag_mode); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); } der_enc_rval_t @@ -2397,7 +2360,7 @@ Utf8_3_free(asn1_TYPE_descriptor_t *td, /*** <<< STAT-DEFS [Utf8-3] >>> ***/ static ber_tlv_tag_t asn1_DEF_Utf8_3_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (0 << 2)) + (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)) }; asn1_TYPE_descriptor_t asn1_DEF_Utf8_3 = { "Utf8-3", @@ -2410,7 +2373,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Utf8_3 = { asn1_DEF_Utf8_3_tags, sizeof(asn1_DEF_Utf8_3_tags) /sizeof(asn1_DEF_Utf8_3_tags[0]), /* 1 */ - 1, /* Tags to skip */ -0, /* Unknown yet */ 0, 0, /* No members */ 0 /* No specifics */ @@ -2485,8 +2447,7 @@ ber_dec_rval_t Utf8_2_decode_ber(asn1_TYPE_descriptor_t *td, void **structure, void *bufptr, size_t size, int tag_mode) { Utf8_2_inherit_TYPE_descriptor(td); - return td->ber_decoder(td, structure, - bufptr, size, tag_mode); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); } der_enc_rval_t @@ -2515,7 +2476,7 @@ Utf8_2_free(asn1_TYPE_descriptor_t *td, /*** <<< STAT-DEFS [Utf8-2] >>> ***/ static ber_tlv_tag_t asn1_DEF_Utf8_2_tags[] = { - (ASN_TAG_CLASS_UNIVERSAL | (0 << 2)) + (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)) }; asn1_TYPE_descriptor_t asn1_DEF_Utf8_2 = { "Utf8-2", @@ -2528,7 +2489,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Utf8_2 = { asn1_DEF_Utf8_2_tags, sizeof(asn1_DEF_Utf8_2_tags) /sizeof(asn1_DEF_Utf8_2_tags[0]), /* 1 */ - 1, /* Tags to skip */ -0, /* Unknown yet */ 0, 0, /* No members */ 0 /* No specifics */ @@ -2585,8 +2545,7 @@ ber_dec_rval_t Utf8_1_decode_ber(asn1_TYPE_descriptor_t *td, void **structure, void *bufptr, size_t size, int tag_mode) { Utf8_1_inherit_TYPE_descriptor(td); - return td->ber_decoder(td, structure, - bufptr, size, tag_mode); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); } der_enc_rval_t @@ -2628,7 +2587,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Utf8_1 = { asn1_DEF_Utf8_1_tags, sizeof(asn1_DEF_Utf8_1_tags) /sizeof(asn1_DEF_Utf8_1_tags[0]), /* 1 */ - 1, /* Tags to skip */ -0, /* Unknown yet */ 0, 0, /* No members */ 0 /* No specifics */ diff --git a/tests/60-any-OK.asn1.-P b/tests/60-any-OK.asn1.-P index 96098a58..86d47f4b 100644 --- a/tests/60-any-OK.asn1.-P +++ b/tests/60-any-OK.asn1.-P @@ -63,7 +63,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T1 = { asn1_DEF_T1_tags, sizeof(asn1_DEF_T1_tags) /sizeof(asn1_DEF_T1_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_T1, 2, /* Elements count */ @@ -136,7 +135,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T2 = { asn1_DEF_T2_tags, sizeof(asn1_DEF_T2_tags) /sizeof(asn1_DEF_T2_tags[0]), /* 1 */ - 1, /* Tags to skip */ 1, /* Whether CONSTRUCTED */ asn1_MBR_T2, 2, /* Elements count */ diff --git a/tests/65-multi-tag-OK.asn1 b/tests/65-multi-tag-OK.asn1 new file mode 100644 index 00000000..32e85cc3 --- /dev/null +++ b/tests/65-multi-tag-OK.asn1 @@ -0,0 +1,29 @@ + +-- OK: Everything is fine + +-- iso.org.dod.internet.private.enterprise (1.3.6.1.4.1) +-- .spelio.software.asn1c.test (9363.1.5.1) +-- .65 + +ModuleTestMultipleTags + { iso org(3) dod(6) internet(1) private(4) enterprise(1) + spelio(9363) software(1) asn1c(5) test(1) 65 } + DEFINITIONS ::= +BEGIN + + T1 ::= [2] EXPLICIT T2 + T2 ::= [3] EXPLICIT T3 + T3 ::= [4] IMPLICIT T4 + T4 ::= [5] EXPLICIT T5 + T5 ::= [6] IMPLICIT T6 + T6 ::= INTEGER + + T ::= [0] IMPLICIT Ts + + Ts ::= [123] IMPLICIT SEQUENCE { + m1 [1] IMPLICIT T2, -- [1][4][6] + m2 [2] EXPLICIT T3 OPTIONAL, -- [2][4][6] + m3 [3] IMPLICIT T3 -- [3][6] + } + +END diff --git a/tests/65-multi-tag-OK.asn1.-P b/tests/65-multi-tag-OK.asn1.-P new file mode 100644 index 00000000..fec7c9cb --- /dev/null +++ b/tests/65-multi-tag-OK.asn1.-P @@ -0,0 +1,774 @@ + +/*** <<< INCLUDES [T1] >>> ***/ + +#include <T2.h> + +/*** <<< TYPE-DECLS [T1] >>> ***/ + + +typedef T2_t T1_t; + +/*** <<< FUNC-DECLS [T1] >>> ***/ + +extern asn1_TYPE_descriptor_t asn1_DEF_T1; +asn_constr_check_f T1_constraint; +ber_type_decoder_f T1_decode_ber; +der_type_encoder_f T1_encode_der; +asn_struct_print_f T1_print; +asn_struct_free_f T1_free; + +/*** <<< CODE [T1] >>> ***/ + +int +T1_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, + asn_app_consume_bytes_f *app_errlog, void *app_key) { + + /* Make the underlying type checker permanent */ + td->check_constraints = asn1_DEF_T2.check_constraints; + return td->check_constraints + (td, sptr, app_errlog, app_key); +} + +/* + * This type is implemented using T2, + * so adjust the DEF appropriately. + */ +static void +T1_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) { + td->ber_decoder = asn1_DEF_T2.ber_decoder; + td->der_encoder = asn1_DEF_T2.der_encoder; + td->free_struct = asn1_DEF_T2.free_struct; + td->print_struct = asn1_DEF_T2.print_struct; + td->last_tag_form = asn1_DEF_T2.last_tag_form; + td->elements = asn1_DEF_T2.elements; + td->elements_count = asn1_DEF_T2.elements_count; + td->specifics = asn1_DEF_T2.specifics; +} + +ber_dec_rval_t +T1_decode_ber(asn1_TYPE_descriptor_t *td, + void **structure, void *bufptr, size_t size, int tag_mode) { + T1_inherit_TYPE_descriptor(td); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); +} + +der_enc_rval_t +T1_encode_der(asn1_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + T1_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +int +T1_print(asn1_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + T1_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +void +T1_free(asn1_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + T1_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + + +/*** <<< STAT-DEFS [T1] >>> ***/ + +static ber_tlv_tag_t asn1_DEF_T1_tags[] = { + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)) +}; +asn1_TYPE_descriptor_t asn1_DEF_T1 = { + "T1", + T1_constraint, + T1_decode_ber, + T1_encode_der, + T1_print, + T1_free, + 0, /* Use generic outmost tag fetcher */ + asn1_DEF_T1_tags, + sizeof(asn1_DEF_T1_tags) + /sizeof(asn1_DEF_T1_tags[0]), /* 4 */ + -0, /* Unknown yet */ + 0, 0, /* No members */ + 0 /* No specifics */ +}; + + +/*** <<< INCLUDES [T2] >>> ***/ + +#include <T3.h> + +/*** <<< TYPE-DECLS [T2] >>> ***/ + + +typedef T3_t T2_t; + +/*** <<< FUNC-DECLS [T2] >>> ***/ + +extern asn1_TYPE_descriptor_t asn1_DEF_T2; +asn_constr_check_f T2_constraint; +ber_type_decoder_f T2_decode_ber; +der_type_encoder_f T2_encode_der; +asn_struct_print_f T2_print; +asn_struct_free_f T2_free; + +/*** <<< CODE [T2] >>> ***/ + +int +T2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, + asn_app_consume_bytes_f *app_errlog, void *app_key) { + + /* Make the underlying type checker permanent */ + td->check_constraints = asn1_DEF_T3.check_constraints; + return td->check_constraints + (td, sptr, app_errlog, app_key); +} + +/* + * This type is implemented using T3, + * so adjust the DEF appropriately. + */ +static void +T2_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) { + td->ber_decoder = asn1_DEF_T3.ber_decoder; + td->der_encoder = asn1_DEF_T3.der_encoder; + td->free_struct = asn1_DEF_T3.free_struct; + td->print_struct = asn1_DEF_T3.print_struct; + td->last_tag_form = asn1_DEF_T3.last_tag_form; + td->elements = asn1_DEF_T3.elements; + td->elements_count = asn1_DEF_T3.elements_count; + td->specifics = asn1_DEF_T3.specifics; +} + +ber_dec_rval_t +T2_decode_ber(asn1_TYPE_descriptor_t *td, + void **structure, void *bufptr, size_t size, int tag_mode) { + T2_inherit_TYPE_descriptor(td); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); +} + +der_enc_rval_t +T2_encode_der(asn1_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + T2_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +int +T2_print(asn1_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + T2_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +void +T2_free(asn1_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + T2_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + + +/*** <<< STAT-DEFS [T2] >>> ***/ + +static ber_tlv_tag_t asn1_DEF_T2_tags[] = { + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)) +}; +asn1_TYPE_descriptor_t asn1_DEF_T2 = { + "T2", + T2_constraint, + T2_decode_ber, + T2_encode_der, + T2_print, + T2_free, + 0, /* Use generic outmost tag fetcher */ + asn1_DEF_T2_tags, + sizeof(asn1_DEF_T2_tags) + /sizeof(asn1_DEF_T2_tags[0]), /* 3 */ + -0, /* Unknown yet */ + 0, 0, /* No members */ + 0 /* No specifics */ +}; + + +/*** <<< INCLUDES [T3] >>> ***/ + +#include <T4.h> + +/*** <<< TYPE-DECLS [T3] >>> ***/ + + +typedef T4_t T3_t; + +/*** <<< FUNC-DECLS [T3] >>> ***/ + +extern asn1_TYPE_descriptor_t asn1_DEF_T3; +asn_constr_check_f T3_constraint; +ber_type_decoder_f T3_decode_ber; +der_type_encoder_f T3_encode_der; +asn_struct_print_f T3_print; +asn_struct_free_f T3_free; + +/*** <<< CODE [T3] >>> ***/ + +int +T3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, + asn_app_consume_bytes_f *app_errlog, void *app_key) { + + /* Make the underlying type checker permanent */ + td->check_constraints = asn1_DEF_T4.check_constraints; + return td->check_constraints + (td, sptr, app_errlog, app_key); +} + +/* + * This type is implemented using T4, + * so adjust the DEF appropriately. + */ +static void +T3_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) { + td->ber_decoder = asn1_DEF_T4.ber_decoder; + td->der_encoder = asn1_DEF_T4.der_encoder; + td->free_struct = asn1_DEF_T4.free_struct; + td->print_struct = asn1_DEF_T4.print_struct; + td->last_tag_form = asn1_DEF_T4.last_tag_form; + td->elements = asn1_DEF_T4.elements; + td->elements_count = asn1_DEF_T4.elements_count; + td->specifics = asn1_DEF_T4.specifics; +} + +ber_dec_rval_t +T3_decode_ber(asn1_TYPE_descriptor_t *td, + void **structure, void *bufptr, size_t size, int tag_mode) { + T3_inherit_TYPE_descriptor(td); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); +} + +der_enc_rval_t +T3_encode_der(asn1_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + T3_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +int +T3_print(asn1_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + T3_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +void +T3_free(asn1_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + T3_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + + +/*** <<< STAT-DEFS [T3] >>> ***/ + +static ber_tlv_tag_t asn1_DEF_T3_tags[] = { + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)) +}; +asn1_TYPE_descriptor_t asn1_DEF_T3 = { + "T3", + T3_constraint, + T3_decode_ber, + T3_encode_der, + T3_print, + T3_free, + 0, /* Use generic outmost tag fetcher */ + asn1_DEF_T3_tags, + sizeof(asn1_DEF_T3_tags) + /sizeof(asn1_DEF_T3_tags[0]), /* 2 */ + -0, /* Unknown yet */ + 0, 0, /* No members */ + 0 /* No specifics */ +}; + + +/*** <<< INCLUDES [T4] >>> ***/ + +#include <T5.h> + +/*** <<< TYPE-DECLS [T4] >>> ***/ + + +typedef T5_t T4_t; + +/*** <<< FUNC-DECLS [T4] >>> ***/ + +extern asn1_TYPE_descriptor_t asn1_DEF_T4; +asn_constr_check_f T4_constraint; +ber_type_decoder_f T4_decode_ber; +der_type_encoder_f T4_encode_der; +asn_struct_print_f T4_print; +asn_struct_free_f T4_free; + +/*** <<< CODE [T4] >>> ***/ + +int +T4_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, + asn_app_consume_bytes_f *app_errlog, void *app_key) { + + /* Make the underlying type checker permanent */ + td->check_constraints = asn1_DEF_T5.check_constraints; + return td->check_constraints + (td, sptr, app_errlog, app_key); +} + +/* + * This type is implemented using T5, + * so adjust the DEF appropriately. + */ +static void +T4_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) { + td->ber_decoder = asn1_DEF_T5.ber_decoder; + td->der_encoder = asn1_DEF_T5.der_encoder; + td->free_struct = asn1_DEF_T5.free_struct; + td->print_struct = asn1_DEF_T5.print_struct; + td->last_tag_form = asn1_DEF_T5.last_tag_form; + td->elements = asn1_DEF_T5.elements; + td->elements_count = asn1_DEF_T5.elements_count; + td->specifics = asn1_DEF_T5.specifics; +} + +ber_dec_rval_t +T4_decode_ber(asn1_TYPE_descriptor_t *td, + void **structure, void *bufptr, size_t size, int tag_mode) { + T4_inherit_TYPE_descriptor(td); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); +} + +der_enc_rval_t +T4_encode_der(asn1_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + T4_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +int +T4_print(asn1_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + T4_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +void +T4_free(asn1_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + T4_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + + +/*** <<< STAT-DEFS [T4] >>> ***/ + +static ber_tlv_tag_t asn1_DEF_T4_tags[] = { + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)) +}; +asn1_TYPE_descriptor_t asn1_DEF_T4 = { + "T4", + T4_constraint, + T4_decode_ber, + T4_encode_der, + T4_print, + T4_free, + 0, /* Use generic outmost tag fetcher */ + asn1_DEF_T4_tags, + sizeof(asn1_DEF_T4_tags) + /sizeof(asn1_DEF_T4_tags[0]), /* 2 */ + -0, /* Unknown yet */ + 0, 0, /* No members */ + 0 /* No specifics */ +}; + + +/*** <<< INCLUDES [T5] >>> ***/ + +#include <T6.h> + +/*** <<< TYPE-DECLS [T5] >>> ***/ + + +typedef T6_t T5_t; + +/*** <<< FUNC-DECLS [T5] >>> ***/ + +extern asn1_TYPE_descriptor_t asn1_DEF_T5; +asn_constr_check_f T5_constraint; +ber_type_decoder_f T5_decode_ber; +der_type_encoder_f T5_encode_der; +asn_struct_print_f T5_print; +asn_struct_free_f T5_free; + +/*** <<< CODE [T5] >>> ***/ + +int +T5_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, + asn_app_consume_bytes_f *app_errlog, void *app_key) { + + /* Make the underlying type checker permanent */ + td->check_constraints = asn1_DEF_T6.check_constraints; + return td->check_constraints + (td, sptr, app_errlog, app_key); +} + +/* + * This type is implemented using T6, + * so adjust the DEF appropriately. + */ +static void +T5_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) { + td->ber_decoder = asn1_DEF_T6.ber_decoder; + td->der_encoder = asn1_DEF_T6.der_encoder; + td->free_struct = asn1_DEF_T6.free_struct; + td->print_struct = asn1_DEF_T6.print_struct; + td->last_tag_form = asn1_DEF_T6.last_tag_form; + td->elements = asn1_DEF_T6.elements; + td->elements_count = asn1_DEF_T6.elements_count; + td->specifics = asn1_DEF_T6.specifics; +} + +ber_dec_rval_t +T5_decode_ber(asn1_TYPE_descriptor_t *td, + void **structure, void *bufptr, size_t size, int tag_mode) { + T5_inherit_TYPE_descriptor(td); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); +} + +der_enc_rval_t +T5_encode_der(asn1_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + T5_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +int +T5_print(asn1_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + T5_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +void +T5_free(asn1_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + T5_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + + +/*** <<< STAT-DEFS [T5] >>> ***/ + +static ber_tlv_tag_t asn1_DEF_T5_tags[] = { + (ASN_TAG_CLASS_CONTEXT | (6 << 2)) +}; +asn1_TYPE_descriptor_t asn1_DEF_T5 = { + "T5", + T5_constraint, + T5_decode_ber, + T5_encode_der, + T5_print, + T5_free, + 0, /* Use generic outmost tag fetcher */ + asn1_DEF_T5_tags, + sizeof(asn1_DEF_T5_tags) + /sizeof(asn1_DEF_T5_tags[0]), /* 1 */ + -0, /* Unknown yet */ + 0, 0, /* No members */ + 0 /* No specifics */ +}; + + +/*** <<< INCLUDES [T6] >>> ***/ + +#include <INTEGER.h> + +/*** <<< TYPE-DECLS [T6] >>> ***/ + + +typedef INTEGER_t T6_t; + +/*** <<< FUNC-DECLS [T6] >>> ***/ + +extern asn1_TYPE_descriptor_t asn1_DEF_T6; +asn_constr_check_f T6_constraint; +ber_type_decoder_f T6_decode_ber; +der_type_encoder_f T6_encode_der; +asn_struct_print_f T6_print; +asn_struct_free_f T6_free; + +/*** <<< CODE [T6] >>> ***/ + +int +T6_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, + asn_app_consume_bytes_f *app_errlog, void *app_key) { + + /* Make the underlying type checker permanent */ + td->check_constraints = asn1_DEF_INTEGER.check_constraints; + return td->check_constraints + (td, sptr, app_errlog, app_key); +} + +/* + * This type is implemented using INTEGER, + * so adjust the DEF appropriately. + */ +static void +T6_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) { + td->ber_decoder = asn1_DEF_INTEGER.ber_decoder; + td->der_encoder = asn1_DEF_INTEGER.der_encoder; + td->free_struct = asn1_DEF_INTEGER.free_struct; + td->print_struct = asn1_DEF_INTEGER.print_struct; + td->last_tag_form = asn1_DEF_INTEGER.last_tag_form; + td->elements = asn1_DEF_INTEGER.elements; + td->elements_count = asn1_DEF_INTEGER.elements_count; + td->specifics = asn1_DEF_INTEGER.specifics; +} + +ber_dec_rval_t +T6_decode_ber(asn1_TYPE_descriptor_t *td, + void **structure, void *bufptr, size_t size, int tag_mode) { + T6_inherit_TYPE_descriptor(td); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); +} + +der_enc_rval_t +T6_encode_der(asn1_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + T6_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +int +T6_print(asn1_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + T6_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +void +T6_free(asn1_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + T6_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + + +/*** <<< STAT-DEFS [T6] >>> ***/ + +static ber_tlv_tag_t asn1_DEF_T6_tags[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn1_TYPE_descriptor_t asn1_DEF_T6 = { + "T6", + T6_constraint, + T6_decode_ber, + T6_encode_der, + T6_print, + T6_free, + 0, /* Use generic outmost tag fetcher */ + asn1_DEF_T6_tags, + sizeof(asn1_DEF_T6_tags) + /sizeof(asn1_DEF_T6_tags[0]), /* 1 */ + -0, /* Unknown yet */ + 0, 0, /* No members */ + 0 /* No specifics */ +}; + + +/*** <<< INCLUDES [T] >>> ***/ + +#include <Ts.h> + +/*** <<< TYPE-DECLS [T] >>> ***/ + + +typedef Ts_t T_t; + +/*** <<< FUNC-DECLS [T] >>> ***/ + +extern asn1_TYPE_descriptor_t asn1_DEF_T; +asn_constr_check_f T_constraint; +ber_type_decoder_f T_decode_ber; +der_type_encoder_f T_encode_der; +asn_struct_print_f T_print; +asn_struct_free_f T_free; + +/*** <<< CODE [T] >>> ***/ + +int +T_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, + asn_app_consume_bytes_f *app_errlog, void *app_key) { + + /* Make the underlying type checker permanent */ + td->check_constraints = asn1_DEF_Ts.check_constraints; + return td->check_constraints + (td, sptr, app_errlog, app_key); +} + +/* + * This type is implemented using Ts, + * so adjust the DEF appropriately. + */ +static void +T_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) { + td->ber_decoder = asn1_DEF_Ts.ber_decoder; + td->der_encoder = asn1_DEF_Ts.der_encoder; + td->free_struct = asn1_DEF_Ts.free_struct; + td->print_struct = asn1_DEF_Ts.print_struct; + td->last_tag_form = asn1_DEF_Ts.last_tag_form; + td->elements = asn1_DEF_Ts.elements; + td->elements_count = asn1_DEF_Ts.elements_count; + td->specifics = asn1_DEF_Ts.specifics; +} + +ber_dec_rval_t +T_decode_ber(asn1_TYPE_descriptor_t *td, + void **structure, void *bufptr, size_t size, int tag_mode) { + T_inherit_TYPE_descriptor(td); + return td->ber_decoder(td, structure, bufptr, size, tag_mode); +} + +der_enc_rval_t +T_encode_der(asn1_TYPE_descriptor_t *td, + void *structure, int tag_mode, ber_tlv_tag_t tag, + asn_app_consume_bytes_f *cb, void *app_key) { + T_inherit_TYPE_descriptor(td); + return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); +} + +int +T_print(asn1_TYPE_descriptor_t *td, const void *struct_ptr, + int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { + T_inherit_TYPE_descriptor(td); + return td->print_struct(td, struct_ptr, ilevel, cb, app_key); +} + +void +T_free(asn1_TYPE_descriptor_t *td, + void *struct_ptr, int contents_only) { + T_inherit_TYPE_descriptor(td); + td->free_struct(td, struct_ptr, contents_only); +} + + +/*** <<< STAT-DEFS [T] >>> ***/ + +static ber_tlv_tag_t asn1_DEF_T_tags[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)) +}; +asn1_TYPE_descriptor_t asn1_DEF_T = { + "T", + T_constraint, + T_decode_ber, + T_encode_der, + T_print, + T_free, + 0, /* Use generic outmost tag fetcher */ + asn1_DEF_T_tags, + sizeof(asn1_DEF_T_tags) + /sizeof(asn1_DEF_T_tags[0]), /* 1 */ + -0, /* Unknown yet */ + 0, 0, /* Defined elsewhere */ + 0 /* No specifics */ +}; + + +/*** <<< INCLUDES [Ts] >>> ***/ + +#include <T2.h> +#include <T3.h> +#include <constr_SEQUENCE.h> + +/*** <<< DEPS [Ts] >>> ***/ + +extern asn1_TYPE_descriptor_t asn1_DEF_Ts; + +/*** <<< TYPE-DECLS [Ts] >>> ***/ + + +typedef struct Ts { + T2_t m1; + T3_t *m2 /* OPTIONAL */; + T3_t m3; + + /* Context for parsing across buffer boundaries */ + ber_dec_ctx_t _ber_dec_ctx; +} Ts_t; + +/*** <<< STAT-DEFS [Ts] >>> ***/ + +static asn1_TYPE_member_t asn1_MBR_Ts[] = { + { ATF_NOFLAGS, 0, offsetof(struct Ts, m1), + .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + .tag_mode = -1, /* IMPLICIT tag at current level */ + .type = (void *)&asn1_DEF_T2, + .memb_constraints = 0, /* Defer to actual type */ + .name = "m1" + }, + { ATF_POINTER, 1, offsetof(struct Ts, m2), + .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + .tag_mode = +1, /* EXPLICIT tag at current level */ + .type = (void *)&asn1_DEF_T3, + .memb_constraints = 0, /* Defer to actual type */ + .name = "m2" + }, + { ATF_NOFLAGS, 0, offsetof(struct Ts, m3), + .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + .tag_mode = -1, /* IMPLICIT tag at current level */ + .type = (void *)&asn1_DEF_T3, + .memb_constraints = 0, /* Defer to actual type */ + .name = "m3" + }, +}; +static ber_tlv_tag_t asn1_DEF_Ts_tags[] = { + (ASN_TAG_CLASS_CONTEXT | (123 << 2)) +}; +static asn1_TYPE_tag2member_t asn1_DEF_Ts_tag2el[] = { + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* m1 at 24 */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* m2 at 25 */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* m3 at 27 */ +}; +static asn1_SEQUENCE_specifics_t asn1_DEF_Ts_specs = { + sizeof(struct Ts), + offsetof(struct Ts, _ber_dec_ctx), + asn1_DEF_Ts_tag2el, + 3, /* Count of tags in the map */ + -1, /* Start extensions */ + -1 /* Stop extensions */ +}; +asn1_TYPE_descriptor_t asn1_DEF_Ts = { + "Ts", + SEQUENCE_constraint, + SEQUENCE_decode_ber, + SEQUENCE_encode_der, + SEQUENCE_print, + SEQUENCE_free, + 0, /* Use generic outmost tag fetcher */ + asn1_DEF_Ts_tags, + sizeof(asn1_DEF_Ts_tags) + /sizeof(asn1_DEF_Ts_tags[0]), /* 1 */ + 1, /* Whether CONSTRUCTED */ + asn1_MBR_Ts, + 3, /* Elements count */ + &asn1_DEF_Ts_specs /* Additional specs */ +}; + |