blob: 61a0dbedb78d7635af4bab1d4c570434450efc4b [file] [log] [blame]
vlm37236de2005-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
vlm37236de2005-03-04 09:10:19 +000010/*** <<< TYPE-DECLS [Type] >>> ***/
11
vlm37236de2005-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
vlm0b567bf2005-03-04 22:18:20 +000025/*** <<< FUNC-DECLS [Type] >>> ***/
26
27extern asn_TYPE_descriptor_t asn_DEF_Type;
28
vlm37236de2005-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[] = {
vlm2cebdf32005-08-16 16:57:17 +000087 { ATF_POINTER, 0, 0,
vlm37236de2005-03-04 09:10:19 +000088 .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;
vlm37236de2005-03-04 09:10:19 +0000138
139/*** <<< TYPE-DECLS [Type1] >>> ***/
140
vlm37236de2005-03-04 09:10:19 +0000141typedef struct Type1 {
142 struct one_name {
143 one_name_PR present;
vlm2e774282005-08-14 15:03:31 +0000144 union Type1__one_name_u {
vlm37236de2005-03-04 09:10:19 +0000145 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
vlm0b567bf2005-03-04 22:18:20 +0000162/*** <<< FUNC-DECLS [Type1] >>> ***/
163
164extern asn_TYPE_descriptor_t asn_DEF_Type1;
165
vlm37236de2005-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;
vlm96853d82005-08-13 23:51:47 +0000325typedef enum a {
326 a_one = 0
327} a_e;
vlm37236de2005-03-04 09:10:19 +0000328
329/*
330 * Method of determining the components presence
331 */
332typedef enum two_name_PR {
333 two_name_PR_another_name, /* Member another_name is present */
334} two_name_PR;
vlm96853d82005-08-13 23:51:47 +0000335typedef enum a {
336 a_one = 0
337} a_e;
vlm37236de2005-03-04 09:10:19 +0000338
339/*** <<< TYPE-DECLS [Type2] >>> ***/
340
vlm37236de2005-03-04 09:10:19 +0000341typedef struct Type2 {
342 Type2_PR present;
vlm2e774282005-08-14 15:03:31 +0000343 union Type2_u {
vlm37236de2005-03-04 09:10:19 +0000344 struct one_name {
345 struct another_name {
346 BIT_STRING_t a;
347 INTEGER_t b;
348
349 /* Context for parsing across buffer boundaries */
350 asn_struct_ctx_t _asn_ctx;
351 } another_name;
352
353 /* Context for parsing across buffer boundaries */
354 asn_struct_ctx_t _asn_ctx;
355 } one_name;
356 struct two_name {
357 struct another_name {
358 BIT_STRING_t a;
359 INTEGER_t b;
360
361 /* Context for parsing across buffer boundaries */
362 asn_struct_ctx_t _asn_ctx;
363 } another_name;
364
365 /* Presence bitmask: ASN_SET_ISPRESENT(ptwo_name, two_name_PR_x) */
366 unsigned int _presence_map
367 [((1+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
368
369 /* Context for parsing across buffer boundaries */
370 asn_struct_ctx_t _asn_ctx;
371 } two_name;
372 } choice;
373
374 /* Context for parsing across buffer boundaries */
375 asn_struct_ctx_t _asn_ctx;
376} Type2_t;
377
vlm0b567bf2005-03-04 22:18:20 +0000378/*** <<< FUNC-DECLS [Type2] >>> ***/
379
380extern asn_TYPE_descriptor_t asn_DEF_Type2;
381
vlm37236de2005-03-04 09:10:19 +0000382/*** <<< CODE [Type2] >>> ***/
383
384static int
385memb_a_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
386 asn_app_consume_bytes_f *app_errlog, void *app_key) {
387 const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
388 size_t size;
389
390 if(!sptr) {
391 _ASN_ERRLOG(app_errlog, app_key,
392 "%s: value not given (%s:%d)",
393 td->name, __FILE__, __LINE__);
394 return -1;
395 }
396
397 if(st->size > 0) {
398 /* Size in bits */
399 size = 8 * (st->size - 1) - (st->buf[0] & 0x7);
400 } else {
401 size = 0;
402 }
403
404 if((size == 2)) {
405 /* Constraint check succeeded */
406 return 0;
407 } else {
408 _ASN_ERRLOG(app_errlog, app_key,
409 "%s: constraint failed (%s:%d)",
410 td->name, __FILE__, __LINE__);
411 return -1;
412 }
413}
414
415static int
vlm67d57fe2005-03-06 09:29:03 +0000416memb_a_8_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlm37236de2005-03-04 09:10:19 +0000417 asn_app_consume_bytes_f *app_errlog, void *app_key) {
418 const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
419 size_t size;
420
421 if(!sptr) {
422 _ASN_ERRLOG(app_errlog, app_key,
423 "%s: value not given (%s:%d)",
424 td->name, __FILE__, __LINE__);
425 return -1;
426 }
427
428 if(st->size > 0) {
429 /* Size in bits */
430 size = 8 * (st->size - 1) - (st->buf[0] & 0x7);
431 } else {
432 size = 0;
433 }
434
435 if((size == 2)) {
436 /* Constraint check succeeded */
437 return 0;
438 } else {
439 _ASN_ERRLOG(app_errlog, app_key,
440 "%s: constraint failed (%s:%d)",
441 td->name, __FILE__, __LINE__);
442 return -1;
443 }
444}
445
446
447/*** <<< STAT-DEFS [Type2] >>> ***/
448
449static asn_TYPE_member_t asn_MBR_another_name_3[] = {
450 { ATF_NOFLAGS, 0, offsetof(struct another_name, a),
451 .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
452 .tag_mode = 0,
453 .type = (void *)&asn_DEF_BIT_STRING,
454 .memb_constraints = memb_a_3_constraint,
455 .name = "a"
456 },
457 { ATF_NOFLAGS, 0, offsetof(struct another_name, b),
458 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
459 .tag_mode = 0,
460 .type = (void *)&asn_DEF_INTEGER,
461 .memb_constraints = 0, /* Defer constraints checking to the member type */
462 .name = "b"
463 },
464};
465static ber_tlv_tag_t asn_DEF_another_name_3_tags[] = {
466 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
467};
468static asn_TYPE_tag2member_t asn_MAP_another_name_3_tag2el[] = {
469 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* b at 36 */
470 { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 0 } /* a at 34 */
471};
472static asn_SEQUENCE_specifics_t asn_SPC_another_name_3_specs = {
473 sizeof(struct another_name),
474 offsetof(struct another_name, _asn_ctx),
475 asn_MAP_another_name_3_tag2el,
476 2, /* Count of tags in the map */
477 -1, /* Start extensions */
478 -1 /* Stop extensions */
479};
480static /* Use -fall-defs-global to expose */
481asn_TYPE_descriptor_t asn_DEF_another_name_3 = {
482 "another-name",
483 "another-name",
484 SEQUENCE_free,
485 SEQUENCE_print,
486 SEQUENCE_constraint,
487 SEQUENCE_decode_ber,
488 SEQUENCE_encode_der,
489 SEQUENCE_decode_xer,
490 SEQUENCE_encode_xer,
491 0, /* Use generic outmost tag fetcher */
492 asn_DEF_another_name_3_tags,
493 sizeof(asn_DEF_another_name_3_tags)
494 /sizeof(asn_DEF_another_name_3_tags[0]), /* 1 */
495 asn_DEF_another_name_3_tags, /* Same as above */
496 sizeof(asn_DEF_another_name_3_tags)
497 /sizeof(asn_DEF_another_name_3_tags[0]), /* 1 */
498 asn_MBR_another_name_3,
499 2, /* Elements count */
500 &asn_SPC_another_name_3_specs /* Additional specs */
501};
502
503static asn_TYPE_member_t asn_MBR_one_name_2[] = {
504 { ATF_NOFLAGS, 0, offsetof(struct one_name, another_name),
505 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
506 .tag_mode = 0,
507 .type = (void *)&asn_DEF_another_name_3,
508 .memb_constraints = 0, /* Defer constraints checking to the member type */
509 .name = "another-name"
510 },
511};
512static ber_tlv_tag_t asn_DEF_one_name_2_tags[] = {
513 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
514};
515static asn_TYPE_tag2member_t asn_MAP_one_name_2_tag2el[] = {
516 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name at 34 */
517};
518static asn_SEQUENCE_specifics_t asn_SPC_one_name_2_specs = {
519 sizeof(struct one_name),
520 offsetof(struct one_name, _asn_ctx),
521 asn_MAP_one_name_2_tag2el,
522 1, /* Count of tags in the map */
523 -1, /* Start extensions */
524 -1 /* Stop extensions */
525};
526static /* Use -fall-defs-global to expose */
527asn_TYPE_descriptor_t asn_DEF_one_name_2 = {
528 "one-name",
529 "one-name",
530 SEQUENCE_free,
531 SEQUENCE_print,
532 SEQUENCE_constraint,
533 SEQUENCE_decode_ber,
534 SEQUENCE_encode_der,
535 SEQUENCE_decode_xer,
536 SEQUENCE_encode_xer,
537 0, /* Use generic outmost tag fetcher */
538 asn_DEF_one_name_2_tags,
539 sizeof(asn_DEF_one_name_2_tags)
540 /sizeof(asn_DEF_one_name_2_tags[0]), /* 1 */
541 asn_DEF_one_name_2_tags, /* Same as above */
542 sizeof(asn_DEF_one_name_2_tags)
543 /sizeof(asn_DEF_one_name_2_tags[0]), /* 1 */
544 asn_MBR_one_name_2,
545 1, /* Elements count */
546 &asn_SPC_one_name_2_specs /* Additional specs */
547};
548
vlm67d57fe2005-03-06 09:29:03 +0000549static asn_TYPE_member_t asn_MBR_another_name_8[] = {
vlm37236de2005-03-04 09:10:19 +0000550 { ATF_NOFLAGS, 0, offsetof(struct another_name, a),
551 .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
552 .tag_mode = 0,
553 .type = (void *)&asn_DEF_BIT_STRING,
vlm67d57fe2005-03-06 09:29:03 +0000554 .memb_constraints = memb_a_8_constraint,
vlm37236de2005-03-04 09:10:19 +0000555 .name = "a"
556 },
557 { ATF_NOFLAGS, 0, offsetof(struct another_name, b),
558 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
559 .tag_mode = 0,
560 .type = (void *)&asn_DEF_INTEGER,
561 .memb_constraints = 0, /* Defer constraints checking to the member type */
562 .name = "b"
563 },
564};
vlm67d57fe2005-03-06 09:29:03 +0000565static ber_tlv_tag_t asn_DEF_another_name_8_tags[] = {
vlm37236de2005-03-04 09:10:19 +0000566 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
567};
vlm67d57fe2005-03-06 09:29:03 +0000568static asn_TYPE_tag2member_t asn_MAP_another_name_8_tag2el[] = {
vlm37236de2005-03-04 09:10:19 +0000569 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* b at 42 */
570 { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 0 } /* a at 40 */
571};
vlm67d57fe2005-03-06 09:29:03 +0000572static asn_SEQUENCE_specifics_t asn_SPC_another_name_8_specs = {
vlm37236de2005-03-04 09:10:19 +0000573 sizeof(struct another_name),
574 offsetof(struct another_name, _asn_ctx),
vlm67d57fe2005-03-06 09:29:03 +0000575 asn_MAP_another_name_8_tag2el,
vlm37236de2005-03-04 09:10:19 +0000576 2, /* Count of tags in the map */
577 -1, /* Start extensions */
578 -1 /* Stop extensions */
579};
580static /* Use -fall-defs-global to expose */
vlm67d57fe2005-03-06 09:29:03 +0000581asn_TYPE_descriptor_t asn_DEF_another_name_8 = {
vlm37236de2005-03-04 09:10:19 +0000582 "another-name",
583 "another-name",
584 SEQUENCE_free,
585 SEQUENCE_print,
586 SEQUENCE_constraint,
587 SEQUENCE_decode_ber,
588 SEQUENCE_encode_der,
589 SEQUENCE_decode_xer,
590 SEQUENCE_encode_xer,
591 0, /* Use generic outmost tag fetcher */
vlm67d57fe2005-03-06 09:29:03 +0000592 asn_DEF_another_name_8_tags,
593 sizeof(asn_DEF_another_name_8_tags)
594 /sizeof(asn_DEF_another_name_8_tags[0]), /* 1 */
595 asn_DEF_another_name_8_tags, /* Same as above */
596 sizeof(asn_DEF_another_name_8_tags)
597 /sizeof(asn_DEF_another_name_8_tags[0]), /* 1 */
598 asn_MBR_another_name_8,
vlm37236de2005-03-04 09:10:19 +0000599 2, /* Elements count */
vlm67d57fe2005-03-06 09:29:03 +0000600 &asn_SPC_another_name_8_specs /* Additional specs */
vlm37236de2005-03-04 09:10:19 +0000601};
602
vlm67d57fe2005-03-06 09:29:03 +0000603static asn_TYPE_member_t asn_MBR_two_name_7[] = {
vlm37236de2005-03-04 09:10:19 +0000604 { ATF_NOFLAGS, 0, offsetof(struct two_name, another_name),
605 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
606 .tag_mode = 0,
vlm67d57fe2005-03-06 09:29:03 +0000607 .type = (void *)&asn_DEF_another_name_8,
vlm37236de2005-03-04 09:10:19 +0000608 .memb_constraints = 0, /* Defer constraints checking to the member type */
609 .name = "another-name"
610 },
611};
vlm67d57fe2005-03-06 09:29:03 +0000612static ber_tlv_tag_t asn_DEF_two_name_7_tags[] = {
vlm37236de2005-03-04 09:10:19 +0000613 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
614};
vlm67d57fe2005-03-06 09:29:03 +0000615static asn_TYPE_tag2member_t asn_MAP_two_name_7_tag2el[] = {
vlm37236de2005-03-04 09:10:19 +0000616 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name at 40 */
617};
vlm67d57fe2005-03-06 09:29:03 +0000618static uint8_t asn_MAP_two_name_7_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
vlm37236de2005-03-04 09:10:19 +0000619 (1 << 7)
620};
vlm67d57fe2005-03-06 09:29:03 +0000621static asn_SET_specifics_t asn_SPC_two_name_7_specs = {
vlm37236de2005-03-04 09:10:19 +0000622 sizeof(struct two_name),
623 offsetof(struct two_name, _asn_ctx),
624 offsetof(struct two_name, _presence_map),
vlm67d57fe2005-03-06 09:29:03 +0000625 asn_MAP_two_name_7_tag2el,
vlm37236de2005-03-04 09:10:19 +0000626 1, /* Count of tags in the map */
vlm67d57fe2005-03-06 09:29:03 +0000627 asn_MAP_two_name_7_tag2el, /* Same as above */
vlm37236de2005-03-04 09:10:19 +0000628 1, /* Count of tags in the CXER map */
629 0, /* Whether extensible */
vlm67d57fe2005-03-06 09:29:03 +0000630 (unsigned int *)asn_MAP_two_name_7_mmap /* Mandatory elements map */
vlm37236de2005-03-04 09:10:19 +0000631};
632static /* Use -fall-defs-global to expose */
vlm67d57fe2005-03-06 09:29:03 +0000633asn_TYPE_descriptor_t asn_DEF_two_name_7 = {
vlm37236de2005-03-04 09:10:19 +0000634 "two-name",
635 "two-name",
636 SET_free,
637 SET_print,
638 SET_constraint,
639 SET_decode_ber,
640 SET_encode_der,
641 SET_decode_xer,
642 SET_encode_xer,
643 0, /* Use generic outmost tag fetcher */
vlm67d57fe2005-03-06 09:29:03 +0000644 asn_DEF_two_name_7_tags,
645 sizeof(asn_DEF_two_name_7_tags)
646 /sizeof(asn_DEF_two_name_7_tags[0]), /* 1 */
647 asn_DEF_two_name_7_tags, /* Same as above */
648 sizeof(asn_DEF_two_name_7_tags)
649 /sizeof(asn_DEF_two_name_7_tags[0]), /* 1 */
650 asn_MBR_two_name_7,
vlm37236de2005-03-04 09:10:19 +0000651 1, /* Elements count */
vlm67d57fe2005-03-06 09:29:03 +0000652 &asn_SPC_two_name_7_specs /* Additional specs */
vlm37236de2005-03-04 09:10:19 +0000653};
654
655static asn_TYPE_member_t asn_MBR_Type2_1[] = {
656 { ATF_NOFLAGS, 0, offsetof(struct Type2, choice.one_name),
657 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
658 .tag_mode = 0,
659 .type = (void *)&asn_DEF_one_name_2,
660 .memb_constraints = 0, /* Defer constraints checking to the member type */
661 .name = "one-name"
662 },
663 { ATF_NOFLAGS, 0, offsetof(struct Type2, choice.two_name),
664 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
665 .tag_mode = 0,
vlm67d57fe2005-03-06 09:29:03 +0000666 .type = (void *)&asn_DEF_two_name_7,
vlm37236de2005-03-04 09:10:19 +0000667 .memb_constraints = 0, /* Defer constraints checking to the member type */
668 .name = "two-name"
669 },
670};
671static asn_TYPE_tag2member_t asn_MAP_Type2_1_tag2el[] = {
672 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* one-name at 37 */
673 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 1, 0, 0 } /* two-name at 43 */
674};
675static asn_CHOICE_specifics_t asn_SPC_Type2_1_specs = {
676 sizeof(struct Type2),
677 offsetof(struct Type2, _asn_ctx),
678 offsetof(struct Type2, present),
679 sizeof(((struct Type2 *)0)->present),
680 asn_MAP_Type2_1_tag2el,
681 2, /* Count of tags in the map */
682 0 /* Whether extensible */
683};
684asn_TYPE_descriptor_t asn_DEF_Type2 = {
685 "Type2",
686 "Type2",
687 CHOICE_free,
688 CHOICE_print,
689 CHOICE_constraint,
690 CHOICE_decode_ber,
691 CHOICE_encode_der,
692 CHOICE_decode_xer,
693 CHOICE_encode_xer,
694 CHOICE_outmost_tag,
695 0, /* No effective tags (pointer) */
696 0, /* No effective tags (count) */
697 0, /* No tags (pointer) */
698 0, /* No tags (count) */
699 asn_MBR_Type2_1,
700 2, /* Elements count */
701 &asn_SPC_Type2_1_specs /* Additional specs */
702};
703