blob: aaa2e9f544f0da2ffbc287be8000c06e29acfaf8 [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,
43 "%s: value not given", td->name);
44 return -1;
45 }
46
47 { /* Determine the number of elements */
48 const A_SEQUENCE_OF(void) *list;
49 (const void *)list = sptr;
50 size = list->count;
51 }
52
53 if((size >= 1)) {
54 /* Constraint check succeeded */
55 return 1;
56 } else {
57 _ASN_ERRLOG(app_errlog, app_key,
58 "%s: constraint failed", td->name);
59 return -1;
60 }
61}
62
63
vlmfa67ddc2004-06-03 03:38:44 +000064/*** <<< STAT-DEFS [LogLine] >>> ***/
65
vlm21e46002004-08-20 13:36:32 +000066static asn1_TYPE_member_t asn1_MBR_varsets[] = {
67 { 0, 0,
68 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
69 .tag_mode = 0,
70 .type = (void *)&asn1_DEF_VariablePartSet,
71 .memb_constraints = 0, /* Defer to actual type */
72 .name = ""
vlmfa67ddc2004-06-03 03:38:44 +000073 },
vlm21e46002004-08-20 13:36:32 +000074};
75static ber_tlv_tag_t asn1_DEF_varsets_tags[] = {
76 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
77};
78static asn1_SET_OF_specifics_t asn1_DEF_varsets_specs = {
79 sizeof(struct varsets),
80 offsetof(struct varsets, _ber_dec_ctx),
81};
82asn1_TYPE_descriptor_t asn1_DEF_varsets = {
83 "varsets",
84 SEQUENCE_OF_constraint,
85 SEQUENCE_OF_decode_ber,
86 SEQUENCE_OF_encode_der,
87 SEQUENCE_OF_print,
88 SEQUENCE_OF_free,
89 0, /* Use generic outmost tag fetcher */
90 asn1_DEF_varsets_tags,
91 sizeof(asn1_DEF_varsets_tags)
92 /sizeof(asn1_DEF_varsets_tags[0]), /* 1 */
93 1, /* Tags to skip */
94 1, /* Whether CONSTRUCTED */
95 asn1_MBR_varsets,
96 1, /* Single element */
97 &asn1_DEF_varsets_specs /* Additional specs */
98};
99
100static asn1_TYPE_member_t asn1_MBR_LogLine[] = {
101 { 0, offsetof(struct LogLine, line_digest),
102 .tag = (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)),
103 .tag_mode = 0,
104 .type = (void *)&asn1_DEF_IA5String,
105 .memb_constraints = 0, /* Defer to actual type */
106 .name = "line-digest"
107 },
108 { 0, offsetof(struct LogLine, varsets),
109 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
110 .tag_mode = 0,
111 .type = (void *)&asn1_DEF_varsets,
vlm824aefc2004-08-22 03:19:00 +0000112 .memb_constraints = memb_varsets_1_constraint,
vlm21e46002004-08-20 13:36:32 +0000113 .name = "varsets"
vlmfa67ddc2004-06-03 03:38:44 +0000114 },
115};
116static ber_tlv_tag_t asn1_DEF_LogLine_tags[] = {
117 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
118};
vlm35efd1b2004-06-06 07:20:52 +0000119static asn1_TYPE_tag2member_t asn1_DEF_LogLine_tag2el[] = {
vlmc8aeab42004-06-14 13:09:45 +0000120 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* varsets at 25 */
121 { (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), 0, 0, 0 }, /* line-digest at 23 */
vlm35efd1b2004-06-06 07:20:52 +0000122};
vlmfa67ddc2004-06-03 03:38:44 +0000123static asn1_SEQUENCE_specifics_t asn1_DEF_LogLine_specs = {
124 sizeof(struct LogLine),
125 offsetof(struct LogLine, _ber_dec_ctx),
vlm35efd1b2004-06-06 07:20:52 +0000126 asn1_DEF_LogLine_tag2el,
127 2, /* Count of tags in the map */
vlmfa67ddc2004-06-03 03:38:44 +0000128 1, /* Start extensions */
129 3 /* Stop extensions */
130};
131asn1_TYPE_descriptor_t asn1_DEF_LogLine = {
132 "LogLine",
133 SEQUENCE_constraint,
134 SEQUENCE_decode_ber,
135 SEQUENCE_encode_der,
136 SEQUENCE_print,
137 SEQUENCE_free,
138 0, /* Use generic outmost tag fetcher */
139 asn1_DEF_LogLine_tags,
140 sizeof(asn1_DEF_LogLine_tags)
vlm6e73a042004-08-11 07:17:22 +0000141 /sizeof(asn1_DEF_LogLine_tags[0]), /* 1 */
vlm3df79662004-06-28 21:13:22 +0000142 1, /* Tags to skip */
vlmfa67ddc2004-06-03 03:38:44 +0000143 1, /* Whether CONSTRUCTED */
vlm21e46002004-08-20 13:36:32 +0000144 asn1_MBR_LogLine,
145 2, /* Elements count */
vlmfa67ddc2004-06-03 03:38:44 +0000146 &asn1_DEF_LogLine_specs /* Additional specs */
147};
148
149
vlm6e1b13e2004-08-11 05:25:47 +0000150/*** <<< INCLUDES [VariablePartSet] >>> ***/
vlmfa67ddc2004-06-03 03:38:44 +0000151
vlmfa67ddc2004-06-03 03:38:44 +0000152#include <ActionItem.h>
vlmfa67ddc2004-06-03 03:38:44 +0000153#include <VariablePart.h>
154#include <asn_SEQUENCE_OF.h>
vlm6e1b13e2004-08-11 05:25:47 +0000155#include <constr_SEQUENCE_OF.h>
vlmfa67ddc2004-06-03 03:38:44 +0000156#include <constr_SEQUENCE.h>
157
vlm6e1b13e2004-08-11 05:25:47 +0000158/*** <<< DEPS [VariablePartSet] >>> ***/
159
vlmfa67ddc2004-06-03 03:38:44 +0000160extern asn1_TYPE_descriptor_t asn1_DEF_VariablePartSet;
161
162/*** <<< TYPE-DECLS [VariablePartSet] >>> ***/
163
164
165typedef struct VariablePartSet {
166 struct vparts {
167 A_SEQUENCE_OF(struct VariablePart) list;
168
169 /* Context for parsing across buffer boundaries */
170 ber_dec_ctx_t _ber_dec_ctx;
171 } vparts;
172 ActionItem_t resolution;
173 /*
174 * This type is extensible,
175 * possible extensions are below.
176 */
177
178 /* Context for parsing across buffer boundaries */
179 ber_dec_ctx_t _ber_dec_ctx;
180} VariablePartSet_t;
181
vlm21e46002004-08-20 13:36:32 +0000182/*** <<< CODE [VariablePartSet] >>> ***/
183
184static int
vlm824aefc2004-08-22 03:19:00 +0000185memb_vparts_2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
vlm21e46002004-08-20 13:36:32 +0000186 asn_app_consume_bytes_f *app_errlog, void *app_key) {
187
188 if(!sptr) {
189 _ASN_ERRLOG(app_errlog, app_key,
190 "%s: value not given", td->name);
191 return -1;
192 }
193
194
195 if(1 /* No applicable constraints whatsoever */) {
196 /* Nothing is here. See below */
197 }
198
199 return td->check_constraints
200 (td, sptr, app_errlog, app_key);
201}
202
203
vlmfa67ddc2004-06-03 03:38:44 +0000204/*** <<< STAT-DEFS [VariablePartSet] >>> ***/
205
vlm21e46002004-08-20 13:36:32 +0000206static asn1_TYPE_member_t asn1_MBR_vparts[] = {
207 { 0, 0,
208 .tag = -1 /* Ambiguous tag (CHOICE?) */,
209 .tag_mode = 0,
210 .type = (void *)&asn1_DEF_VariablePart,
211 .memb_constraints = 0, /* Defer to actual type */
212 .name = ""
vlmfa67ddc2004-06-03 03:38:44 +0000213 },
vlm21e46002004-08-20 13:36:32 +0000214};
215static ber_tlv_tag_t asn1_DEF_vparts_tags[] = {
216 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
217};
218static asn1_SET_OF_specifics_t asn1_DEF_vparts_specs = {
219 sizeof(struct vparts),
220 offsetof(struct vparts, _ber_dec_ctx),
221};
222asn1_TYPE_descriptor_t asn1_DEF_vparts = {
223 "vparts",
224 SEQUENCE_OF_constraint,
225 SEQUENCE_OF_decode_ber,
226 SEQUENCE_OF_encode_der,
227 SEQUENCE_OF_print,
228 SEQUENCE_OF_free,
229 0, /* Use generic outmost tag fetcher */
230 asn1_DEF_vparts_tags,
231 sizeof(asn1_DEF_vparts_tags)
232 /sizeof(asn1_DEF_vparts_tags[0]), /* 1 */
233 1, /* Tags to skip */
234 1, /* Whether CONSTRUCTED */
235 asn1_MBR_vparts,
236 1, /* Single element */
237 &asn1_DEF_vparts_specs /* Additional specs */
238};
239
240static asn1_TYPE_member_t asn1_MBR_VariablePartSet[] = {
241 { 0, offsetof(struct VariablePartSet, vparts),
242 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
243 .tag_mode = 0,
244 .type = (void *)&asn1_DEF_vparts,
vlm824aefc2004-08-22 03:19:00 +0000245 .memb_constraints = memb_vparts_2_constraint,
vlm21e46002004-08-20 13:36:32 +0000246 .name = "vparts"
247 },
248 { 0, offsetof(struct VariablePartSet, resolution),
249 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
250 .tag_mode = 0,
251 .type = (void *)&asn1_DEF_ActionItem,
252 .memb_constraints = 0, /* Defer to actual type */
253 .name = "resolution"
vlmfa67ddc2004-06-03 03:38:44 +0000254 },
255};
256static ber_tlv_tag_t asn1_DEF_VariablePartSet_tags[] = {
257 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
258};
vlm35efd1b2004-06-06 07:20:52 +0000259static asn1_TYPE_tag2member_t asn1_DEF_VariablePartSet_tag2el[] = {
vlmc8aeab42004-06-14 13:09:45 +0000260 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* vparts at 33 */
261 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 }, /* resolution at 35 */
vlm35efd1b2004-06-06 07:20:52 +0000262};
vlmfa67ddc2004-06-03 03:38:44 +0000263static asn1_SEQUENCE_specifics_t asn1_DEF_VariablePartSet_specs = {
264 sizeof(struct VariablePartSet),
265 offsetof(struct VariablePartSet, _ber_dec_ctx),
vlm35efd1b2004-06-06 07:20:52 +0000266 asn1_DEF_VariablePartSet_tag2el,
267 2, /* Count of tags in the map */
vlmfa67ddc2004-06-03 03:38:44 +0000268 1, /* Start extensions */
269 3 /* Stop extensions */
270};
271asn1_TYPE_descriptor_t asn1_DEF_VariablePartSet = {
272 "VariablePartSet",
273 SEQUENCE_constraint,
274 SEQUENCE_decode_ber,
275 SEQUENCE_encode_der,
276 SEQUENCE_print,
277 SEQUENCE_free,
278 0, /* Use generic outmost tag fetcher */
279 asn1_DEF_VariablePartSet_tags,
280 sizeof(asn1_DEF_VariablePartSet_tags)
vlm6e73a042004-08-11 07:17:22 +0000281 /sizeof(asn1_DEF_VariablePartSet_tags[0]), /* 1 */
vlm3df79662004-06-28 21:13:22 +0000282 1, /* Tags to skip */
vlmfa67ddc2004-06-03 03:38:44 +0000283 1, /* Whether CONSTRUCTED */
vlm21e46002004-08-20 13:36:32 +0000284 asn1_MBR_VariablePartSet,
285 2, /* Elements count */
vlmfa67ddc2004-06-03 03:38:44 +0000286 &asn1_DEF_VariablePartSet_specs /* Additional specs */
287};
288
289
vlm6e1b13e2004-08-11 05:25:47 +0000290/*** <<< INCLUDES [VariablePart] >>> ***/
vlmfa67ddc2004-06-03 03:38:44 +0000291
vlmfa67ddc2004-06-03 03:38:44 +0000292#include <VisibleString.h>
293#include <asn_SET_OF.h>
vlm6e1b13e2004-08-11 05:25:47 +0000294#include <constr_SET_OF.h>
295#include <constr_SEQUENCE.h>
296#include <constr_CHOICE.h>
vlmfa67ddc2004-06-03 03:38:44 +0000297
vlm6e1b13e2004-08-11 05:25:47 +0000298/*** <<< DEPS [VariablePart] >>> ***/
vlmfa67ddc2004-06-03 03:38:44 +0000299
vlm6e1b13e2004-08-11 05:25:47 +0000300typedef enum VariablePart_PR {
301 VariablePart_PR_NOTHING, /* No components present */
302 VariablePart_PR_vset,
303 VariablePart_PR_vrange,
304 /* Extensions may appear below */
vlm6e73a042004-08-11 07:17:22 +0000305} VariablePart_PR;
vlmfa67ddc2004-06-03 03:38:44 +0000306extern asn1_TYPE_descriptor_t asn1_DEF_VariablePart;
307
308/*** <<< TYPE-DECLS [VariablePart] >>> ***/
309
310
311typedef struct VariablePart {
vlm6e73a042004-08-11 07:17:22 +0000312 VariablePart_PR present;
vlmfa67ddc2004-06-03 03:38:44 +0000313 union {
314 struct vset {
315 A_SET_OF(VisibleString_t) list;
316
317 /* Context for parsing across buffer boundaries */
318 ber_dec_ctx_t _ber_dec_ctx;
319 } vset;
320 struct vrange {
321 VisibleString_t from;
322 VisibleString_t to;
323 /*
324 * This type is extensible,
325 * possible extensions are below.
326 */
327
328 /* Context for parsing across buffer boundaries */
329 ber_dec_ctx_t _ber_dec_ctx;
330 } vrange;
331 /*
332 * This type is extensible,
333 * possible extensions are below.
334 */
335 } choice;
336
337 /* Context for parsing across buffer boundaries */
338 ber_dec_ctx_t _ber_dec_ctx;
339} VariablePart_t;
340
vlm21e46002004-08-20 13:36:32 +0000341/*** <<< CODE [VariablePart] >>> ***/
342
343static int
vlm824aefc2004-08-22 03:19:00 +0000344memb_vset_3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
vlm21e46002004-08-20 13:36:32 +0000345 asn_app_consume_bytes_f *app_errlog, void *app_key) {
346 size_t size;
347
348 if(!sptr) {
349 _ASN_ERRLOG(app_errlog, app_key,
350 "%s: value not given", td->name);
351 return -1;
352 }
353
354 { /* Determine the number of elements */
355 const A_SET_OF(void) *list;
356 (const void *)list = sptr;
357 size = list->count;
358 }
359
360 if((size >= 1)) {
361 /* Constraint check succeeded */
362 return 1;
363 } else {
364 _ASN_ERRLOG(app_errlog, app_key,
365 "%s: constraint failed", td->name);
366 return -1;
367 }
368}
369
370
vlmfa67ddc2004-06-03 03:38:44 +0000371/*** <<< STAT-DEFS [VariablePart] >>> ***/
372
vlm21e46002004-08-20 13:36:32 +0000373static asn1_TYPE_member_t asn1_MBR_vset[] = {
374 { 0, 0,
375 .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
376 .tag_mode = 0,
377 .type = (void *)&asn1_DEF_VisibleString,
378 .memb_constraints = 0, /* Defer to actual type */
379 .name = ""
vlmfa67ddc2004-06-03 03:38:44 +0000380 },
vlm21e46002004-08-20 13:36:32 +0000381};
382static ber_tlv_tag_t asn1_DEF_vset_tags[] = {
383 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
384};
385static asn1_SET_OF_specifics_t asn1_DEF_vset_specs = {
386 sizeof(struct vset),
387 offsetof(struct vset, _ber_dec_ctx),
388};
389asn1_TYPE_descriptor_t asn1_DEF_vset = {
390 "vset",
391 SET_OF_constraint,
392 SET_OF_decode_ber,
393 SET_OF_encode_der,
394 SET_OF_print,
395 SET_OF_free,
396 0, /* Use generic outmost tag fetcher */
397 asn1_DEF_vset_tags,
398 sizeof(asn1_DEF_vset_tags)
399 /sizeof(asn1_DEF_vset_tags[0]), /* 1 */
400 1, /* Tags to skip */
401 1, /* Whether CONSTRUCTED */
402 asn1_MBR_vset,
403 1, /* Single element */
404 &asn1_DEF_vset_specs /* Additional specs */
405};
406
407static asn1_TYPE_member_t asn1_MBR_vrange[] = {
408 { 0, offsetof(struct vrange, from),
409 .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
410 .tag_mode = 0,
411 .type = (void *)&asn1_DEF_VisibleString,
412 .memb_constraints = 0, /* Defer to actual type */
413 .name = "from"
414 },
415 { 0, offsetof(struct vrange, to),
416 .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
417 .tag_mode = 0,
418 .type = (void *)&asn1_DEF_VisibleString,
419 .memb_constraints = 0, /* Defer to actual type */
420 .name = "to"
421 },
422};
423static ber_tlv_tag_t asn1_DEF_vrange_tags[] = {
424 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
425};
426static asn1_TYPE_tag2member_t asn1_DEF_vrange_tag2el[] = {
427 { (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 0, 0, 1 }, /* from at 45 */
428 { (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 1, -1, 0 }, /* to at 46 */
429};
430static asn1_SEQUENCE_specifics_t asn1_DEF_vrange_specs = {
431 sizeof(struct vrange),
432 offsetof(struct vrange, _ber_dec_ctx),
433 asn1_DEF_vrange_tag2el,
434 2, /* Count of tags in the map */
435 1, /* Start extensions */
436 3 /* Stop extensions */
437};
438asn1_TYPE_descriptor_t asn1_DEF_vrange = {
439 "vrange",
440 SEQUENCE_constraint,
441 SEQUENCE_decode_ber,
442 SEQUENCE_encode_der,
443 SEQUENCE_print,
444 SEQUENCE_free,
445 0, /* Use generic outmost tag fetcher */
446 asn1_DEF_vrange_tags,
447 sizeof(asn1_DEF_vrange_tags)
448 /sizeof(asn1_DEF_vrange_tags[0]), /* 1 */
449 1, /* Tags to skip */
450 1, /* Whether CONSTRUCTED */
451 asn1_MBR_vrange,
452 2, /* Elements count */
453 &asn1_DEF_vrange_specs /* Additional specs */
454};
455
456static asn1_TYPE_member_t asn1_MBR_VariablePart[] = {
457 { 0, offsetof(struct VariablePart, choice.vset),
458 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
459 .tag_mode = 0,
460 .type = (void *)&asn1_DEF_vset,
vlm824aefc2004-08-22 03:19:00 +0000461 .memb_constraints = memb_vset_3_constraint,
vlm21e46002004-08-20 13:36:32 +0000462 .name = "vset"
463 },
464 { 0, offsetof(struct VariablePart, choice.vrange),
465 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
466 .tag_mode = 0,
467 .type = (void *)&asn1_DEF_vrange,
468 .memb_constraints = 0, /* Defer to actual type */
469 .name = "vrange"
vlmfa67ddc2004-06-03 03:38:44 +0000470 },
471};
vlm35efd1b2004-06-06 07:20:52 +0000472static asn1_TYPE_tag2member_t asn1_DEF_VariablePart_tag2el[] = {
vlmc8aeab42004-06-14 13:09:45 +0000473 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* vrange at 45 */
474 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 }, /* vset at 42 */
vlmfa67ddc2004-06-03 03:38:44 +0000475};
476static asn1_CHOICE_specifics_t asn1_DEF_VariablePart_specs = {
477 sizeof(struct VariablePart),
478 offsetof(struct VariablePart, _ber_dec_ctx),
479 offsetof(struct VariablePart, present),
480 sizeof(((struct VariablePart *)0)->present),
vlmfa67ddc2004-06-03 03:38:44 +0000481 asn1_DEF_VariablePart_tag2el,
482 2, /* Count of tags in the map */
vlm27ee5282004-07-01 00:49:55 +0000483 1 /* Whether extensible */
vlmfa67ddc2004-06-03 03:38:44 +0000484};
485asn1_TYPE_descriptor_t asn1_DEF_VariablePart = {
486 "VariablePart",
487 CHOICE_constraint,
488 CHOICE_decode_ber,
489 CHOICE_encode_der,
490 CHOICE_print,
491 CHOICE_free,
492 CHOICE_outmost_tag,
vlm6e73a042004-08-11 07:17:22 +0000493 0, /* No explicit tags (pointer) */
494 0, /* No explicit tags (count) */
vlmfa67ddc2004-06-03 03:38:44 +0000495 0, /* Tags to skip */
496 1, /* Whether CONSTRUCTED */
vlm21e46002004-08-20 13:36:32 +0000497 asn1_MBR_VariablePart,
498 2, /* Elements count */
vlmfa67ddc2004-06-03 03:38:44 +0000499 &asn1_DEF_VariablePart_specs /* Additional specs */
500};
501
502
vlm6e1b13e2004-08-11 05:25:47 +0000503/*** <<< INCLUDES [ActionItem] >>> ***/
vlmfa67ddc2004-06-03 03:38:44 +0000504
vlmfa67ddc2004-06-03 03:38:44 +0000505#include <ENUMERATED.h>
vlm6e1b13e2004-08-11 05:25:47 +0000506#include <BOOLEAN.h>
507#include <VisibleString.h>
508#include <asn_SET_OF.h>
509#include <constr_SET_OF.h>
510#include <constr_SEQUENCE.h>
511
512/*** <<< DEPS [ActionItem] >>> ***/
vlmfa67ddc2004-06-03 03:38:44 +0000513
vlm21e46002004-08-20 13:36:32 +0000514typedef enum accept_as {
515 accept_as_unknown = 0,
516 accept_as_safe = 1,
517 accept_as_unsafe = 2,
518 /*
519 * Enumeration is extensible
520 */
521} accept_as_e;
vlmfa67ddc2004-06-03 03:38:44 +0000522extern asn1_TYPE_descriptor_t asn1_DEF_ActionItem;
523
524/*** <<< TYPE-DECLS [ActionItem] >>> ***/
525
526
527typedef struct ActionItem {
528 ENUMERATED_t accept_as;
529 struct notify {
530 BOOLEAN_t critical;
531 struct email {
532 A_SET_OF(VisibleString_t) list;
533
534 /* Context for parsing across buffer boundaries */
535 ber_dec_ctx_t _ber_dec_ctx;
536 } email;
537 /*
538 * This type is extensible,
539 * possible extensions are below.
540 */
541
542 /* Context for parsing across buffer boundaries */
543 ber_dec_ctx_t _ber_dec_ctx;
544 } *notify;
545 /*
546 * This type is extensible,
547 * possible extensions are below.
548 */
549
550 /* Context for parsing across buffer boundaries */
551 ber_dec_ctx_t _ber_dec_ctx;
552} ActionItem_t;
553
554/*** <<< STAT-DEFS [ActionItem] >>> ***/
555
vlm21e46002004-08-20 13:36:32 +0000556static asn1_TYPE_member_t asn1_MBR_email[] = {
557 { 0, 0,
558 .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
559 .tag_mode = 0,
560 .type = (void *)&asn1_DEF_VisibleString,
561 .memb_constraints = 0, /* Defer to actual type */
562 .name = ""
vlmfa67ddc2004-06-03 03:38:44 +0000563 },
vlm21e46002004-08-20 13:36:32 +0000564};
565static ber_tlv_tag_t asn1_DEF_email_tags[] = {
566 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
567};
568static asn1_SET_OF_specifics_t asn1_DEF_email_specs = {
569 sizeof(struct email),
570 offsetof(struct email, _ber_dec_ctx),
571};
572asn1_TYPE_descriptor_t asn1_DEF_email = {
573 "email",
574 SET_OF_constraint,
575 SET_OF_decode_ber,
576 SET_OF_encode_der,
577 SET_OF_print,
578 SET_OF_free,
579 0, /* Use generic outmost tag fetcher */
580 asn1_DEF_email_tags,
581 sizeof(asn1_DEF_email_tags)
582 /sizeof(asn1_DEF_email_tags[0]), /* 1 */
583 1, /* Tags to skip */
584 1, /* Whether CONSTRUCTED */
585 asn1_MBR_email,
586 1, /* Single element */
587 &asn1_DEF_email_specs /* Additional specs */
588};
589
590static asn1_TYPE_member_t asn1_MBR_notify[] = {
591 { 0, offsetof(struct notify, critical),
592 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
593 .tag_mode = 0,
594 .type = (void *)&asn1_DEF_BOOLEAN,
595 .memb_constraints = 0, /* Defer to actual type */
596 .name = "critical"
597 },
598 { 0, offsetof(struct notify, email),
599 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
600 .tag_mode = 0,
601 .type = (void *)&asn1_DEF_email,
602 .memb_constraints = 0, /* Defer to actual type */
603 .name = "email"
604 },
605};
606static ber_tlv_tag_t asn1_DEF_notify_tags[] = {
607 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
608};
609static asn1_TYPE_tag2member_t asn1_DEF_notify_tag2el[] = {
610 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* critical at 61 */
611 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 1, 0, 0 }, /* email at 62 */
612};
613static asn1_SEQUENCE_specifics_t asn1_DEF_notify_specs = {
614 sizeof(struct notify),
615 offsetof(struct notify, _ber_dec_ctx),
616 asn1_DEF_notify_tag2el,
617 2, /* Count of tags in the map */
618 1, /* Start extensions */
619 3 /* Stop extensions */
620};
621asn1_TYPE_descriptor_t asn1_DEF_notify = {
622 "notify",
623 SEQUENCE_constraint,
624 SEQUENCE_decode_ber,
625 SEQUENCE_encode_der,
626 SEQUENCE_print,
627 SEQUENCE_free,
628 0, /* Use generic outmost tag fetcher */
629 asn1_DEF_notify_tags,
630 sizeof(asn1_DEF_notify_tags)
631 /sizeof(asn1_DEF_notify_tags[0]), /* 1 */
632 1, /* Tags to skip */
633 1, /* Whether CONSTRUCTED */
634 asn1_MBR_notify,
635 2, /* Elements count */
636 &asn1_DEF_notify_specs /* Additional specs */
637};
638
639static asn1_TYPE_member_t asn1_MBR_ActionItem[] = {
640 { 0, offsetof(struct ActionItem, accept_as),
641 .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
642 .tag_mode = 0,
643 .type = (void *)&asn1_DEF_ENUMERATED,
644 .memb_constraints = 0, /* Defer to actual type */
645 .name = "accept-as"
646 },
647 { 1, offsetof(struct ActionItem, notify),
648 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
649 .tag_mode = 0,
650 .type = (void *)&asn1_DEF_notify,
651 .memb_constraints = 0, /* Defer to actual type */
652 .name = "notify"
vlmfa67ddc2004-06-03 03:38:44 +0000653 },
654};
655static ber_tlv_tag_t asn1_DEF_ActionItem_tags[] = {
656 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
657};
vlm35efd1b2004-06-06 07:20:52 +0000658static asn1_TYPE_tag2member_t asn1_DEF_ActionItem_tag2el[] = {
vlmc8aeab42004-06-14 13:09:45 +0000659 { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 }, /* accept-as at 55 */
660 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* notify at 61 */
vlm35efd1b2004-06-06 07:20:52 +0000661};
vlmfa67ddc2004-06-03 03:38:44 +0000662static asn1_SEQUENCE_specifics_t asn1_DEF_ActionItem_specs = {
663 sizeof(struct ActionItem),
664 offsetof(struct ActionItem, _ber_dec_ctx),
vlm35efd1b2004-06-06 07:20:52 +0000665 asn1_DEF_ActionItem_tag2el,
666 2, /* Count of tags in the map */
vlmfa67ddc2004-06-03 03:38:44 +0000667 1, /* Start extensions */
668 3 /* Stop extensions */
669};
670asn1_TYPE_descriptor_t asn1_DEF_ActionItem = {
671 "ActionItem",
672 SEQUENCE_constraint,
673 SEQUENCE_decode_ber,
674 SEQUENCE_encode_der,
675 SEQUENCE_print,
676 SEQUENCE_free,
677 0, /* Use generic outmost tag fetcher */
678 asn1_DEF_ActionItem_tags,
679 sizeof(asn1_DEF_ActionItem_tags)
vlm6e73a042004-08-11 07:17:22 +0000680 /sizeof(asn1_DEF_ActionItem_tags[0]), /* 1 */
vlm3df79662004-06-28 21:13:22 +0000681 1, /* Tags to skip */
vlmfa67ddc2004-06-03 03:38:44 +0000682 1, /* Whether CONSTRUCTED */
vlm21e46002004-08-20 13:36:32 +0000683 asn1_MBR_ActionItem,
684 2, /* Elements count */
vlmfa67ddc2004-06-03 03:38:44 +0000685 &asn1_DEF_ActionItem_specs /* Additional specs */
686};
687