blob: 796962aec23eab64f1d1b47001d5171a752b2610 [file] [log] [blame]
Lev Walkin2888f272004-09-14 12:46:58 +00001
2/*** <<< INCLUDES [T1] >>> ***/
3
4#include <T2.h>
5
6/*** <<< TYPE-DECLS [T1] >>> ***/
7
8
9typedef T2_t T1_t;
10
11/*** <<< FUNC-DECLS [T1] >>> ***/
12
Lev Walkindfae9752004-09-29 13:19:37 +000013extern asn_TYPE_descriptor_t asn_DEF_T1;
Lev Walkina9cc46e2004-09-22 16:06:28 +000014asn_struct_free_f T1_free;
15asn_struct_print_f T1_print;
Lev Walkin2888f272004-09-14 12:46:58 +000016asn_constr_check_f T1_constraint;
17ber_type_decoder_f T1_decode_ber;
18der_type_encoder_f T1_encode_der;
Lev Walkina9cc46e2004-09-22 16:06:28 +000019xer_type_encoder_f T1_encode_xer;
Lev Walkin2888f272004-09-14 12:46:58 +000020
21/*** <<< CODE [T1] >>> ***/
22
23int
Lev Walkindfae9752004-09-29 13:19:37 +000024T1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin2888f272004-09-14 12:46:58 +000025 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin154aa182004-09-26 13:12:56 +000026 /* Replace with underlying type checker */
Lev Walkindfae9752004-09-29 13:19:37 +000027 td->check_constraints = asn_DEF_T2.check_constraints;
Lev Walkin154aa182004-09-26 13:12:56 +000028 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin2888f272004-09-14 12:46:58 +000029}
30
31/*
32 * This type is implemented using T2,
Lev Walkinc3808c12004-09-23 22:14:58 +000033 * so here we adjust the DEF accordingly.
Lev Walkin2888f272004-09-14 12:46:58 +000034 */
35static void
Lev Walkindfae9752004-09-29 13:19:37 +000036T1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
37 td->free_struct = asn_DEF_T2.free_struct;
38 td->print_struct = asn_DEF_T2.print_struct;
39 td->ber_decoder = asn_DEF_T2.ber_decoder;
40 td->der_encoder = asn_DEF_T2.der_encoder;
41 td->xer_decoder = asn_DEF_T2.xer_decoder;
42 td->xer_encoder = asn_DEF_T2.xer_encoder;
43 td->elements = asn_DEF_T2.elements;
44 td->elements_count = asn_DEF_T2.elements_count;
45 td->specifics = asn_DEF_T2.specifics;
Lev Walkin2888f272004-09-14 12:46:58 +000046}
47
Lev Walkina9cc46e2004-09-22 16:06:28 +000048void
Lev Walkindfae9752004-09-29 13:19:37 +000049T1_free(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +000050 void *struct_ptr, int contents_only) {
Lev Walkin2888f272004-09-14 12:46:58 +000051 T1_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +000052 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin2888f272004-09-14 12:46:58 +000053}
54
55int
Lev Walkindfae9752004-09-29 13:19:37 +000056T1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin2888f272004-09-14 12:46:58 +000057 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
58 T1_inherit_TYPE_descriptor(td);
59 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
60}
61
Lev Walkindc06f6b2004-10-20 15:50:55 +000062asn_dec_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +000063T1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +000064 void **structure, void *bufptr, size_t size, int tag_mode) {
Lev Walkin2888f272004-09-14 12:46:58 +000065 T1_inherit_TYPE_descriptor(td);
Lev Walkindfae9752004-09-29 13:19:37 +000066 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
Lev Walkina9cc46e2004-09-22 16:06:28 +000067}
68
69asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +000070T1_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +000071 void *structure, int tag_mode, ber_tlv_tag_t tag,
72 asn_app_consume_bytes_f *cb, void *app_key) {
73 T1_inherit_TYPE_descriptor(td);
74 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
75}
76
77asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +000078T1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkina9cc46e2004-09-22 16:06:28 +000079 int ilevel, enum xer_encoder_flags_e flags,
80 asn_app_consume_bytes_f *cb, void *app_key) {
81 T1_inherit_TYPE_descriptor(td);
82 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
Lev Walkin2888f272004-09-14 12:46:58 +000083}
84
85
86/*** <<< STAT-DEFS [T1] >>> ***/
87
Lev Walkindfae9752004-09-29 13:19:37 +000088static ber_tlv_tag_t asn_DEF_T1_tags[] = {
Lev Walkin2888f272004-09-14 12:46:58 +000089 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
90 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
91 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
92 (ASN_TAG_CLASS_CONTEXT | (6 << 2))
93};
Lev Walkindfae9752004-09-29 13:19:37 +000094static ber_tlv_tag_t asn_DEF_T1_all_tags[] = {
Lev Walkin2888f272004-09-14 12:46:58 +000095 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
96 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
97 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
98 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
99 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
100 (ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
101};
Lev Walkindfae9752004-09-29 13:19:37 +0000102asn_TYPE_descriptor_t asn_DEF_T1 = {
Lev Walkin2888f272004-09-14 12:46:58 +0000103 "T1",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000104 "T1",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000105 T1_free,
106 T1_print,
Lev Walkin2888f272004-09-14 12:46:58 +0000107 T1_constraint,
108 T1_decode_ber,
109 T1_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000110 0, /* Not implemented yet */
111 T1_encode_xer,
Lev Walkin2888f272004-09-14 12:46:58 +0000112 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000113 asn_DEF_T1_tags,
114 sizeof(asn_DEF_T1_tags)
115 /sizeof(asn_DEF_T1_tags[0]), /* 4 */
116 asn_DEF_T1_all_tags,
117 sizeof(asn_DEF_T1_all_tags)
118 /sizeof(asn_DEF_T1_all_tags[0]), /* 6 */
Lev Walkin2888f272004-09-14 12:46:58 +0000119 0, 0, /* No members */
120 0 /* No specifics */
121};
122
123
124/*** <<< INCLUDES [T2] >>> ***/
125
126#include <T3.h>
127
128/*** <<< TYPE-DECLS [T2] >>> ***/
129
130
131typedef T3_t T2_t;
132
133/*** <<< FUNC-DECLS [T2] >>> ***/
134
Lev Walkindfae9752004-09-29 13:19:37 +0000135extern asn_TYPE_descriptor_t asn_DEF_T2;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000136asn_struct_free_f T2_free;
137asn_struct_print_f T2_print;
Lev Walkin2888f272004-09-14 12:46:58 +0000138asn_constr_check_f T2_constraint;
139ber_type_decoder_f T2_decode_ber;
140der_type_encoder_f T2_encode_der;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000141xer_type_encoder_f T2_encode_xer;
Lev Walkin2888f272004-09-14 12:46:58 +0000142
143/*** <<< CODE [T2] >>> ***/
144
145int
Lev Walkindfae9752004-09-29 13:19:37 +0000146T2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin2888f272004-09-14 12:46:58 +0000147 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin154aa182004-09-26 13:12:56 +0000148 /* Replace with underlying type checker */
Lev Walkindfae9752004-09-29 13:19:37 +0000149 td->check_constraints = asn_DEF_T3.check_constraints;
Lev Walkin154aa182004-09-26 13:12:56 +0000150 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin2888f272004-09-14 12:46:58 +0000151}
152
153/*
154 * This type is implemented using T3,
Lev Walkinc3808c12004-09-23 22:14:58 +0000155 * so here we adjust the DEF accordingly.
Lev Walkin2888f272004-09-14 12:46:58 +0000156 */
157static void
Lev Walkindfae9752004-09-29 13:19:37 +0000158T2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
159 td->free_struct = asn_DEF_T3.free_struct;
160 td->print_struct = asn_DEF_T3.print_struct;
161 td->ber_decoder = asn_DEF_T3.ber_decoder;
162 td->der_encoder = asn_DEF_T3.der_encoder;
163 td->xer_decoder = asn_DEF_T3.xer_decoder;
164 td->xer_encoder = asn_DEF_T3.xer_encoder;
165 td->elements = asn_DEF_T3.elements;
166 td->elements_count = asn_DEF_T3.elements_count;
167 td->specifics = asn_DEF_T3.specifics;
Lev Walkin2888f272004-09-14 12:46:58 +0000168}
169
Lev Walkina9cc46e2004-09-22 16:06:28 +0000170void
Lev Walkindfae9752004-09-29 13:19:37 +0000171T2_free(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000172 void *struct_ptr, int contents_only) {
Lev Walkin2888f272004-09-14 12:46:58 +0000173 T2_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000174 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin2888f272004-09-14 12:46:58 +0000175}
176
177int
Lev Walkindfae9752004-09-29 13:19:37 +0000178T2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin2888f272004-09-14 12:46:58 +0000179 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
180 T2_inherit_TYPE_descriptor(td);
181 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
182}
183
Lev Walkindc06f6b2004-10-20 15:50:55 +0000184asn_dec_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000185T2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000186 void **structure, void *bufptr, size_t size, int tag_mode) {
Lev Walkin2888f272004-09-14 12:46:58 +0000187 T2_inherit_TYPE_descriptor(td);
Lev Walkindfae9752004-09-29 13:19:37 +0000188 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000189}
190
191asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000192T2_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000193 void *structure, int tag_mode, ber_tlv_tag_t tag,
194 asn_app_consume_bytes_f *cb, void *app_key) {
195 T2_inherit_TYPE_descriptor(td);
196 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
197}
198
199asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000200T2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000201 int ilevel, enum xer_encoder_flags_e flags,
202 asn_app_consume_bytes_f *cb, void *app_key) {
203 T2_inherit_TYPE_descriptor(td);
204 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
Lev Walkin2888f272004-09-14 12:46:58 +0000205}
206
207
208/*** <<< STAT-DEFS [T2] >>> ***/
209
Lev Walkindfae9752004-09-29 13:19:37 +0000210static ber_tlv_tag_t asn_DEF_T2_tags[] = {
Lev Walkin2888f272004-09-14 12:46:58 +0000211 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
212 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
213 (ASN_TAG_CLASS_CONTEXT | (6 << 2))
214};
Lev Walkindfae9752004-09-29 13:19:37 +0000215static ber_tlv_tag_t asn_DEF_T2_all_tags[] = {
Lev Walkin2888f272004-09-14 12:46:58 +0000216 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
217 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
218 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
219 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
220 (ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
221};
Lev Walkindfae9752004-09-29 13:19:37 +0000222asn_TYPE_descriptor_t asn_DEF_T2 = {
Lev Walkin2888f272004-09-14 12:46:58 +0000223 "T2",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000224 "T2",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000225 T2_free,
226 T2_print,
Lev Walkin2888f272004-09-14 12:46:58 +0000227 T2_constraint,
228 T2_decode_ber,
229 T2_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000230 0, /* Not implemented yet */
231 T2_encode_xer,
Lev Walkin2888f272004-09-14 12:46:58 +0000232 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000233 asn_DEF_T2_tags,
234 sizeof(asn_DEF_T2_tags)
235 /sizeof(asn_DEF_T2_tags[0]), /* 3 */
236 asn_DEF_T2_all_tags,
237 sizeof(asn_DEF_T2_all_tags)
238 /sizeof(asn_DEF_T2_all_tags[0]), /* 5 */
Lev Walkin2888f272004-09-14 12:46:58 +0000239 0, 0, /* No members */
240 0 /* No specifics */
241};
242
243
244/*** <<< INCLUDES [T3] >>> ***/
245
246#include <T4.h>
247
248/*** <<< TYPE-DECLS [T3] >>> ***/
249
250
251typedef T4_t T3_t;
252
253/*** <<< FUNC-DECLS [T3] >>> ***/
254
Lev Walkindfae9752004-09-29 13:19:37 +0000255extern asn_TYPE_descriptor_t asn_DEF_T3;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000256asn_struct_free_f T3_free;
257asn_struct_print_f T3_print;
Lev Walkin2888f272004-09-14 12:46:58 +0000258asn_constr_check_f T3_constraint;
259ber_type_decoder_f T3_decode_ber;
260der_type_encoder_f T3_encode_der;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000261xer_type_encoder_f T3_encode_xer;
Lev Walkin2888f272004-09-14 12:46:58 +0000262
263/*** <<< CODE [T3] >>> ***/
264
265int
Lev Walkindfae9752004-09-29 13:19:37 +0000266T3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin2888f272004-09-14 12:46:58 +0000267 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin154aa182004-09-26 13:12:56 +0000268 /* Replace with underlying type checker */
Lev Walkindfae9752004-09-29 13:19:37 +0000269 td->check_constraints = asn_DEF_T4.check_constraints;
Lev Walkin154aa182004-09-26 13:12:56 +0000270 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin2888f272004-09-14 12:46:58 +0000271}
272
273/*
274 * This type is implemented using T4,
Lev Walkinc3808c12004-09-23 22:14:58 +0000275 * so here we adjust the DEF accordingly.
Lev Walkin2888f272004-09-14 12:46:58 +0000276 */
277static void
Lev Walkindfae9752004-09-29 13:19:37 +0000278T3_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
279 td->free_struct = asn_DEF_T4.free_struct;
280 td->print_struct = asn_DEF_T4.print_struct;
281 td->ber_decoder = asn_DEF_T4.ber_decoder;
282 td->der_encoder = asn_DEF_T4.der_encoder;
283 td->xer_decoder = asn_DEF_T4.xer_decoder;
284 td->xer_encoder = asn_DEF_T4.xer_encoder;
285 td->elements = asn_DEF_T4.elements;
286 td->elements_count = asn_DEF_T4.elements_count;
287 td->specifics = asn_DEF_T4.specifics;
Lev Walkin2888f272004-09-14 12:46:58 +0000288}
289
Lev Walkina9cc46e2004-09-22 16:06:28 +0000290void
Lev Walkindfae9752004-09-29 13:19:37 +0000291T3_free(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000292 void *struct_ptr, int contents_only) {
Lev Walkin2888f272004-09-14 12:46:58 +0000293 T3_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000294 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin2888f272004-09-14 12:46:58 +0000295}
296
297int
Lev Walkindfae9752004-09-29 13:19:37 +0000298T3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin2888f272004-09-14 12:46:58 +0000299 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
300 T3_inherit_TYPE_descriptor(td);
301 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
302}
303
Lev Walkindc06f6b2004-10-20 15:50:55 +0000304asn_dec_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000305T3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000306 void **structure, void *bufptr, size_t size, int tag_mode) {
Lev Walkin2888f272004-09-14 12:46:58 +0000307 T3_inherit_TYPE_descriptor(td);
Lev Walkindfae9752004-09-29 13:19:37 +0000308 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000309}
310
311asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000312T3_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000313 void *structure, int tag_mode, ber_tlv_tag_t tag,
314 asn_app_consume_bytes_f *cb, void *app_key) {
315 T3_inherit_TYPE_descriptor(td);
316 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
317}
318
319asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000320T3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000321 int ilevel, enum xer_encoder_flags_e flags,
322 asn_app_consume_bytes_f *cb, void *app_key) {
323 T3_inherit_TYPE_descriptor(td);
324 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
Lev Walkin2888f272004-09-14 12:46:58 +0000325}
326
327
328/*** <<< STAT-DEFS [T3] >>> ***/
329
Lev Walkindfae9752004-09-29 13:19:37 +0000330static ber_tlv_tag_t asn_DEF_T3_tags[] = {
Lev Walkin2888f272004-09-14 12:46:58 +0000331 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
332 (ASN_TAG_CLASS_CONTEXT | (6 << 2))
333};
Lev Walkindfae9752004-09-29 13:19:37 +0000334static ber_tlv_tag_t asn_DEF_T3_all_tags[] = {
Lev Walkin2888f272004-09-14 12:46:58 +0000335 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
336 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
337 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
338 (ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
339};
Lev Walkindfae9752004-09-29 13:19:37 +0000340asn_TYPE_descriptor_t asn_DEF_T3 = {
Lev Walkin2888f272004-09-14 12:46:58 +0000341 "T3",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000342 "T3",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000343 T3_free,
344 T3_print,
Lev Walkin2888f272004-09-14 12:46:58 +0000345 T3_constraint,
346 T3_decode_ber,
347 T3_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000348 0, /* Not implemented yet */
349 T3_encode_xer,
Lev Walkin2888f272004-09-14 12:46:58 +0000350 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000351 asn_DEF_T3_tags,
352 sizeof(asn_DEF_T3_tags)
353 /sizeof(asn_DEF_T3_tags[0]), /* 2 */
354 asn_DEF_T3_all_tags,
355 sizeof(asn_DEF_T3_all_tags)
356 /sizeof(asn_DEF_T3_all_tags[0]), /* 4 */
Lev Walkin2888f272004-09-14 12:46:58 +0000357 0, 0, /* No members */
358 0 /* No specifics */
359};
360
361
362/*** <<< INCLUDES [T4] >>> ***/
363
364#include <T5.h>
365
366/*** <<< TYPE-DECLS [T4] >>> ***/
367
368
369typedef T5_t T4_t;
370
371/*** <<< FUNC-DECLS [T4] >>> ***/
372
Lev Walkindfae9752004-09-29 13:19:37 +0000373extern asn_TYPE_descriptor_t asn_DEF_T4;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000374asn_struct_free_f T4_free;
375asn_struct_print_f T4_print;
Lev Walkin2888f272004-09-14 12:46:58 +0000376asn_constr_check_f T4_constraint;
377ber_type_decoder_f T4_decode_ber;
378der_type_encoder_f T4_encode_der;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000379xer_type_encoder_f T4_encode_xer;
Lev Walkin2888f272004-09-14 12:46:58 +0000380
381/*** <<< CODE [T4] >>> ***/
382
383int
Lev Walkindfae9752004-09-29 13:19:37 +0000384T4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin2888f272004-09-14 12:46:58 +0000385 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin154aa182004-09-26 13:12:56 +0000386 /* Replace with underlying type checker */
Lev Walkindfae9752004-09-29 13:19:37 +0000387 td->check_constraints = asn_DEF_T5.check_constraints;
Lev Walkin154aa182004-09-26 13:12:56 +0000388 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin2888f272004-09-14 12:46:58 +0000389}
390
391/*
392 * This type is implemented using T5,
Lev Walkinc3808c12004-09-23 22:14:58 +0000393 * so here we adjust the DEF accordingly.
Lev Walkin2888f272004-09-14 12:46:58 +0000394 */
395static void
Lev Walkindfae9752004-09-29 13:19:37 +0000396T4_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
397 td->free_struct = asn_DEF_T5.free_struct;
398 td->print_struct = asn_DEF_T5.print_struct;
399 td->ber_decoder = asn_DEF_T5.ber_decoder;
400 td->der_encoder = asn_DEF_T5.der_encoder;
401 td->xer_decoder = asn_DEF_T5.xer_decoder;
402 td->xer_encoder = asn_DEF_T5.xer_encoder;
403 td->elements = asn_DEF_T5.elements;
404 td->elements_count = asn_DEF_T5.elements_count;
405 td->specifics = asn_DEF_T5.specifics;
Lev Walkin2888f272004-09-14 12:46:58 +0000406}
407
Lev Walkina9cc46e2004-09-22 16:06:28 +0000408void
Lev Walkindfae9752004-09-29 13:19:37 +0000409T4_free(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000410 void *struct_ptr, int contents_only) {
Lev Walkin2888f272004-09-14 12:46:58 +0000411 T4_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000412 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin2888f272004-09-14 12:46:58 +0000413}
414
415int
Lev Walkindfae9752004-09-29 13:19:37 +0000416T4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin2888f272004-09-14 12:46:58 +0000417 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
418 T4_inherit_TYPE_descriptor(td);
419 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
420}
421
Lev Walkindc06f6b2004-10-20 15:50:55 +0000422asn_dec_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000423T4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000424 void **structure, void *bufptr, size_t size, int tag_mode) {
Lev Walkin2888f272004-09-14 12:46:58 +0000425 T4_inherit_TYPE_descriptor(td);
Lev Walkindfae9752004-09-29 13:19:37 +0000426 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000427}
428
429asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000430T4_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000431 void *structure, int tag_mode, ber_tlv_tag_t tag,
432 asn_app_consume_bytes_f *cb, void *app_key) {
433 T4_inherit_TYPE_descriptor(td);
434 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
435}
436
437asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000438T4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000439 int ilevel, enum xer_encoder_flags_e flags,
440 asn_app_consume_bytes_f *cb, void *app_key) {
441 T4_inherit_TYPE_descriptor(td);
442 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
Lev Walkin2888f272004-09-14 12:46:58 +0000443}
444
445
446/*** <<< STAT-DEFS [T4] >>> ***/
447
Lev Walkindfae9752004-09-29 13:19:37 +0000448static ber_tlv_tag_t asn_DEF_T4_tags[] = {
Lev Walkin2888f272004-09-14 12:46:58 +0000449 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
450 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
451 (ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
452};
Lev Walkindfae9752004-09-29 13:19:37 +0000453asn_TYPE_descriptor_t asn_DEF_T4 = {
Lev Walkin2888f272004-09-14 12:46:58 +0000454 "T4",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000455 "T4",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000456 T4_free,
457 T4_print,
Lev Walkin2888f272004-09-14 12:46:58 +0000458 T4_constraint,
459 T4_decode_ber,
460 T4_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000461 0, /* Not implemented yet */
462 T4_encode_xer,
Lev Walkin2888f272004-09-14 12:46:58 +0000463 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000464 asn_DEF_T4_tags,
465 sizeof(asn_DEF_T4_tags)
466 /sizeof(asn_DEF_T4_tags[0]) - 1, /* 2 */
467 asn_DEF_T4_tags, /* Same as above */
468 sizeof(asn_DEF_T4_tags)
469 /sizeof(asn_DEF_T4_tags[0]), /* 3 */
Lev Walkin2888f272004-09-14 12:46:58 +0000470 0, 0, /* No members */
471 0 /* No specifics */
472};
473
474
475/*** <<< INCLUDES [T5] >>> ***/
476
477#include <T6.h>
478
479/*** <<< TYPE-DECLS [T5] >>> ***/
480
481
482typedef T6_t T5_t;
483
484/*** <<< FUNC-DECLS [T5] >>> ***/
485
Lev Walkindfae9752004-09-29 13:19:37 +0000486extern asn_TYPE_descriptor_t asn_DEF_T5;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000487asn_struct_free_f T5_free;
488asn_struct_print_f T5_print;
Lev Walkin2888f272004-09-14 12:46:58 +0000489asn_constr_check_f T5_constraint;
490ber_type_decoder_f T5_decode_ber;
491der_type_encoder_f T5_encode_der;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000492xer_type_encoder_f T5_encode_xer;
Lev Walkin2888f272004-09-14 12:46:58 +0000493
494/*** <<< CODE [T5] >>> ***/
495
496int
Lev Walkindfae9752004-09-29 13:19:37 +0000497T5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin2888f272004-09-14 12:46:58 +0000498 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin154aa182004-09-26 13:12:56 +0000499 /* Replace with underlying type checker */
Lev Walkindfae9752004-09-29 13:19:37 +0000500 td->check_constraints = asn_DEF_T6.check_constraints;
Lev Walkin154aa182004-09-26 13:12:56 +0000501 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin2888f272004-09-14 12:46:58 +0000502}
503
504/*
505 * This type is implemented using T6,
Lev Walkinc3808c12004-09-23 22:14:58 +0000506 * so here we adjust the DEF accordingly.
Lev Walkin2888f272004-09-14 12:46:58 +0000507 */
508static void
Lev Walkindfae9752004-09-29 13:19:37 +0000509T5_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
510 td->free_struct = asn_DEF_T6.free_struct;
511 td->print_struct = asn_DEF_T6.print_struct;
512 td->ber_decoder = asn_DEF_T6.ber_decoder;
513 td->der_encoder = asn_DEF_T6.der_encoder;
514 td->xer_decoder = asn_DEF_T6.xer_decoder;
515 td->xer_encoder = asn_DEF_T6.xer_encoder;
516 td->elements = asn_DEF_T6.elements;
517 td->elements_count = asn_DEF_T6.elements_count;
518 td->specifics = asn_DEF_T6.specifics;
Lev Walkin2888f272004-09-14 12:46:58 +0000519}
520
Lev Walkina9cc46e2004-09-22 16:06:28 +0000521void
Lev Walkindfae9752004-09-29 13:19:37 +0000522T5_free(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000523 void *struct_ptr, int contents_only) {
Lev Walkin2888f272004-09-14 12:46:58 +0000524 T5_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000525 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin2888f272004-09-14 12:46:58 +0000526}
527
528int
Lev Walkindfae9752004-09-29 13:19:37 +0000529T5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin2888f272004-09-14 12:46:58 +0000530 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
531 T5_inherit_TYPE_descriptor(td);
532 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
533}
534
Lev Walkindc06f6b2004-10-20 15:50:55 +0000535asn_dec_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000536T5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000537 void **structure, void *bufptr, size_t size, int tag_mode) {
Lev Walkin2888f272004-09-14 12:46:58 +0000538 T5_inherit_TYPE_descriptor(td);
Lev Walkindfae9752004-09-29 13:19:37 +0000539 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000540}
541
542asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000543T5_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000544 void *structure, int tag_mode, ber_tlv_tag_t tag,
545 asn_app_consume_bytes_f *cb, void *app_key) {
546 T5_inherit_TYPE_descriptor(td);
547 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
548}
549
550asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000551T5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000552 int ilevel, enum xer_encoder_flags_e flags,
553 asn_app_consume_bytes_f *cb, void *app_key) {
554 T5_inherit_TYPE_descriptor(td);
555 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
Lev Walkin2888f272004-09-14 12:46:58 +0000556}
557
558
559/*** <<< STAT-DEFS [T5] >>> ***/
560
Lev Walkindfae9752004-09-29 13:19:37 +0000561static ber_tlv_tag_t asn_DEF_T5_tags[] = {
Lev Walkin2888f272004-09-14 12:46:58 +0000562 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
563 (ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
564};
Lev Walkindfae9752004-09-29 13:19:37 +0000565asn_TYPE_descriptor_t asn_DEF_T5 = {
Lev Walkin2888f272004-09-14 12:46:58 +0000566 "T5",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000567 "T5",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000568 T5_free,
569 T5_print,
Lev Walkin2888f272004-09-14 12:46:58 +0000570 T5_constraint,
571 T5_decode_ber,
572 T5_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000573 0, /* Not implemented yet */
574 T5_encode_xer,
Lev Walkin2888f272004-09-14 12:46:58 +0000575 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000576 asn_DEF_T5_tags,
577 sizeof(asn_DEF_T5_tags)
578 /sizeof(asn_DEF_T5_tags[0]) - 1, /* 1 */
579 asn_DEF_T5_tags, /* Same as above */
580 sizeof(asn_DEF_T5_tags)
581 /sizeof(asn_DEF_T5_tags[0]), /* 2 */
Lev Walkin2888f272004-09-14 12:46:58 +0000582 0, 0, /* No members */
583 0 /* No specifics */
584};
585
586
587/*** <<< INCLUDES [T6] >>> ***/
588
589#include <NativeReal.h>
590
591/*** <<< TYPE-DECLS [T6] >>> ***/
592
593
594typedef double T6_t;
595
596/*** <<< FUNC-DECLS [T6] >>> ***/
597
Lev Walkin154aa182004-09-26 13:12:56 +0000598/* This type is equivalent to NativeReal */
Lev Walkindfae9752004-09-29 13:19:37 +0000599#define asn_DEF_T6 asn_DEF_NativeReal
Lev Walkin2888f272004-09-14 12:46:58 +0000600
601/*** <<< CODE [T6] >>> ***/
602
Lev Walkin154aa182004-09-26 13:12:56 +0000603/* This type is equivalent to NativeReal */
Lev Walkin2888f272004-09-14 12:46:58 +0000604
605
606/*** <<< INCLUDES [T] >>> ***/
607
608#include <Ts.h>
609
610/*** <<< TYPE-DECLS [T] >>> ***/
611
612
613typedef Ts_t T_t;
614
615/*** <<< FUNC-DECLS [T] >>> ***/
616
Lev Walkindfae9752004-09-29 13:19:37 +0000617extern asn_TYPE_descriptor_t asn_DEF_T;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000618asn_struct_free_f T_free;
619asn_struct_print_f T_print;
Lev Walkin2888f272004-09-14 12:46:58 +0000620asn_constr_check_f T_constraint;
621ber_type_decoder_f T_decode_ber;
622der_type_encoder_f T_encode_der;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000623xer_type_encoder_f T_encode_xer;
Lev Walkin2888f272004-09-14 12:46:58 +0000624
625/*** <<< CODE [T] >>> ***/
626
627int
Lev Walkindfae9752004-09-29 13:19:37 +0000628T_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin2888f272004-09-14 12:46:58 +0000629 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin154aa182004-09-26 13:12:56 +0000630 /* Replace with underlying type checker */
Lev Walkindfae9752004-09-29 13:19:37 +0000631 td->check_constraints = asn_DEF_Ts.check_constraints;
Lev Walkin154aa182004-09-26 13:12:56 +0000632 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin2888f272004-09-14 12:46:58 +0000633}
634
635/*
636 * This type is implemented using Ts,
Lev Walkinc3808c12004-09-23 22:14:58 +0000637 * so here we adjust the DEF accordingly.
Lev Walkin2888f272004-09-14 12:46:58 +0000638 */
639static void
Lev Walkindfae9752004-09-29 13:19:37 +0000640T_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
641 td->free_struct = asn_DEF_Ts.free_struct;
642 td->print_struct = asn_DEF_Ts.print_struct;
643 td->ber_decoder = asn_DEF_Ts.ber_decoder;
644 td->der_encoder = asn_DEF_Ts.der_encoder;
645 td->xer_decoder = asn_DEF_Ts.xer_decoder;
646 td->xer_encoder = asn_DEF_Ts.xer_encoder;
647 td->elements = asn_DEF_Ts.elements;
648 td->elements_count = asn_DEF_Ts.elements_count;
649 td->specifics = asn_DEF_Ts.specifics;
Lev Walkin2888f272004-09-14 12:46:58 +0000650}
651
Lev Walkina9cc46e2004-09-22 16:06:28 +0000652void
Lev Walkindfae9752004-09-29 13:19:37 +0000653T_free(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000654 void *struct_ptr, int contents_only) {
Lev Walkin2888f272004-09-14 12:46:58 +0000655 T_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000656 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin2888f272004-09-14 12:46:58 +0000657}
658
659int
Lev Walkindfae9752004-09-29 13:19:37 +0000660T_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin2888f272004-09-14 12:46:58 +0000661 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
662 T_inherit_TYPE_descriptor(td);
663 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
664}
665
Lev Walkindc06f6b2004-10-20 15:50:55 +0000666asn_dec_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000667T_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000668 void **structure, void *bufptr, size_t size, int tag_mode) {
Lev Walkin2888f272004-09-14 12:46:58 +0000669 T_inherit_TYPE_descriptor(td);
Lev Walkindfae9752004-09-29 13:19:37 +0000670 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000671}
672
673asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000674T_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000675 void *structure, int tag_mode, ber_tlv_tag_t tag,
676 asn_app_consume_bytes_f *cb, void *app_key) {
677 T_inherit_TYPE_descriptor(td);
678 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
679}
680
681asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000682T_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000683 int ilevel, enum xer_encoder_flags_e flags,
684 asn_app_consume_bytes_f *cb, void *app_key) {
685 T_inherit_TYPE_descriptor(td);
686 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
Lev Walkin2888f272004-09-14 12:46:58 +0000687}
688
689
690/*** <<< STAT-DEFS [T] >>> ***/
691
Lev Walkindfae9752004-09-29 13:19:37 +0000692static ber_tlv_tag_t asn_DEF_T_tags[] = {
Lev Walkin2888f272004-09-14 12:46:58 +0000693 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
694 (ASN_TAG_CLASS_CONTEXT | (123 << 2)),
695 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
696};
Lev Walkindfae9752004-09-29 13:19:37 +0000697asn_TYPE_descriptor_t asn_DEF_T = {
Lev Walkin2888f272004-09-14 12:46:58 +0000698 "T",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000699 "T",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000700 T_free,
701 T_print,
Lev Walkin2888f272004-09-14 12:46:58 +0000702 T_constraint,
703 T_decode_ber,
704 T_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000705 0, /* Not implemented yet */
706 T_encode_xer,
Lev Walkin2888f272004-09-14 12:46:58 +0000707 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000708 asn_DEF_T_tags,
709 sizeof(asn_DEF_T_tags)
710 /sizeof(asn_DEF_T_tags[0]) - 2, /* 1 */
711 asn_DEF_T_tags, /* Same as above */
712 sizeof(asn_DEF_T_tags)
713 /sizeof(asn_DEF_T_tags[0]), /* 3 */
Lev Walkin2888f272004-09-14 12:46:58 +0000714 0, 0, /* Defined elsewhere */
715 0 /* No specifics */
716};
717
718
719/*** <<< INCLUDES [Ts] >>> ***/
720
721#include <T2.h>
722#include <T3.h>
723#include <constr_SEQUENCE.h>
724
725/*** <<< DEPS [Ts] >>> ***/
726
Lev Walkindfae9752004-09-29 13:19:37 +0000727extern asn_TYPE_descriptor_t asn_DEF_Ts;
Lev Walkin2888f272004-09-14 12:46:58 +0000728
729/*** <<< TYPE-DECLS [Ts] >>> ***/
730
731
732typedef struct Ts {
733 T2_t m1;
734 T3_t *m2 /* OPTIONAL */;
735 T3_t m3;
736
737 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +0000738 asn_struct_ctx_t _asn_ctx;
Lev Walkin2888f272004-09-14 12:46:58 +0000739} Ts_t;
740
741/*** <<< STAT-DEFS [Ts] >>> ***/
742
Lev Walkindfae9752004-09-29 13:19:37 +0000743static asn_TYPE_member_t asn_MBR_Ts[] = {
Lev Walkin2888f272004-09-14 12:46:58 +0000744 { ATF_NOFLAGS, 0, offsetof(struct Ts, m1),
745 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
746 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000747 .type = (void *)&asn_DEF_T2,
Lev Walkin2888f272004-09-14 12:46:58 +0000748 .memb_constraints = 0, /* Defer to actual type */
749 .name = "m1"
750 },
751 { ATF_POINTER, 1, offsetof(struct Ts, m2),
752 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
753 .tag_mode = +1, /* EXPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000754 .type = (void *)&asn_DEF_T3,
Lev Walkin2888f272004-09-14 12:46:58 +0000755 .memb_constraints = 0, /* Defer to actual type */
756 .name = "m2"
757 },
758 { ATF_NOFLAGS, 0, offsetof(struct Ts, m3),
759 .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
760 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000761 .type = (void *)&asn_DEF_T3,
Lev Walkin2888f272004-09-14 12:46:58 +0000762 .memb_constraints = 0, /* Defer to actual type */
763 .name = "m3"
764 },
765};
Lev Walkindfae9752004-09-29 13:19:37 +0000766static ber_tlv_tag_t asn_DEF_Ts_tags[] = {
Lev Walkin2888f272004-09-14 12:46:58 +0000767 (ASN_TAG_CLASS_CONTEXT | (123 << 2)),
768 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
769};
Lev Walkindfae9752004-09-29 13:19:37 +0000770static asn_TYPE_tag2member_t asn_DEF_Ts_tag2el[] = {
Lev Walkin2888f272004-09-14 12:46:58 +0000771 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* m1 at 24 */
772 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* m2 at 25 */
773 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* m3 at 27 */
774};
Lev Walkindfae9752004-09-29 13:19:37 +0000775static asn_SEQUENCE_specifics_t asn_DEF_Ts_specs = {
Lev Walkin2888f272004-09-14 12:46:58 +0000776 sizeof(struct Ts),
Lev Walkindfae9752004-09-29 13:19:37 +0000777 offsetof(struct Ts, _asn_ctx),
778 asn_DEF_Ts_tag2el,
Lev Walkin2888f272004-09-14 12:46:58 +0000779 3, /* Count of tags in the map */
780 -1, /* Start extensions */
781 -1 /* Stop extensions */
782};
Lev Walkindfae9752004-09-29 13:19:37 +0000783asn_TYPE_descriptor_t asn_DEF_Ts = {
Lev Walkin2888f272004-09-14 12:46:58 +0000784 "Ts",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000785 "Ts",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000786 SEQUENCE_free,
787 SEQUENCE_print,
Lev Walkin2888f272004-09-14 12:46:58 +0000788 SEQUENCE_constraint,
789 SEQUENCE_decode_ber,
790 SEQUENCE_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000791 0, /* Not implemented yet */
792 SEQUENCE_encode_xer,
Lev Walkin2888f272004-09-14 12:46:58 +0000793 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000794 asn_DEF_Ts_tags,
795 sizeof(asn_DEF_Ts_tags)
796 /sizeof(asn_DEF_Ts_tags[0]) - 1, /* 1 */
797 asn_DEF_Ts_tags, /* Same as above */
798 sizeof(asn_DEF_Ts_tags)
799 /sizeof(asn_DEF_Ts_tags[0]), /* 2 */
800 asn_MBR_Ts,
Lev Walkin2888f272004-09-14 12:46:58 +0000801 3, /* Elements count */
Lev Walkindfae9752004-09-29 13:19:37 +0000802 &asn_DEF_Ts_specs /* Additional specs */
Lev Walkin2888f272004-09-14 12:46:58 +0000803};
804