blob: 8fae05f11777dedb7f518670ca1d791de62777dc [file] [log] [blame]
Lev Walkin8bb57a22007-12-03 13:41:36 +00001
2/*** <<< INCLUDES [T] >>> ***/
3
4#include <NativeInteger.h>
5#include <constr_SEQUENCE.h>
6
7/*** <<< TYPE-DECLS [T] >>> ***/
8
9typedef struct T {
10 long small32range;
11 long full32range;
12 unsigned long unsigned32;
13 unsigned long unsplit32;
14
15 /* Context for parsing across buffer boundaries */
16 asn_struct_ctx_t _asn_ctx;
17} T_t;
18
19/*** <<< FUNC-DECLS [T] >>> ***/
20
21/* extern asn_TYPE_descriptor_t asn_DEF_unsigned32_4; // (Use -fall-defs-global to expose) */
22/* extern asn_TYPE_descriptor_t asn_DEF_unsplit32_5; // (Use -fall-defs-global to expose) */
23extern asn_TYPE_descriptor_t asn_DEF_T;
24
25/*** <<< CODE [T] >>> ***/
26
27static int
28unsigned32_4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
29 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin8bb57a22007-12-03 13:41:36 +000030
31 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -070032 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin8bb57a22007-12-03 13:41:36 +000033 "%s: value not given (%s:%d)",
34 td->name, __FILE__, __LINE__);
35 return -1;
36 }
37
Lev Walkin8bb57a22007-12-03 13:41:36 +000038
39 /* Constraint check succeeded */
40 return 0;
41}
42
43/*
44 * This type is implemented using NativeInteger,
45 * so here we adjust the DEF accordingly.
46 */
47static void
48unsigned32_4_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
49 td->free_struct = asn_DEF_NativeInteger.free_struct;
50 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -080051 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +000052 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
53 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
54 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
55 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
56 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
57 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -070058 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
59 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
Lev Walkin8bb57a22007-12-03 13:41:36 +000060 if(!td->per_constraints)
61 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
62 td->elements = asn_DEF_NativeInteger.elements;
63 td->elements_count = asn_DEF_NativeInteger.elements_count;
64 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
65}
66
67static void
68unsigned32_4_free(asn_TYPE_descriptor_t *td,
69 void *struct_ptr, int contents_only) {
70 unsigned32_4_inherit_TYPE_descriptor(td);
71 td->free_struct(td, struct_ptr, contents_only);
72}
73
74static int
75unsigned32_4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
76 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
77 unsigned32_4_inherit_TYPE_descriptor(td);
78 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
79}
80
81static asn_dec_rval_t
82unsigned32_4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
83 void **structure, const void *bufptr, size_t size, int tag_mode) {
84 unsigned32_4_inherit_TYPE_descriptor(td);
85 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
86}
87
88static asn_enc_rval_t
89unsigned32_4_encode_der(asn_TYPE_descriptor_t *td,
90 void *structure, int tag_mode, ber_tlv_tag_t tag,
91 asn_app_consume_bytes_f *cb, void *app_key) {
92 unsigned32_4_inherit_TYPE_descriptor(td);
93 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
94}
95
96static asn_dec_rval_t
97unsigned32_4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
98 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
99 unsigned32_4_inherit_TYPE_descriptor(td);
100 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
101}
102
103static asn_enc_rval_t
104unsigned32_4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
105 int ilevel, enum xer_encoder_flags_e flags,
106 asn_app_consume_bytes_f *cb, void *app_key) {
107 unsigned32_4_inherit_TYPE_descriptor(td);
108 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
109}
110
111static asn_dec_rval_t
112unsigned32_4_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
113 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
114 unsigned32_4_inherit_TYPE_descriptor(td);
115 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
116}
117
118static asn_enc_rval_t
119unsigned32_4_encode_uper(asn_TYPE_descriptor_t *td,
120 asn_per_constraints_t *constraints,
121 void *structure, asn_per_outp_t *per_out) {
122 unsigned32_4_inherit_TYPE_descriptor(td);
123 return td->uper_encoder(td, constraints, structure, per_out);
124}
125
126static int
127unsplit32_5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
128 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
129 unsigned long value;
130
131 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700132 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin8bb57a22007-12-03 13:41:36 +0000133 "%s: value not given (%s:%d)",
134 td->name, __FILE__, __LINE__);
135 return -1;
136 }
137
138 value = *(const unsigned long *)sptr;
139
140 if(((value >= 5 && value <= 500) || (value >= 600 && value <= 4294967290))) {
141 /* Constraint check succeeded */
142 return 0;
143 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700144 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin8bb57a22007-12-03 13:41:36 +0000145 "%s: constraint failed (%s:%d)",
146 td->name, __FILE__, __LINE__);
147 return -1;
148 }
149}
150
151/*
152 * This type is implemented using NativeInteger,
153 * so here we adjust the DEF accordingly.
154 */
155static void
156unsplit32_5_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
157 td->free_struct = asn_DEF_NativeInteger.free_struct;
158 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800159 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +0000160 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
161 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
162 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
163 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
164 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
165 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -0700166 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
167 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
Lev Walkin8bb57a22007-12-03 13:41:36 +0000168 if(!td->per_constraints)
169 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
170 td->elements = asn_DEF_NativeInteger.elements;
171 td->elements_count = asn_DEF_NativeInteger.elements_count;
172 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
173}
174
175static void
176unsplit32_5_free(asn_TYPE_descriptor_t *td,
177 void *struct_ptr, int contents_only) {
178 unsplit32_5_inherit_TYPE_descriptor(td);
179 td->free_struct(td, struct_ptr, contents_only);
180}
181
182static int
183unsplit32_5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
184 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
185 unsplit32_5_inherit_TYPE_descriptor(td);
186 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
187}
188
189static asn_dec_rval_t
190unsplit32_5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
191 void **structure, const void *bufptr, size_t size, int tag_mode) {
192 unsplit32_5_inherit_TYPE_descriptor(td);
193 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
194}
195
196static asn_enc_rval_t
197unsplit32_5_encode_der(asn_TYPE_descriptor_t *td,
198 void *structure, int tag_mode, ber_tlv_tag_t tag,
199 asn_app_consume_bytes_f *cb, void *app_key) {
200 unsplit32_5_inherit_TYPE_descriptor(td);
201 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
202}
203
204static asn_dec_rval_t
205unsplit32_5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
206 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
207 unsplit32_5_inherit_TYPE_descriptor(td);
208 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
209}
210
211static asn_enc_rval_t
212unsplit32_5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
213 int ilevel, enum xer_encoder_flags_e flags,
214 asn_app_consume_bytes_f *cb, void *app_key) {
215 unsplit32_5_inherit_TYPE_descriptor(td);
216 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
217}
218
219static asn_dec_rval_t
220unsplit32_5_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
221 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
222 unsplit32_5_inherit_TYPE_descriptor(td);
223 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
224}
225
226static asn_enc_rval_t
227unsplit32_5_encode_uper(asn_TYPE_descriptor_t *td,
228 asn_per_constraints_t *constraints,
229 void *structure, asn_per_outp_t *per_out) {
230 unsplit32_5_inherit_TYPE_descriptor(td);
231 return td->uper_encoder(td, constraints, structure, per_out);
232}
233
234static int
235memb_small32range_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
236 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
237 long value;
238
239 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700240 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin8bb57a22007-12-03 13:41:36 +0000241 "%s: value not given (%s:%d)",
242 td->name, __FILE__, __LINE__);
243 return -1;
244 }
245
246 value = *(const long *)sptr;
247
248 if((value >= -2000000000 && value <= 2000000000)) {
249 /* Constraint check succeeded */
250 return 0;
251 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700252 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin8bb57a22007-12-03 13:41:36 +0000253 "%s: constraint failed (%s:%d)",
254 td->name, __FILE__, __LINE__);
255 return -1;
256 }
257}
258
259static int
260memb_full32range_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
261 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
262 long value;
263
264 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700265 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin8bb57a22007-12-03 13:41:36 +0000266 "%s: value not given (%s:%d)",
267 td->name, __FILE__, __LINE__);
268 return -1;
269 }
270
271 value = *(const long *)sptr;
272
273 if((value >= (-2147483647L - 1) && value <= 2147483647)) {
274 /* Constraint check succeeded */
275 return 0;
276 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700277 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin8bb57a22007-12-03 13:41:36 +0000278 "%s: constraint failed (%s:%d)",
279 td->name, __FILE__, __LINE__);
280 return -1;
281 }
282}
283
284static int
285memb_unsigned32_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
286 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000287
288 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700289 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin8bb57a22007-12-03 13:41:36 +0000290 "%s: value not given (%s:%d)",
291 td->name, __FILE__, __LINE__);
292 return -1;
293 }
294
Lev Walkin8bb57a22007-12-03 13:41:36 +0000295
296 /* Constraint check succeeded */
297 return 0;
298}
299
300static int
301memb_unsplit32_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
302 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
303 unsigned long value;
304
305 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700306 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin8bb57a22007-12-03 13:41:36 +0000307 "%s: value not given (%s:%d)",
308 td->name, __FILE__, __LINE__);
309 return -1;
310 }
311
312 value = *(const unsigned long *)sptr;
313
314 if(((value >= 5 && value <= 500) || (value >= 600 && value <= 4294967290))) {
315 /* Constraint check succeeded */
316 return 0;
317 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700318 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin8bb57a22007-12-03 13:41:36 +0000319 "%s: constraint failed (%s:%d)",
320 td->name, __FILE__, __LINE__);
321 return -1;
322 }
323}
324
325
326/*** <<< CTDEFS [T] >>> ***/
327
Lev Walkin2fce55d2013-03-28 05:00:39 -0700328static asn_per_constraints_t asn_PER_type_unsigned32_constr_4 GCC_NOTUSED = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000329 { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */,
330 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
331 0, 0 /* No PER value map */
332};
Lev Walkin2fce55d2013-03-28 05:00:39 -0700333static asn_per_constraints_t asn_PER_type_unsplit32_constr_5 GCC_NOTUSED = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000334 { APC_CONSTRAINED, 32, -1, 5, 4294967290 } /* (5..4294967290) */,
335 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
336 0, 0 /* No PER value map */
337};
Lev Walkin2fce55d2013-03-28 05:00:39 -0700338static asn_per_constraints_t asn_PER_memb_small32range_constr_2 GCC_NOTUSED = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000339 { APC_CONSTRAINED, 32, -1, -2000000000, 2000000000 } /* (-2000000000..2000000000) */,
340 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
341 0, 0 /* No PER value map */
342};
Lev Walkin2fce55d2013-03-28 05:00:39 -0700343static asn_per_constraints_t asn_PER_memb_full32range_constr_3 GCC_NOTUSED = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000344 { APC_CONSTRAINED, 32, -1, (-2147483647L - 1), 2147483647 } /* (-2147483648..2147483647) */,
345 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
346 0, 0 /* No PER value map */
347};
Lev Walkin2fce55d2013-03-28 05:00:39 -0700348static asn_per_constraints_t asn_PER_memb_unsigned32_constr_4 GCC_NOTUSED = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000349 { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */,
350 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
351 0, 0 /* No PER value map */
352};
Lev Walkin2fce55d2013-03-28 05:00:39 -0700353static asn_per_constraints_t asn_PER_memb_unsplit32_constr_5 GCC_NOTUSED = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000354 { APC_CONSTRAINED, 32, -1, 5, 4294967290 } /* (5..4294967290) */,
355 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
356 0, 0 /* No PER value map */
357};
358
359/*** <<< STAT-DEFS [T] >>> ***/
360
johvike70c4072017-05-09 11:06:12 +0200361static asn_INTEGER_specifics_t asn_SPC_unsigned32_specs_4 = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000362 0, 0, 0, 0, 0,
363 0, /* Native long size */
364 1 /* Unsigned representation */
365};
Lev Walkina7591b52014-10-12 18:37:35 -0700366static const ber_tlv_tag_t asn_DEF_unsigned32_tags_4[] = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000367 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
368 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
369};
370static /* Use -fall-defs-global to expose */
371asn_TYPE_descriptor_t asn_DEF_unsigned32_4 = {
372 "unsigned32",
373 "unsigned32",
374 unsigned32_4_free,
375 unsigned32_4_print,
376 unsigned32_4_constraint,
377 unsigned32_4_decode_ber,
378 unsigned32_4_encode_der,
379 unsigned32_4_decode_xer,
380 unsigned32_4_encode_xer,
381 unsigned32_4_decode_uper,
382 unsigned32_4_encode_uper,
Lev Walkinba68c912017-07-06 07:52:39 -0700383 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000384 0, /* Use generic outmost tag fetcher */
385 asn_DEF_unsigned32_tags_4,
386 sizeof(asn_DEF_unsigned32_tags_4)
387 /sizeof(asn_DEF_unsigned32_tags_4[0]) - 1, /* 1 */
388 asn_DEF_unsigned32_tags_4, /* Same as above */
389 sizeof(asn_DEF_unsigned32_tags_4)
390 /sizeof(asn_DEF_unsigned32_tags_4[0]), /* 2 */
391 &asn_PER_type_unsigned32_constr_4,
392 0, 0, /* No members */
393 &asn_SPC_unsigned32_specs_4 /* Additional specs */
394};
395
johvike70c4072017-05-09 11:06:12 +0200396static asn_INTEGER_specifics_t asn_SPC_unsplit32_specs_5 = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000397 0, 0, 0, 0, 0,
398 0, /* Native long size */
399 1 /* Unsigned representation */
400};
Lev Walkina7591b52014-10-12 18:37:35 -0700401static const ber_tlv_tag_t asn_DEF_unsplit32_tags_5[] = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000402 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
403 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
404};
405static /* Use -fall-defs-global to expose */
406asn_TYPE_descriptor_t asn_DEF_unsplit32_5 = {
407 "unsplit32",
408 "unsplit32",
409 unsplit32_5_free,
410 unsplit32_5_print,
411 unsplit32_5_constraint,
412 unsplit32_5_decode_ber,
413 unsplit32_5_encode_der,
414 unsplit32_5_decode_xer,
415 unsplit32_5_encode_xer,
416 unsplit32_5_decode_uper,
417 unsplit32_5_encode_uper,
Lev Walkinba68c912017-07-06 07:52:39 -0700418 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000419 0, /* Use generic outmost tag fetcher */
420 asn_DEF_unsplit32_tags_5,
421 sizeof(asn_DEF_unsplit32_tags_5)
422 /sizeof(asn_DEF_unsplit32_tags_5[0]) - 1, /* 1 */
423 asn_DEF_unsplit32_tags_5, /* Same as above */
424 sizeof(asn_DEF_unsplit32_tags_5)
425 /sizeof(asn_DEF_unsplit32_tags_5[0]), /* 2 */
426 &asn_PER_type_unsplit32_constr_5,
427 0, 0, /* No members */
428 &asn_SPC_unsplit32_specs_5 /* Additional specs */
429};
430
431static asn_TYPE_member_t asn_MBR_T_1[] = {
432 { ATF_NOFLAGS, 0, offsetof(struct T, small32range),
433 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
434 .tag_mode = -1, /* IMPLICIT tag at current level */
435 .type = &asn_DEF_NativeInteger,
436 .memb_constraints = memb_small32range_constraint_1,
437 .per_constraints = &asn_PER_memb_small32range_constr_2,
438 .default_value = 0,
439 .name = "small32range"
440 },
441 { ATF_NOFLAGS, 0, offsetof(struct T, full32range),
442 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
443 .tag_mode = -1, /* IMPLICIT tag at current level */
444 .type = &asn_DEF_NativeInteger,
445 .memb_constraints = memb_full32range_constraint_1,
446 .per_constraints = &asn_PER_memb_full32range_constr_3,
447 .default_value = 0,
448 .name = "full32range"
449 },
450 { ATF_NOFLAGS, 0, offsetof(struct T, unsigned32),
451 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
452 .tag_mode = -1, /* IMPLICIT tag at current level */
453 .type = &asn_DEF_unsigned32_4,
454 .memb_constraints = memb_unsigned32_constraint_1,
455 .per_constraints = &asn_PER_memb_unsigned32_constr_4,
456 .default_value = 0,
457 .name = "unsigned32"
458 },
459 { ATF_NOFLAGS, 0, offsetof(struct T, unsplit32),
460 .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
461 .tag_mode = -1, /* IMPLICIT tag at current level */
462 .type = &asn_DEF_unsplit32_5,
463 .memb_constraints = memb_unsplit32_constraint_1,
464 .per_constraints = &asn_PER_memb_unsplit32_constr_5,
465 .default_value = 0,
466 .name = "unsplit32"
467 },
468};
Lev Walkina7591b52014-10-12 18:37:35 -0700469static const ber_tlv_tag_t asn_DEF_T_tags_1[] = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000470 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
471};
Lev Walkina7591b52014-10-12 18:37:35 -0700472static const asn_TYPE_tag2member_t asn_MAP_T_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700473 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* small32range */
474 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* full32range */
475 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* unsigned32 */
476 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* unsplit32 */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000477};
478static asn_SEQUENCE_specifics_t asn_SPC_T_specs_1 = {
479 sizeof(struct T),
480 offsetof(struct T, _asn_ctx),
481 asn_MAP_T_tag2el_1,
482 4, /* Count of tags in the map */
483 0, 0, 0, /* Optional elements (not needed) */
484 -1, /* Start extensions */
485 -1 /* Stop extensions */
486};
487asn_TYPE_descriptor_t asn_DEF_T = {
488 "T",
489 "T",
490 SEQUENCE_free,
491 SEQUENCE_print,
492 SEQUENCE_constraint,
493 SEQUENCE_decode_ber,
494 SEQUENCE_encode_der,
495 SEQUENCE_decode_xer,
496 SEQUENCE_encode_xer,
497 SEQUENCE_decode_uper,
498 SEQUENCE_encode_uper,
Lev Walkinba68c912017-07-06 07:52:39 -0700499 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000500 0, /* Use generic outmost tag fetcher */
501 asn_DEF_T_tags_1,
502 sizeof(asn_DEF_T_tags_1)
503 /sizeof(asn_DEF_T_tags_1[0]), /* 1 */
504 asn_DEF_T_tags_1, /* Same as above */
505 sizeof(asn_DEF_T_tags_1)
506 /sizeof(asn_DEF_T_tags_1[0]), /* 1 */
507 0, /* No PER visible constraints */
508 asn_MBR_T_1,
509 4, /* Elements count */
510 &asn_SPC_T_specs_1 /* Additional specs */
511};
512