blob: 86589186abd796d56fa2c66c0ccfbe3d519c810a [file] [log] [blame]
Lev Walkin59b176e2005-11-26 11:25:14 +00001
2/*** <<< INCLUDES [Choice] >>> ***/
3
4#include <RELATIVE-OID.h>
5#include <BIT_STRING.h>
6#include <BOOLEAN.h>
7#include <NULL.h>
Lev Walkin2a744a72013-03-27 01:56:23 -07008#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00009#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 */
Lev Walkin9f5bb3a2006-08-18 01:46:46 +000019 Choice_PR_bool
Lev Walkin59b176e2005-11-26 11:25:14 +000020} Choice_PR;
21typedef enum ch_PR {
22 ch_PR_NOTHING, /* No components present */
23 ch_PR_null,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +000024 ch_PR_int
Lev Walkin59b176e2005-11-26 11:25:14 +000025} 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;
Lev Walkin2a744a72013-03-27 01:56:23 -070038 long Int;
Lev Walkin59b176e2005-11-26 11:25:14 +000039 } 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 */
Lev Walkin2a744a72013-03-27 01:56:23 -070048 BOOLEAN_t Bool;
Lev Walkin59b176e2005-11-26 11:25:14 +000049 } 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
Lev Walkin725883b2006-10-09 12:07:58 +000059/*** <<< CTDEFS [Choice] >>> ***/
60
Lev Walkin2fce55d2013-03-28 05:00:39 -070061static asn_per_constraints_t asn_PER_type_ch_constr_4 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +000062 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
63 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
64 0, 0 /* No PER value map */
65};
Lev Walkin2fce55d2013-03-28 05:00:39 -070066static asn_per_constraints_t asn_PER_type_Choice_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +000067 { 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
Lev Walkin59b176e2005-11-26 11:25:14 +000072/*** <<< 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 */
Lev Walkinb33425f2017-07-14 14:59:52 +040080 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000081 .per_constraints = 0, /* No PER visible constraints */
82 .default_value = 0,
83 .name = "null"
84 },
85 { ATF_NOFLAGS, 0, offsetof(struct ch, choice.Int),
86 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
87 .tag_mode = 0,
Lev Walkin2a744a72013-03-27 01:56:23 -070088 .type = &asn_DEF_NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +000089 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040090 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000091 .per_constraints = 0, /* No PER visible constraints */
92 .default_value = 0,
93 .name = "int"
94 },
95};
Lev Walkina7591b52014-10-12 18:37:35 -070096static const int asn_MAP_ch_cmap_4[] = { 1, 0 };
97static const asn_TYPE_tag2member_t asn_MAP_ch_tag2el_4[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070098 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* int */
99 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 0, 0, 0 } /* null */
Lev Walkin59b176e2005-11-26 11:25:14 +0000100};
101static asn_CHOICE_specifics_t asn_SPC_ch_specs_4 = {
102 sizeof(struct ch),
103 offsetof(struct ch, _asn_ctx),
104 offsetof(struct ch, present),
105 sizeof(((struct ch *)0)->present),
106 asn_MAP_ch_tag2el_4,
107 2, /* Count of tags in the map */
108 .canonical_order = asn_MAP_ch_cmap_4, /* Canonically sorted */
109 .ext_start = -1 /* Extensions start */
110};
Lev Walkin59b176e2005-11-26 11:25:14 +0000111static /* Use -fall-defs-global to expose */
112asn_TYPE_descriptor_t asn_DEF_ch_4 = {
113 "ch",
114 "ch",
115 CHOICE_free,
116 CHOICE_print,
117 CHOICE_constraint,
118 CHOICE_decode_ber,
119 CHOICE_encode_der,
120 CHOICE_decode_xer,
121 CHOICE_encode_xer,
Lev Walkinb33425f2017-07-14 14:59:52 +0400122 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000123 CHOICE_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000124 CHOICE_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +0000125 CHOICE_outmost_tag,
126 0, /* No effective tags (pointer) */
127 0, /* No effective tags (count) */
128 0, /* No tags (pointer) */
129 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400130 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000131 &asn_PER_type_ch_constr_4,
Lev Walkin59b176e2005-11-26 11:25:14 +0000132 asn_MBR_ch_4,
133 2, /* Elements count */
134 &asn_SPC_ch_specs_4 /* Additional specs */
135};
136
Lev Walkin59b176e2005-11-26 11:25:14 +0000137static asn_TYPE_member_t asn_MBR_Choice_1[] = {
138 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.roid),
139 .tag = (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)),
140 .tag_mode = 0,
141 .type = &asn_DEF_RELATIVE_OID,
142 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400143 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000144 .per_constraints = 0, /* No PER visible constraints */
145 .default_value = 0,
146 .name = "roid"
147 },
148 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.bitstr),
149 .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
150 .tag_mode = 0,
151 .type = &asn_DEF_BIT_STRING,
152 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400153 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000154 .per_constraints = 0, /* No PER visible constraints */
155 .default_value = 0,
156 .name = "bitstr"
157 },
158 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.ch),
159 .tag = -1 /* Ambiguous tag (CHOICE?) */,
160 .tag_mode = 0,
161 .type = &asn_DEF_ch_4,
162 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400163 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin07aaa342006-10-09 12:52:15 +0000164 .per_constraints = 0, /* No PER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000165 .default_value = 0,
166 .name = "ch"
167 },
Lev Walkin2a744a72013-03-27 01:56:23 -0700168 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.Bool),
Lev Walkin59b176e2005-11-26 11:25:14 +0000169 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
170 .tag_mode = 0,
171 .type = &asn_DEF_BOOLEAN,
172 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400173 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000174 .per_constraints = 0, /* No PER visible constraints */
175 .default_value = 0,
176 .name = "bool"
177 },
178};
Lev Walkina7591b52014-10-12 18:37:35 -0700179static const int asn_MAP_Choice_cmap_1[] = { 2, 1, 0, 3 };
180static const asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700181 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool */
182 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, 0, 0 }, /* int */
183 { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 1, 0, 0 }, /* bitstr */
184 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 2, 0, 0 }, /* null */
185 { (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)), 0, 0, 0 } /* roid */
Lev Walkin59b176e2005-11-26 11:25:14 +0000186};
187static asn_CHOICE_specifics_t asn_SPC_Choice_specs_1 = {
188 sizeof(struct Choice),
189 offsetof(struct Choice, _asn_ctx),
190 offsetof(struct Choice, present),
191 sizeof(((struct Choice *)0)->present),
192 asn_MAP_Choice_tag2el_1,
193 5, /* Count of tags in the map */
194 .canonical_order = asn_MAP_Choice_cmap_1, /* Canonically sorted */
195 .ext_start = 3 /* Extensions start */
196};
Lev Walkin59b176e2005-11-26 11:25:14 +0000197asn_TYPE_descriptor_t asn_DEF_Choice = {
198 "Choice",
199 "Choice",
200 CHOICE_free,
201 CHOICE_print,
202 CHOICE_constraint,
203 CHOICE_decode_ber,
204 CHOICE_encode_der,
205 CHOICE_decode_xer,
206 CHOICE_encode_xer,
Lev Walkinb33425f2017-07-14 14:59:52 +0400207 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000208 CHOICE_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000209 CHOICE_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +0000210 CHOICE_outmost_tag,
211 0, /* No effective tags (pointer) */
212 0, /* No effective tags (count) */
213 0, /* No tags (pointer) */
214 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400215 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000216 &asn_PER_type_Choice_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000217 asn_MBR_Choice_1,
218 4, /* Elements count */
219 &asn_SPC_Choice_specs_1 /* Additional specs */
220};
221
222
223/*** <<< INCLUDES [Choice2] >>> ***/
224
225#include <BIT_STRING.h>
226#include <RELATIVE-OID.h>
227#include <constr_CHOICE.h>
228
229/*** <<< DEPS [Choice2] >>> ***/
230
231typedef enum Choice2_PR {
232 Choice2_PR_NOTHING, /* No components present */
233 Choice2_PR_bitstr,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000234 Choice2_PR_roid
Lev Walkin59b176e2005-11-26 11:25:14 +0000235} Choice2_PR;
236
237/*** <<< TYPE-DECLS [Choice2] >>> ***/
238
239typedef struct Choice2 {
240 Choice2_PR present;
241 union Choice2_u {
242 BIT_STRING_t bitstr;
243 RELATIVE_OID_t roid;
244 } choice;
245
246 /* Context for parsing across buffer boundaries */
247 asn_struct_ctx_t _asn_ctx;
248} Choice2_t;
249
250/*** <<< FUNC-DECLS [Choice2] >>> ***/
251
252extern asn_TYPE_descriptor_t asn_DEF_Choice2;
253
Lev Walkin725883b2006-10-09 12:07:58 +0000254/*** <<< CTDEFS [Choice2] >>> ***/
255
Lev Walkin2fce55d2013-03-28 05:00:39 -0700256static asn_per_constraints_t asn_PER_type_Choice2_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000257 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
258 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
259 0, 0 /* No PER value map */
260};
261
Lev Walkin59b176e2005-11-26 11:25:14 +0000262/*** <<< STAT-DEFS [Choice2] >>> ***/
263
264static asn_TYPE_member_t asn_MBR_Choice2_1[] = {
265 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.bitstr),
266 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
267 .tag_mode = +1, /* EXPLICIT tag at current level */
268 .type = &asn_DEF_BIT_STRING,
269 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400270 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000271 .per_constraints = 0, /* No PER visible constraints */
272 .default_value = 0,
273 .name = "bitstr"
274 },
275 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.roid),
276 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
277 .tag_mode = +1, /* EXPLICIT tag at current level */
278 .type = &asn_DEF_RELATIVE_OID,
279 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400280 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000281 .per_constraints = 0, /* No PER visible constraints */
282 .default_value = 0,
283 .name = "roid"
284 },
285};
Lev Walkina7591b52014-10-12 18:37:35 -0700286static const asn_TYPE_tag2member_t asn_MAP_Choice2_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700287 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* bitstr */
288 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* roid */
Lev Walkin59b176e2005-11-26 11:25:14 +0000289};
290static asn_CHOICE_specifics_t asn_SPC_Choice2_specs_1 = {
291 sizeof(struct Choice2),
292 offsetof(struct Choice2, _asn_ctx),
293 offsetof(struct Choice2, present),
294 sizeof(((struct Choice2 *)0)->present),
295 asn_MAP_Choice2_tag2el_1,
296 2, /* Count of tags in the map */
297 .canonical_order = 0,
298 .ext_start = -1 /* Extensions start */
299};
Lev Walkin59b176e2005-11-26 11:25:14 +0000300asn_TYPE_descriptor_t asn_DEF_Choice2 = {
301 "Choice2",
302 "Choice2",
303 CHOICE_free,
304 CHOICE_print,
305 CHOICE_constraint,
306 CHOICE_decode_ber,
307 CHOICE_encode_der,
308 CHOICE_decode_xer,
309 CHOICE_encode_xer,
Lev Walkinb33425f2017-07-14 14:59:52 +0400310 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000311 CHOICE_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000312 CHOICE_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +0000313 CHOICE_outmost_tag,
314 0, /* No effective tags (pointer) */
315 0, /* No effective tags (count) */
316 0, /* No tags (pointer) */
317 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400318 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000319 &asn_PER_type_Choice2_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000320 asn_MBR_Choice2_1,
321 2, /* Elements count */
322 &asn_SPC_Choice2_specs_1 /* Additional specs */
323};
324