blob: 8928dd64f2f09295218654ca67fc64798fbfe41a [file] [log] [blame]
vlm7d576b32004-08-20 13:37:45 +00001
2/*** <<< INCLUDES [Int1] >>> ***/
3
4#include <INTEGER.h>
5
6/*** <<< TYPE-DECLS [Int1] >>> ***/
7
vlm7d576b32004-08-20 13:37:45 +00008typedef INTEGER_t Int1_t;
9
vlm7d576b32004-08-20 13:37:45 +000010/*** <<< FUNC-DECLS [Int1] >>> ***/
11
vlm1f7df782005-03-04 23:48:19 +000012extern asn_TYPE_descriptor_t asn_DEF_Int1;
13asn_struct_free_f Int1_free;
14asn_struct_print_f Int1_print;
15asn_constr_check_f Int1_constraint;
16ber_type_decoder_f Int1_decode_ber;
17der_type_encoder_f Int1_encode_der;
18xer_type_decoder_f Int1_decode_xer;
19xer_type_encoder_f Int1_encode_xer;
vlm7d576b32004-08-20 13:37:45 +000020
21/*** <<< CODE [Int1] >>> ***/
22
vlm1f7df782005-03-04 23:48:19 +000023int
24Int1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +000025 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlm1f7df782005-03-04 23:48:19 +000026 /* Replace with underlying type checker */
27 td->check_constraints = asn_DEF_INTEGER.check_constraints;
vlmaf68ef52006-07-13 11:19:01 +000028 return td->check_constraints(td, sptr, ctfailcb, app_key);
vlm1f7df782005-03-04 23:48:19 +000029}
30
31/*
32 * This type is implemented using INTEGER,
33 * so here we adjust the DEF accordingly.
34 */
35static void
vlm67d57fe2005-03-06 09:29:03 +000036Int1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlm1f7df782005-03-04 23:48:19 +000037 td->free_struct = asn_DEF_INTEGER.free_struct;
38 td->print_struct = asn_DEF_INTEGER.print_struct;
39 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
40 td->der_encoder = asn_DEF_INTEGER.der_encoder;
41 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
42 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
vlm337167e2005-11-26 11:25:14 +000043 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
44 if(!td->per_constraints)
45 td->per_constraints = asn_DEF_INTEGER.per_constraints;
vlm1f7df782005-03-04 23:48:19 +000046 td->elements = asn_DEF_INTEGER.elements;
47 td->elements_count = asn_DEF_INTEGER.elements_count;
48 td->specifics = asn_DEF_INTEGER.specifics;
49}
50
51void
52Int1_free(asn_TYPE_descriptor_t *td,
53 void *struct_ptr, int contents_only) {
vlm67d57fe2005-03-06 09:29:03 +000054 Int1_1_inherit_TYPE_descriptor(td);
vlm1f7df782005-03-04 23:48:19 +000055 td->free_struct(td, struct_ptr, contents_only);
56}
57
58int
59Int1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
60 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +000061 Int1_1_inherit_TYPE_descriptor(td);
vlm1f7df782005-03-04 23:48:19 +000062 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
63}
64
65asn_dec_rval_t
66Int1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +000067 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm67d57fe2005-03-06 09:29:03 +000068 Int1_1_inherit_TYPE_descriptor(td);
vlm1f7df782005-03-04 23:48:19 +000069 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
70}
71
72asn_enc_rval_t
73Int1_encode_der(asn_TYPE_descriptor_t *td,
74 void *structure, int tag_mode, ber_tlv_tag_t tag,
75 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +000076 Int1_1_inherit_TYPE_descriptor(td);
vlm1f7df782005-03-04 23:48:19 +000077 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
78}
79
80asn_dec_rval_t
81Int1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +000082 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm67d57fe2005-03-06 09:29:03 +000083 Int1_1_inherit_TYPE_descriptor(td);
vlm1f7df782005-03-04 23:48:19 +000084 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
85}
86
87asn_enc_rval_t
88Int1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
89 int ilevel, enum xer_encoder_flags_e flags,
90 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +000091 Int1_1_inherit_TYPE_descriptor(td);
vlm1f7df782005-03-04 23:48:19 +000092 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
93}
94
95
96/*** <<< STAT-DEFS [Int1] >>> ***/
97
vlm337167e2005-11-26 11:25:14 +000098static ber_tlv_tag_t asn_DEF_Int1_tags_1[] = {
vlm1f7df782005-03-04 23:48:19 +000099 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
100};
101asn_TYPE_descriptor_t asn_DEF_Int1 = {
102 "Int1",
103 "Int1",
104 Int1_free,
105 Int1_print,
106 Int1_constraint,
107 Int1_decode_ber,
108 Int1_encode_der,
109 Int1_decode_xer,
110 Int1_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000111 0, /* No PER decoder, -gen-PER to enable */
vlm1f7df782005-03-04 23:48:19 +0000112 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +0000113 asn_DEF_Int1_tags_1,
114 sizeof(asn_DEF_Int1_tags_1)
115 /sizeof(asn_DEF_Int1_tags_1[0]), /* 1 */
116 asn_DEF_Int1_tags_1, /* Same as above */
117 sizeof(asn_DEF_Int1_tags_1)
118 /sizeof(asn_DEF_Int1_tags_1[0]), /* 1 */
119 0, /* No PER visible constraints */
vlm1f7df782005-03-04 23:48:19 +0000120 0, 0, /* No members */
121 0 /* No specifics */
122};
vlm7d576b32004-08-20 13:37:45 +0000123
124
125/*** <<< INCLUDES [Int2] >>> ***/
126
127#include <Int1.h>
128
129/*** <<< TYPE-DECLS [Int2] >>> ***/
130
vlm7d576b32004-08-20 13:37:45 +0000131typedef Int1_t Int2_t;
132
vlm7d576b32004-08-20 13:37:45 +0000133/*** <<< FUNC-DECLS [Int2] >>> ***/
134
vlm02296432004-09-29 13:19:37 +0000135extern asn_TYPE_descriptor_t asn_DEF_Int2;
vlm39ba4c42004-09-22 16:06:28 +0000136asn_struct_free_f Int2_free;
137asn_struct_print_f Int2_print;
vlm7d576b32004-08-20 13:37:45 +0000138asn_constr_check_f Int2_constraint;
139ber_type_decoder_f Int2_decode_ber;
140der_type_encoder_f Int2_encode_der;
vlma6af74c2004-10-23 13:26:56 +0000141xer_type_decoder_f Int2_decode_xer;
vlm39ba4c42004-09-22 16:06:28 +0000142xer_type_encoder_f Int2_encode_xer;
vlm7d576b32004-08-20 13:37:45 +0000143
144/*** <<< CODE [Int2] >>> ***/
145
146int
vlm02296432004-09-29 13:19:37 +0000147Int2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +0000148 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlmdb87f2e2005-02-15 03:40:07 +0000149 const Int1_t *st = (const Int1_t *)sptr;
vlm7d576b32004-08-20 13:37:45 +0000150 long value;
151
152 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +0000153 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +0000154 "%s: value not given (%s:%d)",
155 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +0000156 return -1;
157 }
158
vlm34ce8ad2004-09-07 06:43:57 +0000159 /* Check if the sign bit is present */
160 value = st->buf ? ((st->buf[0] & 0x80) ? -1 : 1) : 0;
vlm7d576b32004-08-20 13:37:45 +0000161
162 if((value >= 0)) {
163 /* Constraint check succeeded */
vlmcdf661b2004-08-22 12:47:03 +0000164 return 0;
vlm7d576b32004-08-20 13:37:45 +0000165 } else {
vlmd4ae41c2006-07-13 13:28:32 +0000166 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +0000167 "%s: constraint failed (%s:%d)",
168 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +0000169 return -1;
170 }
171}
172
173/*
174 * This type is implemented using Int1,
vlmcb0b7fc2004-09-23 22:14:58 +0000175 * so here we adjust the DEF accordingly.
vlm7d576b32004-08-20 13:37:45 +0000176 */
177static void
vlm67d57fe2005-03-06 09:29:03 +0000178Int2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlm02296432004-09-29 13:19:37 +0000179 td->free_struct = asn_DEF_Int1.free_struct;
180 td->print_struct = asn_DEF_Int1.print_struct;
181 td->ber_decoder = asn_DEF_Int1.ber_decoder;
182 td->der_encoder = asn_DEF_Int1.der_encoder;
183 td->xer_decoder = asn_DEF_Int1.xer_decoder;
184 td->xer_encoder = asn_DEF_Int1.xer_encoder;
vlm337167e2005-11-26 11:25:14 +0000185 td->uper_decoder = asn_DEF_Int1.uper_decoder;
186 if(!td->per_constraints)
187 td->per_constraints = asn_DEF_Int1.per_constraints;
vlm02296432004-09-29 13:19:37 +0000188 td->elements = asn_DEF_Int1.elements;
189 td->elements_count = asn_DEF_Int1.elements_count;
190 td->specifics = asn_DEF_Int1.specifics;
vlm7d576b32004-08-20 13:37:45 +0000191}
192
vlm39ba4c42004-09-22 16:06:28 +0000193void
vlm02296432004-09-29 13:19:37 +0000194Int2_free(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +0000195 void *struct_ptr, int contents_only) {
vlm67d57fe2005-03-06 09:29:03 +0000196 Int2_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +0000197 td->free_struct(td, struct_ptr, contents_only);
vlm7d576b32004-08-20 13:37:45 +0000198}
199
200int
vlm02296432004-09-29 13:19:37 +0000201Int2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
vlm7d576b32004-08-20 13:37:45 +0000202 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +0000203 Int2_1_inherit_TYPE_descriptor(td);
vlm7d576b32004-08-20 13:37:45 +0000204 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
205}
206
vlm9de248e2004-10-20 15:50:55 +0000207asn_dec_rval_t
vlm02296432004-09-29 13:19:37 +0000208Int2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +0000209 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm67d57fe2005-03-06 09:29:03 +0000210 Int2_1_inherit_TYPE_descriptor(td);
vlm02296432004-09-29 13:19:37 +0000211 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
vlm39ba4c42004-09-22 16:06:28 +0000212}
213
214asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +0000215Int2_encode_der(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +0000216 void *structure, int tag_mode, ber_tlv_tag_t tag,
217 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +0000218 Int2_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +0000219 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
220}
221
vlma6af74c2004-10-23 13:26:56 +0000222asn_dec_rval_t
223Int2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +0000224 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm67d57fe2005-03-06 09:29:03 +0000225 Int2_1_inherit_TYPE_descriptor(td);
vlma6af74c2004-10-23 13:26:56 +0000226 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
227}
228
vlm39ba4c42004-09-22 16:06:28 +0000229asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +0000230Int2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
vlm39ba4c42004-09-22 16:06:28 +0000231 int ilevel, enum xer_encoder_flags_e flags,
232 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +0000233 Int2_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +0000234 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
vlm7d576b32004-08-20 13:37:45 +0000235}
236
237
238/*** <<< STAT-DEFS [Int2] >>> ***/
239
vlm337167e2005-11-26 11:25:14 +0000240static ber_tlv_tag_t asn_DEF_Int2_tags_1[] = {
vlm1308d2b2004-09-10 15:49:15 +0000241 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
vlm7d576b32004-08-20 13:37:45 +0000242};
vlm02296432004-09-29 13:19:37 +0000243asn_TYPE_descriptor_t asn_DEF_Int2 = {
vlm7d576b32004-08-20 13:37:45 +0000244 "Int2",
vlm9de248e2004-10-20 15:50:55 +0000245 "Int2",
vlm39ba4c42004-09-22 16:06:28 +0000246 Int2_free,
247 Int2_print,
vlm7d576b32004-08-20 13:37:45 +0000248 Int2_constraint,
249 Int2_decode_ber,
250 Int2_encode_der,
vlma6af74c2004-10-23 13:26:56 +0000251 Int2_decode_xer,
vlm39ba4c42004-09-22 16:06:28 +0000252 Int2_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000253 0, /* No PER decoder, -gen-PER to enable */
vlm7d576b32004-08-20 13:37:45 +0000254 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +0000255 asn_DEF_Int2_tags_1,
256 sizeof(asn_DEF_Int2_tags_1)
257 /sizeof(asn_DEF_Int2_tags_1[0]), /* 1 */
258 asn_DEF_Int2_tags_1, /* Same as above */
259 sizeof(asn_DEF_Int2_tags_1)
260 /sizeof(asn_DEF_Int2_tags_1[0]), /* 1 */
261 0, /* No PER visible constraints */
vlm7d576b32004-08-20 13:37:45 +0000262 0, 0, /* No members */
263 0 /* No specifics */
264};
265
266
267/*** <<< INCLUDES [Int3] >>> ***/
268
269#include <Int2.h>
270
271/*** <<< TYPE-DECLS [Int3] >>> ***/
272
vlm7d576b32004-08-20 13:37:45 +0000273typedef Int2_t Int3_t;
274
vlm7d576b32004-08-20 13:37:45 +0000275/*** <<< FUNC-DECLS [Int3] >>> ***/
276
vlm02296432004-09-29 13:19:37 +0000277extern asn_TYPE_descriptor_t asn_DEF_Int3;
vlm39ba4c42004-09-22 16:06:28 +0000278asn_struct_free_f Int3_free;
279asn_struct_print_f Int3_print;
vlm7d576b32004-08-20 13:37:45 +0000280asn_constr_check_f Int3_constraint;
281ber_type_decoder_f Int3_decode_ber;
282der_type_encoder_f Int3_encode_der;
vlma6af74c2004-10-23 13:26:56 +0000283xer_type_decoder_f Int3_decode_xer;
vlm39ba4c42004-09-22 16:06:28 +0000284xer_type_encoder_f Int3_encode_xer;
vlm7d576b32004-08-20 13:37:45 +0000285
286/*** <<< CODE [Int3] >>> ***/
287
288int
vlm02296432004-09-29 13:19:37 +0000289Int3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +0000290 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlmdb87f2e2005-02-15 03:40:07 +0000291 const Int2_t *st = (const Int2_t *)sptr;
vlm7d576b32004-08-20 13:37:45 +0000292 long value;
293
294 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +0000295 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +0000296 "%s: value not given (%s:%d)",
297 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +0000298 return -1;
299 }
300
vlm02296432004-09-29 13:19:37 +0000301 if(asn_INTEGER2long(st, &value)) {
vlmd4ae41c2006-07-13 13:28:32 +0000302 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +0000303 "%s: value too large (%s:%d)",
304 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +0000305 return -1;
306 }
307
308 if((value >= 0 && value <= 10)) {
309 /* Constraint check succeeded */
vlmcdf661b2004-08-22 12:47:03 +0000310 return 0;
vlm7d576b32004-08-20 13:37:45 +0000311 } else {
vlmd4ae41c2006-07-13 13:28:32 +0000312 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +0000313 "%s: constraint failed (%s:%d)",
314 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +0000315 return -1;
316 }
317}
318
319/*
320 * This type is implemented using Int2,
vlmcb0b7fc2004-09-23 22:14:58 +0000321 * so here we adjust the DEF accordingly.
vlm7d576b32004-08-20 13:37:45 +0000322 */
323static void
vlm67d57fe2005-03-06 09:29:03 +0000324Int3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlm02296432004-09-29 13:19:37 +0000325 td->free_struct = asn_DEF_Int2.free_struct;
326 td->print_struct = asn_DEF_Int2.print_struct;
327 td->ber_decoder = asn_DEF_Int2.ber_decoder;
328 td->der_encoder = asn_DEF_Int2.der_encoder;
329 td->xer_decoder = asn_DEF_Int2.xer_decoder;
330 td->xer_encoder = asn_DEF_Int2.xer_encoder;
vlm337167e2005-11-26 11:25:14 +0000331 td->uper_decoder = asn_DEF_Int2.uper_decoder;
332 if(!td->per_constraints)
333 td->per_constraints = asn_DEF_Int2.per_constraints;
vlm02296432004-09-29 13:19:37 +0000334 td->elements = asn_DEF_Int2.elements;
335 td->elements_count = asn_DEF_Int2.elements_count;
336 td->specifics = asn_DEF_Int2.specifics;
vlm7d576b32004-08-20 13:37:45 +0000337}
338
vlm39ba4c42004-09-22 16:06:28 +0000339void
vlm02296432004-09-29 13:19:37 +0000340Int3_free(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +0000341 void *struct_ptr, int contents_only) {
vlm67d57fe2005-03-06 09:29:03 +0000342 Int3_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +0000343 td->free_struct(td, struct_ptr, contents_only);
vlm7d576b32004-08-20 13:37:45 +0000344}
345
346int
vlm02296432004-09-29 13:19:37 +0000347Int3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
vlm7d576b32004-08-20 13:37:45 +0000348 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +0000349 Int3_1_inherit_TYPE_descriptor(td);
vlm7d576b32004-08-20 13:37:45 +0000350 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
351}
352
vlm9de248e2004-10-20 15:50:55 +0000353asn_dec_rval_t
vlm02296432004-09-29 13:19:37 +0000354Int3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +0000355 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm67d57fe2005-03-06 09:29:03 +0000356 Int3_1_inherit_TYPE_descriptor(td);
vlm02296432004-09-29 13:19:37 +0000357 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
vlm39ba4c42004-09-22 16:06:28 +0000358}
359
360asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +0000361Int3_encode_der(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +0000362 void *structure, int tag_mode, ber_tlv_tag_t tag,
363 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +0000364 Int3_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +0000365 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
366}
367
vlma6af74c2004-10-23 13:26:56 +0000368asn_dec_rval_t
369Int3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +0000370 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm67d57fe2005-03-06 09:29:03 +0000371 Int3_1_inherit_TYPE_descriptor(td);
vlma6af74c2004-10-23 13:26:56 +0000372 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
373}
374
vlm39ba4c42004-09-22 16:06:28 +0000375asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +0000376Int3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
vlm39ba4c42004-09-22 16:06:28 +0000377 int ilevel, enum xer_encoder_flags_e flags,
378 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +0000379 Int3_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +0000380 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
vlm7d576b32004-08-20 13:37:45 +0000381}
382
383
384/*** <<< STAT-DEFS [Int3] >>> ***/
385
vlm337167e2005-11-26 11:25:14 +0000386static ber_tlv_tag_t asn_DEF_Int3_tags_1[] = {
vlm1308d2b2004-09-10 15:49:15 +0000387 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
vlm7d576b32004-08-20 13:37:45 +0000388};
vlm02296432004-09-29 13:19:37 +0000389asn_TYPE_descriptor_t asn_DEF_Int3 = {
vlm7d576b32004-08-20 13:37:45 +0000390 "Int3",
vlm9de248e2004-10-20 15:50:55 +0000391 "Int3",
vlm39ba4c42004-09-22 16:06:28 +0000392 Int3_free,
393 Int3_print,
vlm7d576b32004-08-20 13:37:45 +0000394 Int3_constraint,
395 Int3_decode_ber,
396 Int3_encode_der,
vlma6af74c2004-10-23 13:26:56 +0000397 Int3_decode_xer,
vlm39ba4c42004-09-22 16:06:28 +0000398 Int3_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000399 0, /* No PER decoder, -gen-PER to enable */
vlm7d576b32004-08-20 13:37:45 +0000400 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +0000401 asn_DEF_Int3_tags_1,
402 sizeof(asn_DEF_Int3_tags_1)
403 /sizeof(asn_DEF_Int3_tags_1[0]), /* 1 */
404 asn_DEF_Int3_tags_1, /* Same as above */
405 sizeof(asn_DEF_Int3_tags_1)
406 /sizeof(asn_DEF_Int3_tags_1[0]), /* 1 */
407 0, /* No PER visible constraints */
vlm7d576b32004-08-20 13:37:45 +0000408 0, 0, /* No members */
409 0 /* No specifics */
410};
411
412
413/*** <<< INCLUDES [Int4] >>> ***/
414
415#include <Int3.h>
416
417/*** <<< TYPE-DECLS [Int4] >>> ***/
418
vlm7d576b32004-08-20 13:37:45 +0000419typedef Int3_t Int4_t;
420
vlm7d576b32004-08-20 13:37:45 +0000421/*** <<< FUNC-DECLS [Int4] >>> ***/
422
vlm02296432004-09-29 13:19:37 +0000423extern asn_TYPE_descriptor_t asn_DEF_Int4;
vlm39ba4c42004-09-22 16:06:28 +0000424asn_struct_free_f Int4_free;
425asn_struct_print_f Int4_print;
vlm7d576b32004-08-20 13:37:45 +0000426asn_constr_check_f Int4_constraint;
427ber_type_decoder_f Int4_decode_ber;
428der_type_encoder_f Int4_encode_der;
vlma6af74c2004-10-23 13:26:56 +0000429xer_type_decoder_f Int4_decode_xer;
vlm39ba4c42004-09-22 16:06:28 +0000430xer_type_encoder_f Int4_encode_xer;
vlm7d576b32004-08-20 13:37:45 +0000431
432/*** <<< CODE [Int4] >>> ***/
433
434int
vlm02296432004-09-29 13:19:37 +0000435Int4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +0000436 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlmdb87f2e2005-02-15 03:40:07 +0000437 const Int3_t *st = (const Int3_t *)sptr;
vlm26afd202004-08-25 02:08:08 +0000438 long value;
vlm7d576b32004-08-20 13:37:45 +0000439
440 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +0000441 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +0000442 "%s: value not given (%s:%d)",
443 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +0000444 return -1;
445 }
446
vlm02296432004-09-29 13:19:37 +0000447 if(asn_INTEGER2long(st, &value)) {
vlmd4ae41c2006-07-13 13:28:32 +0000448 _ASN_CTFAIL(app_key, td, sptr,
vlm26afd202004-08-25 02:08:08 +0000449 "%s: value too large (%s:%d)",
450 td->name, __FILE__, __LINE__);
451 return -1;
vlm7d576b32004-08-20 13:37:45 +0000452 }
453
vlm26afd202004-08-25 02:08:08 +0000454 if((value >= 1 && value <= 10)) {
455 /* Constraint check succeeded */
456 return 0;
457 } else {
vlmd4ae41c2006-07-13 13:28:32 +0000458 _ASN_CTFAIL(app_key, td, sptr,
vlm26afd202004-08-25 02:08:08 +0000459 "%s: constraint failed (%s:%d)",
460 td->name, __FILE__, __LINE__);
461 return -1;
462 }
vlm7d576b32004-08-20 13:37:45 +0000463}
464
465/*
466 * This type is implemented using Int3,
vlmcb0b7fc2004-09-23 22:14:58 +0000467 * so here we adjust the DEF accordingly.
vlm7d576b32004-08-20 13:37:45 +0000468 */
469static void
vlm67d57fe2005-03-06 09:29:03 +0000470Int4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlm02296432004-09-29 13:19:37 +0000471 td->free_struct = asn_DEF_Int3.free_struct;
472 td->print_struct = asn_DEF_Int3.print_struct;
473 td->ber_decoder = asn_DEF_Int3.ber_decoder;
474 td->der_encoder = asn_DEF_Int3.der_encoder;
475 td->xer_decoder = asn_DEF_Int3.xer_decoder;
476 td->xer_encoder = asn_DEF_Int3.xer_encoder;
vlm337167e2005-11-26 11:25:14 +0000477 td->uper_decoder = asn_DEF_Int3.uper_decoder;
478 if(!td->per_constraints)
479 td->per_constraints = asn_DEF_Int3.per_constraints;
vlm02296432004-09-29 13:19:37 +0000480 td->elements = asn_DEF_Int3.elements;
481 td->elements_count = asn_DEF_Int3.elements_count;
482 td->specifics = asn_DEF_Int3.specifics;
vlm7d576b32004-08-20 13:37:45 +0000483}
484
vlm39ba4c42004-09-22 16:06:28 +0000485void
vlm02296432004-09-29 13:19:37 +0000486Int4_free(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +0000487 void *struct_ptr, int contents_only) {
vlm67d57fe2005-03-06 09:29:03 +0000488 Int4_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +0000489 td->free_struct(td, struct_ptr, contents_only);
vlm7d576b32004-08-20 13:37:45 +0000490}
491
492int
vlm02296432004-09-29 13:19:37 +0000493Int4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
vlm7d576b32004-08-20 13:37:45 +0000494 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +0000495 Int4_1_inherit_TYPE_descriptor(td);
vlm7d576b32004-08-20 13:37:45 +0000496 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
497}
498
vlm9de248e2004-10-20 15:50:55 +0000499asn_dec_rval_t
vlm02296432004-09-29 13:19:37 +0000500Int4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +0000501 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm67d57fe2005-03-06 09:29:03 +0000502 Int4_1_inherit_TYPE_descriptor(td);
vlm02296432004-09-29 13:19:37 +0000503 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
vlm39ba4c42004-09-22 16:06:28 +0000504}
505
506asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +0000507Int4_encode_der(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +0000508 void *structure, int tag_mode, ber_tlv_tag_t tag,
509 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +0000510 Int4_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +0000511 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
512}
513
vlma6af74c2004-10-23 13:26:56 +0000514asn_dec_rval_t
515Int4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +0000516 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm67d57fe2005-03-06 09:29:03 +0000517 Int4_1_inherit_TYPE_descriptor(td);
vlma6af74c2004-10-23 13:26:56 +0000518 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
519}
520
vlm39ba4c42004-09-22 16:06:28 +0000521asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +0000522Int4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
vlm39ba4c42004-09-22 16:06:28 +0000523 int ilevel, enum xer_encoder_flags_e flags,
524 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +0000525 Int4_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +0000526 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
vlm7d576b32004-08-20 13:37:45 +0000527}
528
529
530/*** <<< STAT-DEFS [Int4] >>> ***/
531
vlm337167e2005-11-26 11:25:14 +0000532static ber_tlv_tag_t asn_DEF_Int4_tags_1[] = {
vlm1308d2b2004-09-10 15:49:15 +0000533 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
vlm7d576b32004-08-20 13:37:45 +0000534};
vlm02296432004-09-29 13:19:37 +0000535asn_TYPE_descriptor_t asn_DEF_Int4 = {
vlm7d576b32004-08-20 13:37:45 +0000536 "Int4",
vlm9de248e2004-10-20 15:50:55 +0000537 "Int4",
vlm39ba4c42004-09-22 16:06:28 +0000538 Int4_free,
539 Int4_print,
vlm7d576b32004-08-20 13:37:45 +0000540 Int4_constraint,
541 Int4_decode_ber,
542 Int4_encode_der,
vlma6af74c2004-10-23 13:26:56 +0000543 Int4_decode_xer,
vlm39ba4c42004-09-22 16:06:28 +0000544 Int4_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000545 0, /* No PER decoder, -gen-PER to enable */
vlm7d576b32004-08-20 13:37:45 +0000546 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +0000547 asn_DEF_Int4_tags_1,
548 sizeof(asn_DEF_Int4_tags_1)
549 /sizeof(asn_DEF_Int4_tags_1[0]), /* 1 */
550 asn_DEF_Int4_tags_1, /* Same as above */
551 sizeof(asn_DEF_Int4_tags_1)
552 /sizeof(asn_DEF_Int4_tags_1[0]), /* 1 */
553 0, /* No PER visible constraints */
vlm7d576b32004-08-20 13:37:45 +0000554 0, 0, /* No members */
555 0 /* No specifics */
556};
557
558
559/*** <<< INCLUDES [Int5] >>> ***/
560
561#include <Int4.h>
562
563/*** <<< TYPE-DECLS [Int5] >>> ***/
564
vlm7d576b32004-08-20 13:37:45 +0000565typedef Int4_t Int5_t;
566
vlm7d576b32004-08-20 13:37:45 +0000567/*** <<< FUNC-DECLS [Int5] >>> ***/
568
vlm02296432004-09-29 13:19:37 +0000569extern asn_TYPE_descriptor_t asn_DEF_Int5;
vlm39ba4c42004-09-22 16:06:28 +0000570asn_struct_free_f Int5_free;
571asn_struct_print_f Int5_print;
vlm7d576b32004-08-20 13:37:45 +0000572asn_constr_check_f Int5_constraint;
573ber_type_decoder_f Int5_decode_ber;
574der_type_encoder_f Int5_encode_der;
vlma6af74c2004-10-23 13:26:56 +0000575xer_type_decoder_f Int5_decode_xer;
vlm39ba4c42004-09-22 16:06:28 +0000576xer_type_encoder_f Int5_encode_xer;
vlm7d576b32004-08-20 13:37:45 +0000577
578/*** <<< CODE [Int5] >>> ***/
579
580int
vlm02296432004-09-29 13:19:37 +0000581Int5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +0000582 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlmdb87f2e2005-02-15 03:40:07 +0000583 const Int4_t *st = (const Int4_t *)sptr;
vlm7d576b32004-08-20 13:37:45 +0000584 long value;
585
586 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +0000587 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +0000588 "%s: value not given (%s:%d)",
589 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +0000590 return -1;
591 }
592
vlm02296432004-09-29 13:19:37 +0000593 if(asn_INTEGER2long(st, &value)) {
vlmd4ae41c2006-07-13 13:28:32 +0000594 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +0000595 "%s: value too large (%s:%d)",
596 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +0000597 return -1;
598 }
599
600 if((value == 5)) {
601 /* Constraint check succeeded */
vlmcdf661b2004-08-22 12:47:03 +0000602 return 0;
vlm7d576b32004-08-20 13:37:45 +0000603 } else {
vlmd4ae41c2006-07-13 13:28:32 +0000604 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +0000605 "%s: constraint failed (%s:%d)",
606 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +0000607 return -1;
608 }
609}
610
611/*
612 * This type is implemented using Int4,
vlmcb0b7fc2004-09-23 22:14:58 +0000613 * so here we adjust the DEF accordingly.
vlm7d576b32004-08-20 13:37:45 +0000614 */
615static void
vlm67d57fe2005-03-06 09:29:03 +0000616Int5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlm02296432004-09-29 13:19:37 +0000617 td->free_struct = asn_DEF_Int4.free_struct;
618 td->print_struct = asn_DEF_Int4.print_struct;
619 td->ber_decoder = asn_DEF_Int4.ber_decoder;
620 td->der_encoder = asn_DEF_Int4.der_encoder;
621 td->xer_decoder = asn_DEF_Int4.xer_decoder;
622 td->xer_encoder = asn_DEF_Int4.xer_encoder;
vlm337167e2005-11-26 11:25:14 +0000623 td->uper_decoder = asn_DEF_Int4.uper_decoder;
624 if(!td->per_constraints)
625 td->per_constraints = asn_DEF_Int4.per_constraints;
vlm02296432004-09-29 13:19:37 +0000626 td->elements = asn_DEF_Int4.elements;
627 td->elements_count = asn_DEF_Int4.elements_count;
628 td->specifics = asn_DEF_Int4.specifics;
vlm7d576b32004-08-20 13:37:45 +0000629}
630
vlm39ba4c42004-09-22 16:06:28 +0000631void
vlm02296432004-09-29 13:19:37 +0000632Int5_free(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +0000633 void *struct_ptr, int contents_only) {
vlm67d57fe2005-03-06 09:29:03 +0000634 Int5_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +0000635 td->free_struct(td, struct_ptr, contents_only);
vlm7d576b32004-08-20 13:37:45 +0000636}
637
638int
vlm02296432004-09-29 13:19:37 +0000639Int5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
vlm7d576b32004-08-20 13:37:45 +0000640 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +0000641 Int5_1_inherit_TYPE_descriptor(td);
vlm7d576b32004-08-20 13:37:45 +0000642 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
643}
644
vlm9de248e2004-10-20 15:50:55 +0000645asn_dec_rval_t
vlm02296432004-09-29 13:19:37 +0000646Int5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +0000647 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm67d57fe2005-03-06 09:29:03 +0000648 Int5_1_inherit_TYPE_descriptor(td);
vlm02296432004-09-29 13:19:37 +0000649 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
vlm39ba4c42004-09-22 16:06:28 +0000650}
651
652asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +0000653Int5_encode_der(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +0000654 void *structure, int tag_mode, ber_tlv_tag_t tag,
655 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +0000656 Int5_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +0000657 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
658}
659
vlma6af74c2004-10-23 13:26:56 +0000660asn_dec_rval_t
661Int5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +0000662 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm67d57fe2005-03-06 09:29:03 +0000663 Int5_1_inherit_TYPE_descriptor(td);
vlma6af74c2004-10-23 13:26:56 +0000664 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
665}
666
vlm39ba4c42004-09-22 16:06:28 +0000667asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +0000668Int5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
vlm39ba4c42004-09-22 16:06:28 +0000669 int ilevel, enum xer_encoder_flags_e flags,
670 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +0000671 Int5_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +0000672 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
vlm7d576b32004-08-20 13:37:45 +0000673}
674
675
676/*** <<< STAT-DEFS [Int5] >>> ***/
677
vlm337167e2005-11-26 11:25:14 +0000678static ber_tlv_tag_t asn_DEF_Int5_tags_1[] = {
vlm1308d2b2004-09-10 15:49:15 +0000679 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
vlm7d576b32004-08-20 13:37:45 +0000680};
vlm02296432004-09-29 13:19:37 +0000681asn_TYPE_descriptor_t asn_DEF_Int5 = {
vlm7d576b32004-08-20 13:37:45 +0000682 "Int5",
vlm9de248e2004-10-20 15:50:55 +0000683 "Int5",
vlm39ba4c42004-09-22 16:06:28 +0000684 Int5_free,
685 Int5_print,
vlm7d576b32004-08-20 13:37:45 +0000686 Int5_constraint,
687 Int5_decode_ber,
688 Int5_encode_der,
vlma6af74c2004-10-23 13:26:56 +0000689 Int5_decode_xer,
vlm39ba4c42004-09-22 16:06:28 +0000690 Int5_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000691 0, /* No PER decoder, -gen-PER to enable */
vlm7d576b32004-08-20 13:37:45 +0000692 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +0000693 asn_DEF_Int5_tags_1,
694 sizeof(asn_DEF_Int5_tags_1)
695 /sizeof(asn_DEF_Int5_tags_1[0]), /* 1 */
696 asn_DEF_Int5_tags_1, /* Same as above */
697 sizeof(asn_DEF_Int5_tags_1)
698 /sizeof(asn_DEF_Int5_tags_1[0]), /* 1 */
699 0, /* No PER visible constraints */
vlm7d576b32004-08-20 13:37:45 +0000700 0, 0, /* No members */
701 0 /* No specifics */
702};
703
704
705/*** <<< INCLUDES [ExtensibleExtensions] >>> ***/
706
707#include <INTEGER.h>
708
709/*** <<< TYPE-DECLS [ExtensibleExtensions] >>> ***/
710
vlm7d576b32004-08-20 13:37:45 +0000711typedef INTEGER_t ExtensibleExtensions_t;
712
vlm7d576b32004-08-20 13:37:45 +0000713/*** <<< FUNC-DECLS [ExtensibleExtensions] >>> ***/
714
vlm02296432004-09-29 13:19:37 +0000715extern asn_TYPE_descriptor_t asn_DEF_ExtensibleExtensions;
vlm39ba4c42004-09-22 16:06:28 +0000716asn_struct_free_f ExtensibleExtensions_free;
717asn_struct_print_f ExtensibleExtensions_print;
vlm7d576b32004-08-20 13:37:45 +0000718asn_constr_check_f ExtensibleExtensions_constraint;
719ber_type_decoder_f ExtensibleExtensions_decode_ber;
720der_type_encoder_f ExtensibleExtensions_encode_der;
vlma6af74c2004-10-23 13:26:56 +0000721xer_type_decoder_f ExtensibleExtensions_decode_xer;
vlm39ba4c42004-09-22 16:06:28 +0000722xer_type_encoder_f ExtensibleExtensions_encode_xer;
vlm7d576b32004-08-20 13:37:45 +0000723
724/*** <<< CODE [ExtensibleExtensions] >>> ***/
725
726int
vlm02296432004-09-29 13:19:37 +0000727ExtensibleExtensions_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +0000728 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlmdb87f2e2005-02-15 03:40:07 +0000729 const INTEGER_t *st = (const INTEGER_t *)sptr;
vlm26afd202004-08-25 02:08:08 +0000730 long value;
vlm7d576b32004-08-20 13:37:45 +0000731
732 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +0000733 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +0000734 "%s: value not given (%s:%d)",
735 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +0000736 return -1;
737 }
738
vlm02296432004-09-29 13:19:37 +0000739 if(asn_INTEGER2long(st, &value)) {
vlmd4ae41c2006-07-13 13:28:32 +0000740 _ASN_CTFAIL(app_key, td, sptr,
vlm26afd202004-08-25 02:08:08 +0000741 "%s: value too large (%s:%d)",
742 td->name, __FILE__, __LINE__);
743 return -1;
vlm7d576b32004-08-20 13:37:45 +0000744 }
745
vlm26afd202004-08-25 02:08:08 +0000746 if((value >= 1 && value <= 256)) {
747 /* Constraint check succeeded */
748 return 0;
749 } else {
vlmd4ae41c2006-07-13 13:28:32 +0000750 _ASN_CTFAIL(app_key, td, sptr,
vlm26afd202004-08-25 02:08:08 +0000751 "%s: constraint failed (%s:%d)",
752 td->name, __FILE__, __LINE__);
753 return -1;
754 }
vlm7d576b32004-08-20 13:37:45 +0000755}
756
757/*
758 * This type is implemented using INTEGER,
vlmcb0b7fc2004-09-23 22:14:58 +0000759 * so here we adjust the DEF accordingly.
vlm7d576b32004-08-20 13:37:45 +0000760 */
761static void
vlm67d57fe2005-03-06 09:29:03 +0000762ExtensibleExtensions_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlm02296432004-09-29 13:19:37 +0000763 td->free_struct = asn_DEF_INTEGER.free_struct;
764 td->print_struct = asn_DEF_INTEGER.print_struct;
765 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
766 td->der_encoder = asn_DEF_INTEGER.der_encoder;
767 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
768 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
vlm337167e2005-11-26 11:25:14 +0000769 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
770 if(!td->per_constraints)
771 td->per_constraints = asn_DEF_INTEGER.per_constraints;
vlm02296432004-09-29 13:19:37 +0000772 td->elements = asn_DEF_INTEGER.elements;
773 td->elements_count = asn_DEF_INTEGER.elements_count;
774 td->specifics = asn_DEF_INTEGER.specifics;
vlm7d576b32004-08-20 13:37:45 +0000775}
776
vlm39ba4c42004-09-22 16:06:28 +0000777void
vlm02296432004-09-29 13:19:37 +0000778ExtensibleExtensions_free(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +0000779 void *struct_ptr, int contents_only) {
vlm67d57fe2005-03-06 09:29:03 +0000780 ExtensibleExtensions_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +0000781 td->free_struct(td, struct_ptr, contents_only);
vlm7d576b32004-08-20 13:37:45 +0000782}
783
784int
vlm02296432004-09-29 13:19:37 +0000785ExtensibleExtensions_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
vlm7d576b32004-08-20 13:37:45 +0000786 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +0000787 ExtensibleExtensions_1_inherit_TYPE_descriptor(td);
vlm7d576b32004-08-20 13:37:45 +0000788 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
789}
790
vlm9de248e2004-10-20 15:50:55 +0000791asn_dec_rval_t
vlm02296432004-09-29 13:19:37 +0000792ExtensibleExtensions_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +0000793 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm67d57fe2005-03-06 09:29:03 +0000794 ExtensibleExtensions_1_inherit_TYPE_descriptor(td);
vlm02296432004-09-29 13:19:37 +0000795 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
vlm39ba4c42004-09-22 16:06:28 +0000796}
797
798asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +0000799ExtensibleExtensions_encode_der(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +0000800 void *structure, int tag_mode, ber_tlv_tag_t tag,
801 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +0000802 ExtensibleExtensions_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +0000803 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
804}
805
vlma6af74c2004-10-23 13:26:56 +0000806asn_dec_rval_t
807ExtensibleExtensions_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +0000808 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm67d57fe2005-03-06 09:29:03 +0000809 ExtensibleExtensions_1_inherit_TYPE_descriptor(td);
vlma6af74c2004-10-23 13:26:56 +0000810 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
811}
812
vlm39ba4c42004-09-22 16:06:28 +0000813asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +0000814ExtensibleExtensions_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
vlm39ba4c42004-09-22 16:06:28 +0000815 int ilevel, enum xer_encoder_flags_e flags,
816 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +0000817 ExtensibleExtensions_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +0000818 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
vlm7d576b32004-08-20 13:37:45 +0000819}
820
821
822/*** <<< STAT-DEFS [ExtensibleExtensions] >>> ***/
823
vlm337167e2005-11-26 11:25:14 +0000824static ber_tlv_tag_t asn_DEF_ExtensibleExtensions_tags_1[] = {
vlm7d576b32004-08-20 13:37:45 +0000825 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
826};
vlm02296432004-09-29 13:19:37 +0000827asn_TYPE_descriptor_t asn_DEF_ExtensibleExtensions = {
vlm7d576b32004-08-20 13:37:45 +0000828 "ExtensibleExtensions",
vlm9de248e2004-10-20 15:50:55 +0000829 "ExtensibleExtensions",
vlm39ba4c42004-09-22 16:06:28 +0000830 ExtensibleExtensions_free,
831 ExtensibleExtensions_print,
vlm7d576b32004-08-20 13:37:45 +0000832 ExtensibleExtensions_constraint,
833 ExtensibleExtensions_decode_ber,
834 ExtensibleExtensions_encode_der,
vlma6af74c2004-10-23 13:26:56 +0000835 ExtensibleExtensions_decode_xer,
vlm39ba4c42004-09-22 16:06:28 +0000836 ExtensibleExtensions_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000837 0, /* No PER decoder, -gen-PER to enable */
vlm7d576b32004-08-20 13:37:45 +0000838 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +0000839 asn_DEF_ExtensibleExtensions_tags_1,
840 sizeof(asn_DEF_ExtensibleExtensions_tags_1)
841 /sizeof(asn_DEF_ExtensibleExtensions_tags_1[0]), /* 1 */
842 asn_DEF_ExtensibleExtensions_tags_1, /* Same as above */
843 sizeof(asn_DEF_ExtensibleExtensions_tags_1)
844 /sizeof(asn_DEF_ExtensibleExtensions_tags_1[0]), /* 1 */
845 0, /* No PER visible constraints */
vlm7d576b32004-08-20 13:37:45 +0000846 0, 0, /* No members */
847 0 /* No specifics */
848};
849
850
851/*** <<< INCLUDES [Str1] >>> ***/
852
853#include <IA5String.h>
854
855/*** <<< TYPE-DECLS [Str1] >>> ***/
856
vlm7d576b32004-08-20 13:37:45 +0000857typedef IA5String_t Str1_t;
858
vlm7d576b32004-08-20 13:37:45 +0000859/*** <<< FUNC-DECLS [Str1] >>> ***/
860
vlm1f7df782005-03-04 23:48:19 +0000861extern asn_TYPE_descriptor_t asn_DEF_Str1;
862asn_struct_free_f Str1_free;
863asn_struct_print_f Str1_print;
864asn_constr_check_f Str1_constraint;
865ber_type_decoder_f Str1_decode_ber;
866der_type_encoder_f Str1_encode_der;
867xer_type_decoder_f Str1_decode_xer;
868xer_type_encoder_f Str1_encode_xer;
vlm7d576b32004-08-20 13:37:45 +0000869
870/*** <<< CODE [Str1] >>> ***/
871
vlm1f7df782005-03-04 23:48:19 +0000872int
873Str1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +0000874 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlm1f7df782005-03-04 23:48:19 +0000875 /* Replace with underlying type checker */
876 td->check_constraints = asn_DEF_IA5String.check_constraints;
vlmaf68ef52006-07-13 11:19:01 +0000877 return td->check_constraints(td, sptr, ctfailcb, app_key);
vlm1f7df782005-03-04 23:48:19 +0000878}
879
880/*
881 * This type is implemented using IA5String,
882 * so here we adjust the DEF accordingly.
883 */
884static void
vlm67d57fe2005-03-06 09:29:03 +0000885Str1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlm1f7df782005-03-04 23:48:19 +0000886 td->free_struct = asn_DEF_IA5String.free_struct;
887 td->print_struct = asn_DEF_IA5String.print_struct;
888 td->ber_decoder = asn_DEF_IA5String.ber_decoder;
889 td->der_encoder = asn_DEF_IA5String.der_encoder;
890 td->xer_decoder = asn_DEF_IA5String.xer_decoder;
891 td->xer_encoder = asn_DEF_IA5String.xer_encoder;
vlm337167e2005-11-26 11:25:14 +0000892 td->uper_decoder = asn_DEF_IA5String.uper_decoder;
893 if(!td->per_constraints)
894 td->per_constraints = asn_DEF_IA5String.per_constraints;
vlm1f7df782005-03-04 23:48:19 +0000895 td->elements = asn_DEF_IA5String.elements;
896 td->elements_count = asn_DEF_IA5String.elements_count;
897 td->specifics = asn_DEF_IA5String.specifics;
898}
899
900void
901Str1_free(asn_TYPE_descriptor_t *td,
902 void *struct_ptr, int contents_only) {
vlm67d57fe2005-03-06 09:29:03 +0000903 Str1_1_inherit_TYPE_descriptor(td);
vlm1f7df782005-03-04 23:48:19 +0000904 td->free_struct(td, struct_ptr, contents_only);
905}
906
907int
908Str1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
909 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +0000910 Str1_1_inherit_TYPE_descriptor(td);
vlm1f7df782005-03-04 23:48:19 +0000911 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
912}
913
914asn_dec_rval_t
915Str1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +0000916 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm67d57fe2005-03-06 09:29:03 +0000917 Str1_1_inherit_TYPE_descriptor(td);
vlm1f7df782005-03-04 23:48:19 +0000918 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
919}
920
921asn_enc_rval_t
922Str1_encode_der(asn_TYPE_descriptor_t *td,
923 void *structure, int tag_mode, ber_tlv_tag_t tag,
924 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +0000925 Str1_1_inherit_TYPE_descriptor(td);
vlm1f7df782005-03-04 23:48:19 +0000926 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
927}
928
929asn_dec_rval_t
930Str1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +0000931 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm67d57fe2005-03-06 09:29:03 +0000932 Str1_1_inherit_TYPE_descriptor(td);
vlm1f7df782005-03-04 23:48:19 +0000933 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
934}
935
936asn_enc_rval_t
937Str1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
938 int ilevel, enum xer_encoder_flags_e flags,
939 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +0000940 Str1_1_inherit_TYPE_descriptor(td);
vlm1f7df782005-03-04 23:48:19 +0000941 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
942}
943
944
945/*** <<< STAT-DEFS [Str1] >>> ***/
946
vlm337167e2005-11-26 11:25:14 +0000947static ber_tlv_tag_t asn_DEF_Str1_tags_1[] = {
vlm1f7df782005-03-04 23:48:19 +0000948 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
949};
950asn_TYPE_descriptor_t asn_DEF_Str1 = {
951 "Str1",
952 "Str1",
953 Str1_free,
954 Str1_print,
955 Str1_constraint,
956 Str1_decode_ber,
957 Str1_encode_der,
958 Str1_decode_xer,
959 Str1_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000960 0, /* No PER decoder, -gen-PER to enable */
vlm1f7df782005-03-04 23:48:19 +0000961 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +0000962 asn_DEF_Str1_tags_1,
963 sizeof(asn_DEF_Str1_tags_1)
964 /sizeof(asn_DEF_Str1_tags_1[0]), /* 1 */
965 asn_DEF_Str1_tags_1, /* Same as above */
966 sizeof(asn_DEF_Str1_tags_1)
967 /sizeof(asn_DEF_Str1_tags_1[0]), /* 1 */
968 0, /* No PER visible constraints */
vlm1f7df782005-03-04 23:48:19 +0000969 0, 0, /* No members */
970 0 /* No specifics */
971};
vlm7d576b32004-08-20 13:37:45 +0000972
973
974/*** <<< INCLUDES [Str2] >>> ***/
975
976#include <Str1.h>
977
978/*** <<< TYPE-DECLS [Str2] >>> ***/
979
vlm7d576b32004-08-20 13:37:45 +0000980typedef Str1_t Str2_t;
981
vlm7d576b32004-08-20 13:37:45 +0000982/*** <<< FUNC-DECLS [Str2] >>> ***/
983
vlm02296432004-09-29 13:19:37 +0000984extern asn_TYPE_descriptor_t asn_DEF_Str2;
vlm39ba4c42004-09-22 16:06:28 +0000985asn_struct_free_f Str2_free;
986asn_struct_print_f Str2_print;
vlm7d576b32004-08-20 13:37:45 +0000987asn_constr_check_f Str2_constraint;
988ber_type_decoder_f Str2_decode_ber;
989der_type_encoder_f Str2_encode_der;
vlma6af74c2004-10-23 13:26:56 +0000990xer_type_decoder_f Str2_decode_xer;
vlm39ba4c42004-09-22 16:06:28 +0000991xer_type_encoder_f Str2_encode_xer;
vlm7d576b32004-08-20 13:37:45 +0000992
993/*** <<< CTABLES [Str2] >>> ***/
994
vlm67d57fe2005-03-06 09:29:03 +0000995static int check_permitted_alphabet_1(const void *sptr) {
vlm7d576b32004-08-20 13:37:45 +0000996 /* The underlying type is IA5String */
vlmdb87f2e2005-02-15 03:40:07 +0000997 const IA5String_t *st = (const IA5String_t *)sptr;
vlmb08de152004-08-22 03:30:05 +0000998 const uint8_t *ch = st->buf;
999 const uint8_t *end = ch + st->size;
vlm7d576b32004-08-20 13:37:45 +00001000
1001 for(; ch < end; ch++) {
1002 uint8_t cv = *ch;
vlmcdf661b2004-08-22 12:47:03 +00001003 if(!(cv <= 127)) return -1;
vlm7d576b32004-08-20 13:37:45 +00001004 }
vlmcdf661b2004-08-22 12:47:03 +00001005 return 0;
vlm7d576b32004-08-20 13:37:45 +00001006}
1007
1008
1009/*** <<< CODE [Str2] >>> ***/
1010
1011int
vlm02296432004-09-29 13:19:37 +00001012Str2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +00001013 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlmdb87f2e2005-02-15 03:40:07 +00001014 const Str1_t *st = (const Str1_t *)sptr;
vlm7d576b32004-08-20 13:37:45 +00001015 size_t size;
1016
1017 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +00001018 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +00001019 "%s: value not given (%s:%d)",
1020 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +00001021 return -1;
1022 }
1023
1024 size = st->size;
1025
1026 if(((size <= 20) || (size >= 25 && size <= 30))
vlm67d57fe2005-03-06 09:29:03 +00001027 && !check_permitted_alphabet_1(st)) {
vlm7d576b32004-08-20 13:37:45 +00001028 /* Constraint check succeeded */
vlmcdf661b2004-08-22 12:47:03 +00001029 return 0;
vlm7d576b32004-08-20 13:37:45 +00001030 } else {
vlmd4ae41c2006-07-13 13:28:32 +00001031 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +00001032 "%s: constraint failed (%s:%d)",
1033 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +00001034 return -1;
1035 }
1036}
1037
1038/*
1039 * This type is implemented using Str1,
vlmcb0b7fc2004-09-23 22:14:58 +00001040 * so here we adjust the DEF accordingly.
vlm7d576b32004-08-20 13:37:45 +00001041 */
1042static void
vlm67d57fe2005-03-06 09:29:03 +00001043Str2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlm02296432004-09-29 13:19:37 +00001044 td->free_struct = asn_DEF_Str1.free_struct;
1045 td->print_struct = asn_DEF_Str1.print_struct;
1046 td->ber_decoder = asn_DEF_Str1.ber_decoder;
1047 td->der_encoder = asn_DEF_Str1.der_encoder;
1048 td->xer_decoder = asn_DEF_Str1.xer_decoder;
1049 td->xer_encoder = asn_DEF_Str1.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00001050 td->uper_decoder = asn_DEF_Str1.uper_decoder;
1051 if(!td->per_constraints)
1052 td->per_constraints = asn_DEF_Str1.per_constraints;
vlm02296432004-09-29 13:19:37 +00001053 td->elements = asn_DEF_Str1.elements;
1054 td->elements_count = asn_DEF_Str1.elements_count;
1055 td->specifics = asn_DEF_Str1.specifics;
vlm7d576b32004-08-20 13:37:45 +00001056}
1057
vlm39ba4c42004-09-22 16:06:28 +00001058void
vlm02296432004-09-29 13:19:37 +00001059Str2_free(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00001060 void *struct_ptr, int contents_only) {
vlm67d57fe2005-03-06 09:29:03 +00001061 Str2_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00001062 td->free_struct(td, struct_ptr, contents_only);
vlm7d576b32004-08-20 13:37:45 +00001063}
1064
1065int
vlm02296432004-09-29 13:19:37 +00001066Str2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
vlm7d576b32004-08-20 13:37:45 +00001067 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00001068 Str2_1_inherit_TYPE_descriptor(td);
vlm7d576b32004-08-20 13:37:45 +00001069 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1070}
1071
vlm9de248e2004-10-20 15:50:55 +00001072asn_dec_rval_t
vlm02296432004-09-29 13:19:37 +00001073Str2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00001074 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm67d57fe2005-03-06 09:29:03 +00001075 Str2_1_inherit_TYPE_descriptor(td);
vlm02296432004-09-29 13:19:37 +00001076 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
vlm39ba4c42004-09-22 16:06:28 +00001077}
1078
1079asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00001080Str2_encode_der(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00001081 void *structure, int tag_mode, ber_tlv_tag_t tag,
1082 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00001083 Str2_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00001084 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1085}
1086
vlma6af74c2004-10-23 13:26:56 +00001087asn_dec_rval_t
1088Str2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00001089 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm67d57fe2005-03-06 09:29:03 +00001090 Str2_1_inherit_TYPE_descriptor(td);
vlma6af74c2004-10-23 13:26:56 +00001091 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1092}
1093
vlm39ba4c42004-09-22 16:06:28 +00001094asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00001095Str2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
vlm39ba4c42004-09-22 16:06:28 +00001096 int ilevel, enum xer_encoder_flags_e flags,
1097 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00001098 Str2_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00001099 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
vlm7d576b32004-08-20 13:37:45 +00001100}
1101
1102
1103/*** <<< STAT-DEFS [Str2] >>> ***/
1104
vlm337167e2005-11-26 11:25:14 +00001105static ber_tlv_tag_t asn_DEF_Str2_tags_1[] = {
vlm1308d2b2004-09-10 15:49:15 +00001106 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
vlm7d576b32004-08-20 13:37:45 +00001107};
vlm02296432004-09-29 13:19:37 +00001108asn_TYPE_descriptor_t asn_DEF_Str2 = {
vlm7d576b32004-08-20 13:37:45 +00001109 "Str2",
vlm9de248e2004-10-20 15:50:55 +00001110 "Str2",
vlm39ba4c42004-09-22 16:06:28 +00001111 Str2_free,
1112 Str2_print,
vlm7d576b32004-08-20 13:37:45 +00001113 Str2_constraint,
1114 Str2_decode_ber,
1115 Str2_encode_der,
vlma6af74c2004-10-23 13:26:56 +00001116 Str2_decode_xer,
vlm39ba4c42004-09-22 16:06:28 +00001117 Str2_encode_xer,
vlm337167e2005-11-26 11:25:14 +00001118 0, /* No PER decoder, -gen-PER to enable */
vlm7d576b32004-08-20 13:37:45 +00001119 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00001120 asn_DEF_Str2_tags_1,
1121 sizeof(asn_DEF_Str2_tags_1)
1122 /sizeof(asn_DEF_Str2_tags_1[0]), /* 1 */
1123 asn_DEF_Str2_tags_1, /* Same as above */
1124 sizeof(asn_DEF_Str2_tags_1)
1125 /sizeof(asn_DEF_Str2_tags_1[0]), /* 1 */
1126 0, /* No PER visible constraints */
vlm7d576b32004-08-20 13:37:45 +00001127 0, 0, /* No members */
1128 0 /* No specifics */
1129};
1130
1131
1132/*** <<< INCLUDES [Str3] >>> ***/
1133
1134#include <Str2.h>
1135
1136/*** <<< TYPE-DECLS [Str3] >>> ***/
1137
vlm7d576b32004-08-20 13:37:45 +00001138typedef Str2_t Str3_t;
1139
vlm7d576b32004-08-20 13:37:45 +00001140/*** <<< FUNC-DECLS [Str3] >>> ***/
1141
vlm02296432004-09-29 13:19:37 +00001142extern asn_TYPE_descriptor_t asn_DEF_Str3;
vlm39ba4c42004-09-22 16:06:28 +00001143asn_struct_free_f Str3_free;
1144asn_struct_print_f Str3_print;
vlm7d576b32004-08-20 13:37:45 +00001145asn_constr_check_f Str3_constraint;
1146ber_type_decoder_f Str3_decode_ber;
1147der_type_encoder_f Str3_encode_der;
vlma6af74c2004-10-23 13:26:56 +00001148xer_type_decoder_f Str3_decode_xer;
vlm39ba4c42004-09-22 16:06:28 +00001149xer_type_encoder_f Str3_encode_xer;
vlm7d576b32004-08-20 13:37:45 +00001150
1151/*** <<< CTABLES [Str3] >>> ***/
1152
vlm67d57fe2005-03-06 09:29:03 +00001153static int permitted_alphabet_table_1[256] = {
vlm7d576b32004-08-20 13:37:45 +000011540,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
11550,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
11560,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
11570,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
11580,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0, /* ABC */
11590,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
11600,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0, /* def */
1161};
1162
vlm67d57fe2005-03-06 09:29:03 +00001163static int check_permitted_alphabet_1(const void *sptr) {
1164 int *table = permitted_alphabet_table_1;
vlm7d576b32004-08-20 13:37:45 +00001165 /* The underlying type is IA5String */
vlmdb87f2e2005-02-15 03:40:07 +00001166 const IA5String_t *st = (const IA5String_t *)sptr;
vlmb08de152004-08-22 03:30:05 +00001167 const uint8_t *ch = st->buf;
1168 const uint8_t *end = ch + st->size;
vlm7d576b32004-08-20 13:37:45 +00001169
1170 for(; ch < end; ch++) {
1171 uint8_t cv = *ch;
vlmcdf661b2004-08-22 12:47:03 +00001172 if(!table[cv]) return -1;
vlm7d576b32004-08-20 13:37:45 +00001173 }
vlmcdf661b2004-08-22 12:47:03 +00001174 return 0;
vlm7d576b32004-08-20 13:37:45 +00001175}
1176
1177
1178/*** <<< CODE [Str3] >>> ***/
1179
1180int
vlm02296432004-09-29 13:19:37 +00001181Str3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +00001182 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlmdb87f2e2005-02-15 03:40:07 +00001183 const Str2_t *st = (const Str2_t *)sptr;
vlm7d576b32004-08-20 13:37:45 +00001184 size_t size;
1185
1186 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +00001187 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +00001188 "%s: value not given (%s:%d)",
1189 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +00001190 return -1;
1191 }
1192
1193 size = st->size;
1194
1195 if(((size >= 10 && size <= 20) || (size >= 25 && size <= 27))
vlm67d57fe2005-03-06 09:29:03 +00001196 && !check_permitted_alphabet_1(st)) {
vlm7d576b32004-08-20 13:37:45 +00001197 /* Constraint check succeeded */
vlmcdf661b2004-08-22 12:47:03 +00001198 return 0;
vlm7d576b32004-08-20 13:37:45 +00001199 } else {
vlmd4ae41c2006-07-13 13:28:32 +00001200 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +00001201 "%s: constraint failed (%s:%d)",
1202 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +00001203 return -1;
1204 }
1205}
1206
1207/*
1208 * This type is implemented using Str2,
vlmcb0b7fc2004-09-23 22:14:58 +00001209 * so here we adjust the DEF accordingly.
vlm7d576b32004-08-20 13:37:45 +00001210 */
1211static void
vlm67d57fe2005-03-06 09:29:03 +00001212Str3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlm02296432004-09-29 13:19:37 +00001213 td->free_struct = asn_DEF_Str2.free_struct;
1214 td->print_struct = asn_DEF_Str2.print_struct;
1215 td->ber_decoder = asn_DEF_Str2.ber_decoder;
1216 td->der_encoder = asn_DEF_Str2.der_encoder;
1217 td->xer_decoder = asn_DEF_Str2.xer_decoder;
1218 td->xer_encoder = asn_DEF_Str2.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00001219 td->uper_decoder = asn_DEF_Str2.uper_decoder;
1220 if(!td->per_constraints)
1221 td->per_constraints = asn_DEF_Str2.per_constraints;
vlm02296432004-09-29 13:19:37 +00001222 td->elements = asn_DEF_Str2.elements;
1223 td->elements_count = asn_DEF_Str2.elements_count;
1224 td->specifics = asn_DEF_Str2.specifics;
vlm7d576b32004-08-20 13:37:45 +00001225}
1226
vlm39ba4c42004-09-22 16:06:28 +00001227void
vlm02296432004-09-29 13:19:37 +00001228Str3_free(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00001229 void *struct_ptr, int contents_only) {
vlm67d57fe2005-03-06 09:29:03 +00001230 Str3_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00001231 td->free_struct(td, struct_ptr, contents_only);
vlm7d576b32004-08-20 13:37:45 +00001232}
1233
1234int
vlm02296432004-09-29 13:19:37 +00001235Str3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
vlm7d576b32004-08-20 13:37:45 +00001236 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00001237 Str3_1_inherit_TYPE_descriptor(td);
vlm7d576b32004-08-20 13:37:45 +00001238 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1239}
1240
vlm9de248e2004-10-20 15:50:55 +00001241asn_dec_rval_t
vlm02296432004-09-29 13:19:37 +00001242Str3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00001243 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm67d57fe2005-03-06 09:29:03 +00001244 Str3_1_inherit_TYPE_descriptor(td);
vlm02296432004-09-29 13:19:37 +00001245 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
vlm39ba4c42004-09-22 16:06:28 +00001246}
1247
1248asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00001249Str3_encode_der(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00001250 void *structure, int tag_mode, ber_tlv_tag_t tag,
1251 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00001252 Str3_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00001253 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1254}
1255
vlma6af74c2004-10-23 13:26:56 +00001256asn_dec_rval_t
1257Str3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00001258 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm67d57fe2005-03-06 09:29:03 +00001259 Str3_1_inherit_TYPE_descriptor(td);
vlma6af74c2004-10-23 13:26:56 +00001260 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1261}
1262
vlm39ba4c42004-09-22 16:06:28 +00001263asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00001264Str3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
vlm39ba4c42004-09-22 16:06:28 +00001265 int ilevel, enum xer_encoder_flags_e flags,
1266 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00001267 Str3_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00001268 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
vlm7d576b32004-08-20 13:37:45 +00001269}
1270
1271
1272/*** <<< STAT-DEFS [Str3] >>> ***/
1273
vlm337167e2005-11-26 11:25:14 +00001274static ber_tlv_tag_t asn_DEF_Str3_tags_1[] = {
vlm1308d2b2004-09-10 15:49:15 +00001275 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
vlm7d576b32004-08-20 13:37:45 +00001276};
vlm02296432004-09-29 13:19:37 +00001277asn_TYPE_descriptor_t asn_DEF_Str3 = {
vlm7d576b32004-08-20 13:37:45 +00001278 "Str3",
vlm9de248e2004-10-20 15:50:55 +00001279 "Str3",
vlm39ba4c42004-09-22 16:06:28 +00001280 Str3_free,
1281 Str3_print,
vlm7d576b32004-08-20 13:37:45 +00001282 Str3_constraint,
1283 Str3_decode_ber,
1284 Str3_encode_der,
vlma6af74c2004-10-23 13:26:56 +00001285 Str3_decode_xer,
vlm39ba4c42004-09-22 16:06:28 +00001286 Str3_encode_xer,
vlm337167e2005-11-26 11:25:14 +00001287 0, /* No PER decoder, -gen-PER to enable */
vlm7d576b32004-08-20 13:37:45 +00001288 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00001289 asn_DEF_Str3_tags_1,
1290 sizeof(asn_DEF_Str3_tags_1)
1291 /sizeof(asn_DEF_Str3_tags_1[0]), /* 1 */
1292 asn_DEF_Str3_tags_1, /* Same as above */
1293 sizeof(asn_DEF_Str3_tags_1)
1294 /sizeof(asn_DEF_Str3_tags_1[0]), /* 1 */
1295 0, /* No PER visible constraints */
vlm7d576b32004-08-20 13:37:45 +00001296 0, 0, /* No members */
1297 0 /* No specifics */
1298};
1299
1300
vlm25e12932004-09-10 06:07:39 +00001301/*** <<< INCLUDES [Str4] >>> ***/
1302
1303#include <IA5String.h>
1304
1305/*** <<< TYPE-DECLS [Str4] >>> ***/
1306
vlm25e12932004-09-10 06:07:39 +00001307typedef IA5String_t Str4_t;
1308
1309/*** <<< FUNC-DECLS [Str4] >>> ***/
1310
vlm02296432004-09-29 13:19:37 +00001311extern asn_TYPE_descriptor_t asn_DEF_Str4;
vlm39ba4c42004-09-22 16:06:28 +00001312asn_struct_free_f Str4_free;
1313asn_struct_print_f Str4_print;
vlm25e12932004-09-10 06:07:39 +00001314asn_constr_check_f Str4_constraint;
1315ber_type_decoder_f Str4_decode_ber;
1316der_type_encoder_f Str4_encode_der;
vlma6af74c2004-10-23 13:26:56 +00001317xer_type_decoder_f Str4_decode_xer;
vlm39ba4c42004-09-22 16:06:28 +00001318xer_type_encoder_f Str4_encode_xer;
vlm25e12932004-09-10 06:07:39 +00001319
1320/*** <<< CTABLES [Str4] >>> ***/
1321
vlm67d57fe2005-03-06 09:29:03 +00001322static int check_permitted_alphabet_1(const void *sptr) {
vlm25e12932004-09-10 06:07:39 +00001323 /* The underlying type is IA5String */
vlmdb87f2e2005-02-15 03:40:07 +00001324 const IA5String_t *st = (const IA5String_t *)sptr;
vlm25e12932004-09-10 06:07:39 +00001325 const uint8_t *ch = st->buf;
1326 const uint8_t *end = ch + st->size;
1327
1328 for(; ch < end; ch++) {
1329 uint8_t cv = *ch;
1330 if(!(cv <= 127)) return -1;
1331 }
1332 return 0;
1333}
1334
1335
1336/*** <<< CODE [Str4] >>> ***/
1337
1338int
vlm02296432004-09-29 13:19:37 +00001339Str4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +00001340 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlmdb87f2e2005-02-15 03:40:07 +00001341 const IA5String_t *st = (const IA5String_t *)sptr;
vlm25e12932004-09-10 06:07:39 +00001342
1343 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +00001344 _ASN_CTFAIL(app_key, td, sptr,
vlm25e12932004-09-10 06:07:39 +00001345 "%s: value not given (%s:%d)",
1346 td->name, __FILE__, __LINE__);
1347 return -1;
1348 }
1349
1350
vlm67d57fe2005-03-06 09:29:03 +00001351 if(!check_permitted_alphabet_1(st)) {
vlm25e12932004-09-10 06:07:39 +00001352 /* Constraint check succeeded */
1353 return 0;
1354 } else {
vlmd4ae41c2006-07-13 13:28:32 +00001355 _ASN_CTFAIL(app_key, td, sptr,
vlm25e12932004-09-10 06:07:39 +00001356 "%s: constraint failed (%s:%d)",
1357 td->name, __FILE__, __LINE__);
1358 return -1;
1359 }
1360}
1361
1362/*
1363 * This type is implemented using IA5String,
vlmcb0b7fc2004-09-23 22:14:58 +00001364 * so here we adjust the DEF accordingly.
vlm25e12932004-09-10 06:07:39 +00001365 */
1366static void
vlm67d57fe2005-03-06 09:29:03 +00001367Str4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlm02296432004-09-29 13:19:37 +00001368 td->free_struct = asn_DEF_IA5String.free_struct;
1369 td->print_struct = asn_DEF_IA5String.print_struct;
1370 td->ber_decoder = asn_DEF_IA5String.ber_decoder;
1371 td->der_encoder = asn_DEF_IA5String.der_encoder;
1372 td->xer_decoder = asn_DEF_IA5String.xer_decoder;
1373 td->xer_encoder = asn_DEF_IA5String.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00001374 td->uper_decoder = asn_DEF_IA5String.uper_decoder;
1375 if(!td->per_constraints)
1376 td->per_constraints = asn_DEF_IA5String.per_constraints;
vlm02296432004-09-29 13:19:37 +00001377 td->elements = asn_DEF_IA5String.elements;
1378 td->elements_count = asn_DEF_IA5String.elements_count;
1379 td->specifics = asn_DEF_IA5String.specifics;
vlm25e12932004-09-10 06:07:39 +00001380}
1381
vlm39ba4c42004-09-22 16:06:28 +00001382void
vlm02296432004-09-29 13:19:37 +00001383Str4_free(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00001384 void *struct_ptr, int contents_only) {
vlm67d57fe2005-03-06 09:29:03 +00001385 Str4_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00001386 td->free_struct(td, struct_ptr, contents_only);
vlm25e12932004-09-10 06:07:39 +00001387}
1388
1389int
vlm02296432004-09-29 13:19:37 +00001390Str4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
vlm25e12932004-09-10 06:07:39 +00001391 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00001392 Str4_1_inherit_TYPE_descriptor(td);
vlm25e12932004-09-10 06:07:39 +00001393 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1394}
1395
vlm9de248e2004-10-20 15:50:55 +00001396asn_dec_rval_t
vlm02296432004-09-29 13:19:37 +00001397Str4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00001398 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm67d57fe2005-03-06 09:29:03 +00001399 Str4_1_inherit_TYPE_descriptor(td);
vlm02296432004-09-29 13:19:37 +00001400 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
vlm39ba4c42004-09-22 16:06:28 +00001401}
1402
1403asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00001404Str4_encode_der(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00001405 void *structure, int tag_mode, ber_tlv_tag_t tag,
1406 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00001407 Str4_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00001408 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1409}
1410
vlma6af74c2004-10-23 13:26:56 +00001411asn_dec_rval_t
1412Str4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00001413 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm67d57fe2005-03-06 09:29:03 +00001414 Str4_1_inherit_TYPE_descriptor(td);
vlma6af74c2004-10-23 13:26:56 +00001415 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1416}
1417
vlm39ba4c42004-09-22 16:06:28 +00001418asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00001419Str4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
vlm39ba4c42004-09-22 16:06:28 +00001420 int ilevel, enum xer_encoder_flags_e flags,
1421 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00001422 Str4_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00001423 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
vlm25e12932004-09-10 06:07:39 +00001424}
1425
1426
1427/*** <<< STAT-DEFS [Str4] >>> ***/
1428
vlm337167e2005-11-26 11:25:14 +00001429static ber_tlv_tag_t asn_DEF_Str4_tags_1[] = {
vlm25e12932004-09-10 06:07:39 +00001430 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1431};
vlm02296432004-09-29 13:19:37 +00001432asn_TYPE_descriptor_t asn_DEF_Str4 = {
vlm25e12932004-09-10 06:07:39 +00001433 "Str4",
vlm9de248e2004-10-20 15:50:55 +00001434 "Str4",
vlm39ba4c42004-09-22 16:06:28 +00001435 Str4_free,
1436 Str4_print,
vlm25e12932004-09-10 06:07:39 +00001437 Str4_constraint,
1438 Str4_decode_ber,
1439 Str4_encode_der,
vlma6af74c2004-10-23 13:26:56 +00001440 Str4_decode_xer,
vlm39ba4c42004-09-22 16:06:28 +00001441 Str4_encode_xer,
vlm337167e2005-11-26 11:25:14 +00001442 0, /* No PER decoder, -gen-PER to enable */
vlm25e12932004-09-10 06:07:39 +00001443 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00001444 asn_DEF_Str4_tags_1,
1445 sizeof(asn_DEF_Str4_tags_1)
1446 /sizeof(asn_DEF_Str4_tags_1[0]), /* 1 */
1447 asn_DEF_Str4_tags_1, /* Same as above */
1448 sizeof(asn_DEF_Str4_tags_1)
1449 /sizeof(asn_DEF_Str4_tags_1[0]), /* 1 */
1450 0, /* No PER visible constraints */
vlm25e12932004-09-10 06:07:39 +00001451 0, 0, /* No members */
1452 0 /* No specifics */
1453};
1454
1455
vlm7d576b32004-08-20 13:37:45 +00001456/*** <<< INCLUDES [PER-Visible] >>> ***/
1457
1458#include <IA5String.h>
1459
1460/*** <<< TYPE-DECLS [PER-Visible] >>> ***/
1461
vlm7d576b32004-08-20 13:37:45 +00001462typedef IA5String_t PER_Visible_t;
1463
vlm7d576b32004-08-20 13:37:45 +00001464/*** <<< FUNC-DECLS [PER-Visible] >>> ***/
1465
vlm02296432004-09-29 13:19:37 +00001466extern asn_TYPE_descriptor_t asn_DEF_PER_Visible;
vlm39ba4c42004-09-22 16:06:28 +00001467asn_struct_free_f PER_Visible_free;
1468asn_struct_print_f PER_Visible_print;
vlm7d576b32004-08-20 13:37:45 +00001469asn_constr_check_f PER_Visible_constraint;
1470ber_type_decoder_f PER_Visible_decode_ber;
1471der_type_encoder_f PER_Visible_encode_der;
vlma6af74c2004-10-23 13:26:56 +00001472xer_type_decoder_f PER_Visible_decode_xer;
vlm39ba4c42004-09-22 16:06:28 +00001473xer_type_encoder_f PER_Visible_encode_xer;
vlm7d576b32004-08-20 13:37:45 +00001474
1475/*** <<< CTABLES [PER-Visible] >>> ***/
1476
vlm67d57fe2005-03-06 09:29:03 +00001477static int check_permitted_alphabet_1(const void *sptr) {
vlm7d576b32004-08-20 13:37:45 +00001478 /* The underlying type is IA5String */
vlmdb87f2e2005-02-15 03:40:07 +00001479 const IA5String_t *st = (const IA5String_t *)sptr;
vlmb08de152004-08-22 03:30:05 +00001480 const uint8_t *ch = st->buf;
1481 const uint8_t *end = ch + st->size;
vlm7d576b32004-08-20 13:37:45 +00001482
1483 for(; ch < end; ch++) {
1484 uint8_t cv = *ch;
vlmcdf661b2004-08-22 12:47:03 +00001485 if(!(cv >= 65 && cv <= 70)) return -1;
vlm7d576b32004-08-20 13:37:45 +00001486 }
vlmcdf661b2004-08-22 12:47:03 +00001487 return 0;
vlm7d576b32004-08-20 13:37:45 +00001488}
1489
1490
1491/*** <<< CODE [PER-Visible] >>> ***/
1492
1493int
vlm02296432004-09-29 13:19:37 +00001494PER_Visible_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +00001495 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlmdb87f2e2005-02-15 03:40:07 +00001496 const IA5String_t *st = (const IA5String_t *)sptr;
vlm7d576b32004-08-20 13:37:45 +00001497
1498 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +00001499 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +00001500 "%s: value not given (%s:%d)",
1501 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +00001502 return -1;
1503 }
1504
1505
vlm67d57fe2005-03-06 09:29:03 +00001506 if(!check_permitted_alphabet_1(st)) {
vlm7d576b32004-08-20 13:37:45 +00001507 /* Constraint check succeeded */
vlmcdf661b2004-08-22 12:47:03 +00001508 return 0;
vlm7d576b32004-08-20 13:37:45 +00001509 } else {
vlmd4ae41c2006-07-13 13:28:32 +00001510 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +00001511 "%s: constraint failed (%s:%d)",
1512 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +00001513 return -1;
1514 }
1515}
1516
1517/*
1518 * This type is implemented using IA5String,
vlmcb0b7fc2004-09-23 22:14:58 +00001519 * so here we adjust the DEF accordingly.
vlm7d576b32004-08-20 13:37:45 +00001520 */
1521static void
vlm67d57fe2005-03-06 09:29:03 +00001522PER_Visible_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlm02296432004-09-29 13:19:37 +00001523 td->free_struct = asn_DEF_IA5String.free_struct;
1524 td->print_struct = asn_DEF_IA5String.print_struct;
1525 td->ber_decoder = asn_DEF_IA5String.ber_decoder;
1526 td->der_encoder = asn_DEF_IA5String.der_encoder;
1527 td->xer_decoder = asn_DEF_IA5String.xer_decoder;
1528 td->xer_encoder = asn_DEF_IA5String.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00001529 td->uper_decoder = asn_DEF_IA5String.uper_decoder;
1530 if(!td->per_constraints)
1531 td->per_constraints = asn_DEF_IA5String.per_constraints;
vlm02296432004-09-29 13:19:37 +00001532 td->elements = asn_DEF_IA5String.elements;
1533 td->elements_count = asn_DEF_IA5String.elements_count;
1534 td->specifics = asn_DEF_IA5String.specifics;
vlm7d576b32004-08-20 13:37:45 +00001535}
1536
vlm39ba4c42004-09-22 16:06:28 +00001537void
vlm02296432004-09-29 13:19:37 +00001538PER_Visible_free(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00001539 void *struct_ptr, int contents_only) {
vlm67d57fe2005-03-06 09:29:03 +00001540 PER_Visible_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00001541 td->free_struct(td, struct_ptr, contents_only);
vlm7d576b32004-08-20 13:37:45 +00001542}
1543
1544int
vlm02296432004-09-29 13:19:37 +00001545PER_Visible_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
vlm7d576b32004-08-20 13:37:45 +00001546 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00001547 PER_Visible_1_inherit_TYPE_descriptor(td);
vlm7d576b32004-08-20 13:37:45 +00001548 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1549}
1550
vlm9de248e2004-10-20 15:50:55 +00001551asn_dec_rval_t
vlm02296432004-09-29 13:19:37 +00001552PER_Visible_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00001553 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm67d57fe2005-03-06 09:29:03 +00001554 PER_Visible_1_inherit_TYPE_descriptor(td);
vlm02296432004-09-29 13:19:37 +00001555 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
vlm39ba4c42004-09-22 16:06:28 +00001556}
1557
1558asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00001559PER_Visible_encode_der(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00001560 void *structure, int tag_mode, ber_tlv_tag_t tag,
1561 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00001562 PER_Visible_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00001563 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1564}
1565
vlma6af74c2004-10-23 13:26:56 +00001566asn_dec_rval_t
1567PER_Visible_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00001568 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm67d57fe2005-03-06 09:29:03 +00001569 PER_Visible_1_inherit_TYPE_descriptor(td);
vlma6af74c2004-10-23 13:26:56 +00001570 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1571}
1572
vlm39ba4c42004-09-22 16:06:28 +00001573asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00001574PER_Visible_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
vlm39ba4c42004-09-22 16:06:28 +00001575 int ilevel, enum xer_encoder_flags_e flags,
1576 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00001577 PER_Visible_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00001578 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
vlm7d576b32004-08-20 13:37:45 +00001579}
1580
1581
1582/*** <<< STAT-DEFS [PER-Visible] >>> ***/
1583
vlm337167e2005-11-26 11:25:14 +00001584static ber_tlv_tag_t asn_DEF_PER_Visible_tags_1[] = {
vlm7d576b32004-08-20 13:37:45 +00001585 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1586};
vlm02296432004-09-29 13:19:37 +00001587asn_TYPE_descriptor_t asn_DEF_PER_Visible = {
vlm7d576b32004-08-20 13:37:45 +00001588 "PER-Visible",
vlm9de248e2004-10-20 15:50:55 +00001589 "PER-Visible",
vlm39ba4c42004-09-22 16:06:28 +00001590 PER_Visible_free,
1591 PER_Visible_print,
vlm7d576b32004-08-20 13:37:45 +00001592 PER_Visible_constraint,
1593 PER_Visible_decode_ber,
1594 PER_Visible_encode_der,
vlma6af74c2004-10-23 13:26:56 +00001595 PER_Visible_decode_xer,
vlm39ba4c42004-09-22 16:06:28 +00001596 PER_Visible_encode_xer,
vlm337167e2005-11-26 11:25:14 +00001597 0, /* No PER decoder, -gen-PER to enable */
vlm7d576b32004-08-20 13:37:45 +00001598 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00001599 asn_DEF_PER_Visible_tags_1,
1600 sizeof(asn_DEF_PER_Visible_tags_1)
1601 /sizeof(asn_DEF_PER_Visible_tags_1[0]), /* 1 */
1602 asn_DEF_PER_Visible_tags_1, /* Same as above */
1603 sizeof(asn_DEF_PER_Visible_tags_1)
1604 /sizeof(asn_DEF_PER_Visible_tags_1[0]), /* 1 */
1605 0, /* No PER visible constraints */
vlm7d576b32004-08-20 13:37:45 +00001606 0, 0, /* No members */
1607 0 /* No specifics */
1608};
1609
1610
1611/*** <<< INCLUDES [PER-Visible-2] >>> ***/
1612
1613#include <PER-Visible.h>
1614
1615/*** <<< TYPE-DECLS [PER-Visible-2] >>> ***/
1616
vlm7d576b32004-08-20 13:37:45 +00001617typedef PER_Visible_t PER_Visible_2_t;
1618
vlm7d576b32004-08-20 13:37:45 +00001619/*** <<< FUNC-DECLS [PER-Visible-2] >>> ***/
1620
vlm02296432004-09-29 13:19:37 +00001621extern asn_TYPE_descriptor_t asn_DEF_PER_Visible_2;
vlm39ba4c42004-09-22 16:06:28 +00001622asn_struct_free_f PER_Visible_2_free;
1623asn_struct_print_f PER_Visible_2_print;
vlm7d576b32004-08-20 13:37:45 +00001624asn_constr_check_f PER_Visible_2_constraint;
1625ber_type_decoder_f PER_Visible_2_decode_ber;
1626der_type_encoder_f PER_Visible_2_encode_der;
vlma6af74c2004-10-23 13:26:56 +00001627xer_type_decoder_f PER_Visible_2_decode_xer;
vlm39ba4c42004-09-22 16:06:28 +00001628xer_type_encoder_f PER_Visible_2_encode_xer;
vlm7d576b32004-08-20 13:37:45 +00001629
1630/*** <<< CTABLES [PER-Visible-2] >>> ***/
1631
vlm67d57fe2005-03-06 09:29:03 +00001632static int check_permitted_alphabet_1(const void *sptr) {
vlm7d576b32004-08-20 13:37:45 +00001633 /* The underlying type is IA5String */
vlmdb87f2e2005-02-15 03:40:07 +00001634 const IA5String_t *st = (const IA5String_t *)sptr;
vlmb08de152004-08-22 03:30:05 +00001635 const uint8_t *ch = st->buf;
1636 const uint8_t *end = ch + st->size;
vlm7d576b32004-08-20 13:37:45 +00001637
1638 for(; ch < end; ch++) {
1639 uint8_t cv = *ch;
vlmcdf661b2004-08-22 12:47:03 +00001640 if(!(cv >= 69 && cv <= 70)) return -1;
vlm7d576b32004-08-20 13:37:45 +00001641 }
vlmcdf661b2004-08-22 12:47:03 +00001642 return 0;
vlm7d576b32004-08-20 13:37:45 +00001643}
1644
1645
1646/*** <<< CODE [PER-Visible-2] >>> ***/
1647
1648int
vlm02296432004-09-29 13:19:37 +00001649PER_Visible_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +00001650 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlmdb87f2e2005-02-15 03:40:07 +00001651 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
vlm7d576b32004-08-20 13:37:45 +00001652
1653 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +00001654 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +00001655 "%s: value not given (%s:%d)",
1656 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +00001657 return -1;
1658 }
1659
1660
vlm67d57fe2005-03-06 09:29:03 +00001661 if(!check_permitted_alphabet_1(st)) {
vlm7d576b32004-08-20 13:37:45 +00001662 /* Constraint check succeeded */
vlmcdf661b2004-08-22 12:47:03 +00001663 return 0;
vlm7d576b32004-08-20 13:37:45 +00001664 } else {
vlmd4ae41c2006-07-13 13:28:32 +00001665 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +00001666 "%s: constraint failed (%s:%d)",
1667 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +00001668 return -1;
1669 }
1670}
1671
1672/*
1673 * This type is implemented using PER_Visible,
vlmcb0b7fc2004-09-23 22:14:58 +00001674 * so here we adjust the DEF accordingly.
vlm7d576b32004-08-20 13:37:45 +00001675 */
1676static void
vlm67d57fe2005-03-06 09:29:03 +00001677PER_Visible_2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlm02296432004-09-29 13:19:37 +00001678 td->free_struct = asn_DEF_PER_Visible.free_struct;
1679 td->print_struct = asn_DEF_PER_Visible.print_struct;
1680 td->ber_decoder = asn_DEF_PER_Visible.ber_decoder;
1681 td->der_encoder = asn_DEF_PER_Visible.der_encoder;
1682 td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
1683 td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00001684 td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
1685 if(!td->per_constraints)
1686 td->per_constraints = asn_DEF_PER_Visible.per_constraints;
vlm02296432004-09-29 13:19:37 +00001687 td->elements = asn_DEF_PER_Visible.elements;
1688 td->elements_count = asn_DEF_PER_Visible.elements_count;
1689 td->specifics = asn_DEF_PER_Visible.specifics;
vlm7d576b32004-08-20 13:37:45 +00001690}
1691
vlm39ba4c42004-09-22 16:06:28 +00001692void
vlm02296432004-09-29 13:19:37 +00001693PER_Visible_2_free(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00001694 void *struct_ptr, int contents_only) {
vlm67d57fe2005-03-06 09:29:03 +00001695 PER_Visible_2_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00001696 td->free_struct(td, struct_ptr, contents_only);
vlm7d576b32004-08-20 13:37:45 +00001697}
1698
1699int
vlm02296432004-09-29 13:19:37 +00001700PER_Visible_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
vlm7d576b32004-08-20 13:37:45 +00001701 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00001702 PER_Visible_2_1_inherit_TYPE_descriptor(td);
vlm7d576b32004-08-20 13:37:45 +00001703 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1704}
1705
vlm9de248e2004-10-20 15:50:55 +00001706asn_dec_rval_t
vlm02296432004-09-29 13:19:37 +00001707PER_Visible_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00001708 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm67d57fe2005-03-06 09:29:03 +00001709 PER_Visible_2_1_inherit_TYPE_descriptor(td);
vlm02296432004-09-29 13:19:37 +00001710 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
vlm39ba4c42004-09-22 16:06:28 +00001711}
1712
1713asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00001714PER_Visible_2_encode_der(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00001715 void *structure, int tag_mode, ber_tlv_tag_t tag,
1716 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00001717 PER_Visible_2_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00001718 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1719}
1720
vlma6af74c2004-10-23 13:26:56 +00001721asn_dec_rval_t
1722PER_Visible_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00001723 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm67d57fe2005-03-06 09:29:03 +00001724 PER_Visible_2_1_inherit_TYPE_descriptor(td);
vlma6af74c2004-10-23 13:26:56 +00001725 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1726}
1727
vlm39ba4c42004-09-22 16:06:28 +00001728asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00001729PER_Visible_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
vlm39ba4c42004-09-22 16:06:28 +00001730 int ilevel, enum xer_encoder_flags_e flags,
1731 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00001732 PER_Visible_2_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00001733 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
vlm7d576b32004-08-20 13:37:45 +00001734}
1735
1736
1737/*** <<< STAT-DEFS [PER-Visible-2] >>> ***/
1738
vlm337167e2005-11-26 11:25:14 +00001739static ber_tlv_tag_t asn_DEF_PER_Visible_2_tags_1[] = {
vlm1308d2b2004-09-10 15:49:15 +00001740 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
vlm7d576b32004-08-20 13:37:45 +00001741};
vlm02296432004-09-29 13:19:37 +00001742asn_TYPE_descriptor_t asn_DEF_PER_Visible_2 = {
vlm7d576b32004-08-20 13:37:45 +00001743 "PER-Visible-2",
vlm9de248e2004-10-20 15:50:55 +00001744 "PER-Visible-2",
vlm39ba4c42004-09-22 16:06:28 +00001745 PER_Visible_2_free,
1746 PER_Visible_2_print,
vlm7d576b32004-08-20 13:37:45 +00001747 PER_Visible_2_constraint,
1748 PER_Visible_2_decode_ber,
1749 PER_Visible_2_encode_der,
vlma6af74c2004-10-23 13:26:56 +00001750 PER_Visible_2_decode_xer,
vlm39ba4c42004-09-22 16:06:28 +00001751 PER_Visible_2_encode_xer,
vlm337167e2005-11-26 11:25:14 +00001752 0, /* No PER decoder, -gen-PER to enable */
vlm7d576b32004-08-20 13:37:45 +00001753 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00001754 asn_DEF_PER_Visible_2_tags_1,
1755 sizeof(asn_DEF_PER_Visible_2_tags_1)
1756 /sizeof(asn_DEF_PER_Visible_2_tags_1[0]), /* 1 */
1757 asn_DEF_PER_Visible_2_tags_1, /* Same as above */
1758 sizeof(asn_DEF_PER_Visible_2_tags_1)
1759 /sizeof(asn_DEF_PER_Visible_2_tags_1[0]), /* 1 */
1760 0, /* No PER visible constraints */
vlm7d576b32004-08-20 13:37:45 +00001761 0, 0, /* No members */
1762 0 /* No specifics */
1763};
1764
1765
1766/*** <<< INCLUDES [Not-PER-Visible-1] >>> ***/
1767
1768#include <PER-Visible.h>
1769
1770/*** <<< TYPE-DECLS [Not-PER-Visible-1] >>> ***/
1771
vlm7d576b32004-08-20 13:37:45 +00001772typedef PER_Visible_t Not_PER_Visible_1_t;
1773
vlm7d576b32004-08-20 13:37:45 +00001774/*** <<< FUNC-DECLS [Not-PER-Visible-1] >>> ***/
1775
vlm02296432004-09-29 13:19:37 +00001776extern asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_1;
vlm39ba4c42004-09-22 16:06:28 +00001777asn_struct_free_f Not_PER_Visible_1_free;
1778asn_struct_print_f Not_PER_Visible_1_print;
vlm7d576b32004-08-20 13:37:45 +00001779asn_constr_check_f Not_PER_Visible_1_constraint;
1780ber_type_decoder_f Not_PER_Visible_1_decode_ber;
1781der_type_encoder_f Not_PER_Visible_1_encode_der;
vlma6af74c2004-10-23 13:26:56 +00001782xer_type_decoder_f Not_PER_Visible_1_decode_xer;
vlm39ba4c42004-09-22 16:06:28 +00001783xer_type_encoder_f Not_PER_Visible_1_encode_xer;
vlm7d576b32004-08-20 13:37:45 +00001784
1785/*** <<< CTABLES [Not-PER-Visible-1] >>> ***/
1786
vlm67d57fe2005-03-06 09:29:03 +00001787static int check_permitted_alphabet_1(const void *sptr) {
vlm7d576b32004-08-20 13:37:45 +00001788 /* The underlying type is IA5String */
vlmdb87f2e2005-02-15 03:40:07 +00001789 const IA5String_t *st = (const IA5String_t *)sptr;
vlmb08de152004-08-22 03:30:05 +00001790 const uint8_t *ch = st->buf;
1791 const uint8_t *end = ch + st->size;
vlm7d576b32004-08-20 13:37:45 +00001792
1793 for(; ch < end; ch++) {
1794 uint8_t cv = *ch;
vlmcdf661b2004-08-22 12:47:03 +00001795 if(!(cv >= 65 && cv <= 70)) return -1;
vlm7d576b32004-08-20 13:37:45 +00001796 }
vlmcdf661b2004-08-22 12:47:03 +00001797 return 0;
vlm7d576b32004-08-20 13:37:45 +00001798}
1799
1800
1801/*** <<< CODE [Not-PER-Visible-1] >>> ***/
1802
1803int
vlm02296432004-09-29 13:19:37 +00001804Not_PER_Visible_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +00001805 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlmdb87f2e2005-02-15 03:40:07 +00001806 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
vlm7d576b32004-08-20 13:37:45 +00001807
1808 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +00001809 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +00001810 "%s: value not given (%s:%d)",
1811 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +00001812 return -1;
1813 }
1814
1815
vlm67d57fe2005-03-06 09:29:03 +00001816 if(!check_permitted_alphabet_1(st)) {
vlm7d576b32004-08-20 13:37:45 +00001817 /* Constraint check succeeded */
vlmcdf661b2004-08-22 12:47:03 +00001818 return 0;
vlm7d576b32004-08-20 13:37:45 +00001819 } else {
vlmd4ae41c2006-07-13 13:28:32 +00001820 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +00001821 "%s: constraint failed (%s:%d)",
1822 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +00001823 return -1;
1824 }
1825}
1826
1827/*
1828 * This type is implemented using PER_Visible,
vlmcb0b7fc2004-09-23 22:14:58 +00001829 * so here we adjust the DEF accordingly.
vlm7d576b32004-08-20 13:37:45 +00001830 */
1831static void
vlm67d57fe2005-03-06 09:29:03 +00001832Not_PER_Visible_1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlm02296432004-09-29 13:19:37 +00001833 td->free_struct = asn_DEF_PER_Visible.free_struct;
1834 td->print_struct = asn_DEF_PER_Visible.print_struct;
1835 td->ber_decoder = asn_DEF_PER_Visible.ber_decoder;
1836 td->der_encoder = asn_DEF_PER_Visible.der_encoder;
1837 td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
1838 td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00001839 td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
1840 if(!td->per_constraints)
1841 td->per_constraints = asn_DEF_PER_Visible.per_constraints;
vlm02296432004-09-29 13:19:37 +00001842 td->elements = asn_DEF_PER_Visible.elements;
1843 td->elements_count = asn_DEF_PER_Visible.elements_count;
1844 td->specifics = asn_DEF_PER_Visible.specifics;
vlm7d576b32004-08-20 13:37:45 +00001845}
1846
vlm39ba4c42004-09-22 16:06:28 +00001847void
vlm02296432004-09-29 13:19:37 +00001848Not_PER_Visible_1_free(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00001849 void *struct_ptr, int contents_only) {
vlm67d57fe2005-03-06 09:29:03 +00001850 Not_PER_Visible_1_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00001851 td->free_struct(td, struct_ptr, contents_only);
vlm7d576b32004-08-20 13:37:45 +00001852}
1853
1854int
vlm02296432004-09-29 13:19:37 +00001855Not_PER_Visible_1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
vlm7d576b32004-08-20 13:37:45 +00001856 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00001857 Not_PER_Visible_1_1_inherit_TYPE_descriptor(td);
vlm7d576b32004-08-20 13:37:45 +00001858 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1859}
1860
vlm9de248e2004-10-20 15:50:55 +00001861asn_dec_rval_t
vlm02296432004-09-29 13:19:37 +00001862Not_PER_Visible_1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00001863 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm67d57fe2005-03-06 09:29:03 +00001864 Not_PER_Visible_1_1_inherit_TYPE_descriptor(td);
vlm02296432004-09-29 13:19:37 +00001865 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
vlm39ba4c42004-09-22 16:06:28 +00001866}
1867
1868asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00001869Not_PER_Visible_1_encode_der(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00001870 void *structure, int tag_mode, ber_tlv_tag_t tag,
1871 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00001872 Not_PER_Visible_1_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00001873 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1874}
1875
vlma6af74c2004-10-23 13:26:56 +00001876asn_dec_rval_t
1877Not_PER_Visible_1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00001878 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm67d57fe2005-03-06 09:29:03 +00001879 Not_PER_Visible_1_1_inherit_TYPE_descriptor(td);
vlma6af74c2004-10-23 13:26:56 +00001880 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1881}
1882
vlm39ba4c42004-09-22 16:06:28 +00001883asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00001884Not_PER_Visible_1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
vlm39ba4c42004-09-22 16:06:28 +00001885 int ilevel, enum xer_encoder_flags_e flags,
1886 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00001887 Not_PER_Visible_1_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00001888 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
vlm7d576b32004-08-20 13:37:45 +00001889}
1890
1891
1892/*** <<< STAT-DEFS [Not-PER-Visible-1] >>> ***/
1893
vlm337167e2005-11-26 11:25:14 +00001894static ber_tlv_tag_t asn_DEF_Not_PER_Visible_1_tags_1[] = {
vlm1308d2b2004-09-10 15:49:15 +00001895 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
vlm7d576b32004-08-20 13:37:45 +00001896};
vlm02296432004-09-29 13:19:37 +00001897asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_1 = {
vlm7d576b32004-08-20 13:37:45 +00001898 "Not-PER-Visible-1",
vlm9de248e2004-10-20 15:50:55 +00001899 "Not-PER-Visible-1",
vlm39ba4c42004-09-22 16:06:28 +00001900 Not_PER_Visible_1_free,
1901 Not_PER_Visible_1_print,
vlm7d576b32004-08-20 13:37:45 +00001902 Not_PER_Visible_1_constraint,
1903 Not_PER_Visible_1_decode_ber,
1904 Not_PER_Visible_1_encode_der,
vlma6af74c2004-10-23 13:26:56 +00001905 Not_PER_Visible_1_decode_xer,
vlm39ba4c42004-09-22 16:06:28 +00001906 Not_PER_Visible_1_encode_xer,
vlm337167e2005-11-26 11:25:14 +00001907 0, /* No PER decoder, -gen-PER to enable */
vlm7d576b32004-08-20 13:37:45 +00001908 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00001909 asn_DEF_Not_PER_Visible_1_tags_1,
1910 sizeof(asn_DEF_Not_PER_Visible_1_tags_1)
1911 /sizeof(asn_DEF_Not_PER_Visible_1_tags_1[0]), /* 1 */
1912 asn_DEF_Not_PER_Visible_1_tags_1, /* Same as above */
1913 sizeof(asn_DEF_Not_PER_Visible_1_tags_1)
1914 /sizeof(asn_DEF_Not_PER_Visible_1_tags_1[0]), /* 1 */
1915 0, /* No PER visible constraints */
vlm7d576b32004-08-20 13:37:45 +00001916 0, 0, /* No members */
1917 0 /* No specifics */
1918};
1919
1920
1921/*** <<< INCLUDES [Not-PER-Visible-2] >>> ***/
1922
1923#include <PER-Visible.h>
1924
1925/*** <<< TYPE-DECLS [Not-PER-Visible-2] >>> ***/
1926
vlm7d576b32004-08-20 13:37:45 +00001927typedef PER_Visible_t Not_PER_Visible_2_t;
1928
vlm7d576b32004-08-20 13:37:45 +00001929/*** <<< FUNC-DECLS [Not-PER-Visible-2] >>> ***/
1930
vlm02296432004-09-29 13:19:37 +00001931extern asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_2;
vlm39ba4c42004-09-22 16:06:28 +00001932asn_struct_free_f Not_PER_Visible_2_free;
1933asn_struct_print_f Not_PER_Visible_2_print;
vlm7d576b32004-08-20 13:37:45 +00001934asn_constr_check_f Not_PER_Visible_2_constraint;
1935ber_type_decoder_f Not_PER_Visible_2_decode_ber;
1936der_type_encoder_f Not_PER_Visible_2_encode_der;
vlma6af74c2004-10-23 13:26:56 +00001937xer_type_decoder_f Not_PER_Visible_2_decode_xer;
vlm39ba4c42004-09-22 16:06:28 +00001938xer_type_encoder_f Not_PER_Visible_2_encode_xer;
vlm7d576b32004-08-20 13:37:45 +00001939
vlm26afd202004-08-25 02:08:08 +00001940/*** <<< CTABLES [Not-PER-Visible-2] >>> ***/
1941
vlm67d57fe2005-03-06 09:29:03 +00001942static int check_permitted_alphabet_1(const void *sptr) {
vlm26afd202004-08-25 02:08:08 +00001943 /* The underlying type is IA5String */
vlmdb87f2e2005-02-15 03:40:07 +00001944 const IA5String_t *st = (const IA5String_t *)sptr;
vlm26afd202004-08-25 02:08:08 +00001945 const uint8_t *ch = st->buf;
1946 const uint8_t *end = ch + st->size;
1947
1948 for(; ch < end; ch++) {
1949 uint8_t cv = *ch;
1950 if(!(cv >= 65 && cv <= 66)) return -1;
1951 }
1952 return 0;
1953}
1954
1955
vlm7d576b32004-08-20 13:37:45 +00001956/*** <<< CODE [Not-PER-Visible-2] >>> ***/
1957
1958int
vlm02296432004-09-29 13:19:37 +00001959Not_PER_Visible_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +00001960 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlmdb87f2e2005-02-15 03:40:07 +00001961 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
vlm7d576b32004-08-20 13:37:45 +00001962
1963 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +00001964 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +00001965 "%s: value not given (%s:%d)",
1966 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +00001967 return -1;
1968 }
1969
1970
vlm67d57fe2005-03-06 09:29:03 +00001971 if(!check_permitted_alphabet_1(st)) {
vlm26afd202004-08-25 02:08:08 +00001972 /* Constraint check succeeded */
1973 return 0;
1974 } else {
vlmd4ae41c2006-07-13 13:28:32 +00001975 _ASN_CTFAIL(app_key, td, sptr,
vlm26afd202004-08-25 02:08:08 +00001976 "%s: constraint failed (%s:%d)",
1977 td->name, __FILE__, __LINE__);
1978 return -1;
vlm7d576b32004-08-20 13:37:45 +00001979 }
vlm7d576b32004-08-20 13:37:45 +00001980}
1981
1982/*
1983 * This type is implemented using PER_Visible,
vlmcb0b7fc2004-09-23 22:14:58 +00001984 * so here we adjust the DEF accordingly.
vlm7d576b32004-08-20 13:37:45 +00001985 */
1986static void
vlm67d57fe2005-03-06 09:29:03 +00001987Not_PER_Visible_2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlm02296432004-09-29 13:19:37 +00001988 td->free_struct = asn_DEF_PER_Visible.free_struct;
1989 td->print_struct = asn_DEF_PER_Visible.print_struct;
1990 td->ber_decoder = asn_DEF_PER_Visible.ber_decoder;
1991 td->der_encoder = asn_DEF_PER_Visible.der_encoder;
1992 td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
1993 td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00001994 td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
1995 if(!td->per_constraints)
1996 td->per_constraints = asn_DEF_PER_Visible.per_constraints;
vlm02296432004-09-29 13:19:37 +00001997 td->elements = asn_DEF_PER_Visible.elements;
1998 td->elements_count = asn_DEF_PER_Visible.elements_count;
1999 td->specifics = asn_DEF_PER_Visible.specifics;
vlm7d576b32004-08-20 13:37:45 +00002000}
2001
vlm39ba4c42004-09-22 16:06:28 +00002002void
vlm02296432004-09-29 13:19:37 +00002003Not_PER_Visible_2_free(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00002004 void *struct_ptr, int contents_only) {
vlm67d57fe2005-03-06 09:29:03 +00002005 Not_PER_Visible_2_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00002006 td->free_struct(td, struct_ptr, contents_only);
vlm7d576b32004-08-20 13:37:45 +00002007}
2008
2009int
vlm02296432004-09-29 13:19:37 +00002010Not_PER_Visible_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
vlm7d576b32004-08-20 13:37:45 +00002011 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00002012 Not_PER_Visible_2_1_inherit_TYPE_descriptor(td);
vlm7d576b32004-08-20 13:37:45 +00002013 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2014}
2015
vlm9de248e2004-10-20 15:50:55 +00002016asn_dec_rval_t
vlm02296432004-09-29 13:19:37 +00002017Not_PER_Visible_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00002018 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm67d57fe2005-03-06 09:29:03 +00002019 Not_PER_Visible_2_1_inherit_TYPE_descriptor(td);
vlm02296432004-09-29 13:19:37 +00002020 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
vlm39ba4c42004-09-22 16:06:28 +00002021}
2022
2023asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00002024Not_PER_Visible_2_encode_der(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00002025 void *structure, int tag_mode, ber_tlv_tag_t tag,
2026 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00002027 Not_PER_Visible_2_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00002028 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2029}
2030
vlma6af74c2004-10-23 13:26:56 +00002031asn_dec_rval_t
2032Not_PER_Visible_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00002033 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm67d57fe2005-03-06 09:29:03 +00002034 Not_PER_Visible_2_1_inherit_TYPE_descriptor(td);
vlma6af74c2004-10-23 13:26:56 +00002035 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2036}
2037
vlm39ba4c42004-09-22 16:06:28 +00002038asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00002039Not_PER_Visible_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
vlm39ba4c42004-09-22 16:06:28 +00002040 int ilevel, enum xer_encoder_flags_e flags,
2041 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00002042 Not_PER_Visible_2_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00002043 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
vlm7d576b32004-08-20 13:37:45 +00002044}
2045
2046
2047/*** <<< STAT-DEFS [Not-PER-Visible-2] >>> ***/
2048
vlm337167e2005-11-26 11:25:14 +00002049static ber_tlv_tag_t asn_DEF_Not_PER_Visible_2_tags_1[] = {
vlm1308d2b2004-09-10 15:49:15 +00002050 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
vlm7d576b32004-08-20 13:37:45 +00002051};
vlm02296432004-09-29 13:19:37 +00002052asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_2 = {
vlm7d576b32004-08-20 13:37:45 +00002053 "Not-PER-Visible-2",
vlm9de248e2004-10-20 15:50:55 +00002054 "Not-PER-Visible-2",
vlm39ba4c42004-09-22 16:06:28 +00002055 Not_PER_Visible_2_free,
2056 Not_PER_Visible_2_print,
vlm7d576b32004-08-20 13:37:45 +00002057 Not_PER_Visible_2_constraint,
2058 Not_PER_Visible_2_decode_ber,
2059 Not_PER_Visible_2_encode_der,
vlma6af74c2004-10-23 13:26:56 +00002060 Not_PER_Visible_2_decode_xer,
vlm39ba4c42004-09-22 16:06:28 +00002061 Not_PER_Visible_2_encode_xer,
vlm337167e2005-11-26 11:25:14 +00002062 0, /* No PER decoder, -gen-PER to enable */
vlm7d576b32004-08-20 13:37:45 +00002063 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00002064 asn_DEF_Not_PER_Visible_2_tags_1,
2065 sizeof(asn_DEF_Not_PER_Visible_2_tags_1)
2066 /sizeof(asn_DEF_Not_PER_Visible_2_tags_1[0]), /* 1 */
2067 asn_DEF_Not_PER_Visible_2_tags_1, /* Same as above */
2068 sizeof(asn_DEF_Not_PER_Visible_2_tags_1)
2069 /sizeof(asn_DEF_Not_PER_Visible_2_tags_1[0]), /* 1 */
2070 0, /* No PER visible constraints */
vlm7d576b32004-08-20 13:37:45 +00002071 0, 0, /* No members */
2072 0 /* No specifics */
2073};
2074
2075
2076/*** <<< INCLUDES [Not-PER-Visible-3] >>> ***/
2077
2078#include <PER-Visible.h>
2079
2080/*** <<< TYPE-DECLS [Not-PER-Visible-3] >>> ***/
2081
vlm7d576b32004-08-20 13:37:45 +00002082typedef PER_Visible_t Not_PER_Visible_3_t;
2083
vlm7d576b32004-08-20 13:37:45 +00002084/*** <<< FUNC-DECLS [Not-PER-Visible-3] >>> ***/
2085
vlm02296432004-09-29 13:19:37 +00002086extern asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_3;
vlm39ba4c42004-09-22 16:06:28 +00002087asn_struct_free_f Not_PER_Visible_3_free;
2088asn_struct_print_f Not_PER_Visible_3_print;
vlm7d576b32004-08-20 13:37:45 +00002089asn_constr_check_f Not_PER_Visible_3_constraint;
2090ber_type_decoder_f Not_PER_Visible_3_decode_ber;
2091der_type_encoder_f Not_PER_Visible_3_encode_der;
vlma6af74c2004-10-23 13:26:56 +00002092xer_type_decoder_f Not_PER_Visible_3_decode_xer;
vlm39ba4c42004-09-22 16:06:28 +00002093xer_type_encoder_f Not_PER_Visible_3_encode_xer;
vlm7d576b32004-08-20 13:37:45 +00002094
vlm26afd202004-08-25 02:08:08 +00002095/*** <<< CTABLES [Not-PER-Visible-3] >>> ***/
2096
vlm67d57fe2005-03-06 09:29:03 +00002097static int check_permitted_alphabet_1(const void *sptr) {
vlm26afd202004-08-25 02:08:08 +00002098 /* The underlying type is IA5String */
vlmdb87f2e2005-02-15 03:40:07 +00002099 const IA5String_t *st = (const IA5String_t *)sptr;
vlm26afd202004-08-25 02:08:08 +00002100 const uint8_t *ch = st->buf;
2101 const uint8_t *end = ch + st->size;
2102
2103 for(; ch < end; ch++) {
2104 uint8_t cv = *ch;
2105 if(!(cv >= 65 && cv <= 66)) return -1;
2106 }
2107 return 0;
2108}
2109
2110
vlm7d576b32004-08-20 13:37:45 +00002111/*** <<< CODE [Not-PER-Visible-3] >>> ***/
2112
2113int
vlm02296432004-09-29 13:19:37 +00002114Not_PER_Visible_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +00002115 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlmdb87f2e2005-02-15 03:40:07 +00002116 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
vlm7d576b32004-08-20 13:37:45 +00002117
2118 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +00002119 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +00002120 "%s: value not given (%s:%d)",
2121 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +00002122 return -1;
2123 }
2124
2125
vlm67d57fe2005-03-06 09:29:03 +00002126 if(!check_permitted_alphabet_1(st)) {
vlm26afd202004-08-25 02:08:08 +00002127 /* Constraint check succeeded */
2128 return 0;
2129 } else {
vlmd4ae41c2006-07-13 13:28:32 +00002130 _ASN_CTFAIL(app_key, td, sptr,
vlm26afd202004-08-25 02:08:08 +00002131 "%s: constraint failed (%s:%d)",
2132 td->name, __FILE__, __LINE__);
2133 return -1;
vlm7d576b32004-08-20 13:37:45 +00002134 }
vlm7d576b32004-08-20 13:37:45 +00002135}
2136
2137/*
2138 * This type is implemented using PER_Visible,
vlmcb0b7fc2004-09-23 22:14:58 +00002139 * so here we adjust the DEF accordingly.
vlm7d576b32004-08-20 13:37:45 +00002140 */
2141static void
vlm67d57fe2005-03-06 09:29:03 +00002142Not_PER_Visible_3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlm02296432004-09-29 13:19:37 +00002143 td->free_struct = asn_DEF_PER_Visible.free_struct;
2144 td->print_struct = asn_DEF_PER_Visible.print_struct;
2145 td->ber_decoder = asn_DEF_PER_Visible.ber_decoder;
2146 td->der_encoder = asn_DEF_PER_Visible.der_encoder;
2147 td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
2148 td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00002149 td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
2150 if(!td->per_constraints)
2151 td->per_constraints = asn_DEF_PER_Visible.per_constraints;
vlm02296432004-09-29 13:19:37 +00002152 td->elements = asn_DEF_PER_Visible.elements;
2153 td->elements_count = asn_DEF_PER_Visible.elements_count;
2154 td->specifics = asn_DEF_PER_Visible.specifics;
vlm7d576b32004-08-20 13:37:45 +00002155}
2156
vlm39ba4c42004-09-22 16:06:28 +00002157void
vlm02296432004-09-29 13:19:37 +00002158Not_PER_Visible_3_free(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00002159 void *struct_ptr, int contents_only) {
vlm67d57fe2005-03-06 09:29:03 +00002160 Not_PER_Visible_3_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00002161 td->free_struct(td, struct_ptr, contents_only);
vlm7d576b32004-08-20 13:37:45 +00002162}
2163
2164int
vlm02296432004-09-29 13:19:37 +00002165Not_PER_Visible_3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
vlm7d576b32004-08-20 13:37:45 +00002166 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00002167 Not_PER_Visible_3_1_inherit_TYPE_descriptor(td);
vlm7d576b32004-08-20 13:37:45 +00002168 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2169}
2170
vlm9de248e2004-10-20 15:50:55 +00002171asn_dec_rval_t
vlm02296432004-09-29 13:19:37 +00002172Not_PER_Visible_3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00002173 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm67d57fe2005-03-06 09:29:03 +00002174 Not_PER_Visible_3_1_inherit_TYPE_descriptor(td);
vlm02296432004-09-29 13:19:37 +00002175 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
vlm39ba4c42004-09-22 16:06:28 +00002176}
2177
2178asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00002179Not_PER_Visible_3_encode_der(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00002180 void *structure, int tag_mode, ber_tlv_tag_t tag,
2181 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00002182 Not_PER_Visible_3_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00002183 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2184}
2185
vlma6af74c2004-10-23 13:26:56 +00002186asn_dec_rval_t
2187Not_PER_Visible_3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00002188 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm67d57fe2005-03-06 09:29:03 +00002189 Not_PER_Visible_3_1_inherit_TYPE_descriptor(td);
vlma6af74c2004-10-23 13:26:56 +00002190 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2191}
2192
vlm39ba4c42004-09-22 16:06:28 +00002193asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00002194Not_PER_Visible_3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
vlm39ba4c42004-09-22 16:06:28 +00002195 int ilevel, enum xer_encoder_flags_e flags,
2196 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00002197 Not_PER_Visible_3_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00002198 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
vlm7d576b32004-08-20 13:37:45 +00002199}
2200
2201
2202/*** <<< STAT-DEFS [Not-PER-Visible-3] >>> ***/
2203
vlm337167e2005-11-26 11:25:14 +00002204static ber_tlv_tag_t asn_DEF_Not_PER_Visible_3_tags_1[] = {
vlm1308d2b2004-09-10 15:49:15 +00002205 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
vlm7d576b32004-08-20 13:37:45 +00002206};
vlm02296432004-09-29 13:19:37 +00002207asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_3 = {
vlm7d576b32004-08-20 13:37:45 +00002208 "Not-PER-Visible-3",
vlm9de248e2004-10-20 15:50:55 +00002209 "Not-PER-Visible-3",
vlm39ba4c42004-09-22 16:06:28 +00002210 Not_PER_Visible_3_free,
2211 Not_PER_Visible_3_print,
vlm7d576b32004-08-20 13:37:45 +00002212 Not_PER_Visible_3_constraint,
2213 Not_PER_Visible_3_decode_ber,
2214 Not_PER_Visible_3_encode_der,
vlma6af74c2004-10-23 13:26:56 +00002215 Not_PER_Visible_3_decode_xer,
vlm39ba4c42004-09-22 16:06:28 +00002216 Not_PER_Visible_3_encode_xer,
vlm337167e2005-11-26 11:25:14 +00002217 0, /* No PER decoder, -gen-PER to enable */
vlm7d576b32004-08-20 13:37:45 +00002218 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00002219 asn_DEF_Not_PER_Visible_3_tags_1,
2220 sizeof(asn_DEF_Not_PER_Visible_3_tags_1)
2221 /sizeof(asn_DEF_Not_PER_Visible_3_tags_1[0]), /* 1 */
2222 asn_DEF_Not_PER_Visible_3_tags_1, /* Same as above */
2223 sizeof(asn_DEF_Not_PER_Visible_3_tags_1)
2224 /sizeof(asn_DEF_Not_PER_Visible_3_tags_1[0]), /* 1 */
2225 0, /* No PER visible constraints */
vlm7d576b32004-08-20 13:37:45 +00002226 0, 0, /* No members */
2227 0 /* No specifics */
2228};
2229
2230
2231/*** <<< INCLUDES [SIZE-but-not-FROM] >>> ***/
2232
2233#include <PER-Visible.h>
2234
2235/*** <<< TYPE-DECLS [SIZE-but-not-FROM] >>> ***/
2236
vlm7d576b32004-08-20 13:37:45 +00002237typedef PER_Visible_t SIZE_but_not_FROM_t;
2238
vlm7d576b32004-08-20 13:37:45 +00002239/*** <<< FUNC-DECLS [SIZE-but-not-FROM] >>> ***/
2240
vlm02296432004-09-29 13:19:37 +00002241extern asn_TYPE_descriptor_t asn_DEF_SIZE_but_not_FROM;
vlm39ba4c42004-09-22 16:06:28 +00002242asn_struct_free_f SIZE_but_not_FROM_free;
2243asn_struct_print_f SIZE_but_not_FROM_print;
vlm7d576b32004-08-20 13:37:45 +00002244asn_constr_check_f SIZE_but_not_FROM_constraint;
2245ber_type_decoder_f SIZE_but_not_FROM_decode_ber;
2246der_type_encoder_f SIZE_but_not_FROM_encode_der;
vlma6af74c2004-10-23 13:26:56 +00002247xer_type_decoder_f SIZE_but_not_FROM_decode_xer;
vlm39ba4c42004-09-22 16:06:28 +00002248xer_type_encoder_f SIZE_but_not_FROM_encode_xer;
vlm7d576b32004-08-20 13:37:45 +00002249
2250/*** <<< CTABLES [SIZE-but-not-FROM] >>> ***/
2251
vlm67d57fe2005-03-06 09:29:03 +00002252static int check_permitted_alphabet_1(const void *sptr) {
vlm7d576b32004-08-20 13:37:45 +00002253 /* The underlying type is IA5String */
vlmdb87f2e2005-02-15 03:40:07 +00002254 const IA5String_t *st = (const IA5String_t *)sptr;
vlmb08de152004-08-22 03:30:05 +00002255 const uint8_t *ch = st->buf;
2256 const uint8_t *end = ch + st->size;
vlm7d576b32004-08-20 13:37:45 +00002257
2258 for(; ch < end; ch++) {
2259 uint8_t cv = *ch;
vlm26afd202004-08-25 02:08:08 +00002260 if(!(cv >= 65 && cv <= 68)) return -1;
vlm7d576b32004-08-20 13:37:45 +00002261 }
vlmcdf661b2004-08-22 12:47:03 +00002262 return 0;
vlm7d576b32004-08-20 13:37:45 +00002263}
2264
2265
2266/*** <<< CODE [SIZE-but-not-FROM] >>> ***/
2267
2268int
vlm02296432004-09-29 13:19:37 +00002269SIZE_but_not_FROM_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +00002270 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlmdb87f2e2005-02-15 03:40:07 +00002271 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
vlm7d576b32004-08-20 13:37:45 +00002272 size_t size;
2273
2274 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +00002275 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +00002276 "%s: value not given (%s:%d)",
2277 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +00002278 return -1;
2279 }
2280
2281 size = st->size;
2282
2283 if((size >= 1 && size <= 4)
vlm67d57fe2005-03-06 09:29:03 +00002284 && !check_permitted_alphabet_1(st)) {
vlm7d576b32004-08-20 13:37:45 +00002285 /* Constraint check succeeded */
vlmcdf661b2004-08-22 12:47:03 +00002286 return 0;
vlm7d576b32004-08-20 13:37:45 +00002287 } else {
vlmd4ae41c2006-07-13 13:28:32 +00002288 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +00002289 "%s: constraint failed (%s:%d)",
2290 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +00002291 return -1;
2292 }
2293}
2294
2295/*
2296 * This type is implemented using PER_Visible,
vlmcb0b7fc2004-09-23 22:14:58 +00002297 * so here we adjust the DEF accordingly.
vlm7d576b32004-08-20 13:37:45 +00002298 */
2299static void
vlm67d57fe2005-03-06 09:29:03 +00002300SIZE_but_not_FROM_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlm02296432004-09-29 13:19:37 +00002301 td->free_struct = asn_DEF_PER_Visible.free_struct;
2302 td->print_struct = asn_DEF_PER_Visible.print_struct;
2303 td->ber_decoder = asn_DEF_PER_Visible.ber_decoder;
2304 td->der_encoder = asn_DEF_PER_Visible.der_encoder;
2305 td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
2306 td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00002307 td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
2308 if(!td->per_constraints)
2309 td->per_constraints = asn_DEF_PER_Visible.per_constraints;
vlm02296432004-09-29 13:19:37 +00002310 td->elements = asn_DEF_PER_Visible.elements;
2311 td->elements_count = asn_DEF_PER_Visible.elements_count;
2312 td->specifics = asn_DEF_PER_Visible.specifics;
vlm7d576b32004-08-20 13:37:45 +00002313}
2314
vlm39ba4c42004-09-22 16:06:28 +00002315void
vlm02296432004-09-29 13:19:37 +00002316SIZE_but_not_FROM_free(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00002317 void *struct_ptr, int contents_only) {
vlm67d57fe2005-03-06 09:29:03 +00002318 SIZE_but_not_FROM_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00002319 td->free_struct(td, struct_ptr, contents_only);
vlm7d576b32004-08-20 13:37:45 +00002320}
2321
2322int
vlm02296432004-09-29 13:19:37 +00002323SIZE_but_not_FROM_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
vlm7d576b32004-08-20 13:37:45 +00002324 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00002325 SIZE_but_not_FROM_1_inherit_TYPE_descriptor(td);
vlm7d576b32004-08-20 13:37:45 +00002326 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2327}
2328
vlm9de248e2004-10-20 15:50:55 +00002329asn_dec_rval_t
vlm02296432004-09-29 13:19:37 +00002330SIZE_but_not_FROM_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00002331 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm67d57fe2005-03-06 09:29:03 +00002332 SIZE_but_not_FROM_1_inherit_TYPE_descriptor(td);
vlm02296432004-09-29 13:19:37 +00002333 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
vlm39ba4c42004-09-22 16:06:28 +00002334}
2335
2336asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00002337SIZE_but_not_FROM_encode_der(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00002338 void *structure, int tag_mode, ber_tlv_tag_t tag,
2339 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00002340 SIZE_but_not_FROM_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00002341 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2342}
2343
vlma6af74c2004-10-23 13:26:56 +00002344asn_dec_rval_t
2345SIZE_but_not_FROM_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00002346 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm67d57fe2005-03-06 09:29:03 +00002347 SIZE_but_not_FROM_1_inherit_TYPE_descriptor(td);
vlma6af74c2004-10-23 13:26:56 +00002348 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2349}
2350
vlm39ba4c42004-09-22 16:06:28 +00002351asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00002352SIZE_but_not_FROM_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
vlm39ba4c42004-09-22 16:06:28 +00002353 int ilevel, enum xer_encoder_flags_e flags,
2354 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00002355 SIZE_but_not_FROM_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00002356 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
vlm7d576b32004-08-20 13:37:45 +00002357}
2358
2359
2360/*** <<< STAT-DEFS [SIZE-but-not-FROM] >>> ***/
2361
vlm337167e2005-11-26 11:25:14 +00002362static ber_tlv_tag_t asn_DEF_SIZE_but_not_FROM_tags_1[] = {
vlm1308d2b2004-09-10 15:49:15 +00002363 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
vlm7d576b32004-08-20 13:37:45 +00002364};
vlm02296432004-09-29 13:19:37 +00002365asn_TYPE_descriptor_t asn_DEF_SIZE_but_not_FROM = {
vlm7d576b32004-08-20 13:37:45 +00002366 "SIZE-but-not-FROM",
vlm9de248e2004-10-20 15:50:55 +00002367 "SIZE-but-not-FROM",
vlm39ba4c42004-09-22 16:06:28 +00002368 SIZE_but_not_FROM_free,
2369 SIZE_but_not_FROM_print,
vlm7d576b32004-08-20 13:37:45 +00002370 SIZE_but_not_FROM_constraint,
2371 SIZE_but_not_FROM_decode_ber,
2372 SIZE_but_not_FROM_encode_der,
vlma6af74c2004-10-23 13:26:56 +00002373 SIZE_but_not_FROM_decode_xer,
vlm39ba4c42004-09-22 16:06:28 +00002374 SIZE_but_not_FROM_encode_xer,
vlm337167e2005-11-26 11:25:14 +00002375 0, /* No PER decoder, -gen-PER to enable */
vlm7d576b32004-08-20 13:37:45 +00002376 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00002377 asn_DEF_SIZE_but_not_FROM_tags_1,
2378 sizeof(asn_DEF_SIZE_but_not_FROM_tags_1)
2379 /sizeof(asn_DEF_SIZE_but_not_FROM_tags_1[0]), /* 1 */
2380 asn_DEF_SIZE_but_not_FROM_tags_1, /* Same as above */
2381 sizeof(asn_DEF_SIZE_but_not_FROM_tags_1)
2382 /sizeof(asn_DEF_SIZE_but_not_FROM_tags_1[0]), /* 1 */
2383 0, /* No PER visible constraints */
vlm7d576b32004-08-20 13:37:45 +00002384 0, 0, /* No members */
2385 0 /* No specifics */
2386};
2387
2388
2389/*** <<< INCLUDES [SIZE-and-FROM] >>> ***/
2390
2391#include <PER-Visible.h>
2392
2393/*** <<< TYPE-DECLS [SIZE-and-FROM] >>> ***/
2394
vlm7d576b32004-08-20 13:37:45 +00002395typedef PER_Visible_t SIZE_and_FROM_t;
2396
vlm7d576b32004-08-20 13:37:45 +00002397/*** <<< FUNC-DECLS [SIZE-and-FROM] >>> ***/
2398
vlm02296432004-09-29 13:19:37 +00002399extern asn_TYPE_descriptor_t asn_DEF_SIZE_and_FROM;
vlm39ba4c42004-09-22 16:06:28 +00002400asn_struct_free_f SIZE_and_FROM_free;
2401asn_struct_print_f SIZE_and_FROM_print;
vlm7d576b32004-08-20 13:37:45 +00002402asn_constr_check_f SIZE_and_FROM_constraint;
2403ber_type_decoder_f SIZE_and_FROM_decode_ber;
2404der_type_encoder_f SIZE_and_FROM_encode_der;
vlma6af74c2004-10-23 13:26:56 +00002405xer_type_decoder_f SIZE_and_FROM_decode_xer;
vlm39ba4c42004-09-22 16:06:28 +00002406xer_type_encoder_f SIZE_and_FROM_encode_xer;
vlm7d576b32004-08-20 13:37:45 +00002407
2408/*** <<< CTABLES [SIZE-and-FROM] >>> ***/
2409
vlm67d57fe2005-03-06 09:29:03 +00002410static int check_permitted_alphabet_1(const void *sptr) {
vlm7d576b32004-08-20 13:37:45 +00002411 /* The underlying type is IA5String */
vlmdb87f2e2005-02-15 03:40:07 +00002412 const IA5String_t *st = (const IA5String_t *)sptr;
vlmb08de152004-08-22 03:30:05 +00002413 const uint8_t *ch = st->buf;
2414 const uint8_t *end = ch + st->size;
vlm7d576b32004-08-20 13:37:45 +00002415
2416 for(; ch < end; ch++) {
2417 uint8_t cv = *ch;
vlmcdf661b2004-08-22 12:47:03 +00002418 if(!(cv >= 65 && cv <= 68)) return -1;
vlm7d576b32004-08-20 13:37:45 +00002419 }
vlmcdf661b2004-08-22 12:47:03 +00002420 return 0;
vlm7d576b32004-08-20 13:37:45 +00002421}
2422
2423
2424/*** <<< CODE [SIZE-and-FROM] >>> ***/
2425
2426int
vlm02296432004-09-29 13:19:37 +00002427SIZE_and_FROM_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +00002428 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlmdb87f2e2005-02-15 03:40:07 +00002429 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
vlm7d576b32004-08-20 13:37:45 +00002430 size_t size;
2431
2432 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +00002433 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +00002434 "%s: value not given (%s:%d)",
2435 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +00002436 return -1;
2437 }
2438
2439 size = st->size;
2440
2441 if((size >= 1 && size <= 4)
vlm67d57fe2005-03-06 09:29:03 +00002442 && !check_permitted_alphabet_1(st)) {
vlm7d576b32004-08-20 13:37:45 +00002443 /* Constraint check succeeded */
vlmcdf661b2004-08-22 12:47:03 +00002444 return 0;
vlm7d576b32004-08-20 13:37:45 +00002445 } else {
vlmd4ae41c2006-07-13 13:28:32 +00002446 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +00002447 "%s: constraint failed (%s:%d)",
2448 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +00002449 return -1;
2450 }
2451}
2452
2453/*
2454 * This type is implemented using PER_Visible,
vlmcb0b7fc2004-09-23 22:14:58 +00002455 * so here we adjust the DEF accordingly.
vlm7d576b32004-08-20 13:37:45 +00002456 */
2457static void
vlm67d57fe2005-03-06 09:29:03 +00002458SIZE_and_FROM_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlm02296432004-09-29 13:19:37 +00002459 td->free_struct = asn_DEF_PER_Visible.free_struct;
2460 td->print_struct = asn_DEF_PER_Visible.print_struct;
2461 td->ber_decoder = asn_DEF_PER_Visible.ber_decoder;
2462 td->der_encoder = asn_DEF_PER_Visible.der_encoder;
2463 td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
2464 td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00002465 td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
2466 if(!td->per_constraints)
2467 td->per_constraints = asn_DEF_PER_Visible.per_constraints;
vlm02296432004-09-29 13:19:37 +00002468 td->elements = asn_DEF_PER_Visible.elements;
2469 td->elements_count = asn_DEF_PER_Visible.elements_count;
2470 td->specifics = asn_DEF_PER_Visible.specifics;
vlm7d576b32004-08-20 13:37:45 +00002471}
2472
vlm39ba4c42004-09-22 16:06:28 +00002473void
vlm02296432004-09-29 13:19:37 +00002474SIZE_and_FROM_free(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00002475 void *struct_ptr, int contents_only) {
vlm67d57fe2005-03-06 09:29:03 +00002476 SIZE_and_FROM_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00002477 td->free_struct(td, struct_ptr, contents_only);
vlm7d576b32004-08-20 13:37:45 +00002478}
2479
2480int
vlm02296432004-09-29 13:19:37 +00002481SIZE_and_FROM_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
vlm7d576b32004-08-20 13:37:45 +00002482 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00002483 SIZE_and_FROM_1_inherit_TYPE_descriptor(td);
vlm7d576b32004-08-20 13:37:45 +00002484 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2485}
2486
vlm9de248e2004-10-20 15:50:55 +00002487asn_dec_rval_t
vlm02296432004-09-29 13:19:37 +00002488SIZE_and_FROM_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00002489 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm67d57fe2005-03-06 09:29:03 +00002490 SIZE_and_FROM_1_inherit_TYPE_descriptor(td);
vlm02296432004-09-29 13:19:37 +00002491 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
vlm39ba4c42004-09-22 16:06:28 +00002492}
2493
2494asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00002495SIZE_and_FROM_encode_der(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00002496 void *structure, int tag_mode, ber_tlv_tag_t tag,
2497 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00002498 SIZE_and_FROM_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00002499 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2500}
2501
vlma6af74c2004-10-23 13:26:56 +00002502asn_dec_rval_t
2503SIZE_and_FROM_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00002504 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm67d57fe2005-03-06 09:29:03 +00002505 SIZE_and_FROM_1_inherit_TYPE_descriptor(td);
vlma6af74c2004-10-23 13:26:56 +00002506 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2507}
2508
vlm39ba4c42004-09-22 16:06:28 +00002509asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00002510SIZE_and_FROM_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
vlm39ba4c42004-09-22 16:06:28 +00002511 int ilevel, enum xer_encoder_flags_e flags,
2512 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00002513 SIZE_and_FROM_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00002514 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
vlm7d576b32004-08-20 13:37:45 +00002515}
2516
2517
2518/*** <<< STAT-DEFS [SIZE-and-FROM] >>> ***/
2519
vlm337167e2005-11-26 11:25:14 +00002520static ber_tlv_tag_t asn_DEF_SIZE_and_FROM_tags_1[] = {
vlm1308d2b2004-09-10 15:49:15 +00002521 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
vlm7d576b32004-08-20 13:37:45 +00002522};
vlm02296432004-09-29 13:19:37 +00002523asn_TYPE_descriptor_t asn_DEF_SIZE_and_FROM = {
vlm7d576b32004-08-20 13:37:45 +00002524 "SIZE-and-FROM",
vlm9de248e2004-10-20 15:50:55 +00002525 "SIZE-and-FROM",
vlm39ba4c42004-09-22 16:06:28 +00002526 SIZE_and_FROM_free,
2527 SIZE_and_FROM_print,
vlm7d576b32004-08-20 13:37:45 +00002528 SIZE_and_FROM_constraint,
2529 SIZE_and_FROM_decode_ber,
2530 SIZE_and_FROM_encode_der,
vlma6af74c2004-10-23 13:26:56 +00002531 SIZE_and_FROM_decode_xer,
vlm39ba4c42004-09-22 16:06:28 +00002532 SIZE_and_FROM_encode_xer,
vlm337167e2005-11-26 11:25:14 +00002533 0, /* No PER decoder, -gen-PER to enable */
vlm7d576b32004-08-20 13:37:45 +00002534 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00002535 asn_DEF_SIZE_and_FROM_tags_1,
2536 sizeof(asn_DEF_SIZE_and_FROM_tags_1)
2537 /sizeof(asn_DEF_SIZE_and_FROM_tags_1[0]), /* 1 */
2538 asn_DEF_SIZE_and_FROM_tags_1, /* Same as above */
2539 sizeof(asn_DEF_SIZE_and_FROM_tags_1)
2540 /sizeof(asn_DEF_SIZE_and_FROM_tags_1[0]), /* 1 */
2541 0, /* No PER visible constraints */
vlm7d576b32004-08-20 13:37:45 +00002542 0, 0, /* No members */
2543 0 /* No specifics */
2544};
2545
2546
2547/*** <<< INCLUDES [Neither-SIZE-nor-FROM] >>> ***/
2548
2549#include <PER-Visible.h>
2550
2551/*** <<< TYPE-DECLS [Neither-SIZE-nor-FROM] >>> ***/
2552
vlm7d576b32004-08-20 13:37:45 +00002553typedef PER_Visible_t Neither_SIZE_nor_FROM_t;
2554
vlm7d576b32004-08-20 13:37:45 +00002555/*** <<< FUNC-DECLS [Neither-SIZE-nor-FROM] >>> ***/
2556
vlm02296432004-09-29 13:19:37 +00002557extern asn_TYPE_descriptor_t asn_DEF_Neither_SIZE_nor_FROM;
vlm39ba4c42004-09-22 16:06:28 +00002558asn_struct_free_f Neither_SIZE_nor_FROM_free;
2559asn_struct_print_f Neither_SIZE_nor_FROM_print;
vlm7d576b32004-08-20 13:37:45 +00002560asn_constr_check_f Neither_SIZE_nor_FROM_constraint;
2561ber_type_decoder_f Neither_SIZE_nor_FROM_decode_ber;
2562der_type_encoder_f Neither_SIZE_nor_FROM_encode_der;
vlma6af74c2004-10-23 13:26:56 +00002563xer_type_decoder_f Neither_SIZE_nor_FROM_decode_xer;
vlm39ba4c42004-09-22 16:06:28 +00002564xer_type_encoder_f Neither_SIZE_nor_FROM_encode_xer;
vlm7d576b32004-08-20 13:37:45 +00002565
2566/*** <<< CTABLES [Neither-SIZE-nor-FROM] >>> ***/
2567
vlm67d57fe2005-03-06 09:29:03 +00002568static int check_permitted_alphabet_1(const void *sptr) {
vlm7d576b32004-08-20 13:37:45 +00002569 /* The underlying type is IA5String */
vlmdb87f2e2005-02-15 03:40:07 +00002570 const IA5String_t *st = (const IA5String_t *)sptr;
vlmb08de152004-08-22 03:30:05 +00002571 const uint8_t *ch = st->buf;
2572 const uint8_t *end = ch + st->size;
vlm7d576b32004-08-20 13:37:45 +00002573
2574 for(; ch < end; ch++) {
2575 uint8_t cv = *ch;
vlmcdf661b2004-08-22 12:47:03 +00002576 if(!(cv >= 65 && cv <= 70)) return -1;
vlm7d576b32004-08-20 13:37:45 +00002577 }
vlmcdf661b2004-08-22 12:47:03 +00002578 return 0;
vlm7d576b32004-08-20 13:37:45 +00002579}
2580
2581
2582/*** <<< CODE [Neither-SIZE-nor-FROM] >>> ***/
2583
2584int
vlm02296432004-09-29 13:19:37 +00002585Neither_SIZE_nor_FROM_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +00002586 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlmdb87f2e2005-02-15 03:40:07 +00002587 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
vlm7d576b32004-08-20 13:37:45 +00002588
2589 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +00002590 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +00002591 "%s: value not given (%s:%d)",
2592 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +00002593 return -1;
2594 }
2595
2596
vlm67d57fe2005-03-06 09:29:03 +00002597 if(!check_permitted_alphabet_1(st)) {
vlm7d576b32004-08-20 13:37:45 +00002598 /* Constraint check succeeded */
vlmcdf661b2004-08-22 12:47:03 +00002599 return 0;
vlm7d576b32004-08-20 13:37:45 +00002600 } else {
vlmd4ae41c2006-07-13 13:28:32 +00002601 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +00002602 "%s: constraint failed (%s:%d)",
2603 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +00002604 return -1;
2605 }
2606}
2607
2608/*
2609 * This type is implemented using PER_Visible,
vlmcb0b7fc2004-09-23 22:14:58 +00002610 * so here we adjust the DEF accordingly.
vlm7d576b32004-08-20 13:37:45 +00002611 */
2612static void
vlm67d57fe2005-03-06 09:29:03 +00002613Neither_SIZE_nor_FROM_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlm02296432004-09-29 13:19:37 +00002614 td->free_struct = asn_DEF_PER_Visible.free_struct;
2615 td->print_struct = asn_DEF_PER_Visible.print_struct;
2616 td->ber_decoder = asn_DEF_PER_Visible.ber_decoder;
2617 td->der_encoder = asn_DEF_PER_Visible.der_encoder;
2618 td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
2619 td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00002620 td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
2621 if(!td->per_constraints)
2622 td->per_constraints = asn_DEF_PER_Visible.per_constraints;
vlm02296432004-09-29 13:19:37 +00002623 td->elements = asn_DEF_PER_Visible.elements;
2624 td->elements_count = asn_DEF_PER_Visible.elements_count;
2625 td->specifics = asn_DEF_PER_Visible.specifics;
vlm7d576b32004-08-20 13:37:45 +00002626}
2627
vlm39ba4c42004-09-22 16:06:28 +00002628void
vlm02296432004-09-29 13:19:37 +00002629Neither_SIZE_nor_FROM_free(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00002630 void *struct_ptr, int contents_only) {
vlm67d57fe2005-03-06 09:29:03 +00002631 Neither_SIZE_nor_FROM_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00002632 td->free_struct(td, struct_ptr, contents_only);
vlm7d576b32004-08-20 13:37:45 +00002633}
2634
2635int
vlm02296432004-09-29 13:19:37 +00002636Neither_SIZE_nor_FROM_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
vlm7d576b32004-08-20 13:37:45 +00002637 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00002638 Neither_SIZE_nor_FROM_1_inherit_TYPE_descriptor(td);
vlm7d576b32004-08-20 13:37:45 +00002639 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2640}
2641
vlm9de248e2004-10-20 15:50:55 +00002642asn_dec_rval_t
vlm02296432004-09-29 13:19:37 +00002643Neither_SIZE_nor_FROM_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00002644 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm67d57fe2005-03-06 09:29:03 +00002645 Neither_SIZE_nor_FROM_1_inherit_TYPE_descriptor(td);
vlm02296432004-09-29 13:19:37 +00002646 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
vlm39ba4c42004-09-22 16:06:28 +00002647}
2648
2649asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00002650Neither_SIZE_nor_FROM_encode_der(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00002651 void *structure, int tag_mode, ber_tlv_tag_t tag,
2652 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00002653 Neither_SIZE_nor_FROM_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00002654 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2655}
2656
vlma6af74c2004-10-23 13:26:56 +00002657asn_dec_rval_t
2658Neither_SIZE_nor_FROM_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00002659 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm67d57fe2005-03-06 09:29:03 +00002660 Neither_SIZE_nor_FROM_1_inherit_TYPE_descriptor(td);
vlma6af74c2004-10-23 13:26:56 +00002661 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2662}
2663
vlm39ba4c42004-09-22 16:06:28 +00002664asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00002665Neither_SIZE_nor_FROM_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
vlm39ba4c42004-09-22 16:06:28 +00002666 int ilevel, enum xer_encoder_flags_e flags,
2667 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00002668 Neither_SIZE_nor_FROM_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00002669 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
vlm7d576b32004-08-20 13:37:45 +00002670}
2671
2672
2673/*** <<< STAT-DEFS [Neither-SIZE-nor-FROM] >>> ***/
2674
vlm337167e2005-11-26 11:25:14 +00002675static ber_tlv_tag_t asn_DEF_Neither_SIZE_nor_FROM_tags_1[] = {
vlm1308d2b2004-09-10 15:49:15 +00002676 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
vlm7d576b32004-08-20 13:37:45 +00002677};
vlm02296432004-09-29 13:19:37 +00002678asn_TYPE_descriptor_t asn_DEF_Neither_SIZE_nor_FROM = {
vlm7d576b32004-08-20 13:37:45 +00002679 "Neither-SIZE-nor-FROM",
vlm9de248e2004-10-20 15:50:55 +00002680 "Neither-SIZE-nor-FROM",
vlm39ba4c42004-09-22 16:06:28 +00002681 Neither_SIZE_nor_FROM_free,
2682 Neither_SIZE_nor_FROM_print,
vlm7d576b32004-08-20 13:37:45 +00002683 Neither_SIZE_nor_FROM_constraint,
2684 Neither_SIZE_nor_FROM_decode_ber,
2685 Neither_SIZE_nor_FROM_encode_der,
vlma6af74c2004-10-23 13:26:56 +00002686 Neither_SIZE_nor_FROM_decode_xer,
vlm39ba4c42004-09-22 16:06:28 +00002687 Neither_SIZE_nor_FROM_encode_xer,
vlm337167e2005-11-26 11:25:14 +00002688 0, /* No PER decoder, -gen-PER to enable */
vlm7d576b32004-08-20 13:37:45 +00002689 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00002690 asn_DEF_Neither_SIZE_nor_FROM_tags_1,
2691 sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1)
2692 /sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1[0]), /* 1 */
2693 asn_DEF_Neither_SIZE_nor_FROM_tags_1, /* Same as above */
2694 sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1)
2695 /sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1[0]), /* 1 */
2696 0, /* No PER visible constraints */
vlm7d576b32004-08-20 13:37:45 +00002697 0, 0, /* No members */
2698 0 /* No specifics */
2699};
2700
2701
vlmce0d4ad2004-10-03 09:14:32 +00002702/*** <<< INCLUDES [Utf8-4] >>> ***/
2703
2704#include <UTF8String.h>
2705
2706/*** <<< TYPE-DECLS [Utf8-4] >>> ***/
2707
vlmce0d4ad2004-10-03 09:14:32 +00002708typedef UTF8String_t Utf8_4_t;
2709
2710/*** <<< FUNC-DECLS [Utf8-4] >>> ***/
2711
2712extern asn_TYPE_descriptor_t asn_DEF_Utf8_4;
2713asn_struct_free_f Utf8_4_free;
2714asn_struct_print_f Utf8_4_print;
2715asn_constr_check_f Utf8_4_constraint;
2716ber_type_decoder_f Utf8_4_decode_ber;
2717der_type_encoder_f Utf8_4_encode_der;
vlma6af74c2004-10-23 13:26:56 +00002718xer_type_decoder_f Utf8_4_decode_xer;
vlmce0d4ad2004-10-03 09:14:32 +00002719xer_type_encoder_f Utf8_4_encode_xer;
2720
2721/*** <<< CTABLES [Utf8-4] >>> ***/
2722
vlm67d57fe2005-03-06 09:29:03 +00002723static int check_permitted_alphabet_1(const void *sptr) {
vlmce0d4ad2004-10-03 09:14:32 +00002724 if(UTF8String_length((const UTF8String_t *)sptr) < 0)
2725 return -1; /* Alphabet (sic!) test failed. */
2726
2727 return 0;
2728}
2729
2730
2731/*** <<< CODE [Utf8-4] >>> ***/
2732
2733int
2734Utf8_4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +00002735 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlmdb87f2e2005-02-15 03:40:07 +00002736 const UTF8String_t *st = (const UTF8String_t *)sptr;
vlmce0d4ad2004-10-03 09:14:32 +00002737
2738 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +00002739 _ASN_CTFAIL(app_key, td, sptr,
vlmce0d4ad2004-10-03 09:14:32 +00002740 "%s: value not given (%s:%d)",
2741 td->name, __FILE__, __LINE__);
2742 return -1;
2743 }
2744
2745
vlm67d57fe2005-03-06 09:29:03 +00002746 if(!check_permitted_alphabet_1(st)) {
vlmce0d4ad2004-10-03 09:14:32 +00002747 /* Constraint check succeeded */
2748 return 0;
2749 } else {
vlmd4ae41c2006-07-13 13:28:32 +00002750 _ASN_CTFAIL(app_key, td, sptr,
vlmce0d4ad2004-10-03 09:14:32 +00002751 "%s: constraint failed (%s:%d)",
2752 td->name, __FILE__, __LINE__);
2753 return -1;
2754 }
2755}
2756
2757/*
2758 * This type is implemented using UTF8String,
2759 * so here we adjust the DEF accordingly.
2760 */
2761static void
vlm67d57fe2005-03-06 09:29:03 +00002762Utf8_4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlmce0d4ad2004-10-03 09:14:32 +00002763 td->free_struct = asn_DEF_UTF8String.free_struct;
2764 td->print_struct = asn_DEF_UTF8String.print_struct;
2765 td->ber_decoder = asn_DEF_UTF8String.ber_decoder;
2766 td->der_encoder = asn_DEF_UTF8String.der_encoder;
2767 td->xer_decoder = asn_DEF_UTF8String.xer_decoder;
2768 td->xer_encoder = asn_DEF_UTF8String.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00002769 td->uper_decoder = asn_DEF_UTF8String.uper_decoder;
2770 if(!td->per_constraints)
2771 td->per_constraints = asn_DEF_UTF8String.per_constraints;
vlmce0d4ad2004-10-03 09:14:32 +00002772 td->elements = asn_DEF_UTF8String.elements;
2773 td->elements_count = asn_DEF_UTF8String.elements_count;
2774 td->specifics = asn_DEF_UTF8String.specifics;
2775}
2776
2777void
2778Utf8_4_free(asn_TYPE_descriptor_t *td,
2779 void *struct_ptr, int contents_only) {
vlm67d57fe2005-03-06 09:29:03 +00002780 Utf8_4_1_inherit_TYPE_descriptor(td);
vlmce0d4ad2004-10-03 09:14:32 +00002781 td->free_struct(td, struct_ptr, contents_only);
2782}
2783
2784int
2785Utf8_4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2786 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00002787 Utf8_4_1_inherit_TYPE_descriptor(td);
vlmce0d4ad2004-10-03 09:14:32 +00002788 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2789}
2790
vlm9de248e2004-10-20 15:50:55 +00002791asn_dec_rval_t
vlmce0d4ad2004-10-03 09:14:32 +00002792Utf8_4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00002793 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm67d57fe2005-03-06 09:29:03 +00002794 Utf8_4_1_inherit_TYPE_descriptor(td);
vlmce0d4ad2004-10-03 09:14:32 +00002795 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2796}
2797
2798asn_enc_rval_t
2799Utf8_4_encode_der(asn_TYPE_descriptor_t *td,
2800 void *structure, int tag_mode, ber_tlv_tag_t tag,
2801 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00002802 Utf8_4_1_inherit_TYPE_descriptor(td);
vlmce0d4ad2004-10-03 09:14:32 +00002803 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2804}
2805
vlma6af74c2004-10-23 13:26:56 +00002806asn_dec_rval_t
2807Utf8_4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00002808 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm67d57fe2005-03-06 09:29:03 +00002809 Utf8_4_1_inherit_TYPE_descriptor(td);
vlma6af74c2004-10-23 13:26:56 +00002810 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2811}
2812
vlmce0d4ad2004-10-03 09:14:32 +00002813asn_enc_rval_t
2814Utf8_4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2815 int ilevel, enum xer_encoder_flags_e flags,
2816 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00002817 Utf8_4_1_inherit_TYPE_descriptor(td);
vlmce0d4ad2004-10-03 09:14:32 +00002818 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2819}
2820
2821
2822/*** <<< STAT-DEFS [Utf8-4] >>> ***/
2823
vlm337167e2005-11-26 11:25:14 +00002824static ber_tlv_tag_t asn_DEF_Utf8_4_tags_1[] = {
vlmce0d4ad2004-10-03 09:14:32 +00002825 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
2826};
2827asn_TYPE_descriptor_t asn_DEF_Utf8_4 = {
2828 "Utf8-4",
vlm9de248e2004-10-20 15:50:55 +00002829 "Utf8-4",
vlmce0d4ad2004-10-03 09:14:32 +00002830 Utf8_4_free,
2831 Utf8_4_print,
2832 Utf8_4_constraint,
2833 Utf8_4_decode_ber,
2834 Utf8_4_encode_der,
vlma6af74c2004-10-23 13:26:56 +00002835 Utf8_4_decode_xer,
vlmce0d4ad2004-10-03 09:14:32 +00002836 Utf8_4_encode_xer,
vlm337167e2005-11-26 11:25:14 +00002837 0, /* No PER decoder, -gen-PER to enable */
vlmce0d4ad2004-10-03 09:14:32 +00002838 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00002839 asn_DEF_Utf8_4_tags_1,
2840 sizeof(asn_DEF_Utf8_4_tags_1)
2841 /sizeof(asn_DEF_Utf8_4_tags_1[0]), /* 1 */
2842 asn_DEF_Utf8_4_tags_1, /* Same as above */
2843 sizeof(asn_DEF_Utf8_4_tags_1)
2844 /sizeof(asn_DEF_Utf8_4_tags_1[0]), /* 1 */
2845 0, /* No PER visible constraints */
vlmce0d4ad2004-10-03 09:14:32 +00002846 0, 0, /* No members */
2847 0 /* No specifics */
2848};
2849
2850
vlm7d576b32004-08-20 13:37:45 +00002851/*** <<< INCLUDES [Utf8-3] >>> ***/
2852
2853#include <Utf8-2.h>
2854
2855/*** <<< TYPE-DECLS [Utf8-3] >>> ***/
2856
vlm7d576b32004-08-20 13:37:45 +00002857typedef Utf8_2_t Utf8_3_t;
2858
vlm7d576b32004-08-20 13:37:45 +00002859/*** <<< FUNC-DECLS [Utf8-3] >>> ***/
2860
vlm02296432004-09-29 13:19:37 +00002861extern asn_TYPE_descriptor_t asn_DEF_Utf8_3;
vlm39ba4c42004-09-22 16:06:28 +00002862asn_struct_free_f Utf8_3_free;
2863asn_struct_print_f Utf8_3_print;
vlm7d576b32004-08-20 13:37:45 +00002864asn_constr_check_f Utf8_3_constraint;
2865ber_type_decoder_f Utf8_3_decode_ber;
2866der_type_encoder_f Utf8_3_encode_der;
vlma6af74c2004-10-23 13:26:56 +00002867xer_type_decoder_f Utf8_3_decode_xer;
vlm39ba4c42004-09-22 16:06:28 +00002868xer_type_encoder_f Utf8_3_encode_xer;
vlm7d576b32004-08-20 13:37:45 +00002869
2870/*** <<< CTABLES [Utf8-3] >>> ***/
2871
vlm67d57fe2005-03-06 09:29:03 +00002872static int permitted_alphabet_table_1[128] = {
vlm7d576b32004-08-20 13:37:45 +000028730,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
28740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
28750,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
28760,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
28770,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ABCDEFGHIJKLMNO */
28781,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, /* PQRSTUVWXYZ */
28790,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* abcdefghijklmno */
28801,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, /* pqrstuvwxyz */
2881};
2882
vlm67d57fe2005-03-06 09:29:03 +00002883static int check_permitted_alphabet_1(const void *sptr) {
2884 int *table = permitted_alphabet_table_1;
vlm7d576b32004-08-20 13:37:45 +00002885 /* The underlying type is UTF8String */
vlmdb87f2e2005-02-15 03:40:07 +00002886 const UTF8String_t *st = (const UTF8String_t *)sptr;
vlmb08de152004-08-22 03:30:05 +00002887 const uint8_t *ch = st->buf;
2888 const uint8_t *end = ch + st->size;
vlm7d576b32004-08-20 13:37:45 +00002889
2890 for(; ch < end; ch++) {
2891 uint8_t cv = *ch;
vlmcdf661b2004-08-22 12:47:03 +00002892 if(cv >= 0x80) return -1;
2893 if(!table[cv]) return -1;
vlm7d576b32004-08-20 13:37:45 +00002894 }
vlmcdf661b2004-08-22 12:47:03 +00002895 return 0;
vlm7d576b32004-08-20 13:37:45 +00002896}
2897
2898
2899/*** <<< CODE [Utf8-3] >>> ***/
2900
2901int
vlm02296432004-09-29 13:19:37 +00002902Utf8_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +00002903 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlmdb87f2e2005-02-15 03:40:07 +00002904 const Utf8_2_t *st = (const Utf8_2_t *)sptr;
vlm7d576b32004-08-20 13:37:45 +00002905 size_t size;
2906
2907 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +00002908 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +00002909 "%s: value not given (%s:%d)",
2910 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +00002911 return -1;
2912 }
2913
vlme4506a32004-10-02 16:33:46 +00002914 size = UTF8String_length(st);
vlm1ba42752004-10-02 16:44:30 +00002915 if((ssize_t)size < 0) {
vlmd4ae41c2006-07-13 13:28:32 +00002916 _ASN_CTFAIL(app_key, td, sptr,
vlme4506a32004-10-02 16:33:46 +00002917 "%s: UTF-8: broken encoding (%s:%d)",
2918 td->name, __FILE__, __LINE__);
2919 return -1;
2920 }
vlm7d576b32004-08-20 13:37:45 +00002921
2922 if((size >= 1 && size <= 2)
vlm67d57fe2005-03-06 09:29:03 +00002923 && !check_permitted_alphabet_1(st)) {
vlm7d576b32004-08-20 13:37:45 +00002924 /* Constraint check succeeded */
vlmcdf661b2004-08-22 12:47:03 +00002925 return 0;
vlm7d576b32004-08-20 13:37:45 +00002926 } else {
vlmd4ae41c2006-07-13 13:28:32 +00002927 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +00002928 "%s: constraint failed (%s:%d)",
2929 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +00002930 return -1;
2931 }
2932}
2933
2934/*
2935 * This type is implemented using Utf8_2,
vlmcb0b7fc2004-09-23 22:14:58 +00002936 * so here we adjust the DEF accordingly.
vlm7d576b32004-08-20 13:37:45 +00002937 */
2938static void
vlm67d57fe2005-03-06 09:29:03 +00002939Utf8_3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlm02296432004-09-29 13:19:37 +00002940 td->free_struct = asn_DEF_Utf8_2.free_struct;
2941 td->print_struct = asn_DEF_Utf8_2.print_struct;
2942 td->ber_decoder = asn_DEF_Utf8_2.ber_decoder;
2943 td->der_encoder = asn_DEF_Utf8_2.der_encoder;
2944 td->xer_decoder = asn_DEF_Utf8_2.xer_decoder;
2945 td->xer_encoder = asn_DEF_Utf8_2.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00002946 td->uper_decoder = asn_DEF_Utf8_2.uper_decoder;
2947 if(!td->per_constraints)
2948 td->per_constraints = asn_DEF_Utf8_2.per_constraints;
vlm02296432004-09-29 13:19:37 +00002949 td->elements = asn_DEF_Utf8_2.elements;
2950 td->elements_count = asn_DEF_Utf8_2.elements_count;
2951 td->specifics = asn_DEF_Utf8_2.specifics;
vlm7d576b32004-08-20 13:37:45 +00002952}
2953
vlm39ba4c42004-09-22 16:06:28 +00002954void
vlm02296432004-09-29 13:19:37 +00002955Utf8_3_free(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00002956 void *struct_ptr, int contents_only) {
vlm67d57fe2005-03-06 09:29:03 +00002957 Utf8_3_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00002958 td->free_struct(td, struct_ptr, contents_only);
vlm7d576b32004-08-20 13:37:45 +00002959}
2960
2961int
vlm02296432004-09-29 13:19:37 +00002962Utf8_3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
vlm7d576b32004-08-20 13:37:45 +00002963 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00002964 Utf8_3_1_inherit_TYPE_descriptor(td);
vlm7d576b32004-08-20 13:37:45 +00002965 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2966}
2967
vlm9de248e2004-10-20 15:50:55 +00002968asn_dec_rval_t
vlm02296432004-09-29 13:19:37 +00002969Utf8_3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00002970 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm67d57fe2005-03-06 09:29:03 +00002971 Utf8_3_1_inherit_TYPE_descriptor(td);
vlm02296432004-09-29 13:19:37 +00002972 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
vlm39ba4c42004-09-22 16:06:28 +00002973}
2974
2975asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00002976Utf8_3_encode_der(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00002977 void *structure, int tag_mode, ber_tlv_tag_t tag,
2978 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00002979 Utf8_3_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00002980 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2981}
2982
vlma6af74c2004-10-23 13:26:56 +00002983asn_dec_rval_t
2984Utf8_3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00002985 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm67d57fe2005-03-06 09:29:03 +00002986 Utf8_3_1_inherit_TYPE_descriptor(td);
vlma6af74c2004-10-23 13:26:56 +00002987 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2988}
2989
vlm39ba4c42004-09-22 16:06:28 +00002990asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00002991Utf8_3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
vlm39ba4c42004-09-22 16:06:28 +00002992 int ilevel, enum xer_encoder_flags_e flags,
2993 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00002994 Utf8_3_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00002995 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
vlm7d576b32004-08-20 13:37:45 +00002996}
2997
2998
2999/*** <<< STAT-DEFS [Utf8-3] >>> ***/
3000
vlm337167e2005-11-26 11:25:14 +00003001static ber_tlv_tag_t asn_DEF_Utf8_3_tags_1[] = {
vlm1308d2b2004-09-10 15:49:15 +00003002 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
vlm7d576b32004-08-20 13:37:45 +00003003};
vlm02296432004-09-29 13:19:37 +00003004asn_TYPE_descriptor_t asn_DEF_Utf8_3 = {
vlm7d576b32004-08-20 13:37:45 +00003005 "Utf8-3",
vlm9de248e2004-10-20 15:50:55 +00003006 "Utf8-3",
vlm39ba4c42004-09-22 16:06:28 +00003007 Utf8_3_free,
3008 Utf8_3_print,
vlm7d576b32004-08-20 13:37:45 +00003009 Utf8_3_constraint,
3010 Utf8_3_decode_ber,
3011 Utf8_3_encode_der,
vlma6af74c2004-10-23 13:26:56 +00003012 Utf8_3_decode_xer,
vlm39ba4c42004-09-22 16:06:28 +00003013 Utf8_3_encode_xer,
vlm337167e2005-11-26 11:25:14 +00003014 0, /* No PER decoder, -gen-PER to enable */
vlm7d576b32004-08-20 13:37:45 +00003015 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00003016 asn_DEF_Utf8_3_tags_1,
3017 sizeof(asn_DEF_Utf8_3_tags_1)
3018 /sizeof(asn_DEF_Utf8_3_tags_1[0]), /* 1 */
3019 asn_DEF_Utf8_3_tags_1, /* Same as above */
3020 sizeof(asn_DEF_Utf8_3_tags_1)
3021 /sizeof(asn_DEF_Utf8_3_tags_1[0]), /* 1 */
3022 0, /* No PER visible constraints */
vlm7d576b32004-08-20 13:37:45 +00003023 0, 0, /* No members */
3024 0 /* No specifics */
3025};
3026
3027
3028/*** <<< INCLUDES [Utf8-2] >>> ***/
3029
3030#include <Utf8-1.h>
3031
3032/*** <<< TYPE-DECLS [Utf8-2] >>> ***/
3033
vlm7d576b32004-08-20 13:37:45 +00003034typedef Utf8_1_t Utf8_2_t;
3035
vlm7d576b32004-08-20 13:37:45 +00003036/*** <<< FUNC-DECLS [Utf8-2] >>> ***/
3037
vlm02296432004-09-29 13:19:37 +00003038extern asn_TYPE_descriptor_t asn_DEF_Utf8_2;
vlm39ba4c42004-09-22 16:06:28 +00003039asn_struct_free_f Utf8_2_free;
3040asn_struct_print_f Utf8_2_print;
vlm7d576b32004-08-20 13:37:45 +00003041asn_constr_check_f Utf8_2_constraint;
3042ber_type_decoder_f Utf8_2_decode_ber;
3043der_type_encoder_f Utf8_2_encode_der;
vlma6af74c2004-10-23 13:26:56 +00003044xer_type_decoder_f Utf8_2_decode_xer;
vlm39ba4c42004-09-22 16:06:28 +00003045xer_type_encoder_f Utf8_2_encode_xer;
vlm7d576b32004-08-20 13:37:45 +00003046
3047/*** <<< CODE [Utf8-2] >>> ***/
3048
3049int
vlm02296432004-09-29 13:19:37 +00003050Utf8_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +00003051 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlmdb87f2e2005-02-15 03:40:07 +00003052 const Utf8_1_t *st = (const Utf8_1_t *)sptr;
vlm7d576b32004-08-20 13:37:45 +00003053 size_t size;
3054
3055 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +00003056 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +00003057 "%s: value not given (%s:%d)",
3058 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +00003059 return -1;
3060 }
3061
vlme4506a32004-10-02 16:33:46 +00003062 size = UTF8String_length(st);
vlm1ba42752004-10-02 16:44:30 +00003063 if((ssize_t)size < 0) {
vlmd4ae41c2006-07-13 13:28:32 +00003064 _ASN_CTFAIL(app_key, td, sptr,
vlme4506a32004-10-02 16:33:46 +00003065 "%s: UTF-8: broken encoding (%s:%d)",
3066 td->name, __FILE__, __LINE__);
3067 return -1;
3068 }
vlm7d576b32004-08-20 13:37:45 +00003069
3070 if((size >= 1 && size <= 2)) {
3071 /* Constraint check succeeded */
vlmcdf661b2004-08-22 12:47:03 +00003072 return 0;
vlm7d576b32004-08-20 13:37:45 +00003073 } else {
vlmd4ae41c2006-07-13 13:28:32 +00003074 _ASN_CTFAIL(app_key, td, sptr,
vlm758530a2004-08-22 13:47:59 +00003075 "%s: constraint failed (%s:%d)",
3076 td->name, __FILE__, __LINE__);
vlm7d576b32004-08-20 13:37:45 +00003077 return -1;
3078 }
3079}
3080
3081/*
3082 * This type is implemented using Utf8_1,
vlmcb0b7fc2004-09-23 22:14:58 +00003083 * so here we adjust the DEF accordingly.
vlm7d576b32004-08-20 13:37:45 +00003084 */
3085static void
vlm67d57fe2005-03-06 09:29:03 +00003086Utf8_2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlm02296432004-09-29 13:19:37 +00003087 td->free_struct = asn_DEF_Utf8_1.free_struct;
3088 td->print_struct = asn_DEF_Utf8_1.print_struct;
3089 td->ber_decoder = asn_DEF_Utf8_1.ber_decoder;
3090 td->der_encoder = asn_DEF_Utf8_1.der_encoder;
3091 td->xer_decoder = asn_DEF_Utf8_1.xer_decoder;
3092 td->xer_encoder = asn_DEF_Utf8_1.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00003093 td->uper_decoder = asn_DEF_Utf8_1.uper_decoder;
3094 if(!td->per_constraints)
3095 td->per_constraints = asn_DEF_Utf8_1.per_constraints;
vlm02296432004-09-29 13:19:37 +00003096 td->elements = asn_DEF_Utf8_1.elements;
3097 td->elements_count = asn_DEF_Utf8_1.elements_count;
3098 td->specifics = asn_DEF_Utf8_1.specifics;
vlm7d576b32004-08-20 13:37:45 +00003099}
3100
vlm39ba4c42004-09-22 16:06:28 +00003101void
vlm02296432004-09-29 13:19:37 +00003102Utf8_2_free(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00003103 void *struct_ptr, int contents_only) {
vlm67d57fe2005-03-06 09:29:03 +00003104 Utf8_2_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00003105 td->free_struct(td, struct_ptr, contents_only);
vlm7d576b32004-08-20 13:37:45 +00003106}
3107
3108int
vlm02296432004-09-29 13:19:37 +00003109Utf8_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
vlm7d576b32004-08-20 13:37:45 +00003110 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00003111 Utf8_2_1_inherit_TYPE_descriptor(td);
vlm7d576b32004-08-20 13:37:45 +00003112 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
3113}
3114
vlm9de248e2004-10-20 15:50:55 +00003115asn_dec_rval_t
vlm02296432004-09-29 13:19:37 +00003116Utf8_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00003117 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm67d57fe2005-03-06 09:29:03 +00003118 Utf8_2_1_inherit_TYPE_descriptor(td);
vlm02296432004-09-29 13:19:37 +00003119 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
vlm39ba4c42004-09-22 16:06:28 +00003120}
3121
3122asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00003123Utf8_2_encode_der(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00003124 void *structure, int tag_mode, ber_tlv_tag_t tag,
3125 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00003126 Utf8_2_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00003127 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
3128}
3129
vlma6af74c2004-10-23 13:26:56 +00003130asn_dec_rval_t
3131Utf8_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00003132 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm67d57fe2005-03-06 09:29:03 +00003133 Utf8_2_1_inherit_TYPE_descriptor(td);
vlma6af74c2004-10-23 13:26:56 +00003134 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
3135}
3136
vlm39ba4c42004-09-22 16:06:28 +00003137asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00003138Utf8_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
vlm39ba4c42004-09-22 16:06:28 +00003139 int ilevel, enum xer_encoder_flags_e flags,
3140 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00003141 Utf8_2_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00003142 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
vlm7d576b32004-08-20 13:37:45 +00003143}
3144
3145
3146/*** <<< STAT-DEFS [Utf8-2] >>> ***/
3147
vlm337167e2005-11-26 11:25:14 +00003148static ber_tlv_tag_t asn_DEF_Utf8_2_tags_1[] = {
vlm1308d2b2004-09-10 15:49:15 +00003149 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
vlm7d576b32004-08-20 13:37:45 +00003150};
vlm02296432004-09-29 13:19:37 +00003151asn_TYPE_descriptor_t asn_DEF_Utf8_2 = {
vlm7d576b32004-08-20 13:37:45 +00003152 "Utf8-2",
vlm9de248e2004-10-20 15:50:55 +00003153 "Utf8-2",
vlm39ba4c42004-09-22 16:06:28 +00003154 Utf8_2_free,
3155 Utf8_2_print,
vlm7d576b32004-08-20 13:37:45 +00003156 Utf8_2_constraint,
3157 Utf8_2_decode_ber,
3158 Utf8_2_encode_der,
vlma6af74c2004-10-23 13:26:56 +00003159 Utf8_2_decode_xer,
vlm39ba4c42004-09-22 16:06:28 +00003160 Utf8_2_encode_xer,
vlm337167e2005-11-26 11:25:14 +00003161 0, /* No PER decoder, -gen-PER to enable */
vlm7d576b32004-08-20 13:37:45 +00003162 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00003163 asn_DEF_Utf8_2_tags_1,
3164 sizeof(asn_DEF_Utf8_2_tags_1)
3165 /sizeof(asn_DEF_Utf8_2_tags_1[0]), /* 1 */
3166 asn_DEF_Utf8_2_tags_1, /* Same as above */
3167 sizeof(asn_DEF_Utf8_2_tags_1)
3168 /sizeof(asn_DEF_Utf8_2_tags_1[0]), /* 1 */
3169 0, /* No PER visible constraints */
vlm7d576b32004-08-20 13:37:45 +00003170 0, 0, /* No members */
3171 0 /* No specifics */
3172};
3173
3174
3175/*** <<< INCLUDES [Utf8-1] >>> ***/
3176
3177#include <UTF8String.h>
3178
3179/*** <<< TYPE-DECLS [Utf8-1] >>> ***/
3180
vlm7d576b32004-08-20 13:37:45 +00003181typedef UTF8String_t Utf8_1_t;
3182
vlm7d576b32004-08-20 13:37:45 +00003183/*** <<< FUNC-DECLS [Utf8-1] >>> ***/
3184
vlm1f7df782005-03-04 23:48:19 +00003185extern asn_TYPE_descriptor_t asn_DEF_Utf8_1;
3186asn_struct_free_f Utf8_1_free;
3187asn_struct_print_f Utf8_1_print;
3188asn_constr_check_f Utf8_1_constraint;
3189ber_type_decoder_f Utf8_1_decode_ber;
3190der_type_encoder_f Utf8_1_encode_der;
3191xer_type_decoder_f Utf8_1_decode_xer;
3192xer_type_encoder_f Utf8_1_encode_xer;
vlm7d576b32004-08-20 13:37:45 +00003193
3194/*** <<< CODE [Utf8-1] >>> ***/
3195
vlm1f7df782005-03-04 23:48:19 +00003196int
3197Utf8_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +00003198 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlm1f7df782005-03-04 23:48:19 +00003199 /* Replace with underlying type checker */
3200 td->check_constraints = asn_DEF_UTF8String.check_constraints;
vlmaf68ef52006-07-13 11:19:01 +00003201 return td->check_constraints(td, sptr, ctfailcb, app_key);
vlm1f7df782005-03-04 23:48:19 +00003202}
3203
3204/*
3205 * This type is implemented using UTF8String,
3206 * so here we adjust the DEF accordingly.
3207 */
3208static void
vlm67d57fe2005-03-06 09:29:03 +00003209Utf8_1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlm1f7df782005-03-04 23:48:19 +00003210 td->free_struct = asn_DEF_UTF8String.free_struct;
3211 td->print_struct = asn_DEF_UTF8String.print_struct;
3212 td->ber_decoder = asn_DEF_UTF8String.ber_decoder;
3213 td->der_encoder = asn_DEF_UTF8String.der_encoder;
3214 td->xer_decoder = asn_DEF_UTF8String.xer_decoder;
3215 td->xer_encoder = asn_DEF_UTF8String.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00003216 td->uper_decoder = asn_DEF_UTF8String.uper_decoder;
3217 if(!td->per_constraints)
3218 td->per_constraints = asn_DEF_UTF8String.per_constraints;
vlm1f7df782005-03-04 23:48:19 +00003219 td->elements = asn_DEF_UTF8String.elements;
3220 td->elements_count = asn_DEF_UTF8String.elements_count;
3221 td->specifics = asn_DEF_UTF8String.specifics;
3222}
3223
3224void
3225Utf8_1_free(asn_TYPE_descriptor_t *td,
3226 void *struct_ptr, int contents_only) {
vlm67d57fe2005-03-06 09:29:03 +00003227 Utf8_1_1_inherit_TYPE_descriptor(td);
vlm1f7df782005-03-04 23:48:19 +00003228 td->free_struct(td, struct_ptr, contents_only);
3229}
3230
3231int
3232Utf8_1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
3233 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00003234 Utf8_1_1_inherit_TYPE_descriptor(td);
vlm1f7df782005-03-04 23:48:19 +00003235 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
3236}
3237
3238asn_dec_rval_t
3239Utf8_1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00003240 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm67d57fe2005-03-06 09:29:03 +00003241 Utf8_1_1_inherit_TYPE_descriptor(td);
vlm1f7df782005-03-04 23:48:19 +00003242 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
3243}
3244
3245asn_enc_rval_t
3246Utf8_1_encode_der(asn_TYPE_descriptor_t *td,
3247 void *structure, int tag_mode, ber_tlv_tag_t tag,
3248 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00003249 Utf8_1_1_inherit_TYPE_descriptor(td);
vlm1f7df782005-03-04 23:48:19 +00003250 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
3251}
3252
3253asn_dec_rval_t
3254Utf8_1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00003255 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm67d57fe2005-03-06 09:29:03 +00003256 Utf8_1_1_inherit_TYPE_descriptor(td);
vlm1f7df782005-03-04 23:48:19 +00003257 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
3258}
3259
3260asn_enc_rval_t
3261Utf8_1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
3262 int ilevel, enum xer_encoder_flags_e flags,
3263 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00003264 Utf8_1_1_inherit_TYPE_descriptor(td);
vlm1f7df782005-03-04 23:48:19 +00003265 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
3266}
3267
3268
3269/*** <<< STAT-DEFS [Utf8-1] >>> ***/
3270
vlm337167e2005-11-26 11:25:14 +00003271static ber_tlv_tag_t asn_DEF_Utf8_1_tags_1[] = {
vlm1f7df782005-03-04 23:48:19 +00003272 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
3273};
3274asn_TYPE_descriptor_t asn_DEF_Utf8_1 = {
3275 "Utf8-1",
3276 "Utf8-1",
3277 Utf8_1_free,
3278 Utf8_1_print,
3279 Utf8_1_constraint,
3280 Utf8_1_decode_ber,
3281 Utf8_1_encode_der,
3282 Utf8_1_decode_xer,
3283 Utf8_1_encode_xer,
vlm337167e2005-11-26 11:25:14 +00003284 0, /* No PER decoder, -gen-PER to enable */
vlm1f7df782005-03-04 23:48:19 +00003285 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00003286 asn_DEF_Utf8_1_tags_1,
3287 sizeof(asn_DEF_Utf8_1_tags_1)
3288 /sizeof(asn_DEF_Utf8_1_tags_1[0]), /* 1 */
3289 asn_DEF_Utf8_1_tags_1, /* Same as above */
3290 sizeof(asn_DEF_Utf8_1_tags_1)
3291 /sizeof(asn_DEF_Utf8_1_tags_1[0]), /* 1 */
3292 0, /* No PER visible constraints */
vlm1f7df782005-03-04 23:48:19 +00003293 0, 0, /* No members */
3294 0 /* No specifics */
3295};
vlm7d576b32004-08-20 13:37:45 +00003296
vlm63c808c2004-09-15 11:44:13 +00003297
3298/*** <<< INCLUDES [VisibleIdentifier] >>> ***/
3299
3300#include <Identifier.h>
3301
3302/*** <<< TYPE-DECLS [VisibleIdentifier] >>> ***/
3303
vlm63c808c2004-09-15 11:44:13 +00003304typedef Identifier_t VisibleIdentifier_t;
3305
3306/*** <<< FUNC-DECLS [VisibleIdentifier] >>> ***/
3307
vlm1f7df782005-03-04 23:48:19 +00003308extern asn_TYPE_descriptor_t asn_DEF_VisibleIdentifier;
3309asn_struct_free_f VisibleIdentifier_free;
3310asn_struct_print_f VisibleIdentifier_print;
3311asn_constr_check_f VisibleIdentifier_constraint;
3312ber_type_decoder_f VisibleIdentifier_decode_ber;
3313der_type_encoder_f VisibleIdentifier_encode_der;
3314xer_type_decoder_f VisibleIdentifier_decode_xer;
3315xer_type_encoder_f VisibleIdentifier_encode_xer;
3316
3317/*** <<< CTABLES [VisibleIdentifier] >>> ***/
3318
vlm67d57fe2005-03-06 09:29:03 +00003319static int permitted_alphabet_table_1[256] = {
vlm1f7df782005-03-04 23:48:19 +000033200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
33210,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
33220,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0, /* $ */
33231,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, /* 0123456789 */
33240,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ABCDEFGHIJKLMNO */
33251,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1, /* PQRSTUVWXYZ _ */
33260,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* abcdefghijklmno */
33271,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, /* pqrstuvwxyz */
3328};
3329
vlm67d57fe2005-03-06 09:29:03 +00003330static int check_permitted_alphabet_1(const void *sptr) {
3331 int *table = permitted_alphabet_table_1;
vlm1f7df782005-03-04 23:48:19 +00003332 /* The underlying type is VisibleString */
3333 const VisibleString_t *st = (const VisibleString_t *)sptr;
3334 const uint8_t *ch = st->buf;
3335 const uint8_t *end = ch + st->size;
3336
3337 for(; ch < end; ch++) {
3338 uint8_t cv = *ch;
3339 if(!table[cv]) return -1;
3340 }
3341 return 0;
3342}
3343
vlm63c808c2004-09-15 11:44:13 +00003344
vlmaafc9412004-09-26 13:12:56 +00003345/*** <<< CODE [VisibleIdentifier] >>> ***/
3346
vlm1f7df782005-03-04 23:48:19 +00003347int
3348VisibleIdentifier_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +00003349 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlm1f7df782005-03-04 23:48:19 +00003350 const Identifier_t *st = (const Identifier_t *)sptr;
3351 size_t size;
3352
3353 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +00003354 _ASN_CTFAIL(app_key, td, sptr,
vlm1f7df782005-03-04 23:48:19 +00003355 "%s: value not given (%s:%d)",
3356 td->name, __FILE__, __LINE__);
3357 return -1;
3358 }
3359
3360 size = st->size;
3361
3362 if((size >= 1 && size <= 32)
vlm67d57fe2005-03-06 09:29:03 +00003363 && !check_permitted_alphabet_1(st)) {
vlm1f7df782005-03-04 23:48:19 +00003364 /* Constraint check succeeded */
3365 return 0;
3366 } else {
vlmd4ae41c2006-07-13 13:28:32 +00003367 _ASN_CTFAIL(app_key, td, sptr,
vlm1f7df782005-03-04 23:48:19 +00003368 "%s: constraint failed (%s:%d)",
3369 td->name, __FILE__, __LINE__);
3370 return -1;
3371 }
3372}
3373
3374/*
3375 * This type is implemented using Identifier,
3376 * so here we adjust the DEF accordingly.
3377 */
3378static void
vlm67d57fe2005-03-06 09:29:03 +00003379VisibleIdentifier_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlm1f7df782005-03-04 23:48:19 +00003380 td->free_struct = asn_DEF_Identifier.free_struct;
3381 td->print_struct = asn_DEF_Identifier.print_struct;
3382 td->ber_decoder = asn_DEF_Identifier.ber_decoder;
3383 td->der_encoder = asn_DEF_Identifier.der_encoder;
3384 td->xer_decoder = asn_DEF_Identifier.xer_decoder;
3385 td->xer_encoder = asn_DEF_Identifier.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00003386 td->uper_decoder = asn_DEF_Identifier.uper_decoder;
3387 if(!td->per_constraints)
3388 td->per_constraints = asn_DEF_Identifier.per_constraints;
vlm1f7df782005-03-04 23:48:19 +00003389 td->elements = asn_DEF_Identifier.elements;
3390 td->elements_count = asn_DEF_Identifier.elements_count;
3391 td->specifics = asn_DEF_Identifier.specifics;
3392}
3393
3394void
3395VisibleIdentifier_free(asn_TYPE_descriptor_t *td,
3396 void *struct_ptr, int contents_only) {
vlm67d57fe2005-03-06 09:29:03 +00003397 VisibleIdentifier_1_inherit_TYPE_descriptor(td);
vlm1f7df782005-03-04 23:48:19 +00003398 td->free_struct(td, struct_ptr, contents_only);
3399}
3400
3401int
3402VisibleIdentifier_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
3403 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00003404 VisibleIdentifier_1_inherit_TYPE_descriptor(td);
vlm1f7df782005-03-04 23:48:19 +00003405 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
3406}
3407
3408asn_dec_rval_t
3409VisibleIdentifier_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00003410 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm67d57fe2005-03-06 09:29:03 +00003411 VisibleIdentifier_1_inherit_TYPE_descriptor(td);
vlm1f7df782005-03-04 23:48:19 +00003412 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
3413}
3414
3415asn_enc_rval_t
3416VisibleIdentifier_encode_der(asn_TYPE_descriptor_t *td,
3417 void *structure, int tag_mode, ber_tlv_tag_t tag,
3418 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00003419 VisibleIdentifier_1_inherit_TYPE_descriptor(td);
vlm1f7df782005-03-04 23:48:19 +00003420 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
3421}
3422
3423asn_dec_rval_t
3424VisibleIdentifier_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00003425 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm67d57fe2005-03-06 09:29:03 +00003426 VisibleIdentifier_1_inherit_TYPE_descriptor(td);
vlm1f7df782005-03-04 23:48:19 +00003427 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
3428}
3429
3430asn_enc_rval_t
3431VisibleIdentifier_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
3432 int ilevel, enum xer_encoder_flags_e flags,
3433 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00003434 VisibleIdentifier_1_inherit_TYPE_descriptor(td);
vlm1f7df782005-03-04 23:48:19 +00003435 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
3436}
3437
3438
3439/*** <<< STAT-DEFS [VisibleIdentifier] >>> ***/
3440
vlm337167e2005-11-26 11:25:14 +00003441static ber_tlv_tag_t asn_DEF_VisibleIdentifier_tags_1[] = {
vlm1f7df782005-03-04 23:48:19 +00003442 (ASN_TAG_CLASS_UNIVERSAL | (26 << 2))
3443};
3444asn_TYPE_descriptor_t asn_DEF_VisibleIdentifier = {
3445 "VisibleIdentifier",
3446 "VisibleIdentifier",
3447 VisibleIdentifier_free,
3448 VisibleIdentifier_print,
3449 VisibleIdentifier_constraint,
3450 VisibleIdentifier_decode_ber,
3451 VisibleIdentifier_encode_der,
3452 VisibleIdentifier_decode_xer,
3453 VisibleIdentifier_encode_xer,
vlm337167e2005-11-26 11:25:14 +00003454 0, /* No PER decoder, -gen-PER to enable */
vlm1f7df782005-03-04 23:48:19 +00003455 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00003456 asn_DEF_VisibleIdentifier_tags_1,
3457 sizeof(asn_DEF_VisibleIdentifier_tags_1)
3458 /sizeof(asn_DEF_VisibleIdentifier_tags_1[0]), /* 1 */
3459 asn_DEF_VisibleIdentifier_tags_1, /* Same as above */
3460 sizeof(asn_DEF_VisibleIdentifier_tags_1)
3461 /sizeof(asn_DEF_VisibleIdentifier_tags_1[0]), /* 1 */
3462 0, /* No PER visible constraints */
vlm1f7df782005-03-04 23:48:19 +00003463 0, 0, /* No members */
3464 0 /* No specifics */
3465};
vlmaafc9412004-09-26 13:12:56 +00003466
3467
vlm337167e2005-11-26 11:25:14 +00003468/*** <<< INCLUDES [Sequence] >>> ***/
3469
3470#include <Int1.h>
3471#include <Int4.h>
3472#include <BOOLEAN.h>
3473#include <ENUMERATED.h>
3474#include <NULL.h>
3475#include <Int5.h>
3476#include <constr_SEQUENCE.h>
3477
3478/*** <<< DEPS [Sequence] >>> ***/
3479
3480typedef enum enum_c {
3481 enum_c_one = 1,
3482 enum_c_two = 2,
3483 /*
3484 * Enumeration is extensible
3485 */
3486 enum_c_three = 3
vlm7c8aa5e2006-03-21 07:25:18 +00003487} e_enum_c;
vlm337167e2005-11-26 11:25:14 +00003488
3489/*** <<< TYPE-DECLS [Sequence] >>> ***/
3490
3491typedef struct Sequence {
3492 Int1_t *int1_c /* DEFAULT 3 */;
3493 Int4_t int4;
3494 Int4_t int4_c;
3495 BOOLEAN_t *bool /* DEFAULT 1 */;
3496 ENUMERATED_t enum_c;
3497 NULL_t *null /* OPTIONAL */;
3498 /*
3499 * This type is extensible,
3500 * possible extensions are below.
3501 */
3502 Int5_t *int5_c /* OPTIONAL */;
3503
3504 /* Context for parsing across buffer boundaries */
3505 asn_struct_ctx_t _asn_ctx;
3506} Sequence_t;
3507
3508/*** <<< FUNC-DECLS [Sequence] >>> ***/
3509
3510/* extern asn_TYPE_descriptor_t asn_DEF_enum_c_6; // (Use -fall-defs-global to expose) */
3511extern asn_TYPE_descriptor_t asn_DEF_Sequence;
3512
3513/*** <<< CODE [Sequence] >>> ***/
3514
3515static int
3516enum_c_6_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +00003517 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlm337167e2005-11-26 11:25:14 +00003518 /* Replace with underlying type checker */
3519 td->check_constraints = asn_DEF_ENUMERATED.check_constraints;
vlmaf68ef52006-07-13 11:19:01 +00003520 return td->check_constraints(td, sptr, ctfailcb, app_key);
vlm337167e2005-11-26 11:25:14 +00003521}
3522
3523/*
3524 * This type is implemented using ENUMERATED,
3525 * so here we adjust the DEF accordingly.
3526 */
3527static void
3528enum_c_6_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
3529 td->free_struct = asn_DEF_ENUMERATED.free_struct;
3530 td->print_struct = asn_DEF_ENUMERATED.print_struct;
3531 td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder;
3532 td->der_encoder = asn_DEF_ENUMERATED.der_encoder;
3533 td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder;
3534 td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder;
3535 td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder;
3536 if(!td->per_constraints)
3537 td->per_constraints = asn_DEF_ENUMERATED.per_constraints;
3538 td->elements = asn_DEF_ENUMERATED.elements;
3539 td->elements_count = asn_DEF_ENUMERATED.elements_count;
3540 /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */
3541}
3542
3543static void
3544enum_c_6_free(asn_TYPE_descriptor_t *td,
3545 void *struct_ptr, int contents_only) {
3546 enum_c_6_inherit_TYPE_descriptor(td);
3547 td->free_struct(td, struct_ptr, contents_only);
3548}
3549
3550static int
3551enum_c_6_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
3552 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
3553 enum_c_6_inherit_TYPE_descriptor(td);
3554 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
3555}
3556
3557static asn_dec_rval_t
3558enum_c_6_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
3559 void **structure, const void *bufptr, size_t size, int tag_mode) {
3560 enum_c_6_inherit_TYPE_descriptor(td);
3561 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
3562}
3563
3564static asn_enc_rval_t
3565enum_c_6_encode_der(asn_TYPE_descriptor_t *td,
3566 void *structure, int tag_mode, ber_tlv_tag_t tag,
3567 asn_app_consume_bytes_f *cb, void *app_key) {
3568 enum_c_6_inherit_TYPE_descriptor(td);
3569 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
3570}
3571
3572static asn_dec_rval_t
3573enum_c_6_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
3574 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
3575 enum_c_6_inherit_TYPE_descriptor(td);
3576 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
3577}
3578
3579static asn_enc_rval_t
3580enum_c_6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
3581 int ilevel, enum xer_encoder_flags_e flags,
3582 asn_app_consume_bytes_f *cb, void *app_key) {
3583 enum_c_6_inherit_TYPE_descriptor(td);
3584 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
3585}
3586
3587static int
3588memb_int1_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +00003589 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlm337167e2005-11-26 11:25:14 +00003590 const Int1_t *st = (const Int1_t *)sptr;
3591 long value;
3592
3593 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +00003594 _ASN_CTFAIL(app_key, td, sptr,
vlm337167e2005-11-26 11:25:14 +00003595 "%s: value not given (%s:%d)",
3596 td->name, __FILE__, __LINE__);
3597 return -1;
3598 }
3599
3600 if(asn_INTEGER2long(st, &value)) {
vlmd4ae41c2006-07-13 13:28:32 +00003601 _ASN_CTFAIL(app_key, td, sptr,
vlm337167e2005-11-26 11:25:14 +00003602 "%s: value too large (%s:%d)",
3603 td->name, __FILE__, __LINE__);
3604 return -1;
3605 }
3606
3607 if((value >= -2)) {
3608 /* Constraint check succeeded */
3609 return 0;
3610 } else {
vlmd4ae41c2006-07-13 13:28:32 +00003611 _ASN_CTFAIL(app_key, td, sptr,
vlm337167e2005-11-26 11:25:14 +00003612 "%s: constraint failed (%s:%d)",
3613 td->name, __FILE__, __LINE__);
3614 return -1;
3615 }
3616}
3617
3618static int
3619memb_int4_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +00003620 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlm337167e2005-11-26 11:25:14 +00003621 const Int4_t *st = (const Int4_t *)sptr;
3622 long value;
3623
3624 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +00003625 _ASN_CTFAIL(app_key, td, sptr,
vlm337167e2005-11-26 11:25:14 +00003626 "%s: value not given (%s:%d)",
3627 td->name, __FILE__, __LINE__);
3628 return -1;
3629 }
3630
3631 if(asn_INTEGER2long(st, &value)) {
vlmd4ae41c2006-07-13 13:28:32 +00003632 _ASN_CTFAIL(app_key, td, sptr,
vlm337167e2005-11-26 11:25:14 +00003633 "%s: value too large (%s:%d)",
3634 td->name, __FILE__, __LINE__);
3635 return -1;
3636 }
3637
3638 if((value >= 5 && value <= 7)) {
3639 /* Constraint check succeeded */
3640 return 0;
3641 } else {
vlmd4ae41c2006-07-13 13:28:32 +00003642 _ASN_CTFAIL(app_key, td, sptr,
vlm337167e2005-11-26 11:25:14 +00003643 "%s: constraint failed (%s:%d)",
3644 td->name, __FILE__, __LINE__);
3645 return -1;
3646 }
3647}
3648
3649static int
3650memb_int5_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +00003651 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlm337167e2005-11-26 11:25:14 +00003652 const Int5_t *st = (const Int5_t *)sptr;
3653 long value;
3654
3655 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +00003656 _ASN_CTFAIL(app_key, td, sptr,
vlm337167e2005-11-26 11:25:14 +00003657 "%s: value not given (%s:%d)",
3658 td->name, __FILE__, __LINE__);
3659 return -1;
3660 }
3661
3662 if(asn_INTEGER2long(st, &value)) {
vlmd4ae41c2006-07-13 13:28:32 +00003663 _ASN_CTFAIL(app_key, td, sptr,
vlm337167e2005-11-26 11:25:14 +00003664 "%s: value too large (%s:%d)",
3665 td->name, __FILE__, __LINE__);
3666 return -1;
3667 }
3668
3669 if((value == 5)) {
3670 /* Constraint check succeeded */
3671 return 0;
3672 } else {
vlmd4ae41c2006-07-13 13:28:32 +00003673 _ASN_CTFAIL(app_key, td, sptr,
vlm337167e2005-11-26 11:25:14 +00003674 "%s: constraint failed (%s:%d)",
3675 td->name, __FILE__, __LINE__);
3676 return -1;
3677 }
3678}
3679
3680
3681/*** <<< STAT-DEFS [Sequence] >>> ***/
3682
3683static int asn_DFL_2_set_3(void **sptr) {
3684 Int1_t *st = *sptr;
3685
3686 if(!st) {
3687 st = (*sptr = CALLOC(1, sizeof(*st)));
3688 if(!st) return -1;
3689 }
3690
3691 /* Install default value 3 */
3692 return asn_long2INTEGER(st, 3);
3693}
3694static int asn_DFL_5_set_1(void **sptr) {
3695 BOOLEAN_t *st = *sptr;
3696
3697 if(!st) {
3698 st = (*sptr = CALLOC(1, sizeof(*st)));
3699 if(!st) return -1;
3700 }
3701
3702 /* Install default value 1 */
3703 *st = 1;
3704 return 0;
3705}
3706static asn_INTEGER_enum_map_t asn_MAP_enum_c_value2enum_6[] = {
3707 { 1, 3, "one" },
3708 { 2, 3, "two" },
3709 { 3, 5, "three" }
3710 /* This list is extensible */
3711};
3712static unsigned int asn_MAP_enum_c_enum2value_6[] = {
3713 0, /* one(1) */
3714 2, /* three(3) */
3715 1 /* two(2) */
3716 /* This list is extensible */
3717};
3718static asn_INTEGER_specifics_t asn_SPC_enum_c_specs_6 = {
3719 asn_MAP_enum_c_value2enum_6, /* "tag" => N; sorted by tag */
3720 asn_MAP_enum_c_enum2value_6, /* N => "tag"; sorted by N */
3721 3, /* Number of elements in the maps */
3722 3, /* Extensions before this member */
3723 1 /* Strict enumeration */
3724};
3725static ber_tlv_tag_t asn_DEF_enum_c_tags_6[] = {
3726 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
3727};
3728static /* Use -fall-defs-global to expose */
3729asn_TYPE_descriptor_t asn_DEF_enum_c_6 = {
3730 "enum-c",
3731 "enum-c",
3732 enum_c_6_free,
3733 enum_c_6_print,
3734 enum_c_6_constraint,
3735 enum_c_6_decode_ber,
3736 enum_c_6_encode_der,
3737 enum_c_6_decode_xer,
3738 enum_c_6_encode_xer,
3739 0, /* No PER decoder, -gen-PER to enable */
3740 0, /* Use generic outmost tag fetcher */
3741 asn_DEF_enum_c_tags_6,
3742 sizeof(asn_DEF_enum_c_tags_6)
3743 /sizeof(asn_DEF_enum_c_tags_6[0]), /* 1 */
3744 asn_DEF_enum_c_tags_6, /* Same as above */
3745 sizeof(asn_DEF_enum_c_tags_6)
3746 /sizeof(asn_DEF_enum_c_tags_6[0]), /* 1 */
3747 0, /* No PER visible constraints */
3748 0, 0, /* Defined elsewhere */
3749 &asn_SPC_enum_c_specs_6 /* Additional specs */
3750};
3751
3752static asn_TYPE_member_t asn_MBR_Sequence_1[] = {
3753 { ATF_POINTER, 1, offsetof(struct Sequence, int1_c),
3754 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
3755 .tag_mode = 0,
3756 .type = &asn_DEF_Int1,
3757 .memb_constraints = memb_int1_c_constraint_1,
3758 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
3759 .default_value = asn_DFL_2_set_3, /* DEFAULT 3 */
3760 .name = "int1-c"
3761 },
3762 { ATF_NOFLAGS, 0, offsetof(struct Sequence, int4),
3763 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
3764 .tag_mode = +1, /* EXPLICIT tag at current level */
3765 .type = &asn_DEF_Int4,
3766 .memb_constraints = 0, /* Defer constraints checking to the member type */
3767 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
3768 .default_value = 0,
3769 .name = "int4"
3770 },
3771 { ATF_NOFLAGS, 0, offsetof(struct Sequence, int4_c),
3772 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
3773 .tag_mode = 0,
3774 .type = &asn_DEF_Int4,
3775 .memb_constraints = memb_int4_c_constraint_1,
3776 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
3777 .default_value = 0,
3778 .name = "int4-c"
3779 },
3780 { ATF_POINTER, 1, offsetof(struct Sequence, bool),
3781 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
3782 .tag_mode = 0,
3783 .type = &asn_DEF_BOOLEAN,
3784 .memb_constraints = 0, /* Defer constraints checking to the member type */
3785 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
3786 .default_value = asn_DFL_5_set_1, /* DEFAULT 1 */
3787 .name = "bool"
3788 },
3789 { ATF_NOFLAGS, 0, offsetof(struct Sequence, enum_c),
3790 .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
3791 .tag_mode = 0,
3792 .type = &asn_DEF_enum_c_6,
3793 .memb_constraints = 0, /* Defer constraints checking to the member type */
3794 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
3795 .default_value = 0,
3796 .name = "enum-c"
3797 },
3798 { ATF_POINTER, 2, offsetof(struct Sequence, null),
3799 .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)),
3800 .tag_mode = 0,
3801 .type = &asn_DEF_NULL,
3802 .memb_constraints = 0, /* Defer constraints checking to the member type */
3803 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
3804 .default_value = 0,
3805 .name = "null"
3806 },
3807 { ATF_POINTER, 1, offsetof(struct Sequence, int5_c),
3808 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
3809 .tag_mode = 0,
3810 .type = &asn_DEF_Int5,
3811 .memb_constraints = memb_int5_c_constraint_1,
3812 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
3813 .default_value = 0,
3814 .name = "int5-c"
3815 },
3816};
3817static ber_tlv_tag_t asn_DEF_Sequence_tags_1[] = {
3818 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
3819};
3820static asn_TYPE_tag2member_t asn_MAP_Sequence_tag2el_1[] = {
3821 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool at 59 */
3822 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2 }, /* int1-c at 56 */
3823 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -1, 1 }, /* int4-c at 58 */
3824 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 6, -2, 0 }, /* int5-c at 62 */
3825 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 5, 0, 0 }, /* null at 64 */
3826 { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 4, 0, 0 }, /* enum-c at 60 */
3827 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 } /* int4 at 57 */
3828};
3829static asn_SEQUENCE_specifics_t asn_SPC_Sequence_specs_1 = {
3830 sizeof(struct Sequence),
3831 offsetof(struct Sequence, _asn_ctx),
3832 asn_MAP_Sequence_tag2el_1,
3833 7, /* Count of tags in the map */
3834 0, 0, 0, /* Optional elements (not needed) */
3835 5, /* Start extensions */
3836 8 /* Stop extensions */
3837};
3838asn_TYPE_descriptor_t asn_DEF_Sequence = {
3839 "Sequence",
3840 "Sequence",
3841 SEQUENCE_free,
3842 SEQUENCE_print,
3843 SEQUENCE_constraint,
3844 SEQUENCE_decode_ber,
3845 SEQUENCE_encode_der,
3846 SEQUENCE_decode_xer,
3847 SEQUENCE_encode_xer,
3848 0, /* No PER decoder, -gen-PER to enable */
3849 0, /* Use generic outmost tag fetcher */
3850 asn_DEF_Sequence_tags_1,
3851 sizeof(asn_DEF_Sequence_tags_1)
3852 /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
3853 asn_DEF_Sequence_tags_1, /* Same as above */
3854 sizeof(asn_DEF_Sequence_tags_1)
3855 /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
3856 0, /* No PER visible constraints */
3857 asn_MBR_Sequence_1,
3858 7, /* Elements count */
3859 &asn_SPC_Sequence_specs_1 /* Additional specs */
3860};
3861
3862
3863/*** <<< INCLUDES [SequenceOf] >>> ***/
3864
3865#include <asn_SEQUENCE_OF.h>
3866#include <constr_SEQUENCE_OF.h>
3867
3868/*** <<< FWD-DECLS [SequenceOf] >>> ***/
3869
3870struct Sequence;
3871
3872/*** <<< TYPE-DECLS [SequenceOf] >>> ***/
3873
3874typedef struct SequenceOf {
3875 A_SEQUENCE_OF(struct Sequence) list;
3876
3877 /* Context for parsing across buffer boundaries */
3878 asn_struct_ctx_t _asn_ctx;
3879} SequenceOf_t;
3880
3881/*** <<< FUNC-DECLS [SequenceOf] >>> ***/
3882
3883extern asn_TYPE_descriptor_t asn_DEF_SequenceOf;
3884
3885/*** <<< POST-INCLUDE [SequenceOf] >>> ***/
3886
3887#include <Sequence.h>
3888
3889/*** <<< STAT-DEFS [SequenceOf] >>> ***/
3890
3891static asn_TYPE_member_t asn_MBR_SequenceOf_1[] = {
3892 { ATF_POINTER, 0, 0,
3893 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
3894 .tag_mode = 0,
3895 .type = &asn_DEF_Sequence,
3896 .memb_constraints = 0, /* Defer constraints checking to the member type */
3897 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
3898 .default_value = 0,
3899 .name = ""
3900 },
3901};
3902static ber_tlv_tag_t asn_DEF_SequenceOf_tags_1[] = {
3903 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
3904};
3905static asn_SET_OF_specifics_t asn_SPC_SequenceOf_specs_1 = {
3906 sizeof(struct SequenceOf),
3907 offsetof(struct SequenceOf, _asn_ctx),
3908 0, /* XER encoding is XMLDelimitedItemList */
3909};
3910asn_TYPE_descriptor_t asn_DEF_SequenceOf = {
3911 "SequenceOf",
3912 "SequenceOf",
3913 SEQUENCE_OF_free,
3914 SEQUENCE_OF_print,
3915 SEQUENCE_OF_constraint,
3916 SEQUENCE_OF_decode_ber,
3917 SEQUENCE_OF_encode_der,
3918 SEQUENCE_OF_decode_xer,
3919 SEQUENCE_OF_encode_xer,
3920 0, /* No PER decoder, -gen-PER to enable */
3921 0, /* Use generic outmost tag fetcher */
3922 asn_DEF_SequenceOf_tags_1,
3923 sizeof(asn_DEF_SequenceOf_tags_1)
3924 /sizeof(asn_DEF_SequenceOf_tags_1[0]), /* 1 */
3925 asn_DEF_SequenceOf_tags_1, /* Same as above */
3926 sizeof(asn_DEF_SequenceOf_tags_1)
3927 /sizeof(asn_DEF_SequenceOf_tags_1[0]), /* 1 */
3928 0, /* No PER visible constraints */
3929 asn_MBR_SequenceOf_1,
3930 1, /* Single element */
3931 &asn_SPC_SequenceOf_specs_1 /* Additional specs */
3932};
3933
3934
3935/*** <<< INCLUDES [Enum0] >>> ***/
3936
3937#include <ENUMERATED.h>
3938
3939/*** <<< DEPS [Enum0] >>> ***/
3940
3941typedef enum Enum0 {
3942 Enum0_one = 0,
3943 Enum0_two = 1
vlm7c8aa5e2006-03-21 07:25:18 +00003944} e_Enum0;
vlm337167e2005-11-26 11:25:14 +00003945
3946/*** <<< TYPE-DECLS [Enum0] >>> ***/
3947
3948typedef ENUMERATED_t Enum0_t;
3949
3950/*** <<< FUNC-DECLS [Enum0] >>> ***/
3951
3952extern asn_TYPE_descriptor_t asn_DEF_Enum0;
3953asn_struct_free_f Enum0_free;
3954asn_struct_print_f Enum0_print;
3955asn_constr_check_f Enum0_constraint;
3956ber_type_decoder_f Enum0_decode_ber;
3957der_type_encoder_f Enum0_encode_der;
3958xer_type_decoder_f Enum0_decode_xer;
3959xer_type_encoder_f Enum0_encode_xer;
3960
3961/*** <<< CODE [Enum0] >>> ***/
3962
3963int
3964Enum0_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +00003965 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlm337167e2005-11-26 11:25:14 +00003966 /* Replace with underlying type checker */
3967 td->check_constraints = asn_DEF_ENUMERATED.check_constraints;
vlmaf68ef52006-07-13 11:19:01 +00003968 return td->check_constraints(td, sptr, ctfailcb, app_key);
vlm337167e2005-11-26 11:25:14 +00003969}
3970
3971/*
3972 * This type is implemented using ENUMERATED,
3973 * so here we adjust the DEF accordingly.
3974 */
3975static void
3976Enum0_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
3977 td->free_struct = asn_DEF_ENUMERATED.free_struct;
3978 td->print_struct = asn_DEF_ENUMERATED.print_struct;
3979 td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder;
3980 td->der_encoder = asn_DEF_ENUMERATED.der_encoder;
3981 td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder;
3982 td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder;
3983 td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder;
3984 if(!td->per_constraints)
3985 td->per_constraints = asn_DEF_ENUMERATED.per_constraints;
3986 td->elements = asn_DEF_ENUMERATED.elements;
3987 td->elements_count = asn_DEF_ENUMERATED.elements_count;
3988 /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */
3989}
3990
3991void
3992Enum0_free(asn_TYPE_descriptor_t *td,
3993 void *struct_ptr, int contents_only) {
3994 Enum0_1_inherit_TYPE_descriptor(td);
3995 td->free_struct(td, struct_ptr, contents_only);
3996}
3997
3998int
3999Enum0_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
4000 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
4001 Enum0_1_inherit_TYPE_descriptor(td);
4002 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
4003}
4004
4005asn_dec_rval_t
4006Enum0_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
4007 void **structure, const void *bufptr, size_t size, int tag_mode) {
4008 Enum0_1_inherit_TYPE_descriptor(td);
4009 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
4010}
4011
4012asn_enc_rval_t
4013Enum0_encode_der(asn_TYPE_descriptor_t *td,
4014 void *structure, int tag_mode, ber_tlv_tag_t tag,
4015 asn_app_consume_bytes_f *cb, void *app_key) {
4016 Enum0_1_inherit_TYPE_descriptor(td);
4017 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
4018}
4019
4020asn_dec_rval_t
4021Enum0_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
4022 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
4023 Enum0_1_inherit_TYPE_descriptor(td);
4024 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
4025}
4026
4027asn_enc_rval_t
4028Enum0_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
4029 int ilevel, enum xer_encoder_flags_e flags,
4030 asn_app_consume_bytes_f *cb, void *app_key) {
4031 Enum0_1_inherit_TYPE_descriptor(td);
4032 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
4033}
4034
4035
4036/*** <<< STAT-DEFS [Enum0] >>> ***/
4037
4038static asn_INTEGER_enum_map_t asn_MAP_Enum0_value2enum_1[] = {
4039 { 0, 3, "one" },
4040 { 1, 3, "two" }
4041};
4042static unsigned int asn_MAP_Enum0_enum2value_1[] = {
4043 0, /* one(0) */
4044 1 /* two(1) */
4045};
4046static asn_INTEGER_specifics_t asn_SPC_Enum0_specs_1 = {
4047 asn_MAP_Enum0_value2enum_1, /* "tag" => N; sorted by tag */
4048 asn_MAP_Enum0_enum2value_1, /* N => "tag"; sorted by N */
4049 2, /* Number of elements in the maps */
4050 0, /* Enumeration is not extensible */
4051 1 /* Strict enumeration */
4052};
4053static ber_tlv_tag_t asn_DEF_Enum0_tags_1[] = {
4054 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
4055};
4056asn_TYPE_descriptor_t asn_DEF_Enum0 = {
4057 "Enum0",
4058 "Enum0",
4059 Enum0_free,
4060 Enum0_print,
4061 Enum0_constraint,
4062 Enum0_decode_ber,
4063 Enum0_encode_der,
4064 Enum0_decode_xer,
4065 Enum0_encode_xer,
4066 0, /* No PER decoder, -gen-PER to enable */
4067 0, /* Use generic outmost tag fetcher */
4068 asn_DEF_Enum0_tags_1,
4069 sizeof(asn_DEF_Enum0_tags_1)
4070 /sizeof(asn_DEF_Enum0_tags_1[0]), /* 1 */
4071 asn_DEF_Enum0_tags_1, /* Same as above */
4072 sizeof(asn_DEF_Enum0_tags_1)
4073 /sizeof(asn_DEF_Enum0_tags_1[0]), /* 1 */
4074 0, /* No PER visible constraints */
4075 0, 0, /* Defined elsewhere */
4076 &asn_SPC_Enum0_specs_1 /* Additional specs */
4077};
4078
4079
4080/*** <<< INCLUDES [Enum1] >>> ***/
4081
4082#include <NativeEnumerated.h>
4083
4084/*** <<< DEPS [Enum1] >>> ***/
4085
4086typedef enum Enum1 {
4087 Enum1_one = 0,
4088 Enum1_two = 1
vlm7c8aa5e2006-03-21 07:25:18 +00004089} e_Enum1;
vlm337167e2005-11-26 11:25:14 +00004090
4091/*** <<< TYPE-DECLS [Enum1] >>> ***/
4092
4093typedef long Enum1_t;
4094
4095/*** <<< FUNC-DECLS [Enum1] >>> ***/
4096
4097extern asn_TYPE_descriptor_t asn_DEF_Enum1;
4098asn_struct_free_f Enum1_free;
4099asn_struct_print_f Enum1_print;
4100asn_constr_check_f Enum1_constraint;
4101ber_type_decoder_f Enum1_decode_ber;
4102der_type_encoder_f Enum1_encode_der;
4103xer_type_decoder_f Enum1_decode_xer;
4104xer_type_encoder_f Enum1_encode_xer;
4105
4106/*** <<< CODE [Enum1] >>> ***/
4107
4108int
4109Enum1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +00004110 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlm337167e2005-11-26 11:25:14 +00004111 long value;
4112
4113 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +00004114 _ASN_CTFAIL(app_key, td, sptr,
vlm337167e2005-11-26 11:25:14 +00004115 "%s: value not given (%s:%d)",
4116 td->name, __FILE__, __LINE__);
4117 return -1;
4118 }
4119
4120 value = *(const long *)sptr;
4121
4122 if((value == 0)) {
4123 /* Constraint check succeeded */
4124 return 0;
4125 } else {
vlmd4ae41c2006-07-13 13:28:32 +00004126 _ASN_CTFAIL(app_key, td, sptr,
vlm337167e2005-11-26 11:25:14 +00004127 "%s: constraint failed (%s:%d)",
4128 td->name, __FILE__, __LINE__);
4129 return -1;
4130 }
4131}
4132
4133/*
4134 * This type is implemented using NativeEnumerated,
4135 * so here we adjust the DEF accordingly.
4136 */
4137static void
4138Enum1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
4139 td->free_struct = asn_DEF_NativeEnumerated.free_struct;
4140 td->print_struct = asn_DEF_NativeEnumerated.print_struct;
4141 td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder;
4142 td->der_encoder = asn_DEF_NativeEnumerated.der_encoder;
4143 td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder;
4144 td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder;
4145 td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder;
4146 if(!td->per_constraints)
4147 td->per_constraints = asn_DEF_NativeEnumerated.per_constraints;
4148 td->elements = asn_DEF_NativeEnumerated.elements;
4149 td->elements_count = asn_DEF_NativeEnumerated.elements_count;
4150 /* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */
4151}
4152
4153void
4154Enum1_free(asn_TYPE_descriptor_t *td,
4155 void *struct_ptr, int contents_only) {
4156 Enum1_1_inherit_TYPE_descriptor(td);
4157 td->free_struct(td, struct_ptr, contents_only);
4158}
4159
4160int
4161Enum1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
4162 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
4163 Enum1_1_inherit_TYPE_descriptor(td);
4164 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
4165}
4166
4167asn_dec_rval_t
4168Enum1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
4169 void **structure, const void *bufptr, size_t size, int tag_mode) {
4170 Enum1_1_inherit_TYPE_descriptor(td);
4171 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
4172}
4173
4174asn_enc_rval_t
4175Enum1_encode_der(asn_TYPE_descriptor_t *td,
4176 void *structure, int tag_mode, ber_tlv_tag_t tag,
4177 asn_app_consume_bytes_f *cb, void *app_key) {
4178 Enum1_1_inherit_TYPE_descriptor(td);
4179 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
4180}
4181
4182asn_dec_rval_t
4183Enum1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
4184 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
4185 Enum1_1_inherit_TYPE_descriptor(td);
4186 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
4187}
4188
4189asn_enc_rval_t
4190Enum1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
4191 int ilevel, enum xer_encoder_flags_e flags,
4192 asn_app_consume_bytes_f *cb, void *app_key) {
4193 Enum1_1_inherit_TYPE_descriptor(td);
4194 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
4195}
4196
4197
4198/*** <<< STAT-DEFS [Enum1] >>> ***/
4199
4200static asn_INTEGER_enum_map_t asn_MAP_Enum1_value2enum_1[] = {
4201 { 0, 3, "one" },
4202 { 1, 3, "two" }
4203};
4204static unsigned int asn_MAP_Enum1_enum2value_1[] = {
4205 0, /* one(0) */
4206 1 /* two(1) */
4207};
4208static asn_INTEGER_specifics_t asn_SPC_Enum1_specs_1 = {
4209 asn_MAP_Enum1_value2enum_1, /* "tag" => N; sorted by tag */
4210 asn_MAP_Enum1_enum2value_1, /* N => "tag"; sorted by N */
4211 2, /* Number of elements in the maps */
4212 0, /* Enumeration is not extensible */
4213 1 /* Strict enumeration */
4214};
4215static ber_tlv_tag_t asn_DEF_Enum1_tags_1[] = {
4216 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
4217};
4218asn_TYPE_descriptor_t asn_DEF_Enum1 = {
4219 "Enum1",
4220 "Enum1",
4221 Enum1_free,
4222 Enum1_print,
4223 Enum1_constraint,
4224 Enum1_decode_ber,
4225 Enum1_encode_der,
4226 Enum1_decode_xer,
4227 Enum1_encode_xer,
4228 0, /* No PER decoder, -gen-PER to enable */
4229 0, /* Use generic outmost tag fetcher */
4230 asn_DEF_Enum1_tags_1,
4231 sizeof(asn_DEF_Enum1_tags_1)
4232 /sizeof(asn_DEF_Enum1_tags_1[0]), /* 1 */
4233 asn_DEF_Enum1_tags_1, /* Same as above */
4234 sizeof(asn_DEF_Enum1_tags_1)
4235 /sizeof(asn_DEF_Enum1_tags_1[0]), /* 1 */
4236 0, /* No PER visible constraints */
4237 0, 0, /* Defined elsewhere */
4238 &asn_SPC_Enum1_specs_1 /* Additional specs */
4239};
4240
4241
vlmaafc9412004-09-26 13:12:56 +00004242/*** <<< INCLUDES [Identifier] >>> ***/
4243
4244#include <VisibleString.h>
4245
4246/*** <<< TYPE-DECLS [Identifier] >>> ***/
4247
vlmaafc9412004-09-26 13:12:56 +00004248typedef VisibleString_t Identifier_t;
4249
4250/*** <<< FUNC-DECLS [Identifier] >>> ***/
4251
vlm02296432004-09-29 13:19:37 +00004252extern asn_TYPE_descriptor_t asn_DEF_Identifier;
vlmaafc9412004-09-26 13:12:56 +00004253asn_struct_free_f Identifier_free;
4254asn_struct_print_f Identifier_print;
4255asn_constr_check_f Identifier_constraint;
4256ber_type_decoder_f Identifier_decode_ber;
4257der_type_encoder_f Identifier_encode_der;
vlma6af74c2004-10-23 13:26:56 +00004258xer_type_decoder_f Identifier_decode_xer;
vlmaafc9412004-09-26 13:12:56 +00004259xer_type_encoder_f Identifier_encode_xer;
4260
4261/*** <<< CTABLES [Identifier] >>> ***/
vlm63c808c2004-09-15 11:44:13 +00004262
vlm67d57fe2005-03-06 09:29:03 +00004263static int permitted_alphabet_table_1[256] = {
vlm63c808c2004-09-15 11:44:13 +000042640,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
42650,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
42660,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0, /* $ */
42671,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, /* 0123456789 */
42680,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ABCDEFGHIJKLMNO */
42691,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1, /* PQRSTUVWXYZ _ */
42700,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* abcdefghijklmno */
42711,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, /* pqrstuvwxyz */
4272};
4273
vlm67d57fe2005-03-06 09:29:03 +00004274static int check_permitted_alphabet_1(const void *sptr) {
4275 int *table = permitted_alphabet_table_1;
vlm63c808c2004-09-15 11:44:13 +00004276 /* The underlying type is VisibleString */
vlmdb87f2e2005-02-15 03:40:07 +00004277 const VisibleString_t *st = (const VisibleString_t *)sptr;
vlm63c808c2004-09-15 11:44:13 +00004278 const uint8_t *ch = st->buf;
4279 const uint8_t *end = ch + st->size;
4280
4281 for(; ch < end; ch++) {
4282 uint8_t cv = *ch;
4283 if(!table[cv]) return -1;
4284 }
4285 return 0;
4286}
4287
4288
vlmaafc9412004-09-26 13:12:56 +00004289/*** <<< CODE [Identifier] >>> ***/
vlm63c808c2004-09-15 11:44:13 +00004290
4291int
vlm02296432004-09-29 13:19:37 +00004292Identifier_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
vlmaf68ef52006-07-13 11:19:01 +00004293 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
vlmdb87f2e2005-02-15 03:40:07 +00004294 const VisibleString_t *st = (const VisibleString_t *)sptr;
vlm63c808c2004-09-15 11:44:13 +00004295 size_t size;
4296
4297 if(!sptr) {
vlmd4ae41c2006-07-13 13:28:32 +00004298 _ASN_CTFAIL(app_key, td, sptr,
vlm63c808c2004-09-15 11:44:13 +00004299 "%s: value not given (%s:%d)",
4300 td->name, __FILE__, __LINE__);
4301 return -1;
4302 }
4303
4304 size = st->size;
4305
4306 if((size >= 1 && size <= 32)
vlm67d57fe2005-03-06 09:29:03 +00004307 && !check_permitted_alphabet_1(st)) {
vlm63c808c2004-09-15 11:44:13 +00004308 /* Constraint check succeeded */
4309 return 0;
4310 } else {
vlmd4ae41c2006-07-13 13:28:32 +00004311 _ASN_CTFAIL(app_key, td, sptr,
vlm63c808c2004-09-15 11:44:13 +00004312 "%s: constraint failed (%s:%d)",
4313 td->name, __FILE__, __LINE__);
4314 return -1;
4315 }
4316}
4317
4318/*
vlm63c808c2004-09-15 11:44:13 +00004319 * This type is implemented using VisibleString,
vlmcb0b7fc2004-09-23 22:14:58 +00004320 * so here we adjust the DEF accordingly.
vlm63c808c2004-09-15 11:44:13 +00004321 */
4322static void
vlm67d57fe2005-03-06 09:29:03 +00004323Identifier_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlm02296432004-09-29 13:19:37 +00004324 td->free_struct = asn_DEF_VisibleString.free_struct;
4325 td->print_struct = asn_DEF_VisibleString.print_struct;
4326 td->ber_decoder = asn_DEF_VisibleString.ber_decoder;
4327 td->der_encoder = asn_DEF_VisibleString.der_encoder;
4328 td->xer_decoder = asn_DEF_VisibleString.xer_decoder;
4329 td->xer_encoder = asn_DEF_VisibleString.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00004330 td->uper_decoder = asn_DEF_VisibleString.uper_decoder;
4331 if(!td->per_constraints)
4332 td->per_constraints = asn_DEF_VisibleString.per_constraints;
vlm02296432004-09-29 13:19:37 +00004333 td->elements = asn_DEF_VisibleString.elements;
4334 td->elements_count = asn_DEF_VisibleString.elements_count;
4335 td->specifics = asn_DEF_VisibleString.specifics;
vlm63c808c2004-09-15 11:44:13 +00004336}
4337
vlm39ba4c42004-09-22 16:06:28 +00004338void
vlm02296432004-09-29 13:19:37 +00004339Identifier_free(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00004340 void *struct_ptr, int contents_only) {
vlm67d57fe2005-03-06 09:29:03 +00004341 Identifier_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00004342 td->free_struct(td, struct_ptr, contents_only);
vlm63c808c2004-09-15 11:44:13 +00004343}
4344
4345int
vlm02296432004-09-29 13:19:37 +00004346Identifier_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
vlm63c808c2004-09-15 11:44:13 +00004347 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00004348 Identifier_1_inherit_TYPE_descriptor(td);
vlm63c808c2004-09-15 11:44:13 +00004349 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
4350}
4351
vlm9de248e2004-10-20 15:50:55 +00004352asn_dec_rval_t
vlm02296432004-09-29 13:19:37 +00004353Identifier_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00004354 void **structure, const void *bufptr, size_t size, int tag_mode) {
vlm67d57fe2005-03-06 09:29:03 +00004355 Identifier_1_inherit_TYPE_descriptor(td);
vlm02296432004-09-29 13:19:37 +00004356 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
vlm39ba4c42004-09-22 16:06:28 +00004357}
4358
4359asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00004360Identifier_encode_der(asn_TYPE_descriptor_t *td,
vlm39ba4c42004-09-22 16:06:28 +00004361 void *structure, int tag_mode, ber_tlv_tag_t tag,
4362 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00004363 Identifier_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00004364 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
4365}
4366
vlma6af74c2004-10-23 13:26:56 +00004367asn_dec_rval_t
4368Identifier_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
vlmc04faea2005-03-17 21:57:19 +00004369 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
vlm67d57fe2005-03-06 09:29:03 +00004370 Identifier_1_inherit_TYPE_descriptor(td);
vlma6af74c2004-10-23 13:26:56 +00004371 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
4372}
4373
vlm39ba4c42004-09-22 16:06:28 +00004374asn_enc_rval_t
vlm02296432004-09-29 13:19:37 +00004375Identifier_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
vlm39ba4c42004-09-22 16:06:28 +00004376 int ilevel, enum xer_encoder_flags_e flags,
4377 asn_app_consume_bytes_f *cb, void *app_key) {
vlm67d57fe2005-03-06 09:29:03 +00004378 Identifier_1_inherit_TYPE_descriptor(td);
vlm39ba4c42004-09-22 16:06:28 +00004379 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
vlm63c808c2004-09-15 11:44:13 +00004380}
4381
4382
4383/*** <<< STAT-DEFS [Identifier] >>> ***/
4384
vlm337167e2005-11-26 11:25:14 +00004385static ber_tlv_tag_t asn_DEF_Identifier_tags_1[] = {
vlm63c808c2004-09-15 11:44:13 +00004386 (ASN_TAG_CLASS_UNIVERSAL | (26 << 2))
4387};
vlm02296432004-09-29 13:19:37 +00004388asn_TYPE_descriptor_t asn_DEF_Identifier = {
vlm63c808c2004-09-15 11:44:13 +00004389 "Identifier",
vlm9de248e2004-10-20 15:50:55 +00004390 "Identifier",
vlm39ba4c42004-09-22 16:06:28 +00004391 Identifier_free,
4392 Identifier_print,
vlm63c808c2004-09-15 11:44:13 +00004393 Identifier_constraint,
4394 Identifier_decode_ber,
4395 Identifier_encode_der,
vlma6af74c2004-10-23 13:26:56 +00004396 Identifier_decode_xer,
vlm39ba4c42004-09-22 16:06:28 +00004397 Identifier_encode_xer,
vlm337167e2005-11-26 11:25:14 +00004398 0, /* No PER decoder, -gen-PER to enable */
vlm63c808c2004-09-15 11:44:13 +00004399 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00004400 asn_DEF_Identifier_tags_1,
4401 sizeof(asn_DEF_Identifier_tags_1)
4402 /sizeof(asn_DEF_Identifier_tags_1[0]), /* 1 */
4403 asn_DEF_Identifier_tags_1, /* Same as above */
4404 sizeof(asn_DEF_Identifier_tags_1)
4405 /sizeof(asn_DEF_Identifier_tags_1[0]), /* 1 */
4406 0, /* No PER visible constraints */
vlm63c808c2004-09-15 11:44:13 +00004407 0, 0, /* No members */
4408 0 /* No specifics */
4409};
4410