blob: ef05fa5129ba058f47ff8323d223eb28c61b050a [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 {
Lev Walkin8dd0eed2004-09-17 06:32:12 +000020 A_SEQUENCE_OF(VariablePartSet_t) list;
Lev Walkinf15320b2004-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
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[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +000069 { ATF_NOFLAGS, 0, 0,
Lev Walkin2e3055d2004-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 = ""
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),
Lev Walkina9cc46e2004-09-22 16:06:28 +000083 0, /* XER encoding is XMLDelimitedItemList */
Lev Walkin2e3055d2004-08-20 13:36:32 +000084};
Lev Walkind04430c2004-09-07 06:44:29 +000085static /* Use -fall-defs-global to expose */
Lev Walkin2e3055d2004-08-20 13:36:32 +000086asn1_TYPE_descriptor_t asn1_DEF_varsets = {
87 "varsets",
Lev Walkina9cc46e2004-09-22 16:06:28 +000088 SEQUENCE_OF_free,
89 SEQUENCE_OF_print,
Lev Walkin2e3055d2004-08-20 13:36:32 +000090 SEQUENCE_OF_constraint,
91 SEQUENCE_OF_decode_ber,
92 SEQUENCE_OF_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +000093 0, /* Not implemented yet */
94 SEQUENCE_OF_encode_xer,
Lev Walkin2e3055d2004-08-20 13:36:32 +000095 0, /* Use generic outmost tag fetcher */
96 asn1_DEF_varsets_tags,
97 sizeof(asn1_DEF_varsets_tags)
98 /sizeof(asn1_DEF_varsets_tags[0]), /* 1 */
Lev Walkin188ed2c2004-09-13 08:31:01 +000099 asn1_DEF_varsets_tags, /* Same as above */
100 sizeof(asn1_DEF_varsets_tags)
101 /sizeof(asn1_DEF_varsets_tags[0]), /* 1 */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000102 1, /* Whether CONSTRUCTED */
103 asn1_MBR_varsets,
104 1, /* Single element */
105 &asn1_DEF_varsets_specs /* Additional specs */
106};
107
108static asn1_TYPE_member_t asn1_MBR_LogLine[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000109 { ATF_NOFLAGS, 0, offsetof(struct LogLine, line_digest),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000110 .tag = (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)),
111 .tag_mode = 0,
112 .type = (void *)&asn1_DEF_IA5String,
113 .memb_constraints = 0, /* Defer to actual type */
114 .name = "line-digest"
115 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000116 { ATF_NOFLAGS, 0, offsetof(struct LogLine, varsets),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000117 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
118 .tag_mode = 0,
119 .type = (void *)&asn1_DEF_varsets,
Lev Walkina09e5da2004-08-22 03:19:00 +0000120 .memb_constraints = memb_varsets_1_constraint,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000121 .name = "varsets"
Lev Walkinf15320b2004-06-03 03:38:44 +0000122 },
123};
124static ber_tlv_tag_t asn1_DEF_LogLine_tags[] = {
125 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
126};
Lev Walkincda6b8a2004-06-06 07:20:52 +0000127static asn1_TYPE_tag2member_t asn1_DEF_LogLine_tag2el[] = {
Lev Walkin38abe792004-06-14 13:09:45 +0000128 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* varsets at 25 */
129 { (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), 0, 0, 0 }, /* line-digest at 23 */
Lev Walkincda6b8a2004-06-06 07:20:52 +0000130};
Lev Walkinf15320b2004-06-03 03:38:44 +0000131static asn1_SEQUENCE_specifics_t asn1_DEF_LogLine_specs = {
132 sizeof(struct LogLine),
133 offsetof(struct LogLine, _ber_dec_ctx),
Lev Walkincda6b8a2004-06-06 07:20:52 +0000134 asn1_DEF_LogLine_tag2el,
135 2, /* Count of tags in the map */
Lev Walkinf15320b2004-06-03 03:38:44 +0000136 1, /* Start extensions */
137 3 /* Stop extensions */
138};
139asn1_TYPE_descriptor_t asn1_DEF_LogLine = {
140 "LogLine",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000141 SEQUENCE_free,
142 SEQUENCE_print,
Lev Walkinf15320b2004-06-03 03:38:44 +0000143 SEQUENCE_constraint,
144 SEQUENCE_decode_ber,
145 SEQUENCE_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000146 0, /* Not implemented yet */
147 SEQUENCE_encode_xer,
Lev Walkinf15320b2004-06-03 03:38:44 +0000148 0, /* Use generic outmost tag fetcher */
149 asn1_DEF_LogLine_tags,
150 sizeof(asn1_DEF_LogLine_tags)
Lev Walkin64399722004-08-11 07:17:22 +0000151 /sizeof(asn1_DEF_LogLine_tags[0]), /* 1 */
Lev Walkin188ed2c2004-09-13 08:31:01 +0000152 asn1_DEF_LogLine_tags, /* Same as above */
153 sizeof(asn1_DEF_LogLine_tags)
154 /sizeof(asn1_DEF_LogLine_tags[0]), /* 1 */
Lev Walkinf15320b2004-06-03 03:38:44 +0000155 1, /* Whether CONSTRUCTED */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000156 asn1_MBR_LogLine,
157 2, /* Elements count */
Lev Walkinf15320b2004-06-03 03:38:44 +0000158 &asn1_DEF_LogLine_specs /* Additional specs */
159};
160
161
Lev Walkinb47ddce2004-08-11 05:25:47 +0000162/*** <<< INCLUDES [VariablePartSet] >>> ***/
Lev Walkinf15320b2004-06-03 03:38:44 +0000163
Lev Walkinf15320b2004-06-03 03:38:44 +0000164#include <ActionItem.h>
Lev Walkinf15320b2004-06-03 03:38:44 +0000165#include <VariablePart.h>
166#include <asn_SEQUENCE_OF.h>
Lev Walkinb47ddce2004-08-11 05:25:47 +0000167#include <constr_SEQUENCE_OF.h>
Lev Walkinf15320b2004-06-03 03:38:44 +0000168#include <constr_SEQUENCE.h>
169
Lev Walkinb47ddce2004-08-11 05:25:47 +0000170/*** <<< DEPS [VariablePartSet] >>> ***/
171
Lev Walkinf15320b2004-06-03 03:38:44 +0000172extern asn1_TYPE_descriptor_t asn1_DEF_VariablePartSet;
173
174/*** <<< TYPE-DECLS [VariablePartSet] >>> ***/
175
176
177typedef struct VariablePartSet {
178 struct vparts {
Lev Walkin8dd0eed2004-09-17 06:32:12 +0000179 A_SEQUENCE_OF(VariablePart_t) list;
Lev Walkinf15320b2004-06-03 03:38:44 +0000180
181 /* Context for parsing across buffer boundaries */
182 ber_dec_ctx_t _ber_dec_ctx;
183 } vparts;
184 ActionItem_t resolution;
185 /*
186 * This type is extensible,
187 * possible extensions are below.
188 */
189
190 /* Context for parsing across buffer boundaries */
191 ber_dec_ctx_t _ber_dec_ctx;
192} VariablePartSet_t;
193
Lev Walkin2e3055d2004-08-20 13:36:32 +0000194/*** <<< CODE [VariablePartSet] >>> ***/
195
196static int
Lev Walkina09e5da2004-08-22 03:19:00 +0000197memb_vparts_2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000198 asn_app_consume_bytes_f *app_errlog, void *app_key) {
199
200 if(!sptr) {
201 _ASN_ERRLOG(app_errlog, app_key,
Lev Walkin16835b62004-08-22 13:47:59 +0000202 "%s: value not given (%s:%d)",
203 td->name, __FILE__, __LINE__);
Lev Walkin2e3055d2004-08-20 13:36:32 +0000204 return -1;
205 }
206
207
208 if(1 /* No applicable constraints whatsoever */) {
209 /* Nothing is here. See below */
210 }
211
212 return td->check_constraints
213 (td, sptr, app_errlog, app_key);
214}
215
216
Lev Walkinf15320b2004-06-03 03:38:44 +0000217/*** <<< STAT-DEFS [VariablePartSet] >>> ***/
218
Lev Walkin2e3055d2004-08-20 13:36:32 +0000219static asn1_TYPE_member_t asn1_MBR_vparts[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000220 { ATF_NOFLAGS, 0, 0,
Lev Walkinb9189732004-09-10 09:37:12 +0000221 .tag = -1 /* Ambiguous tag (CHOICE?) */,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000222 .tag_mode = 0,
223 .type = (void *)&asn1_DEF_VariablePart,
224 .memb_constraints = 0, /* Defer to actual type */
225 .name = ""
Lev Walkinf15320b2004-06-03 03:38:44 +0000226 },
Lev Walkin2e3055d2004-08-20 13:36:32 +0000227};
228static ber_tlv_tag_t asn1_DEF_vparts_tags[] = {
229 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
230};
231static asn1_SET_OF_specifics_t asn1_DEF_vparts_specs = {
232 sizeof(struct vparts),
233 offsetof(struct vparts, _ber_dec_ctx),
Lev Walkina9cc46e2004-09-22 16:06:28 +0000234 1, /* XER encoding is XMLValueList */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000235};
Lev Walkind04430c2004-09-07 06:44:29 +0000236static /* Use -fall-defs-global to expose */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000237asn1_TYPE_descriptor_t asn1_DEF_vparts = {
238 "vparts",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000239 SEQUENCE_OF_free,
240 SEQUENCE_OF_print,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000241 SEQUENCE_OF_constraint,
242 SEQUENCE_OF_decode_ber,
243 SEQUENCE_OF_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000244 0, /* Not implemented yet */
245 SEQUENCE_OF_encode_xer,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000246 0, /* Use generic outmost tag fetcher */
247 asn1_DEF_vparts_tags,
248 sizeof(asn1_DEF_vparts_tags)
249 /sizeof(asn1_DEF_vparts_tags[0]), /* 1 */
Lev Walkin188ed2c2004-09-13 08:31:01 +0000250 asn1_DEF_vparts_tags, /* Same as above */
251 sizeof(asn1_DEF_vparts_tags)
252 /sizeof(asn1_DEF_vparts_tags[0]), /* 1 */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000253 1, /* Whether CONSTRUCTED */
254 asn1_MBR_vparts,
255 1, /* Single element */
256 &asn1_DEF_vparts_specs /* Additional specs */
257};
258
259static asn1_TYPE_member_t asn1_MBR_VariablePartSet[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000260 { ATF_NOFLAGS, 0, offsetof(struct VariablePartSet, vparts),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000261 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
262 .tag_mode = 0,
263 .type = (void *)&asn1_DEF_vparts,
Lev Walkina09e5da2004-08-22 03:19:00 +0000264 .memb_constraints = memb_vparts_2_constraint,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000265 .name = "vparts"
266 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000267 { ATF_NOFLAGS, 0, offsetof(struct VariablePartSet, resolution),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000268 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
269 .tag_mode = 0,
270 .type = (void *)&asn1_DEF_ActionItem,
271 .memb_constraints = 0, /* Defer to actual type */
272 .name = "resolution"
Lev Walkinf15320b2004-06-03 03:38:44 +0000273 },
274};
275static ber_tlv_tag_t asn1_DEF_VariablePartSet_tags[] = {
276 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
277};
Lev Walkincda6b8a2004-06-06 07:20:52 +0000278static asn1_TYPE_tag2member_t asn1_DEF_VariablePartSet_tag2el[] = {
Lev Walkin38abe792004-06-14 13:09:45 +0000279 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* vparts at 33 */
280 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 }, /* resolution at 35 */
Lev Walkincda6b8a2004-06-06 07:20:52 +0000281};
Lev Walkinf15320b2004-06-03 03:38:44 +0000282static asn1_SEQUENCE_specifics_t asn1_DEF_VariablePartSet_specs = {
283 sizeof(struct VariablePartSet),
284 offsetof(struct VariablePartSet, _ber_dec_ctx),
Lev Walkincda6b8a2004-06-06 07:20:52 +0000285 asn1_DEF_VariablePartSet_tag2el,
286 2, /* Count of tags in the map */
Lev Walkinf15320b2004-06-03 03:38:44 +0000287 1, /* Start extensions */
288 3 /* Stop extensions */
289};
290asn1_TYPE_descriptor_t asn1_DEF_VariablePartSet = {
291 "VariablePartSet",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000292 SEQUENCE_free,
293 SEQUENCE_print,
Lev Walkinf15320b2004-06-03 03:38:44 +0000294 SEQUENCE_constraint,
295 SEQUENCE_decode_ber,
296 SEQUENCE_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000297 0, /* Not implemented yet */
298 SEQUENCE_encode_xer,
Lev Walkinf15320b2004-06-03 03:38:44 +0000299 0, /* Use generic outmost tag fetcher */
300 asn1_DEF_VariablePartSet_tags,
301 sizeof(asn1_DEF_VariablePartSet_tags)
Lev Walkin64399722004-08-11 07:17:22 +0000302 /sizeof(asn1_DEF_VariablePartSet_tags[0]), /* 1 */
Lev Walkin188ed2c2004-09-13 08:31:01 +0000303 asn1_DEF_VariablePartSet_tags, /* Same as above */
304 sizeof(asn1_DEF_VariablePartSet_tags)
305 /sizeof(asn1_DEF_VariablePartSet_tags[0]), /* 1 */
Lev Walkinf15320b2004-06-03 03:38:44 +0000306 1, /* Whether CONSTRUCTED */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000307 asn1_MBR_VariablePartSet,
308 2, /* Elements count */
Lev Walkinf15320b2004-06-03 03:38:44 +0000309 &asn1_DEF_VariablePartSet_specs /* Additional specs */
310};
311
312
Lev Walkinb47ddce2004-08-11 05:25:47 +0000313/*** <<< INCLUDES [VariablePart] >>> ***/
Lev Walkinf15320b2004-06-03 03:38:44 +0000314
Lev Walkinf15320b2004-06-03 03:38:44 +0000315#include <VisibleString.h>
316#include <asn_SET_OF.h>
Lev Walkinb47ddce2004-08-11 05:25:47 +0000317#include <constr_SET_OF.h>
318#include <constr_SEQUENCE.h>
319#include <constr_CHOICE.h>
Lev Walkinf15320b2004-06-03 03:38:44 +0000320
Lev Walkinb47ddce2004-08-11 05:25:47 +0000321/*** <<< DEPS [VariablePart] >>> ***/
Lev Walkinf15320b2004-06-03 03:38:44 +0000322
Lev Walkinb47ddce2004-08-11 05:25:47 +0000323typedef enum VariablePart_PR {
324 VariablePart_PR_NOTHING, /* No components present */
325 VariablePart_PR_vset,
326 VariablePart_PR_vrange,
327 /* Extensions may appear below */
Lev Walkin64399722004-08-11 07:17:22 +0000328} VariablePart_PR;
Lev Walkinf15320b2004-06-03 03:38:44 +0000329extern asn1_TYPE_descriptor_t asn1_DEF_VariablePart;
330
331/*** <<< TYPE-DECLS [VariablePart] >>> ***/
332
333
334typedef struct VariablePart {
Lev Walkin64399722004-08-11 07:17:22 +0000335 VariablePart_PR present;
Lev Walkinf15320b2004-06-03 03:38:44 +0000336 union {
337 struct vset {
338 A_SET_OF(VisibleString_t) list;
339
340 /* Context for parsing across buffer boundaries */
341 ber_dec_ctx_t _ber_dec_ctx;
342 } vset;
343 struct vrange {
344 VisibleString_t from;
345 VisibleString_t to;
346 /*
347 * This type is extensible,
348 * possible extensions are below.
349 */
350
351 /* Context for parsing across buffer boundaries */
352 ber_dec_ctx_t _ber_dec_ctx;
353 } vrange;
354 /*
355 * This type is extensible,
356 * possible extensions are below.
357 */
358 } choice;
359
360 /* Context for parsing across buffer boundaries */
361 ber_dec_ctx_t _ber_dec_ctx;
362} VariablePart_t;
363
Lev Walkin2e3055d2004-08-20 13:36:32 +0000364/*** <<< CODE [VariablePart] >>> ***/
365
366static int
Lev Walkina09e5da2004-08-22 03:19:00 +0000367memb_vset_3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000368 asn_app_consume_bytes_f *app_errlog, void *app_key) {
369 size_t size;
370
371 if(!sptr) {
372 _ASN_ERRLOG(app_errlog, app_key,
Lev Walkin16835b62004-08-22 13:47:59 +0000373 "%s: value not given (%s:%d)",
374 td->name, __FILE__, __LINE__);
Lev Walkin2e3055d2004-08-20 13:36:32 +0000375 return -1;
376 }
377
378 { /* Determine the number of elements */
379 const A_SET_OF(void) *list;
380 (const void *)list = sptr;
381 size = list->count;
382 }
383
384 if((size >= 1)) {
385 /* Constraint check succeeded */
Lev Walkin775885e2004-08-22 12:47:03 +0000386 return 0;
Lev Walkin2e3055d2004-08-20 13:36:32 +0000387 } else {
388 _ASN_ERRLOG(app_errlog, app_key,
Lev Walkin16835b62004-08-22 13:47:59 +0000389 "%s: constraint failed (%s:%d)",
390 td->name, __FILE__, __LINE__);
Lev Walkin2e3055d2004-08-20 13:36:32 +0000391 return -1;
392 }
393}
394
395
Lev Walkinf15320b2004-06-03 03:38:44 +0000396/*** <<< STAT-DEFS [VariablePart] >>> ***/
397
Lev Walkin2e3055d2004-08-20 13:36:32 +0000398static asn1_TYPE_member_t asn1_MBR_vset[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000399 { ATF_NOFLAGS, 0, 0,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000400 .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
401 .tag_mode = 0,
402 .type = (void *)&asn1_DEF_VisibleString,
403 .memb_constraints = 0, /* Defer to actual type */
404 .name = ""
Lev Walkinf15320b2004-06-03 03:38:44 +0000405 },
Lev Walkin2e3055d2004-08-20 13:36:32 +0000406};
407static ber_tlv_tag_t asn1_DEF_vset_tags[] = {
408 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
409};
410static asn1_SET_OF_specifics_t asn1_DEF_vset_specs = {
411 sizeof(struct vset),
412 offsetof(struct vset, _ber_dec_ctx),
Lev Walkina9cc46e2004-09-22 16:06:28 +0000413 0, /* XER encoding is XMLDelimitedItemList */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000414};
Lev Walkind04430c2004-09-07 06:44:29 +0000415static /* Use -fall-defs-global to expose */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000416asn1_TYPE_descriptor_t asn1_DEF_vset = {
417 "vset",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000418 SET_OF_free,
419 SET_OF_print,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000420 SET_OF_constraint,
421 SET_OF_decode_ber,
422 SET_OF_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000423 0, /* Not implemented yet */
424 SET_OF_encode_xer,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000425 0, /* Use generic outmost tag fetcher */
426 asn1_DEF_vset_tags,
427 sizeof(asn1_DEF_vset_tags)
428 /sizeof(asn1_DEF_vset_tags[0]), /* 1 */
Lev Walkin188ed2c2004-09-13 08:31:01 +0000429 asn1_DEF_vset_tags, /* Same as above */
430 sizeof(asn1_DEF_vset_tags)
431 /sizeof(asn1_DEF_vset_tags[0]), /* 1 */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000432 1, /* Whether CONSTRUCTED */
433 asn1_MBR_vset,
434 1, /* Single element */
435 &asn1_DEF_vset_specs /* Additional specs */
436};
437
438static asn1_TYPE_member_t asn1_MBR_vrange[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000439 { ATF_NOFLAGS, 0, offsetof(struct vrange, from),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000440 .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
441 .tag_mode = 0,
442 .type = (void *)&asn1_DEF_VisibleString,
443 .memb_constraints = 0, /* Defer to actual type */
444 .name = "from"
445 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000446 { ATF_NOFLAGS, 0, offsetof(struct vrange, to),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000447 .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
448 .tag_mode = 0,
449 .type = (void *)&asn1_DEF_VisibleString,
450 .memb_constraints = 0, /* Defer to actual type */
451 .name = "to"
452 },
453};
454static ber_tlv_tag_t asn1_DEF_vrange_tags[] = {
455 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
456};
457static asn1_TYPE_tag2member_t asn1_DEF_vrange_tag2el[] = {
458 { (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 0, 0, 1 }, /* from at 45 */
459 { (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 1, -1, 0 }, /* to at 46 */
460};
461static asn1_SEQUENCE_specifics_t asn1_DEF_vrange_specs = {
462 sizeof(struct vrange),
463 offsetof(struct vrange, _ber_dec_ctx),
464 asn1_DEF_vrange_tag2el,
465 2, /* Count of tags in the map */
466 1, /* Start extensions */
467 3 /* Stop extensions */
468};
Lev Walkind04430c2004-09-07 06:44:29 +0000469static /* Use -fall-defs-global to expose */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000470asn1_TYPE_descriptor_t asn1_DEF_vrange = {
471 "vrange",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000472 SEQUENCE_free,
473 SEQUENCE_print,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000474 SEQUENCE_constraint,
475 SEQUENCE_decode_ber,
476 SEQUENCE_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000477 0, /* Not implemented yet */
478 SEQUENCE_encode_xer,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000479 0, /* Use generic outmost tag fetcher */
480 asn1_DEF_vrange_tags,
481 sizeof(asn1_DEF_vrange_tags)
482 /sizeof(asn1_DEF_vrange_tags[0]), /* 1 */
Lev Walkin188ed2c2004-09-13 08:31:01 +0000483 asn1_DEF_vrange_tags, /* Same as above */
484 sizeof(asn1_DEF_vrange_tags)
485 /sizeof(asn1_DEF_vrange_tags[0]), /* 1 */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000486 1, /* Whether CONSTRUCTED */
487 asn1_MBR_vrange,
488 2, /* Elements count */
489 &asn1_DEF_vrange_specs /* Additional specs */
490};
491
492static asn1_TYPE_member_t asn1_MBR_VariablePart[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000493 { ATF_NOFLAGS, 0, offsetof(struct VariablePart, choice.vset),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000494 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
495 .tag_mode = 0,
496 .type = (void *)&asn1_DEF_vset,
Lev Walkina09e5da2004-08-22 03:19:00 +0000497 .memb_constraints = memb_vset_3_constraint,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000498 .name = "vset"
499 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000500 { ATF_NOFLAGS, 0, offsetof(struct VariablePart, choice.vrange),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000501 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
502 .tag_mode = 0,
503 .type = (void *)&asn1_DEF_vrange,
504 .memb_constraints = 0, /* Defer to actual type */
505 .name = "vrange"
Lev Walkinf15320b2004-06-03 03:38:44 +0000506 },
507};
Lev Walkincda6b8a2004-06-06 07:20:52 +0000508static asn1_TYPE_tag2member_t asn1_DEF_VariablePart_tag2el[] = {
Lev Walkin38abe792004-06-14 13:09:45 +0000509 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* vrange at 45 */
510 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 }, /* vset at 42 */
Lev Walkinf15320b2004-06-03 03:38:44 +0000511};
512static asn1_CHOICE_specifics_t asn1_DEF_VariablePart_specs = {
513 sizeof(struct VariablePart),
514 offsetof(struct VariablePart, _ber_dec_ctx),
515 offsetof(struct VariablePart, present),
516 sizeof(((struct VariablePart *)0)->present),
Lev Walkinf15320b2004-06-03 03:38:44 +0000517 asn1_DEF_VariablePart_tag2el,
518 2, /* Count of tags in the map */
Lev Walkind64497c2004-07-01 00:49:55 +0000519 1 /* Whether extensible */
Lev Walkinf15320b2004-06-03 03:38:44 +0000520};
521asn1_TYPE_descriptor_t asn1_DEF_VariablePart = {
522 "VariablePart",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000523 CHOICE_free,
524 CHOICE_print,
Lev Walkinf15320b2004-06-03 03:38:44 +0000525 CHOICE_constraint,
526 CHOICE_decode_ber,
527 CHOICE_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000528 0, /* Not implemented yet */
529 CHOICE_encode_xer,
Lev Walkinf15320b2004-06-03 03:38:44 +0000530 CHOICE_outmost_tag,
Lev Walkin188ed2c2004-09-13 08:31:01 +0000531 0, /* No effective tags (pointer) */
532 0, /* No effective tags (count) */
533 0, /* No tags (pointer) */
534 0, /* No tags (count) */
Lev Walkinf15320b2004-06-03 03:38:44 +0000535 1, /* Whether CONSTRUCTED */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000536 asn1_MBR_VariablePart,
537 2, /* Elements count */
Lev Walkinf15320b2004-06-03 03:38:44 +0000538 &asn1_DEF_VariablePart_specs /* Additional specs */
539};
540
541
Lev Walkinb47ddce2004-08-11 05:25:47 +0000542/*** <<< INCLUDES [ActionItem] >>> ***/
Lev Walkinf15320b2004-06-03 03:38:44 +0000543
Lev Walkinf15320b2004-06-03 03:38:44 +0000544#include <ENUMERATED.h>
Lev Walkinb47ddce2004-08-11 05:25:47 +0000545#include <BOOLEAN.h>
546#include <VisibleString.h>
547#include <asn_SET_OF.h>
548#include <constr_SET_OF.h>
549#include <constr_SEQUENCE.h>
550
551/*** <<< DEPS [ActionItem] >>> ***/
Lev Walkinf15320b2004-06-03 03:38:44 +0000552
Lev Walkin2e3055d2004-08-20 13:36:32 +0000553typedef enum accept_as {
554 accept_as_unknown = 0,
555 accept_as_safe = 1,
556 accept_as_unsafe = 2,
557 /*
558 * Enumeration is extensible
559 */
560} accept_as_e;
Lev Walkinf15320b2004-06-03 03:38:44 +0000561extern asn1_TYPE_descriptor_t asn1_DEF_ActionItem;
562
563/*** <<< TYPE-DECLS [ActionItem] >>> ***/
564
565
566typedef struct ActionItem {
567 ENUMERATED_t accept_as;
568 struct notify {
569 BOOLEAN_t critical;
570 struct email {
571 A_SET_OF(VisibleString_t) list;
572
573 /* Context for parsing across buffer boundaries */
574 ber_dec_ctx_t _ber_dec_ctx;
575 } email;
576 /*
577 * This type is extensible,
578 * possible extensions are below.
579 */
580
581 /* Context for parsing across buffer boundaries */
582 ber_dec_ctx_t _ber_dec_ctx;
583 } *notify;
584 /*
585 * This type is extensible,
586 * possible extensions are below.
587 */
588
589 /* Context for parsing across buffer boundaries */
590 ber_dec_ctx_t _ber_dec_ctx;
591} ActionItem_t;
592
593/*** <<< STAT-DEFS [ActionItem] >>> ***/
594
Lev Walkin2e3055d2004-08-20 13:36:32 +0000595static asn1_TYPE_member_t asn1_MBR_email[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000596 { ATF_NOFLAGS, 0, 0,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000597 .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
598 .tag_mode = 0,
599 .type = (void *)&asn1_DEF_VisibleString,
600 .memb_constraints = 0, /* Defer to actual type */
601 .name = ""
Lev Walkinf15320b2004-06-03 03:38:44 +0000602 },
Lev Walkin2e3055d2004-08-20 13:36:32 +0000603};
604static ber_tlv_tag_t asn1_DEF_email_tags[] = {
605 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
606};
607static asn1_SET_OF_specifics_t asn1_DEF_email_specs = {
608 sizeof(struct email),
609 offsetof(struct email, _ber_dec_ctx),
Lev Walkina9cc46e2004-09-22 16:06:28 +0000610 0, /* XER encoding is XMLDelimitedItemList */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000611};
Lev Walkind04430c2004-09-07 06:44:29 +0000612static /* Use -fall-defs-global to expose */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000613asn1_TYPE_descriptor_t asn1_DEF_email = {
614 "email",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000615 SET_OF_free,
616 SET_OF_print,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000617 SET_OF_constraint,
618 SET_OF_decode_ber,
619 SET_OF_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000620 0, /* Not implemented yet */
621 SET_OF_encode_xer,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000622 0, /* Use generic outmost tag fetcher */
623 asn1_DEF_email_tags,
624 sizeof(asn1_DEF_email_tags)
625 /sizeof(asn1_DEF_email_tags[0]), /* 1 */
Lev Walkin188ed2c2004-09-13 08:31:01 +0000626 asn1_DEF_email_tags, /* Same as above */
627 sizeof(asn1_DEF_email_tags)
628 /sizeof(asn1_DEF_email_tags[0]), /* 1 */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000629 1, /* Whether CONSTRUCTED */
630 asn1_MBR_email,
631 1, /* Single element */
632 &asn1_DEF_email_specs /* Additional specs */
633};
634
635static asn1_TYPE_member_t asn1_MBR_notify[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000636 { ATF_NOFLAGS, 0, offsetof(struct notify, critical),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000637 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
638 .tag_mode = 0,
639 .type = (void *)&asn1_DEF_BOOLEAN,
640 .memb_constraints = 0, /* Defer to actual type */
641 .name = "critical"
642 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000643 { ATF_NOFLAGS, 0, offsetof(struct notify, email),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000644 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
645 .tag_mode = 0,
646 .type = (void *)&asn1_DEF_email,
647 .memb_constraints = 0, /* Defer to actual type */
648 .name = "email"
649 },
650};
651static ber_tlv_tag_t asn1_DEF_notify_tags[] = {
652 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
653};
654static asn1_TYPE_tag2member_t asn1_DEF_notify_tag2el[] = {
655 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* critical at 61 */
656 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 1, 0, 0 }, /* email at 62 */
657};
658static asn1_SEQUENCE_specifics_t asn1_DEF_notify_specs = {
659 sizeof(struct notify),
660 offsetof(struct notify, _ber_dec_ctx),
661 asn1_DEF_notify_tag2el,
662 2, /* Count of tags in the map */
663 1, /* Start extensions */
664 3 /* Stop extensions */
665};
Lev Walkind04430c2004-09-07 06:44:29 +0000666static /* Use -fall-defs-global to expose */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000667asn1_TYPE_descriptor_t asn1_DEF_notify = {
668 "notify",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000669 SEQUENCE_free,
670 SEQUENCE_print,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000671 SEQUENCE_constraint,
672 SEQUENCE_decode_ber,
673 SEQUENCE_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000674 0, /* Not implemented yet */
675 SEQUENCE_encode_xer,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000676 0, /* Use generic outmost tag fetcher */
677 asn1_DEF_notify_tags,
678 sizeof(asn1_DEF_notify_tags)
679 /sizeof(asn1_DEF_notify_tags[0]), /* 1 */
Lev Walkin188ed2c2004-09-13 08:31:01 +0000680 asn1_DEF_notify_tags, /* Same as above */
681 sizeof(asn1_DEF_notify_tags)
682 /sizeof(asn1_DEF_notify_tags[0]), /* 1 */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000683 1, /* Whether CONSTRUCTED */
684 asn1_MBR_notify,
685 2, /* Elements count */
686 &asn1_DEF_notify_specs /* Additional specs */
687};
688
689static asn1_TYPE_member_t asn1_MBR_ActionItem[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000690 { ATF_NOFLAGS, 0, offsetof(struct ActionItem, accept_as),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000691 .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
692 .tag_mode = 0,
693 .type = (void *)&asn1_DEF_ENUMERATED,
694 .memb_constraints = 0, /* Defer to actual type */
695 .name = "accept-as"
696 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000697 { ATF_POINTER, 1, offsetof(struct ActionItem, notify),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000698 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
699 .tag_mode = 0,
700 .type = (void *)&asn1_DEF_notify,
701 .memb_constraints = 0, /* Defer to actual type */
702 .name = "notify"
Lev Walkinf15320b2004-06-03 03:38:44 +0000703 },
704};
705static ber_tlv_tag_t asn1_DEF_ActionItem_tags[] = {
706 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
707};
Lev Walkincda6b8a2004-06-06 07:20:52 +0000708static asn1_TYPE_tag2member_t asn1_DEF_ActionItem_tag2el[] = {
Lev Walkin38abe792004-06-14 13:09:45 +0000709 { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 }, /* accept-as at 55 */
710 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* notify at 61 */
Lev Walkincda6b8a2004-06-06 07:20:52 +0000711};
Lev Walkinf15320b2004-06-03 03:38:44 +0000712static asn1_SEQUENCE_specifics_t asn1_DEF_ActionItem_specs = {
713 sizeof(struct ActionItem),
714 offsetof(struct ActionItem, _ber_dec_ctx),
Lev Walkincda6b8a2004-06-06 07:20:52 +0000715 asn1_DEF_ActionItem_tag2el,
716 2, /* Count of tags in the map */
Lev Walkinf15320b2004-06-03 03:38:44 +0000717 1, /* Start extensions */
718 3 /* Stop extensions */
719};
720asn1_TYPE_descriptor_t asn1_DEF_ActionItem = {
721 "ActionItem",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000722 SEQUENCE_free,
723 SEQUENCE_print,
Lev Walkinf15320b2004-06-03 03:38:44 +0000724 SEQUENCE_constraint,
725 SEQUENCE_decode_ber,
726 SEQUENCE_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000727 0, /* Not implemented yet */
728 SEQUENCE_encode_xer,
Lev Walkinf15320b2004-06-03 03:38:44 +0000729 0, /* Use generic outmost tag fetcher */
730 asn1_DEF_ActionItem_tags,
731 sizeof(asn1_DEF_ActionItem_tags)
Lev Walkin64399722004-08-11 07:17:22 +0000732 /sizeof(asn1_DEF_ActionItem_tags[0]), /* 1 */
Lev Walkin188ed2c2004-09-13 08:31:01 +0000733 asn1_DEF_ActionItem_tags, /* Same as above */
734 sizeof(asn1_DEF_ActionItem_tags)
735 /sizeof(asn1_DEF_ActionItem_tags[0]), /* 1 */
Lev Walkinf15320b2004-06-03 03:38:44 +0000736 1, /* Whether CONSTRUCTED */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000737 asn1_MBR_ActionItem,
738 2, /* Elements count */
Lev Walkinf15320b2004-06-03 03:38:44 +0000739 &asn1_DEF_ActionItem_specs /* Additional specs */
740};
741