Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [Type] >>> ***/ |
| 3 | |
| 4 | #include <asn_SET_OF.h> |
Lev Walkin | 22b5ed4 | 2006-09-13 02:51:20 +0000 | [diff] [blame] | 5 | #include "Type1.h" |
| 6 | #include "Type2.h" |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 7 | #include <constr_SEQUENCE.h> |
| 8 | #include <constr_SET_OF.h> |
| 9 | |
Bi-Ruei, Chiu | 9b87e5b | 2016-06-06 00:23:16 +0800 | [diff] [blame] | 10 | /*** <<< FWD-DEFS [Type] >>> ***/ |
| 11 | |
| 12 | typedef struct Member { |
| 13 | Type1_t t1; |
| 14 | Type2_t t2; |
| 15 | |
| 16 | /* Context for parsing across buffer boundaries */ |
| 17 | asn_struct_ctx_t _asn_ctx; |
| 18 | } Member; |
| 19 | |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 20 | /*** <<< TYPE-DECLS [Type] >>> ***/ |
| 21 | |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 22 | typedef struct Type { |
Bi-Ruei, Chiu | 9b87e5b | 2016-06-06 00:23:16 +0800 | [diff] [blame] | 23 | A_SET_OF(Member) list; |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 24 | |
| 25 | /* Context for parsing across buffer boundaries */ |
| 26 | asn_struct_ctx_t _asn_ctx; |
| 27 | } Type_t; |
| 28 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 29 | /*** <<< FUNC-DECLS [Type] >>> ***/ |
| 30 | |
| 31 | extern asn_TYPE_descriptor_t asn_DEF_Type; |
| 32 | |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 33 | /*** <<< STAT-DEFS [Type] >>> ***/ |
| 34 | |
| 35 | static asn_TYPE_member_t asn_MBR_Member_2[] = { |
| 36 | { ATF_NOFLAGS, 0, offsetof(struct Member, t1), |
| 37 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 38 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 39 | .type = &asn_DEF_Type1, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 40 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 41 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 42 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 43 | .default_value = 0, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 44 | .name = "t1" |
| 45 | }, |
| 46 | { ATF_NOFLAGS, 0, offsetof(struct Member, t2), |
| 47 | .tag = -1 /* Ambiguous tag (CHOICE?) */, |
| 48 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 49 | .type = &asn_DEF_Type2, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 50 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 51 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 52 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 53 | .default_value = 0, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 54 | .name = "t2" |
| 55 | }, |
| 56 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 57 | static const ber_tlv_tag_t asn_DEF_Member_tags_2[] = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 58 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 59 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 60 | static const asn_TYPE_tag2member_t asn_MAP_Member_tag2el_2[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 61 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* t1 */ |
| 62 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 }, /* one-name */ |
| 63 | { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 1, 0, 0 } /* two-name */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 64 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 65 | static asn_SEQUENCE_specifics_t asn_SPC_Member_specs_2 = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 66 | sizeof(struct Member), |
| 67 | offsetof(struct Member, _asn_ctx), |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 68 | asn_MAP_Member_tag2el_2, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 69 | 3, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 70 | 0, 0, 0, /* Optional elements (not needed) */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 71 | -1, /* Start extensions */ |
| 72 | -1 /* Stop extensions */ |
| 73 | }; |
| 74 | static /* Use -fall-defs-global to expose */ |
| 75 | asn_TYPE_descriptor_t asn_DEF_Member_2 = { |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 76 | "SEQUENCE", |
| 77 | "SEQUENCE", |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 78 | SEQUENCE_free, |
| 79 | SEQUENCE_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 80 | SEQUENCE_compare, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 81 | SEQUENCE_constraint, |
| 82 | SEQUENCE_decode_ber, |
| 83 | SEQUENCE_encode_der, |
| 84 | SEQUENCE_decode_xer, |
| 85 | SEQUENCE_encode_xer, |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame] | 86 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 87 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 88 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 89 | asn_DEF_Member_tags_2, |
| 90 | sizeof(asn_DEF_Member_tags_2) |
| 91 | /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */ |
| 92 | asn_DEF_Member_tags_2, /* Same as above */ |
| 93 | sizeof(asn_DEF_Member_tags_2) |
| 94 | /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 95 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 96 | 0, /* No PER visible constraints */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 97 | asn_MBR_Member_2, |
| 98 | 2, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 99 | &asn_SPC_Member_specs_2 /* Additional specs */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 100 | }; |
| 101 | |
| 102 | static asn_TYPE_member_t asn_MBR_Type_1[] = { |
Lev Walkin | 8eb4b57 | 2005-08-16 16:57:17 +0000 | [diff] [blame] | 103 | { ATF_POINTER, 0, 0, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 104 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 105 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 106 | .type = &asn_DEF_Member_2, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 107 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 108 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 109 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 110 | .default_value = 0, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 111 | .name = "" |
| 112 | }, |
| 113 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 114 | static const ber_tlv_tag_t asn_DEF_Type_tags_1[] = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 115 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 116 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 117 | static asn_SET_OF_specifics_t asn_SPC_Type_specs_1 = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 118 | sizeof(struct Type), |
| 119 | offsetof(struct Type, _asn_ctx), |
| 120 | 0, /* XER encoding is XMLDelimitedItemList */ |
| 121 | }; |
| 122 | asn_TYPE_descriptor_t asn_DEF_Type = { |
| 123 | "Type", |
| 124 | "Type", |
| 125 | SET_OF_free, |
| 126 | SET_OF_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 127 | SET_OF_compare, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 128 | SET_OF_constraint, |
| 129 | SET_OF_decode_ber, |
| 130 | SET_OF_encode_der, |
| 131 | SET_OF_decode_xer, |
| 132 | SET_OF_encode_xer, |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame] | 133 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 134 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 135 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 136 | asn_DEF_Type_tags_1, |
| 137 | sizeof(asn_DEF_Type_tags_1) |
| 138 | /sizeof(asn_DEF_Type_tags_1[0]), /* 1 */ |
| 139 | asn_DEF_Type_tags_1, /* Same as above */ |
| 140 | sizeof(asn_DEF_Type_tags_1) |
| 141 | /sizeof(asn_DEF_Type_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 142 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 143 | 0, /* No PER visible constraints */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 144 | asn_MBR_Type_1, |
| 145 | 1, /* Single element */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 146 | &asn_SPC_Type_specs_1 /* Additional specs */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 147 | }; |
| 148 | |
| 149 | |
| 150 | /*** <<< INCLUDES [Type1] >>> ***/ |
| 151 | |
| 152 | #include <INTEGER.h> |
| 153 | #include <constr_SEQUENCE.h> |
| 154 | #include <constr_CHOICE.h> |
| 155 | |
| 156 | /*** <<< DEPS [Type1] >>> ***/ |
| 157 | |
| 158 | typedef enum one_name_PR { |
| 159 | one_name_PR_NOTHING, /* No components present */ |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 160 | one_name_PR_another_name |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 161 | } one_name_PR; |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 162 | |
| 163 | /*** <<< TYPE-DECLS [Type1] >>> ***/ |
| 164 | |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 165 | typedef struct Type1 { |
| 166 | struct one_name { |
| 167 | one_name_PR present; |
Lev Walkin | 0f5d74c | 2005-08-14 15:03:31 +0000 | [diff] [blame] | 168 | union Type1__one_name_u { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 169 | struct another_name { |
| 170 | INTEGER_t a; |
| 171 | INTEGER_t b; |
| 172 | |
| 173 | /* Context for parsing across buffer boundaries */ |
| 174 | asn_struct_ctx_t _asn_ctx; |
| 175 | } another_name; |
| 176 | } choice; |
| 177 | |
| 178 | /* Context for parsing across buffer boundaries */ |
| 179 | asn_struct_ctx_t _asn_ctx; |
| 180 | } one_name; |
| 181 | |
| 182 | /* Context for parsing across buffer boundaries */ |
| 183 | asn_struct_ctx_t _asn_ctx; |
| 184 | } Type1_t; |
| 185 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 186 | /*** <<< FUNC-DECLS [Type1] >>> ***/ |
| 187 | |
| 188 | extern asn_TYPE_descriptor_t asn_DEF_Type1; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 189 | extern asn_SEQUENCE_specifics_t asn_SPC_Type1_specs_1; |
| 190 | extern asn_TYPE_member_t asn_MBR_Type1_1[1]; |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 191 | |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 192 | /*** <<< STAT-DEFS [Type1] >>> ***/ |
| 193 | |
| 194 | static asn_TYPE_member_t asn_MBR_another_name_3[] = { |
| 195 | { ATF_NOFLAGS, 0, offsetof(struct another_name, a), |
| 196 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 197 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 198 | .type = &asn_DEF_INTEGER, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 199 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 200 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 201 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 202 | .default_value = 0, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 203 | .name = "a" |
| 204 | }, |
| 205 | { ATF_NOFLAGS, 0, offsetof(struct another_name, b), |
| 206 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 207 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 208 | .type = &asn_DEF_INTEGER, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 209 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 210 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 211 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 212 | .default_value = 0, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 213 | .name = "b" |
| 214 | }, |
| 215 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 216 | static const ber_tlv_tag_t asn_DEF_another_name_tags_3[] = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 217 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 218 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 219 | static const asn_TYPE_tag2member_t asn_MAP_another_name_tag2el_3[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 220 | { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* a */ |
| 221 | { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* b */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 222 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 223 | static asn_SEQUENCE_specifics_t asn_SPC_another_name_specs_3 = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 224 | sizeof(struct another_name), |
| 225 | offsetof(struct another_name, _asn_ctx), |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 226 | asn_MAP_another_name_tag2el_3, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 227 | 2, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 228 | 0, 0, 0, /* Optional elements (not needed) */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 229 | -1, /* Start extensions */ |
| 230 | -1 /* Stop extensions */ |
| 231 | }; |
| 232 | static /* Use -fall-defs-global to expose */ |
| 233 | asn_TYPE_descriptor_t asn_DEF_another_name_3 = { |
| 234 | "another-name", |
| 235 | "another-name", |
| 236 | SEQUENCE_free, |
| 237 | SEQUENCE_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 238 | SEQUENCE_compare, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 239 | SEQUENCE_constraint, |
| 240 | SEQUENCE_decode_ber, |
| 241 | SEQUENCE_encode_der, |
| 242 | SEQUENCE_decode_xer, |
| 243 | SEQUENCE_encode_xer, |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame] | 244 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 245 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 246 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 247 | asn_DEF_another_name_tags_3, |
| 248 | sizeof(asn_DEF_another_name_tags_3) |
| 249 | /sizeof(asn_DEF_another_name_tags_3[0]), /* 1 */ |
| 250 | asn_DEF_another_name_tags_3, /* Same as above */ |
| 251 | sizeof(asn_DEF_another_name_tags_3) |
| 252 | /sizeof(asn_DEF_another_name_tags_3[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 253 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 254 | 0, /* No PER visible constraints */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 255 | asn_MBR_another_name_3, |
| 256 | 2, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 257 | &asn_SPC_another_name_specs_3 /* Additional specs */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 258 | }; |
| 259 | |
| 260 | static asn_TYPE_member_t asn_MBR_one_name_2[] = { |
| 261 | { ATF_NOFLAGS, 0, offsetof(struct one_name, choice.another_name), |
| 262 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 263 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 264 | .type = &asn_DEF_another_name_3, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 265 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 266 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 267 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 268 | .default_value = 0, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 269 | .name = "another-name" |
| 270 | }, |
| 271 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 272 | static const asn_TYPE_tag2member_t asn_MAP_one_name_tag2el_2[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 273 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 274 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 275 | static asn_CHOICE_specifics_t asn_SPC_one_name_specs_2 = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 276 | sizeof(struct one_name), |
| 277 | offsetof(struct one_name, _asn_ctx), |
| 278 | offsetof(struct one_name, present), |
| 279 | sizeof(((struct one_name *)0)->present), |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 280 | asn_MAP_one_name_tag2el_2, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 281 | 1, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 282 | .canonical_order = 0, |
| 283 | .ext_start = -1 /* Extensions start */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 284 | }; |
| 285 | static /* Use -fall-defs-global to expose */ |
| 286 | asn_TYPE_descriptor_t asn_DEF_one_name_2 = { |
| 287 | "one-name", |
| 288 | "one-name", |
| 289 | CHOICE_free, |
| 290 | CHOICE_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 291 | CHOICE_compare, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 292 | CHOICE_constraint, |
| 293 | CHOICE_decode_ber, |
| 294 | CHOICE_encode_der, |
| 295 | CHOICE_decode_xer, |
| 296 | CHOICE_encode_xer, |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame] | 297 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 298 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 299 | CHOICE_outmost_tag, |
| 300 | 0, /* No effective tags (pointer) */ |
| 301 | 0, /* No effective tags (count) */ |
| 302 | 0, /* No tags (pointer) */ |
| 303 | 0, /* No tags (count) */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 304 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 305 | 0, /* No PER visible constraints */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 306 | asn_MBR_one_name_2, |
| 307 | 1, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 308 | &asn_SPC_one_name_specs_2 /* Additional specs */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 309 | }; |
| 310 | |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 311 | asn_TYPE_member_t asn_MBR_Type1_1[] = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 312 | { ATF_NOFLAGS, 0, offsetof(struct Type1, one_name), |
| 313 | .tag = -1 /* Ambiguous tag (CHOICE?) */, |
| 314 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 315 | .type = &asn_DEF_one_name_2, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 316 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 317 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 318 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 319 | .default_value = 0, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 320 | .name = "one-name" |
| 321 | }, |
| 322 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 323 | static const ber_tlv_tag_t asn_DEF_Type1_tags_1[] = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 324 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 325 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 326 | static const asn_TYPE_tag2member_t asn_MAP_Type1_tag2el_1[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 327 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 328 | }; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 329 | asn_SEQUENCE_specifics_t asn_SPC_Type1_specs_1 = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 330 | sizeof(struct Type1), |
| 331 | offsetof(struct Type1, _asn_ctx), |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 332 | asn_MAP_Type1_tag2el_1, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 333 | 1, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 334 | 0, 0, 0, /* Optional elements (not needed) */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 335 | -1, /* Start extensions */ |
| 336 | -1 /* Stop extensions */ |
| 337 | }; |
| 338 | asn_TYPE_descriptor_t asn_DEF_Type1 = { |
| 339 | "Type1", |
| 340 | "Type1", |
| 341 | SEQUENCE_free, |
| 342 | SEQUENCE_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 343 | SEQUENCE_compare, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 344 | SEQUENCE_constraint, |
| 345 | SEQUENCE_decode_ber, |
| 346 | SEQUENCE_encode_der, |
| 347 | SEQUENCE_decode_xer, |
| 348 | SEQUENCE_encode_xer, |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame] | 349 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 350 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 351 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 352 | asn_DEF_Type1_tags_1, |
| 353 | sizeof(asn_DEF_Type1_tags_1) |
| 354 | /sizeof(asn_DEF_Type1_tags_1[0]), /* 1 */ |
| 355 | asn_DEF_Type1_tags_1, /* Same as above */ |
| 356 | sizeof(asn_DEF_Type1_tags_1) |
| 357 | /sizeof(asn_DEF_Type1_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 358 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 359 | 0, /* No PER visible constraints */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 360 | asn_MBR_Type1_1, |
| 361 | 1, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 362 | &asn_SPC_Type1_specs_1 /* Additional specs */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 363 | }; |
| 364 | |
| 365 | |
| 366 | /*** <<< INCLUDES [Type2] >>> ***/ |
| 367 | |
| 368 | #include <BIT_STRING.h> |
| 369 | #include <INTEGER.h> |
| 370 | #include <constr_SEQUENCE.h> |
| 371 | #include <constr_SET.h> |
| 372 | #include <constr_CHOICE.h> |
| 373 | |
| 374 | /*** <<< DEPS [Type2] >>> ***/ |
| 375 | |
| 376 | typedef enum Type2_PR { |
| 377 | Type2_PR_NOTHING, /* No components present */ |
| 378 | Type2_PR_one_name, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 379 | Type2_PR_two_name |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 380 | } Type2_PR; |
Lev Walkin | b02a883 | 2005-08-13 23:51:47 +0000 | [diff] [blame] | 381 | typedef enum a { |
| 382 | a_one = 0 |
Lev Walkin | 171487e | 2006-03-21 07:25:18 +0000 | [diff] [blame] | 383 | } e_a; |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 384 | |
| 385 | /* |
| 386 | * Method of determining the components presence |
| 387 | */ |
| 388 | typedef enum two_name_PR { |
| 389 | two_name_PR_another_name, /* Member another_name is present */ |
| 390 | } two_name_PR; |
Lev Walkin | b02a883 | 2005-08-13 23:51:47 +0000 | [diff] [blame] | 391 | typedef enum a { |
| 392 | a_one = 0 |
Lev Walkin | 171487e | 2006-03-21 07:25:18 +0000 | [diff] [blame] | 393 | } e_a; |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 394 | |
| 395 | /*** <<< TYPE-DECLS [Type2] >>> ***/ |
| 396 | |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 397 | typedef struct Type2 { |
| 398 | Type2_PR present; |
Lev Walkin | 0f5d74c | 2005-08-14 15:03:31 +0000 | [diff] [blame] | 399 | union Type2_u { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 400 | struct one_name { |
| 401 | struct another_name { |
| 402 | BIT_STRING_t a; |
| 403 | INTEGER_t b; |
| 404 | |
| 405 | /* Context for parsing across buffer boundaries */ |
| 406 | asn_struct_ctx_t _asn_ctx; |
| 407 | } another_name; |
| 408 | |
| 409 | /* Context for parsing across buffer boundaries */ |
| 410 | asn_struct_ctx_t _asn_ctx; |
| 411 | } one_name; |
| 412 | struct two_name { |
| 413 | struct another_name { |
| 414 | BIT_STRING_t a; |
| 415 | INTEGER_t b; |
| 416 | |
| 417 | /* Context for parsing across buffer boundaries */ |
| 418 | asn_struct_ctx_t _asn_ctx; |
| 419 | } another_name; |
| 420 | |
| 421 | /* Presence bitmask: ASN_SET_ISPRESENT(ptwo_name, two_name_PR_x) */ |
| 422 | unsigned int _presence_map |
| 423 | [((1+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))]; |
| 424 | |
| 425 | /* Context for parsing across buffer boundaries */ |
| 426 | asn_struct_ctx_t _asn_ctx; |
| 427 | } two_name; |
| 428 | } choice; |
| 429 | |
| 430 | /* Context for parsing across buffer boundaries */ |
| 431 | asn_struct_ctx_t _asn_ctx; |
| 432 | } Type2_t; |
| 433 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 434 | /*** <<< FUNC-DECLS [Type2] >>> ***/ |
| 435 | |
| 436 | extern asn_TYPE_descriptor_t asn_DEF_Type2; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 437 | extern asn_CHOICE_specifics_t asn_SPC_Type2_specs_1; |
| 438 | extern asn_TYPE_member_t asn_MBR_Type2_1[2]; |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 439 | |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 440 | /*** <<< CODE [Type2] >>> ***/ |
| 441 | |
| 442 | static int |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 443 | memb_a_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 444 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 445 | const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; |
| 446 | size_t size; |
| 447 | |
| 448 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 449 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 450 | "%s: value not given (%s:%d)", |
| 451 | td->name, __FILE__, __LINE__); |
| 452 | return -1; |
| 453 | } |
| 454 | |
| 455 | if(st->size > 0) { |
| 456 | /* Size in bits */ |
Lev Walkin | 1b1c5fc | 2006-09-08 19:38:11 +0000 | [diff] [blame] | 457 | size = 8 * st->size - (st->bits_unused & 0x07); |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 458 | } else { |
| 459 | size = 0; |
| 460 | } |
| 461 | |
| 462 | if((size == 2)) { |
| 463 | /* Constraint check succeeded */ |
| 464 | return 0; |
| 465 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 466 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 467 | "%s: constraint failed (%s:%d)", |
| 468 | td->name, __FILE__, __LINE__); |
| 469 | return -1; |
| 470 | } |
| 471 | } |
| 472 | |
| 473 | static int |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 474 | memb_a_constraint_8(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 475 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 476 | const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; |
| 477 | size_t size; |
| 478 | |
| 479 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 480 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 481 | "%s: value not given (%s:%d)", |
| 482 | td->name, __FILE__, __LINE__); |
| 483 | return -1; |
| 484 | } |
| 485 | |
| 486 | if(st->size > 0) { |
| 487 | /* Size in bits */ |
Lev Walkin | 1b1c5fc | 2006-09-08 19:38:11 +0000 | [diff] [blame] | 488 | size = 8 * st->size - (st->bits_unused & 0x07); |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 489 | } else { |
| 490 | size = 0; |
| 491 | } |
| 492 | |
| 493 | if((size == 2)) { |
| 494 | /* Constraint check succeeded */ |
| 495 | return 0; |
| 496 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 497 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 498 | "%s: constraint failed (%s:%d)", |
| 499 | td->name, __FILE__, __LINE__); |
| 500 | return -1; |
| 501 | } |
| 502 | } |
| 503 | |
| 504 | |
| 505 | /*** <<< STAT-DEFS [Type2] >>> ***/ |
| 506 | |
| 507 | static asn_TYPE_member_t asn_MBR_another_name_3[] = { |
| 508 | { ATF_NOFLAGS, 0, offsetof(struct another_name, a), |
| 509 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), |
| 510 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 511 | .type = &asn_DEF_BIT_STRING, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 512 | .memb_constraints = memb_a_constraint_3, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 513 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 514 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 515 | .default_value = 0, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 516 | .name = "a" |
| 517 | }, |
| 518 | { ATF_NOFLAGS, 0, offsetof(struct another_name, b), |
| 519 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 520 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 521 | .type = &asn_DEF_INTEGER, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 522 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 523 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 524 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 525 | .default_value = 0, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 526 | .name = "b" |
| 527 | }, |
| 528 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 529 | static const ber_tlv_tag_t asn_DEF_another_name_tags_3[] = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 530 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 531 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 532 | static const asn_TYPE_tag2member_t asn_MAP_another_name_tag2el_3[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 533 | { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* b */ |
| 534 | { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 0 } /* a */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 535 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 536 | static asn_SEQUENCE_specifics_t asn_SPC_another_name_specs_3 = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 537 | sizeof(struct another_name), |
| 538 | offsetof(struct another_name, _asn_ctx), |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 539 | asn_MAP_another_name_tag2el_3, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 540 | 2, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 541 | 0, 0, 0, /* Optional elements (not needed) */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 542 | -1, /* Start extensions */ |
| 543 | -1 /* Stop extensions */ |
| 544 | }; |
| 545 | static /* Use -fall-defs-global to expose */ |
| 546 | asn_TYPE_descriptor_t asn_DEF_another_name_3 = { |
| 547 | "another-name", |
| 548 | "another-name", |
| 549 | SEQUENCE_free, |
| 550 | SEQUENCE_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 551 | SEQUENCE_compare, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 552 | SEQUENCE_constraint, |
| 553 | SEQUENCE_decode_ber, |
| 554 | SEQUENCE_encode_der, |
| 555 | SEQUENCE_decode_xer, |
| 556 | SEQUENCE_encode_xer, |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame] | 557 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 558 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 559 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 560 | asn_DEF_another_name_tags_3, |
| 561 | sizeof(asn_DEF_another_name_tags_3) |
| 562 | /sizeof(asn_DEF_another_name_tags_3[0]), /* 1 */ |
| 563 | asn_DEF_another_name_tags_3, /* Same as above */ |
| 564 | sizeof(asn_DEF_another_name_tags_3) |
| 565 | /sizeof(asn_DEF_another_name_tags_3[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 566 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 567 | 0, /* No PER visible constraints */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 568 | asn_MBR_another_name_3, |
| 569 | 2, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 570 | &asn_SPC_another_name_specs_3 /* Additional specs */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 571 | }; |
| 572 | |
| 573 | static asn_TYPE_member_t asn_MBR_one_name_2[] = { |
| 574 | { ATF_NOFLAGS, 0, offsetof(struct one_name, another_name), |
| 575 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 576 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 577 | .type = &asn_DEF_another_name_3, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 578 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 579 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 580 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 581 | .default_value = 0, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 582 | .name = "another-name" |
| 583 | }, |
| 584 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 585 | static const ber_tlv_tag_t asn_DEF_one_name_tags_2[] = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 586 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 587 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 588 | static const asn_TYPE_tag2member_t asn_MAP_one_name_tag2el_2[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 589 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 590 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 591 | static asn_SEQUENCE_specifics_t asn_SPC_one_name_specs_2 = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 592 | sizeof(struct one_name), |
| 593 | offsetof(struct one_name, _asn_ctx), |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 594 | asn_MAP_one_name_tag2el_2, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 595 | 1, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 596 | 0, 0, 0, /* Optional elements (not needed) */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 597 | -1, /* Start extensions */ |
| 598 | -1 /* Stop extensions */ |
| 599 | }; |
| 600 | static /* Use -fall-defs-global to expose */ |
| 601 | asn_TYPE_descriptor_t asn_DEF_one_name_2 = { |
| 602 | "one-name", |
| 603 | "one-name", |
| 604 | SEQUENCE_free, |
| 605 | SEQUENCE_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 606 | SEQUENCE_compare, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 607 | SEQUENCE_constraint, |
| 608 | SEQUENCE_decode_ber, |
| 609 | SEQUENCE_encode_der, |
| 610 | SEQUENCE_decode_xer, |
| 611 | SEQUENCE_encode_xer, |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame] | 612 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 613 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 614 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 615 | asn_DEF_one_name_tags_2, |
| 616 | sizeof(asn_DEF_one_name_tags_2) |
| 617 | /sizeof(asn_DEF_one_name_tags_2[0]), /* 1 */ |
| 618 | asn_DEF_one_name_tags_2, /* Same as above */ |
| 619 | sizeof(asn_DEF_one_name_tags_2) |
| 620 | /sizeof(asn_DEF_one_name_tags_2[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 621 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 622 | 0, /* No PER visible constraints */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 623 | asn_MBR_one_name_2, |
| 624 | 1, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 625 | &asn_SPC_one_name_specs_2 /* Additional specs */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 626 | }; |
| 627 | |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 628 | static asn_TYPE_member_t asn_MBR_another_name_8[] = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 629 | { ATF_NOFLAGS, 0, offsetof(struct another_name, a), |
| 630 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), |
| 631 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 632 | .type = &asn_DEF_BIT_STRING, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 633 | .memb_constraints = memb_a_constraint_8, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 634 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 635 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 636 | .default_value = 0, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 637 | .name = "a" |
| 638 | }, |
| 639 | { ATF_NOFLAGS, 0, offsetof(struct another_name, b), |
| 640 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 641 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 642 | .type = &asn_DEF_INTEGER, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 643 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 644 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 645 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 646 | .default_value = 0, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 647 | .name = "b" |
| 648 | }, |
| 649 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 650 | static const ber_tlv_tag_t asn_DEF_another_name_tags_8[] = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 651 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 652 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 653 | static const asn_TYPE_tag2member_t asn_MAP_another_name_tag2el_8[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 654 | { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* b */ |
| 655 | { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 0 } /* a */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 656 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 657 | static asn_SEQUENCE_specifics_t asn_SPC_another_name_specs_8 = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 658 | sizeof(struct another_name), |
| 659 | offsetof(struct another_name, _asn_ctx), |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 660 | asn_MAP_another_name_tag2el_8, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 661 | 2, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 662 | 0, 0, 0, /* Optional elements (not needed) */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 663 | -1, /* Start extensions */ |
| 664 | -1 /* Stop extensions */ |
| 665 | }; |
| 666 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 667 | asn_TYPE_descriptor_t asn_DEF_another_name_8 = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 668 | "another-name", |
| 669 | "another-name", |
| 670 | SEQUENCE_free, |
| 671 | SEQUENCE_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 672 | SEQUENCE_compare, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 673 | SEQUENCE_constraint, |
| 674 | SEQUENCE_decode_ber, |
| 675 | SEQUENCE_encode_der, |
| 676 | SEQUENCE_decode_xer, |
| 677 | SEQUENCE_encode_xer, |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame] | 678 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 679 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 680 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 681 | asn_DEF_another_name_tags_8, |
| 682 | sizeof(asn_DEF_another_name_tags_8) |
| 683 | /sizeof(asn_DEF_another_name_tags_8[0]), /* 1 */ |
| 684 | asn_DEF_another_name_tags_8, /* Same as above */ |
| 685 | sizeof(asn_DEF_another_name_tags_8) |
| 686 | /sizeof(asn_DEF_another_name_tags_8[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 687 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 688 | 0, /* No PER visible constraints */ |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 689 | asn_MBR_another_name_8, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 690 | 2, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 691 | &asn_SPC_another_name_specs_8 /* Additional specs */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 692 | }; |
| 693 | |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 694 | static asn_TYPE_member_t asn_MBR_two_name_7[] = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 695 | { ATF_NOFLAGS, 0, offsetof(struct two_name, another_name), |
| 696 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 697 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 698 | .type = &asn_DEF_another_name_8, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 699 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 700 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 701 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 702 | .default_value = 0, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 703 | .name = "another-name" |
| 704 | }, |
| 705 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 706 | static const ber_tlv_tag_t asn_DEF_two_name_tags_7[] = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 707 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 708 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 709 | static const asn_TYPE_tag2member_t asn_MAP_two_name_tag2el_7[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 710 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 711 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 712 | static const uint8_t asn_MAP_two_name_mmap_7[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 713 | (1 << 7) |
| 714 | }; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 715 | static |
| 716 | asn_SET_specifics_t asn_SPC_two_name_specs_7 = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 717 | sizeof(struct two_name), |
| 718 | offsetof(struct two_name, _asn_ctx), |
| 719 | offsetof(struct two_name, _presence_map), |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 720 | asn_MAP_two_name_tag2el_7, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 721 | 1, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 722 | asn_MAP_two_name_tag2el_7, /* Same as above */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 723 | 1, /* Count of tags in the CXER map */ |
| 724 | 0, /* Whether extensible */ |
Lev Walkin | 46ef3f3 | 2017-07-06 08:47:53 -0700 | [diff] [blame] | 725 | (const unsigned int *)asn_MAP_two_name_mmap_7 /* Mandatory elements map */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 726 | }; |
| 727 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 728 | asn_TYPE_descriptor_t asn_DEF_two_name_7 = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 729 | "two-name", |
| 730 | "two-name", |
| 731 | SET_free, |
| 732 | SET_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 733 | SET_compare, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 734 | SET_constraint, |
| 735 | SET_decode_ber, |
| 736 | SET_encode_der, |
| 737 | SET_decode_xer, |
| 738 | SET_encode_xer, |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame] | 739 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 740 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 741 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 742 | asn_DEF_two_name_tags_7, |
| 743 | sizeof(asn_DEF_two_name_tags_7) |
| 744 | /sizeof(asn_DEF_two_name_tags_7[0]), /* 1 */ |
| 745 | asn_DEF_two_name_tags_7, /* Same as above */ |
| 746 | sizeof(asn_DEF_two_name_tags_7) |
| 747 | /sizeof(asn_DEF_two_name_tags_7[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 748 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 749 | 0, /* No PER visible constraints */ |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 750 | asn_MBR_two_name_7, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 751 | 1, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 752 | &asn_SPC_two_name_specs_7 /* Additional specs */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 753 | }; |
| 754 | |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 755 | asn_TYPE_member_t asn_MBR_Type2_1[] = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 756 | { ATF_NOFLAGS, 0, offsetof(struct Type2, choice.one_name), |
| 757 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 758 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 759 | .type = &asn_DEF_one_name_2, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 760 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 761 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 762 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 763 | .default_value = 0, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 764 | .name = "one-name" |
| 765 | }, |
| 766 | { ATF_NOFLAGS, 0, offsetof(struct Type2, choice.two_name), |
| 767 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), |
| 768 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 769 | .type = &asn_DEF_two_name_7, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 770 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 771 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 772 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 773 | .default_value = 0, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 774 | .name = "two-name" |
| 775 | }, |
| 776 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 777 | static const asn_TYPE_tag2member_t asn_MAP_Type2_tag2el_1[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 778 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* one-name */ |
| 779 | { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 1, 0, 0 } /* two-name */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 780 | }; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 781 | asn_CHOICE_specifics_t asn_SPC_Type2_specs_1 = { |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 782 | sizeof(struct Type2), |
| 783 | offsetof(struct Type2, _asn_ctx), |
| 784 | offsetof(struct Type2, present), |
| 785 | sizeof(((struct Type2 *)0)->present), |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 786 | asn_MAP_Type2_tag2el_1, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 787 | 2, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 788 | .canonical_order = 0, |
| 789 | .ext_start = -1 /* Extensions start */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 790 | }; |
| 791 | asn_TYPE_descriptor_t asn_DEF_Type2 = { |
| 792 | "Type2", |
| 793 | "Type2", |
| 794 | CHOICE_free, |
| 795 | CHOICE_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 796 | CHOICE_compare, |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 797 | CHOICE_constraint, |
| 798 | CHOICE_decode_ber, |
| 799 | CHOICE_encode_der, |
| 800 | CHOICE_decode_xer, |
| 801 | CHOICE_encode_xer, |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame] | 802 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 803 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 804 | CHOICE_outmost_tag, |
| 805 | 0, /* No effective tags (pointer) */ |
| 806 | 0, /* No effective tags (count) */ |
| 807 | 0, /* No tags (pointer) */ |
| 808 | 0, /* No tags (count) */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 809 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 810 | 0, /* No PER visible constraints */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 811 | asn_MBR_Type2_1, |
| 812 | 2, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 813 | &asn_SPC_Type2_specs_1 /* Additional specs */ |
Lev Walkin | b7f1797 | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 814 | }; |
| 815 | |