blob: f4cfba61caab0238763525a86efce64d8d8a892b [file] [log] [blame]
Lev Walkinb7f17972005-03-04 09:10:19 +00001
2/*** <<< INCLUDES [Type] >>> ***/
3
4#include <asn_SET_OF.h>
Lev Walkin22b5ed42006-09-13 02:51:20 +00005#include "Type1.h"
6#include "Type2.h"
Lev Walkinb7f17972005-03-04 09:10:19 +00007#include <constr_SEQUENCE.h>
8#include <constr_SET_OF.h>
9
Bi-Ruei, Chiu9b87e5b2016-06-06 00:23:16 +080010/*** <<< FWD-DEFS [Type] >>> ***/
11
12typedef 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 Walkinb7f17972005-03-04 09:10:19 +000020/*** <<< TYPE-DECLS [Type] >>> ***/
21
Lev Walkinb7f17972005-03-04 09:10:19 +000022typedef struct Type {
Bi-Ruei, Chiu9b87e5b2016-06-06 00:23:16 +080023 A_SET_OF(Member) list;
Lev Walkinb7f17972005-03-04 09:10:19 +000024
25 /* Context for parsing across buffer boundaries */
26 asn_struct_ctx_t _asn_ctx;
27} Type_t;
28
Lev Walkinc8285712005-03-04 22:18:20 +000029/*** <<< FUNC-DECLS [Type] >>> ***/
30
31extern asn_TYPE_descriptor_t asn_DEF_Type;
32
Lev Walkinb7f17972005-03-04 09:10:19 +000033/*** <<< STAT-DEFS [Type] >>> ***/
34
35static 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 Walkinae7bf3f2005-08-29 10:31:14 +000039 .type = &asn_DEF_Type1,
Lev Walkinb7f17972005-03-04 09:10:19 +000040 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040041 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000042 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
43 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +000044 .name = "t1"
45 },
46 { ATF_NOFLAGS, 0, offsetof(struct Member, t2),
47 .tag = -1 /* Ambiguous tag (CHOICE?) */,
48 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +000049 .type = &asn_DEF_Type2,
Lev Walkinb7f17972005-03-04 09:10:19 +000050 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040051 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000052 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
53 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +000054 .name = "t2"
55 },
56};
Lev Walkina7591b52014-10-12 18:37:35 -070057static const ber_tlv_tag_t asn_DEF_Member_tags_2[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +000058 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
59};
Lev Walkina7591b52014-10-12 18:37:35 -070060static const asn_TYPE_tag2member_t asn_MAP_Member_tag2el_2[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070061 { (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 Walkinb7f17972005-03-04 09:10:19 +000064};
Lev Walkin59b176e2005-11-26 11:25:14 +000065static asn_SEQUENCE_specifics_t asn_SPC_Member_specs_2 = {
Lev Walkinb7f17972005-03-04 09:10:19 +000066 sizeof(struct Member),
67 offsetof(struct Member, _asn_ctx),
Lev Walkin59b176e2005-11-26 11:25:14 +000068 asn_MAP_Member_tag2el_2,
Lev Walkinb7f17972005-03-04 09:10:19 +000069 3, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +000070 0, 0, 0, /* Optional elements (not needed) */
Lev Walkinb7f17972005-03-04 09:10:19 +000071 -1, /* Start extensions */
72 -1 /* Stop extensions */
73};
74static /* Use -fall-defs-global to expose */
75asn_TYPE_descriptor_t asn_DEF_Member_2 = {
Lev Walkin59b176e2005-11-26 11:25:14 +000076 "SEQUENCE",
77 "SEQUENCE",
Lev Walkinb7f17972005-03-04 09:10:19 +000078 SEQUENCE_free,
79 SEQUENCE_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -070080 SEQUENCE_compare,
Lev Walkinb7f17972005-03-04 09:10:19 +000081 SEQUENCE_constraint,
82 SEQUENCE_decode_ber,
83 SEQUENCE_encode_der,
84 SEQUENCE_decode_xer,
85 SEQUENCE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -070086 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +040087 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinb7f17972005-03-04 09:10:19 +000088 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +000089 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 Walkinb33425f2017-07-14 14:59:52 +040095 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +000096 0, /* No PER visible constraints */
Lev Walkinb7f17972005-03-04 09:10:19 +000097 asn_MBR_Member_2,
98 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +000099 &asn_SPC_Member_specs_2 /* Additional specs */
Lev Walkinb7f17972005-03-04 09:10:19 +0000100};
101
102static asn_TYPE_member_t asn_MBR_Type_1[] = {
Lev Walkin8eb4b572005-08-16 16:57:17 +0000103 { ATF_POINTER, 0, 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000104 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
105 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000106 .type = &asn_DEF_Member_2,
Lev Walkinb7f17972005-03-04 09:10:19 +0000107 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400108 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000109 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
110 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000111 .name = ""
112 },
113};
Lev Walkina7591b52014-10-12 18:37:35 -0700114static const ber_tlv_tag_t asn_DEF_Type_tags_1[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000115 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
116};
Lev Walkin59b176e2005-11-26 11:25:14 +0000117static asn_SET_OF_specifics_t asn_SPC_Type_specs_1 = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000118 sizeof(struct Type),
119 offsetof(struct Type, _asn_ctx),
120 0, /* XER encoding is XMLDelimitedItemList */
121};
122asn_TYPE_descriptor_t asn_DEF_Type = {
123 "Type",
124 "Type",
125 SET_OF_free,
126 SET_OF_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700127 SET_OF_compare,
Lev Walkinb7f17972005-03-04 09:10:19 +0000128 SET_OF_constraint,
129 SET_OF_decode_ber,
130 SET_OF_encode_der,
131 SET_OF_decode_xer,
132 SET_OF_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700133 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400134 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinb7f17972005-03-04 09:10:19 +0000135 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000136 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 Walkinb33425f2017-07-14 14:59:52 +0400142 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000143 0, /* No PER visible constraints */
Lev Walkinb7f17972005-03-04 09:10:19 +0000144 asn_MBR_Type_1,
145 1, /* Single element */
Lev Walkin59b176e2005-11-26 11:25:14 +0000146 &asn_SPC_Type_specs_1 /* Additional specs */
Lev Walkinb7f17972005-03-04 09:10:19 +0000147};
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
158typedef enum one_name_PR {
159 one_name_PR_NOTHING, /* No components present */
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000160 one_name_PR_another_name
Lev Walkinb7f17972005-03-04 09:10:19 +0000161} one_name_PR;
Lev Walkinb7f17972005-03-04 09:10:19 +0000162
163/*** <<< TYPE-DECLS [Type1] >>> ***/
164
Lev Walkinb7f17972005-03-04 09:10:19 +0000165typedef struct Type1 {
166 struct one_name {
167 one_name_PR present;
Lev Walkin0f5d74c2005-08-14 15:03:31 +0000168 union Type1__one_name_u {
Lev Walkinb7f17972005-03-04 09:10:19 +0000169 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 Walkinc8285712005-03-04 22:18:20 +0000186/*** <<< FUNC-DECLS [Type1] >>> ***/
187
188extern asn_TYPE_descriptor_t asn_DEF_Type1;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800189extern asn_SEQUENCE_specifics_t asn_SPC_Type1_specs_1;
190extern asn_TYPE_member_t asn_MBR_Type1_1[1];
Lev Walkinc8285712005-03-04 22:18:20 +0000191
Lev Walkinb7f17972005-03-04 09:10:19 +0000192/*** <<< STAT-DEFS [Type1] >>> ***/
193
194static 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 Walkinae7bf3f2005-08-29 10:31:14 +0000198 .type = &asn_DEF_INTEGER,
Lev Walkinb7f17972005-03-04 09:10:19 +0000199 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400200 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000201 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
202 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000203 .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 Walkinae7bf3f2005-08-29 10:31:14 +0000208 .type = &asn_DEF_INTEGER,
Lev Walkinb7f17972005-03-04 09:10:19 +0000209 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400210 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000211 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
212 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000213 .name = "b"
214 },
215};
Lev Walkina7591b52014-10-12 18:37:35 -0700216static const ber_tlv_tag_t asn_DEF_another_name_tags_3[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000217 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
218};
Lev Walkina7591b52014-10-12 18:37:35 -0700219static const asn_TYPE_tag2member_t asn_MAP_another_name_tag2el_3[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700220 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* a */
221 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* b */
Lev Walkinb7f17972005-03-04 09:10:19 +0000222};
Lev Walkin59b176e2005-11-26 11:25:14 +0000223static asn_SEQUENCE_specifics_t asn_SPC_another_name_specs_3 = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000224 sizeof(struct another_name),
225 offsetof(struct another_name, _asn_ctx),
Lev Walkin59b176e2005-11-26 11:25:14 +0000226 asn_MAP_another_name_tag2el_3,
Lev Walkinb7f17972005-03-04 09:10:19 +0000227 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000228 0, 0, 0, /* Optional elements (not needed) */
Lev Walkinb7f17972005-03-04 09:10:19 +0000229 -1, /* Start extensions */
230 -1 /* Stop extensions */
231};
232static /* Use -fall-defs-global to expose */
233asn_TYPE_descriptor_t asn_DEF_another_name_3 = {
234 "another-name",
235 "another-name",
236 SEQUENCE_free,
237 SEQUENCE_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700238 SEQUENCE_compare,
Lev Walkinb7f17972005-03-04 09:10:19 +0000239 SEQUENCE_constraint,
240 SEQUENCE_decode_ber,
241 SEQUENCE_encode_der,
242 SEQUENCE_decode_xer,
243 SEQUENCE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700244 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400245 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinb7f17972005-03-04 09:10:19 +0000246 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000247 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 Walkinb33425f2017-07-14 14:59:52 +0400253 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000254 0, /* No PER visible constraints */
Lev Walkinb7f17972005-03-04 09:10:19 +0000255 asn_MBR_another_name_3,
256 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000257 &asn_SPC_another_name_specs_3 /* Additional specs */
Lev Walkinb7f17972005-03-04 09:10:19 +0000258};
259
260static 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 Walkinae7bf3f2005-08-29 10:31:14 +0000264 .type = &asn_DEF_another_name_3,
Lev Walkinb7f17972005-03-04 09:10:19 +0000265 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400266 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000267 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
268 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000269 .name = "another-name"
270 },
271};
Lev Walkina7591b52014-10-12 18:37:35 -0700272static const asn_TYPE_tag2member_t asn_MAP_one_name_tag2el_2[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700273 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name */
Lev Walkinb7f17972005-03-04 09:10:19 +0000274};
Lev Walkin59b176e2005-11-26 11:25:14 +0000275static asn_CHOICE_specifics_t asn_SPC_one_name_specs_2 = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000276 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 Walkin59b176e2005-11-26 11:25:14 +0000280 asn_MAP_one_name_tag2el_2,
Lev Walkinb7f17972005-03-04 09:10:19 +0000281 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000282 .canonical_order = 0,
283 .ext_start = -1 /* Extensions start */
Lev Walkinb7f17972005-03-04 09:10:19 +0000284};
285static /* Use -fall-defs-global to expose */
286asn_TYPE_descriptor_t asn_DEF_one_name_2 = {
287 "one-name",
288 "one-name",
289 CHOICE_free,
290 CHOICE_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700291 CHOICE_compare,
Lev Walkinb7f17972005-03-04 09:10:19 +0000292 CHOICE_constraint,
293 CHOICE_decode_ber,
294 CHOICE_encode_der,
295 CHOICE_decode_xer,
296 CHOICE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700297 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400298 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinb7f17972005-03-04 09:10:19 +0000299 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 Walkinb33425f2017-07-14 14:59:52 +0400304 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000305 0, /* No PER visible constraints */
Lev Walkinb7f17972005-03-04 09:10:19 +0000306 asn_MBR_one_name_2,
307 1, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000308 &asn_SPC_one_name_specs_2 /* Additional specs */
Lev Walkinb7f17972005-03-04 09:10:19 +0000309};
310
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800311asn_TYPE_member_t asn_MBR_Type1_1[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000312 { ATF_NOFLAGS, 0, offsetof(struct Type1, one_name),
313 .tag = -1 /* Ambiguous tag (CHOICE?) */,
314 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000315 .type = &asn_DEF_one_name_2,
Lev Walkinb7f17972005-03-04 09:10:19 +0000316 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400317 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000318 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
319 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000320 .name = "one-name"
321 },
322};
Lev Walkina7591b52014-10-12 18:37:35 -0700323static const ber_tlv_tag_t asn_DEF_Type1_tags_1[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000324 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
325};
Lev Walkina7591b52014-10-12 18:37:35 -0700326static const asn_TYPE_tag2member_t asn_MAP_Type1_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700327 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name */
Lev Walkinb7f17972005-03-04 09:10:19 +0000328};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800329asn_SEQUENCE_specifics_t asn_SPC_Type1_specs_1 = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000330 sizeof(struct Type1),
331 offsetof(struct Type1, _asn_ctx),
Lev Walkin59b176e2005-11-26 11:25:14 +0000332 asn_MAP_Type1_tag2el_1,
Lev Walkinb7f17972005-03-04 09:10:19 +0000333 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000334 0, 0, 0, /* Optional elements (not needed) */
Lev Walkinb7f17972005-03-04 09:10:19 +0000335 -1, /* Start extensions */
336 -1 /* Stop extensions */
337};
338asn_TYPE_descriptor_t asn_DEF_Type1 = {
339 "Type1",
340 "Type1",
341 SEQUENCE_free,
342 SEQUENCE_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700343 SEQUENCE_compare,
Lev Walkinb7f17972005-03-04 09:10:19 +0000344 SEQUENCE_constraint,
345 SEQUENCE_decode_ber,
346 SEQUENCE_encode_der,
347 SEQUENCE_decode_xer,
348 SEQUENCE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700349 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400350 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinb7f17972005-03-04 09:10:19 +0000351 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000352 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 Walkinb33425f2017-07-14 14:59:52 +0400358 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000359 0, /* No PER visible constraints */
Lev Walkinb7f17972005-03-04 09:10:19 +0000360 asn_MBR_Type1_1,
361 1, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000362 &asn_SPC_Type1_specs_1 /* Additional specs */
Lev Walkinb7f17972005-03-04 09:10:19 +0000363};
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
376typedef enum Type2_PR {
377 Type2_PR_NOTHING, /* No components present */
378 Type2_PR_one_name,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000379 Type2_PR_two_name
Lev Walkinb7f17972005-03-04 09:10:19 +0000380} Type2_PR;
Lev Walkinb02a8832005-08-13 23:51:47 +0000381typedef enum a {
382 a_one = 0
Lev Walkin171487e2006-03-21 07:25:18 +0000383} e_a;
Lev Walkinb7f17972005-03-04 09:10:19 +0000384
385/*
386 * Method of determining the components presence
387 */
388typedef enum two_name_PR {
389 two_name_PR_another_name, /* Member another_name is present */
390} two_name_PR;
Lev Walkinb02a8832005-08-13 23:51:47 +0000391typedef enum a {
392 a_one = 0
Lev Walkin171487e2006-03-21 07:25:18 +0000393} e_a;
Lev Walkinb7f17972005-03-04 09:10:19 +0000394
395/*** <<< TYPE-DECLS [Type2] >>> ***/
396
Lev Walkinb7f17972005-03-04 09:10:19 +0000397typedef struct Type2 {
398 Type2_PR present;
Lev Walkin0f5d74c2005-08-14 15:03:31 +0000399 union Type2_u {
Lev Walkinb7f17972005-03-04 09:10:19 +0000400 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 Walkinc8285712005-03-04 22:18:20 +0000434/*** <<< FUNC-DECLS [Type2] >>> ***/
435
436extern asn_TYPE_descriptor_t asn_DEF_Type2;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800437extern asn_CHOICE_specifics_t asn_SPC_Type2_specs_1;
438extern asn_TYPE_member_t asn_MBR_Type2_1[2];
Lev Walkinc8285712005-03-04 22:18:20 +0000439
Lev Walkinb7f17972005-03-04 09:10:19 +0000440/*** <<< CODE [Type2] >>> ***/
441
442static int
Lev Walkin59b176e2005-11-26 11:25:14 +0000443memb_a_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000444 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkinb7f17972005-03-04 09:10:19 +0000445 const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
446 size_t size;
447
448 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700449 ASN__CTFAIL(app_key, td, sptr,
Lev Walkinb7f17972005-03-04 09:10:19 +0000450 "%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 Walkin1b1c5fc2006-09-08 19:38:11 +0000457 size = 8 * st->size - (st->bits_unused & 0x07);
Lev Walkinb7f17972005-03-04 09:10:19 +0000458 } else {
459 size = 0;
460 }
461
462 if((size == 2)) {
463 /* Constraint check succeeded */
464 return 0;
465 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700466 ASN__CTFAIL(app_key, td, sptr,
Lev Walkinb7f17972005-03-04 09:10:19 +0000467 "%s: constraint failed (%s:%d)",
468 td->name, __FILE__, __LINE__);
469 return -1;
470 }
471}
472
473static int
Lev Walkin59b176e2005-11-26 11:25:14 +0000474memb_a_constraint_8(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000475 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkinb7f17972005-03-04 09:10:19 +0000476 const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
477 size_t size;
478
479 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700480 ASN__CTFAIL(app_key, td, sptr,
Lev Walkinb7f17972005-03-04 09:10:19 +0000481 "%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 Walkin1b1c5fc2006-09-08 19:38:11 +0000488 size = 8 * st->size - (st->bits_unused & 0x07);
Lev Walkinb7f17972005-03-04 09:10:19 +0000489 } else {
490 size = 0;
491 }
492
493 if((size == 2)) {
494 /* Constraint check succeeded */
495 return 0;
496 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700497 ASN__CTFAIL(app_key, td, sptr,
Lev Walkinb7f17972005-03-04 09:10:19 +0000498 "%s: constraint failed (%s:%d)",
499 td->name, __FILE__, __LINE__);
500 return -1;
501 }
502}
503
504
505/*** <<< STAT-DEFS [Type2] >>> ***/
506
507static 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 Walkinae7bf3f2005-08-29 10:31:14 +0000511 .type = &asn_DEF_BIT_STRING,
Lev Walkin59b176e2005-11-26 11:25:14 +0000512 .memb_constraints = memb_a_constraint_3,
Lev Walkinb33425f2017-07-14 14:59:52 +0400513 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000514 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
515 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000516 .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 Walkinae7bf3f2005-08-29 10:31:14 +0000521 .type = &asn_DEF_INTEGER,
Lev Walkinb7f17972005-03-04 09:10:19 +0000522 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400523 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000524 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
525 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000526 .name = "b"
527 },
528};
Lev Walkina7591b52014-10-12 18:37:35 -0700529static const ber_tlv_tag_t asn_DEF_another_name_tags_3[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000530 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
531};
Lev Walkina7591b52014-10-12 18:37:35 -0700532static const asn_TYPE_tag2member_t asn_MAP_another_name_tag2el_3[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700533 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* b */
534 { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 0 } /* a */
Lev Walkinb7f17972005-03-04 09:10:19 +0000535};
Lev Walkin59b176e2005-11-26 11:25:14 +0000536static asn_SEQUENCE_specifics_t asn_SPC_another_name_specs_3 = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000537 sizeof(struct another_name),
538 offsetof(struct another_name, _asn_ctx),
Lev Walkin59b176e2005-11-26 11:25:14 +0000539 asn_MAP_another_name_tag2el_3,
Lev Walkinb7f17972005-03-04 09:10:19 +0000540 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000541 0, 0, 0, /* Optional elements (not needed) */
Lev Walkinb7f17972005-03-04 09:10:19 +0000542 -1, /* Start extensions */
543 -1 /* Stop extensions */
544};
545static /* Use -fall-defs-global to expose */
546asn_TYPE_descriptor_t asn_DEF_another_name_3 = {
547 "another-name",
548 "another-name",
549 SEQUENCE_free,
550 SEQUENCE_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700551 SEQUENCE_compare,
Lev Walkinb7f17972005-03-04 09:10:19 +0000552 SEQUENCE_constraint,
553 SEQUENCE_decode_ber,
554 SEQUENCE_encode_der,
555 SEQUENCE_decode_xer,
556 SEQUENCE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700557 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400558 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinb7f17972005-03-04 09:10:19 +0000559 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000560 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 Walkinb33425f2017-07-14 14:59:52 +0400566 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000567 0, /* No PER visible constraints */
Lev Walkinb7f17972005-03-04 09:10:19 +0000568 asn_MBR_another_name_3,
569 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000570 &asn_SPC_another_name_specs_3 /* Additional specs */
Lev Walkinb7f17972005-03-04 09:10:19 +0000571};
572
573static 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 Walkinae7bf3f2005-08-29 10:31:14 +0000577 .type = &asn_DEF_another_name_3,
Lev Walkinb7f17972005-03-04 09:10:19 +0000578 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400579 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000580 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
581 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000582 .name = "another-name"
583 },
584};
Lev Walkina7591b52014-10-12 18:37:35 -0700585static const ber_tlv_tag_t asn_DEF_one_name_tags_2[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000586 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
587};
Lev Walkina7591b52014-10-12 18:37:35 -0700588static const asn_TYPE_tag2member_t asn_MAP_one_name_tag2el_2[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700589 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name */
Lev Walkinb7f17972005-03-04 09:10:19 +0000590};
Lev Walkin59b176e2005-11-26 11:25:14 +0000591static asn_SEQUENCE_specifics_t asn_SPC_one_name_specs_2 = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000592 sizeof(struct one_name),
593 offsetof(struct one_name, _asn_ctx),
Lev Walkin59b176e2005-11-26 11:25:14 +0000594 asn_MAP_one_name_tag2el_2,
Lev Walkinb7f17972005-03-04 09:10:19 +0000595 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000596 0, 0, 0, /* Optional elements (not needed) */
Lev Walkinb7f17972005-03-04 09:10:19 +0000597 -1, /* Start extensions */
598 -1 /* Stop extensions */
599};
600static /* Use -fall-defs-global to expose */
601asn_TYPE_descriptor_t asn_DEF_one_name_2 = {
602 "one-name",
603 "one-name",
604 SEQUENCE_free,
605 SEQUENCE_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700606 SEQUENCE_compare,
Lev Walkinb7f17972005-03-04 09:10:19 +0000607 SEQUENCE_constraint,
608 SEQUENCE_decode_ber,
609 SEQUENCE_encode_der,
610 SEQUENCE_decode_xer,
611 SEQUENCE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700612 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400613 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinb7f17972005-03-04 09:10:19 +0000614 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000615 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 Walkinb33425f2017-07-14 14:59:52 +0400621 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000622 0, /* No PER visible constraints */
Lev Walkinb7f17972005-03-04 09:10:19 +0000623 asn_MBR_one_name_2,
624 1, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000625 &asn_SPC_one_name_specs_2 /* Additional specs */
Lev Walkinb7f17972005-03-04 09:10:19 +0000626};
627
Lev Walkine8318b82005-03-06 09:29:03 +0000628static asn_TYPE_member_t asn_MBR_another_name_8[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000629 { ATF_NOFLAGS, 0, offsetof(struct another_name, a),
630 .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
631 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000632 .type = &asn_DEF_BIT_STRING,
Lev Walkin59b176e2005-11-26 11:25:14 +0000633 .memb_constraints = memb_a_constraint_8,
Lev Walkinb33425f2017-07-14 14:59:52 +0400634 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000635 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
636 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000637 .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 Walkinae7bf3f2005-08-29 10:31:14 +0000642 .type = &asn_DEF_INTEGER,
Lev Walkinb7f17972005-03-04 09:10:19 +0000643 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400644 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000645 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
646 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000647 .name = "b"
648 },
649};
Lev Walkina7591b52014-10-12 18:37:35 -0700650static const ber_tlv_tag_t asn_DEF_another_name_tags_8[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000651 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
652};
Lev Walkina7591b52014-10-12 18:37:35 -0700653static const asn_TYPE_tag2member_t asn_MAP_another_name_tag2el_8[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700654 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* b */
655 { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 0 } /* a */
Lev Walkinb7f17972005-03-04 09:10:19 +0000656};
Lev Walkin59b176e2005-11-26 11:25:14 +0000657static asn_SEQUENCE_specifics_t asn_SPC_another_name_specs_8 = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000658 sizeof(struct another_name),
659 offsetof(struct another_name, _asn_ctx),
Lev Walkin59b176e2005-11-26 11:25:14 +0000660 asn_MAP_another_name_tag2el_8,
Lev Walkinb7f17972005-03-04 09:10:19 +0000661 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000662 0, 0, 0, /* Optional elements (not needed) */
Lev Walkinb7f17972005-03-04 09:10:19 +0000663 -1, /* Start extensions */
664 -1 /* Stop extensions */
665};
666static /* Use -fall-defs-global to expose */
Lev Walkine8318b82005-03-06 09:29:03 +0000667asn_TYPE_descriptor_t asn_DEF_another_name_8 = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000668 "another-name",
669 "another-name",
670 SEQUENCE_free,
671 SEQUENCE_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700672 SEQUENCE_compare,
Lev Walkinb7f17972005-03-04 09:10:19 +0000673 SEQUENCE_constraint,
674 SEQUENCE_decode_ber,
675 SEQUENCE_encode_der,
676 SEQUENCE_decode_xer,
677 SEQUENCE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700678 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400679 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinb7f17972005-03-04 09:10:19 +0000680 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000681 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 Walkinb33425f2017-07-14 14:59:52 +0400687 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000688 0, /* No PER visible constraints */
Lev Walkine8318b82005-03-06 09:29:03 +0000689 asn_MBR_another_name_8,
Lev Walkinb7f17972005-03-04 09:10:19 +0000690 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000691 &asn_SPC_another_name_specs_8 /* Additional specs */
Lev Walkinb7f17972005-03-04 09:10:19 +0000692};
693
Lev Walkine8318b82005-03-06 09:29:03 +0000694static asn_TYPE_member_t asn_MBR_two_name_7[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000695 { ATF_NOFLAGS, 0, offsetof(struct two_name, another_name),
696 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
697 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000698 .type = &asn_DEF_another_name_8,
Lev Walkinb7f17972005-03-04 09:10:19 +0000699 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400700 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000701 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
702 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000703 .name = "another-name"
704 },
705};
Lev Walkina7591b52014-10-12 18:37:35 -0700706static const ber_tlv_tag_t asn_DEF_two_name_tags_7[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000707 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
708};
Lev Walkina7591b52014-10-12 18:37:35 -0700709static const asn_TYPE_tag2member_t asn_MAP_two_name_tag2el_7[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700710 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name */
Lev Walkinb7f17972005-03-04 09:10:19 +0000711};
Lev Walkina7591b52014-10-12 18:37:35 -0700712static const uint8_t asn_MAP_two_name_mmap_7[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000713 (1 << 7)
714};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800715static
716asn_SET_specifics_t asn_SPC_two_name_specs_7 = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000717 sizeof(struct two_name),
718 offsetof(struct two_name, _asn_ctx),
719 offsetof(struct two_name, _presence_map),
Lev Walkin59b176e2005-11-26 11:25:14 +0000720 asn_MAP_two_name_tag2el_7,
Lev Walkinb7f17972005-03-04 09:10:19 +0000721 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000722 asn_MAP_two_name_tag2el_7, /* Same as above */
Lev Walkinb7f17972005-03-04 09:10:19 +0000723 1, /* Count of tags in the CXER map */
724 0, /* Whether extensible */
Lev Walkin46ef3f32017-07-06 08:47:53 -0700725 (const unsigned int *)asn_MAP_two_name_mmap_7 /* Mandatory elements map */
Lev Walkinb7f17972005-03-04 09:10:19 +0000726};
727static /* Use -fall-defs-global to expose */
Lev Walkine8318b82005-03-06 09:29:03 +0000728asn_TYPE_descriptor_t asn_DEF_two_name_7 = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000729 "two-name",
730 "two-name",
731 SET_free,
732 SET_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700733 SET_compare,
Lev Walkinb7f17972005-03-04 09:10:19 +0000734 SET_constraint,
735 SET_decode_ber,
736 SET_encode_der,
737 SET_decode_xer,
738 SET_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700739 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400740 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinb7f17972005-03-04 09:10:19 +0000741 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000742 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 Walkinb33425f2017-07-14 14:59:52 +0400748 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000749 0, /* No PER visible constraints */
Lev Walkine8318b82005-03-06 09:29:03 +0000750 asn_MBR_two_name_7,
Lev Walkinb7f17972005-03-04 09:10:19 +0000751 1, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000752 &asn_SPC_two_name_specs_7 /* Additional specs */
Lev Walkinb7f17972005-03-04 09:10:19 +0000753};
754
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800755asn_TYPE_member_t asn_MBR_Type2_1[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000756 { ATF_NOFLAGS, 0, offsetof(struct Type2, choice.one_name),
757 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
758 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000759 .type = &asn_DEF_one_name_2,
Lev Walkinb7f17972005-03-04 09:10:19 +0000760 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400761 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000762 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
763 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000764 .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 Walkinae7bf3f2005-08-29 10:31:14 +0000769 .type = &asn_DEF_two_name_7,
Lev Walkinb7f17972005-03-04 09:10:19 +0000770 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400771 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000772 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
773 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000774 .name = "two-name"
775 },
776};
Lev Walkina7591b52014-10-12 18:37:35 -0700777static const asn_TYPE_tag2member_t asn_MAP_Type2_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700778 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* one-name */
779 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 1, 0, 0 } /* two-name */
Lev Walkinb7f17972005-03-04 09:10:19 +0000780};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800781asn_CHOICE_specifics_t asn_SPC_Type2_specs_1 = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000782 sizeof(struct Type2),
783 offsetof(struct Type2, _asn_ctx),
784 offsetof(struct Type2, present),
785 sizeof(((struct Type2 *)0)->present),
Lev Walkin59b176e2005-11-26 11:25:14 +0000786 asn_MAP_Type2_tag2el_1,
Lev Walkinb7f17972005-03-04 09:10:19 +0000787 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000788 .canonical_order = 0,
789 .ext_start = -1 /* Extensions start */
Lev Walkinb7f17972005-03-04 09:10:19 +0000790};
791asn_TYPE_descriptor_t asn_DEF_Type2 = {
792 "Type2",
793 "Type2",
794 CHOICE_free,
795 CHOICE_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700796 CHOICE_compare,
Lev Walkinb7f17972005-03-04 09:10:19 +0000797 CHOICE_constraint,
798 CHOICE_decode_ber,
799 CHOICE_encode_der,
800 CHOICE_decode_xer,
801 CHOICE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700802 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400803 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinb7f17972005-03-04 09:10:19 +0000804 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 Walkinb33425f2017-07-14 14:59:52 +0400809 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000810 0, /* No PER visible constraints */
Lev Walkinb7f17972005-03-04 09:10:19 +0000811 asn_MBR_Type2_1,
812 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000813 &asn_SPC_Type2_specs_1 /* Additional specs */
Lev Walkinb7f17972005-03-04 09:10:19 +0000814};
815