blob: 04ee81ad219b2ea5d1200cde8a543929f834145e [file] [log] [blame]
vlmfa67ddc2004-06-03 03:38:44 +00001
vlm6e1b13e2004-08-11 05:25:47 +00002/*** <<< INCLUDES [LogLine] >>> ***/
vlmfa67ddc2004-06-03 03:38:44 +00003
vlmfa67ddc2004-06-03 03:38:44 +00004#include <IA5String.h>
vlmfa67ddc2004-06-03 03:38:44 +00005#include <VariablePartSet.h>
6#include <asn_SEQUENCE_OF.h>
vlm6e1b13e2004-08-11 05:25:47 +00007#include <constr_SEQUENCE_OF.h>
vlmfa67ddc2004-06-03 03:38:44 +00008#include <constr_SEQUENCE.h>
9
vlm6e1b13e2004-08-11 05:25:47 +000010/*** <<< DEPS [LogLine] >>> ***/
11
vlmfa67ddc2004-06-03 03:38:44 +000012extern asn1_TYPE_descriptor_t asn1_DEF_LogLine;
13
14/*** <<< TYPE-DECLS [LogLine] >>> ***/
15
16
17typedef struct LogLine {
18 IA5String_t line_digest;
19 struct varsets {
20 A_SEQUENCE_OF(struct VariablePartSet) list;
21
22 /* Context for parsing across buffer boundaries */
23 ber_dec_ctx_t _ber_dec_ctx;
24 } varsets;
25 /*
26 * This type is extensible,
27 * possible extensions are below.
28 */
29
30 /* Context for parsing across buffer boundaries */
31 ber_dec_ctx_t _ber_dec_ctx;
32} LogLine_t;
33
vlm21e46002004-08-20 13:36:32 +000034/*** <<< CODE [LogLine] >>> ***/
35
36static int
vlm824aefc2004-08-22 03:19:00 +000037memb_varsets_1_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
vlm21e46002004-08-20 13:36:32 +000038 asn_app_consume_bytes_f *app_errlog, void *app_key) {
39 size_t size;
40
41 if(!sptr) {
42 _ASN_ERRLOG(app_errlog, app_key,
vlm758530a2004-08-22 13:47:59 +000043 "%s: value not given (%s:%d)",
44 td->name, __FILE__, __LINE__);
vlm21e46002004-08-20 13:36:32 +000045 return -1;
46 }
47
48 { /* Determine the number of elements */
49 const A_SEQUENCE_OF(void) *list;
50 (const void *)list = sptr;
51 size = list->count;
52 }
53
54 if((size >= 1)) {
55 /* Constraint check succeeded */
vlmcdf661b2004-08-22 12:47:03 +000056 return 0;
vlm21e46002004-08-20 13:36:32 +000057 } else {
58 _ASN_ERRLOG(app_errlog, app_key,
vlm758530a2004-08-22 13:47:59 +000059 "%s: constraint failed (%s:%d)",
60 td->name, __FILE__, __LINE__);
vlm21e46002004-08-20 13:36:32 +000061 return -1;
62 }
63}
64
65
vlmfa67ddc2004-06-03 03:38:44 +000066/*** <<< STAT-DEFS [LogLine] >>> ***/
67
vlm21e46002004-08-20 13:36:32 +000068static asn1_TYPE_member_t asn1_MBR_varsets[] = {
69 { 0, 0,
70 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
71 .tag_mode = 0,
72 .type = (void *)&asn1_DEF_VariablePartSet,
73 .memb_constraints = 0, /* Defer to actual type */
74 .name = ""
vlmfa67ddc2004-06-03 03:38:44 +000075 },
vlm21e46002004-08-20 13:36:32 +000076};
77static ber_tlv_tag_t asn1_DEF_varsets_tags[] = {
78 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
79};
80static asn1_SET_OF_specifics_t asn1_DEF_varsets_specs = {
81 sizeof(struct varsets),
82 offsetof(struct varsets, _ber_dec_ctx),
83};
vlm1dc848e2004-09-07 06:44:29 +000084static /* Use -fall-defs-global to expose */
vlm21e46002004-08-20 13:36:32 +000085asn1_TYPE_descriptor_t asn1_DEF_varsets = {
86 "varsets",
87 SEQUENCE_OF_constraint,
88 SEQUENCE_OF_decode_ber,
89 SEQUENCE_OF_encode_der,
90 SEQUENCE_OF_print,
91 SEQUENCE_OF_free,
92 0, /* Use generic outmost tag fetcher */
93 asn1_DEF_varsets_tags,
94 sizeof(asn1_DEF_varsets_tags)
95 /sizeof(asn1_DEF_varsets_tags[0]), /* 1 */
96 1, /* Tags to skip */
97 1, /* Whether CONSTRUCTED */
98 asn1_MBR_varsets,
99 1, /* Single element */
100 &asn1_DEF_varsets_specs /* Additional specs */
101};
102
103static asn1_TYPE_member_t asn1_MBR_LogLine[] = {
104 { 0, offsetof(struct LogLine, line_digest),
105 .tag = (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)),
106 .tag_mode = 0,
107 .type = (void *)&asn1_DEF_IA5String,
108 .memb_constraints = 0, /* Defer to actual type */
109 .name = "line-digest"
110 },
111 { 0, offsetof(struct LogLine, varsets),
112 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
113 .tag_mode = 0,
114 .type = (void *)&asn1_DEF_varsets,
vlm824aefc2004-08-22 03:19:00 +0000115 .memb_constraints = memb_varsets_1_constraint,
vlm21e46002004-08-20 13:36:32 +0000116 .name = "varsets"
vlmfa67ddc2004-06-03 03:38:44 +0000117 },
118};
119static ber_tlv_tag_t asn1_DEF_LogLine_tags[] = {
120 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
121};
vlm35efd1b2004-06-06 07:20:52 +0000122static asn1_TYPE_tag2member_t asn1_DEF_LogLine_tag2el[] = {
vlmc8aeab42004-06-14 13:09:45 +0000123 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* varsets at 25 */
124 { (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), 0, 0, 0 }, /* line-digest at 23 */
vlm35efd1b2004-06-06 07:20:52 +0000125};
vlmfa67ddc2004-06-03 03:38:44 +0000126static asn1_SEQUENCE_specifics_t asn1_DEF_LogLine_specs = {
127 sizeof(struct LogLine),
128 offsetof(struct LogLine, _ber_dec_ctx),
vlm35efd1b2004-06-06 07:20:52 +0000129 asn1_DEF_LogLine_tag2el,
130 2, /* Count of tags in the map */
vlmfa67ddc2004-06-03 03:38:44 +0000131 1, /* Start extensions */
132 3 /* Stop extensions */
133};
134asn1_TYPE_descriptor_t asn1_DEF_LogLine = {
135 "LogLine",
136 SEQUENCE_constraint,
137 SEQUENCE_decode_ber,
138 SEQUENCE_encode_der,
139 SEQUENCE_print,
140 SEQUENCE_free,
141 0, /* Use generic outmost tag fetcher */
142 asn1_DEF_LogLine_tags,
143 sizeof(asn1_DEF_LogLine_tags)
vlm6e73a042004-08-11 07:17:22 +0000144 /sizeof(asn1_DEF_LogLine_tags[0]), /* 1 */
vlm3df79662004-06-28 21:13:22 +0000145 1, /* Tags to skip */
vlmfa67ddc2004-06-03 03:38:44 +0000146 1, /* Whether CONSTRUCTED */
vlm21e46002004-08-20 13:36:32 +0000147 asn1_MBR_LogLine,
148 2, /* Elements count */
vlmfa67ddc2004-06-03 03:38:44 +0000149 &asn1_DEF_LogLine_specs /* Additional specs */
150};
151
152
vlm6e1b13e2004-08-11 05:25:47 +0000153/*** <<< INCLUDES [VariablePartSet] >>> ***/
vlmfa67ddc2004-06-03 03:38:44 +0000154
vlmfa67ddc2004-06-03 03:38:44 +0000155#include <ActionItem.h>
vlmfa67ddc2004-06-03 03:38:44 +0000156#include <VariablePart.h>
157#include <asn_SEQUENCE_OF.h>
vlm6e1b13e2004-08-11 05:25:47 +0000158#include <constr_SEQUENCE_OF.h>
vlmfa67ddc2004-06-03 03:38:44 +0000159#include <constr_SEQUENCE.h>
160
vlm6e1b13e2004-08-11 05:25:47 +0000161/*** <<< DEPS [VariablePartSet] >>> ***/
162
vlmfa67ddc2004-06-03 03:38:44 +0000163extern asn1_TYPE_descriptor_t asn1_DEF_VariablePartSet;
164
165/*** <<< TYPE-DECLS [VariablePartSet] >>> ***/
166
167
168typedef struct VariablePartSet {
169 struct vparts {
170 A_SEQUENCE_OF(struct VariablePart) list;
171
172 /* Context for parsing across buffer boundaries */
173 ber_dec_ctx_t _ber_dec_ctx;
174 } vparts;
175 ActionItem_t resolution;
176 /*
177 * This type is extensible,
178 * possible extensions are below.
179 */
180
181 /* Context for parsing across buffer boundaries */
182 ber_dec_ctx_t _ber_dec_ctx;
183} VariablePartSet_t;
184
vlm21e46002004-08-20 13:36:32 +0000185/*** <<< CODE [VariablePartSet] >>> ***/
186
187static int
vlm824aefc2004-08-22 03:19:00 +0000188memb_vparts_2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
vlm21e46002004-08-20 13:36:32 +0000189 asn_app_consume_bytes_f *app_errlog, void *app_key) {
190
191 if(!sptr) {
192 _ASN_ERRLOG(app_errlog, app_key,
vlm758530a2004-08-22 13:47:59 +0000193 "%s: value not given (%s:%d)",
194 td->name, __FILE__, __LINE__);
vlm21e46002004-08-20 13:36:32 +0000195 return -1;
196 }
197
198
199 if(1 /* No applicable constraints whatsoever */) {
200 /* Nothing is here. See below */
201 }
202
203 return td->check_constraints
204 (td, sptr, app_errlog, app_key);
205}
206
207
vlmfa67ddc2004-06-03 03:38:44 +0000208/*** <<< STAT-DEFS [VariablePartSet] >>> ***/
209
vlm21e46002004-08-20 13:36:32 +0000210static asn1_TYPE_member_t asn1_MBR_vparts[] = {
211 { 0, 0,
vlm60e05a42004-09-04 04:54:42 +0000212 .tag = -1 /* Ambiguous tag (CHOICE|ANY?) */,
vlm21e46002004-08-20 13:36:32 +0000213 .tag_mode = 0,
214 .type = (void *)&asn1_DEF_VariablePart,
215 .memb_constraints = 0, /* Defer to actual type */
216 .name = ""
vlmfa67ddc2004-06-03 03:38:44 +0000217 },
vlm21e46002004-08-20 13:36:32 +0000218};
219static ber_tlv_tag_t asn1_DEF_vparts_tags[] = {
220 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
221};
222static asn1_SET_OF_specifics_t asn1_DEF_vparts_specs = {
223 sizeof(struct vparts),
224 offsetof(struct vparts, _ber_dec_ctx),
225};
vlm1dc848e2004-09-07 06:44:29 +0000226static /* Use -fall-defs-global to expose */
vlm21e46002004-08-20 13:36:32 +0000227asn1_TYPE_descriptor_t asn1_DEF_vparts = {
228 "vparts",
229 SEQUENCE_OF_constraint,
230 SEQUENCE_OF_decode_ber,
231 SEQUENCE_OF_encode_der,
232 SEQUENCE_OF_print,
233 SEQUENCE_OF_free,
234 0, /* Use generic outmost tag fetcher */
235 asn1_DEF_vparts_tags,
236 sizeof(asn1_DEF_vparts_tags)
237 /sizeof(asn1_DEF_vparts_tags[0]), /* 1 */
238 1, /* Tags to skip */
239 1, /* Whether CONSTRUCTED */
240 asn1_MBR_vparts,
241 1, /* Single element */
242 &asn1_DEF_vparts_specs /* Additional specs */
243};
244
245static asn1_TYPE_member_t asn1_MBR_VariablePartSet[] = {
246 { 0, offsetof(struct VariablePartSet, vparts),
247 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
248 .tag_mode = 0,
249 .type = (void *)&asn1_DEF_vparts,
vlm824aefc2004-08-22 03:19:00 +0000250 .memb_constraints = memb_vparts_2_constraint,
vlm21e46002004-08-20 13:36:32 +0000251 .name = "vparts"
252 },
253 { 0, offsetof(struct VariablePartSet, resolution),
254 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
255 .tag_mode = 0,
256 .type = (void *)&asn1_DEF_ActionItem,
257 .memb_constraints = 0, /* Defer to actual type */
258 .name = "resolution"
vlmfa67ddc2004-06-03 03:38:44 +0000259 },
260};
261static ber_tlv_tag_t asn1_DEF_VariablePartSet_tags[] = {
262 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
263};
vlm35efd1b2004-06-06 07:20:52 +0000264static asn1_TYPE_tag2member_t asn1_DEF_VariablePartSet_tag2el[] = {
vlmc8aeab42004-06-14 13:09:45 +0000265 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* vparts at 33 */
266 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 }, /* resolution at 35 */
vlm35efd1b2004-06-06 07:20:52 +0000267};
vlmfa67ddc2004-06-03 03:38:44 +0000268static asn1_SEQUENCE_specifics_t asn1_DEF_VariablePartSet_specs = {
269 sizeof(struct VariablePartSet),
270 offsetof(struct VariablePartSet, _ber_dec_ctx),
vlm35efd1b2004-06-06 07:20:52 +0000271 asn1_DEF_VariablePartSet_tag2el,
272 2, /* Count of tags in the map */
vlmfa67ddc2004-06-03 03:38:44 +0000273 1, /* Start extensions */
274 3 /* Stop extensions */
275};
276asn1_TYPE_descriptor_t asn1_DEF_VariablePartSet = {
277 "VariablePartSet",
278 SEQUENCE_constraint,
279 SEQUENCE_decode_ber,
280 SEQUENCE_encode_der,
281 SEQUENCE_print,
282 SEQUENCE_free,
283 0, /* Use generic outmost tag fetcher */
284 asn1_DEF_VariablePartSet_tags,
285 sizeof(asn1_DEF_VariablePartSet_tags)
vlm6e73a042004-08-11 07:17:22 +0000286 /sizeof(asn1_DEF_VariablePartSet_tags[0]), /* 1 */
vlm3df79662004-06-28 21:13:22 +0000287 1, /* Tags to skip */
vlmfa67ddc2004-06-03 03:38:44 +0000288 1, /* Whether CONSTRUCTED */
vlm21e46002004-08-20 13:36:32 +0000289 asn1_MBR_VariablePartSet,
290 2, /* Elements count */
vlmfa67ddc2004-06-03 03:38:44 +0000291 &asn1_DEF_VariablePartSet_specs /* Additional specs */
292};
293
294
vlm6e1b13e2004-08-11 05:25:47 +0000295/*** <<< INCLUDES [VariablePart] >>> ***/
vlmfa67ddc2004-06-03 03:38:44 +0000296
vlmfa67ddc2004-06-03 03:38:44 +0000297#include <VisibleString.h>
298#include <asn_SET_OF.h>
vlm6e1b13e2004-08-11 05:25:47 +0000299#include <constr_SET_OF.h>
300#include <constr_SEQUENCE.h>
301#include <constr_CHOICE.h>
vlmfa67ddc2004-06-03 03:38:44 +0000302
vlm6e1b13e2004-08-11 05:25:47 +0000303/*** <<< DEPS [VariablePart] >>> ***/
vlmfa67ddc2004-06-03 03:38:44 +0000304
vlm6e1b13e2004-08-11 05:25:47 +0000305typedef enum VariablePart_PR {
306 VariablePart_PR_NOTHING, /* No components present */
307 VariablePart_PR_vset,
308 VariablePart_PR_vrange,
309 /* Extensions may appear below */
vlm6e73a042004-08-11 07:17:22 +0000310} VariablePart_PR;
vlmfa67ddc2004-06-03 03:38:44 +0000311extern asn1_TYPE_descriptor_t asn1_DEF_VariablePart;
312
313/*** <<< TYPE-DECLS [VariablePart] >>> ***/
314
315
316typedef struct VariablePart {
vlm6e73a042004-08-11 07:17:22 +0000317 VariablePart_PR present;
vlmfa67ddc2004-06-03 03:38:44 +0000318 union {
319 struct vset {
320 A_SET_OF(VisibleString_t) list;
321
322 /* Context for parsing across buffer boundaries */
323 ber_dec_ctx_t _ber_dec_ctx;
324 } vset;
325 struct vrange {
326 VisibleString_t from;
327 VisibleString_t to;
328 /*
329 * This type is extensible,
330 * possible extensions are below.
331 */
332
333 /* Context for parsing across buffer boundaries */
334 ber_dec_ctx_t _ber_dec_ctx;
335 } vrange;
336 /*
337 * This type is extensible,
338 * possible extensions are below.
339 */
340 } choice;
341
342 /* Context for parsing across buffer boundaries */
343 ber_dec_ctx_t _ber_dec_ctx;
344} VariablePart_t;
345
vlm21e46002004-08-20 13:36:32 +0000346/*** <<< CODE [VariablePart] >>> ***/
347
348static int
vlm824aefc2004-08-22 03:19:00 +0000349memb_vset_3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
vlm21e46002004-08-20 13:36:32 +0000350 asn_app_consume_bytes_f *app_errlog, void *app_key) {
351 size_t size;
352
353 if(!sptr) {
354 _ASN_ERRLOG(app_errlog, app_key,
vlm758530a2004-08-22 13:47:59 +0000355 "%s: value not given (%s:%d)",
356 td->name, __FILE__, __LINE__);
vlm21e46002004-08-20 13:36:32 +0000357 return -1;
358 }
359
360 { /* Determine the number of elements */
361 const A_SET_OF(void) *list;
362 (const void *)list = sptr;
363 size = list->count;
364 }
365
366 if((size >= 1)) {
367 /* Constraint check succeeded */
vlmcdf661b2004-08-22 12:47:03 +0000368 return 0;
vlm21e46002004-08-20 13:36:32 +0000369 } else {
370 _ASN_ERRLOG(app_errlog, app_key,
vlm758530a2004-08-22 13:47:59 +0000371 "%s: constraint failed (%s:%d)",
372 td->name, __FILE__, __LINE__);
vlm21e46002004-08-20 13:36:32 +0000373 return -1;
374 }
375}
376
377
vlmfa67ddc2004-06-03 03:38:44 +0000378/*** <<< STAT-DEFS [VariablePart] >>> ***/
379
vlm21e46002004-08-20 13:36:32 +0000380static asn1_TYPE_member_t asn1_MBR_vset[] = {
381 { 0, 0,
382 .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
383 .tag_mode = 0,
384 .type = (void *)&asn1_DEF_VisibleString,
385 .memb_constraints = 0, /* Defer to actual type */
386 .name = ""
vlmfa67ddc2004-06-03 03:38:44 +0000387 },
vlm21e46002004-08-20 13:36:32 +0000388};
389static ber_tlv_tag_t asn1_DEF_vset_tags[] = {
390 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
391};
392static asn1_SET_OF_specifics_t asn1_DEF_vset_specs = {
393 sizeof(struct vset),
394 offsetof(struct vset, _ber_dec_ctx),
395};
vlm1dc848e2004-09-07 06:44:29 +0000396static /* Use -fall-defs-global to expose */
vlm21e46002004-08-20 13:36:32 +0000397asn1_TYPE_descriptor_t asn1_DEF_vset = {
398 "vset",
399 SET_OF_constraint,
400 SET_OF_decode_ber,
401 SET_OF_encode_der,
402 SET_OF_print,
403 SET_OF_free,
404 0, /* Use generic outmost tag fetcher */
405 asn1_DEF_vset_tags,
406 sizeof(asn1_DEF_vset_tags)
407 /sizeof(asn1_DEF_vset_tags[0]), /* 1 */
408 1, /* Tags to skip */
409 1, /* Whether CONSTRUCTED */
410 asn1_MBR_vset,
411 1, /* Single element */
412 &asn1_DEF_vset_specs /* Additional specs */
413};
414
415static asn1_TYPE_member_t asn1_MBR_vrange[] = {
416 { 0, offsetof(struct vrange, from),
417 .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
418 .tag_mode = 0,
419 .type = (void *)&asn1_DEF_VisibleString,
420 .memb_constraints = 0, /* Defer to actual type */
421 .name = "from"
422 },
423 { 0, offsetof(struct vrange, to),
424 .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
425 .tag_mode = 0,
426 .type = (void *)&asn1_DEF_VisibleString,
427 .memb_constraints = 0, /* Defer to actual type */
428 .name = "to"
429 },
430};
431static ber_tlv_tag_t asn1_DEF_vrange_tags[] = {
432 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
433};
434static asn1_TYPE_tag2member_t asn1_DEF_vrange_tag2el[] = {
435 { (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 0, 0, 1 }, /* from at 45 */
436 { (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 1, -1, 0 }, /* to at 46 */
437};
438static asn1_SEQUENCE_specifics_t asn1_DEF_vrange_specs = {
439 sizeof(struct vrange),
440 offsetof(struct vrange, _ber_dec_ctx),
441 asn1_DEF_vrange_tag2el,
442 2, /* Count of tags in the map */
443 1, /* Start extensions */
444 3 /* Stop extensions */
445};
vlm1dc848e2004-09-07 06:44:29 +0000446static /* Use -fall-defs-global to expose */
vlm21e46002004-08-20 13:36:32 +0000447asn1_TYPE_descriptor_t asn1_DEF_vrange = {
448 "vrange",
449 SEQUENCE_constraint,
450 SEQUENCE_decode_ber,
451 SEQUENCE_encode_der,
452 SEQUENCE_print,
453 SEQUENCE_free,
454 0, /* Use generic outmost tag fetcher */
455 asn1_DEF_vrange_tags,
456 sizeof(asn1_DEF_vrange_tags)
457 /sizeof(asn1_DEF_vrange_tags[0]), /* 1 */
458 1, /* Tags to skip */
459 1, /* Whether CONSTRUCTED */
460 asn1_MBR_vrange,
461 2, /* Elements count */
462 &asn1_DEF_vrange_specs /* Additional specs */
463};
464
465static asn1_TYPE_member_t asn1_MBR_VariablePart[] = {
466 { 0, offsetof(struct VariablePart, choice.vset),
467 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
468 .tag_mode = 0,
469 .type = (void *)&asn1_DEF_vset,
vlm824aefc2004-08-22 03:19:00 +0000470 .memb_constraints = memb_vset_3_constraint,
vlm21e46002004-08-20 13:36:32 +0000471 .name = "vset"
472 },
473 { 0, offsetof(struct VariablePart, choice.vrange),
474 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
475 .tag_mode = 0,
476 .type = (void *)&asn1_DEF_vrange,
477 .memb_constraints = 0, /* Defer to actual type */
478 .name = "vrange"
vlmfa67ddc2004-06-03 03:38:44 +0000479 },
480};
vlm35efd1b2004-06-06 07:20:52 +0000481static asn1_TYPE_tag2member_t asn1_DEF_VariablePart_tag2el[] = {
vlmc8aeab42004-06-14 13:09:45 +0000482 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* vrange at 45 */
483 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 }, /* vset at 42 */
vlmfa67ddc2004-06-03 03:38:44 +0000484};
485static asn1_CHOICE_specifics_t asn1_DEF_VariablePart_specs = {
486 sizeof(struct VariablePart),
487 offsetof(struct VariablePart, _ber_dec_ctx),
488 offsetof(struct VariablePart, present),
489 sizeof(((struct VariablePart *)0)->present),
vlmfa67ddc2004-06-03 03:38:44 +0000490 asn1_DEF_VariablePart_tag2el,
491 2, /* Count of tags in the map */
vlm27ee5282004-07-01 00:49:55 +0000492 1 /* Whether extensible */
vlmfa67ddc2004-06-03 03:38:44 +0000493};
494asn1_TYPE_descriptor_t asn1_DEF_VariablePart = {
495 "VariablePart",
496 CHOICE_constraint,
497 CHOICE_decode_ber,
498 CHOICE_encode_der,
499 CHOICE_print,
500 CHOICE_free,
501 CHOICE_outmost_tag,
vlm6e73a042004-08-11 07:17:22 +0000502 0, /* No explicit tags (pointer) */
503 0, /* No explicit tags (count) */
vlmfa67ddc2004-06-03 03:38:44 +0000504 0, /* Tags to skip */
505 1, /* Whether CONSTRUCTED */
vlm21e46002004-08-20 13:36:32 +0000506 asn1_MBR_VariablePart,
507 2, /* Elements count */
vlmfa67ddc2004-06-03 03:38:44 +0000508 &asn1_DEF_VariablePart_specs /* Additional specs */
509};
510
511
vlm6e1b13e2004-08-11 05:25:47 +0000512/*** <<< INCLUDES [ActionItem] >>> ***/
vlmfa67ddc2004-06-03 03:38:44 +0000513
vlmfa67ddc2004-06-03 03:38:44 +0000514#include <ENUMERATED.h>
vlm6e1b13e2004-08-11 05:25:47 +0000515#include <BOOLEAN.h>
516#include <VisibleString.h>
517#include <asn_SET_OF.h>
518#include <constr_SET_OF.h>
519#include <constr_SEQUENCE.h>
520
521/*** <<< DEPS [ActionItem] >>> ***/
vlmfa67ddc2004-06-03 03:38:44 +0000522
vlm21e46002004-08-20 13:36:32 +0000523typedef enum accept_as {
524 accept_as_unknown = 0,
525 accept_as_safe = 1,
526 accept_as_unsafe = 2,
527 /*
528 * Enumeration is extensible
529 */
530} accept_as_e;
vlmfa67ddc2004-06-03 03:38:44 +0000531extern asn1_TYPE_descriptor_t asn1_DEF_ActionItem;
532
533/*** <<< TYPE-DECLS [ActionItem] >>> ***/
534
535
536typedef struct ActionItem {
537 ENUMERATED_t accept_as;
538 struct notify {
539 BOOLEAN_t critical;
540 struct email {
541 A_SET_OF(VisibleString_t) list;
542
543 /* Context for parsing across buffer boundaries */
544 ber_dec_ctx_t _ber_dec_ctx;
545 } email;
546 /*
547 * This type is extensible,
548 * possible extensions are below.
549 */
550
551 /* Context for parsing across buffer boundaries */
552 ber_dec_ctx_t _ber_dec_ctx;
553 } *notify;
554 /*
555 * This type is extensible,
556 * possible extensions are below.
557 */
558
559 /* Context for parsing across buffer boundaries */
560 ber_dec_ctx_t _ber_dec_ctx;
561} ActionItem_t;
562
563/*** <<< STAT-DEFS [ActionItem] >>> ***/
564
vlm21e46002004-08-20 13:36:32 +0000565static asn1_TYPE_member_t asn1_MBR_email[] = {
566 { 0, 0,
567 .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
568 .tag_mode = 0,
569 .type = (void *)&asn1_DEF_VisibleString,
570 .memb_constraints = 0, /* Defer to actual type */
571 .name = ""
vlmfa67ddc2004-06-03 03:38:44 +0000572 },
vlm21e46002004-08-20 13:36:32 +0000573};
574static ber_tlv_tag_t asn1_DEF_email_tags[] = {
575 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
576};
577static asn1_SET_OF_specifics_t asn1_DEF_email_specs = {
578 sizeof(struct email),
579 offsetof(struct email, _ber_dec_ctx),
580};
vlm1dc848e2004-09-07 06:44:29 +0000581static /* Use -fall-defs-global to expose */
vlm21e46002004-08-20 13:36:32 +0000582asn1_TYPE_descriptor_t asn1_DEF_email = {
583 "email",
584 SET_OF_constraint,
585 SET_OF_decode_ber,
586 SET_OF_encode_der,
587 SET_OF_print,
588 SET_OF_free,
589 0, /* Use generic outmost tag fetcher */
590 asn1_DEF_email_tags,
591 sizeof(asn1_DEF_email_tags)
592 /sizeof(asn1_DEF_email_tags[0]), /* 1 */
593 1, /* Tags to skip */
594 1, /* Whether CONSTRUCTED */
595 asn1_MBR_email,
596 1, /* Single element */
597 &asn1_DEF_email_specs /* Additional specs */
598};
599
600static asn1_TYPE_member_t asn1_MBR_notify[] = {
601 { 0, offsetof(struct notify, critical),
602 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
603 .tag_mode = 0,
604 .type = (void *)&asn1_DEF_BOOLEAN,
605 .memb_constraints = 0, /* Defer to actual type */
606 .name = "critical"
607 },
608 { 0, offsetof(struct notify, email),
609 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
610 .tag_mode = 0,
611 .type = (void *)&asn1_DEF_email,
612 .memb_constraints = 0, /* Defer to actual type */
613 .name = "email"
614 },
615};
616static ber_tlv_tag_t asn1_DEF_notify_tags[] = {
617 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
618};
619static asn1_TYPE_tag2member_t asn1_DEF_notify_tag2el[] = {
620 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* critical at 61 */
621 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 1, 0, 0 }, /* email at 62 */
622};
623static asn1_SEQUENCE_specifics_t asn1_DEF_notify_specs = {
624 sizeof(struct notify),
625 offsetof(struct notify, _ber_dec_ctx),
626 asn1_DEF_notify_tag2el,
627 2, /* Count of tags in the map */
628 1, /* Start extensions */
629 3 /* Stop extensions */
630};
vlm1dc848e2004-09-07 06:44:29 +0000631static /* Use -fall-defs-global to expose */
vlm21e46002004-08-20 13:36:32 +0000632asn1_TYPE_descriptor_t asn1_DEF_notify = {
633 "notify",
634 SEQUENCE_constraint,
635 SEQUENCE_decode_ber,
636 SEQUENCE_encode_der,
637 SEQUENCE_print,
638 SEQUENCE_free,
639 0, /* Use generic outmost tag fetcher */
640 asn1_DEF_notify_tags,
641 sizeof(asn1_DEF_notify_tags)
642 /sizeof(asn1_DEF_notify_tags[0]), /* 1 */
643 1, /* Tags to skip */
644 1, /* Whether CONSTRUCTED */
645 asn1_MBR_notify,
646 2, /* Elements count */
647 &asn1_DEF_notify_specs /* Additional specs */
648};
649
650static asn1_TYPE_member_t asn1_MBR_ActionItem[] = {
651 { 0, offsetof(struct ActionItem, accept_as),
652 .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
653 .tag_mode = 0,
654 .type = (void *)&asn1_DEF_ENUMERATED,
655 .memb_constraints = 0, /* Defer to actual type */
656 .name = "accept-as"
657 },
658 { 1, offsetof(struct ActionItem, notify),
659 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
660 .tag_mode = 0,
661 .type = (void *)&asn1_DEF_notify,
662 .memb_constraints = 0, /* Defer to actual type */
663 .name = "notify"
vlmfa67ddc2004-06-03 03:38:44 +0000664 },
665};
666static ber_tlv_tag_t asn1_DEF_ActionItem_tags[] = {
667 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
668};
vlm35efd1b2004-06-06 07:20:52 +0000669static asn1_TYPE_tag2member_t asn1_DEF_ActionItem_tag2el[] = {
vlmc8aeab42004-06-14 13:09:45 +0000670 { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 }, /* accept-as at 55 */
671 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* notify at 61 */
vlm35efd1b2004-06-06 07:20:52 +0000672};
vlmfa67ddc2004-06-03 03:38:44 +0000673static asn1_SEQUENCE_specifics_t asn1_DEF_ActionItem_specs = {
674 sizeof(struct ActionItem),
675 offsetof(struct ActionItem, _ber_dec_ctx),
vlm35efd1b2004-06-06 07:20:52 +0000676 asn1_DEF_ActionItem_tag2el,
677 2, /* Count of tags in the map */
vlmfa67ddc2004-06-03 03:38:44 +0000678 1, /* Start extensions */
679 3 /* Stop extensions */
680};
681asn1_TYPE_descriptor_t asn1_DEF_ActionItem = {
682 "ActionItem",
683 SEQUENCE_constraint,
684 SEQUENCE_decode_ber,
685 SEQUENCE_encode_der,
686 SEQUENCE_print,
687 SEQUENCE_free,
688 0, /* Use generic outmost tag fetcher */
689 asn1_DEF_ActionItem_tags,
690 sizeof(asn1_DEF_ActionItem_tags)
vlm6e73a042004-08-11 07:17:22 +0000691 /sizeof(asn1_DEF_ActionItem_tags[0]), /* 1 */
vlm3df79662004-06-28 21:13:22 +0000692 1, /* Tags to skip */
vlmfa67ddc2004-06-03 03:38:44 +0000693 1, /* Whether CONSTRUCTED */
vlm21e46002004-08-20 13:36:32 +0000694 asn1_MBR_ActionItem,
695 2, /* Elements count */
vlmfa67ddc2004-06-03 03:38:44 +0000696 &asn1_DEF_ActionItem_specs /* Additional specs */
697};
698