blob: 93397537e51f33780a93aaf74234725e4233e59e [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 <asn_SEQUENCE_OF.h>
Lev Walkinb47ddce2004-08-11 05:25:47 +00006#include <constr_SEQUENCE_OF.h>
Lev Walkinf15320b2004-06-03 03:38:44 +00007#include <constr_SEQUENCE.h>
8
Lev Walkinc8285712005-03-04 22:18:20 +00009/*** <<< FWD-DECLS [LogLine] >>> ***/
Lev Walkinb47ddce2004-08-11 05:25:47 +000010
Lev Walkinbf56d542005-03-04 23:50:56 +000011struct VariablePartSet;
Lev Walkinf15320b2004-06-03 03:38:44 +000012
13/*** <<< TYPE-DECLS [LogLine] >>> ***/
14
Lev Walkinf15320b2004-06-03 03:38:44 +000015typedef struct LogLine {
16 IA5String_t line_digest;
17 struct varsets {
Lev Walkinc8285712005-03-04 22:18:20 +000018 A_SEQUENCE_OF(struct VariablePartSet) list;
Lev Walkinf15320b2004-06-03 03:38:44 +000019
20 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +000021 asn_struct_ctx_t _asn_ctx;
Lev Walkinf15320b2004-06-03 03:38:44 +000022 } varsets;
23 /*
24 * This type is extensible,
25 * possible extensions are below.
26 */
27
28 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +000029 asn_struct_ctx_t _asn_ctx;
Lev Walkinf15320b2004-06-03 03:38:44 +000030} LogLine_t;
31
Lev Walkinc8285712005-03-04 22:18:20 +000032/*** <<< FUNC-DECLS [LogLine] >>> ***/
33
34extern asn_TYPE_descriptor_t asn_DEF_LogLine;
35
36/*** <<< POST-INCLUDE [LogLine] >>> ***/
37
38#include <VariablePartSet.h>
39
Lev Walkin2e3055d2004-08-20 13:36:32 +000040/*** <<< CODE [LogLine] >>> ***/
41
42static int
Lev Walkindfae9752004-09-29 13:19:37 +000043memb_varsets_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin2e3055d2004-08-20 13:36:32 +000044 asn_app_consume_bytes_f *app_errlog, void *app_key) {
45 size_t size;
46
47 if(!sptr) {
48 _ASN_ERRLOG(app_errlog, app_key,
Lev Walkin16835b62004-08-22 13:47:59 +000049 "%s: value not given (%s:%d)",
50 td->name, __FILE__, __LINE__);
Lev Walkin2e3055d2004-08-20 13:36:32 +000051 return -1;
52 }
53
Lev Walkin66d542b2005-07-04 02:03:57 +000054 /* Determine the number of elements */
55 size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
Lev Walkin2e3055d2004-08-20 13:36:32 +000056
57 if((size >= 1)) {
Lev Walkin29a82192005-03-29 19:05:37 +000058 /* Perform validation of the inner elements */
Lev Walkin87b14d32005-03-31 21:52:53 +000059 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin2e3055d2004-08-20 13:36:32 +000060 } else {
61 _ASN_ERRLOG(app_errlog, app_key,
Lev Walkin16835b62004-08-22 13:47:59 +000062 "%s: constraint failed (%s:%d)",
63 td->name, __FILE__, __LINE__);
Lev Walkin2e3055d2004-08-20 13:36:32 +000064 return -1;
65 }
66}
67
68
Lev Walkinf15320b2004-06-03 03:38:44 +000069/*** <<< STAT-DEFS [LogLine] >>> ***/
70
Lev Walkine8318b82005-03-06 09:29:03 +000071static asn_TYPE_member_t asn_MBR_varsets_3[] = {
Lev Walkin8eb4b572005-08-16 16:57:17 +000072 { ATF_POINTER, 0, 0,
Lev Walkin2e3055d2004-08-20 13:36:32 +000073 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
74 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +000075 .type = (void *)&asn_DEF_VariablePartSet,
Lev Walkinba58e1b2005-01-17 12:20:19 +000076 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +000077 .name = ""
Lev Walkinf15320b2004-06-03 03:38:44 +000078 },
Lev Walkin2e3055d2004-08-20 13:36:32 +000079};
Lev Walkine8318b82005-03-06 09:29:03 +000080static ber_tlv_tag_t asn_DEF_varsets_3_tags[] = {
Lev Walkin2e3055d2004-08-20 13:36:32 +000081 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
82};
Lev Walkine8318b82005-03-06 09:29:03 +000083static asn_SET_OF_specifics_t asn_SPC_varsets_3_specs = {
Lev Walkin2e3055d2004-08-20 13:36:32 +000084 sizeof(struct varsets),
Lev Walkindfae9752004-09-29 13:19:37 +000085 offsetof(struct varsets, _asn_ctx),
Lev Walkina9cc46e2004-09-22 16:06:28 +000086 0, /* XER encoding is XMLDelimitedItemList */
Lev Walkin2e3055d2004-08-20 13:36:32 +000087};
Lev Walkind04430c2004-09-07 06:44:29 +000088static /* Use -fall-defs-global to expose */
Lev Walkine8318b82005-03-06 09:29:03 +000089asn_TYPE_descriptor_t asn_DEF_varsets_3 = {
Lev Walkin2e3055d2004-08-20 13:36:32 +000090 "varsets",
Lev Walkindc06f6b2004-10-20 15:50:55 +000091 "varsets",
Lev Walkina9cc46e2004-09-22 16:06:28 +000092 SEQUENCE_OF_free,
93 SEQUENCE_OF_print,
Lev Walkin2e3055d2004-08-20 13:36:32 +000094 SEQUENCE_OF_constraint,
95 SEQUENCE_OF_decode_ber,
96 SEQUENCE_OF_encode_der,
Lev Walkinb2230802005-02-14 20:31:31 +000097 SEQUENCE_OF_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +000098 SEQUENCE_OF_encode_xer,
Lev Walkin2e3055d2004-08-20 13:36:32 +000099 0, /* Use generic outmost tag fetcher */
Lev Walkine8318b82005-03-06 09:29:03 +0000100 asn_DEF_varsets_3_tags,
101 sizeof(asn_DEF_varsets_3_tags)
102 /sizeof(asn_DEF_varsets_3_tags[0]), /* 1 */
103 asn_DEF_varsets_3_tags, /* Same as above */
104 sizeof(asn_DEF_varsets_3_tags)
105 /sizeof(asn_DEF_varsets_3_tags[0]), /* 1 */
106 asn_MBR_varsets_3,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000107 1, /* Single element */
Lev Walkine8318b82005-03-06 09:29:03 +0000108 &asn_SPC_varsets_3_specs /* Additional specs */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000109};
110
Lev Walkine0272aa2005-03-04 11:26:08 +0000111static asn_TYPE_member_t asn_MBR_LogLine_1[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000112 { ATF_NOFLAGS, 0, offsetof(struct LogLine, line_digest),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000113 .tag = (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)),
114 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +0000115 .type = (void *)&asn_DEF_IA5String,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000116 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000117 .name = "line-digest"
118 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000119 { ATF_NOFLAGS, 0, offsetof(struct LogLine, varsets),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000120 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
121 .tag_mode = 0,
Lev Walkine8318b82005-03-06 09:29:03 +0000122 .type = (void *)&asn_DEF_varsets_3,
Lev Walkina09e5da2004-08-22 03:19:00 +0000123 .memb_constraints = memb_varsets_1_constraint,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000124 .name = "varsets"
Lev Walkinf15320b2004-06-03 03:38:44 +0000125 },
126};
Lev Walkine0272aa2005-03-04 11:26:08 +0000127static ber_tlv_tag_t asn_DEF_LogLine_1_tags[] = {
Lev Walkinf15320b2004-06-03 03:38:44 +0000128 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
129};
Lev Walkine0272aa2005-03-04 11:26:08 +0000130static asn_TYPE_tag2member_t asn_MAP_LogLine_1_tag2el[] = {
Lev Walkin38abe792004-06-14 13:09:45 +0000131 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* varsets at 25 */
Lev Walkinbbe38662005-02-25 08:17:56 +0000132 { (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), 0, 0, 0 } /* line-digest at 23 */
Lev Walkincda6b8a2004-06-06 07:20:52 +0000133};
Lev Walkine0272aa2005-03-04 11:26:08 +0000134static asn_SEQUENCE_specifics_t asn_SPC_LogLine_1_specs = {
Lev Walkinf15320b2004-06-03 03:38:44 +0000135 sizeof(struct LogLine),
Lev Walkindfae9752004-09-29 13:19:37 +0000136 offsetof(struct LogLine, _asn_ctx),
Lev Walkine0272aa2005-03-04 11:26:08 +0000137 asn_MAP_LogLine_1_tag2el,
Lev Walkincda6b8a2004-06-06 07:20:52 +0000138 2, /* Count of tags in the map */
Lev Walkinf15320b2004-06-03 03:38:44 +0000139 1, /* Start extensions */
140 3 /* Stop extensions */
141};
Lev Walkindfae9752004-09-29 13:19:37 +0000142asn_TYPE_descriptor_t asn_DEF_LogLine = {
Lev Walkinf15320b2004-06-03 03:38:44 +0000143 "LogLine",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000144 "LogLine",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000145 SEQUENCE_free,
146 SEQUENCE_print,
Lev Walkinf15320b2004-06-03 03:38:44 +0000147 SEQUENCE_constraint,
148 SEQUENCE_decode_ber,
149 SEQUENCE_encode_der,
Lev Walkin61b40d82004-10-23 15:07:45 +0000150 SEQUENCE_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000151 SEQUENCE_encode_xer,
Lev Walkinf15320b2004-06-03 03:38:44 +0000152 0, /* Use generic outmost tag fetcher */
Lev Walkine0272aa2005-03-04 11:26:08 +0000153 asn_DEF_LogLine_1_tags,
154 sizeof(asn_DEF_LogLine_1_tags)
155 /sizeof(asn_DEF_LogLine_1_tags[0]), /* 1 */
156 asn_DEF_LogLine_1_tags, /* Same as above */
157 sizeof(asn_DEF_LogLine_1_tags)
158 /sizeof(asn_DEF_LogLine_1_tags[0]), /* 1 */
159 asn_MBR_LogLine_1,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000160 2, /* Elements count */
Lev Walkine0272aa2005-03-04 11:26:08 +0000161 &asn_SPC_LogLine_1_specs /* Additional specs */
Lev Walkinf15320b2004-06-03 03:38:44 +0000162};
163
164
Lev Walkinb47ddce2004-08-11 05:25:47 +0000165/*** <<< INCLUDES [VariablePartSet] >>> ***/
Lev Walkinf15320b2004-06-03 03:38:44 +0000166
Lev Walkinf15320b2004-06-03 03:38:44 +0000167#include <ActionItem.h>
Lev Walkinf15320b2004-06-03 03:38:44 +0000168#include <asn_SEQUENCE_OF.h>
Lev Walkinb47ddce2004-08-11 05:25:47 +0000169#include <constr_SEQUENCE_OF.h>
Lev Walkinf15320b2004-06-03 03:38:44 +0000170#include <constr_SEQUENCE.h>
171
Lev Walkinc8285712005-03-04 22:18:20 +0000172/*** <<< FWD-DECLS [VariablePartSet] >>> ***/
Lev Walkinb47ddce2004-08-11 05:25:47 +0000173
Lev Walkinbf56d542005-03-04 23:50:56 +0000174struct VariablePart;
Lev Walkinf15320b2004-06-03 03:38:44 +0000175
176/*** <<< TYPE-DECLS [VariablePartSet] >>> ***/
177
Lev Walkinf15320b2004-06-03 03:38:44 +0000178typedef struct VariablePartSet {
179 struct vparts {
Lev Walkinc8285712005-03-04 22:18:20 +0000180 A_SEQUENCE_OF(struct VariablePart) list;
Lev Walkinf15320b2004-06-03 03:38:44 +0000181
182 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +0000183 asn_struct_ctx_t _asn_ctx;
Lev Walkinf15320b2004-06-03 03:38:44 +0000184 } vparts;
185 ActionItem_t resolution;
186 /*
187 * This type is extensible,
188 * possible extensions are below.
189 */
190
191 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +0000192 asn_struct_ctx_t _asn_ctx;
Lev Walkinf15320b2004-06-03 03:38:44 +0000193} VariablePartSet_t;
194
Lev Walkinc8285712005-03-04 22:18:20 +0000195/*** <<< FUNC-DECLS [VariablePartSet] >>> ***/
196
197extern asn_TYPE_descriptor_t asn_DEF_VariablePartSet;
198
199/*** <<< POST-INCLUDE [VariablePartSet] >>> ***/
200
201#include <VariablePart.h>
202
Lev Walkin2e3055d2004-08-20 13:36:32 +0000203/*** <<< CODE [VariablePartSet] >>> ***/
204
205static int
Lev Walkine0272aa2005-03-04 11:26:08 +0000206memb_vparts_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000207 asn_app_consume_bytes_f *app_errlog, void *app_key) {
208
209 if(!sptr) {
210 _ASN_ERRLOG(app_errlog, app_key,
Lev Walkin16835b62004-08-22 13:47:59 +0000211 "%s: value not given (%s:%d)",
212 td->name, __FILE__, __LINE__);
Lev Walkin2e3055d2004-08-20 13:36:32 +0000213 return -1;
214 }
215
216
217 if(1 /* No applicable constraints whatsoever */) {
218 /* Nothing is here. See below */
219 }
220
Lev Walkin154aa182004-09-26 13:12:56 +0000221 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin2e3055d2004-08-20 13:36:32 +0000222}
223
224
Lev Walkinf15320b2004-06-03 03:38:44 +0000225/*** <<< STAT-DEFS [VariablePartSet] >>> ***/
226
Lev Walkine0272aa2005-03-04 11:26:08 +0000227static asn_TYPE_member_t asn_MBR_vparts_2[] = {
Lev Walkin8eb4b572005-08-16 16:57:17 +0000228 { ATF_POINTER, 0, 0,
Lev Walkinb9189732004-09-10 09:37:12 +0000229 .tag = -1 /* Ambiguous tag (CHOICE?) */,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000230 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +0000231 .type = (void *)&asn_DEF_VariablePart,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000232 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000233 .name = ""
Lev Walkinf15320b2004-06-03 03:38:44 +0000234 },
Lev Walkin2e3055d2004-08-20 13:36:32 +0000235};
Lev Walkine0272aa2005-03-04 11:26:08 +0000236static ber_tlv_tag_t asn_DEF_vparts_2_tags[] = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000237 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
238};
Lev Walkine0272aa2005-03-04 11:26:08 +0000239static asn_SET_OF_specifics_t asn_SPC_vparts_2_specs = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000240 sizeof(struct vparts),
Lev Walkindfae9752004-09-29 13:19:37 +0000241 offsetof(struct vparts, _asn_ctx),
Lev Walkind6aa7aa2005-03-10 13:47:58 +0000242 0, /* XER encoding is XMLDelimitedItemList */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000243};
Lev Walkind04430c2004-09-07 06:44:29 +0000244static /* Use -fall-defs-global to expose */
Lev Walkine0272aa2005-03-04 11:26:08 +0000245asn_TYPE_descriptor_t asn_DEF_vparts_2 = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000246 "vparts",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000247 "vparts",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000248 SEQUENCE_OF_free,
249 SEQUENCE_OF_print,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000250 SEQUENCE_OF_constraint,
251 SEQUENCE_OF_decode_ber,
252 SEQUENCE_OF_encode_der,
Lev Walkinb2230802005-02-14 20:31:31 +0000253 SEQUENCE_OF_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000254 SEQUENCE_OF_encode_xer,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000255 0, /* Use generic outmost tag fetcher */
Lev Walkine0272aa2005-03-04 11:26:08 +0000256 asn_DEF_vparts_2_tags,
257 sizeof(asn_DEF_vparts_2_tags)
258 /sizeof(asn_DEF_vparts_2_tags[0]), /* 1 */
259 asn_DEF_vparts_2_tags, /* Same as above */
260 sizeof(asn_DEF_vparts_2_tags)
261 /sizeof(asn_DEF_vparts_2_tags[0]), /* 1 */
262 asn_MBR_vparts_2,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000263 1, /* Single element */
Lev Walkine0272aa2005-03-04 11:26:08 +0000264 &asn_SPC_vparts_2_specs /* Additional specs */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000265};
266
Lev Walkine0272aa2005-03-04 11:26:08 +0000267static asn_TYPE_member_t asn_MBR_VariablePartSet_1[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000268 { ATF_NOFLAGS, 0, offsetof(struct VariablePartSet, vparts),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000269 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
270 .tag_mode = 0,
Lev Walkine0272aa2005-03-04 11:26:08 +0000271 .type = (void *)&asn_DEF_vparts_2,
272 .memb_constraints = memb_vparts_1_constraint,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000273 .name = "vparts"
274 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000275 { ATF_NOFLAGS, 0, offsetof(struct VariablePartSet, resolution),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000276 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
277 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +0000278 .type = (void *)&asn_DEF_ActionItem,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000279 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000280 .name = "resolution"
Lev Walkinf15320b2004-06-03 03:38:44 +0000281 },
282};
Lev Walkine0272aa2005-03-04 11:26:08 +0000283static ber_tlv_tag_t asn_DEF_VariablePartSet_1_tags[] = {
Lev Walkinf15320b2004-06-03 03:38:44 +0000284 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
285};
Lev Walkine0272aa2005-03-04 11:26:08 +0000286static asn_TYPE_tag2member_t asn_MAP_VariablePartSet_1_tag2el[] = {
Lev Walkin38abe792004-06-14 13:09:45 +0000287 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* vparts at 33 */
Lev Walkinbbe38662005-02-25 08:17:56 +0000288 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 } /* resolution at 35 */
Lev Walkincda6b8a2004-06-06 07:20:52 +0000289};
Lev Walkine0272aa2005-03-04 11:26:08 +0000290static asn_SEQUENCE_specifics_t asn_SPC_VariablePartSet_1_specs = {
Lev Walkinf15320b2004-06-03 03:38:44 +0000291 sizeof(struct VariablePartSet),
Lev Walkindfae9752004-09-29 13:19:37 +0000292 offsetof(struct VariablePartSet, _asn_ctx),
Lev Walkine0272aa2005-03-04 11:26:08 +0000293 asn_MAP_VariablePartSet_1_tag2el,
Lev Walkincda6b8a2004-06-06 07:20:52 +0000294 2, /* Count of tags in the map */
Lev Walkinf15320b2004-06-03 03:38:44 +0000295 1, /* Start extensions */
296 3 /* Stop extensions */
297};
Lev Walkindfae9752004-09-29 13:19:37 +0000298asn_TYPE_descriptor_t asn_DEF_VariablePartSet = {
Lev Walkinf15320b2004-06-03 03:38:44 +0000299 "VariablePartSet",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000300 "VariablePartSet",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000301 SEQUENCE_free,
302 SEQUENCE_print,
Lev Walkinf15320b2004-06-03 03:38:44 +0000303 SEQUENCE_constraint,
304 SEQUENCE_decode_ber,
305 SEQUENCE_encode_der,
Lev Walkin61b40d82004-10-23 15:07:45 +0000306 SEQUENCE_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000307 SEQUENCE_encode_xer,
Lev Walkinf15320b2004-06-03 03:38:44 +0000308 0, /* Use generic outmost tag fetcher */
Lev Walkine0272aa2005-03-04 11:26:08 +0000309 asn_DEF_VariablePartSet_1_tags,
310 sizeof(asn_DEF_VariablePartSet_1_tags)
311 /sizeof(asn_DEF_VariablePartSet_1_tags[0]), /* 1 */
312 asn_DEF_VariablePartSet_1_tags, /* Same as above */
313 sizeof(asn_DEF_VariablePartSet_1_tags)
314 /sizeof(asn_DEF_VariablePartSet_1_tags[0]), /* 1 */
315 asn_MBR_VariablePartSet_1,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000316 2, /* Elements count */
Lev Walkine0272aa2005-03-04 11:26:08 +0000317 &asn_SPC_VariablePartSet_1_specs /* Additional specs */
Lev Walkinf15320b2004-06-03 03:38:44 +0000318};
319
320
Lev Walkinb47ddce2004-08-11 05:25:47 +0000321/*** <<< INCLUDES [VariablePart] >>> ***/
Lev Walkinf15320b2004-06-03 03:38:44 +0000322
Lev Walkinf15320b2004-06-03 03:38:44 +0000323#include <VisibleString.h>
324#include <asn_SET_OF.h>
Lev Walkinb47ddce2004-08-11 05:25:47 +0000325#include <constr_SET_OF.h>
326#include <constr_SEQUENCE.h>
327#include <constr_CHOICE.h>
Lev Walkinf15320b2004-06-03 03:38:44 +0000328
Lev Walkinb47ddce2004-08-11 05:25:47 +0000329/*** <<< DEPS [VariablePart] >>> ***/
Lev Walkinf15320b2004-06-03 03:38:44 +0000330
Lev Walkinb47ddce2004-08-11 05:25:47 +0000331typedef enum VariablePart_PR {
332 VariablePart_PR_NOTHING, /* No components present */
333 VariablePart_PR_vset,
334 VariablePart_PR_vrange,
335 /* Extensions may appear below */
Lev Walkin64399722004-08-11 07:17:22 +0000336} VariablePart_PR;
Lev Walkinf15320b2004-06-03 03:38:44 +0000337
338/*** <<< TYPE-DECLS [VariablePart] >>> ***/
339
Lev Walkinf15320b2004-06-03 03:38:44 +0000340typedef struct VariablePart {
Lev Walkin64399722004-08-11 07:17:22 +0000341 VariablePart_PR present;
Lev Walkin0f5d74c2005-08-14 15:03:31 +0000342 union VariablePart_u {
Lev Walkinf15320b2004-06-03 03:38:44 +0000343 struct vset {
344 A_SET_OF(VisibleString_t) list;
345
346 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +0000347 asn_struct_ctx_t _asn_ctx;
Lev Walkinf15320b2004-06-03 03:38:44 +0000348 } vset;
349 struct vrange {
350 VisibleString_t from;
351 VisibleString_t to;
352 /*
353 * This type is extensible,
354 * possible extensions are below.
355 */
356
357 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +0000358 asn_struct_ctx_t _asn_ctx;
Lev Walkinf15320b2004-06-03 03:38:44 +0000359 } vrange;
360 /*
361 * This type is extensible,
362 * possible extensions are below.
363 */
364 } choice;
365
366 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +0000367 asn_struct_ctx_t _asn_ctx;
Lev Walkinf15320b2004-06-03 03:38:44 +0000368} VariablePart_t;
369
Lev Walkinc8285712005-03-04 22:18:20 +0000370/*** <<< FUNC-DECLS [VariablePart] >>> ***/
371
372extern asn_TYPE_descriptor_t asn_DEF_VariablePart;
373
Lev Walkin2e3055d2004-08-20 13:36:32 +0000374/*** <<< CODE [VariablePart] >>> ***/
375
376static int
Lev Walkine0272aa2005-03-04 11:26:08 +0000377memb_vset_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000378 asn_app_consume_bytes_f *app_errlog, void *app_key) {
379 size_t size;
380
381 if(!sptr) {
382 _ASN_ERRLOG(app_errlog, app_key,
Lev Walkin16835b62004-08-22 13:47:59 +0000383 "%s: value not given (%s:%d)",
384 td->name, __FILE__, __LINE__);
Lev Walkin2e3055d2004-08-20 13:36:32 +0000385 return -1;
386 }
387
Lev Walkin66d542b2005-07-04 02:03:57 +0000388 /* Determine the number of elements */
389 size = _A_CSET_FROM_VOID(sptr)->count;
Lev Walkin2e3055d2004-08-20 13:36:32 +0000390
391 if((size >= 1)) {
Lev Walkin29a82192005-03-29 19:05:37 +0000392 /* Perform validation of the inner elements */
Lev Walkin87b14d32005-03-31 21:52:53 +0000393 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin2e3055d2004-08-20 13:36:32 +0000394 } else {
395 _ASN_ERRLOG(app_errlog, app_key,
Lev Walkin16835b62004-08-22 13:47:59 +0000396 "%s: constraint failed (%s:%d)",
397 td->name, __FILE__, __LINE__);
Lev Walkin2e3055d2004-08-20 13:36:32 +0000398 return -1;
399 }
400}
401
402
Lev Walkinf15320b2004-06-03 03:38:44 +0000403/*** <<< STAT-DEFS [VariablePart] >>> ***/
404
Lev Walkine0272aa2005-03-04 11:26:08 +0000405static asn_TYPE_member_t asn_MBR_vset_2[] = {
Lev Walkin8eb4b572005-08-16 16:57:17 +0000406 { ATF_POINTER, 0, 0,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000407 .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
408 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +0000409 .type = (void *)&asn_DEF_VisibleString,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000410 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000411 .name = ""
Lev Walkinf15320b2004-06-03 03:38:44 +0000412 },
Lev Walkin2e3055d2004-08-20 13:36:32 +0000413};
Lev Walkine0272aa2005-03-04 11:26:08 +0000414static ber_tlv_tag_t asn_DEF_vset_2_tags[] = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000415 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
416};
Lev Walkine0272aa2005-03-04 11:26:08 +0000417static asn_SET_OF_specifics_t asn_SPC_vset_2_specs = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000418 sizeof(struct vset),
Lev Walkindfae9752004-09-29 13:19:37 +0000419 offsetof(struct vset, _asn_ctx),
Lev Walkina9cc46e2004-09-22 16:06:28 +0000420 0, /* XER encoding is XMLDelimitedItemList */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000421};
Lev Walkind04430c2004-09-07 06:44:29 +0000422static /* Use -fall-defs-global to expose */
Lev Walkine0272aa2005-03-04 11:26:08 +0000423asn_TYPE_descriptor_t asn_DEF_vset_2 = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000424 "vset",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000425 "vset",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000426 SET_OF_free,
427 SET_OF_print,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000428 SET_OF_constraint,
429 SET_OF_decode_ber,
430 SET_OF_encode_der,
Lev Walkinb2230802005-02-14 20:31:31 +0000431 SET_OF_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000432 SET_OF_encode_xer,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000433 0, /* Use generic outmost tag fetcher */
Lev Walkine0272aa2005-03-04 11:26:08 +0000434 asn_DEF_vset_2_tags,
435 sizeof(asn_DEF_vset_2_tags)
436 /sizeof(asn_DEF_vset_2_tags[0]), /* 1 */
437 asn_DEF_vset_2_tags, /* Same as above */
438 sizeof(asn_DEF_vset_2_tags)
439 /sizeof(asn_DEF_vset_2_tags[0]), /* 1 */
440 asn_MBR_vset_2,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000441 1, /* Single element */
Lev Walkine0272aa2005-03-04 11:26:08 +0000442 &asn_SPC_vset_2_specs /* Additional specs */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000443};
444
Lev Walkine8318b82005-03-06 09:29:03 +0000445static asn_TYPE_member_t asn_MBR_vrange_4[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000446 { ATF_NOFLAGS, 0, offsetof(struct vrange, from),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000447 .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
448 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +0000449 .type = (void *)&asn_DEF_VisibleString,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000450 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000451 .name = "from"
452 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000453 { ATF_NOFLAGS, 0, offsetof(struct vrange, to),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000454 .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
455 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +0000456 .type = (void *)&asn_DEF_VisibleString,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000457 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000458 .name = "to"
459 },
460};
Lev Walkine8318b82005-03-06 09:29:03 +0000461static ber_tlv_tag_t asn_DEF_vrange_4_tags[] = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000462 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
463};
Lev Walkine8318b82005-03-06 09:29:03 +0000464static asn_TYPE_tag2member_t asn_MAP_vrange_4_tag2el[] = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000465 { (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 0, 0, 1 }, /* from at 45 */
Lev Walkinbbe38662005-02-25 08:17:56 +0000466 { (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 1, -1, 0 } /* to at 46 */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000467};
Lev Walkine8318b82005-03-06 09:29:03 +0000468static asn_SEQUENCE_specifics_t asn_SPC_vrange_4_specs = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000469 sizeof(struct vrange),
Lev Walkindfae9752004-09-29 13:19:37 +0000470 offsetof(struct vrange, _asn_ctx),
Lev Walkine8318b82005-03-06 09:29:03 +0000471 asn_MAP_vrange_4_tag2el,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000472 2, /* Count of tags in the map */
473 1, /* Start extensions */
474 3 /* Stop extensions */
475};
Lev Walkind04430c2004-09-07 06:44:29 +0000476static /* Use -fall-defs-global to expose */
Lev Walkine8318b82005-03-06 09:29:03 +0000477asn_TYPE_descriptor_t asn_DEF_vrange_4 = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000478 "vrange",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000479 "vrange",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000480 SEQUENCE_free,
481 SEQUENCE_print,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000482 SEQUENCE_constraint,
483 SEQUENCE_decode_ber,
484 SEQUENCE_encode_der,
Lev Walkin61b40d82004-10-23 15:07:45 +0000485 SEQUENCE_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000486 SEQUENCE_encode_xer,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000487 0, /* Use generic outmost tag fetcher */
Lev Walkine8318b82005-03-06 09:29:03 +0000488 asn_DEF_vrange_4_tags,
489 sizeof(asn_DEF_vrange_4_tags)
490 /sizeof(asn_DEF_vrange_4_tags[0]), /* 1 */
491 asn_DEF_vrange_4_tags, /* Same as above */
492 sizeof(asn_DEF_vrange_4_tags)
493 /sizeof(asn_DEF_vrange_4_tags[0]), /* 1 */
494 asn_MBR_vrange_4,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000495 2, /* Elements count */
Lev Walkine8318b82005-03-06 09:29:03 +0000496 &asn_SPC_vrange_4_specs /* Additional specs */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000497};
498
Lev Walkine0272aa2005-03-04 11:26:08 +0000499static asn_TYPE_member_t asn_MBR_VariablePart_1[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000500 { ATF_NOFLAGS, 0, offsetof(struct VariablePart, choice.vset),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000501 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
502 .tag_mode = 0,
Lev Walkine0272aa2005-03-04 11:26:08 +0000503 .type = (void *)&asn_DEF_vset_2,
504 .memb_constraints = memb_vset_1_constraint,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000505 .name = "vset"
506 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000507 { ATF_NOFLAGS, 0, offsetof(struct VariablePart, choice.vrange),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000508 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
509 .tag_mode = 0,
Lev Walkine8318b82005-03-06 09:29:03 +0000510 .type = (void *)&asn_DEF_vrange_4,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000511 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000512 .name = "vrange"
Lev Walkinf15320b2004-06-03 03:38:44 +0000513 },
514};
Lev Walkine0272aa2005-03-04 11:26:08 +0000515static asn_TYPE_tag2member_t asn_MAP_VariablePart_1_tag2el[] = {
Lev Walkin38abe792004-06-14 13:09:45 +0000516 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* vrange at 45 */
Lev Walkinbbe38662005-02-25 08:17:56 +0000517 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* vset at 42 */
Lev Walkinf15320b2004-06-03 03:38:44 +0000518};
Lev Walkine0272aa2005-03-04 11:26:08 +0000519static asn_CHOICE_specifics_t asn_SPC_VariablePart_1_specs = {
Lev Walkinf15320b2004-06-03 03:38:44 +0000520 sizeof(struct VariablePart),
Lev Walkindfae9752004-09-29 13:19:37 +0000521 offsetof(struct VariablePart, _asn_ctx),
Lev Walkinf15320b2004-06-03 03:38:44 +0000522 offsetof(struct VariablePart, present),
523 sizeof(((struct VariablePart *)0)->present),
Lev Walkine0272aa2005-03-04 11:26:08 +0000524 asn_MAP_VariablePart_1_tag2el,
Lev Walkinf15320b2004-06-03 03:38:44 +0000525 2, /* Count of tags in the map */
Lev Walkind64497c2004-07-01 00:49:55 +0000526 1 /* Whether extensible */
Lev Walkinf15320b2004-06-03 03:38:44 +0000527};
Lev Walkindfae9752004-09-29 13:19:37 +0000528asn_TYPE_descriptor_t asn_DEF_VariablePart = {
Lev Walkinf15320b2004-06-03 03:38:44 +0000529 "VariablePart",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000530 "VariablePart",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000531 CHOICE_free,
532 CHOICE_print,
Lev Walkinf15320b2004-06-03 03:38:44 +0000533 CHOICE_constraint,
534 CHOICE_decode_ber,
535 CHOICE_encode_der,
Lev Walkin61b40d82004-10-23 15:07:45 +0000536 CHOICE_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000537 CHOICE_encode_xer,
Lev Walkinf15320b2004-06-03 03:38:44 +0000538 CHOICE_outmost_tag,
Lev Walkin188ed2c2004-09-13 08:31:01 +0000539 0, /* No effective tags (pointer) */
540 0, /* No effective tags (count) */
541 0, /* No tags (pointer) */
542 0, /* No tags (count) */
Lev Walkine0272aa2005-03-04 11:26:08 +0000543 asn_MBR_VariablePart_1,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000544 2, /* Elements count */
Lev Walkine0272aa2005-03-04 11:26:08 +0000545 &asn_SPC_VariablePart_1_specs /* Additional specs */
Lev Walkinf15320b2004-06-03 03:38:44 +0000546};
547
548
Lev Walkinb47ddce2004-08-11 05:25:47 +0000549/*** <<< INCLUDES [ActionItem] >>> ***/
Lev Walkinf15320b2004-06-03 03:38:44 +0000550
Lev Walkinf15320b2004-06-03 03:38:44 +0000551#include <ENUMERATED.h>
Lev Walkinb47ddce2004-08-11 05:25:47 +0000552#include <BOOLEAN.h>
553#include <VisibleString.h>
554#include <asn_SET_OF.h>
555#include <constr_SET_OF.h>
556#include <constr_SEQUENCE.h>
557
558/*** <<< DEPS [ActionItem] >>> ***/
Lev Walkinf15320b2004-06-03 03:38:44 +0000559
Lev Walkin2e3055d2004-08-20 13:36:32 +0000560typedef enum accept_as {
561 accept_as_unknown = 0,
562 accept_as_safe = 1,
Lev Walkinbbe38662005-02-25 08:17:56 +0000563 accept_as_unsafe = 2
Lev Walkin2e3055d2004-08-20 13:36:32 +0000564 /*
565 * Enumeration is extensible
566 */
567} accept_as_e;
Lev Walkinf15320b2004-06-03 03:38:44 +0000568
569/*** <<< TYPE-DECLS [ActionItem] >>> ***/
570
Lev Walkinf15320b2004-06-03 03:38:44 +0000571typedef struct ActionItem {
572 ENUMERATED_t accept_as;
573 struct notify {
574 BOOLEAN_t critical;
575 struct email {
576 A_SET_OF(VisibleString_t) list;
577
578 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +0000579 asn_struct_ctx_t _asn_ctx;
Lev Walkinf15320b2004-06-03 03:38:44 +0000580 } email;
581 /*
582 * This type is extensible,
583 * possible extensions are below.
584 */
585
586 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +0000587 asn_struct_ctx_t _asn_ctx;
Lev Walkinf15320b2004-06-03 03:38:44 +0000588 } *notify;
589 /*
590 * This type is extensible,
591 * possible extensions are below.
592 */
593
594 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +0000595 asn_struct_ctx_t _asn_ctx;
Lev Walkinf15320b2004-06-03 03:38:44 +0000596} ActionItem_t;
597
Lev Walkinbbe38662005-02-25 08:17:56 +0000598/*** <<< FUNC-DECLS [ActionItem] >>> ***/
599
Lev Walkine0272aa2005-03-04 11:26:08 +0000600/* extern asn_TYPE_descriptor_t asn_DEF_accept_as_2; // (Use -fall-defs-global to expose) */
Lev Walkinc8285712005-03-04 22:18:20 +0000601extern asn_TYPE_descriptor_t asn_DEF_ActionItem;
Lev Walkinbbe38662005-02-25 08:17:56 +0000602
603/*** <<< CODE [ActionItem] >>> ***/
604
605static int
Lev Walkine0272aa2005-03-04 11:26:08 +0000606accept_as_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkinbbe38662005-02-25 08:17:56 +0000607 asn_app_consume_bytes_f *app_errlog, void *app_key) {
608 /* Replace with underlying type checker */
609 td->check_constraints = asn_DEF_ENUMERATED.check_constraints;
610 return td->check_constraints(td, sptr, app_errlog, app_key);
611}
612
613/*
614 * This type is implemented using ENUMERATED,
615 * so here we adjust the DEF accordingly.
616 */
617static void
Lev Walkine0272aa2005-03-04 11:26:08 +0000618accept_as_2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkinbbe38662005-02-25 08:17:56 +0000619 td->free_struct = asn_DEF_ENUMERATED.free_struct;
620 td->print_struct = asn_DEF_ENUMERATED.print_struct;
621 td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder;
622 td->der_encoder = asn_DEF_ENUMERATED.der_encoder;
623 td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder;
624 td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder;
625 td->elements = asn_DEF_ENUMERATED.elements;
626 td->elements_count = asn_DEF_ENUMERATED.elements_count;
Lev Walkin29a82192005-03-29 19:05:37 +0000627 /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */
Lev Walkinbbe38662005-02-25 08:17:56 +0000628}
629
630static void
Lev Walkine0272aa2005-03-04 11:26:08 +0000631accept_as_2_free(asn_TYPE_descriptor_t *td,
Lev Walkinbbe38662005-02-25 08:17:56 +0000632 void *struct_ptr, int contents_only) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000633 accept_as_2_inherit_TYPE_descriptor(td);
Lev Walkinbbe38662005-02-25 08:17:56 +0000634 td->free_struct(td, struct_ptr, contents_only);
635}
636
637static int
Lev Walkine0272aa2005-03-04 11:26:08 +0000638accept_as_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkinbbe38662005-02-25 08:17:56 +0000639 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000640 accept_as_2_inherit_TYPE_descriptor(td);
Lev Walkinbbe38662005-02-25 08:17:56 +0000641 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
642}
643
644static asn_dec_rval_t
Lev Walkine0272aa2005-03-04 11:26:08 +0000645accept_as_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkin3ebc65a2005-03-17 21:57:19 +0000646 void **structure, const void *bufptr, size_t size, int tag_mode) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000647 accept_as_2_inherit_TYPE_descriptor(td);
Lev Walkinbbe38662005-02-25 08:17:56 +0000648 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
649}
650
651static asn_enc_rval_t
Lev Walkine0272aa2005-03-04 11:26:08 +0000652accept_as_2_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkinbbe38662005-02-25 08:17:56 +0000653 void *structure, int tag_mode, ber_tlv_tag_t tag,
654 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000655 accept_as_2_inherit_TYPE_descriptor(td);
Lev Walkinbbe38662005-02-25 08:17:56 +0000656 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
657}
658
659static asn_dec_rval_t
Lev Walkine0272aa2005-03-04 11:26:08 +0000660accept_as_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkin3ebc65a2005-03-17 21:57:19 +0000661 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000662 accept_as_2_inherit_TYPE_descriptor(td);
Lev Walkinbbe38662005-02-25 08:17:56 +0000663 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
664}
665
666static asn_enc_rval_t
Lev Walkine0272aa2005-03-04 11:26:08 +0000667accept_as_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkinbbe38662005-02-25 08:17:56 +0000668 int ilevel, enum xer_encoder_flags_e flags,
669 asn_app_consume_bytes_f *cb, void *app_key) {
Lev Walkine0272aa2005-03-04 11:26:08 +0000670 accept_as_2_inherit_TYPE_descriptor(td);
Lev Walkinbbe38662005-02-25 08:17:56 +0000671 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
672}
673
674
Lev Walkinf15320b2004-06-03 03:38:44 +0000675/*** <<< STAT-DEFS [ActionItem] >>> ***/
676
Lev Walkine0272aa2005-03-04 11:26:08 +0000677static asn_INTEGER_enum_map_t asn_MAP_accept_as_2_value2enum[] = {
Lev Walkin9f30ef12005-02-25 11:08:02 +0000678 { 0, 7, "unknown" },
679 { 1, 4, "safe" },
680 { 2, 6, "unsafe" }
Lev Walkinbbe38662005-02-25 08:17:56 +0000681 /* This list is extensible */
682};
Lev Walkine0272aa2005-03-04 11:26:08 +0000683static unsigned int asn_MAP_accept_as_2_enum2value[] = {
Lev Walkin9f30ef12005-02-25 11:08:02 +0000684 1, /* safe(1) */
685 0, /* unknown(0) */
686 2 /* unsafe(2) */
Lev Walkinbbe38662005-02-25 08:17:56 +0000687 /* This list is extensible */
688};
Lev Walkine0272aa2005-03-04 11:26:08 +0000689static asn_INTEGER_specifics_t asn_SPC_accept_as_2_specs = {
690 asn_MAP_accept_as_2_value2enum, /* "tag" => N; sorted by tag */
691 asn_MAP_accept_as_2_enum2value, /* N => "tag"; sorted by N */
Lev Walkinbbe38662005-02-25 08:17:56 +0000692 3, /* Number of elements in the maps */
Lev Walkin295e2452005-02-25 11:47:59 +0000693 1, /* Enumeration is extensible */
694 1 /* Strict enumeration */
Lev Walkinbbe38662005-02-25 08:17:56 +0000695};
Lev Walkine0272aa2005-03-04 11:26:08 +0000696static ber_tlv_tag_t asn_DEF_accept_as_2_tags[] = {
Lev Walkinbbe38662005-02-25 08:17:56 +0000697 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
698};
699static /* Use -fall-defs-global to expose */
Lev Walkine0272aa2005-03-04 11:26:08 +0000700asn_TYPE_descriptor_t asn_DEF_accept_as_2 = {
Lev Walkinbbe38662005-02-25 08:17:56 +0000701 "accept-as",
702 "accept-as",
Lev Walkine0272aa2005-03-04 11:26:08 +0000703 accept_as_2_free,
704 accept_as_2_print,
705 accept_as_2_constraint,
706 accept_as_2_decode_ber,
707 accept_as_2_encode_der,
708 accept_as_2_decode_xer,
709 accept_as_2_encode_xer,
Lev Walkinbbe38662005-02-25 08:17:56 +0000710 0, /* Use generic outmost tag fetcher */
Lev Walkine0272aa2005-03-04 11:26:08 +0000711 asn_DEF_accept_as_2_tags,
712 sizeof(asn_DEF_accept_as_2_tags)
713 /sizeof(asn_DEF_accept_as_2_tags[0]), /* 1 */
714 asn_DEF_accept_as_2_tags, /* Same as above */
715 sizeof(asn_DEF_accept_as_2_tags)
716 /sizeof(asn_DEF_accept_as_2_tags[0]), /* 1 */
Lev Walkinbbe38662005-02-25 08:17:56 +0000717 0, 0, /* Defined elsewhere */
Lev Walkine0272aa2005-03-04 11:26:08 +0000718 &asn_SPC_accept_as_2_specs /* Additional specs */
Lev Walkinbbe38662005-02-25 08:17:56 +0000719};
720
Lev Walkine8318b82005-03-06 09:29:03 +0000721static asn_TYPE_member_t asn_MBR_email_9[] = {
Lev Walkin8eb4b572005-08-16 16:57:17 +0000722 { ATF_POINTER, 0, 0,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000723 .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
724 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +0000725 .type = (void *)&asn_DEF_VisibleString,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000726 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000727 .name = ""
Lev Walkinf15320b2004-06-03 03:38:44 +0000728 },
Lev Walkin2e3055d2004-08-20 13:36:32 +0000729};
Lev Walkine8318b82005-03-06 09:29:03 +0000730static ber_tlv_tag_t asn_DEF_email_9_tags[] = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000731 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
732};
Lev Walkine8318b82005-03-06 09:29:03 +0000733static asn_SET_OF_specifics_t asn_SPC_email_9_specs = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000734 sizeof(struct email),
Lev Walkindfae9752004-09-29 13:19:37 +0000735 offsetof(struct email, _asn_ctx),
Lev Walkina9cc46e2004-09-22 16:06:28 +0000736 0, /* XER encoding is XMLDelimitedItemList */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000737};
Lev Walkind04430c2004-09-07 06:44:29 +0000738static /* Use -fall-defs-global to expose */
Lev Walkine8318b82005-03-06 09:29:03 +0000739asn_TYPE_descriptor_t asn_DEF_email_9 = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000740 "email",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000741 "email",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000742 SET_OF_free,
743 SET_OF_print,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000744 SET_OF_constraint,
745 SET_OF_decode_ber,
746 SET_OF_encode_der,
Lev Walkinb2230802005-02-14 20:31:31 +0000747 SET_OF_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000748 SET_OF_encode_xer,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000749 0, /* Use generic outmost tag fetcher */
Lev Walkine8318b82005-03-06 09:29:03 +0000750 asn_DEF_email_9_tags,
751 sizeof(asn_DEF_email_9_tags)
752 /sizeof(asn_DEF_email_9_tags[0]), /* 1 */
753 asn_DEF_email_9_tags, /* Same as above */
754 sizeof(asn_DEF_email_9_tags)
755 /sizeof(asn_DEF_email_9_tags[0]), /* 1 */
756 asn_MBR_email_9,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000757 1, /* Single element */
Lev Walkine8318b82005-03-06 09:29:03 +0000758 &asn_SPC_email_9_specs /* Additional specs */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000759};
760
Lev Walkine8318b82005-03-06 09:29:03 +0000761static asn_TYPE_member_t asn_MBR_notify_7[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000762 { ATF_NOFLAGS, 0, offsetof(struct notify, critical),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000763 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
764 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +0000765 .type = (void *)&asn_DEF_BOOLEAN,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000766 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000767 .name = "critical"
768 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000769 { ATF_NOFLAGS, 0, offsetof(struct notify, email),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000770 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
771 .tag_mode = 0,
Lev Walkine8318b82005-03-06 09:29:03 +0000772 .type = (void *)&asn_DEF_email_9,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000773 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000774 .name = "email"
775 },
776};
Lev Walkine8318b82005-03-06 09:29:03 +0000777static ber_tlv_tag_t asn_DEF_notify_7_tags[] = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000778 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
779};
Lev Walkine8318b82005-03-06 09:29:03 +0000780static asn_TYPE_tag2member_t asn_MAP_notify_7_tag2el[] = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000781 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* critical at 61 */
Lev Walkinbbe38662005-02-25 08:17:56 +0000782 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 1, 0, 0 } /* email at 62 */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000783};
Lev Walkine8318b82005-03-06 09:29:03 +0000784static asn_SEQUENCE_specifics_t asn_SPC_notify_7_specs = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000785 sizeof(struct notify),
Lev Walkindfae9752004-09-29 13:19:37 +0000786 offsetof(struct notify, _asn_ctx),
Lev Walkine8318b82005-03-06 09:29:03 +0000787 asn_MAP_notify_7_tag2el,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000788 2, /* Count of tags in the map */
789 1, /* Start extensions */
790 3 /* Stop extensions */
791};
Lev Walkind04430c2004-09-07 06:44:29 +0000792static /* Use -fall-defs-global to expose */
Lev Walkine8318b82005-03-06 09:29:03 +0000793asn_TYPE_descriptor_t asn_DEF_notify_7 = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000794 "notify",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000795 "notify",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000796 SEQUENCE_free,
797 SEQUENCE_print,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000798 SEQUENCE_constraint,
799 SEQUENCE_decode_ber,
800 SEQUENCE_encode_der,
Lev Walkin61b40d82004-10-23 15:07:45 +0000801 SEQUENCE_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000802 SEQUENCE_encode_xer,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000803 0, /* Use generic outmost tag fetcher */
Lev Walkine8318b82005-03-06 09:29:03 +0000804 asn_DEF_notify_7_tags,
805 sizeof(asn_DEF_notify_7_tags)
806 /sizeof(asn_DEF_notify_7_tags[0]), /* 1 */
807 asn_DEF_notify_7_tags, /* Same as above */
808 sizeof(asn_DEF_notify_7_tags)
809 /sizeof(asn_DEF_notify_7_tags[0]), /* 1 */
810 asn_MBR_notify_7,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000811 2, /* Elements count */
Lev Walkine8318b82005-03-06 09:29:03 +0000812 &asn_SPC_notify_7_specs /* Additional specs */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000813};
814
Lev Walkine0272aa2005-03-04 11:26:08 +0000815static asn_TYPE_member_t asn_MBR_ActionItem_1[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000816 { ATF_NOFLAGS, 0, offsetof(struct ActionItem, accept_as),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000817 .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
818 .tag_mode = 0,
Lev Walkine0272aa2005-03-04 11:26:08 +0000819 .type = (void *)&asn_DEF_accept_as_2,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000820 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000821 .name = "accept-as"
822 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000823 { ATF_POINTER, 1, offsetof(struct ActionItem, notify),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000824 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
825 .tag_mode = 0,
Lev Walkine8318b82005-03-06 09:29:03 +0000826 .type = (void *)&asn_DEF_notify_7,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000827 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000828 .name = "notify"
Lev Walkinf15320b2004-06-03 03:38:44 +0000829 },
830};
Lev Walkine0272aa2005-03-04 11:26:08 +0000831static ber_tlv_tag_t asn_DEF_ActionItem_1_tags[] = {
Lev Walkinf15320b2004-06-03 03:38:44 +0000832 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
833};
Lev Walkine0272aa2005-03-04 11:26:08 +0000834static asn_TYPE_tag2member_t asn_MAP_ActionItem_1_tag2el[] = {
Lev Walkin38abe792004-06-14 13:09:45 +0000835 { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 }, /* accept-as at 55 */
Lev Walkinbbe38662005-02-25 08:17:56 +0000836 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* notify at 61 */
Lev Walkincda6b8a2004-06-06 07:20:52 +0000837};
Lev Walkine0272aa2005-03-04 11:26:08 +0000838static asn_SEQUENCE_specifics_t asn_SPC_ActionItem_1_specs = {
Lev Walkinf15320b2004-06-03 03:38:44 +0000839 sizeof(struct ActionItem),
Lev Walkindfae9752004-09-29 13:19:37 +0000840 offsetof(struct ActionItem, _asn_ctx),
Lev Walkine0272aa2005-03-04 11:26:08 +0000841 asn_MAP_ActionItem_1_tag2el,
Lev Walkincda6b8a2004-06-06 07:20:52 +0000842 2, /* Count of tags in the map */
Lev Walkinf15320b2004-06-03 03:38:44 +0000843 1, /* Start extensions */
844 3 /* Stop extensions */
845};
Lev Walkindfae9752004-09-29 13:19:37 +0000846asn_TYPE_descriptor_t asn_DEF_ActionItem = {
Lev Walkinf15320b2004-06-03 03:38:44 +0000847 "ActionItem",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000848 "ActionItem",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000849 SEQUENCE_free,
850 SEQUENCE_print,
Lev Walkinf15320b2004-06-03 03:38:44 +0000851 SEQUENCE_constraint,
852 SEQUENCE_decode_ber,
853 SEQUENCE_encode_der,
Lev Walkin61b40d82004-10-23 15:07:45 +0000854 SEQUENCE_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000855 SEQUENCE_encode_xer,
Lev Walkinf15320b2004-06-03 03:38:44 +0000856 0, /* Use generic outmost tag fetcher */
Lev Walkine0272aa2005-03-04 11:26:08 +0000857 asn_DEF_ActionItem_1_tags,
858 sizeof(asn_DEF_ActionItem_1_tags)
859 /sizeof(asn_DEF_ActionItem_1_tags[0]), /* 1 */
860 asn_DEF_ActionItem_1_tags, /* Same as above */
861 sizeof(asn_DEF_ActionItem_1_tags)
862 /sizeof(asn_DEF_ActionItem_1_tags[0]), /* 1 */
863 asn_MBR_ActionItem_1,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000864 2, /* Elements count */
Lev Walkine0272aa2005-03-04 11:26:08 +0000865 &asn_SPC_ActionItem_1_specs /* Additional specs */
Lev Walkinf15320b2004-06-03 03:38:44 +0000866};
867