blob: 8b3106d8d2e6b804d15500f3d058a12f6b7ae133 [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 Walkin2e3055d2004-08-20 13:36:32 +000076 .memb_constraints = 0, /* Defer to actual type */
77 .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 Walkin2e3055d2004-08-20 13:36:32 +000083 .memb_constraints = 0, /* Defer to actual type */
84 .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 Walkina9cc46e2004-09-22 16:06:28 +0000103 CHOICE_free,
104 CHOICE_print,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000105 CHOICE_constraint,
106 CHOICE_decode_ber,
107 CHOICE_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000108 0, /* Not implemented yet */
109 CHOICE_encode_xer,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000110 CHOICE_outmost_tag,
Lev Walkin188ed2c2004-09-13 08:31:01 +0000111 0, /* No effective tags (pointer) */
112 0, /* No effective tags (count) */
113 0, /* No tags (pointer) */
114 0, /* No tags (count) */
Lev Walkindfae9752004-09-29 13:19:37 +0000115 asn_MBR_e,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000116 2, /* Elements count */
Lev Walkindfae9752004-09-29 13:19:37 +0000117 &asn_DEF_e_specs /* Additional specs */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000118};
119
Lev Walkindfae9752004-09-29 13:19:37 +0000120static asn_TYPE_member_t asn_MBR_h[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000121 { ATF_NOFLAGS, 0, offsetof(struct h, choice.i),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000122 .tag = (ASN_TAG_CLASS_PRIVATE | (1 << 2)),
123 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000124 .type = (void *)&asn_DEF_NULL,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000125 .memb_constraints = 0, /* Defer to actual type */
126 .name = "i"
127 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000128 { ATF_NOFLAGS, 0, offsetof(struct h, choice.j),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000129 .tag = (ASN_TAG_CLASS_PRIVATE | (2 << 2)),
130 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000131 .type = (void *)&asn_DEF_NULL,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000132 .memb_constraints = 0, /* Defer to actual type */
133 .name = "j"
134 },
135};
Lev Walkindfae9752004-09-29 13:19:37 +0000136static asn_TYPE_tag2member_t asn_DEF_h_tag2el[] = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000137 { (ASN_TAG_CLASS_PRIVATE | (1 << 2)), 0, 0, 0 }, /* i at 24 */
138 { (ASN_TAG_CLASS_PRIVATE | (2 << 2)), 1, 0, 0 }, /* j at 25 */
139};
Lev Walkindfae9752004-09-29 13:19:37 +0000140static asn_CHOICE_specifics_t asn_DEF_h_specs = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000141 sizeof(struct h),
Lev Walkindfae9752004-09-29 13:19:37 +0000142 offsetof(struct h, _asn_ctx),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000143 offsetof(struct h, present),
144 sizeof(((struct h *)0)->present),
Lev Walkindfae9752004-09-29 13:19:37 +0000145 asn_DEF_h_tag2el,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000146 2, /* Count of tags in the map */
147 0 /* Whether extensible */
148};
Lev Walkind04430c2004-09-07 06:44:29 +0000149static /* Use -fall-defs-global to expose */
Lev Walkindfae9752004-09-29 13:19:37 +0000150asn_TYPE_descriptor_t asn_DEF_h = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000151 "h",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000152 CHOICE_free,
153 CHOICE_print,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000154 CHOICE_constraint,
155 CHOICE_decode_ber,
156 CHOICE_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000157 0, /* Not implemented yet */
158 CHOICE_encode_xer,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000159 CHOICE_outmost_tag,
Lev Walkin188ed2c2004-09-13 08:31:01 +0000160 0, /* No effective tags (pointer) */
161 0, /* No effective tags (count) */
162 0, /* No tags (pointer) */
163 0, /* No tags (count) */
Lev Walkindfae9752004-09-29 13:19:37 +0000164 asn_MBR_h,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000165 2, /* Elements count */
Lev Walkindfae9752004-09-29 13:19:37 +0000166 &asn_DEF_h_specs /* Additional specs */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000167};
168
Lev Walkindfae9752004-09-29 13:19:37 +0000169static asn_TYPE_member_t asn_MBR_b[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000170 { ATF_NOFLAGS, 0, offsetof(struct b, choice.c),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000171 .tag = (ASN_TAG_CLASS_PRIVATE | (5 << 2)),
172 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000173 .type = (void *)&asn_DEF_NULL,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000174 .memb_constraints = 0, /* Defer to actual type */
175 .name = "c"
176 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000177 { ATF_NOFLAGS, 0, offsetof(struct b, choice.d),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000178 .tag = (ASN_TAG_CLASS_PRIVATE | (6 << 2)),
179 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000180 .type = (void *)&asn_DEF_NULL,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000181 .memb_constraints = 0, /* Defer to actual type */
182 .name = "d"
183 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000184 { ATF_NOFLAGS, 0, offsetof(struct b, choice.e),
Lev Walkinb9189732004-09-10 09:37:12 +0000185 .tag = -1 /* Ambiguous tag (CHOICE?) */,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000186 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +0000187 .type = (void *)&asn_DEF_e,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000188 .memb_constraints = 0, /* Defer to actual type */
189 .name = "e"
190 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000191 { ATF_NOFLAGS, 0, offsetof(struct b, choice.h),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000192 .tag = (ASN_TAG_CLASS_PRIVATE | (9 << 2)),
193 .tag_mode = +1, /* EXPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000194 .type = (void *)&asn_DEF_h,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000195 .memb_constraints = 0, /* Defer to actual type */
196 .name = "h"
197 },
198};
Lev Walkindfae9752004-09-29 13:19:37 +0000199static asn_TYPE_tag2member_t asn_DEF_b_tag2el[] = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000200 { (ASN_TAG_CLASS_PRIVATE | (5 << 2)), 0, 0, 0 }, /* c at 17 */
201 { (ASN_TAG_CLASS_PRIVATE | (6 << 2)), 1, 0, 0 }, /* d at 18 */
202 { (ASN_TAG_CLASS_PRIVATE | (7 << 2)), 2, 0, 0 }, /* f at 20 */
203 { (ASN_TAG_CLASS_PRIVATE | (8 << 2)), 2, 0, 0 }, /* g at 21 */
204 { (ASN_TAG_CLASS_PRIVATE | (9 << 2)), 3, 0, 0 }, /* h at 24 */
205};
Lev Walkindfae9752004-09-29 13:19:37 +0000206static asn_CHOICE_specifics_t asn_DEF_b_specs = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000207 sizeof(struct b),
Lev Walkindfae9752004-09-29 13:19:37 +0000208 offsetof(struct b, _asn_ctx),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000209 offsetof(struct b, present),
210 sizeof(((struct b *)0)->present),
Lev Walkindfae9752004-09-29 13:19:37 +0000211 asn_DEF_b_tag2el,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000212 5, /* Count of tags in the map */
213 0 /* Whether extensible */
214};
Lev Walkind04430c2004-09-07 06:44:29 +0000215static /* Use -fall-defs-global to expose */
Lev Walkindfae9752004-09-29 13:19:37 +0000216asn_TYPE_descriptor_t asn_DEF_b = {
Lev Walkin2e3055d2004-08-20 13:36:32 +0000217 "b",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000218 CHOICE_free,
219 CHOICE_print,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000220 CHOICE_constraint,
221 CHOICE_decode_ber,
222 CHOICE_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000223 0, /* Not implemented yet */
224 CHOICE_encode_xer,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000225 CHOICE_outmost_tag,
Lev Walkin188ed2c2004-09-13 08:31:01 +0000226 0, /* No effective tags (pointer) */
227 0, /* No effective tags (count) */
228 0, /* No tags (pointer) */
229 0, /* No tags (count) */
Lev Walkindfae9752004-09-29 13:19:37 +0000230 asn_MBR_b,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000231 4, /* Elements count */
Lev Walkindfae9752004-09-29 13:19:37 +0000232 &asn_DEF_b_specs /* Additional specs */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000233};
234
Lev Walkindfae9752004-09-29 13:19:37 +0000235static asn_TYPE_member_t asn_MBR_T[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000236 { ATF_NOFLAGS, 0, offsetof(struct T, a),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000237 .tag = (ASN_TAG_CLASS_PRIVATE | (2 << 2)),
238 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000239 .type = (void *)&asn_DEF_NULL,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000240 .memb_constraints = 0, /* Defer to actual type */
241 .name = "a"
242 },
Lev Walkincc93b0f2004-09-10 09:18:20 +0000243 { ATF_NOFLAGS, 0, offsetof(struct T, b),
Lev Walkinb9189732004-09-10 09:37:12 +0000244 .tag = -1 /* Ambiguous tag (CHOICE?) */,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000245 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +0000246 .type = (void *)&asn_DEF_b,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000247 .memb_constraints = 0, /* Defer to actual type */
248 .name = "b"
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000249 },
250};
Lev Walkindfae9752004-09-29 13:19:37 +0000251static ber_tlv_tag_t asn_DEF_T_tags[] = {
Lev Walkin188ed2c2004-09-13 08:31:01 +0000252 (ASN_TAG_CLASS_PRIVATE | (1 << 2)),
253 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000254};
Lev Walkindfae9752004-09-29 13:19:37 +0000255static asn_TYPE_tag2member_t asn_DEF_T_tag2el[] = {
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000256 { (ASN_TAG_CLASS_PRIVATE | (2 << 2)), 0, 0, 0 }, /* a at 15 */
257 { (ASN_TAG_CLASS_PRIVATE | (5 << 2)), 1, 0, 0 }, /* c at 17 */
258 { (ASN_TAG_CLASS_PRIVATE | (6 << 2)), 1, 0, 0 }, /* d at 18 */
259 { (ASN_TAG_CLASS_PRIVATE | (7 << 2)), 1, 0, 0 }, /* f at 20 */
260 { (ASN_TAG_CLASS_PRIVATE | (8 << 2)), 1, 0, 0 }, /* g at 21 */
261 { (ASN_TAG_CLASS_PRIVATE | (9 << 2)), 1, 0, 0 }, /* h at 24 */
262};
Lev Walkindfae9752004-09-29 13:19:37 +0000263static asn_SEQUENCE_specifics_t asn_DEF_T_specs = {
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000264 sizeof(struct T),
Lev Walkindfae9752004-09-29 13:19:37 +0000265 offsetof(struct T, _asn_ctx),
266 asn_DEF_T_tag2el,
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000267 6, /* Count of tags in the map */
268 -1, /* Start extensions */
269 -1 /* Stop extensions */
270};
Lev Walkindfae9752004-09-29 13:19:37 +0000271asn_TYPE_descriptor_t asn_DEF_T = {
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000272 "T",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000273 SEQUENCE_free,
274 SEQUENCE_print,
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000275 SEQUENCE_constraint,
276 SEQUENCE_decode_ber,
277 SEQUENCE_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000278 0, /* Not implemented yet */
279 SEQUENCE_encode_xer,
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000280 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000281 asn_DEF_T_tags,
282 sizeof(asn_DEF_T_tags)
283 /sizeof(asn_DEF_T_tags[0]) - 1, /* 1 */
284 asn_DEF_T_tags, /* Same as above */
285 sizeof(asn_DEF_T_tags)
286 /sizeof(asn_DEF_T_tags[0]), /* 2 */
287 asn_MBR_T,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000288 2, /* Elements count */
Lev Walkindfae9752004-09-29 13:19:37 +0000289 &asn_DEF_T_specs /* Additional specs */
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000290};
291