blob: e9e8776c5f794a12f58a27781d2a303cfda5d9af [file] [log] [blame]
Lev Walkin03ba3e92004-08-22 03:18:17 +00001
2/*** <<< INCLUDES [Forest] >>> ***/
3
4#include <Tree.h>
5#include <asn_SET_OF.h>
6#include <constr_SET_OF.h>
7
8/*** <<< DEPS [Forest] >>> ***/
9
Lev Walkindfae9752004-09-29 13:19:37 +000010extern asn_TYPE_descriptor_t asn_DEF_Forest;
Lev Walkin03ba3e92004-08-22 03:18:17 +000011
12/*** <<< TYPE-DECLS [Forest] >>> ***/
13
14
15typedef struct Forest {
Lev Walkin8dd0eed2004-09-17 06:32:12 +000016 A_SET_OF(Tree_t) list;
Lev Walkin03ba3e92004-08-22 03:18:17 +000017
18 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +000019 asn_struct_ctx_t _asn_ctx;
Lev Walkin03ba3e92004-08-22 03:18:17 +000020} Forest_t;
21
22/*** <<< STAT-DEFS [Forest] >>> ***/
23
Lev Walkindfae9752004-09-29 13:19:37 +000024static asn_TYPE_member_t asn_MBR_Forest[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +000025 { ATF_NOFLAGS, 0, 0,
Lev Walkin03ba3e92004-08-22 03:18:17 +000026 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
27 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +000028 .type = (void *)&asn_DEF_Tree,
Lev Walkinba58e1b2005-01-17 12:20:19 +000029 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin03ba3e92004-08-22 03:18:17 +000030 .name = ""
31 },
32};
Lev Walkindfae9752004-09-29 13:19:37 +000033static ber_tlv_tag_t asn_DEF_Forest_tags[] = {
Lev Walkin03ba3e92004-08-22 03:18:17 +000034 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
35};
Lev Walkindfae9752004-09-29 13:19:37 +000036static asn_SET_OF_specifics_t asn_DEF_Forest_specs = {
Lev Walkin03ba3e92004-08-22 03:18:17 +000037 sizeof(struct Forest),
Lev Walkindfae9752004-09-29 13:19:37 +000038 offsetof(struct Forest, _asn_ctx),
Lev Walkina9cc46e2004-09-22 16:06:28 +000039 0, /* XER encoding is XMLDelimitedItemList */
Lev Walkin03ba3e92004-08-22 03:18:17 +000040};
Lev Walkindfae9752004-09-29 13:19:37 +000041asn_TYPE_descriptor_t asn_DEF_Forest = {
Lev Walkin03ba3e92004-08-22 03:18:17 +000042 "Forest",
Lev Walkindc06f6b2004-10-20 15:50:55 +000043 "Forest",
Lev Walkina9cc46e2004-09-22 16:06:28 +000044 SET_OF_free,
45 SET_OF_print,
Lev Walkin03ba3e92004-08-22 03:18:17 +000046 SET_OF_constraint,
47 SET_OF_decode_ber,
48 SET_OF_encode_der,
Lev Walkinb2230802005-02-14 20:31:31 +000049 SET_OF_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +000050 SET_OF_encode_xer,
Lev Walkin03ba3e92004-08-22 03:18:17 +000051 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +000052 asn_DEF_Forest_tags,
53 sizeof(asn_DEF_Forest_tags)
54 /sizeof(asn_DEF_Forest_tags[0]), /* 1 */
55 asn_DEF_Forest_tags, /* Same as above */
56 sizeof(asn_DEF_Forest_tags)
57 /sizeof(asn_DEF_Forest_tags[0]), /* 1 */
58 asn_MBR_Forest,
Lev Walkin03ba3e92004-08-22 03:18:17 +000059 1, /* Single element */
Lev Walkindfae9752004-09-29 13:19:37 +000060 &asn_DEF_Forest_specs /* Additional specs */
Lev Walkin03ba3e92004-08-22 03:18:17 +000061};
62
63
64/*** <<< INCLUDES [Tree] >>> ***/
65
66#include <INTEGER.h>
67#include <constr_SEQUENCE.h>
68
69/*** <<< DEPS [Tree] >>> ***/
70
Lev Walkindfae9752004-09-29 13:19:37 +000071extern asn_TYPE_descriptor_t asn_DEF_Tree;
Lev Walkin03ba3e92004-08-22 03:18:17 +000072
73/*** <<< TYPE-DECLS [Tree] >>> ***/
74
75
76typedef struct Tree {
77 INTEGER_t height;
78 INTEGER_t width;
79
80 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +000081 asn_struct_ctx_t _asn_ctx;
Lev Walkin03ba3e92004-08-22 03:18:17 +000082} Tree_t;
83
84/*** <<< STAT-DEFS [Tree] >>> ***/
85
Lev Walkindfae9752004-09-29 13:19:37 +000086static asn_TYPE_member_t asn_MBR_Tree[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +000087 { ATF_NOFLAGS, 0, offsetof(struct Tree, height),
Lev Walkin03ba3e92004-08-22 03:18:17 +000088 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
89 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +000090 .type = (void *)&asn_DEF_INTEGER,
Lev Walkinba58e1b2005-01-17 12:20:19 +000091 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin03ba3e92004-08-22 03:18:17 +000092 .name = "height"
93 },
Lev Walkincc93b0f2004-09-10 09:18:20 +000094 { ATF_NOFLAGS, 0, offsetof(struct Tree, width),
Lev Walkin03ba3e92004-08-22 03:18:17 +000095 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
96 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +000097 .type = (void *)&asn_DEF_INTEGER,
Lev Walkinba58e1b2005-01-17 12:20:19 +000098 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin03ba3e92004-08-22 03:18:17 +000099 .name = "width"
100 },
101};
Lev Walkindfae9752004-09-29 13:19:37 +0000102static ber_tlv_tag_t asn_DEF_Tree_tags[] = {
Lev Walkin03ba3e92004-08-22 03:18:17 +0000103 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
104};
Lev Walkindfae9752004-09-29 13:19:37 +0000105static asn_TYPE_tag2member_t asn_DEF_Tree_tag2el[] = {
Lev Walkin03ba3e92004-08-22 03:18:17 +0000106 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* height at 17 */
Lev Walkinf82138b2005-02-25 08:20:32 +0000107 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* width at 19 */
Lev Walkin03ba3e92004-08-22 03:18:17 +0000108};
Lev Walkindfae9752004-09-29 13:19:37 +0000109static asn_SEQUENCE_specifics_t asn_DEF_Tree_specs = {
Lev Walkin03ba3e92004-08-22 03:18:17 +0000110 sizeof(struct Tree),
Lev Walkindfae9752004-09-29 13:19:37 +0000111 offsetof(struct Tree, _asn_ctx),
112 asn_DEF_Tree_tag2el,
Lev Walkin03ba3e92004-08-22 03:18:17 +0000113 2, /* Count of tags in the map */
114 -1, /* Start extensions */
115 -1 /* Stop extensions */
116};
Lev Walkindfae9752004-09-29 13:19:37 +0000117asn_TYPE_descriptor_t asn_DEF_Tree = {
Lev Walkin03ba3e92004-08-22 03:18:17 +0000118 "Tree",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000119 "Tree",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000120 SEQUENCE_free,
121 SEQUENCE_print,
Lev Walkin03ba3e92004-08-22 03:18:17 +0000122 SEQUENCE_constraint,
123 SEQUENCE_decode_ber,
124 SEQUENCE_encode_der,
Lev Walkin61b40d82004-10-23 15:07:45 +0000125 SEQUENCE_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000126 SEQUENCE_encode_xer,
Lev Walkin03ba3e92004-08-22 03:18:17 +0000127 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000128 asn_DEF_Tree_tags,
129 sizeof(asn_DEF_Tree_tags)
130 /sizeof(asn_DEF_Tree_tags[0]), /* 1 */
131 asn_DEF_Tree_tags, /* Same as above */
132 sizeof(asn_DEF_Tree_tags)
133 /sizeof(asn_DEF_Tree_tags[0]), /* 1 */
134 asn_MBR_Tree,
Lev Walkin03ba3e92004-08-22 03:18:17 +0000135 2, /* Elements count */
Lev Walkindfae9752004-09-29 13:19:37 +0000136 &asn_DEF_Tree_specs /* Additional specs */
Lev Walkin03ba3e92004-08-22 03:18:17 +0000137};
138
139
140/*** <<< INCLUDES [Stuff] >>> ***/
141
142#include <Forest.h>
143#include <asn_SET_OF.h>
144#include <constr_SET_OF.h>
145#include <BIT_STRING.h>
146#include <constr_SEQUENCE.h>
Lev Walkin2a8672e2004-10-03 09:14:49 +0000147#include <INTEGER.h>
148#include <constr_CHOICE.h>
Lev Walkin03ba3e92004-08-22 03:18:17 +0000149#include <constr_SET.h>
150
151/*** <<< DEPS [Stuff] >>> ***/
152
153
154/*
155 * Method of determining the components presence
156 */
157typedef enum Stuff_PR {
158 Stuff_PR_trees, /* Member trees is present */
159 Stuff_PR_anything, /* Member anything is present */
Lev Walkin2a8672e2004-10-03 09:14:49 +0000160 Stuff_PR_other, /* Member other is present */
Lev Walkin03ba3e92004-08-22 03:18:17 +0000161} Stuff_PR;
Lev Walkin2a8672e2004-10-03 09:14:49 +0000162typedef enum other_PR {
163 other_PR_NOTHING, /* No components present */
164 other_PR_a,
165 other_PR_b,
166} other_PR;
Lev Walkindfae9752004-09-29 13:19:37 +0000167extern asn_TYPE_descriptor_t asn_DEF_Stuff;
Lev Walkin03ba3e92004-08-22 03:18:17 +0000168
169/*** <<< TYPE-DECLS [Stuff] >>> ***/
170
171
172typedef struct Stuff {
173 struct trees {
Lev Walkin8dd0eed2004-09-17 06:32:12 +0000174 A_SET_OF(Forest_t) list;
Lev Walkin03ba3e92004-08-22 03:18:17 +0000175
176 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +0000177 asn_struct_ctx_t _asn_ctx;
Lev Walkin03ba3e92004-08-22 03:18:17 +0000178 } *trees;
179 struct anything {
Lev Walkin152a91e2005-02-14 20:41:29 +0000180 A_SET_OF(struct anything_Member {
Lev Walkin03ba3e92004-08-22 03:18:17 +0000181 BIT_STRING_t cup_of_coffee;
182 /*
183 * This type is extensible,
184 * possible extensions are below.
185 */
186
187 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +0000188 asn_struct_ctx_t _asn_ctx;
Lev Walkin03ba3e92004-08-22 03:18:17 +0000189 } ) list;
190
191 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +0000192 asn_struct_ctx_t _asn_ctx;
Lev Walkin03ba3e92004-08-22 03:18:17 +0000193 } *anything;
Lev Walkin2a8672e2004-10-03 09:14:49 +0000194 /*
195 * This type is extensible,
196 * possible extensions are below.
197 */
198 struct other {
199 other_PR present;
200 union {
201 INTEGER_t a;
202 INTEGER_t b;
203 } choice;
204
205 /* Context for parsing across buffer boundaries */
206 asn_struct_ctx_t _asn_ctx;
207 } *other;
Lev Walkin03ba3e92004-08-22 03:18:17 +0000208
209 /* Presence bitmask: ASN_SET_ISPRESENT(pStuff, Stuff_PR_x) */
210 unsigned int _presence_map
Lev Walkin2a8672e2004-10-03 09:14:49 +0000211 [((3+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
Lev Walkin03ba3e92004-08-22 03:18:17 +0000212
213 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +0000214 asn_struct_ctx_t _asn_ctx;
Lev Walkin03ba3e92004-08-22 03:18:17 +0000215} Stuff_t;
216
217/*** <<< STAT-DEFS [Stuff] >>> ***/
218
Lev Walkindfae9752004-09-29 13:19:37 +0000219static asn_TYPE_member_t asn_MBR_trees[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000220 { ATF_NOFLAGS, 0, 0,
Lev Walkin03ba3e92004-08-22 03:18:17 +0000221 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
222 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +0000223 .type = (void *)&asn_DEF_Forest,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000224 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin03ba3e92004-08-22 03:18:17 +0000225 .name = ""
226 },
227};
Lev Walkindfae9752004-09-29 13:19:37 +0000228static ber_tlv_tag_t asn_DEF_trees_tags[] = {
Lev Walkin2a8672e2004-10-03 09:14:49 +0000229 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
Lev Walkin188ed2c2004-09-13 08:31:01 +0000230 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
Lev Walkin03ba3e92004-08-22 03:18:17 +0000231};
Lev Walkindfae9752004-09-29 13:19:37 +0000232static asn_SET_OF_specifics_t asn_DEF_trees_specs = {
Lev Walkin03ba3e92004-08-22 03:18:17 +0000233 sizeof(struct trees),
Lev Walkindfae9752004-09-29 13:19:37 +0000234 offsetof(struct trees, _asn_ctx),
Lev Walkina9cc46e2004-09-22 16:06:28 +0000235 0, /* XER encoding is XMLDelimitedItemList */
Lev Walkin03ba3e92004-08-22 03:18:17 +0000236};
Lev Walkind04430c2004-09-07 06:44:29 +0000237static /* Use -fall-defs-global to expose */
Lev Walkindfae9752004-09-29 13:19:37 +0000238asn_TYPE_descriptor_t asn_DEF_trees = {
Lev Walkin03ba3e92004-08-22 03:18:17 +0000239 "trees",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000240 "trees",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000241 SET_OF_free,
242 SET_OF_print,
Lev Walkin03ba3e92004-08-22 03:18:17 +0000243 SET_OF_constraint,
244 SET_OF_decode_ber,
245 SET_OF_encode_der,
Lev Walkinb2230802005-02-14 20:31:31 +0000246 SET_OF_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000247 SET_OF_encode_xer,
Lev Walkin03ba3e92004-08-22 03:18:17 +0000248 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000249 asn_DEF_trees_tags,
250 sizeof(asn_DEF_trees_tags)
251 /sizeof(asn_DEF_trees_tags[0]) - 1, /* 1 */
252 asn_DEF_trees_tags, /* Same as above */
253 sizeof(asn_DEF_trees_tags)
254 /sizeof(asn_DEF_trees_tags[0]), /* 2 */
255 asn_MBR_trees,
Lev Walkin03ba3e92004-08-22 03:18:17 +0000256 1, /* Single element */
Lev Walkindfae9752004-09-29 13:19:37 +0000257 &asn_DEF_trees_specs /* Additional specs */
Lev Walkin03ba3e92004-08-22 03:18:17 +0000258};
259
Lev Walkin152a91e2005-02-14 20:41:29 +0000260static asn_TYPE_member_t asn_MBR_anything_Member[] = {
261 { ATF_NOFLAGS, 0, offsetof(struct anything_Member, cup_of_coffee),
Lev Walkin03ba3e92004-08-22 03:18:17 +0000262 .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
263 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +0000264 .type = (void *)&asn_DEF_BIT_STRING,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000265 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin03ba3e92004-08-22 03:18:17 +0000266 .name = "cup-of-coffee"
267 },
268};
Lev Walkin152a91e2005-02-14 20:41:29 +0000269static ber_tlv_tag_t asn_DEF_anything_Member_tags[] = {
Lev Walkin03ba3e92004-08-22 03:18:17 +0000270 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
271};
Lev Walkin152a91e2005-02-14 20:41:29 +0000272static asn_TYPE_tag2member_t asn_DEF_anything_Member_tag2el[] = {
Lev Walkinf82138b2005-02-25 08:20:32 +0000273 { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 0 } /* cup-of-coffee at 32 */
Lev Walkin03ba3e92004-08-22 03:18:17 +0000274};
Lev Walkin152a91e2005-02-14 20:41:29 +0000275static asn_SEQUENCE_specifics_t asn_DEF_anything_Member_specs = {
276 sizeof(struct anything_Member),
277 offsetof(struct anything_Member, _asn_ctx),
278 asn_DEF_anything_Member_tag2el,
Lev Walkin03ba3e92004-08-22 03:18:17 +0000279 1, /* Count of tags in the map */
280 0, /* Start extensions */
281 2 /* Stop extensions */
282};
Lev Walkind04430c2004-09-07 06:44:29 +0000283static /* Use -fall-defs-global to expose */
Lev Walkin152a91e2005-02-14 20:41:29 +0000284asn_TYPE_descriptor_t asn_DEF_anything_Member = {
Lev Walkin03ba3e92004-08-22 03:18:17 +0000285 "",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000286 "",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000287 SEQUENCE_free,
288 SEQUENCE_print,
Lev Walkin03ba3e92004-08-22 03:18:17 +0000289 SEQUENCE_constraint,
290 SEQUENCE_decode_ber,
291 SEQUENCE_encode_der,
Lev Walkin61b40d82004-10-23 15:07:45 +0000292 SEQUENCE_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000293 SEQUENCE_encode_xer,
Lev Walkin03ba3e92004-08-22 03:18:17 +0000294 0, /* Use generic outmost tag fetcher */
Lev Walkin152a91e2005-02-14 20:41:29 +0000295 asn_DEF_anything_Member_tags,
296 sizeof(asn_DEF_anything_Member_tags)
297 /sizeof(asn_DEF_anything_Member_tags[0]), /* 1 */
298 asn_DEF_anything_Member_tags, /* Same as above */
299 sizeof(asn_DEF_anything_Member_tags)
300 /sizeof(asn_DEF_anything_Member_tags[0]), /* 1 */
301 asn_MBR_anything_Member,
Lev Walkin03ba3e92004-08-22 03:18:17 +0000302 1, /* Elements count */
Lev Walkin152a91e2005-02-14 20:41:29 +0000303 &asn_DEF_anything_Member_specs /* Additional specs */
Lev Walkin03ba3e92004-08-22 03:18:17 +0000304};
305
Lev Walkindfae9752004-09-29 13:19:37 +0000306static asn_TYPE_member_t asn_MBR_anything[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000307 { ATF_NOFLAGS, 0, 0,
Lev Walkin03ba3e92004-08-22 03:18:17 +0000308 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
309 .tag_mode = 0,
Lev Walkin8a7af0e2005-02-15 03:40:07 +0000310 .type = (void *)&asn_DEF_anything_Member,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000311 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin03ba3e92004-08-22 03:18:17 +0000312 .name = ""
313 },
314};
Lev Walkindfae9752004-09-29 13:19:37 +0000315static ber_tlv_tag_t asn_DEF_anything_tags[] = {
Lev Walkin2a8672e2004-10-03 09:14:49 +0000316 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
Lev Walkin188ed2c2004-09-13 08:31:01 +0000317 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
Lev Walkin03ba3e92004-08-22 03:18:17 +0000318};
Lev Walkindfae9752004-09-29 13:19:37 +0000319static asn_SET_OF_specifics_t asn_DEF_anything_specs = {
Lev Walkin03ba3e92004-08-22 03:18:17 +0000320 sizeof(struct anything),
Lev Walkindfae9752004-09-29 13:19:37 +0000321 offsetof(struct anything, _asn_ctx),
Lev Walkina9cc46e2004-09-22 16:06:28 +0000322 0, /* XER encoding is XMLDelimitedItemList */
Lev Walkin03ba3e92004-08-22 03:18:17 +0000323};
Lev Walkind04430c2004-09-07 06:44:29 +0000324static /* Use -fall-defs-global to expose */
Lev Walkindfae9752004-09-29 13:19:37 +0000325asn_TYPE_descriptor_t asn_DEF_anything = {
Lev Walkin03ba3e92004-08-22 03:18:17 +0000326 "anything",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000327 "anything",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000328 SET_OF_free,
329 SET_OF_print,
Lev Walkin03ba3e92004-08-22 03:18:17 +0000330 SET_OF_constraint,
331 SET_OF_decode_ber,
332 SET_OF_encode_der,
Lev Walkinb2230802005-02-14 20:31:31 +0000333 SET_OF_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000334 SET_OF_encode_xer,
Lev Walkin03ba3e92004-08-22 03:18:17 +0000335 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000336 asn_DEF_anything_tags,
337 sizeof(asn_DEF_anything_tags)
338 /sizeof(asn_DEF_anything_tags[0]) - 1, /* 1 */
339 asn_DEF_anything_tags, /* Same as above */
340 sizeof(asn_DEF_anything_tags)
341 /sizeof(asn_DEF_anything_tags[0]), /* 2 */
342 asn_MBR_anything,
Lev Walkin03ba3e92004-08-22 03:18:17 +0000343 1, /* Single element */
Lev Walkindfae9752004-09-29 13:19:37 +0000344 &asn_DEF_anything_specs /* Additional specs */
Lev Walkin03ba3e92004-08-22 03:18:17 +0000345};
346
Lev Walkin2a8672e2004-10-03 09:14:49 +0000347static asn_TYPE_member_t asn_MBR_other[] = {
348 { ATF_NOFLAGS, 0, offsetof(struct other, choice.a),
Lev Walkin03ba3e92004-08-22 03:18:17 +0000349 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
350 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkin2a8672e2004-10-03 09:14:49 +0000351 .type = (void *)&asn_DEF_INTEGER,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000352 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2a8672e2004-10-03 09:14:49 +0000353 .name = "a"
354 },
355 { ATF_NOFLAGS, 0, offsetof(struct other, choice.b),
356 .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
357 .tag_mode = -1, /* IMPLICIT tag at current level */
358 .type = (void *)&asn_DEF_INTEGER,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000359 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2a8672e2004-10-03 09:14:49 +0000360 .name = "b"
361 },
362};
363static asn_TYPE_tag2member_t asn_DEF_other_tag2el[] = {
364 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* a at 26 */
Lev Walkinf82138b2005-02-25 08:20:32 +0000365 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 } /* b at 28 */
Lev Walkin2a8672e2004-10-03 09:14:49 +0000366};
367static asn_CHOICE_specifics_t asn_DEF_other_specs = {
368 sizeof(struct other),
369 offsetof(struct other, _asn_ctx),
370 offsetof(struct other, present),
371 sizeof(((struct other *)0)->present),
372 asn_DEF_other_tag2el,
373 2, /* Count of tags in the map */
374 0 /* Whether extensible */
375};
376static /* Use -fall-defs-global to expose */
377asn_TYPE_descriptor_t asn_DEF_other = {
378 "other",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000379 "other",
Lev Walkin2a8672e2004-10-03 09:14:49 +0000380 CHOICE_free,
381 CHOICE_print,
382 CHOICE_constraint,
383 CHOICE_decode_ber,
384 CHOICE_encode_der,
Lev Walkin61b40d82004-10-23 15:07:45 +0000385 CHOICE_decode_xer,
Lev Walkin2a8672e2004-10-03 09:14:49 +0000386 CHOICE_encode_xer,
387 CHOICE_outmost_tag,
388 0, /* No effective tags (pointer) */
389 0, /* No effective tags (count) */
390 0, /* No tags (pointer) */
391 0, /* No tags (count) */
392 asn_MBR_other,
393 2, /* Elements count */
394 &asn_DEF_other_specs /* Additional specs */
395};
396
397static asn_TYPE_member_t asn_MBR_Stuff[] = {
398 { ATF_POINTER, 3, offsetof(struct Stuff, trees),
399 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
400 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000401 .type = (void *)&asn_DEF_trees,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000402 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin03ba3e92004-08-22 03:18:17 +0000403 .name = "trees"
404 },
Lev Walkin2a8672e2004-10-03 09:14:49 +0000405 { ATF_POINTER, 2, offsetof(struct Stuff, anything),
406 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
Lev Walkin03ba3e92004-08-22 03:18:17 +0000407 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000408 .type = (void *)&asn_DEF_anything,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000409 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin03ba3e92004-08-22 03:18:17 +0000410 .name = "anything"
411 },
Lev Walkin2a8672e2004-10-03 09:14:49 +0000412 { ATF_POINTER, 0, offsetof(struct Stuff, other),
413 .tag = -1 /* Ambiguous tag (CHOICE?) */,
414 .tag_mode = 0,
415 .type = (void *)&asn_DEF_other,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000416 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2a8672e2004-10-03 09:14:49 +0000417 .name = "other"
418 },
Lev Walkin03ba3e92004-08-22 03:18:17 +0000419};
Lev Walkindfae9752004-09-29 13:19:37 +0000420static ber_tlv_tag_t asn_DEF_Stuff_tags[] = {
Lev Walkin03ba3e92004-08-22 03:18:17 +0000421 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
422};
Lev Walkindfae9752004-09-29 13:19:37 +0000423static asn_TYPE_tag2member_t asn_DEF_Stuff_tag2el[] = {
Lev Walkin2a8672e2004-10-03 09:14:49 +0000424 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* a at 26 */
425 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* trees at 23 */
426 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* anything at 34 */
Lev Walkinf82138b2005-02-25 08:20:32 +0000427 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 } /* b at 28 */
Lev Walkin03ba3e92004-08-22 03:18:17 +0000428};
Lev Walkin2a8672e2004-10-03 09:14:49 +0000429static asn_TYPE_tag2member_t asn_DEF_Stuff_tag2el_cxer[] = {
430 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* trees at 23 */
431 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* anything at 34 */
Lev Walkinf82138b2005-02-25 08:20:32 +0000432 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 } /* a at 26 */
Lev Walkin2a8672e2004-10-03 09:14:49 +0000433};
434static uint8_t asn_DEF_Stuff_mmap[(3 + (8 * sizeof(unsigned int)) - 1) / 8] = {
435 (0 << 7) | (0 << 6) | (0 << 5)
Lev Walkin03ba3e92004-08-22 03:18:17 +0000436};
Lev Walkindfae9752004-09-29 13:19:37 +0000437static asn_SET_specifics_t asn_DEF_Stuff_specs = {
Lev Walkin03ba3e92004-08-22 03:18:17 +0000438 sizeof(struct Stuff),
Lev Walkindfae9752004-09-29 13:19:37 +0000439 offsetof(struct Stuff, _asn_ctx),
Lev Walkin03ba3e92004-08-22 03:18:17 +0000440 offsetof(struct Stuff, _presence_map),
Lev Walkindfae9752004-09-29 13:19:37 +0000441 asn_DEF_Stuff_tag2el,
Lev Walkin2a8672e2004-10-03 09:14:49 +0000442 4, /* Count of tags in the map */
443 asn_DEF_Stuff_tag2el_cxer,
Lev Walkinf82138b2005-02-25 08:20:32 +0000444 3, /* Count of tags in the CXER map */
Lev Walkin2a8672e2004-10-03 09:14:49 +0000445 1, /* Whether extensible */
Lev Walkindfae9752004-09-29 13:19:37 +0000446 (unsigned int *)asn_DEF_Stuff_mmap /* Mandatory elements map */
Lev Walkin03ba3e92004-08-22 03:18:17 +0000447};
Lev Walkindfae9752004-09-29 13:19:37 +0000448asn_TYPE_descriptor_t asn_DEF_Stuff = {
Lev Walkin03ba3e92004-08-22 03:18:17 +0000449 "Stuff",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000450 "Stuff",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000451 SET_free,
452 SET_print,
Lev Walkin03ba3e92004-08-22 03:18:17 +0000453 SET_constraint,
454 SET_decode_ber,
455 SET_encode_der,
Lev Walkinb2230802005-02-14 20:31:31 +0000456 SET_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000457 SET_encode_xer,
Lev Walkin03ba3e92004-08-22 03:18:17 +0000458 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000459 asn_DEF_Stuff_tags,
460 sizeof(asn_DEF_Stuff_tags)
461 /sizeof(asn_DEF_Stuff_tags[0]), /* 1 */
462 asn_DEF_Stuff_tags, /* Same as above */
463 sizeof(asn_DEF_Stuff_tags)
464 /sizeof(asn_DEF_Stuff_tags[0]), /* 1 */
465 asn_MBR_Stuff,
Lev Walkin2a8672e2004-10-03 09:14:49 +0000466 3, /* Elements count */
Lev Walkindfae9752004-09-29 13:19:37 +0000467 &asn_DEF_Stuff_specs /* Additional specs */
Lev Walkin03ba3e92004-08-22 03:18:17 +0000468};
469