blob: 995697ee7c90d056f165289c91803e9ad40351be [file] [log] [blame]
Lev Walkin906654e2004-09-10 15:49:15 +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 Walkin906654e2004-09-10 15:49:15 +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 Walkin906654e2004-09-10 15:49:15 +000020
21/*** <<< CODE [T1] >>> ***/
22
23int
Lev Walkindfae9752004-09-29 13:19:37 +000024T1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin906654e2004-09-10 15:49:15 +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 Walkin906654e2004-09-10 15:49:15 +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 Walkin906654e2004-09-10 15:49:15 +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 Walkin906654e2004-09-10 15:49:15 +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 Walkin906654e2004-09-10 15:49:15 +000051 T1_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +000052 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin906654e2004-09-10 15:49:15 +000053}
54
55int
Lev Walkindfae9752004-09-29 13:19:37 +000056T1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin906654e2004-09-10 15:49:15 +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 Walkina9cc46e2004-09-22 16:06:28 +000062ber_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 Walkin906654e2004-09-10 15:49:15 +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 Walkin906654e2004-09-10 15:49:15 +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 Walkin906654e2004-09-10 15:49:15 +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 Walkin188ed2c2004-09-13 08:31:01 +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)),
Lev Walkin2888f272004-09-14 12:46:58 +0000100 (ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
Lev Walkin188ed2c2004-09-13 08:31:01 +0000101};
Lev Walkindfae9752004-09-29 13:19:37 +0000102asn_TYPE_descriptor_t asn_DEF_T1 = {
Lev Walkin906654e2004-09-10 15:49:15 +0000103 "T1",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000104 T1_free,
105 T1_print,
Lev Walkin906654e2004-09-10 15:49:15 +0000106 T1_constraint,
107 T1_decode_ber,
108 T1_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000109 0, /* Not implemented yet */
110 T1_encode_xer,
Lev Walkin906654e2004-09-10 15:49:15 +0000111 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000112 asn_DEF_T1_tags,
113 sizeof(asn_DEF_T1_tags)
114 /sizeof(asn_DEF_T1_tags[0]), /* 4 */
115 asn_DEF_T1_all_tags,
116 sizeof(asn_DEF_T1_all_tags)
117 /sizeof(asn_DEF_T1_all_tags[0]), /* 6 */
Lev Walkin906654e2004-09-10 15:49:15 +0000118 0, 0, /* No members */
119 0 /* No specifics */
120};
121
122
123/*** <<< INCLUDES [T2] >>> ***/
124
125#include <T3.h>
126
127/*** <<< TYPE-DECLS [T2] >>> ***/
128
129
130typedef T3_t T2_t;
131
132/*** <<< FUNC-DECLS [T2] >>> ***/
133
Lev Walkindfae9752004-09-29 13:19:37 +0000134extern asn_TYPE_descriptor_t asn_DEF_T2;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000135asn_struct_free_f T2_free;
136asn_struct_print_f T2_print;
Lev Walkin906654e2004-09-10 15:49:15 +0000137asn_constr_check_f T2_constraint;
138ber_type_decoder_f T2_decode_ber;
139der_type_encoder_f T2_encode_der;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000140xer_type_encoder_f T2_encode_xer;
Lev Walkin906654e2004-09-10 15:49:15 +0000141
142/*** <<< CODE [T2] >>> ***/
143
144int
Lev Walkindfae9752004-09-29 13:19:37 +0000145T2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin906654e2004-09-10 15:49:15 +0000146 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin154aa182004-09-26 13:12:56 +0000147 /* Replace with underlying type checker */
Lev Walkindfae9752004-09-29 13:19:37 +0000148 td->check_constraints = asn_DEF_T3.check_constraints;
Lev Walkin154aa182004-09-26 13:12:56 +0000149 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin906654e2004-09-10 15:49:15 +0000150}
151
152/*
153 * This type is implemented using T3,
Lev Walkinc3808c12004-09-23 22:14:58 +0000154 * so here we adjust the DEF accordingly.
Lev Walkin906654e2004-09-10 15:49:15 +0000155 */
156static void
Lev Walkindfae9752004-09-29 13:19:37 +0000157T2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
158 td->free_struct = asn_DEF_T3.free_struct;
159 td->print_struct = asn_DEF_T3.print_struct;
160 td->ber_decoder = asn_DEF_T3.ber_decoder;
161 td->der_encoder = asn_DEF_T3.der_encoder;
162 td->xer_decoder = asn_DEF_T3.xer_decoder;
163 td->xer_encoder = asn_DEF_T3.xer_encoder;
164 td->elements = asn_DEF_T3.elements;
165 td->elements_count = asn_DEF_T3.elements_count;
166 td->specifics = asn_DEF_T3.specifics;
Lev Walkin906654e2004-09-10 15:49:15 +0000167}
168
Lev Walkina9cc46e2004-09-22 16:06:28 +0000169void
Lev Walkindfae9752004-09-29 13:19:37 +0000170T2_free(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000171 void *struct_ptr, int contents_only) {
Lev Walkin906654e2004-09-10 15:49:15 +0000172 T2_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000173 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin906654e2004-09-10 15:49:15 +0000174}
175
176int
Lev Walkindfae9752004-09-29 13:19:37 +0000177T2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin906654e2004-09-10 15:49:15 +0000178 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
179 T2_inherit_TYPE_descriptor(td);
180 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
181}
182
Lev Walkina9cc46e2004-09-22 16:06:28 +0000183ber_dec_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000184T2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000185 void **structure, void *bufptr, size_t size, int tag_mode) {
Lev Walkin906654e2004-09-10 15:49:15 +0000186 T2_inherit_TYPE_descriptor(td);
Lev Walkindfae9752004-09-29 13:19:37 +0000187 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000188}
189
190asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000191T2_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000192 void *structure, int tag_mode, ber_tlv_tag_t tag,
193 asn_app_consume_bytes_f *cb, void *app_key) {
194 T2_inherit_TYPE_descriptor(td);
195 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
196}
197
198asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000199T2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000200 int ilevel, enum xer_encoder_flags_e flags,
201 asn_app_consume_bytes_f *cb, void *app_key) {
202 T2_inherit_TYPE_descriptor(td);
203 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
Lev Walkin906654e2004-09-10 15:49:15 +0000204}
205
206
207/*** <<< STAT-DEFS [T2] >>> ***/
208
Lev Walkindfae9752004-09-29 13:19:37 +0000209static ber_tlv_tag_t asn_DEF_T2_tags[] = {
Lev Walkin906654e2004-09-10 15:49:15 +0000210 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
211 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
212 (ASN_TAG_CLASS_CONTEXT | (6 << 2))
213};
Lev Walkindfae9752004-09-29 13:19:37 +0000214static ber_tlv_tag_t asn_DEF_T2_all_tags[] = {
Lev Walkin188ed2c2004-09-13 08:31:01 +0000215 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
216 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
217 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
218 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
Lev Walkin2888f272004-09-14 12:46:58 +0000219 (ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
Lev Walkin188ed2c2004-09-13 08:31:01 +0000220};
Lev Walkindfae9752004-09-29 13:19:37 +0000221asn_TYPE_descriptor_t asn_DEF_T2 = {
Lev Walkin906654e2004-09-10 15:49:15 +0000222 "T2",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000223 T2_free,
224 T2_print,
Lev Walkin906654e2004-09-10 15:49:15 +0000225 T2_constraint,
226 T2_decode_ber,
227 T2_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000228 0, /* Not implemented yet */
229 T2_encode_xer,
Lev Walkin906654e2004-09-10 15:49:15 +0000230 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000231 asn_DEF_T2_tags,
232 sizeof(asn_DEF_T2_tags)
233 /sizeof(asn_DEF_T2_tags[0]), /* 3 */
234 asn_DEF_T2_all_tags,
235 sizeof(asn_DEF_T2_all_tags)
236 /sizeof(asn_DEF_T2_all_tags[0]), /* 5 */
Lev Walkin906654e2004-09-10 15:49:15 +0000237 0, 0, /* No members */
238 0 /* No specifics */
239};
240
241
242/*** <<< INCLUDES [T3] >>> ***/
243
244#include <T4.h>
245
246/*** <<< TYPE-DECLS [T3] >>> ***/
247
248
249typedef T4_t T3_t;
250
251/*** <<< FUNC-DECLS [T3] >>> ***/
252
Lev Walkindfae9752004-09-29 13:19:37 +0000253extern asn_TYPE_descriptor_t asn_DEF_T3;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000254asn_struct_free_f T3_free;
255asn_struct_print_f T3_print;
Lev Walkin906654e2004-09-10 15:49:15 +0000256asn_constr_check_f T3_constraint;
257ber_type_decoder_f T3_decode_ber;
258der_type_encoder_f T3_encode_der;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000259xer_type_encoder_f T3_encode_xer;
Lev Walkin906654e2004-09-10 15:49:15 +0000260
261/*** <<< CODE [T3] >>> ***/
262
263int
Lev Walkindfae9752004-09-29 13:19:37 +0000264T3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin906654e2004-09-10 15:49:15 +0000265 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin154aa182004-09-26 13:12:56 +0000266 /* Replace with underlying type checker */
Lev Walkindfae9752004-09-29 13:19:37 +0000267 td->check_constraints = asn_DEF_T4.check_constraints;
Lev Walkin154aa182004-09-26 13:12:56 +0000268 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin906654e2004-09-10 15:49:15 +0000269}
270
271/*
272 * This type is implemented using T4,
Lev Walkinc3808c12004-09-23 22:14:58 +0000273 * so here we adjust the DEF accordingly.
Lev Walkin906654e2004-09-10 15:49:15 +0000274 */
275static void
Lev Walkindfae9752004-09-29 13:19:37 +0000276T3_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
277 td->free_struct = asn_DEF_T4.free_struct;
278 td->print_struct = asn_DEF_T4.print_struct;
279 td->ber_decoder = asn_DEF_T4.ber_decoder;
280 td->der_encoder = asn_DEF_T4.der_encoder;
281 td->xer_decoder = asn_DEF_T4.xer_decoder;
282 td->xer_encoder = asn_DEF_T4.xer_encoder;
283 td->elements = asn_DEF_T4.elements;
284 td->elements_count = asn_DEF_T4.elements_count;
285 td->specifics = asn_DEF_T4.specifics;
Lev Walkin906654e2004-09-10 15:49:15 +0000286}
287
Lev Walkina9cc46e2004-09-22 16:06:28 +0000288void
Lev Walkindfae9752004-09-29 13:19:37 +0000289T3_free(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000290 void *struct_ptr, int contents_only) {
Lev Walkin906654e2004-09-10 15:49:15 +0000291 T3_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000292 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin906654e2004-09-10 15:49:15 +0000293}
294
295int
Lev Walkindfae9752004-09-29 13:19:37 +0000296T3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin906654e2004-09-10 15:49:15 +0000297 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
298 T3_inherit_TYPE_descriptor(td);
299 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
300}
301
Lev Walkina9cc46e2004-09-22 16:06:28 +0000302ber_dec_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000303T3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000304 void **structure, void *bufptr, size_t size, int tag_mode) {
Lev Walkin906654e2004-09-10 15:49:15 +0000305 T3_inherit_TYPE_descriptor(td);
Lev Walkindfae9752004-09-29 13:19:37 +0000306 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000307}
308
309asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000310T3_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000311 void *structure, int tag_mode, ber_tlv_tag_t tag,
312 asn_app_consume_bytes_f *cb, void *app_key) {
313 T3_inherit_TYPE_descriptor(td);
314 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
315}
316
317asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000318T3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000319 int ilevel, enum xer_encoder_flags_e flags,
320 asn_app_consume_bytes_f *cb, void *app_key) {
321 T3_inherit_TYPE_descriptor(td);
322 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
Lev Walkin906654e2004-09-10 15:49:15 +0000323}
324
325
326/*** <<< STAT-DEFS [T3] >>> ***/
327
Lev Walkindfae9752004-09-29 13:19:37 +0000328static ber_tlv_tag_t asn_DEF_T3_tags[] = {
Lev Walkin906654e2004-09-10 15:49:15 +0000329 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
330 (ASN_TAG_CLASS_CONTEXT | (6 << 2))
331};
Lev Walkindfae9752004-09-29 13:19:37 +0000332static ber_tlv_tag_t asn_DEF_T3_all_tags[] = {
Lev Walkin188ed2c2004-09-13 08:31:01 +0000333 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
334 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
335 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
Lev Walkin2888f272004-09-14 12:46:58 +0000336 (ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
Lev Walkin188ed2c2004-09-13 08:31:01 +0000337};
Lev Walkindfae9752004-09-29 13:19:37 +0000338asn_TYPE_descriptor_t asn_DEF_T3 = {
Lev Walkin906654e2004-09-10 15:49:15 +0000339 "T3",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000340 T3_free,
341 T3_print,
Lev Walkin906654e2004-09-10 15:49:15 +0000342 T3_constraint,
343 T3_decode_ber,
344 T3_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000345 0, /* Not implemented yet */
346 T3_encode_xer,
Lev Walkin906654e2004-09-10 15:49:15 +0000347 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000348 asn_DEF_T3_tags,
349 sizeof(asn_DEF_T3_tags)
350 /sizeof(asn_DEF_T3_tags[0]), /* 2 */
351 asn_DEF_T3_all_tags,
352 sizeof(asn_DEF_T3_all_tags)
353 /sizeof(asn_DEF_T3_all_tags[0]), /* 4 */
Lev Walkin906654e2004-09-10 15:49:15 +0000354 0, 0, /* No members */
355 0 /* No specifics */
356};
357
358
359/*** <<< INCLUDES [T4] >>> ***/
360
361#include <T5.h>
362
363/*** <<< TYPE-DECLS [T4] >>> ***/
364
365
366typedef T5_t T4_t;
367
368/*** <<< FUNC-DECLS [T4] >>> ***/
369
Lev Walkindfae9752004-09-29 13:19:37 +0000370extern asn_TYPE_descriptor_t asn_DEF_T4;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000371asn_struct_free_f T4_free;
372asn_struct_print_f T4_print;
Lev Walkin906654e2004-09-10 15:49:15 +0000373asn_constr_check_f T4_constraint;
374ber_type_decoder_f T4_decode_ber;
375der_type_encoder_f T4_encode_der;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000376xer_type_encoder_f T4_encode_xer;
Lev Walkin906654e2004-09-10 15:49:15 +0000377
378/*** <<< CODE [T4] >>> ***/
379
380int
Lev Walkindfae9752004-09-29 13:19:37 +0000381T4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin906654e2004-09-10 15:49:15 +0000382 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin154aa182004-09-26 13:12:56 +0000383 /* Replace with underlying type checker */
Lev Walkindfae9752004-09-29 13:19:37 +0000384 td->check_constraints = asn_DEF_T5.check_constraints;
Lev Walkin154aa182004-09-26 13:12:56 +0000385 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin906654e2004-09-10 15:49:15 +0000386}
387
388/*
389 * This type is implemented using T5,
Lev Walkinc3808c12004-09-23 22:14:58 +0000390 * so here we adjust the DEF accordingly.
Lev Walkin906654e2004-09-10 15:49:15 +0000391 */
392static void
Lev Walkindfae9752004-09-29 13:19:37 +0000393T4_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
394 td->free_struct = asn_DEF_T5.free_struct;
395 td->print_struct = asn_DEF_T5.print_struct;
396 td->ber_decoder = asn_DEF_T5.ber_decoder;
397 td->der_encoder = asn_DEF_T5.der_encoder;
398 td->xer_decoder = asn_DEF_T5.xer_decoder;
399 td->xer_encoder = asn_DEF_T5.xer_encoder;
400 td->elements = asn_DEF_T5.elements;
401 td->elements_count = asn_DEF_T5.elements_count;
402 td->specifics = asn_DEF_T5.specifics;
Lev Walkin906654e2004-09-10 15:49:15 +0000403}
404
Lev Walkina9cc46e2004-09-22 16:06:28 +0000405void
Lev Walkindfae9752004-09-29 13:19:37 +0000406T4_free(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000407 void *struct_ptr, int contents_only) {
Lev Walkin906654e2004-09-10 15:49:15 +0000408 T4_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000409 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin906654e2004-09-10 15:49:15 +0000410}
411
412int
Lev Walkindfae9752004-09-29 13:19:37 +0000413T4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin906654e2004-09-10 15:49:15 +0000414 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
415 T4_inherit_TYPE_descriptor(td);
416 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
417}
418
Lev Walkina9cc46e2004-09-22 16:06:28 +0000419ber_dec_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000420T4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000421 void **structure, void *bufptr, size_t size, int tag_mode) {
Lev Walkin906654e2004-09-10 15:49:15 +0000422 T4_inherit_TYPE_descriptor(td);
Lev Walkindfae9752004-09-29 13:19:37 +0000423 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000424}
425
426asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000427T4_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000428 void *structure, int tag_mode, ber_tlv_tag_t tag,
429 asn_app_consume_bytes_f *cb, void *app_key) {
430 T4_inherit_TYPE_descriptor(td);
431 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
432}
433
434asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000435T4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000436 int ilevel, enum xer_encoder_flags_e flags,
437 asn_app_consume_bytes_f *cb, void *app_key) {
438 T4_inherit_TYPE_descriptor(td);
439 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
Lev Walkin906654e2004-09-10 15:49:15 +0000440}
441
442
443/*** <<< STAT-DEFS [T4] >>> ***/
444
Lev Walkindfae9752004-09-29 13:19:37 +0000445static ber_tlv_tag_t asn_DEF_T4_tags[] = {
Lev Walkin906654e2004-09-10 15:49:15 +0000446 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
Lev Walkin188ed2c2004-09-13 08:31:01 +0000447 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
Lev Walkin2888f272004-09-14 12:46:58 +0000448 (ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
Lev Walkin906654e2004-09-10 15:49:15 +0000449};
Lev Walkindfae9752004-09-29 13:19:37 +0000450asn_TYPE_descriptor_t asn_DEF_T4 = {
Lev Walkin906654e2004-09-10 15:49:15 +0000451 "T4",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000452 T4_free,
453 T4_print,
Lev Walkin906654e2004-09-10 15:49:15 +0000454 T4_constraint,
455 T4_decode_ber,
456 T4_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000457 0, /* Not implemented yet */
458 T4_encode_xer,
Lev Walkin906654e2004-09-10 15:49:15 +0000459 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000460 asn_DEF_T4_tags,
461 sizeof(asn_DEF_T4_tags)
462 /sizeof(asn_DEF_T4_tags[0]) - 1, /* 2 */
463 asn_DEF_T4_tags, /* Same as above */
464 sizeof(asn_DEF_T4_tags)
465 /sizeof(asn_DEF_T4_tags[0]), /* 3 */
Lev Walkin906654e2004-09-10 15:49:15 +0000466 0, 0, /* No members */
467 0 /* No specifics */
468};
469
470
471/*** <<< INCLUDES [T5] >>> ***/
472
473#include <T6.h>
474
475/*** <<< TYPE-DECLS [T5] >>> ***/
476
477
478typedef T6_t T5_t;
479
480/*** <<< FUNC-DECLS [T5] >>> ***/
481
Lev Walkindfae9752004-09-29 13:19:37 +0000482extern asn_TYPE_descriptor_t asn_DEF_T5;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000483asn_struct_free_f T5_free;
484asn_struct_print_f T5_print;
Lev Walkin906654e2004-09-10 15:49:15 +0000485asn_constr_check_f T5_constraint;
486ber_type_decoder_f T5_decode_ber;
487der_type_encoder_f T5_encode_der;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000488xer_type_encoder_f T5_encode_xer;
Lev Walkin906654e2004-09-10 15:49:15 +0000489
490/*** <<< CODE [T5] >>> ***/
491
492int
Lev Walkindfae9752004-09-29 13:19:37 +0000493T5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin906654e2004-09-10 15:49:15 +0000494 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin154aa182004-09-26 13:12:56 +0000495 /* Replace with underlying type checker */
Lev Walkindfae9752004-09-29 13:19:37 +0000496 td->check_constraints = asn_DEF_T6.check_constraints;
Lev Walkin154aa182004-09-26 13:12:56 +0000497 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin906654e2004-09-10 15:49:15 +0000498}
499
500/*
501 * This type is implemented using T6,
Lev Walkinc3808c12004-09-23 22:14:58 +0000502 * so here we adjust the DEF accordingly.
Lev Walkin906654e2004-09-10 15:49:15 +0000503 */
504static void
Lev Walkindfae9752004-09-29 13:19:37 +0000505T5_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
506 td->free_struct = asn_DEF_T6.free_struct;
507 td->print_struct = asn_DEF_T6.print_struct;
508 td->ber_decoder = asn_DEF_T6.ber_decoder;
509 td->der_encoder = asn_DEF_T6.der_encoder;
510 td->xer_decoder = asn_DEF_T6.xer_decoder;
511 td->xer_encoder = asn_DEF_T6.xer_encoder;
512 td->elements = asn_DEF_T6.elements;
513 td->elements_count = asn_DEF_T6.elements_count;
514 td->specifics = asn_DEF_T6.specifics;
Lev Walkin906654e2004-09-10 15:49:15 +0000515}
516
Lev Walkina9cc46e2004-09-22 16:06:28 +0000517void
Lev Walkindfae9752004-09-29 13:19:37 +0000518T5_free(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000519 void *struct_ptr, int contents_only) {
Lev Walkin906654e2004-09-10 15:49:15 +0000520 T5_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000521 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin906654e2004-09-10 15:49:15 +0000522}
523
524int
Lev Walkindfae9752004-09-29 13:19:37 +0000525T5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin906654e2004-09-10 15:49:15 +0000526 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
527 T5_inherit_TYPE_descriptor(td);
528 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
529}
530
Lev Walkina9cc46e2004-09-22 16:06:28 +0000531ber_dec_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000532T5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000533 void **structure, void *bufptr, size_t size, int tag_mode) {
Lev Walkin906654e2004-09-10 15:49:15 +0000534 T5_inherit_TYPE_descriptor(td);
Lev Walkindfae9752004-09-29 13:19:37 +0000535 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000536}
537
538asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000539T5_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000540 void *structure, int tag_mode, ber_tlv_tag_t tag,
541 asn_app_consume_bytes_f *cb, void *app_key) {
542 T5_inherit_TYPE_descriptor(td);
543 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
544}
545
546asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000547T5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000548 int ilevel, enum xer_encoder_flags_e flags,
549 asn_app_consume_bytes_f *cb, void *app_key) {
550 T5_inherit_TYPE_descriptor(td);
551 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
Lev Walkin906654e2004-09-10 15:49:15 +0000552}
553
554
555/*** <<< STAT-DEFS [T5] >>> ***/
556
Lev Walkindfae9752004-09-29 13:19:37 +0000557static ber_tlv_tag_t asn_DEF_T5_tags[] = {
Lev Walkin188ed2c2004-09-13 08:31:01 +0000558 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
Lev Walkin2888f272004-09-14 12:46:58 +0000559 (ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
Lev Walkin906654e2004-09-10 15:49:15 +0000560};
Lev Walkindfae9752004-09-29 13:19:37 +0000561asn_TYPE_descriptor_t asn_DEF_T5 = {
Lev Walkin906654e2004-09-10 15:49:15 +0000562 "T5",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000563 T5_free,
564 T5_print,
Lev Walkin906654e2004-09-10 15:49:15 +0000565 T5_constraint,
566 T5_decode_ber,
567 T5_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000568 0, /* Not implemented yet */
569 T5_encode_xer,
Lev Walkin906654e2004-09-10 15:49:15 +0000570 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000571 asn_DEF_T5_tags,
572 sizeof(asn_DEF_T5_tags)
573 /sizeof(asn_DEF_T5_tags[0]) - 1, /* 1 */
574 asn_DEF_T5_tags, /* Same as above */
575 sizeof(asn_DEF_T5_tags)
576 /sizeof(asn_DEF_T5_tags[0]), /* 2 */
Lev Walkin906654e2004-09-10 15:49:15 +0000577 0, 0, /* No members */
578 0 /* No specifics */
579};
580
581
582/*** <<< INCLUDES [T6] >>> ***/
583
Lev Walkin2888f272004-09-14 12:46:58 +0000584#include <REAL.h>
Lev Walkin906654e2004-09-10 15:49:15 +0000585
586/*** <<< TYPE-DECLS [T6] >>> ***/
587
588
Lev Walkin2888f272004-09-14 12:46:58 +0000589typedef REAL_t T6_t;
Lev Walkin906654e2004-09-10 15:49:15 +0000590
591/*** <<< FUNC-DECLS [T6] >>> ***/
592
Lev Walkin154aa182004-09-26 13:12:56 +0000593/* This type is equivalent to REAL */
Lev Walkindfae9752004-09-29 13:19:37 +0000594#define asn_DEF_T6 asn_DEF_REAL
Lev Walkin906654e2004-09-10 15:49:15 +0000595
596/*** <<< CODE [T6] >>> ***/
597
Lev Walkin154aa182004-09-26 13:12:56 +0000598/* This type is equivalent to REAL */
Lev Walkin906654e2004-09-10 15:49:15 +0000599
600
601/*** <<< INCLUDES [T] >>> ***/
602
603#include <Ts.h>
604
605/*** <<< TYPE-DECLS [T] >>> ***/
606
607
608typedef Ts_t T_t;
609
610/*** <<< FUNC-DECLS [T] >>> ***/
611
Lev Walkindfae9752004-09-29 13:19:37 +0000612extern asn_TYPE_descriptor_t asn_DEF_T;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000613asn_struct_free_f T_free;
614asn_struct_print_f T_print;
Lev Walkin906654e2004-09-10 15:49:15 +0000615asn_constr_check_f T_constraint;
616ber_type_decoder_f T_decode_ber;
617der_type_encoder_f T_encode_der;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000618xer_type_encoder_f T_encode_xer;
Lev Walkin906654e2004-09-10 15:49:15 +0000619
620/*** <<< CODE [T] >>> ***/
621
622int
Lev Walkindfae9752004-09-29 13:19:37 +0000623T_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin906654e2004-09-10 15:49:15 +0000624 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin154aa182004-09-26 13:12:56 +0000625 /* Replace with underlying type checker */
Lev Walkindfae9752004-09-29 13:19:37 +0000626 td->check_constraints = asn_DEF_Ts.check_constraints;
Lev Walkin154aa182004-09-26 13:12:56 +0000627 return td->check_constraints(td, sptr, app_errlog, app_key);
Lev Walkin906654e2004-09-10 15:49:15 +0000628}
629
630/*
631 * This type is implemented using Ts,
Lev Walkinc3808c12004-09-23 22:14:58 +0000632 * so here we adjust the DEF accordingly.
Lev Walkin906654e2004-09-10 15:49:15 +0000633 */
634static void
Lev Walkindfae9752004-09-29 13:19:37 +0000635T_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
636 td->free_struct = asn_DEF_Ts.free_struct;
637 td->print_struct = asn_DEF_Ts.print_struct;
638 td->ber_decoder = asn_DEF_Ts.ber_decoder;
639 td->der_encoder = asn_DEF_Ts.der_encoder;
640 td->xer_decoder = asn_DEF_Ts.xer_decoder;
641 td->xer_encoder = asn_DEF_Ts.xer_encoder;
642 td->elements = asn_DEF_Ts.elements;
643 td->elements_count = asn_DEF_Ts.elements_count;
644 td->specifics = asn_DEF_Ts.specifics;
Lev Walkin906654e2004-09-10 15:49:15 +0000645}
646
Lev Walkina9cc46e2004-09-22 16:06:28 +0000647void
Lev Walkindfae9752004-09-29 13:19:37 +0000648T_free(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000649 void *struct_ptr, int contents_only) {
Lev Walkin906654e2004-09-10 15:49:15 +0000650 T_inherit_TYPE_descriptor(td);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000651 td->free_struct(td, struct_ptr, contents_only);
Lev Walkin906654e2004-09-10 15:49:15 +0000652}
653
654int
Lev Walkindfae9752004-09-29 13:19:37 +0000655T_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
Lev Walkin906654e2004-09-10 15:49:15 +0000656 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
657 T_inherit_TYPE_descriptor(td);
658 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
659}
660
Lev Walkina9cc46e2004-09-22 16:06:28 +0000661ber_dec_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000662T_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000663 void **structure, void *bufptr, size_t size, int tag_mode) {
Lev Walkin906654e2004-09-10 15:49:15 +0000664 T_inherit_TYPE_descriptor(td);
Lev Walkindfae9752004-09-29 13:19:37 +0000665 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
Lev Walkina9cc46e2004-09-22 16:06:28 +0000666}
667
668asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000669T_encode_der(asn_TYPE_descriptor_t *td,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000670 void *structure, int tag_mode, ber_tlv_tag_t tag,
671 asn_app_consume_bytes_f *cb, void *app_key) {
672 T_inherit_TYPE_descriptor(td);
673 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
674}
675
676asn_enc_rval_t
Lev Walkindfae9752004-09-29 13:19:37 +0000677T_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000678 int ilevel, enum xer_encoder_flags_e flags,
679 asn_app_consume_bytes_f *cb, void *app_key) {
680 T_inherit_TYPE_descriptor(td);
681 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
Lev Walkin906654e2004-09-10 15:49:15 +0000682}
683
684
685/*** <<< STAT-DEFS [T] >>> ***/
686
Lev Walkindfae9752004-09-29 13:19:37 +0000687static ber_tlv_tag_t asn_DEF_T_tags[] = {
Lev Walkin188ed2c2004-09-13 08:31:01 +0000688 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
689 (ASN_TAG_CLASS_CONTEXT | (123 << 2)),
690 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
Lev Walkin906654e2004-09-10 15:49:15 +0000691};
Lev Walkindfae9752004-09-29 13:19:37 +0000692asn_TYPE_descriptor_t asn_DEF_T = {
Lev Walkin906654e2004-09-10 15:49:15 +0000693 "T",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000694 T_free,
695 T_print,
Lev Walkin906654e2004-09-10 15:49:15 +0000696 T_constraint,
697 T_decode_ber,
698 T_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000699 0, /* Not implemented yet */
700 T_encode_xer,
Lev Walkin906654e2004-09-10 15:49:15 +0000701 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000702 asn_DEF_T_tags,
703 sizeof(asn_DEF_T_tags)
704 /sizeof(asn_DEF_T_tags[0]) - 2, /* 1 */
705 asn_DEF_T_tags, /* Same as above */
706 sizeof(asn_DEF_T_tags)
707 /sizeof(asn_DEF_T_tags[0]), /* 3 */
Lev Walkin906654e2004-09-10 15:49:15 +0000708 0, 0, /* Defined elsewhere */
709 0 /* No specifics */
710};
711
712
713/*** <<< INCLUDES [Ts] >>> ***/
714
715#include <T2.h>
716#include <T3.h>
717#include <constr_SEQUENCE.h>
718
719/*** <<< DEPS [Ts] >>> ***/
720
Lev Walkindfae9752004-09-29 13:19:37 +0000721extern asn_TYPE_descriptor_t asn_DEF_Ts;
Lev Walkin906654e2004-09-10 15:49:15 +0000722
723/*** <<< TYPE-DECLS [Ts] >>> ***/
724
725
726typedef struct Ts {
727 T2_t m1;
728 T3_t *m2 /* OPTIONAL */;
729 T3_t m3;
730
731 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +0000732 asn_struct_ctx_t _asn_ctx;
Lev Walkin906654e2004-09-10 15:49:15 +0000733} Ts_t;
734
735/*** <<< STAT-DEFS [Ts] >>> ***/
736
Lev Walkindfae9752004-09-29 13:19:37 +0000737static asn_TYPE_member_t asn_MBR_Ts[] = {
Lev Walkin906654e2004-09-10 15:49:15 +0000738 { ATF_NOFLAGS, 0, offsetof(struct Ts, m1),
739 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
740 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000741 .type = (void *)&asn_DEF_T2,
Lev Walkin906654e2004-09-10 15:49:15 +0000742 .memb_constraints = 0, /* Defer to actual type */
743 .name = "m1"
744 },
745 { ATF_POINTER, 1, offsetof(struct Ts, m2),
746 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
747 .tag_mode = +1, /* EXPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000748 .type = (void *)&asn_DEF_T3,
Lev Walkin906654e2004-09-10 15:49:15 +0000749 .memb_constraints = 0, /* Defer to actual type */
750 .name = "m2"
751 },
752 { ATF_NOFLAGS, 0, offsetof(struct Ts, m3),
753 .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
754 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000755 .type = (void *)&asn_DEF_T3,
Lev Walkin906654e2004-09-10 15:49:15 +0000756 .memb_constraints = 0, /* Defer to actual type */
757 .name = "m3"
758 },
759};
Lev Walkindfae9752004-09-29 13:19:37 +0000760static ber_tlv_tag_t asn_DEF_Ts_tags[] = {
Lev Walkin188ed2c2004-09-13 08:31:01 +0000761 (ASN_TAG_CLASS_CONTEXT | (123 << 2)),
762 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
Lev Walkin906654e2004-09-10 15:49:15 +0000763};
Lev Walkindfae9752004-09-29 13:19:37 +0000764static asn_TYPE_tag2member_t asn_DEF_Ts_tag2el[] = {
Lev Walkin906654e2004-09-10 15:49:15 +0000765 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* m1 at 24 */
766 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* m2 at 25 */
767 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* m3 at 27 */
768};
Lev Walkindfae9752004-09-29 13:19:37 +0000769static asn_SEQUENCE_specifics_t asn_DEF_Ts_specs = {
Lev Walkin906654e2004-09-10 15:49:15 +0000770 sizeof(struct Ts),
Lev Walkindfae9752004-09-29 13:19:37 +0000771 offsetof(struct Ts, _asn_ctx),
772 asn_DEF_Ts_tag2el,
Lev Walkin906654e2004-09-10 15:49:15 +0000773 3, /* Count of tags in the map */
774 -1, /* Start extensions */
775 -1 /* Stop extensions */
776};
Lev Walkindfae9752004-09-29 13:19:37 +0000777asn_TYPE_descriptor_t asn_DEF_Ts = {
Lev Walkin906654e2004-09-10 15:49:15 +0000778 "Ts",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000779 SEQUENCE_free,
780 SEQUENCE_print,
Lev Walkin906654e2004-09-10 15:49:15 +0000781 SEQUENCE_constraint,
782 SEQUENCE_decode_ber,
783 SEQUENCE_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000784 0, /* Not implemented yet */
785 SEQUENCE_encode_xer,
Lev Walkin906654e2004-09-10 15:49:15 +0000786 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000787 asn_DEF_Ts_tags,
788 sizeof(asn_DEF_Ts_tags)
789 /sizeof(asn_DEF_Ts_tags[0]) - 1, /* 1 */
790 asn_DEF_Ts_tags, /* Same as above */
791 sizeof(asn_DEF_Ts_tags)
792 /sizeof(asn_DEF_Ts_tags[0]), /* 2 */
793 asn_MBR_Ts,
Lev Walkin906654e2004-09-10 15:49:15 +0000794 3, /* Elements count */
Lev Walkindfae9752004-09-29 13:19:37 +0000795 &asn_DEF_Ts_specs /* Additional specs */
Lev Walkin906654e2004-09-10 15:49:15 +0000796};
797