blob: 9c5945d2c840b74c8acbcbe15fb446478de62e89 [file] [log] [blame]
vlmb71a9d32004-09-08 00:26:56 +00001
2/*** <<< INCLUDES [Test-structure-1] >>> ***/
3
4#include <Test-structure-1.h>
5#include <INTEGER.h>
6#include <asn_SET_OF.h>
7#include <constr_SET_OF.h>
8#include <asn_SEQUENCE_OF.h>
9#include <constr_SEQUENCE_OF.h>
10#include <constr_SEQUENCE.h>
11
12/*** <<< DEPS [Test-structure-1] >>> ***/
13
14extern asn1_TYPE_descriptor_t asn1_DEF_Test_structure_1;
15
16/*** <<< TYPE-DECLS [Test-structure-1] >>> ***/
17
18
19typedef struct Test_structure_1 {
20 struct t_member1 {
21 A_SET_OF(struct Test_structure_1) list;
22
23 /* Context for parsing across buffer boundaries */
24 ber_dec_ctx_t _ber_dec_ctx;
25 } t_member1;
26 struct t_member2 {
27 A_SEQUENCE_OF(struct Test_structure_1) list;
28
29 /* Context for parsing across buffer boundaries */
30 ber_dec_ctx_t _ber_dec_ctx;
31 } t_member2;
32 struct Test_structure_1 *t_member3 /* OPTIONAL */;
33 INTEGER_t t_member4;
34
35 /* Context for parsing across buffer boundaries */
36 ber_dec_ctx_t _ber_dec_ctx;
37} Test_structure_1_t;
38
39/*** <<< STAT-DEFS [Test-structure-1] >>> ***/
40
41static asn1_TYPE_member_t asn1_MBR_t_member1[] = {
vlmddd5a7d2004-09-10 09:18:20 +000042 { ATF_NOFLAGS, 0, 0,
vlmb71a9d32004-09-08 00:26:56 +000043 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
44 .tag_mode = 0,
45 .type = (void *)&asn1_DEF_Test_structure_1,
46 .memb_constraints = 0, /* Defer to actual type */
47 .name = ""
48 },
49};
50static ber_tlv_tag_t asn1_DEF_t_member1_tags[] = {
51 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
52};
53static asn1_SET_OF_specifics_t asn1_DEF_t_member1_specs = {
54 sizeof(struct t_member1),
55 offsetof(struct t_member1, _ber_dec_ctx),
vlm39ba4c42004-09-22 16:06:28 +000056 0, /* XER encoding is XMLDelimitedItemList */
vlmb71a9d32004-09-08 00:26:56 +000057};
58static /* Use -fall-defs-global to expose */
59asn1_TYPE_descriptor_t asn1_DEF_t_member1 = {
60 "t-member1",
vlm39ba4c42004-09-22 16:06:28 +000061 SET_OF_free,
62 SET_OF_print,
vlmb71a9d32004-09-08 00:26:56 +000063 SET_OF_constraint,
64 SET_OF_decode_ber,
65 SET_OF_encode_der,
vlm39ba4c42004-09-22 16:06:28 +000066 0, /* Not implemented yet */
67 SET_OF_encode_xer,
vlmb71a9d32004-09-08 00:26:56 +000068 0, /* Use generic outmost tag fetcher */
69 asn1_DEF_t_member1_tags,
70 sizeof(asn1_DEF_t_member1_tags)
71 /sizeof(asn1_DEF_t_member1_tags[0]), /* 1 */
vlm72425de2004-09-13 08:31:01 +000072 asn1_DEF_t_member1_tags, /* Same as above */
73 sizeof(asn1_DEF_t_member1_tags)
74 /sizeof(asn1_DEF_t_member1_tags[0]), /* 1 */
vlmb71a9d32004-09-08 00:26:56 +000075 1, /* Whether CONSTRUCTED */
76 asn1_MBR_t_member1,
77 1, /* Single element */
78 &asn1_DEF_t_member1_specs /* Additional specs */
79};
80
81static asn1_TYPE_member_t asn1_MBR_t_member2[] = {
vlmddd5a7d2004-09-10 09:18:20 +000082 { ATF_NOFLAGS, 0, 0,
vlmb71a9d32004-09-08 00:26:56 +000083 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
84 .tag_mode = 0,
85 .type = (void *)&asn1_DEF_Test_structure_1,
86 .memb_constraints = 0, /* Defer to actual type */
87 .name = ""
88 },
89};
90static ber_tlv_tag_t asn1_DEF_t_member2_tags[] = {
91 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
92};
93static asn1_SET_OF_specifics_t asn1_DEF_t_member2_specs = {
94 sizeof(struct t_member2),
95 offsetof(struct t_member2, _ber_dec_ctx),
vlm39ba4c42004-09-22 16:06:28 +000096 0, /* XER encoding is XMLDelimitedItemList */
vlmb71a9d32004-09-08 00:26:56 +000097};
98static /* Use -fall-defs-global to expose */
99asn1_TYPE_descriptor_t asn1_DEF_t_member2 = {
100 "t-member2",
vlm39ba4c42004-09-22 16:06:28 +0000101 SEQUENCE_OF_free,
102 SEQUENCE_OF_print,
vlmb71a9d32004-09-08 00:26:56 +0000103 SEQUENCE_OF_constraint,
104 SEQUENCE_OF_decode_ber,
105 SEQUENCE_OF_encode_der,
vlm39ba4c42004-09-22 16:06:28 +0000106 0, /* Not implemented yet */
107 SEQUENCE_OF_encode_xer,
vlmb71a9d32004-09-08 00:26:56 +0000108 0, /* Use generic outmost tag fetcher */
109 asn1_DEF_t_member2_tags,
110 sizeof(asn1_DEF_t_member2_tags)
111 /sizeof(asn1_DEF_t_member2_tags[0]), /* 1 */
vlm72425de2004-09-13 08:31:01 +0000112 asn1_DEF_t_member2_tags, /* Same as above */
113 sizeof(asn1_DEF_t_member2_tags)
114 /sizeof(asn1_DEF_t_member2_tags[0]), /* 1 */
vlmb71a9d32004-09-08 00:26:56 +0000115 1, /* Whether CONSTRUCTED */
116 asn1_MBR_t_member2,
117 1, /* Single element */
118 &asn1_DEF_t_member2_specs /* Additional specs */
119};
120
121static asn1_TYPE_member_t asn1_MBR_Test_structure_1[] = {
vlmddd5a7d2004-09-10 09:18:20 +0000122 { ATF_NOFLAGS, 0, offsetof(struct Test_structure_1, t_member1),
vlmb71a9d32004-09-08 00:26:56 +0000123 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
124 .tag_mode = 0,
125 .type = (void *)&asn1_DEF_t_member1,
126 .memb_constraints = 0, /* Defer to actual type */
127 .name = "t-member1"
128 },
vlmddd5a7d2004-09-10 09:18:20 +0000129 { ATF_NOFLAGS, 0, offsetof(struct Test_structure_1, t_member2),
vlmb71a9d32004-09-08 00:26:56 +0000130 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
131 .tag_mode = 0,
132 .type = (void *)&asn1_DEF_t_member2,
133 .memb_constraints = 0, /* Defer to actual type */
134 .name = "t-member2"
135 },
vlmddd5a7d2004-09-10 09:18:20 +0000136 { ATF_POINTER, 1, offsetof(struct Test_structure_1, t_member3),
vlmb71a9d32004-09-08 00:26:56 +0000137 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
138 .tag_mode = 0,
139 .type = (void *)&asn1_DEF_Test_structure_1,
140 .memb_constraints = 0, /* Defer to actual type */
141 .name = "t-member3"
142 },
vlmddd5a7d2004-09-10 09:18:20 +0000143 { ATF_NOFLAGS, 0, offsetof(struct Test_structure_1, t_member4),
vlmb71a9d32004-09-08 00:26:56 +0000144 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
145 .tag_mode = 0,
146 .type = (void *)&asn1_DEF_INTEGER,
147 .memb_constraints = 0, /* Defer to actual type */
148 .name = "t-member4"
149 },
150};
151static ber_tlv_tag_t asn1_DEF_Test_structure_1_tags[] = {
152 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
153};
154static asn1_TYPE_tag2member_t asn1_DEF_Test_structure_1_tag2el[] = {
155 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, 0, 0 }, /* t-member4 at 19 */
156 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 1 }, /* t-member2 at 16 */
157 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 0 }, /* t-member3 at 17 */
158 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 }, /* t-member1 at 15 */
159};
160static asn1_SEQUENCE_specifics_t asn1_DEF_Test_structure_1_specs = {
161 sizeof(struct Test_structure_1),
162 offsetof(struct Test_structure_1, _ber_dec_ctx),
163 asn1_DEF_Test_structure_1_tag2el,
164 4, /* Count of tags in the map */
165 -1, /* Start extensions */
166 -1 /* Stop extensions */
167};
168asn1_TYPE_descriptor_t asn1_DEF_Test_structure_1 = {
169 "Test-structure-1",
vlm39ba4c42004-09-22 16:06:28 +0000170 SEQUENCE_free,
171 SEQUENCE_print,
vlmb71a9d32004-09-08 00:26:56 +0000172 SEQUENCE_constraint,
173 SEQUENCE_decode_ber,
174 SEQUENCE_encode_der,
vlm39ba4c42004-09-22 16:06:28 +0000175 0, /* Not implemented yet */
176 SEQUENCE_encode_xer,
vlmb71a9d32004-09-08 00:26:56 +0000177 0, /* Use generic outmost tag fetcher */
178 asn1_DEF_Test_structure_1_tags,
179 sizeof(asn1_DEF_Test_structure_1_tags)
180 /sizeof(asn1_DEF_Test_structure_1_tags[0]), /* 1 */
vlm72425de2004-09-13 08:31:01 +0000181 asn1_DEF_Test_structure_1_tags, /* Same as above */
182 sizeof(asn1_DEF_Test_structure_1_tags)
183 /sizeof(asn1_DEF_Test_structure_1_tags[0]), /* 1 */
vlmb71a9d32004-09-08 00:26:56 +0000184 1, /* Whether CONSTRUCTED */
185 asn1_MBR_Test_structure_1,
186 4, /* Elements count */
187 &asn1_DEF_Test_structure_1_specs /* Additional specs */
188};
189
190
191/*** <<< INCLUDES [Choice-1] >>> ***/
192
193#include <Choice-1.h>
194#include <INTEGER.h>
195#include <asn_SET_OF.h>
196#include <constr_SET_OF.h>
197#include <constr_CHOICE.h>
198
199/*** <<< DEPS [Choice-1] >>> ***/
200
201typedef enum Choice_1_PR {
202 Choice_1_PR_NOTHING, /* No components present */
203 Choice_1_PR_and,
204 Choice_1_PR_or,
205 Choice_1_PR_not,
206 Choice_1_PR_other,
207} Choice_1_PR;
208extern asn1_TYPE_descriptor_t asn1_DEF_Choice_1;
209
210/*** <<< TYPE-DECLS [Choice-1] >>> ***/
211
212
213typedef struct Choice_1 {
214 Choice_1_PR present;
215 union {
vlmddd5a7d2004-09-10 09:18:20 +0000216 struct Choice_1 *and;
vlmb71a9d32004-09-08 00:26:56 +0000217 struct or {
218 A_SET_OF(struct Choice_1) list;
219
220 /* Context for parsing across buffer boundaries */
221 ber_dec_ctx_t _ber_dec_ctx;
222 } or;
vlmddd5a7d2004-09-10 09:18:20 +0000223 struct Choice_1 *not;
vlmb71a9d32004-09-08 00:26:56 +0000224 INTEGER_t other;
225 } choice;
226
227 /* Context for parsing across buffer boundaries */
228 ber_dec_ctx_t _ber_dec_ctx;
229} Choice_1_t;
230
231/*** <<< STAT-DEFS [Choice-1] >>> ***/
232
233static asn1_TYPE_member_t asn1_MBR_or[] = {
vlmddd5a7d2004-09-10 09:18:20 +0000234 { ATF_NOFLAGS, 0, 0,
vlm060fe2a2004-09-10 09:37:12 +0000235 .tag = -1 /* Ambiguous tag (CHOICE?) */,
vlmb71a9d32004-09-08 00:26:56 +0000236 .tag_mode = 0,
237 .type = (void *)&asn1_DEF_Choice_1,
238 .memb_constraints = 0, /* Defer to actual type */
239 .name = ""
240 },
241};
242static ber_tlv_tag_t asn1_DEF_or_tags[] = {
vlm72425de2004-09-13 08:31:01 +0000243 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
244 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
vlmb71a9d32004-09-08 00:26:56 +0000245};
246static asn1_SET_OF_specifics_t asn1_DEF_or_specs = {
247 sizeof(struct or),
248 offsetof(struct or, _ber_dec_ctx),
vlm39ba4c42004-09-22 16:06:28 +0000249 1, /* XER encoding is XMLValueList */
vlmb71a9d32004-09-08 00:26:56 +0000250};
251static /* Use -fall-defs-global to expose */
252asn1_TYPE_descriptor_t asn1_DEF_or = {
253 "or",
vlm39ba4c42004-09-22 16:06:28 +0000254 SET_OF_free,
255 SET_OF_print,
vlmb71a9d32004-09-08 00:26:56 +0000256 SET_OF_constraint,
257 SET_OF_decode_ber,
258 SET_OF_encode_der,
vlm39ba4c42004-09-22 16:06:28 +0000259 0, /* Not implemented yet */
260 SET_OF_encode_xer,
vlmb71a9d32004-09-08 00:26:56 +0000261 0, /* Use generic outmost tag fetcher */
262 asn1_DEF_or_tags,
263 sizeof(asn1_DEF_or_tags)
vlm72425de2004-09-13 08:31:01 +0000264 /sizeof(asn1_DEF_or_tags[0]) - 1, /* 1 */
265 asn1_DEF_or_tags, /* Same as above */
266 sizeof(asn1_DEF_or_tags)
267 /sizeof(asn1_DEF_or_tags[0]), /* 2 */
vlmb71a9d32004-09-08 00:26:56 +0000268 1, /* Whether CONSTRUCTED */
269 asn1_MBR_or,
270 1, /* Single element */
271 &asn1_DEF_or_specs /* Additional specs */
272};
273
274static asn1_TYPE_member_t asn1_MBR_Choice_1[] = {
vlmddd5a7d2004-09-10 09:18:20 +0000275 { ATF_POINTER, 0, offsetof(struct Choice_1, choice.and),
vlmb71a9d32004-09-08 00:26:56 +0000276 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
277 .tag_mode = +1, /* EXPLICIT tag at current level */
278 .type = (void *)&asn1_DEF_Choice_1,
279 .memb_constraints = 0, /* Defer to actual type */
280 .name = "and"
281 },
vlmddd5a7d2004-09-10 09:18:20 +0000282 { ATF_NOFLAGS, 0, offsetof(struct Choice_1, choice.or),
vlmb71a9d32004-09-08 00:26:56 +0000283 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
284 .tag_mode = -1, /* IMPLICIT tag at current level */
285 .type = (void *)&asn1_DEF_or,
286 .memb_constraints = 0, /* Defer to actual type */
287 .name = "or"
288 },
vlmddd5a7d2004-09-10 09:18:20 +0000289 { ATF_POINTER, 0, offsetof(struct Choice_1, choice.not),
vlmb71a9d32004-09-08 00:26:56 +0000290 .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
291 .tag_mode = +1, /* EXPLICIT tag at current level */
292 .type = (void *)&asn1_DEF_Choice_1,
293 .memb_constraints = 0, /* Defer to actual type */
294 .name = "not"
295 },
vlmddd5a7d2004-09-10 09:18:20 +0000296 { ATF_NOFLAGS, 0, offsetof(struct Choice_1, choice.other),
vlmb71a9d32004-09-08 00:26:56 +0000297 .tag = (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
298 .tag_mode = +1, /* EXPLICIT tag at current level */
299 .type = (void *)&asn1_DEF_INTEGER,
300 .memb_constraints = 0, /* Defer to actual type */
301 .name = "other"
302 },
303};
304static asn1_TYPE_tag2member_t asn1_DEF_Choice_1_tag2el[] = {
305 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* and at 22 */
306 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* or at 23 */
307 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* not at 24 */
308 { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 3, 0, 0 }, /* other at 26 */
309};
310static asn1_CHOICE_specifics_t asn1_DEF_Choice_1_specs = {
311 sizeof(struct Choice_1),
312 offsetof(struct Choice_1, _ber_dec_ctx),
313 offsetof(struct Choice_1, present),
314 sizeof(((struct Choice_1 *)0)->present),
315 asn1_DEF_Choice_1_tag2el,
316 4, /* Count of tags in the map */
317 0 /* Whether extensible */
318};
319asn1_TYPE_descriptor_t asn1_DEF_Choice_1 = {
320 "Choice-1",
vlm39ba4c42004-09-22 16:06:28 +0000321 CHOICE_free,
322 CHOICE_print,
vlmb71a9d32004-09-08 00:26:56 +0000323 CHOICE_constraint,
324 CHOICE_decode_ber,
325 CHOICE_encode_der,
vlm39ba4c42004-09-22 16:06:28 +0000326 0, /* Not implemented yet */
327 CHOICE_encode_xer,
vlmb71a9d32004-09-08 00:26:56 +0000328 CHOICE_outmost_tag,
vlm72425de2004-09-13 08:31:01 +0000329 0, /* No effective tags (pointer) */
330 0, /* No effective tags (count) */
331 0, /* No tags (pointer) */
332 0, /* No tags (count) */
vlmb71a9d32004-09-08 00:26:56 +0000333 1, /* Whether CONSTRUCTED */
334 asn1_MBR_Choice_1,
335 4, /* Elements count */
336 &asn1_DEF_Choice_1_specs /* Additional specs */
337};
338