1
2/*** <<< INCLUDES [Choice] >>> ***/
3
4#include <RELATIVE-OID.h>
5#include <BIT_STRING.h>
6#include <BOOLEAN.h>
7#include <NULL.h>
8#include <NativeInteger.h>
9#include <constr_CHOICE.h>
10
11/*** <<< DEPS [Choice] >>> ***/
12
13typedef enum Choice_PR {
14	Choice_PR_NOTHING,	/* No components present */
15	Choice_PR_roid,
16	Choice_PR_bitstr,
17	Choice_PR_ch,
18	/* Extensions may appear below */
19	Choice_PR_bool
20} Choice_PR;
21typedef enum ch_PR {
22	ch_PR_NOTHING,	/* No components present */
23	ch_PR_null,
24	ch_PR_int
25} ch_PR;
26
27/*** <<< TYPE-DECLS [Choice] >>> ***/
28
29typedef struct Choice {
30	Choice_PR present;
31	union Choice_u {
32		RELATIVE_OID_t	 roid;
33		BIT_STRING_t	 bitstr;
34		struct ch {
35			ch_PR present;
36			union Choice__ch_u {
37				NULL_t	 null;
38				long	 Int;
39			} choice;
40
41			/* Context for parsing across buffer boundaries */
42			asn_struct_ctx_t _asn_ctx;
43		} ch;
44		/*
45		 * This type is extensible,
46		 * possible extensions are below.
47		 */
48		BOOLEAN_t	 Bool;
49	} choice;
50
51	/* Context for parsing across buffer boundaries */
52	asn_struct_ctx_t _asn_ctx;
53} Choice_t;
54
55/*** <<< FUNC-DECLS [Choice] >>> ***/
56
57extern asn_TYPE_descriptor_t asn_DEF_Choice;
58
59/*** <<< CTDEFS [Choice] >>> ***/
60
61static asn_per_constraints_t asn_PER_type_ch_constr_4 GCC_NOTUSED = {
62	{ APC_CONSTRAINED,	 1,  1,  0,  1 }	/* (0..1) */,
63	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
64	0, 0	/* No PER value map */
65};
66static asn_per_constraints_t asn_PER_type_Choice_constr_1 GCC_NOTUSED = {
67	{ APC_CONSTRAINED | APC_EXTENSIBLE,  2,  2,  0,  2 }	/* (0..2,...) */,
68	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
69	0, 0	/* No PER value map */
70};
71
72/*** <<< STAT-DEFS [Choice] >>> ***/
73
74static asn_TYPE_member_t asn_MBR_ch_4[] = {
75	{ ATF_NOFLAGS, 0, offsetof(struct ch, choice.null),
76		.tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)),
77		.tag_mode = 0,
78		.type = &asn_DEF_NULL,
79		.memb_constraints = 0,	/* Defer constraints checking to the member type */
80		.per_constraints = 0,	/* No PER visible constraints */
81		.default_value = 0,
82		.name = "null"
83		},
84	{ ATF_NOFLAGS, 0, offsetof(struct ch, choice.Int),
85		.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
86		.tag_mode = 0,
87		.type = &asn_DEF_NativeInteger,
88		.memb_constraints = 0,	/* Defer constraints checking to the member type */
89		.per_constraints = 0,	/* No PER visible constraints */
90		.default_value = 0,
91		.name = "int"
92		},
93};
94static int asn_MAP_ch_cmap_4[] = { 1, 0 };
95static asn_TYPE_tag2member_t asn_MAP_ch_tag2el_4[] = {
96    { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* int */
97    { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 0, 0, 0 } /* null */
98};
99static asn_CHOICE_specifics_t asn_SPC_ch_specs_4 = {
100	sizeof(struct ch),
101	offsetof(struct ch, _asn_ctx),
102	offsetof(struct ch, present),
103	sizeof(((struct ch *)0)->present),
104	asn_MAP_ch_tag2el_4,
105	2,	/* Count of tags in the map */
106	.canonical_order = asn_MAP_ch_cmap_4,	/* Canonically sorted */
107	.ext_start = -1	/* Extensions start */
108};
109static /* Use -fall-defs-global to expose */
110asn_TYPE_descriptor_t asn_DEF_ch_4 = {
111	"ch",
112	"ch",
113	CHOICE_free,
114	CHOICE_print,
115	CHOICE_constraint,
116	CHOICE_decode_ber,
117	CHOICE_encode_der,
118	CHOICE_decode_xer,
119	CHOICE_encode_xer,
120	CHOICE_decode_uper,
121	CHOICE_encode_uper,
122	CHOICE_outmost_tag,
123	0,	/* No effective tags (pointer) */
124	0,	/* No effective tags (count) */
125	0,	/* No tags (pointer) */
126	0,	/* No tags (count) */
127	&asn_PER_type_ch_constr_4,
128	asn_MBR_ch_4,
129	2,	/* Elements count */
130	&asn_SPC_ch_specs_4	/* Additional specs */
131};
132
133static asn_TYPE_member_t asn_MBR_Choice_1[] = {
134	{ ATF_NOFLAGS, 0, offsetof(struct Choice, choice.roid),
135		.tag = (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)),
136		.tag_mode = 0,
137		.type = &asn_DEF_RELATIVE_OID,
138		.memb_constraints = 0,	/* Defer constraints checking to the member type */
139		.per_constraints = 0,	/* No PER visible constraints */
140		.default_value = 0,
141		.name = "roid"
142		},
143	{ ATF_NOFLAGS, 0, offsetof(struct Choice, choice.bitstr),
144		.tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
145		.tag_mode = 0,
146		.type = &asn_DEF_BIT_STRING,
147		.memb_constraints = 0,	/* Defer constraints checking to the member type */
148		.per_constraints = 0,	/* No PER visible constraints */
149		.default_value = 0,
150		.name = "bitstr"
151		},
152	{ ATF_NOFLAGS, 0, offsetof(struct Choice, choice.ch),
153		.tag = -1 /* Ambiguous tag (CHOICE?) */,
154		.tag_mode = 0,
155		.type = &asn_DEF_ch_4,
156		.memb_constraints = 0,	/* Defer constraints checking to the member type */
157		.per_constraints = 0,	/* No PER visible constraints */
158		.default_value = 0,
159		.name = "ch"
160		},
161	{ ATF_NOFLAGS, 0, offsetof(struct Choice, choice.Bool),
162		.tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
163		.tag_mode = 0,
164		.type = &asn_DEF_BOOLEAN,
165		.memb_constraints = 0,	/* Defer constraints checking to the member type */
166		.per_constraints = 0,	/* No PER visible constraints */
167		.default_value = 0,
168		.name = "bool"
169		},
170};
171static int asn_MAP_Choice_cmap_1[] = { 2, 1, 0, 3 };
172static asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
173    { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool */
174    { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, 0, 0 }, /* int */
175    { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 1, 0, 0 }, /* bitstr */
176    { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 2, 0, 0 }, /* null */
177    { (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)), 0, 0, 0 } /* roid */
178};
179static asn_CHOICE_specifics_t asn_SPC_Choice_specs_1 = {
180	sizeof(struct Choice),
181	offsetof(struct Choice, _asn_ctx),
182	offsetof(struct Choice, present),
183	sizeof(((struct Choice *)0)->present),
184	asn_MAP_Choice_tag2el_1,
185	5,	/* Count of tags in the map */
186	.canonical_order = asn_MAP_Choice_cmap_1,	/* Canonically sorted */
187	.ext_start = 3	/* Extensions start */
188};
189asn_TYPE_descriptor_t asn_DEF_Choice = {
190	"Choice",
191	"Choice",
192	CHOICE_free,
193	CHOICE_print,
194	CHOICE_constraint,
195	CHOICE_decode_ber,
196	CHOICE_encode_der,
197	CHOICE_decode_xer,
198	CHOICE_encode_xer,
199	CHOICE_decode_uper,
200	CHOICE_encode_uper,
201	CHOICE_outmost_tag,
202	0,	/* No effective tags (pointer) */
203	0,	/* No effective tags (count) */
204	0,	/* No tags (pointer) */
205	0,	/* No tags (count) */
206	&asn_PER_type_Choice_constr_1,
207	asn_MBR_Choice_1,
208	4,	/* Elements count */
209	&asn_SPC_Choice_specs_1	/* Additional specs */
210};
211
212
213/*** <<< INCLUDES [Choice2] >>> ***/
214
215#include <BIT_STRING.h>
216#include <RELATIVE-OID.h>
217#include <constr_CHOICE.h>
218
219/*** <<< DEPS [Choice2] >>> ***/
220
221typedef enum Choice2_PR {
222	Choice2_PR_NOTHING,	/* No components present */
223	Choice2_PR_bitstr,
224	Choice2_PR_roid
225} Choice2_PR;
226
227/*** <<< TYPE-DECLS [Choice2] >>> ***/
228
229typedef struct Choice2 {
230	Choice2_PR present;
231	union Choice2_u {
232		BIT_STRING_t	 bitstr;
233		RELATIVE_OID_t	 roid;
234	} choice;
235
236	/* Context for parsing across buffer boundaries */
237	asn_struct_ctx_t _asn_ctx;
238} Choice2_t;
239
240/*** <<< FUNC-DECLS [Choice2] >>> ***/
241
242extern asn_TYPE_descriptor_t asn_DEF_Choice2;
243
244/*** <<< CTDEFS [Choice2] >>> ***/
245
246static asn_per_constraints_t asn_PER_type_Choice2_constr_1 GCC_NOTUSED = {
247	{ APC_CONSTRAINED,	 1,  1,  0,  1 }	/* (0..1) */,
248	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
249	0, 0	/* No PER value map */
250};
251
252/*** <<< STAT-DEFS [Choice2] >>> ***/
253
254static asn_TYPE_member_t asn_MBR_Choice2_1[] = {
255	{ ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.bitstr),
256		.tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
257		.tag_mode = +1,	/* EXPLICIT tag at current level */
258		.type = &asn_DEF_BIT_STRING,
259		.memb_constraints = 0,	/* Defer constraints checking to the member type */
260		.per_constraints = 0,	/* No PER visible constraints */
261		.default_value = 0,
262		.name = "bitstr"
263		},
264	{ ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.roid),
265		.tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
266		.tag_mode = +1,	/* EXPLICIT tag at current level */
267		.type = &asn_DEF_RELATIVE_OID,
268		.memb_constraints = 0,	/* Defer constraints checking to the member type */
269		.per_constraints = 0,	/* No PER visible constraints */
270		.default_value = 0,
271		.name = "roid"
272		},
273};
274static asn_TYPE_tag2member_t asn_MAP_Choice2_tag2el_1[] = {
275    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* bitstr */
276    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* roid */
277};
278static asn_CHOICE_specifics_t asn_SPC_Choice2_specs_1 = {
279	sizeof(struct Choice2),
280	offsetof(struct Choice2, _asn_ctx),
281	offsetof(struct Choice2, present),
282	sizeof(((struct Choice2 *)0)->present),
283	asn_MAP_Choice2_tag2el_1,
284	2,	/* Count of tags in the map */
285	.canonical_order = 0,
286	.ext_start = -1	/* Extensions start */
287};
288asn_TYPE_descriptor_t asn_DEF_Choice2 = {
289	"Choice2",
290	"Choice2",
291	CHOICE_free,
292	CHOICE_print,
293	CHOICE_constraint,
294	CHOICE_decode_ber,
295	CHOICE_encode_der,
296	CHOICE_decode_xer,
297	CHOICE_encode_xer,
298	CHOICE_decode_uper,
299	CHOICE_encode_uper,
300	CHOICE_outmost_tag,
301	0,	/* No effective tags (pointer) */
302	0,	/* No effective tags (count) */
303	0,	/* No tags (pointer) */
304	0,	/* No tags (count) */
305	&asn_PER_type_Choice2_constr_1,
306	asn_MBR_Choice2_1,
307	2,	/* Elements count */
308	&asn_SPC_Choice2_specs_1	/* Additional specs */
309};
310
311