blob: 72044d3f585a9b683f4043ecda57e70a4d176ee9 [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 {
vlmb47f48e2004-09-17 06:32:12 +000020 A_SEQUENCE_OF(VariablePartSet_t) list;
vlmfa67ddc2004-06-03 03:38:44 +000021
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[] = {
vlmddd5a7d2004-09-10 09:18:20 +000069 { ATF_NOFLAGS, 0, 0,
vlm21e46002004-08-20 13:36:32 +000070 .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 */
vlm72425de2004-09-13 08:31:01 +000096 asn1_DEF_varsets_tags, /* Same as above */
97 sizeof(asn1_DEF_varsets_tags)
98 /sizeof(asn1_DEF_varsets_tags[0]), /* 1 */
vlm21e46002004-08-20 13:36:32 +000099 1, /* Whether CONSTRUCTED */
100 asn1_MBR_varsets,
101 1, /* Single element */
102 &asn1_DEF_varsets_specs /* Additional specs */
103};
104
105static asn1_TYPE_member_t asn1_MBR_LogLine[] = {
vlmddd5a7d2004-09-10 09:18:20 +0000106 { ATF_NOFLAGS, 0, offsetof(struct LogLine, line_digest),
vlm21e46002004-08-20 13:36:32 +0000107 .tag = (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)),
108 .tag_mode = 0,
109 .type = (void *)&asn1_DEF_IA5String,
110 .memb_constraints = 0, /* Defer to actual type */
111 .name = "line-digest"
112 },
vlmddd5a7d2004-09-10 09:18:20 +0000113 { ATF_NOFLAGS, 0, offsetof(struct LogLine, varsets),
vlm21e46002004-08-20 13:36:32 +0000114 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
115 .tag_mode = 0,
116 .type = (void *)&asn1_DEF_varsets,
vlm824aefc2004-08-22 03:19:00 +0000117 .memb_constraints = memb_varsets_1_constraint,
vlm21e46002004-08-20 13:36:32 +0000118 .name = "varsets"
vlmfa67ddc2004-06-03 03:38:44 +0000119 },
120};
121static ber_tlv_tag_t asn1_DEF_LogLine_tags[] = {
122 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
123};
vlm35efd1b2004-06-06 07:20:52 +0000124static asn1_TYPE_tag2member_t asn1_DEF_LogLine_tag2el[] = {
vlmc8aeab42004-06-14 13:09:45 +0000125 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* varsets at 25 */
126 { (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), 0, 0, 0 }, /* line-digest at 23 */
vlm35efd1b2004-06-06 07:20:52 +0000127};
vlmfa67ddc2004-06-03 03:38:44 +0000128static asn1_SEQUENCE_specifics_t asn1_DEF_LogLine_specs = {
129 sizeof(struct LogLine),
130 offsetof(struct LogLine, _ber_dec_ctx),
vlm35efd1b2004-06-06 07:20:52 +0000131 asn1_DEF_LogLine_tag2el,
132 2, /* Count of tags in the map */
vlmfa67ddc2004-06-03 03:38:44 +0000133 1, /* Start extensions */
134 3 /* Stop extensions */
135};
136asn1_TYPE_descriptor_t asn1_DEF_LogLine = {
137 "LogLine",
138 SEQUENCE_constraint,
139 SEQUENCE_decode_ber,
140 SEQUENCE_encode_der,
141 SEQUENCE_print,
142 SEQUENCE_free,
143 0, /* Use generic outmost tag fetcher */
144 asn1_DEF_LogLine_tags,
145 sizeof(asn1_DEF_LogLine_tags)
vlm6e73a042004-08-11 07:17:22 +0000146 /sizeof(asn1_DEF_LogLine_tags[0]), /* 1 */
vlm72425de2004-09-13 08:31:01 +0000147 asn1_DEF_LogLine_tags, /* Same as above */
148 sizeof(asn1_DEF_LogLine_tags)
149 /sizeof(asn1_DEF_LogLine_tags[0]), /* 1 */
vlmfa67ddc2004-06-03 03:38:44 +0000150 1, /* Whether CONSTRUCTED */
vlm21e46002004-08-20 13:36:32 +0000151 asn1_MBR_LogLine,
152 2, /* Elements count */
vlmfa67ddc2004-06-03 03:38:44 +0000153 &asn1_DEF_LogLine_specs /* Additional specs */
154};
155
156
vlm6e1b13e2004-08-11 05:25:47 +0000157/*** <<< INCLUDES [VariablePartSet] >>> ***/
vlmfa67ddc2004-06-03 03:38:44 +0000158
vlmfa67ddc2004-06-03 03:38:44 +0000159#include <ActionItem.h>
vlmfa67ddc2004-06-03 03:38:44 +0000160#include <VariablePart.h>
161#include <asn_SEQUENCE_OF.h>
vlm6e1b13e2004-08-11 05:25:47 +0000162#include <constr_SEQUENCE_OF.h>
vlmfa67ddc2004-06-03 03:38:44 +0000163#include <constr_SEQUENCE.h>
164
vlm6e1b13e2004-08-11 05:25:47 +0000165/*** <<< DEPS [VariablePartSet] >>> ***/
166
vlmfa67ddc2004-06-03 03:38:44 +0000167extern asn1_TYPE_descriptor_t asn1_DEF_VariablePartSet;
168
169/*** <<< TYPE-DECLS [VariablePartSet] >>> ***/
170
171
172typedef struct VariablePartSet {
173 struct vparts {
vlmb47f48e2004-09-17 06:32:12 +0000174 A_SEQUENCE_OF(VariablePart_t) list;
vlmfa67ddc2004-06-03 03:38:44 +0000175
176 /* Context for parsing across buffer boundaries */
177 ber_dec_ctx_t _ber_dec_ctx;
178 } vparts;
179 ActionItem_t resolution;
180 /*
181 * This type is extensible,
182 * possible extensions are below.
183 */
184
185 /* Context for parsing across buffer boundaries */
186 ber_dec_ctx_t _ber_dec_ctx;
187} VariablePartSet_t;
188
vlm21e46002004-08-20 13:36:32 +0000189/*** <<< CODE [VariablePartSet] >>> ***/
190
191static int
vlm824aefc2004-08-22 03:19:00 +0000192memb_vparts_2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
vlm21e46002004-08-20 13:36:32 +0000193 asn_app_consume_bytes_f *app_errlog, void *app_key) {
194
195 if(!sptr) {
196 _ASN_ERRLOG(app_errlog, app_key,
vlm758530a2004-08-22 13:47:59 +0000197 "%s: value not given (%s:%d)",
198 td->name, __FILE__, __LINE__);
vlm21e46002004-08-20 13:36:32 +0000199 return -1;
200 }
201
202
203 if(1 /* No applicable constraints whatsoever */) {
204 /* Nothing is here. See below */
205 }
206
207 return td->check_constraints
208 (td, sptr, app_errlog, app_key);
209}
210
211
vlmfa67ddc2004-06-03 03:38:44 +0000212/*** <<< STAT-DEFS [VariablePartSet] >>> ***/
213
vlm21e46002004-08-20 13:36:32 +0000214static asn1_TYPE_member_t asn1_MBR_vparts[] = {
vlmddd5a7d2004-09-10 09:18:20 +0000215 { ATF_NOFLAGS, 0, 0,
vlm060fe2a2004-09-10 09:37:12 +0000216 .tag = -1 /* Ambiguous tag (CHOICE?) */,
vlm21e46002004-08-20 13:36:32 +0000217 .tag_mode = 0,
218 .type = (void *)&asn1_DEF_VariablePart,
219 .memb_constraints = 0, /* Defer to actual type */
220 .name = ""
vlmfa67ddc2004-06-03 03:38:44 +0000221 },
vlm21e46002004-08-20 13:36:32 +0000222};
223static ber_tlv_tag_t asn1_DEF_vparts_tags[] = {
224 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
225};
226static asn1_SET_OF_specifics_t asn1_DEF_vparts_specs = {
227 sizeof(struct vparts),
228 offsetof(struct vparts, _ber_dec_ctx),
229};
vlm1dc848e2004-09-07 06:44:29 +0000230static /* Use -fall-defs-global to expose */
vlm21e46002004-08-20 13:36:32 +0000231asn1_TYPE_descriptor_t asn1_DEF_vparts = {
232 "vparts",
233 SEQUENCE_OF_constraint,
234 SEQUENCE_OF_decode_ber,
235 SEQUENCE_OF_encode_der,
236 SEQUENCE_OF_print,
237 SEQUENCE_OF_free,
238 0, /* Use generic outmost tag fetcher */
239 asn1_DEF_vparts_tags,
240 sizeof(asn1_DEF_vparts_tags)
241 /sizeof(asn1_DEF_vparts_tags[0]), /* 1 */
vlm72425de2004-09-13 08:31:01 +0000242 asn1_DEF_vparts_tags, /* Same as above */
243 sizeof(asn1_DEF_vparts_tags)
244 /sizeof(asn1_DEF_vparts_tags[0]), /* 1 */
vlm21e46002004-08-20 13:36:32 +0000245 1, /* Whether CONSTRUCTED */
246 asn1_MBR_vparts,
247 1, /* Single element */
248 &asn1_DEF_vparts_specs /* Additional specs */
249};
250
251static asn1_TYPE_member_t asn1_MBR_VariablePartSet[] = {
vlmddd5a7d2004-09-10 09:18:20 +0000252 { ATF_NOFLAGS, 0, offsetof(struct VariablePartSet, vparts),
vlm21e46002004-08-20 13:36:32 +0000253 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
254 .tag_mode = 0,
255 .type = (void *)&asn1_DEF_vparts,
vlm824aefc2004-08-22 03:19:00 +0000256 .memb_constraints = memb_vparts_2_constraint,
vlm21e46002004-08-20 13:36:32 +0000257 .name = "vparts"
258 },
vlmddd5a7d2004-09-10 09:18:20 +0000259 { ATF_NOFLAGS, 0, offsetof(struct VariablePartSet, resolution),
vlm21e46002004-08-20 13:36:32 +0000260 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
261 .tag_mode = 0,
262 .type = (void *)&asn1_DEF_ActionItem,
263 .memb_constraints = 0, /* Defer to actual type */
264 .name = "resolution"
vlmfa67ddc2004-06-03 03:38:44 +0000265 },
266};
267static ber_tlv_tag_t asn1_DEF_VariablePartSet_tags[] = {
268 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
269};
vlm35efd1b2004-06-06 07:20:52 +0000270static asn1_TYPE_tag2member_t asn1_DEF_VariablePartSet_tag2el[] = {
vlmc8aeab42004-06-14 13:09:45 +0000271 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* vparts at 33 */
272 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 }, /* resolution at 35 */
vlm35efd1b2004-06-06 07:20:52 +0000273};
vlmfa67ddc2004-06-03 03:38:44 +0000274static asn1_SEQUENCE_specifics_t asn1_DEF_VariablePartSet_specs = {
275 sizeof(struct VariablePartSet),
276 offsetof(struct VariablePartSet, _ber_dec_ctx),
vlm35efd1b2004-06-06 07:20:52 +0000277 asn1_DEF_VariablePartSet_tag2el,
278 2, /* Count of tags in the map */
vlmfa67ddc2004-06-03 03:38:44 +0000279 1, /* Start extensions */
280 3 /* Stop extensions */
281};
282asn1_TYPE_descriptor_t asn1_DEF_VariablePartSet = {
283 "VariablePartSet",
284 SEQUENCE_constraint,
285 SEQUENCE_decode_ber,
286 SEQUENCE_encode_der,
287 SEQUENCE_print,
288 SEQUENCE_free,
289 0, /* Use generic outmost tag fetcher */
290 asn1_DEF_VariablePartSet_tags,
291 sizeof(asn1_DEF_VariablePartSet_tags)
vlm6e73a042004-08-11 07:17:22 +0000292 /sizeof(asn1_DEF_VariablePartSet_tags[0]), /* 1 */
vlm72425de2004-09-13 08:31:01 +0000293 asn1_DEF_VariablePartSet_tags, /* Same as above */
294 sizeof(asn1_DEF_VariablePartSet_tags)
295 /sizeof(asn1_DEF_VariablePartSet_tags[0]), /* 1 */
vlmfa67ddc2004-06-03 03:38:44 +0000296 1, /* Whether CONSTRUCTED */
vlm21e46002004-08-20 13:36:32 +0000297 asn1_MBR_VariablePartSet,
298 2, /* Elements count */
vlmfa67ddc2004-06-03 03:38:44 +0000299 &asn1_DEF_VariablePartSet_specs /* Additional specs */
300};
301
302
vlm6e1b13e2004-08-11 05:25:47 +0000303/*** <<< INCLUDES [VariablePart] >>> ***/
vlmfa67ddc2004-06-03 03:38:44 +0000304
vlmfa67ddc2004-06-03 03:38:44 +0000305#include <VisibleString.h>
306#include <asn_SET_OF.h>
vlm6e1b13e2004-08-11 05:25:47 +0000307#include <constr_SET_OF.h>
308#include <constr_SEQUENCE.h>
309#include <constr_CHOICE.h>
vlmfa67ddc2004-06-03 03:38:44 +0000310
vlm6e1b13e2004-08-11 05:25:47 +0000311/*** <<< DEPS [VariablePart] >>> ***/
vlmfa67ddc2004-06-03 03:38:44 +0000312
vlm6e1b13e2004-08-11 05:25:47 +0000313typedef enum VariablePart_PR {
314 VariablePart_PR_NOTHING, /* No components present */
315 VariablePart_PR_vset,
316 VariablePart_PR_vrange,
317 /* Extensions may appear below */
vlm6e73a042004-08-11 07:17:22 +0000318} VariablePart_PR;
vlmfa67ddc2004-06-03 03:38:44 +0000319extern asn1_TYPE_descriptor_t asn1_DEF_VariablePart;
320
321/*** <<< TYPE-DECLS [VariablePart] >>> ***/
322
323
324typedef struct VariablePart {
vlm6e73a042004-08-11 07:17:22 +0000325 VariablePart_PR present;
vlmfa67ddc2004-06-03 03:38:44 +0000326 union {
327 struct vset {
328 A_SET_OF(VisibleString_t) list;
329
330 /* Context for parsing across buffer boundaries */
331 ber_dec_ctx_t _ber_dec_ctx;
332 } vset;
333 struct vrange {
334 VisibleString_t from;
335 VisibleString_t to;
336 /*
337 * This type is extensible,
338 * possible extensions are below.
339 */
340
341 /* Context for parsing across buffer boundaries */
342 ber_dec_ctx_t _ber_dec_ctx;
343 } vrange;
344 /*
345 * This type is extensible,
346 * possible extensions are below.
347 */
348 } choice;
349
350 /* Context for parsing across buffer boundaries */
351 ber_dec_ctx_t _ber_dec_ctx;
352} VariablePart_t;
353
vlm21e46002004-08-20 13:36:32 +0000354/*** <<< CODE [VariablePart] >>> ***/
355
356static int
vlm824aefc2004-08-22 03:19:00 +0000357memb_vset_3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
vlm21e46002004-08-20 13:36:32 +0000358 asn_app_consume_bytes_f *app_errlog, void *app_key) {
359 size_t size;
360
361 if(!sptr) {
362 _ASN_ERRLOG(app_errlog, app_key,
vlm758530a2004-08-22 13:47:59 +0000363 "%s: value not given (%s:%d)",
364 td->name, __FILE__, __LINE__);
vlm21e46002004-08-20 13:36:32 +0000365 return -1;
366 }
367
368 { /* Determine the number of elements */
369 const A_SET_OF(void) *list;
370 (const void *)list = sptr;
371 size = list->count;
372 }
373
374 if((size >= 1)) {
375 /* Constraint check succeeded */
vlmcdf661b2004-08-22 12:47:03 +0000376 return 0;
vlm21e46002004-08-20 13:36:32 +0000377 } else {
378 _ASN_ERRLOG(app_errlog, app_key,
vlm758530a2004-08-22 13:47:59 +0000379 "%s: constraint failed (%s:%d)",
380 td->name, __FILE__, __LINE__);
vlm21e46002004-08-20 13:36:32 +0000381 return -1;
382 }
383}
384
385
vlmfa67ddc2004-06-03 03:38:44 +0000386/*** <<< STAT-DEFS [VariablePart] >>> ***/
387
vlm21e46002004-08-20 13:36:32 +0000388static asn1_TYPE_member_t asn1_MBR_vset[] = {
vlmddd5a7d2004-09-10 09:18:20 +0000389 { ATF_NOFLAGS, 0, 0,
vlm21e46002004-08-20 13:36:32 +0000390 .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
391 .tag_mode = 0,
392 .type = (void *)&asn1_DEF_VisibleString,
393 .memb_constraints = 0, /* Defer to actual type */
394 .name = ""
vlmfa67ddc2004-06-03 03:38:44 +0000395 },
vlm21e46002004-08-20 13:36:32 +0000396};
397static ber_tlv_tag_t asn1_DEF_vset_tags[] = {
398 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
399};
400static asn1_SET_OF_specifics_t asn1_DEF_vset_specs = {
401 sizeof(struct vset),
402 offsetof(struct vset, _ber_dec_ctx),
403};
vlm1dc848e2004-09-07 06:44:29 +0000404static /* Use -fall-defs-global to expose */
vlm21e46002004-08-20 13:36:32 +0000405asn1_TYPE_descriptor_t asn1_DEF_vset = {
406 "vset",
407 SET_OF_constraint,
408 SET_OF_decode_ber,
409 SET_OF_encode_der,
410 SET_OF_print,
411 SET_OF_free,
412 0, /* Use generic outmost tag fetcher */
413 asn1_DEF_vset_tags,
414 sizeof(asn1_DEF_vset_tags)
415 /sizeof(asn1_DEF_vset_tags[0]), /* 1 */
vlm72425de2004-09-13 08:31:01 +0000416 asn1_DEF_vset_tags, /* Same as above */
417 sizeof(asn1_DEF_vset_tags)
418 /sizeof(asn1_DEF_vset_tags[0]), /* 1 */
vlm21e46002004-08-20 13:36:32 +0000419 1, /* Whether CONSTRUCTED */
420 asn1_MBR_vset,
421 1, /* Single element */
422 &asn1_DEF_vset_specs /* Additional specs */
423};
424
425static asn1_TYPE_member_t asn1_MBR_vrange[] = {
vlmddd5a7d2004-09-10 09:18:20 +0000426 { ATF_NOFLAGS, 0, offsetof(struct vrange, from),
vlm21e46002004-08-20 13:36:32 +0000427 .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
428 .tag_mode = 0,
429 .type = (void *)&asn1_DEF_VisibleString,
430 .memb_constraints = 0, /* Defer to actual type */
431 .name = "from"
432 },
vlmddd5a7d2004-09-10 09:18:20 +0000433 { ATF_NOFLAGS, 0, offsetof(struct vrange, to),
vlm21e46002004-08-20 13:36:32 +0000434 .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
435 .tag_mode = 0,
436 .type = (void *)&asn1_DEF_VisibleString,
437 .memb_constraints = 0, /* Defer to actual type */
438 .name = "to"
439 },
440};
441static ber_tlv_tag_t asn1_DEF_vrange_tags[] = {
442 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
443};
444static asn1_TYPE_tag2member_t asn1_DEF_vrange_tag2el[] = {
445 { (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 0, 0, 1 }, /* from at 45 */
446 { (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 1, -1, 0 }, /* to at 46 */
447};
448static asn1_SEQUENCE_specifics_t asn1_DEF_vrange_specs = {
449 sizeof(struct vrange),
450 offsetof(struct vrange, _ber_dec_ctx),
451 asn1_DEF_vrange_tag2el,
452 2, /* Count of tags in the map */
453 1, /* Start extensions */
454 3 /* Stop extensions */
455};
vlm1dc848e2004-09-07 06:44:29 +0000456static /* Use -fall-defs-global to expose */
vlm21e46002004-08-20 13:36:32 +0000457asn1_TYPE_descriptor_t asn1_DEF_vrange = {
458 "vrange",
459 SEQUENCE_constraint,
460 SEQUENCE_decode_ber,
461 SEQUENCE_encode_der,
462 SEQUENCE_print,
463 SEQUENCE_free,
464 0, /* Use generic outmost tag fetcher */
465 asn1_DEF_vrange_tags,
466 sizeof(asn1_DEF_vrange_tags)
467 /sizeof(asn1_DEF_vrange_tags[0]), /* 1 */
vlm72425de2004-09-13 08:31:01 +0000468 asn1_DEF_vrange_tags, /* Same as above */
469 sizeof(asn1_DEF_vrange_tags)
470 /sizeof(asn1_DEF_vrange_tags[0]), /* 1 */
vlm21e46002004-08-20 13:36:32 +0000471 1, /* Whether CONSTRUCTED */
472 asn1_MBR_vrange,
473 2, /* Elements count */
474 &asn1_DEF_vrange_specs /* Additional specs */
475};
476
477static asn1_TYPE_member_t asn1_MBR_VariablePart[] = {
vlmddd5a7d2004-09-10 09:18:20 +0000478 { ATF_NOFLAGS, 0, offsetof(struct VariablePart, choice.vset),
vlm21e46002004-08-20 13:36:32 +0000479 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
480 .tag_mode = 0,
481 .type = (void *)&asn1_DEF_vset,
vlm824aefc2004-08-22 03:19:00 +0000482 .memb_constraints = memb_vset_3_constraint,
vlm21e46002004-08-20 13:36:32 +0000483 .name = "vset"
484 },
vlmddd5a7d2004-09-10 09:18:20 +0000485 { ATF_NOFLAGS, 0, offsetof(struct VariablePart, choice.vrange),
vlm21e46002004-08-20 13:36:32 +0000486 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
487 .tag_mode = 0,
488 .type = (void *)&asn1_DEF_vrange,
489 .memb_constraints = 0, /* Defer to actual type */
490 .name = "vrange"
vlmfa67ddc2004-06-03 03:38:44 +0000491 },
492};
vlm35efd1b2004-06-06 07:20:52 +0000493static asn1_TYPE_tag2member_t asn1_DEF_VariablePart_tag2el[] = {
vlmc8aeab42004-06-14 13:09:45 +0000494 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* vrange at 45 */
495 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 }, /* vset at 42 */
vlmfa67ddc2004-06-03 03:38:44 +0000496};
497static asn1_CHOICE_specifics_t asn1_DEF_VariablePart_specs = {
498 sizeof(struct VariablePart),
499 offsetof(struct VariablePart, _ber_dec_ctx),
500 offsetof(struct VariablePart, present),
501 sizeof(((struct VariablePart *)0)->present),
vlmfa67ddc2004-06-03 03:38:44 +0000502 asn1_DEF_VariablePart_tag2el,
503 2, /* Count of tags in the map */
vlm27ee5282004-07-01 00:49:55 +0000504 1 /* Whether extensible */
vlmfa67ddc2004-06-03 03:38:44 +0000505};
506asn1_TYPE_descriptor_t asn1_DEF_VariablePart = {
507 "VariablePart",
508 CHOICE_constraint,
509 CHOICE_decode_ber,
510 CHOICE_encode_der,
511 CHOICE_print,
512 CHOICE_free,
513 CHOICE_outmost_tag,
vlm72425de2004-09-13 08:31:01 +0000514 0, /* No effective tags (pointer) */
515 0, /* No effective tags (count) */
516 0, /* No tags (pointer) */
517 0, /* No tags (count) */
vlmfa67ddc2004-06-03 03:38:44 +0000518 1, /* Whether CONSTRUCTED */
vlm21e46002004-08-20 13:36:32 +0000519 asn1_MBR_VariablePart,
520 2, /* Elements count */
vlmfa67ddc2004-06-03 03:38:44 +0000521 &asn1_DEF_VariablePart_specs /* Additional specs */
522};
523
524
vlm6e1b13e2004-08-11 05:25:47 +0000525/*** <<< INCLUDES [ActionItem] >>> ***/
vlmfa67ddc2004-06-03 03:38:44 +0000526
vlmfa67ddc2004-06-03 03:38:44 +0000527#include <ENUMERATED.h>
vlm6e1b13e2004-08-11 05:25:47 +0000528#include <BOOLEAN.h>
529#include <VisibleString.h>
530#include <asn_SET_OF.h>
531#include <constr_SET_OF.h>
532#include <constr_SEQUENCE.h>
533
534/*** <<< DEPS [ActionItem] >>> ***/
vlmfa67ddc2004-06-03 03:38:44 +0000535
vlm21e46002004-08-20 13:36:32 +0000536typedef enum accept_as {
537 accept_as_unknown = 0,
538 accept_as_safe = 1,
539 accept_as_unsafe = 2,
540 /*
541 * Enumeration is extensible
542 */
543} accept_as_e;
vlmfa67ddc2004-06-03 03:38:44 +0000544extern asn1_TYPE_descriptor_t asn1_DEF_ActionItem;
545
546/*** <<< TYPE-DECLS [ActionItem] >>> ***/
547
548
549typedef struct ActionItem {
550 ENUMERATED_t accept_as;
551 struct notify {
552 BOOLEAN_t critical;
553 struct email {
554 A_SET_OF(VisibleString_t) list;
555
556 /* Context for parsing across buffer boundaries */
557 ber_dec_ctx_t _ber_dec_ctx;
558 } email;
559 /*
560 * This type is extensible,
561 * possible extensions are below.
562 */
563
564 /* Context for parsing across buffer boundaries */
565 ber_dec_ctx_t _ber_dec_ctx;
566 } *notify;
567 /*
568 * This type is extensible,
569 * possible extensions are below.
570 */
571
572 /* Context for parsing across buffer boundaries */
573 ber_dec_ctx_t _ber_dec_ctx;
574} ActionItem_t;
575
576/*** <<< STAT-DEFS [ActionItem] >>> ***/
577
vlm21e46002004-08-20 13:36:32 +0000578static asn1_TYPE_member_t asn1_MBR_email[] = {
vlmddd5a7d2004-09-10 09:18:20 +0000579 { ATF_NOFLAGS, 0, 0,
vlm21e46002004-08-20 13:36:32 +0000580 .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
581 .tag_mode = 0,
582 .type = (void *)&asn1_DEF_VisibleString,
583 .memb_constraints = 0, /* Defer to actual type */
584 .name = ""
vlmfa67ddc2004-06-03 03:38:44 +0000585 },
vlm21e46002004-08-20 13:36:32 +0000586};
587static ber_tlv_tag_t asn1_DEF_email_tags[] = {
588 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
589};
590static asn1_SET_OF_specifics_t asn1_DEF_email_specs = {
591 sizeof(struct email),
592 offsetof(struct email, _ber_dec_ctx),
593};
vlm1dc848e2004-09-07 06:44:29 +0000594static /* Use -fall-defs-global to expose */
vlm21e46002004-08-20 13:36:32 +0000595asn1_TYPE_descriptor_t asn1_DEF_email = {
596 "email",
597 SET_OF_constraint,
598 SET_OF_decode_ber,
599 SET_OF_encode_der,
600 SET_OF_print,
601 SET_OF_free,
602 0, /* Use generic outmost tag fetcher */
603 asn1_DEF_email_tags,
604 sizeof(asn1_DEF_email_tags)
605 /sizeof(asn1_DEF_email_tags[0]), /* 1 */
vlm72425de2004-09-13 08:31:01 +0000606 asn1_DEF_email_tags, /* Same as above */
607 sizeof(asn1_DEF_email_tags)
608 /sizeof(asn1_DEF_email_tags[0]), /* 1 */
vlm21e46002004-08-20 13:36:32 +0000609 1, /* Whether CONSTRUCTED */
610 asn1_MBR_email,
611 1, /* Single element */
612 &asn1_DEF_email_specs /* Additional specs */
613};
614
615static asn1_TYPE_member_t asn1_MBR_notify[] = {
vlmddd5a7d2004-09-10 09:18:20 +0000616 { ATF_NOFLAGS, 0, offsetof(struct notify, critical),
vlm21e46002004-08-20 13:36:32 +0000617 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
618 .tag_mode = 0,
619 .type = (void *)&asn1_DEF_BOOLEAN,
620 .memb_constraints = 0, /* Defer to actual type */
621 .name = "critical"
622 },
vlmddd5a7d2004-09-10 09:18:20 +0000623 { ATF_NOFLAGS, 0, offsetof(struct notify, email),
vlm21e46002004-08-20 13:36:32 +0000624 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
625 .tag_mode = 0,
626 .type = (void *)&asn1_DEF_email,
627 .memb_constraints = 0, /* Defer to actual type */
628 .name = "email"
629 },
630};
631static ber_tlv_tag_t asn1_DEF_notify_tags[] = {
632 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
633};
634static asn1_TYPE_tag2member_t asn1_DEF_notify_tag2el[] = {
635 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* critical at 61 */
636 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 1, 0, 0 }, /* email at 62 */
637};
638static asn1_SEQUENCE_specifics_t asn1_DEF_notify_specs = {
639 sizeof(struct notify),
640 offsetof(struct notify, _ber_dec_ctx),
641 asn1_DEF_notify_tag2el,
642 2, /* Count of tags in the map */
643 1, /* Start extensions */
644 3 /* Stop extensions */
645};
vlm1dc848e2004-09-07 06:44:29 +0000646static /* Use -fall-defs-global to expose */
vlm21e46002004-08-20 13:36:32 +0000647asn1_TYPE_descriptor_t asn1_DEF_notify = {
648 "notify",
649 SEQUENCE_constraint,
650 SEQUENCE_decode_ber,
651 SEQUENCE_encode_der,
652 SEQUENCE_print,
653 SEQUENCE_free,
654 0, /* Use generic outmost tag fetcher */
655 asn1_DEF_notify_tags,
656 sizeof(asn1_DEF_notify_tags)
657 /sizeof(asn1_DEF_notify_tags[0]), /* 1 */
vlm72425de2004-09-13 08:31:01 +0000658 asn1_DEF_notify_tags, /* Same as above */
659 sizeof(asn1_DEF_notify_tags)
660 /sizeof(asn1_DEF_notify_tags[0]), /* 1 */
vlm21e46002004-08-20 13:36:32 +0000661 1, /* Whether CONSTRUCTED */
662 asn1_MBR_notify,
663 2, /* Elements count */
664 &asn1_DEF_notify_specs /* Additional specs */
665};
666
667static asn1_TYPE_member_t asn1_MBR_ActionItem[] = {
vlmddd5a7d2004-09-10 09:18:20 +0000668 { ATF_NOFLAGS, 0, offsetof(struct ActionItem, accept_as),
vlm21e46002004-08-20 13:36:32 +0000669 .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
670 .tag_mode = 0,
671 .type = (void *)&asn1_DEF_ENUMERATED,
672 .memb_constraints = 0, /* Defer to actual type */
673 .name = "accept-as"
674 },
vlmddd5a7d2004-09-10 09:18:20 +0000675 { ATF_POINTER, 1, offsetof(struct ActionItem, notify),
vlm21e46002004-08-20 13:36:32 +0000676 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
677 .tag_mode = 0,
678 .type = (void *)&asn1_DEF_notify,
679 .memb_constraints = 0, /* Defer to actual type */
680 .name = "notify"
vlmfa67ddc2004-06-03 03:38:44 +0000681 },
682};
683static ber_tlv_tag_t asn1_DEF_ActionItem_tags[] = {
684 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
685};
vlm35efd1b2004-06-06 07:20:52 +0000686static asn1_TYPE_tag2member_t asn1_DEF_ActionItem_tag2el[] = {
vlmc8aeab42004-06-14 13:09:45 +0000687 { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 }, /* accept-as at 55 */
688 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* notify at 61 */
vlm35efd1b2004-06-06 07:20:52 +0000689};
vlmfa67ddc2004-06-03 03:38:44 +0000690static asn1_SEQUENCE_specifics_t asn1_DEF_ActionItem_specs = {
691 sizeof(struct ActionItem),
692 offsetof(struct ActionItem, _ber_dec_ctx),
vlm35efd1b2004-06-06 07:20:52 +0000693 asn1_DEF_ActionItem_tag2el,
694 2, /* Count of tags in the map */
vlmfa67ddc2004-06-03 03:38:44 +0000695 1, /* Start extensions */
696 3 /* Stop extensions */
697};
698asn1_TYPE_descriptor_t asn1_DEF_ActionItem = {
699 "ActionItem",
700 SEQUENCE_constraint,
701 SEQUENCE_decode_ber,
702 SEQUENCE_encode_der,
703 SEQUENCE_print,
704 SEQUENCE_free,
705 0, /* Use generic outmost tag fetcher */
706 asn1_DEF_ActionItem_tags,
707 sizeof(asn1_DEF_ActionItem_tags)
vlm6e73a042004-08-11 07:17:22 +0000708 /sizeof(asn1_DEF_ActionItem_tags[0]), /* 1 */
vlm72425de2004-09-13 08:31:01 +0000709 asn1_DEF_ActionItem_tags, /* Same as above */
710 sizeof(asn1_DEF_ActionItem_tags)
711 /sizeof(asn1_DEF_ActionItem_tags[0]), /* 1 */
vlmfa67ddc2004-06-03 03:38:44 +0000712 1, /* Whether CONSTRUCTED */
vlm21e46002004-08-20 13:36:32 +0000713 asn1_MBR_ActionItem,
714 2, /* Elements count */
vlmfa67ddc2004-06-03 03:38:44 +0000715 &asn1_DEF_ActionItem_specs /* Additional specs */
716};
717