blob: 0b1bbb36ec7eea109602e4e4d8d32c293e862355 [file] [log] [blame]
vlm0d9046e2005-02-14 20:40:57 +00001
2/*** <<< INCLUDES [PDU] >>> ***/
3
4#include <Sequence.h>
5#include <Set.h>
6#include <SetOf.h>
vlm422e4ce2005-02-18 16:30:26 +00007#include <SequenceOf.h>
8#include <ExtensibleSet.h>
9#include <ExtensibleSequence.h>
vlm6d5cb6b2005-02-24 22:38:43 +000010#include <SetOfNULL.h>
11#include <SetOfEnums.h>
12#include <SeqOfZuka.h>
vlm0d9046e2005-02-14 20:40:57 +000013#include <constr_CHOICE.h>
14
15/*** <<< DEPS [PDU] >>> ***/
16
17typedef enum PDU_PR {
18 PDU_PR_NOTHING, /* No components present */
19 PDU_PR_sequence,
20 PDU_PR_set,
21 PDU_PR_setOf,
vlm422e4ce2005-02-18 16:30:26 +000022 PDU_PR_sequenceOf,
23 PDU_PR_extensibleSet,
24 PDU_PR_extensibleSequence,
vlm6d5cb6b2005-02-24 22:38:43 +000025 PDU_PR_setOfNULL,
26 PDU_PR_setOfEnums,
27 PDU_PR_seqOfZuka,
vlm422e4ce2005-02-18 16:30:26 +000028 /* Extensions may appear below */
vlm0d9046e2005-02-14 20:40:57 +000029} PDU_PR;
vlm0d9046e2005-02-14 20:40:57 +000030
31/*** <<< TYPE-DECLS [PDU] >>> ***/
32
vlm0d9046e2005-02-14 20:40:57 +000033typedef struct PDU {
34 PDU_PR present;
35 union {
36 Sequence_t sequence;
37 Set_t set;
38 SetOf_t setOf;
vlm422e4ce2005-02-18 16:30:26 +000039 SequenceOf_t sequenceOf;
40 ExtensibleSet_t extensibleSet;
41 ExtensibleSequence_t extensibleSequence;
vlm6d5cb6b2005-02-24 22:38:43 +000042 SetOfNULL_t setOfNULL;
43 SetOfEnums_t setOfEnums;
44 SeqOfZuka_t seqOfZuka;
vlm422e4ce2005-02-18 16:30:26 +000045 /*
46 * This type is extensible,
47 * possible extensions are below.
48 */
vlm0d9046e2005-02-14 20:40:57 +000049 } choice;
50
51 /* Context for parsing across buffer boundaries */
52 asn_struct_ctx_t _asn_ctx;
53} PDU_t;
54
vlm0b567bf2005-03-04 22:18:20 +000055/*** <<< FUNC-DECLS [PDU] >>> ***/
56
57extern asn_TYPE_descriptor_t asn_DEF_PDU;
58
vlm0d9046e2005-02-14 20:40:57 +000059/*** <<< STAT-DEFS [PDU] >>> ***/
60
vlm44fe49a2005-03-04 11:26:08 +000061static asn_TYPE_member_t asn_MBR_PDU_1[] = {
vlm0d9046e2005-02-14 20:40:57 +000062 { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.sequence),
63 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
64 .tag_mode = -1, /* IMPLICIT tag at current level */
65 .type = (void *)&asn_DEF_Sequence,
66 .memb_constraints = 0, /* Defer constraints checking to the member type */
67 .name = "sequence"
68 },
69 { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.set),
70 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
71 .tag_mode = -1, /* IMPLICIT tag at current level */
72 .type = (void *)&asn_DEF_Set,
73 .memb_constraints = 0, /* Defer constraints checking to the member type */
74 .name = "set"
75 },
76 { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.setOf),
77 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
78 .tag_mode = -1, /* IMPLICIT tag at current level */
79 .type = (void *)&asn_DEF_SetOf,
80 .memb_constraints = 0, /* Defer constraints checking to the member type */
81 .name = "setOf"
82 },
vlm422e4ce2005-02-18 16:30:26 +000083 { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.sequenceOf),
vlm0d9046e2005-02-14 20:40:57 +000084 .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
85 .tag_mode = -1, /* IMPLICIT tag at current level */
vlm422e4ce2005-02-18 16:30:26 +000086 .type = (void *)&asn_DEF_SequenceOf,
vlm0d9046e2005-02-14 20:40:57 +000087 .memb_constraints = 0, /* Defer constraints checking to the member type */
vlm422e4ce2005-02-18 16:30:26 +000088 .name = "sequenceOf"
89 },
90 { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.extensibleSet),
91 .tag = (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
92 .tag_mode = -1, /* IMPLICIT tag at current level */
93 .type = (void *)&asn_DEF_ExtensibleSet,
94 .memb_constraints = 0, /* Defer constraints checking to the member type */
95 .name = "extensibleSet"
96 },
97 { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.extensibleSequence),
98 .tag = (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
99 .tag_mode = -1, /* IMPLICIT tag at current level */
100 .type = (void *)&asn_DEF_ExtensibleSequence,
101 .memb_constraints = 0, /* Defer constraints checking to the member type */
102 .name = "extensibleSequence"
vlm0d9046e2005-02-14 20:40:57 +0000103 },
vlm6d5cb6b2005-02-24 22:38:43 +0000104 { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.setOfNULL),
105 .tag = (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
106 .tag_mode = -1, /* IMPLICIT tag at current level */
107 .type = (void *)&asn_DEF_SetOfNULL,
108 .memb_constraints = 0, /* Defer constraints checking to the member type */
109 .name = "setOfNULL"
110 },
111 { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.setOfEnums),
112 .tag = (ASN_TAG_CLASS_CONTEXT | (7 << 2)),
113 .tag_mode = -1, /* IMPLICIT tag at current level */
114 .type = (void *)&asn_DEF_SetOfEnums,
115 .memb_constraints = 0, /* Defer constraints checking to the member type */
116 .name = "setOfEnums"
117 },
118 { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.seqOfZuka),
119 .tag = (ASN_TAG_CLASS_CONTEXT | (8 << 2)),
120 .tag_mode = -1, /* IMPLICIT tag at current level */
121 .type = (void *)&asn_DEF_SeqOfZuka,
122 .memb_constraints = 0, /* Defer constraints checking to the member type */
123 .name = "seqOfZuka"
124 },
vlm0d9046e2005-02-14 20:40:57 +0000125};
vlm44fe49a2005-03-04 11:26:08 +0000126static asn_TYPE_tag2member_t asn_MAP_PDU_1_tag2el[] = {
vlm0d9046e2005-02-14 20:40:57 +0000127 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sequence at 19 */
128 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* set at 20 */
129 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* setOf at 21 */
vlm422e4ce2005-02-18 16:30:26 +0000130 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* sequenceOf at 22 */
131 { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* extensibleSet at 23 */
132 { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* extensibleSequence at 24 */
vlm6d5cb6b2005-02-24 22:38:43 +0000133 { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* setOfNULL at 25 */
134 { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* setOfEnums at 26 */
vlm82e33fb2005-02-25 08:35:54 +0000135 { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 } /* seqOfZuka at 27 */
vlm0d9046e2005-02-14 20:40:57 +0000136};
vlm44fe49a2005-03-04 11:26:08 +0000137static asn_CHOICE_specifics_t asn_SPC_PDU_1_specs = {
vlm0d9046e2005-02-14 20:40:57 +0000138 sizeof(struct PDU),
139 offsetof(struct PDU, _asn_ctx),
140 offsetof(struct PDU, present),
141 sizeof(((struct PDU *)0)->present),
vlm44fe49a2005-03-04 11:26:08 +0000142 asn_MAP_PDU_1_tag2el,
vlm6d5cb6b2005-02-24 22:38:43 +0000143 9, /* Count of tags in the map */
vlm422e4ce2005-02-18 16:30:26 +0000144 1 /* Whether extensible */
vlm0d9046e2005-02-14 20:40:57 +0000145};
146asn_TYPE_descriptor_t asn_DEF_PDU = {
147 "PDU",
148 "PDU",
149 CHOICE_free,
150 CHOICE_print,
151 CHOICE_constraint,
152 CHOICE_decode_ber,
153 CHOICE_encode_der,
154 CHOICE_decode_xer,
155 CHOICE_encode_xer,
156 CHOICE_outmost_tag,
157 0, /* No effective tags (pointer) */
158 0, /* No effective tags (count) */
159 0, /* No tags (pointer) */
160 0, /* No tags (count) */
vlm44fe49a2005-03-04 11:26:08 +0000161 asn_MBR_PDU_1,
vlm6d5cb6b2005-02-24 22:38:43 +0000162 9, /* Elements count */
vlm44fe49a2005-03-04 11:26:08 +0000163 &asn_SPC_PDU_1_specs /* Additional specs */
vlm0d9046e2005-02-14 20:40:57 +0000164};
165
166
167/*** <<< INCLUDES [Sequence] >>> ***/
168
169#include <INTEGER.h>
vlm0d9046e2005-02-14 20:40:57 +0000170#include <BIT_STRING.h>
171#include <UTF8String.h>
172#include <constr_SEQUENCE.h>
173
vlm0b567bf2005-03-04 22:18:20 +0000174/*** <<< FWD-DECLS [Sequence] >>> ***/
vlm0d9046e2005-02-14 20:40:57 +0000175
vlm5feb7522005-03-04 23:50:56 +0000176struct Sequence;
vlm0d9046e2005-02-14 20:40:57 +0000177
178/*** <<< TYPE-DECLS [Sequence] >>> ***/
179
vlm0d9046e2005-02-14 20:40:57 +0000180typedef struct Sequence {
181 INTEGER_t integer;
182 struct Sequence *sequence /* OPTIONAL */;
183 BIT_STRING_t *bits /* OPTIONAL */;
184 UTF8String_t string;
185
186 /* Context for parsing across buffer boundaries */
187 asn_struct_ctx_t _asn_ctx;
188} Sequence_t;
189
vlm0b567bf2005-03-04 22:18:20 +0000190/*** <<< FUNC-DECLS [Sequence] >>> ***/
191
192extern asn_TYPE_descriptor_t asn_DEF_Sequence;
193
194/*** <<< POST-INCLUDE [Sequence] >>> ***/
195
196#include <Sequence.h>
197
vlm0d9046e2005-02-14 20:40:57 +0000198/*** <<< STAT-DEFS [Sequence] >>> ***/
199
vlm44fe49a2005-03-04 11:26:08 +0000200static asn_TYPE_member_t asn_MBR_Sequence_1[] = {
vlm0d9046e2005-02-14 20:40:57 +0000201 { ATF_NOFLAGS, 0, offsetof(struct Sequence, integer),
202 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
203 .tag_mode = -1, /* IMPLICIT tag at current level */
204 .type = (void *)&asn_DEF_INTEGER,
205 .memb_constraints = 0, /* Defer constraints checking to the member type */
206 .name = "integer"
207 },
208 { ATF_POINTER, 2, offsetof(struct Sequence, sequence),
209 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
210 .tag_mode = -1, /* IMPLICIT tag at current level */
211 .type = (void *)&asn_DEF_Sequence,
212 .memb_constraints = 0, /* Defer constraints checking to the member type */
213 .name = "sequence"
214 },
215 { ATF_POINTER, 1, offsetof(struct Sequence, bits),
216 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
217 .tag_mode = -1, /* IMPLICIT tag at current level */
218 .type = (void *)&asn_DEF_BIT_STRING,
219 .memb_constraints = 0, /* Defer constraints checking to the member type */
220 .name = "bits"
221 },
222 { ATF_NOFLAGS, 0, offsetof(struct Sequence, string),
223 .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
224 .tag_mode = -1, /* IMPLICIT tag at current level */
225 .type = (void *)&asn_DEF_UTF8String,
226 .memb_constraints = 0, /* Defer constraints checking to the member type */
227 .name = "string"
228 },
229};
vlm44fe49a2005-03-04 11:26:08 +0000230static ber_tlv_tag_t asn_DEF_Sequence_1_tags[] = {
vlm0d9046e2005-02-14 20:40:57 +0000231 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
232};
vlm44fe49a2005-03-04 11:26:08 +0000233static asn_TYPE_tag2member_t asn_MAP_Sequence_1_tag2el[] = {
vlm6d5cb6b2005-02-24 22:38:43 +0000234 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* integer at 32 */
235 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* sequence at 33 */
236 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* bits at 34 */
vlm82e33fb2005-02-25 08:35:54 +0000237 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* string at 35 */
vlm0d9046e2005-02-14 20:40:57 +0000238};
vlm44fe49a2005-03-04 11:26:08 +0000239static asn_SEQUENCE_specifics_t asn_SPC_Sequence_1_specs = {
vlm0d9046e2005-02-14 20:40:57 +0000240 sizeof(struct Sequence),
241 offsetof(struct Sequence, _asn_ctx),
vlm44fe49a2005-03-04 11:26:08 +0000242 asn_MAP_Sequence_1_tag2el,
vlm0d9046e2005-02-14 20:40:57 +0000243 4, /* Count of tags in the map */
244 -1, /* Start extensions */
245 -1 /* Stop extensions */
246};
247asn_TYPE_descriptor_t asn_DEF_Sequence = {
248 "Sequence",
249 "Sequence",
250 SEQUENCE_free,
251 SEQUENCE_print,
252 SEQUENCE_constraint,
253 SEQUENCE_decode_ber,
254 SEQUENCE_encode_der,
255 SEQUENCE_decode_xer,
256 SEQUENCE_encode_xer,
257 0, /* Use generic outmost tag fetcher */
vlm44fe49a2005-03-04 11:26:08 +0000258 asn_DEF_Sequence_1_tags,
259 sizeof(asn_DEF_Sequence_1_tags)
260 /sizeof(asn_DEF_Sequence_1_tags[0]), /* 1 */
261 asn_DEF_Sequence_1_tags, /* Same as above */
262 sizeof(asn_DEF_Sequence_1_tags)
263 /sizeof(asn_DEF_Sequence_1_tags[0]), /* 1 */
264 asn_MBR_Sequence_1,
vlm0d9046e2005-02-14 20:40:57 +0000265 4, /* Elements count */
vlm44fe49a2005-03-04 11:26:08 +0000266 &asn_SPC_Sequence_1_specs /* Additional specs */
vlm0d9046e2005-02-14 20:40:57 +0000267};
268
269
270/*** <<< INCLUDES [Set] >>> ***/
271
272#include <RELATIVE-OID.h>
273#include <OCTET_STRING.h>
274#include <constr_SET.h>
275
276/*** <<< DEPS [Set] >>> ***/
277
278
279/*
280 * Method of determining the components presence
281 */
282typedef enum Set_PR {
283 Set_PR_roid, /* Member roid is present */
284 Set_PR_opaque, /* Member opaque is present */
285} Set_PR;
vlm0d9046e2005-02-14 20:40:57 +0000286
287/*** <<< TYPE-DECLS [Set] >>> ***/
288
vlm0d9046e2005-02-14 20:40:57 +0000289typedef struct Set {
290 RELATIVE_OID_t roid;
291 OCTET_STRING_t *opaque /* OPTIONAL */;
292
293 /* Presence bitmask: ASN_SET_ISPRESENT(pSet, Set_PR_x) */
294 unsigned int _presence_map
295 [((2+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
296
297 /* Context for parsing across buffer boundaries */
298 asn_struct_ctx_t _asn_ctx;
299} Set_t;
300
vlm0b567bf2005-03-04 22:18:20 +0000301/*** <<< FUNC-DECLS [Set] >>> ***/
302
303extern asn_TYPE_descriptor_t asn_DEF_Set;
304
vlm0d9046e2005-02-14 20:40:57 +0000305/*** <<< STAT-DEFS [Set] >>> ***/
306
vlm44fe49a2005-03-04 11:26:08 +0000307static asn_TYPE_member_t asn_MBR_Set_1[] = {
vlm0d9046e2005-02-14 20:40:57 +0000308 { ATF_NOFLAGS, 0, offsetof(struct Set, roid),
309 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
310 .tag_mode = -1, /* IMPLICIT tag at current level */
311 .type = (void *)&asn_DEF_RELATIVE_OID,
312 .memb_constraints = 0, /* Defer constraints checking to the member type */
313 .name = "roid"
314 },
315 { ATF_POINTER, 1, offsetof(struct Set, opaque),
316 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
317 .tag_mode = -1, /* IMPLICIT tag at current level */
318 .type = (void *)&asn_DEF_OCTET_STRING,
319 .memb_constraints = 0, /* Defer constraints checking to the member type */
320 .name = "opaque"
321 },
322};
vlm44fe49a2005-03-04 11:26:08 +0000323static ber_tlv_tag_t asn_DEF_Set_1_tags[] = {
vlm0d9046e2005-02-14 20:40:57 +0000324 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
325};
vlm44fe49a2005-03-04 11:26:08 +0000326static asn_TYPE_tag2member_t asn_MAP_Set_1_tag2el[] = {
vlm6d5cb6b2005-02-24 22:38:43 +0000327 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* roid at 39 */
vlm82e33fb2005-02-25 08:35:54 +0000328 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* opaque at 40 */
vlm0d9046e2005-02-14 20:40:57 +0000329};
vlm44fe49a2005-03-04 11:26:08 +0000330static uint8_t asn_MAP_Set_1_mmap[(2 + (8 * sizeof(unsigned int)) - 1) / 8] = {
vlm0d9046e2005-02-14 20:40:57 +0000331 (1 << 7) | (0 << 6)
332};
vlm44fe49a2005-03-04 11:26:08 +0000333static asn_SET_specifics_t asn_SPC_Set_1_specs = {
vlm0d9046e2005-02-14 20:40:57 +0000334 sizeof(struct Set),
335 offsetof(struct Set, _asn_ctx),
336 offsetof(struct Set, _presence_map),
vlm44fe49a2005-03-04 11:26:08 +0000337 asn_MAP_Set_1_tag2el,
vlm0d9046e2005-02-14 20:40:57 +0000338 2, /* Count of tags in the map */
vlm44fe49a2005-03-04 11:26:08 +0000339 asn_MAP_Set_1_tag2el, /* Same as above */
vlm6d5cb6b2005-02-24 22:38:43 +0000340 2, /* Count of tags in the CXER map */
vlm0d9046e2005-02-14 20:40:57 +0000341 0, /* Whether extensible */
vlm44fe49a2005-03-04 11:26:08 +0000342 (unsigned int *)asn_MAP_Set_1_mmap /* Mandatory elements map */
vlm0d9046e2005-02-14 20:40:57 +0000343};
344asn_TYPE_descriptor_t asn_DEF_Set = {
345 "Set",
346 "Set",
347 SET_free,
348 SET_print,
349 SET_constraint,
350 SET_decode_ber,
351 SET_encode_der,
352 SET_decode_xer,
353 SET_encode_xer,
354 0, /* Use generic outmost tag fetcher */
vlm44fe49a2005-03-04 11:26:08 +0000355 asn_DEF_Set_1_tags,
356 sizeof(asn_DEF_Set_1_tags)
357 /sizeof(asn_DEF_Set_1_tags[0]), /* 1 */
358 asn_DEF_Set_1_tags, /* Same as above */
359 sizeof(asn_DEF_Set_1_tags)
360 /sizeof(asn_DEF_Set_1_tags[0]), /* 1 */
361 asn_MBR_Set_1,
vlm0d9046e2005-02-14 20:40:57 +0000362 2, /* Elements count */
vlm44fe49a2005-03-04 11:26:08 +0000363 &asn_SPC_Set_1_specs /* Additional specs */
vlm0d9046e2005-02-14 20:40:57 +0000364};
365
366
vlm422e4ce2005-02-18 16:30:26 +0000367/*** <<< INCLUDES [ExtensibleSet] >>> ***/
368
369#include <UTF8String.h>
vlm9ef0e492005-03-10 11:20:47 +0000370#include <ENUMERATED.h>
vlm422e4ce2005-02-18 16:30:26 +0000371#include <constr_SET.h>
372
373/*** <<< DEPS [ExtensibleSet] >>> ***/
374
375
376/*
377 * Method of determining the components presence
378 */
379typedef enum ExtensibleSet_PR {
380 ExtensibleSet_PR_string, /* Member string is present */
vlm9ef0e492005-03-10 11:20:47 +0000381 ExtensibleSet_PR_enum, /* Member enum is present */
vlm422e4ce2005-02-18 16:30:26 +0000382} ExtensibleSet_PR;
vlm9ef0e492005-03-10 11:20:47 +0000383typedef enum Enum {
384 enum_b = 0,
385 enum_a = 1
386} enum_e;
vlm422e4ce2005-02-18 16:30:26 +0000387
388/*** <<< TYPE-DECLS [ExtensibleSet] >>> ***/
389
vlm422e4ce2005-02-18 16:30:26 +0000390typedef struct ExtensibleSet {
391 UTF8String_t *string /* OPTIONAL */;
392 /*
393 * This type is extensible,
394 * possible extensions are below.
395 */
vlm9ef0e492005-03-10 11:20:47 +0000396 ENUMERATED_t *Enum;
vlm422e4ce2005-02-18 16:30:26 +0000397
398 /* Presence bitmask: ASN_SET_ISPRESENT(pExtensibleSet, ExtensibleSet_PR_x) */
399 unsigned int _presence_map
vlm9ef0e492005-03-10 11:20:47 +0000400 [((2+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
vlm422e4ce2005-02-18 16:30:26 +0000401
402 /* Context for parsing across buffer boundaries */
403 asn_struct_ctx_t _asn_ctx;
404} ExtensibleSet_t;
405
vlm0b567bf2005-03-04 22:18:20 +0000406/*** <<< FUNC-DECLS [ExtensibleSet] >>> ***/
407
vlm9ef0e492005-03-10 11:20:47 +0000408/* extern asn_TYPE_descriptor_t asn_DEF_enum_4; // (Use -fall-defs-global to expose) */
vlm0b567bf2005-03-04 22:18:20 +0000409extern asn_TYPE_descriptor_t asn_DEF_ExtensibleSet;
410
vlm9ef0e492005-03-10 11:20:47 +0000411/*** <<< CODE [ExtensibleSet] >>> ***/
412
413static int
414enum_4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
415 asn_app_consume_bytes_f *app_errlog, void *app_key) {
416 /* Replace with underlying type checker */
417 td->check_constraints = asn_DEF_ENUMERATED.check_constraints;
418 return td->check_constraints(td, sptr, app_errlog, app_key);
419}
420
421/*
422 * This type is implemented using ENUMERATED,
423 * so here we adjust the DEF accordingly.
424 */
425static void
426enum_4_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
427 td->free_struct = asn_DEF_ENUMERATED.free_struct;
428 td->print_struct = asn_DEF_ENUMERATED.print_struct;
429 td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder;
430 td->der_encoder = asn_DEF_ENUMERATED.der_encoder;
431 td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder;
432 td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder;
433 td->elements = asn_DEF_ENUMERATED.elements;
434 td->elements_count = asn_DEF_ENUMERATED.elements_count;
435 /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */
436}
437
438static void
439enum_4_free(asn_TYPE_descriptor_t *td,
440 void *struct_ptr, int contents_only) {
441 enum_4_inherit_TYPE_descriptor(td);
442 td->free_struct(td, struct_ptr, contents_only);
443}
444
445static int
446enum_4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
447 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
448 enum_4_inherit_TYPE_descriptor(td);
449 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
450}
451
452static asn_dec_rval_t
453enum_4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +0000454 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm9ef0e492005-03-10 11:20:47 +0000455 enum_4_inherit_TYPE_descriptor(td);
456 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
457}
458
459static asn_enc_rval_t
460enum_4_encode_der(asn_TYPE_descriptor_t *td,
461 void *structure, int tag_mode, ber_tlv_tag_t tag,
462 asn_app_consume_bytes_f *cb, void *app_key) {
463 enum_4_inherit_TYPE_descriptor(td);
464 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
465}
466
467static asn_dec_rval_t
468enum_4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +0000469 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm9ef0e492005-03-10 11:20:47 +0000470 enum_4_inherit_TYPE_descriptor(td);
471 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
472}
473
474static asn_enc_rval_t
475enum_4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
476 int ilevel, enum xer_encoder_flags_e flags,
477 asn_app_consume_bytes_f *cb, void *app_key) {
478 enum_4_inherit_TYPE_descriptor(td);
479 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
480}
481
482
vlm422e4ce2005-02-18 16:30:26 +0000483/*** <<< STAT-DEFS [ExtensibleSet] >>> ***/
484
vlm9ef0e492005-03-10 11:20:47 +0000485static asn_INTEGER_enum_map_t asn_MAP_enum_4_value2enum[] = {
486 { 0, 1, "b" },
487 { 1, 1, "a" }
488};
489static unsigned int asn_MAP_enum_4_enum2value[] = {
490 1, /* a(1) */
491 0 /* b(0) */
492};
493static asn_INTEGER_specifics_t asn_SPC_enum_4_specs = {
494 asn_MAP_enum_4_value2enum, /* "tag" => N; sorted by tag */
495 asn_MAP_enum_4_enum2value, /* N => "tag"; sorted by N */
496 2, /* Number of elements in the maps */
497 0, /* Enumeration is not extensible */
498 1 /* Strict enumeration */
499};
500static ber_tlv_tag_t asn_DEF_enum_4_tags[] = {
501 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
502 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
503};
504static /* Use -fall-defs-global to expose */
505asn_TYPE_descriptor_t asn_DEF_enum_4 = {
506 "enum",
507 "enum",
508 enum_4_free,
509 enum_4_print,
510 enum_4_constraint,
511 enum_4_decode_ber,
512 enum_4_encode_der,
513 enum_4_decode_xer,
514 enum_4_encode_xer,
515 0, /* Use generic outmost tag fetcher */
516 asn_DEF_enum_4_tags,
517 sizeof(asn_DEF_enum_4_tags)
518 /sizeof(asn_DEF_enum_4_tags[0]) - 1, /* 1 */
519 asn_DEF_enum_4_tags, /* Same as above */
520 sizeof(asn_DEF_enum_4_tags)
521 /sizeof(asn_DEF_enum_4_tags[0]), /* 2 */
522 0, 0, /* Defined elsewhere */
523 &asn_SPC_enum_4_specs /* Additional specs */
524};
525
vlm44fe49a2005-03-04 11:26:08 +0000526static asn_TYPE_member_t asn_MBR_ExtensibleSet_1[] = {
vlm9ef0e492005-03-10 11:20:47 +0000527 { ATF_POINTER, 2, offsetof(struct ExtensibleSet, string),
vlm422e4ce2005-02-18 16:30:26 +0000528 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
529 .tag_mode = -1, /* IMPLICIT tag at current level */
530 .type = (void *)&asn_DEF_UTF8String,
531 .memb_constraints = 0, /* Defer constraints checking to the member type */
532 .name = "string"
533 },
vlm9ef0e492005-03-10 11:20:47 +0000534 { ATF_POINTER, 0, offsetof(struct ExtensibleSet, Enum),
535 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
536 .tag_mode = -1, /* IMPLICIT tag at current level */
537 .type = (void *)&asn_DEF_enum_4,
538 .memb_constraints = 0, /* Defer constraints checking to the member type */
539 .name = "enum"
540 },
vlm422e4ce2005-02-18 16:30:26 +0000541};
vlm44fe49a2005-03-04 11:26:08 +0000542static ber_tlv_tag_t asn_DEF_ExtensibleSet_1_tags[] = {
vlm422e4ce2005-02-18 16:30:26 +0000543 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
544};
vlm44fe49a2005-03-04 11:26:08 +0000545static asn_TYPE_tag2member_t asn_MAP_ExtensibleSet_1_tag2el[] = {
vlm9ef0e492005-03-10 11:20:47 +0000546 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* string at 44 */
547 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* enum at 46 */
vlm422e4ce2005-02-18 16:30:26 +0000548};
vlm9ef0e492005-03-10 11:20:47 +0000549static uint8_t asn_MAP_ExtensibleSet_1_mmap[(2 + (8 * sizeof(unsigned int)) - 1) / 8] = {
550 (0 << 7) | (0 << 6)
vlm422e4ce2005-02-18 16:30:26 +0000551};
vlm44fe49a2005-03-04 11:26:08 +0000552static asn_SET_specifics_t asn_SPC_ExtensibleSet_1_specs = {
vlm422e4ce2005-02-18 16:30:26 +0000553 sizeof(struct ExtensibleSet),
554 offsetof(struct ExtensibleSet, _asn_ctx),
555 offsetof(struct ExtensibleSet, _presence_map),
vlm44fe49a2005-03-04 11:26:08 +0000556 asn_MAP_ExtensibleSet_1_tag2el,
vlm9ef0e492005-03-10 11:20:47 +0000557 2, /* Count of tags in the map */
vlm44fe49a2005-03-04 11:26:08 +0000558 asn_MAP_ExtensibleSet_1_tag2el, /* Same as above */
vlm9ef0e492005-03-10 11:20:47 +0000559 2, /* Count of tags in the CXER map */
vlm422e4ce2005-02-18 16:30:26 +0000560 1, /* Whether extensible */
vlm44fe49a2005-03-04 11:26:08 +0000561 (unsigned int *)asn_MAP_ExtensibleSet_1_mmap /* Mandatory elements map */
vlm422e4ce2005-02-18 16:30:26 +0000562};
563asn_TYPE_descriptor_t asn_DEF_ExtensibleSet = {
564 "ExtensibleSet",
565 "ExtensibleSet",
566 SET_free,
567 SET_print,
568 SET_constraint,
569 SET_decode_ber,
570 SET_encode_der,
571 SET_decode_xer,
572 SET_encode_xer,
573 0, /* Use generic outmost tag fetcher */
vlm44fe49a2005-03-04 11:26:08 +0000574 asn_DEF_ExtensibleSet_1_tags,
575 sizeof(asn_DEF_ExtensibleSet_1_tags)
576 /sizeof(asn_DEF_ExtensibleSet_1_tags[0]), /* 1 */
577 asn_DEF_ExtensibleSet_1_tags, /* Same as above */
578 sizeof(asn_DEF_ExtensibleSet_1_tags)
579 /sizeof(asn_DEF_ExtensibleSet_1_tags[0]), /* 1 */
580 asn_MBR_ExtensibleSet_1,
vlm9ef0e492005-03-10 11:20:47 +0000581 2, /* Elements count */
vlm44fe49a2005-03-04 11:26:08 +0000582 &asn_SPC_ExtensibleSet_1_specs /* Additional specs */
vlm422e4ce2005-02-18 16:30:26 +0000583};
584
585
586/*** <<< INCLUDES [ExtensibleSequence] >>> ***/
587
588#include <UTF8String.h>
589#include <INTEGER.h>
590#include <constr_SEQUENCE.h>
591
vlm422e4ce2005-02-18 16:30:26 +0000592/*** <<< TYPE-DECLS [ExtensibleSequence] >>> ***/
593
vlm422e4ce2005-02-18 16:30:26 +0000594typedef struct ExtensibleSequence {
595 UTF8String_t *string /* OPTIONAL */;
596 /*
597 * This type is extensible,
598 * possible extensions are below.
599 */
600 INTEGER_t *integer /* OPTIONAL */;
601
602 /* Context for parsing across buffer boundaries */
603 asn_struct_ctx_t _asn_ctx;
604} ExtensibleSequence_t;
605
vlm0b567bf2005-03-04 22:18:20 +0000606/*** <<< FUNC-DECLS [ExtensibleSequence] >>> ***/
607
608extern asn_TYPE_descriptor_t asn_DEF_ExtensibleSequence;
609
vlm422e4ce2005-02-18 16:30:26 +0000610/*** <<< STAT-DEFS [ExtensibleSequence] >>> ***/
611
vlm44fe49a2005-03-04 11:26:08 +0000612static asn_TYPE_member_t asn_MBR_ExtensibleSequence_1[] = {
vlm9ef0e492005-03-10 11:20:47 +0000613 { ATF_POINTER, 2, offsetof(struct ExtensibleSequence, string),
vlm422e4ce2005-02-18 16:30:26 +0000614 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
615 .tag_mode = -1, /* IMPLICIT tag at current level */
616 .type = (void *)&asn_DEF_UTF8String,
617 .memb_constraints = 0, /* Defer constraints checking to the member type */
618 .name = "string"
619 },
vlm9ef0e492005-03-10 11:20:47 +0000620 { ATF_POINTER, 1, offsetof(struct ExtensibleSequence, integer),
vlm422e4ce2005-02-18 16:30:26 +0000621 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
622 .tag_mode = -1, /* IMPLICIT tag at current level */
623 .type = (void *)&asn_DEF_INTEGER,
624 .memb_constraints = 0, /* Defer constraints checking to the member type */
625 .name = "integer"
626 },
627};
vlm44fe49a2005-03-04 11:26:08 +0000628static ber_tlv_tag_t asn_DEF_ExtensibleSequence_1_tags[] = {
vlm422e4ce2005-02-18 16:30:26 +0000629 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
630};
vlm44fe49a2005-03-04 11:26:08 +0000631static asn_TYPE_tag2member_t asn_MAP_ExtensibleSequence_1_tag2el[] = {
vlm9ef0e492005-03-10 11:20:47 +0000632 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* string at 50 */
633 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* integer at 52 */
vlm422e4ce2005-02-18 16:30:26 +0000634};
vlm44fe49a2005-03-04 11:26:08 +0000635static asn_SEQUENCE_specifics_t asn_SPC_ExtensibleSequence_1_specs = {
vlm422e4ce2005-02-18 16:30:26 +0000636 sizeof(struct ExtensibleSequence),
637 offsetof(struct ExtensibleSequence, _asn_ctx),
vlm44fe49a2005-03-04 11:26:08 +0000638 asn_MAP_ExtensibleSequence_1_tag2el,
vlm9ef0e492005-03-10 11:20:47 +0000639 2, /* Count of tags in the map */
vlm422e4ce2005-02-18 16:30:26 +0000640 0, /* Start extensions */
vlm9ef0e492005-03-10 11:20:47 +0000641 3 /* Stop extensions */
vlm422e4ce2005-02-18 16:30:26 +0000642};
643asn_TYPE_descriptor_t asn_DEF_ExtensibleSequence = {
644 "ExtensibleSequence",
645 "ExtensibleSequence",
646 SEQUENCE_free,
647 SEQUENCE_print,
648 SEQUENCE_constraint,
649 SEQUENCE_decode_ber,
650 SEQUENCE_encode_der,
651 SEQUENCE_decode_xer,
652 SEQUENCE_encode_xer,
653 0, /* Use generic outmost tag fetcher */
vlm44fe49a2005-03-04 11:26:08 +0000654 asn_DEF_ExtensibleSequence_1_tags,
655 sizeof(asn_DEF_ExtensibleSequence_1_tags)
656 /sizeof(asn_DEF_ExtensibleSequence_1_tags[0]), /* 1 */
657 asn_DEF_ExtensibleSequence_1_tags, /* Same as above */
658 sizeof(asn_DEF_ExtensibleSequence_1_tags)
659 /sizeof(asn_DEF_ExtensibleSequence_1_tags[0]), /* 1 */
660 asn_MBR_ExtensibleSequence_1,
vlm9ef0e492005-03-10 11:20:47 +0000661 2, /* Elements count */
vlm44fe49a2005-03-04 11:26:08 +0000662 &asn_SPC_ExtensibleSequence_1_specs /* Additional specs */
vlm422e4ce2005-02-18 16:30:26 +0000663};
664
665
vlm0d9046e2005-02-14 20:40:57 +0000666/*** <<< INCLUDES [SetOf] >>> ***/
667
668#include <REAL.h>
669#include <asn_SET_OF.h>
670#include <constr_SET_OF.h>
671
vlm0d9046e2005-02-14 20:40:57 +0000672/*** <<< TYPE-DECLS [SetOf] >>> ***/
673
vlm0d9046e2005-02-14 20:40:57 +0000674typedef struct SetOf {
675 A_SET_OF(REAL_t) list;
676
677 /* Context for parsing across buffer boundaries */
678 asn_struct_ctx_t _asn_ctx;
679} SetOf_t;
680
vlm0b567bf2005-03-04 22:18:20 +0000681/*** <<< FUNC-DECLS [SetOf] >>> ***/
682
683extern asn_TYPE_descriptor_t asn_DEF_SetOf;
684
vlm0d9046e2005-02-14 20:40:57 +0000685/*** <<< STAT-DEFS [SetOf] >>> ***/
686
vlm44fe49a2005-03-04 11:26:08 +0000687static asn_TYPE_member_t asn_MBR_SetOf_1[] = {
vlm0d9046e2005-02-14 20:40:57 +0000688 { ATF_NOFLAGS, 0, 0,
689 .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)),
690 .tag_mode = 0,
691 .type = (void *)&asn_DEF_REAL,
692 .memb_constraints = 0, /* Defer constraints checking to the member type */
693 .name = ""
694 },
695};
vlm44fe49a2005-03-04 11:26:08 +0000696static ber_tlv_tag_t asn_DEF_SetOf_1_tags[] = {
vlm0d9046e2005-02-14 20:40:57 +0000697 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
698};
vlm44fe49a2005-03-04 11:26:08 +0000699static asn_SET_OF_specifics_t asn_SPC_SetOf_1_specs = {
vlm0d9046e2005-02-14 20:40:57 +0000700 sizeof(struct SetOf),
701 offsetof(struct SetOf, _asn_ctx),
702 0, /* XER encoding is XMLDelimitedItemList */
703};
704asn_TYPE_descriptor_t asn_DEF_SetOf = {
705 "SetOf",
706 "SetOf",
707 SET_OF_free,
708 SET_OF_print,
709 SET_OF_constraint,
710 SET_OF_decode_ber,
711 SET_OF_encode_der,
712 SET_OF_decode_xer,
713 SET_OF_encode_xer,
714 0, /* Use generic outmost tag fetcher */
vlm44fe49a2005-03-04 11:26:08 +0000715 asn_DEF_SetOf_1_tags,
716 sizeof(asn_DEF_SetOf_1_tags)
717 /sizeof(asn_DEF_SetOf_1_tags[0]), /* 1 */
718 asn_DEF_SetOf_1_tags, /* Same as above */
719 sizeof(asn_DEF_SetOf_1_tags)
720 /sizeof(asn_DEF_SetOf_1_tags[0]), /* 1 */
721 asn_MBR_SetOf_1,
vlm0d9046e2005-02-14 20:40:57 +0000722 1, /* Single element */
vlm44fe49a2005-03-04 11:26:08 +0000723 &asn_SPC_SetOf_1_specs /* Additional specs */
vlm0d9046e2005-02-14 20:40:57 +0000724};
725
726
vlm6d5cb6b2005-02-24 22:38:43 +0000727/*** <<< INCLUDES [SetOfNULL] >>> ***/
728
729#include <NULL.h>
730#include <asn_SET_OF.h>
731#include <constr_SET_OF.h>
732
vlm6d5cb6b2005-02-24 22:38:43 +0000733/*** <<< TYPE-DECLS [SetOfNULL] >>> ***/
734
vlm6d5cb6b2005-02-24 22:38:43 +0000735typedef struct SetOfNULL {
736 A_SET_OF(NULL_t) list;
737
738 /* Context for parsing across buffer boundaries */
739 asn_struct_ctx_t _asn_ctx;
740} SetOfNULL_t;
741
vlm0b567bf2005-03-04 22:18:20 +0000742/*** <<< FUNC-DECLS [SetOfNULL] >>> ***/
743
744extern asn_TYPE_descriptor_t asn_DEF_SetOfNULL;
745
vlm6d5cb6b2005-02-24 22:38:43 +0000746/*** <<< STAT-DEFS [SetOfNULL] >>> ***/
747
vlm44fe49a2005-03-04 11:26:08 +0000748static asn_TYPE_member_t asn_MBR_SetOfNULL_1[] = {
vlm6d5cb6b2005-02-24 22:38:43 +0000749 { ATF_NOFLAGS, 0, 0,
750 .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)),
751 .tag_mode = 0,
752 .type = (void *)&asn_DEF_NULL,
753 .memb_constraints = 0, /* Defer constraints checking to the member type */
754 .name = ""
755 },
756};
vlm44fe49a2005-03-04 11:26:08 +0000757static ber_tlv_tag_t asn_DEF_SetOfNULL_1_tags[] = {
vlm6d5cb6b2005-02-24 22:38:43 +0000758 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
759};
vlm44fe49a2005-03-04 11:26:08 +0000760static asn_SET_OF_specifics_t asn_SPC_SetOfNULL_1_specs = {
vlm6d5cb6b2005-02-24 22:38:43 +0000761 sizeof(struct SetOfNULL),
762 offsetof(struct SetOfNULL, _asn_ctx),
763 1, /* XER encoding is XMLValueList */
764};
765asn_TYPE_descriptor_t asn_DEF_SetOfNULL = {
766 "SetOfNULL",
767 "SetOfNULL",
768 SET_OF_free,
769 SET_OF_print,
770 SET_OF_constraint,
771 SET_OF_decode_ber,
772 SET_OF_encode_der,
773 SET_OF_decode_xer,
774 SET_OF_encode_xer,
775 0, /* Use generic outmost tag fetcher */
vlm44fe49a2005-03-04 11:26:08 +0000776 asn_DEF_SetOfNULL_1_tags,
777 sizeof(asn_DEF_SetOfNULL_1_tags)
778 /sizeof(asn_DEF_SetOfNULL_1_tags[0]), /* 1 */
779 asn_DEF_SetOfNULL_1_tags, /* Same as above */
780 sizeof(asn_DEF_SetOfNULL_1_tags)
781 /sizeof(asn_DEF_SetOfNULL_1_tags[0]), /* 1 */
782 asn_MBR_SetOfNULL_1,
vlm6d5cb6b2005-02-24 22:38:43 +0000783 1, /* Single element */
vlm44fe49a2005-03-04 11:26:08 +0000784 &asn_SPC_SetOfNULL_1_specs /* Additional specs */
vlm6d5cb6b2005-02-24 22:38:43 +0000785};
786
787
788/*** <<< INCLUDES [SetOfEnums] >>> ***/
789
790#include <ENUMERATED.h>
791#include <asn_SET_OF.h>
792#include <constr_SET_OF.h>
793
794/*** <<< DEPS [SetOfEnums] >>> ***/
795
vlm44fe49a2005-03-04 11:26:08 +0000796typedef enum Member {
797 Member_one = 0,
798 Member_oneMore = 1
799} Member_e;
vlm6d5cb6b2005-02-24 22:38:43 +0000800
801/*** <<< TYPE-DECLS [SetOfEnums] >>> ***/
802
vlm6d5cb6b2005-02-24 22:38:43 +0000803typedef struct SetOfEnums {
804 A_SET_OF(ENUMERATED_t) list;
805
806 /* Context for parsing across buffer boundaries */
807 asn_struct_ctx_t _asn_ctx;
808} SetOfEnums_t;
809
vlm82e33fb2005-02-25 08:35:54 +0000810/*** <<< FUNC-DECLS [SetOfEnums] >>> ***/
811
vlm44fe49a2005-03-04 11:26:08 +0000812/* extern asn_TYPE_descriptor_t asn_DEF_Member_2; // (Use -fall-defs-global to expose) */
vlm0b567bf2005-03-04 22:18:20 +0000813extern asn_TYPE_descriptor_t asn_DEF_SetOfEnums;
vlm82e33fb2005-02-25 08:35:54 +0000814
815/*** <<< CODE [SetOfEnums] >>> ***/
816
817static int
vlm44fe49a2005-03-04 11:26:08 +0000818Member_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlm82e33fb2005-02-25 08:35:54 +0000819 asn_app_consume_bytes_f *app_errlog, void *app_key) {
820 /* Replace with underlying type checker */
821 td->check_constraints = asn_DEF_ENUMERATED.check_constraints;
822 return td->check_constraints(td, sptr, app_errlog, app_key);
823}
824
825/*
826 * This type is implemented using ENUMERATED,
827 * so here we adjust the DEF accordingly.
828 */
829static void
vlm44fe49a2005-03-04 11:26:08 +0000830Member_2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlm82e33fb2005-02-25 08:35:54 +0000831 td->free_struct = asn_DEF_ENUMERATED.free_struct;
832 td->print_struct = asn_DEF_ENUMERATED.print_struct;
833 td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder;
834 td->der_encoder = asn_DEF_ENUMERATED.der_encoder;
835 td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder;
836 td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder;
837 td->elements = asn_DEF_ENUMERATED.elements;
838 td->elements_count = asn_DEF_ENUMERATED.elements_count;
vlm2f806082005-02-25 10:24:53 +0000839 /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */
vlm82e33fb2005-02-25 08:35:54 +0000840}
841
842static void
vlm44fe49a2005-03-04 11:26:08 +0000843Member_2_free(asn_TYPE_descriptor_t *td,
vlm82e33fb2005-02-25 08:35:54 +0000844 void *struct_ptr, int contents_only) {
vlm44fe49a2005-03-04 11:26:08 +0000845 Member_2_inherit_TYPE_descriptor(td);
vlm82e33fb2005-02-25 08:35:54 +0000846 td->free_struct(td, struct_ptr, contents_only);
847}
848
849static int
vlm44fe49a2005-03-04 11:26:08 +0000850Member_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
vlm82e33fb2005-02-25 08:35:54 +0000851 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm44fe49a2005-03-04 11:26:08 +0000852 Member_2_inherit_TYPE_descriptor(td);
vlm82e33fb2005-02-25 08:35:54 +0000853 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
854}
855
856static asn_dec_rval_t
vlm44fe49a2005-03-04 11:26:08 +0000857Member_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +0000858 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm44fe49a2005-03-04 11:26:08 +0000859 Member_2_inherit_TYPE_descriptor(td);
vlm82e33fb2005-02-25 08:35:54 +0000860 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
861}
862
863static asn_enc_rval_t
vlm44fe49a2005-03-04 11:26:08 +0000864Member_2_encode_der(asn_TYPE_descriptor_t *td,
vlm82e33fb2005-02-25 08:35:54 +0000865 void *structure, int tag_mode, ber_tlv_tag_t tag,
866 asn_app_consume_bytes_f *cb, void *app_key) {
vlm44fe49a2005-03-04 11:26:08 +0000867 Member_2_inherit_TYPE_descriptor(td);
vlm82e33fb2005-02-25 08:35:54 +0000868 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
869}
870
871static asn_dec_rval_t
vlm44fe49a2005-03-04 11:26:08 +0000872Member_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +0000873 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm44fe49a2005-03-04 11:26:08 +0000874 Member_2_inherit_TYPE_descriptor(td);
vlm82e33fb2005-02-25 08:35:54 +0000875 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
876}
877
878static asn_enc_rval_t
vlm44fe49a2005-03-04 11:26:08 +0000879Member_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
vlm82e33fb2005-02-25 08:35:54 +0000880 int ilevel, enum xer_encoder_flags_e flags,
881 asn_app_consume_bytes_f *cb, void *app_key) {
vlm44fe49a2005-03-04 11:26:08 +0000882 Member_2_inherit_TYPE_descriptor(td);
vlm82e33fb2005-02-25 08:35:54 +0000883 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
884}
885
886
vlm6d5cb6b2005-02-24 22:38:43 +0000887/*** <<< STAT-DEFS [SetOfEnums] >>> ***/
888
vlm44fe49a2005-03-04 11:26:08 +0000889static asn_INTEGER_enum_map_t asn_MAP_Member_2_value2enum[] = {
vlm56a1f3e2005-02-25 11:08:02 +0000890 { 0, 3, "one" },
891 { 1, 7, "oneMore" }
892};
vlm44fe49a2005-03-04 11:26:08 +0000893static unsigned int asn_MAP_Member_2_enum2value[] = {
vlm56a1f3e2005-02-25 11:08:02 +0000894 0, /* one(0) */
895 1 /* oneMore(1) */
vlm82e33fb2005-02-25 08:35:54 +0000896};
vlm44fe49a2005-03-04 11:26:08 +0000897static asn_INTEGER_specifics_t asn_SPC_Member_2_specs = {
898 asn_MAP_Member_2_value2enum, /* "tag" => N; sorted by tag */
899 asn_MAP_Member_2_enum2value, /* N => "tag"; sorted by N */
vlm82e33fb2005-02-25 08:35:54 +0000900 2, /* Number of elements in the maps */
vlmc018f362005-02-25 11:47:59 +0000901 0, /* Enumeration is not extensible */
902 1 /* Strict enumeration */
vlm82e33fb2005-02-25 08:35:54 +0000903};
vlm44fe49a2005-03-04 11:26:08 +0000904static ber_tlv_tag_t asn_DEF_Member_2_tags[] = {
vlm82e33fb2005-02-25 08:35:54 +0000905 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
906};
907static /* Use -fall-defs-global to expose */
vlm44fe49a2005-03-04 11:26:08 +0000908asn_TYPE_descriptor_t asn_DEF_Member_2 = {
vlm82e33fb2005-02-25 08:35:54 +0000909 "",
910 "",
vlm44fe49a2005-03-04 11:26:08 +0000911 Member_2_free,
912 Member_2_print,
913 Member_2_constraint,
914 Member_2_decode_ber,
915 Member_2_encode_der,
916 Member_2_decode_xer,
917 Member_2_encode_xer,
vlm82e33fb2005-02-25 08:35:54 +0000918 0, /* Use generic outmost tag fetcher */
vlm44fe49a2005-03-04 11:26:08 +0000919 asn_DEF_Member_2_tags,
920 sizeof(asn_DEF_Member_2_tags)
921 /sizeof(asn_DEF_Member_2_tags[0]), /* 1 */
922 asn_DEF_Member_2_tags, /* Same as above */
923 sizeof(asn_DEF_Member_2_tags)
924 /sizeof(asn_DEF_Member_2_tags[0]), /* 1 */
vlm82e33fb2005-02-25 08:35:54 +0000925 0, 0, /* Defined elsewhere */
vlm44fe49a2005-03-04 11:26:08 +0000926 &asn_SPC_Member_2_specs /* Additional specs */
vlm82e33fb2005-02-25 08:35:54 +0000927};
928
vlm44fe49a2005-03-04 11:26:08 +0000929static asn_TYPE_member_t asn_MBR_SetOfEnums_1[] = {
vlm6d5cb6b2005-02-24 22:38:43 +0000930 { ATF_NOFLAGS, 0, 0,
931 .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
932 .tag_mode = 0,
vlm44fe49a2005-03-04 11:26:08 +0000933 .type = (void *)&asn_DEF_Member_2,
vlm6d5cb6b2005-02-24 22:38:43 +0000934 .memb_constraints = 0, /* Defer constraints checking to the member type */
935 .name = ""
936 },
937};
vlm44fe49a2005-03-04 11:26:08 +0000938static ber_tlv_tag_t asn_DEF_SetOfEnums_1_tags[] = {
vlm6d5cb6b2005-02-24 22:38:43 +0000939 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
940};
vlm44fe49a2005-03-04 11:26:08 +0000941static asn_SET_OF_specifics_t asn_SPC_SetOfEnums_1_specs = {
vlm6d5cb6b2005-02-24 22:38:43 +0000942 sizeof(struct SetOfEnums),
943 offsetof(struct SetOfEnums, _asn_ctx),
vlm82e33fb2005-02-25 08:35:54 +0000944 1, /* XER encoding is XMLValueList */
vlm6d5cb6b2005-02-24 22:38:43 +0000945};
946asn_TYPE_descriptor_t asn_DEF_SetOfEnums = {
947 "SetOfEnums",
948 "SetOfEnums",
949 SET_OF_free,
950 SET_OF_print,
951 SET_OF_constraint,
952 SET_OF_decode_ber,
953 SET_OF_encode_der,
954 SET_OF_decode_xer,
955 SET_OF_encode_xer,
956 0, /* Use generic outmost tag fetcher */
vlm44fe49a2005-03-04 11:26:08 +0000957 asn_DEF_SetOfEnums_1_tags,
958 sizeof(asn_DEF_SetOfEnums_1_tags)
959 /sizeof(asn_DEF_SetOfEnums_1_tags[0]), /* 1 */
960 asn_DEF_SetOfEnums_1_tags, /* Same as above */
961 sizeof(asn_DEF_SetOfEnums_1_tags)
962 /sizeof(asn_DEF_SetOfEnums_1_tags[0]), /* 1 */
963 asn_MBR_SetOfEnums_1,
vlm6d5cb6b2005-02-24 22:38:43 +0000964 1, /* Single element */
vlm44fe49a2005-03-04 11:26:08 +0000965 &asn_SPC_SetOfEnums_1_specs /* Additional specs */
vlm6d5cb6b2005-02-24 22:38:43 +0000966};
967
968
vlm422e4ce2005-02-18 16:30:26 +0000969/*** <<< INCLUDES [SequenceOf] >>> ***/
vlm0d9046e2005-02-14 20:40:57 +0000970
971#include <INTEGER.h>
972#include <asn_SEQUENCE_OF.h>
973#include <constr_SEQUENCE_OF.h>
974
vlm422e4ce2005-02-18 16:30:26 +0000975/*** <<< TYPE-DECLS [SequenceOf] >>> ***/
vlm0d9046e2005-02-14 20:40:57 +0000976
vlm422e4ce2005-02-18 16:30:26 +0000977typedef struct SequenceOf {
vlm0d9046e2005-02-14 20:40:57 +0000978 A_SEQUENCE_OF(INTEGER_t) list;
979
980 /* Context for parsing across buffer boundaries */
981 asn_struct_ctx_t _asn_ctx;
vlm422e4ce2005-02-18 16:30:26 +0000982} SequenceOf_t;
vlm0d9046e2005-02-14 20:40:57 +0000983
vlm0b567bf2005-03-04 22:18:20 +0000984/*** <<< FUNC-DECLS [SequenceOf] >>> ***/
985
986extern asn_TYPE_descriptor_t asn_DEF_SequenceOf;
987
vlm422e4ce2005-02-18 16:30:26 +0000988/*** <<< STAT-DEFS [SequenceOf] >>> ***/
vlm0d9046e2005-02-14 20:40:57 +0000989
vlm44fe49a2005-03-04 11:26:08 +0000990static asn_TYPE_member_t asn_MBR_SequenceOf_1[] = {
vlm0d9046e2005-02-14 20:40:57 +0000991 { ATF_NOFLAGS, 0, 0,
992 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
993 .tag_mode = 0,
vlm44fe49a2005-03-04 11:26:08 +0000994 .type = (void *)&asn_DEF_INTEGER,
vlm0d9046e2005-02-14 20:40:57 +0000995 .memb_constraints = 0, /* Defer constraints checking to the member type */
996 .name = "id"
997 },
998};
vlm44fe49a2005-03-04 11:26:08 +0000999static ber_tlv_tag_t asn_DEF_SequenceOf_1_tags[] = {
vlm0d9046e2005-02-14 20:40:57 +00001000 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
1001};
vlm44fe49a2005-03-04 11:26:08 +00001002static asn_SET_OF_specifics_t asn_SPC_SequenceOf_1_specs = {
vlm422e4ce2005-02-18 16:30:26 +00001003 sizeof(struct SequenceOf),
1004 offsetof(struct SequenceOf, _asn_ctx),
vlm0d9046e2005-02-14 20:40:57 +00001005 0, /* XER encoding is XMLDelimitedItemList */
1006};
vlm422e4ce2005-02-18 16:30:26 +00001007asn_TYPE_descriptor_t asn_DEF_SequenceOf = {
1008 "SequenceOf",
1009 "SequenceOf",
vlm0d9046e2005-02-14 20:40:57 +00001010 SEQUENCE_OF_free,
1011 SEQUENCE_OF_print,
1012 SEQUENCE_OF_constraint,
1013 SEQUENCE_OF_decode_ber,
1014 SEQUENCE_OF_encode_der,
1015 SEQUENCE_OF_decode_xer,
1016 SEQUENCE_OF_encode_xer,
1017 0, /* Use generic outmost tag fetcher */
vlm44fe49a2005-03-04 11:26:08 +00001018 asn_DEF_SequenceOf_1_tags,
1019 sizeof(asn_DEF_SequenceOf_1_tags)
1020 /sizeof(asn_DEF_SequenceOf_1_tags[0]), /* 1 */
1021 asn_DEF_SequenceOf_1_tags, /* Same as above */
1022 sizeof(asn_DEF_SequenceOf_1_tags)
1023 /sizeof(asn_DEF_SequenceOf_1_tags[0]), /* 1 */
1024 asn_MBR_SequenceOf_1,
vlm0d9046e2005-02-14 20:40:57 +00001025 1, /* Single element */
vlm44fe49a2005-03-04 11:26:08 +00001026 &asn_SPC_SequenceOf_1_specs /* Additional specs */
vlm0d9046e2005-02-14 20:40:57 +00001027};
1028
vlm6d5cb6b2005-02-24 22:38:43 +00001029
1030/*** <<< INCLUDES [SeqOfZuka] >>> ***/
1031
1032#include <NULL.h>
1033#include <asn_SEQUENCE_OF.h>
1034#include <constr_SEQUENCE_OF.h>
1035
vlm6d5cb6b2005-02-24 22:38:43 +00001036/*** <<< TYPE-DECLS [SeqOfZuka] >>> ***/
1037
vlm6d5cb6b2005-02-24 22:38:43 +00001038typedef struct SeqOfZuka {
1039 A_SEQUENCE_OF(NULL_t) list;
1040
1041 /* Context for parsing across buffer boundaries */
1042 asn_struct_ctx_t _asn_ctx;
1043} SeqOfZuka_t;
1044
vlm0b567bf2005-03-04 22:18:20 +00001045/*** <<< FUNC-DECLS [SeqOfZuka] >>> ***/
1046
1047extern asn_TYPE_descriptor_t asn_DEF_SeqOfZuka;
1048
vlm6d5cb6b2005-02-24 22:38:43 +00001049/*** <<< STAT-DEFS [SeqOfZuka] >>> ***/
1050
vlm44fe49a2005-03-04 11:26:08 +00001051static asn_TYPE_member_t asn_MBR_SeqOfZuka_1[] = {
vlm6d5cb6b2005-02-24 22:38:43 +00001052 { ATF_NOFLAGS, 0, 0,
1053 .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)),
1054 .tag_mode = 0,
1055 .type = (void *)&asn_DEF_NULL,
1056 .memb_constraints = 0, /* Defer constraints checking to the member type */
1057 .name = "zuka"
1058 },
1059};
vlm44fe49a2005-03-04 11:26:08 +00001060static ber_tlv_tag_t asn_DEF_SeqOfZuka_1_tags[] = {
vlm6d5cb6b2005-02-24 22:38:43 +00001061 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
1062};
vlm44fe49a2005-03-04 11:26:08 +00001063static asn_SET_OF_specifics_t asn_SPC_SeqOfZuka_1_specs = {
vlm6d5cb6b2005-02-24 22:38:43 +00001064 sizeof(struct SeqOfZuka),
1065 offsetof(struct SeqOfZuka, _asn_ctx),
1066 1, /* XER encoding is XMLValueList */
1067};
1068asn_TYPE_descriptor_t asn_DEF_SeqOfZuka = {
1069 "SeqOfZuka",
1070 "SeqOfZuka",
1071 SEQUENCE_OF_free,
1072 SEQUENCE_OF_print,
1073 SEQUENCE_OF_constraint,
1074 SEQUENCE_OF_decode_ber,
1075 SEQUENCE_OF_encode_der,
1076 SEQUENCE_OF_decode_xer,
1077 SEQUENCE_OF_encode_xer,
1078 0, /* Use generic outmost tag fetcher */
vlm44fe49a2005-03-04 11:26:08 +00001079 asn_DEF_SeqOfZuka_1_tags,
1080 sizeof(asn_DEF_SeqOfZuka_1_tags)
1081 /sizeof(asn_DEF_SeqOfZuka_1_tags[0]), /* 1 */
1082 asn_DEF_SeqOfZuka_1_tags, /* Same as above */
1083 sizeof(asn_DEF_SeqOfZuka_1_tags)
1084 /sizeof(asn_DEF_SeqOfZuka_1_tags[0]), /* 1 */
1085 asn_MBR_SeqOfZuka_1,
vlm6d5cb6b2005-02-24 22:38:43 +00001086 1, /* Single element */
vlm44fe49a2005-03-04 11:26:08 +00001087 &asn_SPC_SeqOfZuka_1_specs /* Additional specs */
vlm6d5cb6b2005-02-24 22:38:43 +00001088};
1089