blob: 468ecfcb8b8ebd82017723182f6203130bbad945 [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 Walkin67a30122017-08-10 05:48:54 -070040 .type_selector = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +000041 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040042 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000043 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
44 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +000045 .name = "t1"
46 },
47 { ATF_NOFLAGS, 0, offsetof(struct Member, t2),
48 .tag = -1 /* Ambiguous tag (CHOICE?) */,
49 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +000050 .type = &asn_DEF_Type2,
Lev Walkin67a30122017-08-10 05:48:54 -070051 .type_selector = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +000052 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040053 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000054 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
55 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +000056 .name = "t2"
57 },
58};
Lev Walkina7591b52014-10-12 18:37:35 -070059static const ber_tlv_tag_t asn_DEF_Member_tags_2[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +000060 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
61};
Lev Walkina7591b52014-10-12 18:37:35 -070062static const asn_TYPE_tag2member_t asn_MAP_Member_tag2el_2[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070063 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* t1 */
64 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 }, /* one-name */
65 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 1, 0, 0 } /* two-name */
Lev Walkinb7f17972005-03-04 09:10:19 +000066};
Lev Walkin59b176e2005-11-26 11:25:14 +000067static asn_SEQUENCE_specifics_t asn_SPC_Member_specs_2 = {
Lev Walkinb7f17972005-03-04 09:10:19 +000068 sizeof(struct Member),
69 offsetof(struct Member, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -070070 .tag2el = asn_MAP_Member_tag2el_2,
71 .tag2el_count = 3, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +000072 0, 0, 0, /* Optional elements (not needed) */
Lev Walkinb7f17972005-03-04 09:10:19 +000073 -1, /* Start extensions */
74 -1 /* Stop extensions */
75};
76static /* Use -fall-defs-global to expose */
77asn_TYPE_descriptor_t asn_DEF_Member_2 = {
Lev Walkin59b176e2005-11-26 11:25:14 +000078 "SEQUENCE",
79 "SEQUENCE",
Lev Walkinb7f17972005-03-04 09:10:19 +000080 SEQUENCE_free,
81 SEQUENCE_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -070082 SEQUENCE_compare,
Lev Walkinb7f17972005-03-04 09:10:19 +000083 SEQUENCE_constraint,
84 SEQUENCE_decode_ber,
85 SEQUENCE_encode_der,
86 SEQUENCE_decode_xer,
87 SEQUENCE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -070088 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +040089 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinb7f17972005-03-04 09:10:19 +000090 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +000091 asn_DEF_Member_tags_2,
92 sizeof(asn_DEF_Member_tags_2)
93 /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */
94 asn_DEF_Member_tags_2, /* Same as above */
95 sizeof(asn_DEF_Member_tags_2)
96 /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +040097 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +000098 0, /* No PER visible constraints */
Lev Walkinb7f17972005-03-04 09:10:19 +000099 asn_MBR_Member_2,
100 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000101 &asn_SPC_Member_specs_2 /* Additional specs */
Lev Walkinb7f17972005-03-04 09:10:19 +0000102};
103
104static asn_TYPE_member_t asn_MBR_Type_1[] = {
Lev Walkin8eb4b572005-08-16 16:57:17 +0000105 { ATF_POINTER, 0, 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000106 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
107 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000108 .type = &asn_DEF_Member_2,
Lev Walkin67a30122017-08-10 05:48:54 -0700109 .type_selector = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000110 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400111 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000112 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
113 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000114 .name = ""
115 },
116};
Lev Walkina7591b52014-10-12 18:37:35 -0700117static const ber_tlv_tag_t asn_DEF_Type_tags_1[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000118 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
119};
Lev Walkin59b176e2005-11-26 11:25:14 +0000120static asn_SET_OF_specifics_t asn_SPC_Type_specs_1 = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000121 sizeof(struct Type),
122 offsetof(struct Type, _asn_ctx),
123 0, /* XER encoding is XMLDelimitedItemList */
124};
125asn_TYPE_descriptor_t asn_DEF_Type = {
126 "Type",
127 "Type",
128 SET_OF_free,
129 SET_OF_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700130 SET_OF_compare,
Lev Walkinb7f17972005-03-04 09:10:19 +0000131 SET_OF_constraint,
132 SET_OF_decode_ber,
133 SET_OF_encode_der,
134 SET_OF_decode_xer,
135 SET_OF_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700136 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400137 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinb7f17972005-03-04 09:10:19 +0000138 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000139 asn_DEF_Type_tags_1,
140 sizeof(asn_DEF_Type_tags_1)
141 /sizeof(asn_DEF_Type_tags_1[0]), /* 1 */
142 asn_DEF_Type_tags_1, /* Same as above */
143 sizeof(asn_DEF_Type_tags_1)
144 /sizeof(asn_DEF_Type_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400145 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000146 0, /* No PER visible constraints */
Lev Walkinb7f17972005-03-04 09:10:19 +0000147 asn_MBR_Type_1,
148 1, /* Single element */
Lev Walkin59b176e2005-11-26 11:25:14 +0000149 &asn_SPC_Type_specs_1 /* Additional specs */
Lev Walkinb7f17972005-03-04 09:10:19 +0000150};
151
152
153/*** <<< INCLUDES [Type1] >>> ***/
154
155#include <INTEGER.h>
156#include <constr_SEQUENCE.h>
157#include <constr_CHOICE.h>
158
159/*** <<< DEPS [Type1] >>> ***/
160
161typedef enum one_name_PR {
162 one_name_PR_NOTHING, /* No components present */
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000163 one_name_PR_another_name
Lev Walkinb7f17972005-03-04 09:10:19 +0000164} one_name_PR;
Lev Walkinb7f17972005-03-04 09:10:19 +0000165
166/*** <<< TYPE-DECLS [Type1] >>> ***/
167
Lev Walkinb7f17972005-03-04 09:10:19 +0000168typedef struct Type1 {
169 struct one_name {
170 one_name_PR present;
Lev Walkin0f5d74c2005-08-14 15:03:31 +0000171 union Type1__one_name_u {
Lev Walkinb7f17972005-03-04 09:10:19 +0000172 struct another_name {
173 INTEGER_t a;
174 INTEGER_t b;
175
176 /* Context for parsing across buffer boundaries */
177 asn_struct_ctx_t _asn_ctx;
178 } another_name;
179 } choice;
180
181 /* Context for parsing across buffer boundaries */
182 asn_struct_ctx_t _asn_ctx;
183 } one_name;
184
185 /* Context for parsing across buffer boundaries */
186 asn_struct_ctx_t _asn_ctx;
187} Type1_t;
188
Lev Walkinc8285712005-03-04 22:18:20 +0000189/*** <<< FUNC-DECLS [Type1] >>> ***/
190
191extern asn_TYPE_descriptor_t asn_DEF_Type1;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800192extern asn_SEQUENCE_specifics_t asn_SPC_Type1_specs_1;
193extern asn_TYPE_member_t asn_MBR_Type1_1[1];
Lev Walkinc8285712005-03-04 22:18:20 +0000194
Lev Walkinb7f17972005-03-04 09:10:19 +0000195/*** <<< STAT-DEFS [Type1] >>> ***/
196
197static asn_TYPE_member_t asn_MBR_another_name_3[] = {
198 { ATF_NOFLAGS, 0, offsetof(struct another_name, a),
199 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
200 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000201 .type = &asn_DEF_INTEGER,
Lev Walkin67a30122017-08-10 05:48:54 -0700202 .type_selector = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000203 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400204 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000205 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
206 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000207 .name = "a"
208 },
209 { ATF_NOFLAGS, 0, offsetof(struct another_name, b),
210 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
211 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000212 .type = &asn_DEF_INTEGER,
Lev Walkin67a30122017-08-10 05:48:54 -0700213 .type_selector = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000214 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400215 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000216 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
217 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000218 .name = "b"
219 },
220};
Lev Walkina7591b52014-10-12 18:37:35 -0700221static const ber_tlv_tag_t asn_DEF_another_name_tags_3[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000222 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
223};
Lev Walkina7591b52014-10-12 18:37:35 -0700224static const asn_TYPE_tag2member_t asn_MAP_another_name_tag2el_3[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700225 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* a */
226 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* b */
Lev Walkinb7f17972005-03-04 09:10:19 +0000227};
Lev Walkin59b176e2005-11-26 11:25:14 +0000228static asn_SEQUENCE_specifics_t asn_SPC_another_name_specs_3 = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000229 sizeof(struct another_name),
230 offsetof(struct another_name, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700231 .tag2el = asn_MAP_another_name_tag2el_3,
232 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000233 0, 0, 0, /* Optional elements (not needed) */
Lev Walkinb7f17972005-03-04 09:10:19 +0000234 -1, /* Start extensions */
235 -1 /* Stop extensions */
236};
237static /* Use -fall-defs-global to expose */
238asn_TYPE_descriptor_t asn_DEF_another_name_3 = {
239 "another-name",
240 "another-name",
241 SEQUENCE_free,
242 SEQUENCE_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700243 SEQUENCE_compare,
Lev Walkinb7f17972005-03-04 09:10:19 +0000244 SEQUENCE_constraint,
245 SEQUENCE_decode_ber,
246 SEQUENCE_encode_der,
247 SEQUENCE_decode_xer,
248 SEQUENCE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700249 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400250 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinb7f17972005-03-04 09:10:19 +0000251 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000252 asn_DEF_another_name_tags_3,
253 sizeof(asn_DEF_another_name_tags_3)
254 /sizeof(asn_DEF_another_name_tags_3[0]), /* 1 */
255 asn_DEF_another_name_tags_3, /* Same as above */
256 sizeof(asn_DEF_another_name_tags_3)
257 /sizeof(asn_DEF_another_name_tags_3[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400258 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000259 0, /* No PER visible constraints */
Lev Walkinb7f17972005-03-04 09:10:19 +0000260 asn_MBR_another_name_3,
261 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000262 &asn_SPC_another_name_specs_3 /* Additional specs */
Lev Walkinb7f17972005-03-04 09:10:19 +0000263};
264
265static asn_TYPE_member_t asn_MBR_one_name_2[] = {
266 { ATF_NOFLAGS, 0, offsetof(struct one_name, choice.another_name),
267 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
268 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000269 .type = &asn_DEF_another_name_3,
Lev Walkin67a30122017-08-10 05:48:54 -0700270 .type_selector = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000271 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400272 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000273 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
274 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000275 .name = "another-name"
276 },
277};
Lev Walkina7591b52014-10-12 18:37:35 -0700278static const asn_TYPE_tag2member_t asn_MAP_one_name_tag2el_2[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700279 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name */
Lev Walkinb7f17972005-03-04 09:10:19 +0000280};
Lev Walkin59b176e2005-11-26 11:25:14 +0000281static asn_CHOICE_specifics_t asn_SPC_one_name_specs_2 = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000282 sizeof(struct one_name),
283 offsetof(struct one_name, _asn_ctx),
284 offsetof(struct one_name, present),
285 sizeof(((struct one_name *)0)->present),
Lev Walkine3917082017-08-23 10:29:38 -0700286 .tag2el = asn_MAP_one_name_tag2el_2,
287 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000288 .canonical_order = 0,
289 .ext_start = -1 /* Extensions start */
Lev Walkinb7f17972005-03-04 09:10:19 +0000290};
291static /* Use -fall-defs-global to expose */
292asn_TYPE_descriptor_t asn_DEF_one_name_2 = {
293 "one-name",
294 "one-name",
295 CHOICE_free,
296 CHOICE_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700297 CHOICE_compare,
Lev Walkinb7f17972005-03-04 09:10:19 +0000298 CHOICE_constraint,
299 CHOICE_decode_ber,
300 CHOICE_encode_der,
301 CHOICE_decode_xer,
302 CHOICE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700303 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400304 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinb7f17972005-03-04 09:10:19 +0000305 CHOICE_outmost_tag,
306 0, /* No effective tags (pointer) */
307 0, /* No effective tags (count) */
308 0, /* No tags (pointer) */
309 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400310 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000311 0, /* No PER visible constraints */
Lev Walkinb7f17972005-03-04 09:10:19 +0000312 asn_MBR_one_name_2,
313 1, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000314 &asn_SPC_one_name_specs_2 /* Additional specs */
Lev Walkinb7f17972005-03-04 09:10:19 +0000315};
316
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800317asn_TYPE_member_t asn_MBR_Type1_1[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000318 { ATF_NOFLAGS, 0, offsetof(struct Type1, one_name),
319 .tag = -1 /* Ambiguous tag (CHOICE?) */,
320 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000321 .type = &asn_DEF_one_name_2,
Lev Walkin67a30122017-08-10 05:48:54 -0700322 .type_selector = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000323 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400324 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000325 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
326 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000327 .name = "one-name"
328 },
329};
Lev Walkina7591b52014-10-12 18:37:35 -0700330static const ber_tlv_tag_t asn_DEF_Type1_tags_1[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000331 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
332};
Lev Walkina7591b52014-10-12 18:37:35 -0700333static const asn_TYPE_tag2member_t asn_MAP_Type1_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700334 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name */
Lev Walkinb7f17972005-03-04 09:10:19 +0000335};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800336asn_SEQUENCE_specifics_t asn_SPC_Type1_specs_1 = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000337 sizeof(struct Type1),
338 offsetof(struct Type1, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700339 .tag2el = asn_MAP_Type1_tag2el_1,
340 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000341 0, 0, 0, /* Optional elements (not needed) */
Lev Walkinb7f17972005-03-04 09:10:19 +0000342 -1, /* Start extensions */
343 -1 /* Stop extensions */
344};
345asn_TYPE_descriptor_t asn_DEF_Type1 = {
346 "Type1",
347 "Type1",
348 SEQUENCE_free,
349 SEQUENCE_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700350 SEQUENCE_compare,
Lev Walkinb7f17972005-03-04 09:10:19 +0000351 SEQUENCE_constraint,
352 SEQUENCE_decode_ber,
353 SEQUENCE_encode_der,
354 SEQUENCE_decode_xer,
355 SEQUENCE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700356 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400357 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinb7f17972005-03-04 09:10:19 +0000358 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000359 asn_DEF_Type1_tags_1,
360 sizeof(asn_DEF_Type1_tags_1)
361 /sizeof(asn_DEF_Type1_tags_1[0]), /* 1 */
362 asn_DEF_Type1_tags_1, /* Same as above */
363 sizeof(asn_DEF_Type1_tags_1)
364 /sizeof(asn_DEF_Type1_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400365 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000366 0, /* No PER visible constraints */
Lev Walkinb7f17972005-03-04 09:10:19 +0000367 asn_MBR_Type1_1,
368 1, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000369 &asn_SPC_Type1_specs_1 /* Additional specs */
Lev Walkinb7f17972005-03-04 09:10:19 +0000370};
371
372
373/*** <<< INCLUDES [Type2] >>> ***/
374
375#include <BIT_STRING.h>
376#include <INTEGER.h>
377#include <constr_SEQUENCE.h>
378#include <constr_SET.h>
379#include <constr_CHOICE.h>
380
381/*** <<< DEPS [Type2] >>> ***/
382
383typedef enum Type2_PR {
384 Type2_PR_NOTHING, /* No components present */
385 Type2_PR_one_name,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000386 Type2_PR_two_name
Lev Walkinb7f17972005-03-04 09:10:19 +0000387} Type2_PR;
Lev Walkinb02a8832005-08-13 23:51:47 +0000388typedef enum a {
389 a_one = 0
Lev Walkin171487e2006-03-21 07:25:18 +0000390} e_a;
Lev Walkinb7f17972005-03-04 09:10:19 +0000391
392/*
393 * Method of determining the components presence
394 */
395typedef enum two_name_PR {
396 two_name_PR_another_name, /* Member another_name is present */
397} two_name_PR;
Lev Walkinb02a8832005-08-13 23:51:47 +0000398typedef enum a {
399 a_one = 0
Lev Walkin171487e2006-03-21 07:25:18 +0000400} e_a;
Lev Walkinb7f17972005-03-04 09:10:19 +0000401
402/*** <<< TYPE-DECLS [Type2] >>> ***/
403
Lev Walkinb7f17972005-03-04 09:10:19 +0000404typedef struct Type2 {
405 Type2_PR present;
Lev Walkin0f5d74c2005-08-14 15:03:31 +0000406 union Type2_u {
Lev Walkinb7f17972005-03-04 09:10:19 +0000407 struct one_name {
408 struct another_name {
409 BIT_STRING_t a;
410 INTEGER_t b;
411
412 /* Context for parsing across buffer boundaries */
413 asn_struct_ctx_t _asn_ctx;
414 } another_name;
415
416 /* Context for parsing across buffer boundaries */
417 asn_struct_ctx_t _asn_ctx;
418 } one_name;
419 struct two_name {
420 struct another_name {
421 BIT_STRING_t a;
422 INTEGER_t b;
423
424 /* Context for parsing across buffer boundaries */
425 asn_struct_ctx_t _asn_ctx;
426 } another_name;
427
428 /* Presence bitmask: ASN_SET_ISPRESENT(ptwo_name, two_name_PR_x) */
429 unsigned int _presence_map
430 [((1+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
431
432 /* Context for parsing across buffer boundaries */
433 asn_struct_ctx_t _asn_ctx;
434 } two_name;
435 } choice;
436
437 /* Context for parsing across buffer boundaries */
438 asn_struct_ctx_t _asn_ctx;
439} Type2_t;
440
Lev Walkinc8285712005-03-04 22:18:20 +0000441/*** <<< FUNC-DECLS [Type2] >>> ***/
442
443extern asn_TYPE_descriptor_t asn_DEF_Type2;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800444extern asn_CHOICE_specifics_t asn_SPC_Type2_specs_1;
445extern asn_TYPE_member_t asn_MBR_Type2_1[2];
Lev Walkinc8285712005-03-04 22:18:20 +0000446
Lev Walkinb7f17972005-03-04 09:10:19 +0000447/*** <<< CODE [Type2] >>> ***/
448
449static int
Lev Walkin59b176e2005-11-26 11:25:14 +0000450memb_a_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000451 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkinb7f17972005-03-04 09:10:19 +0000452 const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
453 size_t size;
454
455 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700456 ASN__CTFAIL(app_key, td, sptr,
Lev Walkinb7f17972005-03-04 09:10:19 +0000457 "%s: value not given (%s:%d)",
458 td->name, __FILE__, __LINE__);
459 return -1;
460 }
461
462 if(st->size > 0) {
463 /* Size in bits */
Lev Walkin1b1c5fc2006-09-08 19:38:11 +0000464 size = 8 * st->size - (st->bits_unused & 0x07);
Lev Walkinb7f17972005-03-04 09:10:19 +0000465 } else {
466 size = 0;
467 }
468
469 if((size == 2)) {
470 /* Constraint check succeeded */
471 return 0;
472 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700473 ASN__CTFAIL(app_key, td, sptr,
Lev Walkinb7f17972005-03-04 09:10:19 +0000474 "%s: constraint failed (%s:%d)",
475 td->name, __FILE__, __LINE__);
476 return -1;
477 }
478}
479
480static int
Lev Walkin59b176e2005-11-26 11:25:14 +0000481memb_a_constraint_8(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000482 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkinb7f17972005-03-04 09:10:19 +0000483 const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
484 size_t size;
485
486 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700487 ASN__CTFAIL(app_key, td, sptr,
Lev Walkinb7f17972005-03-04 09:10:19 +0000488 "%s: value not given (%s:%d)",
489 td->name, __FILE__, __LINE__);
490 return -1;
491 }
492
493 if(st->size > 0) {
494 /* Size in bits */
Lev Walkin1b1c5fc2006-09-08 19:38:11 +0000495 size = 8 * st->size - (st->bits_unused & 0x07);
Lev Walkinb7f17972005-03-04 09:10:19 +0000496 } else {
497 size = 0;
498 }
499
500 if((size == 2)) {
501 /* Constraint check succeeded */
502 return 0;
503 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700504 ASN__CTFAIL(app_key, td, sptr,
Lev Walkinb7f17972005-03-04 09:10:19 +0000505 "%s: constraint failed (%s:%d)",
506 td->name, __FILE__, __LINE__);
507 return -1;
508 }
509}
510
511
512/*** <<< STAT-DEFS [Type2] >>> ***/
513
514static asn_TYPE_member_t asn_MBR_another_name_3[] = {
515 { ATF_NOFLAGS, 0, offsetof(struct another_name, a),
516 .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
517 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000518 .type = &asn_DEF_BIT_STRING,
Lev Walkin67a30122017-08-10 05:48:54 -0700519 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +0000520 .memb_constraints = memb_a_constraint_3,
Lev Walkinb33425f2017-07-14 14:59:52 +0400521 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000522 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
523 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000524 .name = "a"
525 },
526 { ATF_NOFLAGS, 0, offsetof(struct another_name, b),
527 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
528 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000529 .type = &asn_DEF_INTEGER,
Lev Walkin67a30122017-08-10 05:48:54 -0700530 .type_selector = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000531 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400532 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000533 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
534 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000535 .name = "b"
536 },
537};
Lev Walkina7591b52014-10-12 18:37:35 -0700538static const ber_tlv_tag_t asn_DEF_another_name_tags_3[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000539 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
540};
Lev Walkina7591b52014-10-12 18:37:35 -0700541static const asn_TYPE_tag2member_t asn_MAP_another_name_tag2el_3[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700542 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* b */
543 { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 0 } /* a */
Lev Walkinb7f17972005-03-04 09:10:19 +0000544};
Lev Walkin59b176e2005-11-26 11:25:14 +0000545static asn_SEQUENCE_specifics_t asn_SPC_another_name_specs_3 = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000546 sizeof(struct another_name),
547 offsetof(struct another_name, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700548 .tag2el = asn_MAP_another_name_tag2el_3,
549 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000550 0, 0, 0, /* Optional elements (not needed) */
Lev Walkinb7f17972005-03-04 09:10:19 +0000551 -1, /* Start extensions */
552 -1 /* Stop extensions */
553};
554static /* Use -fall-defs-global to expose */
555asn_TYPE_descriptor_t asn_DEF_another_name_3 = {
556 "another-name",
557 "another-name",
558 SEQUENCE_free,
559 SEQUENCE_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700560 SEQUENCE_compare,
Lev Walkinb7f17972005-03-04 09:10:19 +0000561 SEQUENCE_constraint,
562 SEQUENCE_decode_ber,
563 SEQUENCE_encode_der,
564 SEQUENCE_decode_xer,
565 SEQUENCE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700566 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400567 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinb7f17972005-03-04 09:10:19 +0000568 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000569 asn_DEF_another_name_tags_3,
570 sizeof(asn_DEF_another_name_tags_3)
571 /sizeof(asn_DEF_another_name_tags_3[0]), /* 1 */
572 asn_DEF_another_name_tags_3, /* Same as above */
573 sizeof(asn_DEF_another_name_tags_3)
574 /sizeof(asn_DEF_another_name_tags_3[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400575 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000576 0, /* No PER visible constraints */
Lev Walkinb7f17972005-03-04 09:10:19 +0000577 asn_MBR_another_name_3,
578 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000579 &asn_SPC_another_name_specs_3 /* Additional specs */
Lev Walkinb7f17972005-03-04 09:10:19 +0000580};
581
582static asn_TYPE_member_t asn_MBR_one_name_2[] = {
583 { ATF_NOFLAGS, 0, offsetof(struct one_name, another_name),
584 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
585 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000586 .type = &asn_DEF_another_name_3,
Lev Walkin67a30122017-08-10 05:48:54 -0700587 .type_selector = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000588 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400589 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000590 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
591 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000592 .name = "another-name"
593 },
594};
Lev Walkina7591b52014-10-12 18:37:35 -0700595static const ber_tlv_tag_t asn_DEF_one_name_tags_2[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000596 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
597};
Lev Walkina7591b52014-10-12 18:37:35 -0700598static const asn_TYPE_tag2member_t asn_MAP_one_name_tag2el_2[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700599 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name */
Lev Walkinb7f17972005-03-04 09:10:19 +0000600};
Lev Walkin59b176e2005-11-26 11:25:14 +0000601static asn_SEQUENCE_specifics_t asn_SPC_one_name_specs_2 = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000602 sizeof(struct one_name),
603 offsetof(struct one_name, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700604 .tag2el = asn_MAP_one_name_tag2el_2,
605 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000606 0, 0, 0, /* Optional elements (not needed) */
Lev Walkinb7f17972005-03-04 09:10:19 +0000607 -1, /* Start extensions */
608 -1 /* Stop extensions */
609};
610static /* Use -fall-defs-global to expose */
611asn_TYPE_descriptor_t asn_DEF_one_name_2 = {
612 "one-name",
613 "one-name",
614 SEQUENCE_free,
615 SEQUENCE_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700616 SEQUENCE_compare,
Lev Walkinb7f17972005-03-04 09:10:19 +0000617 SEQUENCE_constraint,
618 SEQUENCE_decode_ber,
619 SEQUENCE_encode_der,
620 SEQUENCE_decode_xer,
621 SEQUENCE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700622 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400623 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinb7f17972005-03-04 09:10:19 +0000624 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000625 asn_DEF_one_name_tags_2,
626 sizeof(asn_DEF_one_name_tags_2)
627 /sizeof(asn_DEF_one_name_tags_2[0]), /* 1 */
628 asn_DEF_one_name_tags_2, /* Same as above */
629 sizeof(asn_DEF_one_name_tags_2)
630 /sizeof(asn_DEF_one_name_tags_2[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400631 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000632 0, /* No PER visible constraints */
Lev Walkinb7f17972005-03-04 09:10:19 +0000633 asn_MBR_one_name_2,
634 1, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000635 &asn_SPC_one_name_specs_2 /* Additional specs */
Lev Walkinb7f17972005-03-04 09:10:19 +0000636};
637
Lev Walkine8318b82005-03-06 09:29:03 +0000638static asn_TYPE_member_t asn_MBR_another_name_8[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000639 { ATF_NOFLAGS, 0, offsetof(struct another_name, a),
640 .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
641 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000642 .type = &asn_DEF_BIT_STRING,
Lev Walkin67a30122017-08-10 05:48:54 -0700643 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +0000644 .memb_constraints = memb_a_constraint_8,
Lev Walkinb33425f2017-07-14 14:59:52 +0400645 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000646 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
647 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000648 .name = "a"
649 },
650 { ATF_NOFLAGS, 0, offsetof(struct another_name, b),
651 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
652 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000653 .type = &asn_DEF_INTEGER,
Lev Walkin67a30122017-08-10 05:48:54 -0700654 .type_selector = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000655 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400656 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000657 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
658 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000659 .name = "b"
660 },
661};
Lev Walkina7591b52014-10-12 18:37:35 -0700662static const ber_tlv_tag_t asn_DEF_another_name_tags_8[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000663 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
664};
Lev Walkina7591b52014-10-12 18:37:35 -0700665static const asn_TYPE_tag2member_t asn_MAP_another_name_tag2el_8[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700666 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* b */
667 { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 0 } /* a */
Lev Walkinb7f17972005-03-04 09:10:19 +0000668};
Lev Walkin59b176e2005-11-26 11:25:14 +0000669static asn_SEQUENCE_specifics_t asn_SPC_another_name_specs_8 = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000670 sizeof(struct another_name),
671 offsetof(struct another_name, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700672 .tag2el = asn_MAP_another_name_tag2el_8,
673 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000674 0, 0, 0, /* Optional elements (not needed) */
Lev Walkinb7f17972005-03-04 09:10:19 +0000675 -1, /* Start extensions */
676 -1 /* Stop extensions */
677};
678static /* Use -fall-defs-global to expose */
Lev Walkine8318b82005-03-06 09:29:03 +0000679asn_TYPE_descriptor_t asn_DEF_another_name_8 = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000680 "another-name",
681 "another-name",
682 SEQUENCE_free,
683 SEQUENCE_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700684 SEQUENCE_compare,
Lev Walkinb7f17972005-03-04 09:10:19 +0000685 SEQUENCE_constraint,
686 SEQUENCE_decode_ber,
687 SEQUENCE_encode_der,
688 SEQUENCE_decode_xer,
689 SEQUENCE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700690 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400691 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinb7f17972005-03-04 09:10:19 +0000692 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000693 asn_DEF_another_name_tags_8,
694 sizeof(asn_DEF_another_name_tags_8)
695 /sizeof(asn_DEF_another_name_tags_8[0]), /* 1 */
696 asn_DEF_another_name_tags_8, /* Same as above */
697 sizeof(asn_DEF_another_name_tags_8)
698 /sizeof(asn_DEF_another_name_tags_8[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400699 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000700 0, /* No PER visible constraints */
Lev Walkine8318b82005-03-06 09:29:03 +0000701 asn_MBR_another_name_8,
Lev Walkinb7f17972005-03-04 09:10:19 +0000702 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000703 &asn_SPC_another_name_specs_8 /* Additional specs */
Lev Walkinb7f17972005-03-04 09:10:19 +0000704};
705
Lev Walkine8318b82005-03-06 09:29:03 +0000706static asn_TYPE_member_t asn_MBR_two_name_7[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000707 { ATF_NOFLAGS, 0, offsetof(struct two_name, another_name),
708 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
709 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000710 .type = &asn_DEF_another_name_8,
Lev Walkin67a30122017-08-10 05:48:54 -0700711 .type_selector = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000712 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400713 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000714 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
715 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000716 .name = "another-name"
717 },
718};
Lev Walkina7591b52014-10-12 18:37:35 -0700719static const ber_tlv_tag_t asn_DEF_two_name_tags_7[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000720 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
721};
Lev Walkina7591b52014-10-12 18:37:35 -0700722static const asn_TYPE_tag2member_t asn_MAP_two_name_tag2el_7[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700723 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name */
Lev Walkinb7f17972005-03-04 09:10:19 +0000724};
Lev Walkina7591b52014-10-12 18:37:35 -0700725static const uint8_t asn_MAP_two_name_mmap_7[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000726 (1 << 7)
727};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800728static
729asn_SET_specifics_t asn_SPC_two_name_specs_7 = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000730 sizeof(struct two_name),
731 offsetof(struct two_name, _asn_ctx),
732 offsetof(struct two_name, _presence_map),
Lev Walkine3917082017-08-23 10:29:38 -0700733 .tag2el = asn_MAP_two_name_tag2el_7,
734 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000735 asn_MAP_two_name_tag2el_7, /* Same as above */
Lev Walkinb7f17972005-03-04 09:10:19 +0000736 1, /* Count of tags in the CXER map */
737 0, /* Whether extensible */
Lev Walkin46ef3f32017-07-06 08:47:53 -0700738 (const unsigned int *)asn_MAP_two_name_mmap_7 /* Mandatory elements map */
Lev Walkinb7f17972005-03-04 09:10:19 +0000739};
740static /* Use -fall-defs-global to expose */
Lev Walkine8318b82005-03-06 09:29:03 +0000741asn_TYPE_descriptor_t asn_DEF_two_name_7 = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000742 "two-name",
743 "two-name",
744 SET_free,
745 SET_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700746 SET_compare,
Lev Walkinb7f17972005-03-04 09:10:19 +0000747 SET_constraint,
748 SET_decode_ber,
749 SET_encode_der,
750 SET_decode_xer,
751 SET_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700752 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400753 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinb7f17972005-03-04 09:10:19 +0000754 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000755 asn_DEF_two_name_tags_7,
756 sizeof(asn_DEF_two_name_tags_7)
757 /sizeof(asn_DEF_two_name_tags_7[0]), /* 1 */
758 asn_DEF_two_name_tags_7, /* Same as above */
759 sizeof(asn_DEF_two_name_tags_7)
760 /sizeof(asn_DEF_two_name_tags_7[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400761 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000762 0, /* No PER visible constraints */
Lev Walkine8318b82005-03-06 09:29:03 +0000763 asn_MBR_two_name_7,
Lev Walkinb7f17972005-03-04 09:10:19 +0000764 1, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000765 &asn_SPC_two_name_specs_7 /* Additional specs */
Lev Walkinb7f17972005-03-04 09:10:19 +0000766};
767
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800768asn_TYPE_member_t asn_MBR_Type2_1[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000769 { ATF_NOFLAGS, 0, offsetof(struct Type2, choice.one_name),
770 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
771 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000772 .type = &asn_DEF_one_name_2,
Lev Walkin67a30122017-08-10 05:48:54 -0700773 .type_selector = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000774 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400775 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000776 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
777 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000778 .name = "one-name"
779 },
780 { ATF_NOFLAGS, 0, offsetof(struct Type2, choice.two_name),
781 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
782 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000783 .type = &asn_DEF_two_name_7,
Lev Walkin67a30122017-08-10 05:48:54 -0700784 .type_selector = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000785 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400786 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000787 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
788 .default_value = 0,
Lev Walkinb7f17972005-03-04 09:10:19 +0000789 .name = "two-name"
790 },
791};
Lev Walkina7591b52014-10-12 18:37:35 -0700792static const asn_TYPE_tag2member_t asn_MAP_Type2_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700793 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* one-name */
794 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 1, 0, 0 } /* two-name */
Lev Walkinb7f17972005-03-04 09:10:19 +0000795};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800796asn_CHOICE_specifics_t asn_SPC_Type2_specs_1 = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000797 sizeof(struct Type2),
798 offsetof(struct Type2, _asn_ctx),
799 offsetof(struct Type2, present),
800 sizeof(((struct Type2 *)0)->present),
Lev Walkine3917082017-08-23 10:29:38 -0700801 .tag2el = asn_MAP_Type2_tag2el_1,
802 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000803 .canonical_order = 0,
804 .ext_start = -1 /* Extensions start */
Lev Walkinb7f17972005-03-04 09:10:19 +0000805};
806asn_TYPE_descriptor_t asn_DEF_Type2 = {
807 "Type2",
808 "Type2",
809 CHOICE_free,
810 CHOICE_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700811 CHOICE_compare,
Lev Walkinb7f17972005-03-04 09:10:19 +0000812 CHOICE_constraint,
813 CHOICE_decode_ber,
814 CHOICE_encode_der,
815 CHOICE_decode_xer,
816 CHOICE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700817 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400818 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinb7f17972005-03-04 09:10:19 +0000819 CHOICE_outmost_tag,
820 0, /* No effective tags (pointer) */
821 0, /* No effective tags (count) */
822 0, /* No tags (pointer) */
823 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400824 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000825 0, /* No PER visible constraints */
Lev Walkinb7f17972005-03-04 09:10:19 +0000826 asn_MBR_Type2_1,
827 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000828 &asn_SPC_Type2_specs_1 /* Additional specs */
Lev Walkinb7f17972005-03-04 09:10:19 +0000829};
830