blob: c02c499736d4f89a07c1faa57ee331fa730ccc22 [file] [log] [blame]
Lev Walkin5bbff1e2004-06-28 21:13:22 +00001
Lev Walkinb47ddce2004-08-11 05:25:47 +00002/*** <<< INCLUDES [T] >>> ***/
Lev Walkin5bbff1e2004-06-28 21:13:22 +00003
Lev Walkin5bbff1e2004-06-28 21:13:22 +00004#include <NULL.h>
Lev Walkinb47ddce2004-08-11 05:25:47 +00005#include <constr_CHOICE.h>
Lev Walkin5bbff1e2004-06-28 21:13:22 +00006#include <constr_SEQUENCE.h>
7
Lev Walkinb47ddce2004-08-11 05:25:47 +00008/*** <<< DEPS [T] >>> ***/
9
Lev Walkin2e3055d2004-08-20 13:36:32 +000010typedef enum b_PR {
11 b_PR_NOTHING, /* No components present */
12 b_PR_c,
13 b_PR_d,
14 b_PR_e,
15 b_PR_h,
16} b_PR;
17typedef enum e_PR {
18 e_PR_NOTHING, /* No components present */
19 e_PR_f,
20 e_PR_g,
21} e_PR;
22typedef enum h_PR {
23 h_PR_NOTHING, /* No components present */
24 h_PR_i,
25 h_PR_j,
26} h_PR;
Lev Walkindfae9752004-09-29 13:19:37 +000027extern asn_TYPE_descriptor_t asn_DEF_T;
Lev Walkin5bbff1e2004-06-28 21:13:22 +000028
29/*** <<< TYPE-DECLS [T] >>> ***/
30
31
32typedef struct T {
33 NULL_t a;
34 struct b {
Lev Walkin64399722004-08-11 07:17:22 +000035 b_PR present;
Lev Walkin5bbff1e2004-06-28 21:13:22 +000036 union {
37 NULL_t c;
38 NULL_t d;
39 struct e {
Lev Walkin64399722004-08-11 07:17:22 +000040 e_PR present;
Lev Walkin5bbff1e2004-06-28 21:13:22 +000041 union {
42 NULL_t f;
43 NULL_t g;
44 } choice;
45
46 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +000047 asn_struct_ctx_t _asn_ctx;
Lev Walkin5bbff1e2004-06-28 21:13:22 +000048 } e;
49 struct h {
Lev Walkin64399722004-08-11 07:17:22 +000050 h_PR present;
Lev Walkin5bbff1e2004-06-28 21:13:22 +000051 union {
52 NULL_t i;
53 NULL_t j;
54 } choice;
55
56 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +000057 asn_struct_ctx_t _asn_ctx;
Lev Walkin5bbff1e2004-06-28 21:13:22 +000058 } h;
59 } choice;
60
61 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +000062 asn_struct_ctx_t _asn_ctx;
Lev Walkin5bbff1e2004-06-28 21:13:22 +000063 } b;
64
65 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +000066 asn_struct_ctx_t _asn_ctx;
Lev Walkin5bbff1e2004-06-28 21:13:22 +000067} T_t;
68
69/*** <<< STAT-DEFS [T] >>> ***/
70
Lev Walkindfae9752004-09-29 13:19:37 +000071static asn_TYPE_member_t asn_MBR_e[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +000072 { ATF_NOFLAGS, 0, offsetof(struct e, choice.f),
Lev Walkin2e3055d2004-08-20 13:36:32 +000073 .tag = (ASN_TAG_CLASS_PRIVATE | (7 << 2)),
74 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +000075 .type = (void *)&asn_DEF_NULL,
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 = "f"
Lev Walkin5bbff1e2004-06-28 21:13:22 +000078 },
Lev Walkincc93b0f2004-09-10 09:18:20 +000079 { ATF_NOFLAGS, 0, offsetof(struct e, choice.g),
Lev Walkin2e3055d2004-08-20 13:36:32 +000080 .tag = (ASN_TAG_CLASS_PRIVATE | (8 << 2)),
81 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +000082 .type = (void *)&asn_DEF_NULL,
Lev Walkinba58e1b2005-01-17 12:20:19 +000083 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +000084 .name = "g"
85 },
86};
Lev Walkindfae9752004-09-29 13:19:37 +000087static asn_TYPE_tag2member_t asn_DEF_e_tag2el[] = {
Lev Walkin2e3055d2004-08-20 13:36:32 +000088 { (ASN_TAG_CLASS_PRIVATE | (7 << 2)), 0, 0, 0 }, /* f at 20 */
89 { (ASN_TAG_CLASS_PRIVATE | (8 << 2)), 1, 0, 0 }, /* g at 21 */
90};
Lev Walkindfae9752004-09-29 13:19:37 +000091static asn_CHOICE_specifics_t asn_DEF_e_specs = {
Lev Walkin2e3055d2004-08-20 13:36:32 +000092 sizeof(struct e),
Lev Walkindfae9752004-09-29 13:19:37 +000093 offsetof(struct e, _asn_ctx),
Lev Walkin2e3055d2004-08-20 13:36:32 +000094 offsetof(struct e, present),
95 sizeof(((struct e *)0)->present),
Lev Walkindfae9752004-09-29 13:19:37 +000096 asn_DEF_e_tag2el,
Lev Walkin2e3055d2004-08-20 13:36:32 +000097 2, /* Count of tags in the map */
98 0 /* Whether extensible */
99};
Lev Walkind04430c2004-09-07 06:44:29 +0000100static /* Use -fall-defs-global to expose */
Lev Walkindfae9752004-09-29 13:19:37 +0000101asn_TYPE_descriptor_t asn_DEF_e = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000102 "e",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000103 "e",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000104 CHOICE_free,
105 CHOICE_print,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000106 CHOICE_constraint,
107 CHOICE_decode_ber,
108 CHOICE_encode_der,
Lev Walkin61b40d82004-10-23 15:07:45 +0000109 CHOICE_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000110 CHOICE_encode_xer,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000111 CHOICE_outmost_tag,
Lev Walkin188ed2c2004-09-13 08:31:01 +0000112 0, /* No effective tags (pointer) */
113 0, /* No effective tags (count) */
114 0, /* No tags (pointer) */
115 0, /* No tags (count) */
Lev Walkindfae9752004-09-29 13:19:37 +0000116 asn_MBR_e,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000117 2, /* Elements count */
Lev Walkindfae9752004-09-29 13:19:37 +0000118 &asn_DEF_e_specs /* Additional specs */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000119};
120
Lev Walkindfae9752004-09-29 13:19:37 +0000121static asn_TYPE_member_t asn_MBR_h[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000122 { ATF_NOFLAGS, 0, offsetof(struct h, choice.i),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000123 .tag = (ASN_TAG_CLASS_PRIVATE | (1 << 2)),
124 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000125 .type = (void *)&asn_DEF_NULL,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000126 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000127 .name = "i"
128 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000129 { ATF_NOFLAGS, 0, offsetof(struct h, choice.j),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000130 .tag = (ASN_TAG_CLASS_PRIVATE | (2 << 2)),
131 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000132 .type = (void *)&asn_DEF_NULL,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000133 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000134 .name = "j"
135 },
136};
Lev Walkindfae9752004-09-29 13:19:37 +0000137static asn_TYPE_tag2member_t asn_DEF_h_tag2el[] = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000138 { (ASN_TAG_CLASS_PRIVATE | (1 << 2)), 0, 0, 0 }, /* i at 24 */
139 { (ASN_TAG_CLASS_PRIVATE | (2 << 2)), 1, 0, 0 }, /* j at 25 */
140};
Lev Walkindfae9752004-09-29 13:19:37 +0000141static asn_CHOICE_specifics_t asn_DEF_h_specs = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000142 sizeof(struct h),
Lev Walkindfae9752004-09-29 13:19:37 +0000143 offsetof(struct h, _asn_ctx),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000144 offsetof(struct h, present),
145 sizeof(((struct h *)0)->present),
Lev Walkindfae9752004-09-29 13:19:37 +0000146 asn_DEF_h_tag2el,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000147 2, /* Count of tags in the map */
148 0 /* Whether extensible */
149};
Lev Walkind04430c2004-09-07 06:44:29 +0000150static /* Use -fall-defs-global to expose */
Lev Walkindfae9752004-09-29 13:19:37 +0000151asn_TYPE_descriptor_t asn_DEF_h = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000152 "h",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000153 "h",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000154 CHOICE_free,
155 CHOICE_print,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000156 CHOICE_constraint,
157 CHOICE_decode_ber,
158 CHOICE_encode_der,
Lev Walkin61b40d82004-10-23 15:07:45 +0000159 CHOICE_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000160 CHOICE_encode_xer,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000161 CHOICE_outmost_tag,
Lev Walkin188ed2c2004-09-13 08:31:01 +0000162 0, /* No effective tags (pointer) */
163 0, /* No effective tags (count) */
164 0, /* No tags (pointer) */
165 0, /* No tags (count) */
Lev Walkindfae9752004-09-29 13:19:37 +0000166 asn_MBR_h,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000167 2, /* Elements count */
Lev Walkindfae9752004-09-29 13:19:37 +0000168 &asn_DEF_h_specs /* Additional specs */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000169};
170
Lev Walkindfae9752004-09-29 13:19:37 +0000171static asn_TYPE_member_t asn_MBR_b[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000172 { ATF_NOFLAGS, 0, offsetof(struct b, choice.c),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000173 .tag = (ASN_TAG_CLASS_PRIVATE | (5 << 2)),
174 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000175 .type = (void *)&asn_DEF_NULL,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000176 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000177 .name = "c"
178 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000179 { ATF_NOFLAGS, 0, offsetof(struct b, choice.d),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000180 .tag = (ASN_TAG_CLASS_PRIVATE | (6 << 2)),
181 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000182 .type = (void *)&asn_DEF_NULL,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000183 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000184 .name = "d"
185 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000186 { ATF_NOFLAGS, 0, offsetof(struct b, choice.e),
Lev Walkinb9189732004-09-10 09:37:12 +0000187 .tag = -1 /* Ambiguous tag (CHOICE?) */,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000188 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +0000189 .type = (void *)&asn_DEF_e,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000190 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000191 .name = "e"
192 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000193 { ATF_NOFLAGS, 0, offsetof(struct b, choice.h),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000194 .tag = (ASN_TAG_CLASS_PRIVATE | (9 << 2)),
195 .tag_mode = +1, /* EXPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000196 .type = (void *)&asn_DEF_h,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000197 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000198 .name = "h"
199 },
200};
Lev Walkindfae9752004-09-29 13:19:37 +0000201static asn_TYPE_tag2member_t asn_DEF_b_tag2el[] = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000202 { (ASN_TAG_CLASS_PRIVATE | (5 << 2)), 0, 0, 0 }, /* c at 17 */
203 { (ASN_TAG_CLASS_PRIVATE | (6 << 2)), 1, 0, 0 }, /* d at 18 */
204 { (ASN_TAG_CLASS_PRIVATE | (7 << 2)), 2, 0, 0 }, /* f at 20 */
205 { (ASN_TAG_CLASS_PRIVATE | (8 << 2)), 2, 0, 0 }, /* g at 21 */
206 { (ASN_TAG_CLASS_PRIVATE | (9 << 2)), 3, 0, 0 }, /* h at 24 */
207};
Lev Walkindfae9752004-09-29 13:19:37 +0000208static asn_CHOICE_specifics_t asn_DEF_b_specs = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000209 sizeof(struct b),
Lev Walkindfae9752004-09-29 13:19:37 +0000210 offsetof(struct b, _asn_ctx),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000211 offsetof(struct b, present),
212 sizeof(((struct b *)0)->present),
Lev Walkindfae9752004-09-29 13:19:37 +0000213 asn_DEF_b_tag2el,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000214 5, /* Count of tags in the map */
215 0 /* Whether extensible */
216};
Lev Walkind04430c2004-09-07 06:44:29 +0000217static /* Use -fall-defs-global to expose */
Lev Walkindfae9752004-09-29 13:19:37 +0000218asn_TYPE_descriptor_t asn_DEF_b = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000219 "b",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000220 "b",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000221 CHOICE_free,
222 CHOICE_print,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000223 CHOICE_constraint,
224 CHOICE_decode_ber,
225 CHOICE_encode_der,
Lev Walkin61b40d82004-10-23 15:07:45 +0000226 CHOICE_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000227 CHOICE_encode_xer,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000228 CHOICE_outmost_tag,
Lev Walkin188ed2c2004-09-13 08:31:01 +0000229 0, /* No effective tags (pointer) */
230 0, /* No effective tags (count) */
231 0, /* No tags (pointer) */
232 0, /* No tags (count) */
Lev Walkindfae9752004-09-29 13:19:37 +0000233 asn_MBR_b,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000234 4, /* Elements count */
Lev Walkindfae9752004-09-29 13:19:37 +0000235 &asn_DEF_b_specs /* Additional specs */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000236};
237
Lev Walkindfae9752004-09-29 13:19:37 +0000238static asn_TYPE_member_t asn_MBR_T[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000239 { ATF_NOFLAGS, 0, offsetof(struct T, a),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000240 .tag = (ASN_TAG_CLASS_PRIVATE | (2 << 2)),
241 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000242 .type = (void *)&asn_DEF_NULL,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000243 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000244 .name = "a"
245 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000246 { ATF_NOFLAGS, 0, offsetof(struct T, b),
Lev Walkinb9189732004-09-10 09:37:12 +0000247 .tag = -1 /* Ambiguous tag (CHOICE?) */,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000248 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +0000249 .type = (void *)&asn_DEF_b,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000250 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000251 .name = "b"
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000252 },
253};
Lev Walkindfae9752004-09-29 13:19:37 +0000254static ber_tlv_tag_t asn_DEF_T_tags[] = {
Lev Walkin188ed2c2004-09-13 08:31:01 +0000255 (ASN_TAG_CLASS_PRIVATE | (1 << 2)),
256 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000257};
Lev Walkindfae9752004-09-29 13:19:37 +0000258static asn_TYPE_tag2member_t asn_DEF_T_tag2el[] = {
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000259 { (ASN_TAG_CLASS_PRIVATE | (2 << 2)), 0, 0, 0 }, /* a at 15 */
260 { (ASN_TAG_CLASS_PRIVATE | (5 << 2)), 1, 0, 0 }, /* c at 17 */
261 { (ASN_TAG_CLASS_PRIVATE | (6 << 2)), 1, 0, 0 }, /* d at 18 */
262 { (ASN_TAG_CLASS_PRIVATE | (7 << 2)), 1, 0, 0 }, /* f at 20 */
263 { (ASN_TAG_CLASS_PRIVATE | (8 << 2)), 1, 0, 0 }, /* g at 21 */
264 { (ASN_TAG_CLASS_PRIVATE | (9 << 2)), 1, 0, 0 }, /* h at 24 */
265};
Lev Walkindfae9752004-09-29 13:19:37 +0000266static asn_SEQUENCE_specifics_t asn_DEF_T_specs = {
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000267 sizeof(struct T),
Lev Walkindfae9752004-09-29 13:19:37 +0000268 offsetof(struct T, _asn_ctx),
269 asn_DEF_T_tag2el,
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000270 6, /* Count of tags in the map */
271 -1, /* Start extensions */
272 -1 /* Stop extensions */
273};
Lev Walkindfae9752004-09-29 13:19:37 +0000274asn_TYPE_descriptor_t asn_DEF_T = {
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000275 "T",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000276 "T",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000277 SEQUENCE_free,
278 SEQUENCE_print,
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000279 SEQUENCE_constraint,
280 SEQUENCE_decode_ber,
281 SEQUENCE_encode_der,
Lev Walkin61b40d82004-10-23 15:07:45 +0000282 SEQUENCE_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000283 SEQUENCE_encode_xer,
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000284 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000285 asn_DEF_T_tags,
286 sizeof(asn_DEF_T_tags)
287 /sizeof(asn_DEF_T_tags[0]) - 1, /* 1 */
288 asn_DEF_T_tags, /* Same as above */
289 sizeof(asn_DEF_T_tags)
290 /sizeof(asn_DEF_T_tags[0]), /* 2 */
291 asn_MBR_T,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000292 2, /* Elements count */
Lev Walkindfae9752004-09-29 13:19:37 +0000293 &asn_DEF_T_specs /* Additional specs */
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000294};
295