blob: ad954aa045597e4a6853e1b61c08abb5412ef982 [file] [log] [blame]
Lev Walkinf15320b2004-06-03 03:38:44 +00001
Lev Walkinb47ddce2004-08-11 05:25:47 +00002/*** <<< INCLUDES [LogLine] >>> ***/
Lev Walkinf15320b2004-06-03 03:38:44 +00003
Lev Walkinf15320b2004-06-03 03:38:44 +00004#include <IA5String.h>
Lev Walkinf15320b2004-06-03 03:38:44 +00005#include <VariablePartSet.h>
6#include <asn_SEQUENCE_OF.h>
Lev Walkinb47ddce2004-08-11 05:25:47 +00007#include <constr_SEQUENCE_OF.h>
Lev Walkinf15320b2004-06-03 03:38:44 +00008#include <constr_SEQUENCE.h>
9
Lev Walkinb47ddce2004-08-11 05:25:47 +000010/*** <<< DEPS [LogLine] >>> ***/
11
Lev Walkinf15320b2004-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
Lev Walkin2e3055d2004-08-20 13:36:32 +000034/*** <<< CODE [LogLine] >>> ***/
35
36static int
Lev Walkina09e5da2004-08-22 03:19:00 +000037memb_varsets_1_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin2e3055d2004-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,
Lev Walkin16835b62004-08-22 13:47:59 +000043 "%s: value not given (%s:%d)",
44 td->name, __FILE__, __LINE__);
Lev Walkin2e3055d2004-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 */
Lev Walkin775885e2004-08-22 12:47:03 +000056 return 0;
Lev Walkin2e3055d2004-08-20 13:36:32 +000057 } else {
58 _ASN_ERRLOG(app_errlog, app_key,
Lev Walkin16835b62004-08-22 13:47:59 +000059 "%s: constraint failed (%s:%d)",
60 td->name, __FILE__, __LINE__);
Lev Walkin2e3055d2004-08-20 13:36:32 +000061 return -1;
62 }
63}
64
65
Lev Walkinf15320b2004-06-03 03:38:44 +000066/*** <<< STAT-DEFS [LogLine] >>> ***/
67
Lev Walkin2e3055d2004-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 = ""
Lev Walkinf15320b2004-06-03 03:38:44 +000075 },
Lev Walkin2e3055d2004-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};
84asn1_TYPE_descriptor_t asn1_DEF_varsets = {
85 "varsets",
86 SEQUENCE_OF_constraint,
87 SEQUENCE_OF_decode_ber,
88 SEQUENCE_OF_encode_der,
89 SEQUENCE_OF_print,
90 SEQUENCE_OF_free,
91 0, /* Use generic outmost tag fetcher */
92 asn1_DEF_varsets_tags,
93 sizeof(asn1_DEF_varsets_tags)
94 /sizeof(asn1_DEF_varsets_tags[0]), /* 1 */
95 1, /* Tags to skip */
96 1, /* Whether CONSTRUCTED */
97 asn1_MBR_varsets,
98 1, /* Single element */
99 &asn1_DEF_varsets_specs /* Additional specs */
100};
101
102static asn1_TYPE_member_t asn1_MBR_LogLine[] = {
103 { 0, offsetof(struct LogLine, line_digest),
104 .tag = (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)),
105 .tag_mode = 0,
106 .type = (void *)&asn1_DEF_IA5String,
107 .memb_constraints = 0, /* Defer to actual type */
108 .name = "line-digest"
109 },
110 { 0, offsetof(struct LogLine, varsets),
111 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
112 .tag_mode = 0,
113 .type = (void *)&asn1_DEF_varsets,
Lev Walkina09e5da2004-08-22 03:19:00 +0000114 .memb_constraints = memb_varsets_1_constraint,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000115 .name = "varsets"
Lev Walkinf15320b2004-06-03 03:38:44 +0000116 },
117};
118static ber_tlv_tag_t asn1_DEF_LogLine_tags[] = {
119 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
120};
Lev Walkincda6b8a2004-06-06 07:20:52 +0000121static asn1_TYPE_tag2member_t asn1_DEF_LogLine_tag2el[] = {
Lev Walkin38abe792004-06-14 13:09:45 +0000122 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* varsets at 25 */
123 { (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), 0, 0, 0 }, /* line-digest at 23 */
Lev Walkincda6b8a2004-06-06 07:20:52 +0000124};
Lev Walkinf15320b2004-06-03 03:38:44 +0000125static asn1_SEQUENCE_specifics_t asn1_DEF_LogLine_specs = {
126 sizeof(struct LogLine),
127 offsetof(struct LogLine, _ber_dec_ctx),
Lev Walkincda6b8a2004-06-06 07:20:52 +0000128 asn1_DEF_LogLine_tag2el,
129 2, /* Count of tags in the map */
Lev Walkinf15320b2004-06-03 03:38:44 +0000130 1, /* Start extensions */
131 3 /* Stop extensions */
132};
133asn1_TYPE_descriptor_t asn1_DEF_LogLine = {
134 "LogLine",
135 SEQUENCE_constraint,
136 SEQUENCE_decode_ber,
137 SEQUENCE_encode_der,
138 SEQUENCE_print,
139 SEQUENCE_free,
140 0, /* Use generic outmost tag fetcher */
141 asn1_DEF_LogLine_tags,
142 sizeof(asn1_DEF_LogLine_tags)
Lev Walkin64399722004-08-11 07:17:22 +0000143 /sizeof(asn1_DEF_LogLine_tags[0]), /* 1 */
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000144 1, /* Tags to skip */
Lev Walkinf15320b2004-06-03 03:38:44 +0000145 1, /* Whether CONSTRUCTED */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000146 asn1_MBR_LogLine,
147 2, /* Elements count */
Lev Walkinf15320b2004-06-03 03:38:44 +0000148 &asn1_DEF_LogLine_specs /* Additional specs */
149};
150
151
Lev Walkinb47ddce2004-08-11 05:25:47 +0000152/*** <<< INCLUDES [VariablePartSet] >>> ***/
Lev Walkinf15320b2004-06-03 03:38:44 +0000153
Lev Walkinf15320b2004-06-03 03:38:44 +0000154#include <ActionItem.h>
Lev Walkinf15320b2004-06-03 03:38:44 +0000155#include <VariablePart.h>
156#include <asn_SEQUENCE_OF.h>
Lev Walkinb47ddce2004-08-11 05:25:47 +0000157#include <constr_SEQUENCE_OF.h>
Lev Walkinf15320b2004-06-03 03:38:44 +0000158#include <constr_SEQUENCE.h>
159
Lev Walkinb47ddce2004-08-11 05:25:47 +0000160/*** <<< DEPS [VariablePartSet] >>> ***/
161
Lev Walkinf15320b2004-06-03 03:38:44 +0000162extern asn1_TYPE_descriptor_t asn1_DEF_VariablePartSet;
163
164/*** <<< TYPE-DECLS [VariablePartSet] >>> ***/
165
166
167typedef struct VariablePartSet {
168 struct vparts {
169 A_SEQUENCE_OF(struct VariablePart) list;
170
171 /* Context for parsing across buffer boundaries */
172 ber_dec_ctx_t _ber_dec_ctx;
173 } vparts;
174 ActionItem_t resolution;
175 /*
176 * This type is extensible,
177 * possible extensions are below.
178 */
179
180 /* Context for parsing across buffer boundaries */
181 ber_dec_ctx_t _ber_dec_ctx;
182} VariablePartSet_t;
183
Lev Walkin2e3055d2004-08-20 13:36:32 +0000184/*** <<< CODE [VariablePartSet] >>> ***/
185
186static int
Lev Walkina09e5da2004-08-22 03:19:00 +0000187memb_vparts_2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000188 asn_app_consume_bytes_f *app_errlog, void *app_key) {
189
190 if(!sptr) {
191 _ASN_ERRLOG(app_errlog, app_key,
Lev Walkin16835b62004-08-22 13:47:59 +0000192 "%s: value not given (%s:%d)",
193 td->name, __FILE__, __LINE__);
Lev Walkin2e3055d2004-08-20 13:36:32 +0000194 return -1;
195 }
196
197
198 if(1 /* No applicable constraints whatsoever */) {
199 /* Nothing is here. See below */
200 }
201
202 return td->check_constraints
203 (td, sptr, app_errlog, app_key);
204}
205
206
Lev Walkinf15320b2004-06-03 03:38:44 +0000207/*** <<< STAT-DEFS [VariablePartSet] >>> ***/
208
Lev Walkin2e3055d2004-08-20 13:36:32 +0000209static asn1_TYPE_member_t asn1_MBR_vparts[] = {
210 { 0, 0,
211 .tag = -1 /* Ambiguous tag (CHOICE?) */,
212 .tag_mode = 0,
213 .type = (void *)&asn1_DEF_VariablePart,
214 .memb_constraints = 0, /* Defer to actual type */
215 .name = ""
Lev Walkinf15320b2004-06-03 03:38:44 +0000216 },
Lev Walkin2e3055d2004-08-20 13:36:32 +0000217};
218static ber_tlv_tag_t asn1_DEF_vparts_tags[] = {
219 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
220};
221static asn1_SET_OF_specifics_t asn1_DEF_vparts_specs = {
222 sizeof(struct vparts),
223 offsetof(struct vparts, _ber_dec_ctx),
224};
225asn1_TYPE_descriptor_t asn1_DEF_vparts = {
226 "vparts",
227 SEQUENCE_OF_constraint,
228 SEQUENCE_OF_decode_ber,
229 SEQUENCE_OF_encode_der,
230 SEQUENCE_OF_print,
231 SEQUENCE_OF_free,
232 0, /* Use generic outmost tag fetcher */
233 asn1_DEF_vparts_tags,
234 sizeof(asn1_DEF_vparts_tags)
235 /sizeof(asn1_DEF_vparts_tags[0]), /* 1 */
236 1, /* Tags to skip */
237 1, /* Whether CONSTRUCTED */
238 asn1_MBR_vparts,
239 1, /* Single element */
240 &asn1_DEF_vparts_specs /* Additional specs */
241};
242
243static asn1_TYPE_member_t asn1_MBR_VariablePartSet[] = {
244 { 0, offsetof(struct VariablePartSet, vparts),
245 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
246 .tag_mode = 0,
247 .type = (void *)&asn1_DEF_vparts,
Lev Walkina09e5da2004-08-22 03:19:00 +0000248 .memb_constraints = memb_vparts_2_constraint,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000249 .name = "vparts"
250 },
251 { 0, offsetof(struct VariablePartSet, resolution),
252 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
253 .tag_mode = 0,
254 .type = (void *)&asn1_DEF_ActionItem,
255 .memb_constraints = 0, /* Defer to actual type */
256 .name = "resolution"
Lev Walkinf15320b2004-06-03 03:38:44 +0000257 },
258};
259static ber_tlv_tag_t asn1_DEF_VariablePartSet_tags[] = {
260 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
261};
Lev Walkincda6b8a2004-06-06 07:20:52 +0000262static asn1_TYPE_tag2member_t asn1_DEF_VariablePartSet_tag2el[] = {
Lev Walkin38abe792004-06-14 13:09:45 +0000263 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* vparts at 33 */
264 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 }, /* resolution at 35 */
Lev Walkincda6b8a2004-06-06 07:20:52 +0000265};
Lev Walkinf15320b2004-06-03 03:38:44 +0000266static asn1_SEQUENCE_specifics_t asn1_DEF_VariablePartSet_specs = {
267 sizeof(struct VariablePartSet),
268 offsetof(struct VariablePartSet, _ber_dec_ctx),
Lev Walkincda6b8a2004-06-06 07:20:52 +0000269 asn1_DEF_VariablePartSet_tag2el,
270 2, /* Count of tags in the map */
Lev Walkinf15320b2004-06-03 03:38:44 +0000271 1, /* Start extensions */
272 3 /* Stop extensions */
273};
274asn1_TYPE_descriptor_t asn1_DEF_VariablePartSet = {
275 "VariablePartSet",
276 SEQUENCE_constraint,
277 SEQUENCE_decode_ber,
278 SEQUENCE_encode_der,
279 SEQUENCE_print,
280 SEQUENCE_free,
281 0, /* Use generic outmost tag fetcher */
282 asn1_DEF_VariablePartSet_tags,
283 sizeof(asn1_DEF_VariablePartSet_tags)
Lev Walkin64399722004-08-11 07:17:22 +0000284 /sizeof(asn1_DEF_VariablePartSet_tags[0]), /* 1 */
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000285 1, /* Tags to skip */
Lev Walkinf15320b2004-06-03 03:38:44 +0000286 1, /* Whether CONSTRUCTED */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000287 asn1_MBR_VariablePartSet,
288 2, /* Elements count */
Lev Walkinf15320b2004-06-03 03:38:44 +0000289 &asn1_DEF_VariablePartSet_specs /* Additional specs */
290};
291
292
Lev Walkinb47ddce2004-08-11 05:25:47 +0000293/*** <<< INCLUDES [VariablePart] >>> ***/
Lev Walkinf15320b2004-06-03 03:38:44 +0000294
Lev Walkinf15320b2004-06-03 03:38:44 +0000295#include <VisibleString.h>
296#include <asn_SET_OF.h>
Lev Walkinb47ddce2004-08-11 05:25:47 +0000297#include <constr_SET_OF.h>
298#include <constr_SEQUENCE.h>
299#include <constr_CHOICE.h>
Lev Walkinf15320b2004-06-03 03:38:44 +0000300
Lev Walkinb47ddce2004-08-11 05:25:47 +0000301/*** <<< DEPS [VariablePart] >>> ***/
Lev Walkinf15320b2004-06-03 03:38:44 +0000302
Lev Walkinb47ddce2004-08-11 05:25:47 +0000303typedef enum VariablePart_PR {
304 VariablePart_PR_NOTHING, /* No components present */
305 VariablePart_PR_vset,
306 VariablePart_PR_vrange,
307 /* Extensions may appear below */
Lev Walkin64399722004-08-11 07:17:22 +0000308} VariablePart_PR;
Lev Walkinf15320b2004-06-03 03:38:44 +0000309extern asn1_TYPE_descriptor_t asn1_DEF_VariablePart;
310
311/*** <<< TYPE-DECLS [VariablePart] >>> ***/
312
313
314typedef struct VariablePart {
Lev Walkin64399722004-08-11 07:17:22 +0000315 VariablePart_PR present;
Lev Walkinf15320b2004-06-03 03:38:44 +0000316 union {
317 struct vset {
318 A_SET_OF(VisibleString_t) list;
319
320 /* Context for parsing across buffer boundaries */
321 ber_dec_ctx_t _ber_dec_ctx;
322 } vset;
323 struct vrange {
324 VisibleString_t from;
325 VisibleString_t to;
326 /*
327 * This type is extensible,
328 * possible extensions are below.
329 */
330
331 /* Context for parsing across buffer boundaries */
332 ber_dec_ctx_t _ber_dec_ctx;
333 } vrange;
334 /*
335 * This type is extensible,
336 * possible extensions are below.
337 */
338 } choice;
339
340 /* Context for parsing across buffer boundaries */
341 ber_dec_ctx_t _ber_dec_ctx;
342} VariablePart_t;
343
Lev Walkin2e3055d2004-08-20 13:36:32 +0000344/*** <<< CODE [VariablePart] >>> ***/
345
346static int
Lev Walkina09e5da2004-08-22 03:19:00 +0000347memb_vset_3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000348 asn_app_consume_bytes_f *app_errlog, void *app_key) {
349 size_t size;
350
351 if(!sptr) {
352 _ASN_ERRLOG(app_errlog, app_key,
Lev Walkin16835b62004-08-22 13:47:59 +0000353 "%s: value not given (%s:%d)",
354 td->name, __FILE__, __LINE__);
Lev Walkin2e3055d2004-08-20 13:36:32 +0000355 return -1;
356 }
357
358 { /* Determine the number of elements */
359 const A_SET_OF(void) *list;
360 (const void *)list = sptr;
361 size = list->count;
362 }
363
364 if((size >= 1)) {
365 /* Constraint check succeeded */
Lev Walkin775885e2004-08-22 12:47:03 +0000366 return 0;
Lev Walkin2e3055d2004-08-20 13:36:32 +0000367 } else {
368 _ASN_ERRLOG(app_errlog, app_key,
Lev Walkin16835b62004-08-22 13:47:59 +0000369 "%s: constraint failed (%s:%d)",
370 td->name, __FILE__, __LINE__);
Lev Walkin2e3055d2004-08-20 13:36:32 +0000371 return -1;
372 }
373}
374
375
Lev Walkinf15320b2004-06-03 03:38:44 +0000376/*** <<< STAT-DEFS [VariablePart] >>> ***/
377
Lev Walkin2e3055d2004-08-20 13:36:32 +0000378static asn1_TYPE_member_t asn1_MBR_vset[] = {
379 { 0, 0,
380 .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
381 .tag_mode = 0,
382 .type = (void *)&asn1_DEF_VisibleString,
383 .memb_constraints = 0, /* Defer to actual type */
384 .name = ""
Lev Walkinf15320b2004-06-03 03:38:44 +0000385 },
Lev Walkin2e3055d2004-08-20 13:36:32 +0000386};
387static ber_tlv_tag_t asn1_DEF_vset_tags[] = {
388 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
389};
390static asn1_SET_OF_specifics_t asn1_DEF_vset_specs = {
391 sizeof(struct vset),
392 offsetof(struct vset, _ber_dec_ctx),
393};
394asn1_TYPE_descriptor_t asn1_DEF_vset = {
395 "vset",
396 SET_OF_constraint,
397 SET_OF_decode_ber,
398 SET_OF_encode_der,
399 SET_OF_print,
400 SET_OF_free,
401 0, /* Use generic outmost tag fetcher */
402 asn1_DEF_vset_tags,
403 sizeof(asn1_DEF_vset_tags)
404 /sizeof(asn1_DEF_vset_tags[0]), /* 1 */
405 1, /* Tags to skip */
406 1, /* Whether CONSTRUCTED */
407 asn1_MBR_vset,
408 1, /* Single element */
409 &asn1_DEF_vset_specs /* Additional specs */
410};
411
412static asn1_TYPE_member_t asn1_MBR_vrange[] = {
413 { 0, offsetof(struct vrange, from),
414 .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
415 .tag_mode = 0,
416 .type = (void *)&asn1_DEF_VisibleString,
417 .memb_constraints = 0, /* Defer to actual type */
418 .name = "from"
419 },
420 { 0, offsetof(struct vrange, to),
421 .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
422 .tag_mode = 0,
423 .type = (void *)&asn1_DEF_VisibleString,
424 .memb_constraints = 0, /* Defer to actual type */
425 .name = "to"
426 },
427};
428static ber_tlv_tag_t asn1_DEF_vrange_tags[] = {
429 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
430};
431static asn1_TYPE_tag2member_t asn1_DEF_vrange_tag2el[] = {
432 { (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 0, 0, 1 }, /* from at 45 */
433 { (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 1, -1, 0 }, /* to at 46 */
434};
435static asn1_SEQUENCE_specifics_t asn1_DEF_vrange_specs = {
436 sizeof(struct vrange),
437 offsetof(struct vrange, _ber_dec_ctx),
438 asn1_DEF_vrange_tag2el,
439 2, /* Count of tags in the map */
440 1, /* Start extensions */
441 3 /* Stop extensions */
442};
443asn1_TYPE_descriptor_t asn1_DEF_vrange = {
444 "vrange",
445 SEQUENCE_constraint,
446 SEQUENCE_decode_ber,
447 SEQUENCE_encode_der,
448 SEQUENCE_print,
449 SEQUENCE_free,
450 0, /* Use generic outmost tag fetcher */
451 asn1_DEF_vrange_tags,
452 sizeof(asn1_DEF_vrange_tags)
453 /sizeof(asn1_DEF_vrange_tags[0]), /* 1 */
454 1, /* Tags to skip */
455 1, /* Whether CONSTRUCTED */
456 asn1_MBR_vrange,
457 2, /* Elements count */
458 &asn1_DEF_vrange_specs /* Additional specs */
459};
460
461static asn1_TYPE_member_t asn1_MBR_VariablePart[] = {
462 { 0, offsetof(struct VariablePart, choice.vset),
463 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
464 .tag_mode = 0,
465 .type = (void *)&asn1_DEF_vset,
Lev Walkina09e5da2004-08-22 03:19:00 +0000466 .memb_constraints = memb_vset_3_constraint,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000467 .name = "vset"
468 },
469 { 0, offsetof(struct VariablePart, choice.vrange),
470 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
471 .tag_mode = 0,
472 .type = (void *)&asn1_DEF_vrange,
473 .memb_constraints = 0, /* Defer to actual type */
474 .name = "vrange"
Lev Walkinf15320b2004-06-03 03:38:44 +0000475 },
476};
Lev Walkincda6b8a2004-06-06 07:20:52 +0000477static asn1_TYPE_tag2member_t asn1_DEF_VariablePart_tag2el[] = {
Lev Walkin38abe792004-06-14 13:09:45 +0000478 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* vrange at 45 */
479 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 }, /* vset at 42 */
Lev Walkinf15320b2004-06-03 03:38:44 +0000480};
481static asn1_CHOICE_specifics_t asn1_DEF_VariablePart_specs = {
482 sizeof(struct VariablePart),
483 offsetof(struct VariablePart, _ber_dec_ctx),
484 offsetof(struct VariablePart, present),
485 sizeof(((struct VariablePart *)0)->present),
Lev Walkinf15320b2004-06-03 03:38:44 +0000486 asn1_DEF_VariablePart_tag2el,
487 2, /* Count of tags in the map */
Lev Walkind64497c2004-07-01 00:49:55 +0000488 1 /* Whether extensible */
Lev Walkinf15320b2004-06-03 03:38:44 +0000489};
490asn1_TYPE_descriptor_t asn1_DEF_VariablePart = {
491 "VariablePart",
492 CHOICE_constraint,
493 CHOICE_decode_ber,
494 CHOICE_encode_der,
495 CHOICE_print,
496 CHOICE_free,
497 CHOICE_outmost_tag,
Lev Walkin64399722004-08-11 07:17:22 +0000498 0, /* No explicit tags (pointer) */
499 0, /* No explicit tags (count) */
Lev Walkinf15320b2004-06-03 03:38:44 +0000500 0, /* Tags to skip */
501 1, /* Whether CONSTRUCTED */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000502 asn1_MBR_VariablePart,
503 2, /* Elements count */
Lev Walkinf15320b2004-06-03 03:38:44 +0000504 &asn1_DEF_VariablePart_specs /* Additional specs */
505};
506
507
Lev Walkinb47ddce2004-08-11 05:25:47 +0000508/*** <<< INCLUDES [ActionItem] >>> ***/
Lev Walkinf15320b2004-06-03 03:38:44 +0000509
Lev Walkinf15320b2004-06-03 03:38:44 +0000510#include <ENUMERATED.h>
Lev Walkinb47ddce2004-08-11 05:25:47 +0000511#include <BOOLEAN.h>
512#include <VisibleString.h>
513#include <asn_SET_OF.h>
514#include <constr_SET_OF.h>
515#include <constr_SEQUENCE.h>
516
517/*** <<< DEPS [ActionItem] >>> ***/
Lev Walkinf15320b2004-06-03 03:38:44 +0000518
Lev Walkin2e3055d2004-08-20 13:36:32 +0000519typedef enum accept_as {
520 accept_as_unknown = 0,
521 accept_as_safe = 1,
522 accept_as_unsafe = 2,
523 /*
524 * Enumeration is extensible
525 */
526} accept_as_e;
Lev Walkinf15320b2004-06-03 03:38:44 +0000527extern asn1_TYPE_descriptor_t asn1_DEF_ActionItem;
528
529/*** <<< TYPE-DECLS [ActionItem] >>> ***/
530
531
532typedef struct ActionItem {
533 ENUMERATED_t accept_as;
534 struct notify {
535 BOOLEAN_t critical;
536 struct email {
537 A_SET_OF(VisibleString_t) list;
538
539 /* Context for parsing across buffer boundaries */
540 ber_dec_ctx_t _ber_dec_ctx;
541 } email;
542 /*
543 * This type is extensible,
544 * possible extensions are below.
545 */
546
547 /* Context for parsing across buffer boundaries */
548 ber_dec_ctx_t _ber_dec_ctx;
549 } *notify;
550 /*
551 * This type is extensible,
552 * possible extensions are below.
553 */
554
555 /* Context for parsing across buffer boundaries */
556 ber_dec_ctx_t _ber_dec_ctx;
557} ActionItem_t;
558
559/*** <<< STAT-DEFS [ActionItem] >>> ***/
560
Lev Walkin2e3055d2004-08-20 13:36:32 +0000561static asn1_TYPE_member_t asn1_MBR_email[] = {
562 { 0, 0,
563 .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
564 .tag_mode = 0,
565 .type = (void *)&asn1_DEF_VisibleString,
566 .memb_constraints = 0, /* Defer to actual type */
567 .name = ""
Lev Walkinf15320b2004-06-03 03:38:44 +0000568 },
Lev Walkin2e3055d2004-08-20 13:36:32 +0000569};
570static ber_tlv_tag_t asn1_DEF_email_tags[] = {
571 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
572};
573static asn1_SET_OF_specifics_t asn1_DEF_email_specs = {
574 sizeof(struct email),
575 offsetof(struct email, _ber_dec_ctx),
576};
577asn1_TYPE_descriptor_t asn1_DEF_email = {
578 "email",
579 SET_OF_constraint,
580 SET_OF_decode_ber,
581 SET_OF_encode_der,
582 SET_OF_print,
583 SET_OF_free,
584 0, /* Use generic outmost tag fetcher */
585 asn1_DEF_email_tags,
586 sizeof(asn1_DEF_email_tags)
587 /sizeof(asn1_DEF_email_tags[0]), /* 1 */
588 1, /* Tags to skip */
589 1, /* Whether CONSTRUCTED */
590 asn1_MBR_email,
591 1, /* Single element */
592 &asn1_DEF_email_specs /* Additional specs */
593};
594
595static asn1_TYPE_member_t asn1_MBR_notify[] = {
596 { 0, offsetof(struct notify, critical),
597 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
598 .tag_mode = 0,
599 .type = (void *)&asn1_DEF_BOOLEAN,
600 .memb_constraints = 0, /* Defer to actual type */
601 .name = "critical"
602 },
603 { 0, offsetof(struct notify, email),
604 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
605 .tag_mode = 0,
606 .type = (void *)&asn1_DEF_email,
607 .memb_constraints = 0, /* Defer to actual type */
608 .name = "email"
609 },
610};
611static ber_tlv_tag_t asn1_DEF_notify_tags[] = {
612 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
613};
614static asn1_TYPE_tag2member_t asn1_DEF_notify_tag2el[] = {
615 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* critical at 61 */
616 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 1, 0, 0 }, /* email at 62 */
617};
618static asn1_SEQUENCE_specifics_t asn1_DEF_notify_specs = {
619 sizeof(struct notify),
620 offsetof(struct notify, _ber_dec_ctx),
621 asn1_DEF_notify_tag2el,
622 2, /* Count of tags in the map */
623 1, /* Start extensions */
624 3 /* Stop extensions */
625};
626asn1_TYPE_descriptor_t asn1_DEF_notify = {
627 "notify",
628 SEQUENCE_constraint,
629 SEQUENCE_decode_ber,
630 SEQUENCE_encode_der,
631 SEQUENCE_print,
632 SEQUENCE_free,
633 0, /* Use generic outmost tag fetcher */
634 asn1_DEF_notify_tags,
635 sizeof(asn1_DEF_notify_tags)
636 /sizeof(asn1_DEF_notify_tags[0]), /* 1 */
637 1, /* Tags to skip */
638 1, /* Whether CONSTRUCTED */
639 asn1_MBR_notify,
640 2, /* Elements count */
641 &asn1_DEF_notify_specs /* Additional specs */
642};
643
644static asn1_TYPE_member_t asn1_MBR_ActionItem[] = {
645 { 0, offsetof(struct ActionItem, accept_as),
646 .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
647 .tag_mode = 0,
648 .type = (void *)&asn1_DEF_ENUMERATED,
649 .memb_constraints = 0, /* Defer to actual type */
650 .name = "accept-as"
651 },
652 { 1, offsetof(struct ActionItem, notify),
653 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
654 .tag_mode = 0,
655 .type = (void *)&asn1_DEF_notify,
656 .memb_constraints = 0, /* Defer to actual type */
657 .name = "notify"
Lev Walkinf15320b2004-06-03 03:38:44 +0000658 },
659};
660static ber_tlv_tag_t asn1_DEF_ActionItem_tags[] = {
661 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
662};
Lev Walkincda6b8a2004-06-06 07:20:52 +0000663static asn1_TYPE_tag2member_t asn1_DEF_ActionItem_tag2el[] = {
Lev Walkin38abe792004-06-14 13:09:45 +0000664 { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 }, /* accept-as at 55 */
665 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* notify at 61 */
Lev Walkincda6b8a2004-06-06 07:20:52 +0000666};
Lev Walkinf15320b2004-06-03 03:38:44 +0000667static asn1_SEQUENCE_specifics_t asn1_DEF_ActionItem_specs = {
668 sizeof(struct ActionItem),
669 offsetof(struct ActionItem, _ber_dec_ctx),
Lev Walkincda6b8a2004-06-06 07:20:52 +0000670 asn1_DEF_ActionItem_tag2el,
671 2, /* Count of tags in the map */
Lev Walkinf15320b2004-06-03 03:38:44 +0000672 1, /* Start extensions */
673 3 /* Stop extensions */
674};
675asn1_TYPE_descriptor_t asn1_DEF_ActionItem = {
676 "ActionItem",
677 SEQUENCE_constraint,
678 SEQUENCE_decode_ber,
679 SEQUENCE_encode_der,
680 SEQUENCE_print,
681 SEQUENCE_free,
682 0, /* Use generic outmost tag fetcher */
683 asn1_DEF_ActionItem_tags,
684 sizeof(asn1_DEF_ActionItem_tags)
Lev Walkin64399722004-08-11 07:17:22 +0000685 /sizeof(asn1_DEF_ActionItem_tags[0]), /* 1 */
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000686 1, /* Tags to skip */
Lev Walkinf15320b2004-06-03 03:38:44 +0000687 1, /* Whether CONSTRUCTED */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000688 asn1_MBR_ActionItem,
689 2, /* Elements count */
Lev Walkinf15320b2004-06-03 03:38:44 +0000690 &asn1_DEF_ActionItem_specs /* Additional specs */
691};
692