blob: d22436e7dc43387d3d77251ed8c756fe67348c8d [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 Walkin0479e042017-09-26 18:39:58 -070061static asn_per_constraints_t asn_PER_type_ch_constr_4 CC_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 Walkin0479e042017-09-26 18:39:58 -070066static asn_per_constraints_t asn_PER_type_Choice_constr_1 CC_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,
Lev Walkin67a30122017-08-10 05:48:54 -070079 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -070080 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +000081 .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,
Lev Walkin2a744a72013-03-27 01:56:23 -070087 .type = &asn_DEF_NativeInteger,
Lev Walkin67a30122017-08-10 05:48:54 -070088 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -070089 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +000090 .default_value = 0,
91 .name = "int"
92 },
93};
Lev Walkin18660d22017-08-12 20:45:23 -070094static const unsigned asn_MAP_ch_cmap_4[] = { 1, 0 };
Lev Walkina7591b52014-10-12 18:37:35 -070095static const asn_TYPE_tag2member_t asn_MAP_ch_tag2el_4[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070096 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* int */
97 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 0, 0, 0 } /* null */
Lev Walkin59b176e2005-11-26 11:25:14 +000098};
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),
Lev Walkine3917082017-08-23 10:29:38 -0700104 .tag2el = asn_MAP_ch_tag2el_4,
105 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000106 .canonical_order = asn_MAP_ch_cmap_4, /* Canonically sorted */
107 .ext_start = -1 /* Extensions start */
108};
Lev Walkin59b176e2005-11-26 11:25:14 +0000109static /* Use -fall-defs-global to expose */
110asn_TYPE_descriptor_t asn_DEF_ch_4 = {
111 "ch",
112 "ch",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800113 &asn_OP_CHOICE,
Lev Walkin59b176e2005-11-26 11:25:14 +0000114 0, /* No effective tags (pointer) */
115 0, /* No effective tags (count) */
116 0, /* No tags (pointer) */
117 0, /* No tags (count) */
Lev Walkin0bfea562017-09-29 23:16:48 -0700118 { 0, &asn_PER_type_ch_constr_4, CHOICE_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000119 asn_MBR_ch_4,
120 2, /* Elements count */
121 &asn_SPC_ch_specs_4 /* Additional specs */
122};
123
Lev Walkin59b176e2005-11-26 11:25:14 +0000124static asn_TYPE_member_t asn_MBR_Choice_1[] = {
125 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.roid),
126 .tag = (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)),
127 .tag_mode = 0,
128 .type = &asn_DEF_RELATIVE_OID,
Lev Walkin67a30122017-08-10 05:48:54 -0700129 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700130 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +0000131 .default_value = 0,
132 .name = "roid"
133 },
134 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.bitstr),
135 .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
136 .tag_mode = 0,
137 .type = &asn_DEF_BIT_STRING,
Lev Walkin67a30122017-08-10 05:48:54 -0700138 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700139 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +0000140 .default_value = 0,
141 .name = "bitstr"
142 },
143 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.ch),
144 .tag = -1 /* Ambiguous tag (CHOICE?) */,
145 .tag_mode = 0,
146 .type = &asn_DEF_ch_4,
Lev Walkin67a30122017-08-10 05:48:54 -0700147 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700148 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +0000149 .default_value = 0,
150 .name = "ch"
151 },
Lev Walkin2a744a72013-03-27 01:56:23 -0700152 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.Bool),
Lev Walkin59b176e2005-11-26 11:25:14 +0000153 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
154 .tag_mode = 0,
155 .type = &asn_DEF_BOOLEAN,
Lev Walkin67a30122017-08-10 05:48:54 -0700156 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700157 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +0000158 .default_value = 0,
159 .name = "bool"
160 },
161};
Lev Walkin18660d22017-08-12 20:45:23 -0700162static const unsigned asn_MAP_Choice_cmap_1[] = { 2, 1, 0, 3 };
Lev Walkina7591b52014-10-12 18:37:35 -0700163static const asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700164 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool */
165 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, 0, 0 }, /* int */
166 { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 1, 0, 0 }, /* bitstr */
167 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 2, 0, 0 }, /* null */
168 { (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)), 0, 0, 0 } /* roid */
Lev Walkin59b176e2005-11-26 11:25:14 +0000169};
170static asn_CHOICE_specifics_t asn_SPC_Choice_specs_1 = {
171 sizeof(struct Choice),
172 offsetof(struct Choice, _asn_ctx),
173 offsetof(struct Choice, present),
174 sizeof(((struct Choice *)0)->present),
Lev Walkine3917082017-08-23 10:29:38 -0700175 .tag2el = asn_MAP_Choice_tag2el_1,
176 .tag2el_count = 5, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000177 .canonical_order = asn_MAP_Choice_cmap_1, /* Canonically sorted */
178 .ext_start = 3 /* Extensions start */
179};
Lev Walkin59b176e2005-11-26 11:25:14 +0000180asn_TYPE_descriptor_t asn_DEF_Choice = {
181 "Choice",
182 "Choice",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800183 &asn_OP_CHOICE,
Lev Walkin59b176e2005-11-26 11:25:14 +0000184 0, /* No effective tags (pointer) */
185 0, /* No effective tags (count) */
186 0, /* No tags (pointer) */
187 0, /* No tags (count) */
Lev Walkin0bfea562017-09-29 23:16:48 -0700188 { 0, &asn_PER_type_Choice_constr_1, CHOICE_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000189 asn_MBR_Choice_1,
190 4, /* Elements count */
191 &asn_SPC_Choice_specs_1 /* Additional specs */
192};
193
194
195/*** <<< INCLUDES [Choice2] >>> ***/
196
197#include <BIT_STRING.h>
198#include <RELATIVE-OID.h>
199#include <constr_CHOICE.h>
200
201/*** <<< DEPS [Choice2] >>> ***/
202
203typedef enum Choice2_PR {
204 Choice2_PR_NOTHING, /* No components present */
205 Choice2_PR_bitstr,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000206 Choice2_PR_roid
Lev Walkin59b176e2005-11-26 11:25:14 +0000207} Choice2_PR;
208
209/*** <<< TYPE-DECLS [Choice2] >>> ***/
210
211typedef struct Choice2 {
212 Choice2_PR present;
213 union Choice2_u {
214 BIT_STRING_t bitstr;
215 RELATIVE_OID_t roid;
216 } choice;
217
218 /* Context for parsing across buffer boundaries */
219 asn_struct_ctx_t _asn_ctx;
220} Choice2_t;
221
222/*** <<< FUNC-DECLS [Choice2] >>> ***/
223
224extern asn_TYPE_descriptor_t asn_DEF_Choice2;
225
Lev Walkin725883b2006-10-09 12:07:58 +0000226/*** <<< CTDEFS [Choice2] >>> ***/
227
Lev Walkin0479e042017-09-26 18:39:58 -0700228static asn_per_constraints_t asn_PER_type_Choice2_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000229 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
230 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
231 0, 0 /* No PER value map */
232};
233
Lev Walkin59b176e2005-11-26 11:25:14 +0000234/*** <<< STAT-DEFS [Choice2] >>> ***/
235
236static asn_TYPE_member_t asn_MBR_Choice2_1[] = {
237 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.bitstr),
238 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
239 .tag_mode = +1, /* EXPLICIT tag at current level */
240 .type = &asn_DEF_BIT_STRING,
Lev Walkin67a30122017-08-10 05:48:54 -0700241 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700242 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +0000243 .default_value = 0,
244 .name = "bitstr"
245 },
246 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.roid),
247 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
248 .tag_mode = +1, /* EXPLICIT tag at current level */
249 .type = &asn_DEF_RELATIVE_OID,
Lev Walkin67a30122017-08-10 05:48:54 -0700250 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700251 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +0000252 .default_value = 0,
253 .name = "roid"
254 },
255};
Lev Walkina7591b52014-10-12 18:37:35 -0700256static const asn_TYPE_tag2member_t asn_MAP_Choice2_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700257 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* bitstr */
258 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* roid */
Lev Walkin59b176e2005-11-26 11:25:14 +0000259};
260static asn_CHOICE_specifics_t asn_SPC_Choice2_specs_1 = {
261 sizeof(struct Choice2),
262 offsetof(struct Choice2, _asn_ctx),
263 offsetof(struct Choice2, present),
264 sizeof(((struct Choice2 *)0)->present),
Lev Walkine3917082017-08-23 10:29:38 -0700265 .tag2el = asn_MAP_Choice2_tag2el_1,
266 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000267 .canonical_order = 0,
268 .ext_start = -1 /* Extensions start */
269};
Lev Walkin59b176e2005-11-26 11:25:14 +0000270asn_TYPE_descriptor_t asn_DEF_Choice2 = {
271 "Choice2",
272 "Choice2",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800273 &asn_OP_CHOICE,
Lev Walkin59b176e2005-11-26 11:25:14 +0000274 0, /* No effective tags (pointer) */
275 0, /* No effective tags (count) */
276 0, /* No tags (pointer) */
277 0, /* No tags (count) */
Lev Walkin0bfea562017-09-29 23:16:48 -0700278 { 0, &asn_PER_type_Choice2_constr_1, CHOICE_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000279 asn_MBR_Choice2_1,
280 2, /* Elements count */
281 &asn_SPC_Choice2_specs_1 /* Additional specs */
282};
283