blob: 58fd39a9beb77e3ffd5aa24525d0ca1dbcfb36a8 [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 asn1_MBR_t_member1,
76 1, /* Single element */
77 &asn1_DEF_t_member1_specs /* Additional specs */
78};
79
80static asn1_TYPE_member_t asn1_MBR_t_member2[] = {
vlmddd5a7d2004-09-10 09:18:20 +000081 { ATF_NOFLAGS, 0, 0,
vlmb71a9d32004-09-08 00:26:56 +000082 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
83 .tag_mode = 0,
84 .type = (void *)&asn1_DEF_Test_structure_1,
85 .memb_constraints = 0, /* Defer to actual type */
86 .name = ""
87 },
88};
89static ber_tlv_tag_t asn1_DEF_t_member2_tags[] = {
90 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
91};
92static asn1_SET_OF_specifics_t asn1_DEF_t_member2_specs = {
93 sizeof(struct t_member2),
94 offsetof(struct t_member2, _ber_dec_ctx),
vlm39ba4c42004-09-22 16:06:28 +000095 0, /* XER encoding is XMLDelimitedItemList */
vlmb71a9d32004-09-08 00:26:56 +000096};
97static /* Use -fall-defs-global to expose */
98asn1_TYPE_descriptor_t asn1_DEF_t_member2 = {
99 "t-member2",
vlm39ba4c42004-09-22 16:06:28 +0000100 SEQUENCE_OF_free,
101 SEQUENCE_OF_print,
vlmb71a9d32004-09-08 00:26:56 +0000102 SEQUENCE_OF_constraint,
103 SEQUENCE_OF_decode_ber,
104 SEQUENCE_OF_encode_der,
vlm39ba4c42004-09-22 16:06:28 +0000105 0, /* Not implemented yet */
106 SEQUENCE_OF_encode_xer,
vlmb71a9d32004-09-08 00:26:56 +0000107 0, /* Use generic outmost tag fetcher */
108 asn1_DEF_t_member2_tags,
109 sizeof(asn1_DEF_t_member2_tags)
110 /sizeof(asn1_DEF_t_member2_tags[0]), /* 1 */
vlm72425de2004-09-13 08:31:01 +0000111 asn1_DEF_t_member2_tags, /* Same as above */
112 sizeof(asn1_DEF_t_member2_tags)
113 /sizeof(asn1_DEF_t_member2_tags[0]), /* 1 */
vlmb71a9d32004-09-08 00:26:56 +0000114 asn1_MBR_t_member2,
115 1, /* Single element */
116 &asn1_DEF_t_member2_specs /* Additional specs */
117};
118
119static asn1_TYPE_member_t asn1_MBR_Test_structure_1[] = {
vlmddd5a7d2004-09-10 09:18:20 +0000120 { ATF_NOFLAGS, 0, offsetof(struct Test_structure_1, t_member1),
vlmb71a9d32004-09-08 00:26:56 +0000121 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
122 .tag_mode = 0,
123 .type = (void *)&asn1_DEF_t_member1,
124 .memb_constraints = 0, /* Defer to actual type */
125 .name = "t-member1"
126 },
vlmddd5a7d2004-09-10 09:18:20 +0000127 { ATF_NOFLAGS, 0, offsetof(struct Test_structure_1, t_member2),
vlmb71a9d32004-09-08 00:26:56 +0000128 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
129 .tag_mode = 0,
130 .type = (void *)&asn1_DEF_t_member2,
131 .memb_constraints = 0, /* Defer to actual type */
132 .name = "t-member2"
133 },
vlmddd5a7d2004-09-10 09:18:20 +0000134 { ATF_POINTER, 1, offsetof(struct Test_structure_1, t_member3),
vlmb71a9d32004-09-08 00:26:56 +0000135 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
136 .tag_mode = 0,
137 .type = (void *)&asn1_DEF_Test_structure_1,
138 .memb_constraints = 0, /* Defer to actual type */
139 .name = "t-member3"
140 },
vlmddd5a7d2004-09-10 09:18:20 +0000141 { ATF_NOFLAGS, 0, offsetof(struct Test_structure_1, t_member4),
vlmb71a9d32004-09-08 00:26:56 +0000142 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
143 .tag_mode = 0,
144 .type = (void *)&asn1_DEF_INTEGER,
145 .memb_constraints = 0, /* Defer to actual type */
146 .name = "t-member4"
147 },
148};
149static ber_tlv_tag_t asn1_DEF_Test_structure_1_tags[] = {
150 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
151};
152static asn1_TYPE_tag2member_t asn1_DEF_Test_structure_1_tag2el[] = {
153 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, 0, 0 }, /* t-member4 at 19 */
154 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 1 }, /* t-member2 at 16 */
155 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 0 }, /* t-member3 at 17 */
156 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 }, /* t-member1 at 15 */
157};
158static asn1_SEQUENCE_specifics_t asn1_DEF_Test_structure_1_specs = {
159 sizeof(struct Test_structure_1),
160 offsetof(struct Test_structure_1, _ber_dec_ctx),
161 asn1_DEF_Test_structure_1_tag2el,
162 4, /* Count of tags in the map */
163 -1, /* Start extensions */
164 -1 /* Stop extensions */
165};
166asn1_TYPE_descriptor_t asn1_DEF_Test_structure_1 = {
167 "Test-structure-1",
vlm39ba4c42004-09-22 16:06:28 +0000168 SEQUENCE_free,
169 SEQUENCE_print,
vlmb71a9d32004-09-08 00:26:56 +0000170 SEQUENCE_constraint,
171 SEQUENCE_decode_ber,
172 SEQUENCE_encode_der,
vlm39ba4c42004-09-22 16:06:28 +0000173 0, /* Not implemented yet */
174 SEQUENCE_encode_xer,
vlmb71a9d32004-09-08 00:26:56 +0000175 0, /* Use generic outmost tag fetcher */
176 asn1_DEF_Test_structure_1_tags,
177 sizeof(asn1_DEF_Test_structure_1_tags)
178 /sizeof(asn1_DEF_Test_structure_1_tags[0]), /* 1 */
vlm72425de2004-09-13 08:31:01 +0000179 asn1_DEF_Test_structure_1_tags, /* Same as above */
180 sizeof(asn1_DEF_Test_structure_1_tags)
181 /sizeof(asn1_DEF_Test_structure_1_tags[0]), /* 1 */
vlmb71a9d32004-09-08 00:26:56 +0000182 asn1_MBR_Test_structure_1,
183 4, /* Elements count */
184 &asn1_DEF_Test_structure_1_specs /* Additional specs */
185};
186
187
188/*** <<< INCLUDES [Choice-1] >>> ***/
189
190#include <Choice-1.h>
191#include <INTEGER.h>
192#include <asn_SET_OF.h>
193#include <constr_SET_OF.h>
194#include <constr_CHOICE.h>
195
196/*** <<< DEPS [Choice-1] >>> ***/
197
198typedef enum Choice_1_PR {
199 Choice_1_PR_NOTHING, /* No components present */
200 Choice_1_PR_and,
201 Choice_1_PR_or,
202 Choice_1_PR_not,
203 Choice_1_PR_other,
204} Choice_1_PR;
205extern asn1_TYPE_descriptor_t asn1_DEF_Choice_1;
206
207/*** <<< TYPE-DECLS [Choice-1] >>> ***/
208
209
210typedef struct Choice_1 {
211 Choice_1_PR present;
212 union {
vlmddd5a7d2004-09-10 09:18:20 +0000213 struct Choice_1 *and;
vlmb71a9d32004-09-08 00:26:56 +0000214 struct or {
215 A_SET_OF(struct Choice_1) list;
216
217 /* Context for parsing across buffer boundaries */
218 ber_dec_ctx_t _ber_dec_ctx;
219 } or;
vlmddd5a7d2004-09-10 09:18:20 +0000220 struct Choice_1 *not;
vlmb71a9d32004-09-08 00:26:56 +0000221 INTEGER_t other;
222 } choice;
223
224 /* Context for parsing across buffer boundaries */
225 ber_dec_ctx_t _ber_dec_ctx;
226} Choice_1_t;
227
228/*** <<< STAT-DEFS [Choice-1] >>> ***/
229
230static asn1_TYPE_member_t asn1_MBR_or[] = {
vlmddd5a7d2004-09-10 09:18:20 +0000231 { ATF_NOFLAGS, 0, 0,
vlm060fe2a2004-09-10 09:37:12 +0000232 .tag = -1 /* Ambiguous tag (CHOICE?) */,
vlmb71a9d32004-09-08 00:26:56 +0000233 .tag_mode = 0,
234 .type = (void *)&asn1_DEF_Choice_1,
235 .memb_constraints = 0, /* Defer to actual type */
236 .name = ""
237 },
238};
239static ber_tlv_tag_t asn1_DEF_or_tags[] = {
vlm72425de2004-09-13 08:31:01 +0000240 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
241 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
vlmb71a9d32004-09-08 00:26:56 +0000242};
243static asn1_SET_OF_specifics_t asn1_DEF_or_specs = {
244 sizeof(struct or),
245 offsetof(struct or, _ber_dec_ctx),
vlm39ba4c42004-09-22 16:06:28 +0000246 1, /* XER encoding is XMLValueList */
vlmb71a9d32004-09-08 00:26:56 +0000247};
248static /* Use -fall-defs-global to expose */
249asn1_TYPE_descriptor_t asn1_DEF_or = {
250 "or",
vlm39ba4c42004-09-22 16:06:28 +0000251 SET_OF_free,
252 SET_OF_print,
vlmb71a9d32004-09-08 00:26:56 +0000253 SET_OF_constraint,
254 SET_OF_decode_ber,
255 SET_OF_encode_der,
vlm39ba4c42004-09-22 16:06:28 +0000256 0, /* Not implemented yet */
257 SET_OF_encode_xer,
vlmb71a9d32004-09-08 00:26:56 +0000258 0, /* Use generic outmost tag fetcher */
259 asn1_DEF_or_tags,
260 sizeof(asn1_DEF_or_tags)
vlm72425de2004-09-13 08:31:01 +0000261 /sizeof(asn1_DEF_or_tags[0]) - 1, /* 1 */
262 asn1_DEF_or_tags, /* Same as above */
263 sizeof(asn1_DEF_or_tags)
264 /sizeof(asn1_DEF_or_tags[0]), /* 2 */
vlmb71a9d32004-09-08 00:26:56 +0000265 asn1_MBR_or,
266 1, /* Single element */
267 &asn1_DEF_or_specs /* Additional specs */
268};
269
270static asn1_TYPE_member_t asn1_MBR_Choice_1[] = {
vlmddd5a7d2004-09-10 09:18:20 +0000271 { ATF_POINTER, 0, offsetof(struct Choice_1, choice.and),
vlmb71a9d32004-09-08 00:26:56 +0000272 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
273 .tag_mode = +1, /* EXPLICIT tag at current level */
274 .type = (void *)&asn1_DEF_Choice_1,
275 .memb_constraints = 0, /* Defer to actual type */
276 .name = "and"
277 },
vlmddd5a7d2004-09-10 09:18:20 +0000278 { ATF_NOFLAGS, 0, offsetof(struct Choice_1, choice.or),
vlmb71a9d32004-09-08 00:26:56 +0000279 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
280 .tag_mode = -1, /* IMPLICIT tag at current level */
281 .type = (void *)&asn1_DEF_or,
282 .memb_constraints = 0, /* Defer to actual type */
283 .name = "or"
284 },
vlmddd5a7d2004-09-10 09:18:20 +0000285 { ATF_POINTER, 0, offsetof(struct Choice_1, choice.not),
vlmb71a9d32004-09-08 00:26:56 +0000286 .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
287 .tag_mode = +1, /* EXPLICIT tag at current level */
288 .type = (void *)&asn1_DEF_Choice_1,
289 .memb_constraints = 0, /* Defer to actual type */
290 .name = "not"
291 },
vlmddd5a7d2004-09-10 09:18:20 +0000292 { ATF_NOFLAGS, 0, offsetof(struct Choice_1, choice.other),
vlmb71a9d32004-09-08 00:26:56 +0000293 .tag = (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
294 .tag_mode = +1, /* EXPLICIT tag at current level */
295 .type = (void *)&asn1_DEF_INTEGER,
296 .memb_constraints = 0, /* Defer to actual type */
297 .name = "other"
298 },
299};
300static asn1_TYPE_tag2member_t asn1_DEF_Choice_1_tag2el[] = {
301 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* and at 22 */
302 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* or at 23 */
303 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* not at 24 */
304 { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 3, 0, 0 }, /* other at 26 */
305};
306static asn1_CHOICE_specifics_t asn1_DEF_Choice_1_specs = {
307 sizeof(struct Choice_1),
308 offsetof(struct Choice_1, _ber_dec_ctx),
309 offsetof(struct Choice_1, present),
310 sizeof(((struct Choice_1 *)0)->present),
311 asn1_DEF_Choice_1_tag2el,
312 4, /* Count of tags in the map */
313 0 /* Whether extensible */
314};
315asn1_TYPE_descriptor_t asn1_DEF_Choice_1 = {
316 "Choice-1",
vlm39ba4c42004-09-22 16:06:28 +0000317 CHOICE_free,
318 CHOICE_print,
vlmb71a9d32004-09-08 00:26:56 +0000319 CHOICE_constraint,
320 CHOICE_decode_ber,
321 CHOICE_encode_der,
vlm39ba4c42004-09-22 16:06:28 +0000322 0, /* Not implemented yet */
323 CHOICE_encode_xer,
vlmb71a9d32004-09-08 00:26:56 +0000324 CHOICE_outmost_tag,
vlm72425de2004-09-13 08:31:01 +0000325 0, /* No effective tags (pointer) */
326 0, /* No effective tags (count) */
327 0, /* No tags (pointer) */
328 0, /* No tags (count) */
vlmb71a9d32004-09-08 00:26:56 +0000329 asn1_MBR_Choice_1,
330 4, /* Elements count */
331 &asn1_DEF_Choice_1_specs /* Additional specs */
332};
333