blob: 2256b5b7bf7d0cacc023640cd564d86ed952a91f [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>
8#include <INTEGER.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 */
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;
38 INTEGER_t 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/*** <<< STAT-DEFS [Choice] >>> ***/
60
61static asn_TYPE_member_t asn_MBR_ch_4[] = {
62 { ATF_NOFLAGS, 0, offsetof(struct ch, choice.null),
63 .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)),
64 .tag_mode = 0,
65 .type = &asn_DEF_NULL,
66 .memb_constraints = 0, /* Defer constraints checking to the member type */
67 .per_constraints = 0, /* No PER visible constraints */
68 .default_value = 0,
69 .name = "null"
70 },
71 { ATF_NOFLAGS, 0, offsetof(struct ch, choice.Int),
72 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
73 .tag_mode = 0,
74 .type = &asn_DEF_INTEGER,
75 .memb_constraints = 0, /* Defer constraints checking to the member type */
76 .per_constraints = 0, /* No PER visible constraints */
77 .default_value = 0,
78 .name = "int"
79 },
80};
81static int asn_MAP_ch_cmap_4[] = { 1, 0 };
82static asn_TYPE_tag2member_t asn_MAP_ch_tag2el_4[] = {
83 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* int at 20 */
84 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 0, 0, 0 } /* null at 18 */
85};
86static asn_CHOICE_specifics_t asn_SPC_ch_specs_4 = {
87 sizeof(struct ch),
88 offsetof(struct ch, _asn_ctx),
89 offsetof(struct ch, present),
90 sizeof(((struct ch *)0)->present),
91 asn_MAP_ch_tag2el_4,
92 2, /* Count of tags in the map */
93 .canonical_order = asn_MAP_ch_cmap_4, /* Canonically sorted */
94 .ext_start = -1 /* Extensions start */
95};
96static asn_per_constraints_t asn_PER_ch_constr_4 = {
97 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
98 { APC_UNCONSTRAINED, -1, -1, 0, 0 }
99};
100static /* Use -fall-defs-global to expose */
101asn_TYPE_descriptor_t asn_DEF_ch_4 = {
102 "ch",
103 "ch",
104 CHOICE_free,
105 CHOICE_print,
106 CHOICE_constraint,
107 CHOICE_decode_ber,
108 CHOICE_encode_der,
109 CHOICE_decode_xer,
110 CHOICE_encode_xer,
111 CHOICE_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000112 CHOICE_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +0000113 CHOICE_outmost_tag,
114 0, /* No effective tags (pointer) */
115 0, /* No effective tags (count) */
116 0, /* No tags (pointer) */
117 0, /* No tags (count) */
118 &asn_PER_ch_constr_4,
119 asn_MBR_ch_4,
120 2, /* Elements count */
121 &asn_SPC_ch_specs_4 /* Additional specs */
122};
123
124static asn_per_constraints_t asn_PER_memb_ch_constr_4 = {
125 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
126 { APC_UNCONSTRAINED, -1, -1, 0, 0 }
127};
128static asn_TYPE_member_t asn_MBR_Choice_1[] = {
129 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.roid),
130 .tag = (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)),
131 .tag_mode = 0,
132 .type = &asn_DEF_RELATIVE_OID,
133 .memb_constraints = 0, /* Defer constraints checking to the member type */
134 .per_constraints = 0, /* No PER visible constraints */
135 .default_value = 0,
136 .name = "roid"
137 },
138 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.bitstr),
139 .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
140 .tag_mode = 0,
141 .type = &asn_DEF_BIT_STRING,
142 .memb_constraints = 0, /* Defer constraints checking to the member type */
143 .per_constraints = 0, /* No PER visible constraints */
144 .default_value = 0,
145 .name = "bitstr"
146 },
147 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.ch),
148 .tag = -1 /* Ambiguous tag (CHOICE?) */,
149 .tag_mode = 0,
150 .type = &asn_DEF_ch_4,
151 .memb_constraints = 0, /* Defer constraints checking to the member type */
152 .per_constraints = &asn_PER_memb_ch_constr_4,
153 .default_value = 0,
154 .name = "ch"
155 },
156 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.bool),
157 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
158 .tag_mode = 0,
159 .type = &asn_DEF_BOOLEAN,
160 .memb_constraints = 0, /* Defer constraints checking to the member type */
161 .per_constraints = 0, /* No PER visible constraints */
162 .default_value = 0,
163 .name = "bool"
164 },
165};
166static int asn_MAP_Choice_cmap_1[] = { 2, 1, 0, 3 };
167static asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
168 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool at 22 */
169 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, 0, 0 }, /* int at 20 */
170 { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 1, 0, 0 }, /* bitstr at 16 */
171 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 2, 0, 0 }, /* null at 18 */
172 { (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)), 0, 0, 0 } /* roid at 15 */
173};
174static asn_CHOICE_specifics_t asn_SPC_Choice_specs_1 = {
175 sizeof(struct Choice),
176 offsetof(struct Choice, _asn_ctx),
177 offsetof(struct Choice, present),
178 sizeof(((struct Choice *)0)->present),
179 asn_MAP_Choice_tag2el_1,
180 5, /* Count of tags in the map */
181 .canonical_order = asn_MAP_Choice_cmap_1, /* Canonically sorted */
182 .ext_start = 3 /* Extensions start */
183};
184static asn_per_constraints_t asn_PER_Choice_constr_1 = {
185 { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */,
186 { APC_UNCONSTRAINED, -1, -1, 0, 0 }
187};
188asn_TYPE_descriptor_t asn_DEF_Choice = {
189 "Choice",
190 "Choice",
191 CHOICE_free,
192 CHOICE_print,
193 CHOICE_constraint,
194 CHOICE_decode_ber,
195 CHOICE_encode_der,
196 CHOICE_decode_xer,
197 CHOICE_encode_xer,
198 CHOICE_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000199 CHOICE_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +0000200 CHOICE_outmost_tag,
201 0, /* No effective tags (pointer) */
202 0, /* No effective tags (count) */
203 0, /* No tags (pointer) */
204 0, /* No tags (count) */
205 &asn_PER_Choice_constr_1,
206 asn_MBR_Choice_1,
207 4, /* Elements count */
208 &asn_SPC_Choice_specs_1 /* Additional specs */
209};
210
211
212/*** <<< INCLUDES [Choice2] >>> ***/
213
214#include <BIT_STRING.h>
215#include <RELATIVE-OID.h>
216#include <constr_CHOICE.h>
217
218/*** <<< DEPS [Choice2] >>> ***/
219
220typedef enum Choice2_PR {
221 Choice2_PR_NOTHING, /* No components present */
222 Choice2_PR_bitstr,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000223 Choice2_PR_roid
Lev Walkin59b176e2005-11-26 11:25:14 +0000224} Choice2_PR;
225
226/*** <<< TYPE-DECLS [Choice2] >>> ***/
227
228typedef struct Choice2 {
229 Choice2_PR present;
230 union Choice2_u {
231 BIT_STRING_t bitstr;
232 RELATIVE_OID_t roid;
233 } choice;
234
235 /* Context for parsing across buffer boundaries */
236 asn_struct_ctx_t _asn_ctx;
237} Choice2_t;
238
239/*** <<< FUNC-DECLS [Choice2] >>> ***/
240
241extern asn_TYPE_descriptor_t asn_DEF_Choice2;
242
243/*** <<< STAT-DEFS [Choice2] >>> ***/
244
245static asn_TYPE_member_t asn_MBR_Choice2_1[] = {
246 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.bitstr),
247 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
248 .tag_mode = +1, /* EXPLICIT tag at current level */
249 .type = &asn_DEF_BIT_STRING,
250 .memb_constraints = 0, /* Defer constraints checking to the member type */
251 .per_constraints = 0, /* No PER visible constraints */
252 .default_value = 0,
253 .name = "bitstr"
254 },
255 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.roid),
256 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
257 .tag_mode = +1, /* EXPLICIT tag at current level */
258 .type = &asn_DEF_RELATIVE_OID,
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 = "roid"
263 },
264};
265static asn_TYPE_tag2member_t asn_MAP_Choice2_tag2el_1[] = {
266 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* bitstr at 26 */
267 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* roid at 27 */
268};
269static asn_CHOICE_specifics_t asn_SPC_Choice2_specs_1 = {
270 sizeof(struct Choice2),
271 offsetof(struct Choice2, _asn_ctx),
272 offsetof(struct Choice2, present),
273 sizeof(((struct Choice2 *)0)->present),
274 asn_MAP_Choice2_tag2el_1,
275 2, /* Count of tags in the map */
276 .canonical_order = 0,
277 .ext_start = -1 /* Extensions start */
278};
279static asn_per_constraints_t asn_PER_Choice2_constr_1 = {
280 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
281 { APC_UNCONSTRAINED, -1, -1, 0, 0 }
282};
283asn_TYPE_descriptor_t asn_DEF_Choice2 = {
284 "Choice2",
285 "Choice2",
286 CHOICE_free,
287 CHOICE_print,
288 CHOICE_constraint,
289 CHOICE_decode_ber,
290 CHOICE_encode_der,
291 CHOICE_decode_xer,
292 CHOICE_encode_xer,
293 CHOICE_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000294 CHOICE_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +0000295 CHOICE_outmost_tag,
296 0, /* No effective tags (pointer) */
297 0, /* No effective tags (count) */
298 0, /* No tags (pointer) */
299 0, /* No tags (count) */
300 &asn_PER_Choice2_constr_1,
301 asn_MBR_Choice2_1,
302 2, /* Elements count */
303 &asn_SPC_Choice2_specs_1 /* Additional specs */
304};
305