blob: b4d9c719ca7b6ad1ef456c347f08681b48e230a3 [file] [log] [blame]
vlm3df79662004-06-28 21:13:22 +00001
vlm6e1b13e2004-08-11 05:25:47 +00002/*** <<< INCLUDES [T] >>> ***/
vlm3df79662004-06-28 21:13:22 +00003
vlm3df79662004-06-28 21:13:22 +00004#include <NULL.h>
vlm6e1b13e2004-08-11 05:25:47 +00005#include <constr_CHOICE.h>
vlm3df79662004-06-28 21:13:22 +00006#include <constr_SEQUENCE.h>
7
vlm6e1b13e2004-08-11 05:25:47 +00008/*** <<< DEPS [T] >>> ***/
9
vlm21e46002004-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;
vlm3df79662004-06-28 21:13:22 +000027extern asn1_TYPE_descriptor_t asn1_DEF_T;
28
29/*** <<< TYPE-DECLS [T] >>> ***/
30
31
32typedef struct T {
33 NULL_t a;
34 struct b {
vlm6e73a042004-08-11 07:17:22 +000035 b_PR present;
vlm3df79662004-06-28 21:13:22 +000036 union {
37 NULL_t c;
38 NULL_t d;
39 struct e {
vlm6e73a042004-08-11 07:17:22 +000040 e_PR present;
vlm3df79662004-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 */
47 ber_dec_ctx_t _ber_dec_ctx;
48 } e;
49 struct h {
vlm6e73a042004-08-11 07:17:22 +000050 h_PR present;
vlm3df79662004-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 */
57 ber_dec_ctx_t _ber_dec_ctx;
58 } h;
59 } choice;
60
61 /* Context for parsing across buffer boundaries */
62 ber_dec_ctx_t _ber_dec_ctx;
63 } b;
64
65 /* Context for parsing across buffer boundaries */
66 ber_dec_ctx_t _ber_dec_ctx;
67} T_t;
68
69/*** <<< STAT-DEFS [T] >>> ***/
70
vlm21e46002004-08-20 13:36:32 +000071static asn1_TYPE_member_t asn1_MBR_e[] = {
72 { 0, offsetof(struct e, choice.f),
73 .tag = (ASN_TAG_CLASS_PRIVATE | (7 << 2)),
74 .tag_mode = -1, /* IMPLICIT tag at current level */
75 .type = (void *)&asn1_DEF_NULL,
76 .memb_constraints = 0, /* Defer to actual type */
77 .name = "f"
vlm3df79662004-06-28 21:13:22 +000078 },
vlm21e46002004-08-20 13:36:32 +000079 { 0, offsetof(struct e, choice.g),
80 .tag = (ASN_TAG_CLASS_PRIVATE | (8 << 2)),
81 .tag_mode = -1, /* IMPLICIT tag at current level */
82 .type = (void *)&asn1_DEF_NULL,
83 .memb_constraints = 0, /* Defer to actual type */
84 .name = "g"
85 },
86};
87static asn1_TYPE_tag2member_t asn1_DEF_e_tag2el[] = {
88 { (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};
91static asn1_CHOICE_specifics_t asn1_DEF_e_specs = {
92 sizeof(struct e),
93 offsetof(struct e, _ber_dec_ctx),
94 offsetof(struct e, present),
95 sizeof(((struct e *)0)->present),
96 asn1_DEF_e_tag2el,
97 2, /* Count of tags in the map */
98 0 /* Whether extensible */
99};
vlm1dc848e2004-09-07 06:44:29 +0000100static /* Use -fall-defs-global to expose */
vlm21e46002004-08-20 13:36:32 +0000101asn1_TYPE_descriptor_t asn1_DEF_e = {
102 "e",
103 CHOICE_constraint,
104 CHOICE_decode_ber,
105 CHOICE_encode_der,
106 CHOICE_print,
107 CHOICE_free,
108 CHOICE_outmost_tag,
109 0, /* No explicit tags (pointer) */
110 0, /* No explicit tags (count) */
111 0, /* Tags to skip */
112 1, /* Whether CONSTRUCTED */
113 asn1_MBR_e,
114 2, /* Elements count */
115 &asn1_DEF_e_specs /* Additional specs */
116};
117
118static asn1_TYPE_member_t asn1_MBR_h[] = {
119 { 0, offsetof(struct h, choice.i),
120 .tag = (ASN_TAG_CLASS_PRIVATE | (1 << 2)),
121 .tag_mode = -1, /* IMPLICIT tag at current level */
122 .type = (void *)&asn1_DEF_NULL,
123 .memb_constraints = 0, /* Defer to actual type */
124 .name = "i"
125 },
126 { 0, offsetof(struct h, choice.j),
127 .tag = (ASN_TAG_CLASS_PRIVATE | (2 << 2)),
128 .tag_mode = -1, /* IMPLICIT tag at current level */
129 .type = (void *)&asn1_DEF_NULL,
130 .memb_constraints = 0, /* Defer to actual type */
131 .name = "j"
132 },
133};
134static asn1_TYPE_tag2member_t asn1_DEF_h_tag2el[] = {
135 { (ASN_TAG_CLASS_PRIVATE | (1 << 2)), 0, 0, 0 }, /* i at 24 */
136 { (ASN_TAG_CLASS_PRIVATE | (2 << 2)), 1, 0, 0 }, /* j at 25 */
137};
138static asn1_CHOICE_specifics_t asn1_DEF_h_specs = {
139 sizeof(struct h),
140 offsetof(struct h, _ber_dec_ctx),
141 offsetof(struct h, present),
142 sizeof(((struct h *)0)->present),
143 asn1_DEF_h_tag2el,
144 2, /* Count of tags in the map */
145 0 /* Whether extensible */
146};
vlm1dc848e2004-09-07 06:44:29 +0000147static /* Use -fall-defs-global to expose */
vlm21e46002004-08-20 13:36:32 +0000148asn1_TYPE_descriptor_t asn1_DEF_h = {
149 "h",
150 CHOICE_constraint,
151 CHOICE_decode_ber,
152 CHOICE_encode_der,
153 CHOICE_print,
154 CHOICE_free,
155 CHOICE_outmost_tag,
156 0, /* No explicit tags (pointer) */
157 0, /* No explicit tags (count) */
158 0, /* Tags to skip */
159 1, /* Whether CONSTRUCTED */
160 asn1_MBR_h,
161 2, /* Elements count */
162 &asn1_DEF_h_specs /* Additional specs */
163};
164
165static asn1_TYPE_member_t asn1_MBR_b[] = {
166 { 0, offsetof(struct b, choice.c),
167 .tag = (ASN_TAG_CLASS_PRIVATE | (5 << 2)),
168 .tag_mode = -1, /* IMPLICIT tag at current level */
169 .type = (void *)&asn1_DEF_NULL,
170 .memb_constraints = 0, /* Defer to actual type */
171 .name = "c"
172 },
173 { 0, offsetof(struct b, choice.d),
174 .tag = (ASN_TAG_CLASS_PRIVATE | (6 << 2)),
175 .tag_mode = -1, /* IMPLICIT tag at current level */
176 .type = (void *)&asn1_DEF_NULL,
177 .memb_constraints = 0, /* Defer to actual type */
178 .name = "d"
179 },
180 { 0, offsetof(struct b, choice.e),
vlm60e05a42004-09-04 04:54:42 +0000181 .tag = -1 /* Ambiguous tag (CHOICE|ANY?) */,
vlm21e46002004-08-20 13:36:32 +0000182 .tag_mode = 0,
183 .type = (void *)&asn1_DEF_e,
184 .memb_constraints = 0, /* Defer to actual type */
185 .name = "e"
186 },
187 { 0, offsetof(struct b, choice.h),
188 .tag = (ASN_TAG_CLASS_PRIVATE | (9 << 2)),
189 .tag_mode = +1, /* EXPLICIT tag at current level */
190 .type = (void *)&asn1_DEF_h,
191 .memb_constraints = 0, /* Defer to actual type */
192 .name = "h"
193 },
194};
195static asn1_TYPE_tag2member_t asn1_DEF_b_tag2el[] = {
196 { (ASN_TAG_CLASS_PRIVATE | (5 << 2)), 0, 0, 0 }, /* c at 17 */
197 { (ASN_TAG_CLASS_PRIVATE | (6 << 2)), 1, 0, 0 }, /* d at 18 */
198 { (ASN_TAG_CLASS_PRIVATE | (7 << 2)), 2, 0, 0 }, /* f at 20 */
199 { (ASN_TAG_CLASS_PRIVATE | (8 << 2)), 2, 0, 0 }, /* g at 21 */
200 { (ASN_TAG_CLASS_PRIVATE | (9 << 2)), 3, 0, 0 }, /* h at 24 */
201};
202static asn1_CHOICE_specifics_t asn1_DEF_b_specs = {
203 sizeof(struct b),
204 offsetof(struct b, _ber_dec_ctx),
205 offsetof(struct b, present),
206 sizeof(((struct b *)0)->present),
207 asn1_DEF_b_tag2el,
208 5, /* Count of tags in the map */
209 0 /* Whether extensible */
210};
vlm1dc848e2004-09-07 06:44:29 +0000211static /* Use -fall-defs-global to expose */
vlm21e46002004-08-20 13:36:32 +0000212asn1_TYPE_descriptor_t asn1_DEF_b = {
213 "b",
214 CHOICE_constraint,
215 CHOICE_decode_ber,
216 CHOICE_encode_der,
217 CHOICE_print,
218 CHOICE_free,
219 CHOICE_outmost_tag,
220 0, /* No explicit tags (pointer) */
221 0, /* No explicit tags (count) */
222 0, /* Tags to skip */
223 1, /* Whether CONSTRUCTED */
224 asn1_MBR_b,
225 4, /* Elements count */
226 &asn1_DEF_b_specs /* Additional specs */
227};
228
229static asn1_TYPE_member_t asn1_MBR_T[] = {
230 { 0, offsetof(struct T, a),
231 .tag = (ASN_TAG_CLASS_PRIVATE | (2 << 2)),
232 .tag_mode = -1, /* IMPLICIT tag at current level */
233 .type = (void *)&asn1_DEF_NULL,
234 .memb_constraints = 0, /* Defer to actual type */
235 .name = "a"
236 },
237 { 0, offsetof(struct T, b),
vlm60e05a42004-09-04 04:54:42 +0000238 .tag = -1 /* Ambiguous tag (CHOICE|ANY?) */,
vlm21e46002004-08-20 13:36:32 +0000239 .tag_mode = 0,
240 .type = (void *)&asn1_DEF_b,
241 .memb_constraints = 0, /* Defer to actual type */
242 .name = "b"
vlm3df79662004-06-28 21:13:22 +0000243 },
244};
245static ber_tlv_tag_t asn1_DEF_T_tags[] = {
246 (ASN_TAG_CLASS_PRIVATE | (1 << 2))
247};
248static asn1_TYPE_tag2member_t asn1_DEF_T_tag2el[] = {
249 { (ASN_TAG_CLASS_PRIVATE | (2 << 2)), 0, 0, 0 }, /* a at 15 */
250 { (ASN_TAG_CLASS_PRIVATE | (5 << 2)), 1, 0, 0 }, /* c at 17 */
251 { (ASN_TAG_CLASS_PRIVATE | (6 << 2)), 1, 0, 0 }, /* d at 18 */
252 { (ASN_TAG_CLASS_PRIVATE | (7 << 2)), 1, 0, 0 }, /* f at 20 */
253 { (ASN_TAG_CLASS_PRIVATE | (8 << 2)), 1, 0, 0 }, /* g at 21 */
254 { (ASN_TAG_CLASS_PRIVATE | (9 << 2)), 1, 0, 0 }, /* h at 24 */
255};
256static asn1_SEQUENCE_specifics_t asn1_DEF_T_specs = {
257 sizeof(struct T),
258 offsetof(struct T, _ber_dec_ctx),
vlm3df79662004-06-28 21:13:22 +0000259 asn1_DEF_T_tag2el,
260 6, /* Count of tags in the map */
261 -1, /* Start extensions */
262 -1 /* Stop extensions */
263};
264asn1_TYPE_descriptor_t asn1_DEF_T = {
265 "T",
266 SEQUENCE_constraint,
267 SEQUENCE_decode_ber,
268 SEQUENCE_encode_der,
269 SEQUENCE_print,
270 SEQUENCE_free,
271 0, /* Use generic outmost tag fetcher */
272 asn1_DEF_T_tags,
273 sizeof(asn1_DEF_T_tags)
vlm6e73a042004-08-11 07:17:22 +0000274 /sizeof(asn1_DEF_T_tags[0]), /* 1 */
vlm3df79662004-06-28 21:13:22 +0000275 1, /* Tags to skip */
276 1, /* Whether CONSTRUCTED */
vlm21e46002004-08-20 13:36:32 +0000277 asn1_MBR_T,
278 2, /* Elements count */
vlm3df79662004-06-28 21:13:22 +0000279 &asn1_DEF_T_specs /* Additional specs */
280};
281