blob: 0014fe1e49e2d2245c4ea1120db1344a6c58805c [file] [log] [blame]
Lev Walkinb7f17972005-03-04 09:10:19 +00001
2/*** <<< INCLUDES [Type] >>> ***/
3
4#include <asn_SET_OF.h>
5#include <Type1.h>
6#include <Type2.h>
7#include <constr_SEQUENCE.h>
8#include <constr_SET_OF.h>
9
Lev Walkinb7f17972005-03-04 09:10:19 +000010/*** <<< TYPE-DECLS [Type] >>> ***/
11
Lev Walkinb7f17972005-03-04 09:10:19 +000012typedef struct Type {
13 A_SET_OF(struct Member {
14 Type1_t t1;
15 Type2_t t2;
16
17 /* Context for parsing across buffer boundaries */
18 asn_struct_ctx_t _asn_ctx;
19 } ) list;
20
21 /* Context for parsing across buffer boundaries */
22 asn_struct_ctx_t _asn_ctx;
23} Type_t;
24
Lev Walkinc8285712005-03-04 22:18:20 +000025/*** <<< FUNC-DECLS [Type] >>> ***/
26
27extern asn_TYPE_descriptor_t asn_DEF_Type;
28
Lev Walkinb7f17972005-03-04 09:10:19 +000029/*** <<< STAT-DEFS [Type] >>> ***/
30
31static asn_TYPE_member_t asn_MBR_Member_2[] = {
32 { ATF_NOFLAGS, 0, offsetof(struct Member, t1),
33 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
34 .tag_mode = 0,
35 .type = (void *)&asn_DEF_Type1,
36 .memb_constraints = 0, /* Defer constraints checking to the member type */
37 .name = "t1"
38 },
39 { ATF_NOFLAGS, 0, offsetof(struct Member, t2),
40 .tag = -1 /* Ambiguous tag (CHOICE?) */,
41 .tag_mode = 0,
42 .type = (void *)&asn_DEF_Type2,
43 .memb_constraints = 0, /* Defer constraints checking to the member type */
44 .name = "t2"
45 },
46};
47static ber_tlv_tag_t asn_DEF_Member_2_tags[] = {
48 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
49};
50static asn_TYPE_tag2member_t asn_MAP_Member_2_tag2el[] = {
51 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* t1 at 21 */
52 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 }, /* one-name at 37 */
53 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 1, 0, 0 } /* two-name at 43 */
54};
55static asn_SEQUENCE_specifics_t asn_SPC_Member_2_specs = {
56 sizeof(struct Member),
57 offsetof(struct Member, _asn_ctx),
58 asn_MAP_Member_2_tag2el,
59 3, /* Count of tags in the map */
60 -1, /* Start extensions */
61 -1 /* Stop extensions */
62};
63static /* Use -fall-defs-global to expose */
64asn_TYPE_descriptor_t asn_DEF_Member_2 = {
65 "",
66 "",
67 SEQUENCE_free,
68 SEQUENCE_print,
69 SEQUENCE_constraint,
70 SEQUENCE_decode_ber,
71 SEQUENCE_encode_der,
72 SEQUENCE_decode_xer,
73 SEQUENCE_encode_xer,
74 0, /* Use generic outmost tag fetcher */
75 asn_DEF_Member_2_tags,
76 sizeof(asn_DEF_Member_2_tags)
77 /sizeof(asn_DEF_Member_2_tags[0]), /* 1 */
78 asn_DEF_Member_2_tags, /* Same as above */
79 sizeof(asn_DEF_Member_2_tags)
80 /sizeof(asn_DEF_Member_2_tags[0]), /* 1 */
81 asn_MBR_Member_2,
82 2, /* Elements count */
83 &asn_SPC_Member_2_specs /* Additional specs */
84};
85
86static asn_TYPE_member_t asn_MBR_Type_1[] = {
87 { ATF_NOFLAGS, 0, 0,
88 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
89 .tag_mode = 0,
90 .type = (void *)&asn_DEF_Member_2,
91 .memb_constraints = 0, /* Defer constraints checking to the member type */
92 .name = ""
93 },
94};
95static ber_tlv_tag_t asn_DEF_Type_1_tags[] = {
96 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
97};
98static asn_SET_OF_specifics_t asn_SPC_Type_1_specs = {
99 sizeof(struct Type),
100 offsetof(struct Type, _asn_ctx),
101 0, /* XER encoding is XMLDelimitedItemList */
102};
103asn_TYPE_descriptor_t asn_DEF_Type = {
104 "Type",
105 "Type",
106 SET_OF_free,
107 SET_OF_print,
108 SET_OF_constraint,
109 SET_OF_decode_ber,
110 SET_OF_encode_der,
111 SET_OF_decode_xer,
112 SET_OF_encode_xer,
113 0, /* Use generic outmost tag fetcher */
114 asn_DEF_Type_1_tags,
115 sizeof(asn_DEF_Type_1_tags)
116 /sizeof(asn_DEF_Type_1_tags[0]), /* 1 */
117 asn_DEF_Type_1_tags, /* Same as above */
118 sizeof(asn_DEF_Type_1_tags)
119 /sizeof(asn_DEF_Type_1_tags[0]), /* 1 */
120 asn_MBR_Type_1,
121 1, /* Single element */
122 &asn_SPC_Type_1_specs /* Additional specs */
123};
124
125
126/*** <<< INCLUDES [Type1] >>> ***/
127
128#include <INTEGER.h>
129#include <constr_SEQUENCE.h>
130#include <constr_CHOICE.h>
131
132/*** <<< DEPS [Type1] >>> ***/
133
134typedef enum one_name_PR {
135 one_name_PR_NOTHING, /* No components present */
136 one_name_PR_another_name,
137} one_name_PR;
Lev Walkinb7f17972005-03-04 09:10:19 +0000138
139/*** <<< TYPE-DECLS [Type1] >>> ***/
140
Lev Walkinb7f17972005-03-04 09:10:19 +0000141typedef struct Type1 {
142 struct one_name {
143 one_name_PR present;
144 union {
145 struct another_name {
146 INTEGER_t a;
147 INTEGER_t b;
148
149 /* Context for parsing across buffer boundaries */
150 asn_struct_ctx_t _asn_ctx;
151 } another_name;
152 } choice;
153
154 /* Context for parsing across buffer boundaries */
155 asn_struct_ctx_t _asn_ctx;
156 } one_name;
157
158 /* Context for parsing across buffer boundaries */
159 asn_struct_ctx_t _asn_ctx;
160} Type1_t;
161
Lev Walkinc8285712005-03-04 22:18:20 +0000162/*** <<< FUNC-DECLS [Type1] >>> ***/
163
164extern asn_TYPE_descriptor_t asn_DEF_Type1;
165
Lev Walkinb7f17972005-03-04 09:10:19 +0000166/*** <<< STAT-DEFS [Type1] >>> ***/
167
168static asn_TYPE_member_t asn_MBR_another_name_3[] = {
169 { ATF_NOFLAGS, 0, offsetof(struct another_name, a),
170 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
171 .tag_mode = 0,
172 .type = (void *)&asn_DEF_INTEGER,
173 .memb_constraints = 0, /* Defer constraints checking to the member type */
174 .name = "a"
175 },
176 { ATF_NOFLAGS, 0, offsetof(struct another_name, b),
177 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
178 .tag_mode = 0,
179 .type = (void *)&asn_DEF_INTEGER,
180 .memb_constraints = 0, /* Defer constraints checking to the member type */
181 .name = "b"
182 },
183};
184static ber_tlv_tag_t asn_DEF_another_name_3_tags[] = {
185 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
186};
187static asn_TYPE_tag2member_t asn_MAP_another_name_3_tag2el[] = {
188 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* a at 27 */
189 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* b at 27 */
190};
191static asn_SEQUENCE_specifics_t asn_SPC_another_name_3_specs = {
192 sizeof(struct another_name),
193 offsetof(struct another_name, _asn_ctx),
194 asn_MAP_another_name_3_tag2el,
195 2, /* Count of tags in the map */
196 -1, /* Start extensions */
197 -1 /* Stop extensions */
198};
199static /* Use -fall-defs-global to expose */
200asn_TYPE_descriptor_t asn_DEF_another_name_3 = {
201 "another-name",
202 "another-name",
203 SEQUENCE_free,
204 SEQUENCE_print,
205 SEQUENCE_constraint,
206 SEQUENCE_decode_ber,
207 SEQUENCE_encode_der,
208 SEQUENCE_decode_xer,
209 SEQUENCE_encode_xer,
210 0, /* Use generic outmost tag fetcher */
211 asn_DEF_another_name_3_tags,
212 sizeof(asn_DEF_another_name_3_tags)
213 /sizeof(asn_DEF_another_name_3_tags[0]), /* 1 */
214 asn_DEF_another_name_3_tags, /* Same as above */
215 sizeof(asn_DEF_another_name_3_tags)
216 /sizeof(asn_DEF_another_name_3_tags[0]), /* 1 */
217 asn_MBR_another_name_3,
218 2, /* Elements count */
219 &asn_SPC_another_name_3_specs /* Additional specs */
220};
221
222static asn_TYPE_member_t asn_MBR_one_name_2[] = {
223 { ATF_NOFLAGS, 0, offsetof(struct one_name, choice.another_name),
224 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
225 .tag_mode = 0,
226 .type = (void *)&asn_DEF_another_name_3,
227 .memb_constraints = 0, /* Defer constraints checking to the member type */
228 .name = "another-name"
229 },
230};
231static asn_TYPE_tag2member_t asn_MAP_one_name_2_tag2el[] = {
232 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name at 27 */
233};
234static asn_CHOICE_specifics_t asn_SPC_one_name_2_specs = {
235 sizeof(struct one_name),
236 offsetof(struct one_name, _asn_ctx),
237 offsetof(struct one_name, present),
238 sizeof(((struct one_name *)0)->present),
239 asn_MAP_one_name_2_tag2el,
240 1, /* Count of tags in the map */
241 0 /* Whether extensible */
242};
243static /* Use -fall-defs-global to expose */
244asn_TYPE_descriptor_t asn_DEF_one_name_2 = {
245 "one-name",
246 "one-name",
247 CHOICE_free,
248 CHOICE_print,
249 CHOICE_constraint,
250 CHOICE_decode_ber,
251 CHOICE_encode_der,
252 CHOICE_decode_xer,
253 CHOICE_encode_xer,
254 CHOICE_outmost_tag,
255 0, /* No effective tags (pointer) */
256 0, /* No effective tags (count) */
257 0, /* No tags (pointer) */
258 0, /* No tags (count) */
259 asn_MBR_one_name_2,
260 1, /* Elements count */
261 &asn_SPC_one_name_2_specs /* Additional specs */
262};
263
264static asn_TYPE_member_t asn_MBR_Type1_1[] = {
265 { ATF_NOFLAGS, 0, offsetof(struct Type1, one_name),
266 .tag = -1 /* Ambiguous tag (CHOICE?) */,
267 .tag_mode = 0,
268 .type = (void *)&asn_DEF_one_name_2,
269 .memb_constraints = 0, /* Defer constraints checking to the member type */
270 .name = "one-name"
271 },
272};
273static ber_tlv_tag_t asn_DEF_Type1_1_tags[] = {
274 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
275};
276static asn_TYPE_tag2member_t asn_MAP_Type1_1_tag2el[] = {
277 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name at 27 */
278};
279static asn_SEQUENCE_specifics_t asn_SPC_Type1_1_specs = {
280 sizeof(struct Type1),
281 offsetof(struct Type1, _asn_ctx),
282 asn_MAP_Type1_1_tag2el,
283 1, /* Count of tags in the map */
284 -1, /* Start extensions */
285 -1 /* Stop extensions */
286};
287asn_TYPE_descriptor_t asn_DEF_Type1 = {
288 "Type1",
289 "Type1",
290 SEQUENCE_free,
291 SEQUENCE_print,
292 SEQUENCE_constraint,
293 SEQUENCE_decode_ber,
294 SEQUENCE_encode_der,
295 SEQUENCE_decode_xer,
296 SEQUENCE_encode_xer,
297 0, /* Use generic outmost tag fetcher */
298 asn_DEF_Type1_1_tags,
299 sizeof(asn_DEF_Type1_1_tags)
300 /sizeof(asn_DEF_Type1_1_tags[0]), /* 1 */
301 asn_DEF_Type1_1_tags, /* Same as above */
302 sizeof(asn_DEF_Type1_1_tags)
303 /sizeof(asn_DEF_Type1_1_tags[0]), /* 1 */
304 asn_MBR_Type1_1,
305 1, /* Elements count */
306 &asn_SPC_Type1_1_specs /* Additional specs */
307};
308
309
310/*** <<< INCLUDES [Type2] >>> ***/
311
312#include <BIT_STRING.h>
313#include <INTEGER.h>
314#include <constr_SEQUENCE.h>
315#include <constr_SET.h>
316#include <constr_CHOICE.h>
317
318/*** <<< DEPS [Type2] >>> ***/
319
320typedef enum Type2_PR {
321 Type2_PR_NOTHING, /* No components present */
322 Type2_PR_one_name,
323 Type2_PR_two_name,
324} Type2_PR;
325
326/*
327 * Method of determining the components presence
328 */
329typedef enum two_name_PR {
330 two_name_PR_another_name, /* Member another_name is present */
331} two_name_PR;
Lev Walkinb7f17972005-03-04 09:10:19 +0000332
333/*** <<< TYPE-DECLS [Type2] >>> ***/
334
Lev Walkinb7f17972005-03-04 09:10:19 +0000335typedef struct Type2 {
336 Type2_PR present;
337 union {
338 struct one_name {
339 struct another_name {
340 BIT_STRING_t a;
341 INTEGER_t b;
342
343 /* Context for parsing across buffer boundaries */
344 asn_struct_ctx_t _asn_ctx;
345 } another_name;
346
347 /* Context for parsing across buffer boundaries */
348 asn_struct_ctx_t _asn_ctx;
349 } one_name;
350 struct two_name {
351 struct another_name {
352 BIT_STRING_t a;
353 INTEGER_t b;
354
355 /* Context for parsing across buffer boundaries */
356 asn_struct_ctx_t _asn_ctx;
357 } another_name;
358
359 /* Presence bitmask: ASN_SET_ISPRESENT(ptwo_name, two_name_PR_x) */
360 unsigned int _presence_map
361 [((1+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
362
363 /* Context for parsing across buffer boundaries */
364 asn_struct_ctx_t _asn_ctx;
365 } two_name;
366 } choice;
367
368 /* Context for parsing across buffer boundaries */
369 asn_struct_ctx_t _asn_ctx;
370} Type2_t;
371
Lev Walkinc8285712005-03-04 22:18:20 +0000372/*** <<< FUNC-DECLS [Type2] >>> ***/
373
374extern asn_TYPE_descriptor_t asn_DEF_Type2;
375
Lev Walkinb7f17972005-03-04 09:10:19 +0000376/*** <<< CODE [Type2] >>> ***/
377
378static int
379memb_a_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
380 asn_app_consume_bytes_f *app_errlog, void *app_key) {
381 const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
382 size_t size;
383
384 if(!sptr) {
385 _ASN_ERRLOG(app_errlog, app_key,
386 "%s: value not given (%s:%d)",
387 td->name, __FILE__, __LINE__);
388 return -1;
389 }
390
391 if(st->size > 0) {
392 /* Size in bits */
393 size = 8 * (st->size - 1) - (st->buf[0] & 0x7);
394 } else {
395 size = 0;
396 }
397
398 if((size == 2)) {
399 /* Constraint check succeeded */
400 return 0;
401 } else {
402 _ASN_ERRLOG(app_errlog, app_key,
403 "%s: constraint failed (%s:%d)",
404 td->name, __FILE__, __LINE__);
405 return -1;
406 }
407}
408
409static int
Lev Walkine8318b82005-03-06 09:29:03 +0000410memb_a_8_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkinb7f17972005-03-04 09:10:19 +0000411 asn_app_consume_bytes_f *app_errlog, void *app_key) {
412 const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
413 size_t size;
414
415 if(!sptr) {
416 _ASN_ERRLOG(app_errlog, app_key,
417 "%s: value not given (%s:%d)",
418 td->name, __FILE__, __LINE__);
419 return -1;
420 }
421
422 if(st->size > 0) {
423 /* Size in bits */
424 size = 8 * (st->size - 1) - (st->buf[0] & 0x7);
425 } else {
426 size = 0;
427 }
428
429 if((size == 2)) {
430 /* Constraint check succeeded */
431 return 0;
432 } else {
433 _ASN_ERRLOG(app_errlog, app_key,
434 "%s: constraint failed (%s:%d)",
435 td->name, __FILE__, __LINE__);
436 return -1;
437 }
438}
439
440
441/*** <<< STAT-DEFS [Type2] >>> ***/
442
443static asn_TYPE_member_t asn_MBR_another_name_3[] = {
444 { ATF_NOFLAGS, 0, offsetof(struct another_name, a),
445 .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
446 .tag_mode = 0,
447 .type = (void *)&asn_DEF_BIT_STRING,
448 .memb_constraints = memb_a_3_constraint,
449 .name = "a"
450 },
451 { ATF_NOFLAGS, 0, offsetof(struct another_name, b),
452 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
453 .tag_mode = 0,
454 .type = (void *)&asn_DEF_INTEGER,
455 .memb_constraints = 0, /* Defer constraints checking to the member type */
456 .name = "b"
457 },
458};
459static ber_tlv_tag_t asn_DEF_another_name_3_tags[] = {
460 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
461};
462static asn_TYPE_tag2member_t asn_MAP_another_name_3_tag2el[] = {
463 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* b at 36 */
464 { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 0 } /* a at 34 */
465};
466static asn_SEQUENCE_specifics_t asn_SPC_another_name_3_specs = {
467 sizeof(struct another_name),
468 offsetof(struct another_name, _asn_ctx),
469 asn_MAP_another_name_3_tag2el,
470 2, /* Count of tags in the map */
471 -1, /* Start extensions */
472 -1 /* Stop extensions */
473};
474static /* Use -fall-defs-global to expose */
475asn_TYPE_descriptor_t asn_DEF_another_name_3 = {
476 "another-name",
477 "another-name",
478 SEQUENCE_free,
479 SEQUENCE_print,
480 SEQUENCE_constraint,
481 SEQUENCE_decode_ber,
482 SEQUENCE_encode_der,
483 SEQUENCE_decode_xer,
484 SEQUENCE_encode_xer,
485 0, /* Use generic outmost tag fetcher */
486 asn_DEF_another_name_3_tags,
487 sizeof(asn_DEF_another_name_3_tags)
488 /sizeof(asn_DEF_another_name_3_tags[0]), /* 1 */
489 asn_DEF_another_name_3_tags, /* Same as above */
490 sizeof(asn_DEF_another_name_3_tags)
491 /sizeof(asn_DEF_another_name_3_tags[0]), /* 1 */
492 asn_MBR_another_name_3,
493 2, /* Elements count */
494 &asn_SPC_another_name_3_specs /* Additional specs */
495};
496
497static asn_TYPE_member_t asn_MBR_one_name_2[] = {
498 { ATF_NOFLAGS, 0, offsetof(struct one_name, another_name),
499 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
500 .tag_mode = 0,
501 .type = (void *)&asn_DEF_another_name_3,
502 .memb_constraints = 0, /* Defer constraints checking to the member type */
503 .name = "another-name"
504 },
505};
506static ber_tlv_tag_t asn_DEF_one_name_2_tags[] = {
507 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
508};
509static asn_TYPE_tag2member_t asn_MAP_one_name_2_tag2el[] = {
510 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name at 34 */
511};
512static asn_SEQUENCE_specifics_t asn_SPC_one_name_2_specs = {
513 sizeof(struct one_name),
514 offsetof(struct one_name, _asn_ctx),
515 asn_MAP_one_name_2_tag2el,
516 1, /* Count of tags in the map */
517 -1, /* Start extensions */
518 -1 /* Stop extensions */
519};
520static /* Use -fall-defs-global to expose */
521asn_TYPE_descriptor_t asn_DEF_one_name_2 = {
522 "one-name",
523 "one-name",
524 SEQUENCE_free,
525 SEQUENCE_print,
526 SEQUENCE_constraint,
527 SEQUENCE_decode_ber,
528 SEQUENCE_encode_der,
529 SEQUENCE_decode_xer,
530 SEQUENCE_encode_xer,
531 0, /* Use generic outmost tag fetcher */
532 asn_DEF_one_name_2_tags,
533 sizeof(asn_DEF_one_name_2_tags)
534 /sizeof(asn_DEF_one_name_2_tags[0]), /* 1 */
535 asn_DEF_one_name_2_tags, /* Same as above */
536 sizeof(asn_DEF_one_name_2_tags)
537 /sizeof(asn_DEF_one_name_2_tags[0]), /* 1 */
538 asn_MBR_one_name_2,
539 1, /* Elements count */
540 &asn_SPC_one_name_2_specs /* Additional specs */
541};
542
Lev Walkine8318b82005-03-06 09:29:03 +0000543static asn_TYPE_member_t asn_MBR_another_name_8[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000544 { ATF_NOFLAGS, 0, offsetof(struct another_name, a),
545 .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
546 .tag_mode = 0,
547 .type = (void *)&asn_DEF_BIT_STRING,
Lev Walkine8318b82005-03-06 09:29:03 +0000548 .memb_constraints = memb_a_8_constraint,
Lev Walkinb7f17972005-03-04 09:10:19 +0000549 .name = "a"
550 },
551 { ATF_NOFLAGS, 0, offsetof(struct another_name, b),
552 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
553 .tag_mode = 0,
554 .type = (void *)&asn_DEF_INTEGER,
555 .memb_constraints = 0, /* Defer constraints checking to the member type */
556 .name = "b"
557 },
558};
Lev Walkine8318b82005-03-06 09:29:03 +0000559static ber_tlv_tag_t asn_DEF_another_name_8_tags[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000560 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
561};
Lev Walkine8318b82005-03-06 09:29:03 +0000562static asn_TYPE_tag2member_t asn_MAP_another_name_8_tag2el[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000563 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* b at 42 */
564 { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 0 } /* a at 40 */
565};
Lev Walkine8318b82005-03-06 09:29:03 +0000566static asn_SEQUENCE_specifics_t asn_SPC_another_name_8_specs = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000567 sizeof(struct another_name),
568 offsetof(struct another_name, _asn_ctx),
Lev Walkine8318b82005-03-06 09:29:03 +0000569 asn_MAP_another_name_8_tag2el,
Lev Walkinb7f17972005-03-04 09:10:19 +0000570 2, /* Count of tags in the map */
571 -1, /* Start extensions */
572 -1 /* Stop extensions */
573};
574static /* Use -fall-defs-global to expose */
Lev Walkine8318b82005-03-06 09:29:03 +0000575asn_TYPE_descriptor_t asn_DEF_another_name_8 = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000576 "another-name",
577 "another-name",
578 SEQUENCE_free,
579 SEQUENCE_print,
580 SEQUENCE_constraint,
581 SEQUENCE_decode_ber,
582 SEQUENCE_encode_der,
583 SEQUENCE_decode_xer,
584 SEQUENCE_encode_xer,
585 0, /* Use generic outmost tag fetcher */
Lev Walkine8318b82005-03-06 09:29:03 +0000586 asn_DEF_another_name_8_tags,
587 sizeof(asn_DEF_another_name_8_tags)
588 /sizeof(asn_DEF_another_name_8_tags[0]), /* 1 */
589 asn_DEF_another_name_8_tags, /* Same as above */
590 sizeof(asn_DEF_another_name_8_tags)
591 /sizeof(asn_DEF_another_name_8_tags[0]), /* 1 */
592 asn_MBR_another_name_8,
Lev Walkinb7f17972005-03-04 09:10:19 +0000593 2, /* Elements count */
Lev Walkine8318b82005-03-06 09:29:03 +0000594 &asn_SPC_another_name_8_specs /* Additional specs */
Lev Walkinb7f17972005-03-04 09:10:19 +0000595};
596
Lev Walkine8318b82005-03-06 09:29:03 +0000597static asn_TYPE_member_t asn_MBR_two_name_7[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000598 { ATF_NOFLAGS, 0, offsetof(struct two_name, another_name),
599 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
600 .tag_mode = 0,
Lev Walkine8318b82005-03-06 09:29:03 +0000601 .type = (void *)&asn_DEF_another_name_8,
Lev Walkinb7f17972005-03-04 09:10:19 +0000602 .memb_constraints = 0, /* Defer constraints checking to the member type */
603 .name = "another-name"
604 },
605};
Lev Walkine8318b82005-03-06 09:29:03 +0000606static ber_tlv_tag_t asn_DEF_two_name_7_tags[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000607 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
608};
Lev Walkine8318b82005-03-06 09:29:03 +0000609static asn_TYPE_tag2member_t asn_MAP_two_name_7_tag2el[] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000610 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name at 40 */
611};
Lev Walkine8318b82005-03-06 09:29:03 +0000612static uint8_t asn_MAP_two_name_7_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000613 (1 << 7)
614};
Lev Walkine8318b82005-03-06 09:29:03 +0000615static asn_SET_specifics_t asn_SPC_two_name_7_specs = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000616 sizeof(struct two_name),
617 offsetof(struct two_name, _asn_ctx),
618 offsetof(struct two_name, _presence_map),
Lev Walkine8318b82005-03-06 09:29:03 +0000619 asn_MAP_two_name_7_tag2el,
Lev Walkinb7f17972005-03-04 09:10:19 +0000620 1, /* Count of tags in the map */
Lev Walkine8318b82005-03-06 09:29:03 +0000621 asn_MAP_two_name_7_tag2el, /* Same as above */
Lev Walkinb7f17972005-03-04 09:10:19 +0000622 1, /* Count of tags in the CXER map */
623 0, /* Whether extensible */
Lev Walkine8318b82005-03-06 09:29:03 +0000624 (unsigned int *)asn_MAP_two_name_7_mmap /* Mandatory elements map */
Lev Walkinb7f17972005-03-04 09:10:19 +0000625};
626static /* Use -fall-defs-global to expose */
Lev Walkine8318b82005-03-06 09:29:03 +0000627asn_TYPE_descriptor_t asn_DEF_two_name_7 = {
Lev Walkinb7f17972005-03-04 09:10:19 +0000628 "two-name",
629 "two-name",
630 SET_free,
631 SET_print,
632 SET_constraint,
633 SET_decode_ber,
634 SET_encode_der,
635 SET_decode_xer,
636 SET_encode_xer,
637 0, /* Use generic outmost tag fetcher */
Lev Walkine8318b82005-03-06 09:29:03 +0000638 asn_DEF_two_name_7_tags,
639 sizeof(asn_DEF_two_name_7_tags)
640 /sizeof(asn_DEF_two_name_7_tags[0]), /* 1 */
641 asn_DEF_two_name_7_tags, /* Same as above */
642 sizeof(asn_DEF_two_name_7_tags)
643 /sizeof(asn_DEF_two_name_7_tags[0]), /* 1 */
644 asn_MBR_two_name_7,
Lev Walkinb7f17972005-03-04 09:10:19 +0000645 1, /* Elements count */
Lev Walkine8318b82005-03-06 09:29:03 +0000646 &asn_SPC_two_name_7_specs /* Additional specs */
Lev Walkinb7f17972005-03-04 09:10:19 +0000647};
648
649static asn_TYPE_member_t asn_MBR_Type2_1[] = {
650 { ATF_NOFLAGS, 0, offsetof(struct Type2, choice.one_name),
651 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
652 .tag_mode = 0,
653 .type = (void *)&asn_DEF_one_name_2,
654 .memb_constraints = 0, /* Defer constraints checking to the member type */
655 .name = "one-name"
656 },
657 { ATF_NOFLAGS, 0, offsetof(struct Type2, choice.two_name),
658 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
659 .tag_mode = 0,
Lev Walkine8318b82005-03-06 09:29:03 +0000660 .type = (void *)&asn_DEF_two_name_7,
Lev Walkinb7f17972005-03-04 09:10:19 +0000661 .memb_constraints = 0, /* Defer constraints checking to the member type */
662 .name = "two-name"
663 },
664};
665static asn_TYPE_tag2member_t asn_MAP_Type2_1_tag2el[] = {
666 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* one-name at 37 */
667 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 1, 0, 0 } /* two-name at 43 */
668};
669static asn_CHOICE_specifics_t asn_SPC_Type2_1_specs = {
670 sizeof(struct Type2),
671 offsetof(struct Type2, _asn_ctx),
672 offsetof(struct Type2, present),
673 sizeof(((struct Type2 *)0)->present),
674 asn_MAP_Type2_1_tag2el,
675 2, /* Count of tags in the map */
676 0 /* Whether extensible */
677};
678asn_TYPE_descriptor_t asn_DEF_Type2 = {
679 "Type2",
680 "Type2",
681 CHOICE_free,
682 CHOICE_print,
683 CHOICE_constraint,
684 CHOICE_decode_ber,
685 CHOICE_encode_der,
686 CHOICE_decode_xer,
687 CHOICE_encode_xer,
688 CHOICE_outmost_tag,
689 0, /* No effective tags (pointer) */
690 0, /* No effective tags (count) */
691 0, /* No tags (pointer) */
692 0, /* No tags (count) */
693 asn_MBR_Type2_1,
694 2, /* Elements count */
695 &asn_SPC_Type2_1_specs /* Additional specs */
696};
697