blob: f1988426def17cfb115f1a2537f0c486601da22e [file] [log] [blame]
Lev Walkin59b176e2005-11-26 11:25:14 +00001
2/*** <<< INCLUDES [Int1] >>> ***/
3
Lev Walkin2a744a72013-03-27 01:56:23 -07004#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00005
6/*** <<< TYPE-DECLS [Int1] >>> ***/
7
Lev Walkin2a744a72013-03-27 01:56:23 -07008typedef long Int1_t;
Lev Walkin59b176e2005-11-26 11:25:14 +00009
10/*** <<< FUNC-DECLS [Int1] >>> ***/
11
12extern 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;
20per_type_decoder_f Int1_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +000021per_type_encoder_f Int1_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +000022
23/*** <<< CODE [Int1] >>> ***/
24
Lev Walkin59b176e2005-11-26 11:25:14 +000025/*
Lev Walkin2a744a72013-03-27 01:56:23 -070026 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +000027 * so here we adjust the DEF accordingly.
28 */
Lev Walkin59b176e2005-11-26 11:25:14 +000029
30/*** <<< STAT-DEFS [Int1] >>> ***/
31
Lev Walkina7591b52014-10-12 18:37:35 -070032static const ber_tlv_tag_t asn_DEF_Int1_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +000033 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
34};
35asn_TYPE_descriptor_t asn_DEF_Int1 = {
36 "Int1",
37 "Int1",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +080038 &asn_OP_NativeInteger,
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080039 NativeInteger_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +000040 asn_DEF_Int1_tags_1,
41 sizeof(asn_DEF_Int1_tags_1)
42 /sizeof(asn_DEF_Int1_tags_1[0]), /* 1 */
43 asn_DEF_Int1_tags_1, /* Same as above */
44 sizeof(asn_DEF_Int1_tags_1)
45 /sizeof(asn_DEF_Int1_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +040046 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +000047 0, /* No PER visible constraints */
48 0, 0, /* No members */
49 0 /* No specifics */
50};
51
52
53/*** <<< INCLUDES [Int2] >>> ***/
54
Lev Walkin22b5ed42006-09-13 02:51:20 +000055#include "Int1.h"
Lev Walkin59b176e2005-11-26 11:25:14 +000056
57/*** <<< TYPE-DECLS [Int2] >>> ***/
58
59typedef Int1_t Int2_t;
60
61/*** <<< FUNC-DECLS [Int2] >>> ***/
62
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080063extern asn_per_constraints_t asn_PER_type_Int2_constr_1;
Lev Walkin59b176e2005-11-26 11:25:14 +000064extern asn_TYPE_descriptor_t asn_DEF_Int2;
65asn_struct_free_f Int2_free;
66asn_struct_print_f Int2_print;
67asn_constr_check_f Int2_constraint;
68ber_type_decoder_f Int2_decode_ber;
69der_type_encoder_f Int2_encode_der;
70xer_type_decoder_f Int2_decode_xer;
71xer_type_encoder_f Int2_encode_xer;
72per_type_decoder_f Int2_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +000073per_type_encoder_f Int2_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +000074
75/*** <<< CODE [Int2] >>> ***/
76
77int
78Int2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +000079 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkine0f2a5b2017-08-30 20:02:29 -070080 unsigned long value;
Lev Walkin59b176e2005-11-26 11:25:14 +000081
82 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -070083 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +000084 "%s: value not given (%s:%d)",
85 td->name, __FILE__, __LINE__);
86 return -1;
87 }
88
Lev Walkin2a744a72013-03-27 01:56:23 -070089 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +000090
91 if((value >= 0)) {
92 /* Constraint check succeeded */
93 return 0;
94 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -070095 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +000096 "%s: constraint failed (%s:%d)",
97 td->name, __FILE__, __LINE__);
98 return -1;
99 }
100}
101
102/*
103 * This type is implemented using Int1,
104 * so here we adjust the DEF accordingly.
105 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000106
Lev Walkin725883b2006-10-09 12:07:58 +0000107/*** <<< CTDEFS [Int2] >>> ***/
108
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800109asn_per_constraints_t asn_PER_type_Int2_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000110 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (0..MAX) */,
111 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
112 0, 0 /* No PER value map */
113};
114
Lev Walkin59b176e2005-11-26 11:25:14 +0000115/*** <<< STAT-DEFS [Int2] >>> ***/
116
Lev Walkina7591b52014-10-12 18:37:35 -0700117static const ber_tlv_tag_t asn_DEF_Int2_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000118 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
119};
Lev Walkin59b176e2005-11-26 11:25:14 +0000120asn_TYPE_descriptor_t asn_DEF_Int2 = {
121 "Int2",
122 "Int2",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800123 &asn_OP_NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000124 Int2_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000125 asn_DEF_Int2_tags_1,
126 sizeof(asn_DEF_Int2_tags_1)
127 /sizeof(asn_DEF_Int2_tags_1[0]), /* 1 */
128 asn_DEF_Int2_tags_1, /* Same as above */
129 sizeof(asn_DEF_Int2_tags_1)
130 /sizeof(asn_DEF_Int2_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400131 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000132 &asn_PER_type_Int2_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000133 0, 0, /* No members */
134 0 /* No specifics */
135};
136
137
138/*** <<< INCLUDES [Int3] >>> ***/
139
Lev Walkin22b5ed42006-09-13 02:51:20 +0000140#include "Int2.h"
Lev Walkin59b176e2005-11-26 11:25:14 +0000141
142/*** <<< TYPE-DECLS [Int3] >>> ***/
143
144typedef Int2_t Int3_t;
145
146/*** <<< FUNC-DECLS [Int3] >>> ***/
147
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800148extern asn_per_constraints_t asn_PER_type_Int3_constr_1;
Lev Walkin59b176e2005-11-26 11:25:14 +0000149extern asn_TYPE_descriptor_t asn_DEF_Int3;
150asn_struct_free_f Int3_free;
151asn_struct_print_f Int3_print;
152asn_constr_check_f Int3_constraint;
153ber_type_decoder_f Int3_decode_ber;
154der_type_encoder_f Int3_encode_der;
155xer_type_decoder_f Int3_decode_xer;
156xer_type_encoder_f Int3_encode_xer;
157per_type_decoder_f Int3_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000158per_type_encoder_f Int3_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000159
160/*** <<< CODE [Int3] >>> ***/
161
162int
163Int3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000164 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000165 long value;
166
167 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700168 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000169 "%s: value not given (%s:%d)",
170 td->name, __FILE__, __LINE__);
171 return -1;
172 }
173
Lev Walkin2a744a72013-03-27 01:56:23 -0700174 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +0000175
176 if((value >= 0 && value <= 10)) {
177 /* Constraint check succeeded */
178 return 0;
179 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700180 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000181 "%s: constraint failed (%s:%d)",
182 td->name, __FILE__, __LINE__);
183 return -1;
184 }
185}
186
187/*
188 * This type is implemented using Int2,
189 * so here we adjust the DEF accordingly.
190 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000191
Lev Walkin725883b2006-10-09 12:07:58 +0000192/*** <<< CTDEFS [Int3] >>> ***/
193
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800194asn_per_constraints_t asn_PER_type_Int3_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000195 { APC_CONSTRAINED, 4, 4, 0, 10 } /* (0..10) */,
196 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
197 0, 0 /* No PER value map */
198};
199
Lev Walkin59b176e2005-11-26 11:25:14 +0000200/*** <<< STAT-DEFS [Int3] >>> ***/
201
Lev Walkina7591b52014-10-12 18:37:35 -0700202static const ber_tlv_tag_t asn_DEF_Int3_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000203 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
204};
Lev Walkin59b176e2005-11-26 11:25:14 +0000205asn_TYPE_descriptor_t asn_DEF_Int3 = {
206 "Int3",
207 "Int3",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800208 &asn_OP_NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000209 Int3_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000210 asn_DEF_Int3_tags_1,
211 sizeof(asn_DEF_Int3_tags_1)
212 /sizeof(asn_DEF_Int3_tags_1[0]), /* 1 */
213 asn_DEF_Int3_tags_1, /* Same as above */
214 sizeof(asn_DEF_Int3_tags_1)
215 /sizeof(asn_DEF_Int3_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400216 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000217 &asn_PER_type_Int3_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000218 0, 0, /* No members */
219 0 /* No specifics */
220};
221
222
223/*** <<< INCLUDES [Int4] >>> ***/
224
Lev Walkin22b5ed42006-09-13 02:51:20 +0000225#include "Int3.h"
Lev Walkin59b176e2005-11-26 11:25:14 +0000226
227/*** <<< TYPE-DECLS [Int4] >>> ***/
228
229typedef Int3_t Int4_t;
230
231/*** <<< FUNC-DECLS [Int4] >>> ***/
232
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800233extern asn_per_constraints_t asn_PER_type_Int4_constr_1;
Lev Walkin59b176e2005-11-26 11:25:14 +0000234extern asn_TYPE_descriptor_t asn_DEF_Int4;
235asn_struct_free_f Int4_free;
236asn_struct_print_f Int4_print;
237asn_constr_check_f Int4_constraint;
238ber_type_decoder_f Int4_decode_ber;
239der_type_encoder_f Int4_encode_der;
240xer_type_decoder_f Int4_decode_xer;
241xer_type_encoder_f Int4_encode_xer;
242per_type_decoder_f Int4_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000243per_type_encoder_f Int4_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000244
245/*** <<< CODE [Int4] >>> ***/
246
247int
248Int4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000249 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000250 long value;
251
252 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700253 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000254 "%s: value not given (%s:%d)",
255 td->name, __FILE__, __LINE__);
256 return -1;
257 }
258
Lev Walkin2a744a72013-03-27 01:56:23 -0700259 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +0000260
261 if((value >= 1 && value <= 10)) {
262 /* Constraint check succeeded */
263 return 0;
264 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700265 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000266 "%s: constraint failed (%s:%d)",
267 td->name, __FILE__, __LINE__);
268 return -1;
269 }
270}
271
272/*
273 * This type is implemented using Int3,
274 * so here we adjust the DEF accordingly.
275 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000276
Lev Walkin725883b2006-10-09 12:07:58 +0000277/*** <<< CTDEFS [Int4] >>> ***/
278
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800279asn_per_constraints_t asn_PER_type_Int4_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000280 { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 1, 10 } /* (1..10,...) */,
281 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
282 0, 0 /* No PER value map */
283};
284
Lev Walkin59b176e2005-11-26 11:25:14 +0000285/*** <<< STAT-DEFS [Int4] >>> ***/
286
Lev Walkina7591b52014-10-12 18:37:35 -0700287static const ber_tlv_tag_t asn_DEF_Int4_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000288 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
289};
Lev Walkin59b176e2005-11-26 11:25:14 +0000290asn_TYPE_descriptor_t asn_DEF_Int4 = {
291 "Int4",
292 "Int4",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800293 &asn_OP_NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000294 Int4_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000295 asn_DEF_Int4_tags_1,
296 sizeof(asn_DEF_Int4_tags_1)
297 /sizeof(asn_DEF_Int4_tags_1[0]), /* 1 */
298 asn_DEF_Int4_tags_1, /* Same as above */
299 sizeof(asn_DEF_Int4_tags_1)
300 /sizeof(asn_DEF_Int4_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400301 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000302 &asn_PER_type_Int4_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000303 0, 0, /* No members */
304 0 /* No specifics */
305};
306
307
308/*** <<< INCLUDES [Int5] >>> ***/
309
Lev Walkin22b5ed42006-09-13 02:51:20 +0000310#include "Int4.h"
Lev Walkin59b176e2005-11-26 11:25:14 +0000311
312/*** <<< TYPE-DECLS [Int5] >>> ***/
313
314typedef Int4_t Int5_t;
315
316/*** <<< FUNC-DECLS [Int5] >>> ***/
317
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800318extern asn_per_constraints_t asn_PER_type_Int5_constr_1;
Lev Walkin59b176e2005-11-26 11:25:14 +0000319extern asn_TYPE_descriptor_t asn_DEF_Int5;
320asn_struct_free_f Int5_free;
321asn_struct_print_f Int5_print;
322asn_constr_check_f Int5_constraint;
323ber_type_decoder_f Int5_decode_ber;
324der_type_encoder_f Int5_encode_der;
325xer_type_decoder_f Int5_decode_xer;
326xer_type_encoder_f Int5_encode_xer;
327per_type_decoder_f Int5_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000328per_type_encoder_f Int5_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000329
330/*** <<< CODE [Int5] >>> ***/
331
332int
333Int5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000334 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000335 long value;
336
337 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700338 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000339 "%s: value not given (%s:%d)",
340 td->name, __FILE__, __LINE__);
341 return -1;
342 }
343
Lev Walkin2a744a72013-03-27 01:56:23 -0700344 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +0000345
346 if((value == 5)) {
347 /* Constraint check succeeded */
348 return 0;
349 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700350 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000351 "%s: constraint failed (%s:%d)",
352 td->name, __FILE__, __LINE__);
353 return -1;
354 }
355}
356
357/*
358 * This type is implemented using Int4,
359 * so here we adjust the DEF accordingly.
360 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000361
Lev Walkin725883b2006-10-09 12:07:58 +0000362/*** <<< CTDEFS [Int5] >>> ***/
363
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800364asn_per_constraints_t asn_PER_type_Int5_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000365 { APC_CONSTRAINED, 0, 0, 5, 5 } /* (5..5) */,
366 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
367 0, 0 /* No PER value map */
368};
369
Lev Walkin59b176e2005-11-26 11:25:14 +0000370/*** <<< STAT-DEFS [Int5] >>> ***/
371
Lev Walkina7591b52014-10-12 18:37:35 -0700372static const ber_tlv_tag_t asn_DEF_Int5_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000373 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
374};
Lev Walkin59b176e2005-11-26 11:25:14 +0000375asn_TYPE_descriptor_t asn_DEF_Int5 = {
376 "Int5",
377 "Int5",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800378 &asn_OP_NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000379 Int5_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000380 asn_DEF_Int5_tags_1,
381 sizeof(asn_DEF_Int5_tags_1)
382 /sizeof(asn_DEF_Int5_tags_1[0]), /* 1 */
383 asn_DEF_Int5_tags_1, /* Same as above */
384 sizeof(asn_DEF_Int5_tags_1)
385 /sizeof(asn_DEF_Int5_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400386 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000387 &asn_PER_type_Int5_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000388 0, 0, /* No members */
389 0 /* No specifics */
390};
391
392
393/*** <<< INCLUDES [ExtensibleExtensions] >>> ***/
394
Lev Walkin2a744a72013-03-27 01:56:23 -0700395#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +0000396
397/*** <<< TYPE-DECLS [ExtensibleExtensions] >>> ***/
398
Lev Walkin2a744a72013-03-27 01:56:23 -0700399typedef long ExtensibleExtensions_t;
Lev Walkin59b176e2005-11-26 11:25:14 +0000400
401/*** <<< FUNC-DECLS [ExtensibleExtensions] >>> ***/
402
403extern asn_TYPE_descriptor_t asn_DEF_ExtensibleExtensions;
404asn_struct_free_f ExtensibleExtensions_free;
405asn_struct_print_f ExtensibleExtensions_print;
406asn_constr_check_f ExtensibleExtensions_constraint;
407ber_type_decoder_f ExtensibleExtensions_decode_ber;
408der_type_encoder_f ExtensibleExtensions_encode_der;
409xer_type_decoder_f ExtensibleExtensions_decode_xer;
410xer_type_encoder_f ExtensibleExtensions_encode_xer;
411per_type_decoder_f ExtensibleExtensions_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000412per_type_encoder_f ExtensibleExtensions_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000413
414/*** <<< CODE [ExtensibleExtensions] >>> ***/
415
416int
417ExtensibleExtensions_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000418 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000419 long value;
420
421 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700422 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000423 "%s: value not given (%s:%d)",
424 td->name, __FILE__, __LINE__);
425 return -1;
426 }
427
Lev Walkin2a744a72013-03-27 01:56:23 -0700428 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +0000429
Lev Walkin0c686452017-09-07 22:59:36 -0700430 if((value >= 1 && value <= 255)) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000431 /* Constraint check succeeded */
432 return 0;
433 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700434 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000435 "%s: constraint failed (%s:%d)",
436 td->name, __FILE__, __LINE__);
437 return -1;
438 }
439}
440
441/*
Lev Walkin2a744a72013-03-27 01:56:23 -0700442 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000443 * so here we adjust the DEF accordingly.
444 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000445
Lev Walkin725883b2006-10-09 12:07:58 +0000446/*** <<< CTDEFS [ExtensibleExtensions] >>> ***/
447
Lev Walkin2fce55d2013-03-28 05:00:39 -0700448static asn_per_constraints_t asn_PER_type_ExtensibleExtensions_constr_1 GCC_NOTUSED = {
Lev Walkin0c686452017-09-07 22:59:36 -0700449 { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 255 } /* (1..255,...) */,
Lev Walkin725883b2006-10-09 12:07:58 +0000450 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
451 0, 0 /* No PER value map */
452};
453
Lev Walkin59b176e2005-11-26 11:25:14 +0000454/*** <<< STAT-DEFS [ExtensibleExtensions] >>> ***/
455
Lev Walkina7591b52014-10-12 18:37:35 -0700456static const ber_tlv_tag_t asn_DEF_ExtensibleExtensions_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000457 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
458};
Lev Walkin59b176e2005-11-26 11:25:14 +0000459asn_TYPE_descriptor_t asn_DEF_ExtensibleExtensions = {
460 "ExtensibleExtensions",
461 "ExtensibleExtensions",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800462 &asn_OP_NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000463 ExtensibleExtensions_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000464 asn_DEF_ExtensibleExtensions_tags_1,
465 sizeof(asn_DEF_ExtensibleExtensions_tags_1)
466 /sizeof(asn_DEF_ExtensibleExtensions_tags_1[0]), /* 1 */
467 asn_DEF_ExtensibleExtensions_tags_1, /* Same as above */
468 sizeof(asn_DEF_ExtensibleExtensions_tags_1)
469 /sizeof(asn_DEF_ExtensibleExtensions_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400470 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000471 &asn_PER_type_ExtensibleExtensions_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000472 0, 0, /* No members */
473 0 /* No specifics */
474};
475
476
477/*** <<< INCLUDES [Str1] >>> ***/
478
479#include <IA5String.h>
480
481/*** <<< TYPE-DECLS [Str1] >>> ***/
482
483typedef IA5String_t Str1_t;
484
485/*** <<< FUNC-DECLS [Str1] >>> ***/
486
487extern asn_TYPE_descriptor_t asn_DEF_Str1;
488asn_struct_free_f Str1_free;
489asn_struct_print_f Str1_print;
490asn_constr_check_f Str1_constraint;
491ber_type_decoder_f Str1_decode_ber;
492der_type_encoder_f Str1_encode_der;
493xer_type_decoder_f Str1_decode_xer;
494xer_type_encoder_f Str1_encode_xer;
495per_type_decoder_f Str1_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000496per_type_encoder_f Str1_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000497
498/*** <<< CODE [Str1] >>> ***/
499
Lev Walkin59b176e2005-11-26 11:25:14 +0000500/*
501 * This type is implemented using IA5String,
502 * so here we adjust the DEF accordingly.
503 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000504
505/*** <<< STAT-DEFS [Str1] >>> ***/
506
Lev Walkina7591b52014-10-12 18:37:35 -0700507static const ber_tlv_tag_t asn_DEF_Str1_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000508 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
509};
510asn_TYPE_descriptor_t asn_DEF_Str1 = {
511 "Str1",
512 "Str1",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800513 &asn_OP_IA5String,
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800514 IA5String_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000515 asn_DEF_Str1_tags_1,
516 sizeof(asn_DEF_Str1_tags_1)
517 /sizeof(asn_DEF_Str1_tags_1[0]), /* 1 */
518 asn_DEF_Str1_tags_1, /* Same as above */
519 sizeof(asn_DEF_Str1_tags_1)
520 /sizeof(asn_DEF_Str1_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400521 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000522 0, /* No PER visible constraints */
523 0, 0, /* No members */
524 0 /* No specifics */
525};
526
527
528/*** <<< INCLUDES [Str2] >>> ***/
529
Lev Walkin22b5ed42006-09-13 02:51:20 +0000530#include "Str1.h"
Lev Walkin59b176e2005-11-26 11:25:14 +0000531
532/*** <<< TYPE-DECLS [Str2] >>> ***/
533
534typedef Str1_t Str2_t;
535
536/*** <<< FUNC-DECLS [Str2] >>> ***/
537
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800538extern asn_per_constraints_t asn_PER_type_Str2_constr_1;
Lev Walkin59b176e2005-11-26 11:25:14 +0000539extern asn_TYPE_descriptor_t asn_DEF_Str2;
540asn_struct_free_f Str2_free;
541asn_struct_print_f Str2_print;
542asn_constr_check_f Str2_constraint;
543ber_type_decoder_f Str2_decode_ber;
544der_type_encoder_f Str2_encode_der;
545xer_type_decoder_f Str2_decode_xer;
546xer_type_encoder_f Str2_encode_xer;
547per_type_decoder_f Str2_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000548per_type_encoder_f Str2_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000549
550/*** <<< CTABLES [Str2] >>> ***/
551
552static int check_permitted_alphabet_1(const void *sptr) {
553 /* The underlying type is IA5String */
554 const IA5String_t *st = (const IA5String_t *)sptr;
555 const uint8_t *ch = st->buf;
556 const uint8_t *end = ch + st->size;
557
558 for(; ch < end; ch++) {
559 uint8_t cv = *ch;
560 if(!(cv <= 127)) return -1;
561 }
562 return 0;
563}
564
565
566/*** <<< CODE [Str2] >>> ***/
567
568int
569Str2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000570 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000571 const Str1_t *st = (const Str1_t *)sptr;
572 size_t size;
573
574 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700575 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000576 "%s: value not given (%s:%d)",
577 td->name, __FILE__, __LINE__);
578 return -1;
579 }
580
581 size = st->size;
582
583 if(((size <= 20) || (size >= 25 && size <= 30))
584 && !check_permitted_alphabet_1(st)) {
585 /* Constraint check succeeded */
586 return 0;
587 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700588 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000589 "%s: constraint failed (%s:%d)",
590 td->name, __FILE__, __LINE__);
591 return -1;
592 }
593}
594
595/*
596 * This type is implemented using Str1,
597 * so here we adjust the DEF accordingly.
598 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000599
Lev Walkin725883b2006-10-09 12:07:58 +0000600/*** <<< CTDEFS [Str2] >>> ***/
601
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800602asn_per_constraints_t asn_PER_type_Str2_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000603 { APC_CONSTRAINED, 7, 7, 0, 127 } /* (0..127) */,
604 { APC_CONSTRAINED, 5, 5, 0, 30 } /* (SIZE(0..30)) */,
605 0, 0 /* No PER character map necessary */
606};
607
Lev Walkin59b176e2005-11-26 11:25:14 +0000608/*** <<< STAT-DEFS [Str2] >>> ***/
609
Lev Walkina7591b52014-10-12 18:37:35 -0700610static const ber_tlv_tag_t asn_DEF_Str2_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000611 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
612};
Lev Walkin59b176e2005-11-26 11:25:14 +0000613asn_TYPE_descriptor_t asn_DEF_Str2 = {
614 "Str2",
615 "Str2",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800616 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +0000617 Str2_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000618 asn_DEF_Str2_tags_1,
619 sizeof(asn_DEF_Str2_tags_1)
620 /sizeof(asn_DEF_Str2_tags_1[0]), /* 1 */
621 asn_DEF_Str2_tags_1, /* Same as above */
622 sizeof(asn_DEF_Str2_tags_1)
623 /sizeof(asn_DEF_Str2_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400624 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000625 &asn_PER_type_Str2_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000626 0, 0, /* No members */
627 0 /* No specifics */
628};
629
630
631/*** <<< INCLUDES [Str3] >>> ***/
632
Lev Walkin22b5ed42006-09-13 02:51:20 +0000633#include "Str2.h"
Lev Walkin59b176e2005-11-26 11:25:14 +0000634
635/*** <<< TYPE-DECLS [Str3] >>> ***/
636
637typedef Str2_t Str3_t;
638
639/*** <<< FUNC-DECLS [Str3] >>> ***/
640
641extern asn_TYPE_descriptor_t asn_DEF_Str3;
642asn_struct_free_f Str3_free;
643asn_struct_print_f Str3_print;
644asn_constr_check_f Str3_constraint;
645ber_type_decoder_f Str3_decode_ber;
646der_type_encoder_f Str3_encode_der;
647xer_type_decoder_f Str3_decode_xer;
648xer_type_encoder_f Str3_encode_xer;
649per_type_decoder_f Str3_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000650per_type_encoder_f Str3_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000651
652/*** <<< CTABLES [Str3] >>> ***/
653
Lev Walkina7591b52014-10-12 18:37:35 -0700654static const int permitted_alphabet_table_1[256] = {
Lev Walkin5b62ca82006-09-21 01:52:07 +0000655 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
656 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
657 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
658 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
659 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ABC */
660 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
661 0, 0, 0, 0, 4, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* def */
Lev Walkin59b176e2005-11-26 11:25:14 +0000662};
Lev Walkina7591b52014-10-12 18:37:35 -0700663static const int permitted_alphabet_code2value_1[6] = {
Lev Walkin5b62ca82006-09-21 01:52:07 +000066465,66,67,100,101,102,};
665
Lev Walkin59b176e2005-11-26 11:25:14 +0000666
667static int check_permitted_alphabet_1(const void *sptr) {
Lev Walkina7591b52014-10-12 18:37:35 -0700668 const int *table = permitted_alphabet_table_1;
Lev Walkin59b176e2005-11-26 11:25:14 +0000669 /* The underlying type is IA5String */
670 const IA5String_t *st = (const IA5String_t *)sptr;
671 const uint8_t *ch = st->buf;
672 const uint8_t *end = ch + st->size;
673
674 for(; ch < end; ch++) {
675 uint8_t cv = *ch;
676 if(!table[cv]) return -1;
677 }
678 return 0;
679}
680
681
682/*** <<< CODE [Str3] >>> ***/
683
684int
685Str3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000686 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000687 const Str2_t *st = (const Str2_t *)sptr;
688 size_t size;
689
690 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700691 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000692 "%s: value not given (%s:%d)",
693 td->name, __FILE__, __LINE__);
694 return -1;
695 }
696
697 size = st->size;
698
699 if(((size >= 10 && size <= 20) || (size >= 25 && size <= 27))
700 && !check_permitted_alphabet_1(st)) {
701 /* Constraint check succeeded */
702 return 0;
703 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700704 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000705 "%s: constraint failed (%s:%d)",
706 td->name, __FILE__, __LINE__);
707 return -1;
708 }
709}
710
Lev Walkin725883b2006-10-09 12:07:58 +0000711static int asn_PER_MAP_Str3_1_v2c(unsigned int value) {
712 if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0]))
713 return -1;
714 return permitted_alphabet_table_1[value] - 1;
715}
716static int asn_PER_MAP_Str3_1_c2v(unsigned int code) {
717 if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0]))
718 return -1;
719 return permitted_alphabet_code2value_1[code];
720}
Lev Walkin59b176e2005-11-26 11:25:14 +0000721/*
722 * This type is implemented using Str2,
723 * so here we adjust the DEF accordingly.
724 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000725
Lev Walkin725883b2006-10-09 12:07:58 +0000726/*** <<< CTDEFS [Str3] >>> ***/
727
Lev Walkin2fce55d2013-03-28 05:00:39 -0700728static asn_per_constraints_t asn_PER_type_Str3_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000729 { APC_CONSTRAINED, 3, 3, 65, 102 } /* (65..102) */,
730 { APC_CONSTRAINED, 5, 5, 10, 27 } /* (SIZE(10..27)) */,
731 asn_PER_MAP_Str3_1_v2c, /* Value to PER code map */
732 asn_PER_MAP_Str3_1_c2v /* PER code to value map */
733};
734
Lev Walkin59b176e2005-11-26 11:25:14 +0000735/*** <<< STAT-DEFS [Str3] >>> ***/
736
Lev Walkina7591b52014-10-12 18:37:35 -0700737static const ber_tlv_tag_t asn_DEF_Str3_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000738 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
739};
Lev Walkin59b176e2005-11-26 11:25:14 +0000740asn_TYPE_descriptor_t asn_DEF_Str3 = {
741 "Str3",
742 "Str3",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800743 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +0000744 Str3_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000745 asn_DEF_Str3_tags_1,
746 sizeof(asn_DEF_Str3_tags_1)
747 /sizeof(asn_DEF_Str3_tags_1[0]), /* 1 */
748 asn_DEF_Str3_tags_1, /* Same as above */
749 sizeof(asn_DEF_Str3_tags_1)
750 /sizeof(asn_DEF_Str3_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400751 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000752 &asn_PER_type_Str3_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000753 0, 0, /* No members */
754 0 /* No specifics */
755};
756
757
758/*** <<< INCLUDES [Str4] >>> ***/
759
760#include <IA5String.h>
761
762/*** <<< TYPE-DECLS [Str4] >>> ***/
763
764typedef IA5String_t Str4_t;
765
766/*** <<< FUNC-DECLS [Str4] >>> ***/
767
768extern asn_TYPE_descriptor_t asn_DEF_Str4;
769asn_struct_free_f Str4_free;
770asn_struct_print_f Str4_print;
771asn_constr_check_f Str4_constraint;
772ber_type_decoder_f Str4_decode_ber;
773der_type_encoder_f Str4_encode_der;
774xer_type_decoder_f Str4_decode_xer;
775xer_type_encoder_f Str4_encode_xer;
776per_type_decoder_f Str4_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000777per_type_encoder_f Str4_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000778
779/*** <<< CTABLES [Str4] >>> ***/
780
781static int check_permitted_alphabet_1(const void *sptr) {
782 /* The underlying type is IA5String */
783 const IA5String_t *st = (const IA5String_t *)sptr;
784 const uint8_t *ch = st->buf;
785 const uint8_t *end = ch + st->size;
786
787 for(; ch < end; ch++) {
788 uint8_t cv = *ch;
789 if(!(cv <= 127)) return -1;
790 }
791 return 0;
792}
793
794
795/*** <<< CODE [Str4] >>> ***/
796
797int
798Str4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000799 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000800 const IA5String_t *st = (const IA5String_t *)sptr;
801
802 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700803 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000804 "%s: value not given (%s:%d)",
805 td->name, __FILE__, __LINE__);
806 return -1;
807 }
808
809
810 if(!check_permitted_alphabet_1(st)) {
811 /* Constraint check succeeded */
812 return 0;
813 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700814 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000815 "%s: constraint failed (%s:%d)",
816 td->name, __FILE__, __LINE__);
817 return -1;
818 }
819}
820
821/*
822 * This type is implemented using IA5String,
823 * so here we adjust the DEF accordingly.
824 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000825
Lev Walkin725883b2006-10-09 12:07:58 +0000826/*** <<< CTDEFS [Str4] >>> ***/
827
Lev Walkin2fce55d2013-03-28 05:00:39 -0700828static asn_per_constraints_t asn_PER_type_Str4_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000829 { APC_CONSTRAINED, 7, 7, 0, 127 } /* (0..127) */,
830 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
831 0, 0 /* No PER character map necessary */
832};
833
Lev Walkin59b176e2005-11-26 11:25:14 +0000834/*** <<< STAT-DEFS [Str4] >>> ***/
835
Lev Walkina7591b52014-10-12 18:37:35 -0700836static const ber_tlv_tag_t asn_DEF_Str4_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000837 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
838};
Lev Walkin59b176e2005-11-26 11:25:14 +0000839asn_TYPE_descriptor_t asn_DEF_Str4 = {
840 "Str4",
841 "Str4",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800842 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +0000843 Str4_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000844 asn_DEF_Str4_tags_1,
845 sizeof(asn_DEF_Str4_tags_1)
846 /sizeof(asn_DEF_Str4_tags_1[0]), /* 1 */
847 asn_DEF_Str4_tags_1, /* Same as above */
848 sizeof(asn_DEF_Str4_tags_1)
849 /sizeof(asn_DEF_Str4_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400850 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000851 &asn_PER_type_Str4_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000852 0, 0, /* No members */
853 0 /* No specifics */
854};
855
856
857/*** <<< INCLUDES [PER-Visible] >>> ***/
858
859#include <IA5String.h>
860
861/*** <<< TYPE-DECLS [PER-Visible] >>> ***/
862
863typedef IA5String_t PER_Visible_t;
864
865/*** <<< FUNC-DECLS [PER-Visible] >>> ***/
866
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800867extern asn_per_constraints_t asn_PER_type_PER_Visible_constr_1;
Lev Walkin59b176e2005-11-26 11:25:14 +0000868extern asn_TYPE_descriptor_t asn_DEF_PER_Visible;
869asn_struct_free_f PER_Visible_free;
870asn_struct_print_f PER_Visible_print;
871asn_constr_check_f PER_Visible_constraint;
872ber_type_decoder_f PER_Visible_decode_ber;
873der_type_encoder_f PER_Visible_encode_der;
874xer_type_decoder_f PER_Visible_decode_xer;
875xer_type_encoder_f PER_Visible_encode_xer;
876per_type_decoder_f PER_Visible_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000877per_type_encoder_f PER_Visible_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000878
879/*** <<< CTABLES [PER-Visible] >>> ***/
880
881static int check_permitted_alphabet_1(const void *sptr) {
882 /* The underlying type is IA5String */
883 const IA5String_t *st = (const IA5String_t *)sptr;
884 const uint8_t *ch = st->buf;
885 const uint8_t *end = ch + st->size;
886
887 for(; ch < end; ch++) {
888 uint8_t cv = *ch;
889 if(!(cv >= 65 && cv <= 70)) return -1;
890 }
891 return 0;
892}
893
894
895/*** <<< CODE [PER-Visible] >>> ***/
896
897int
898PER_Visible_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000899 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000900 const IA5String_t *st = (const IA5String_t *)sptr;
901
902 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700903 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000904 "%s: value not given (%s:%d)",
905 td->name, __FILE__, __LINE__);
906 return -1;
907 }
908
909
910 if(!check_permitted_alphabet_1(st)) {
911 /* Constraint check succeeded */
912 return 0;
913 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700914 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000915 "%s: constraint failed (%s:%d)",
916 td->name, __FILE__, __LINE__);
917 return -1;
918 }
919}
920
921/*
922 * This type is implemented using IA5String,
923 * so here we adjust the DEF accordingly.
924 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000925
Lev Walkin725883b2006-10-09 12:07:58 +0000926/*** <<< CTDEFS [PER-Visible] >>> ***/
927
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800928asn_per_constraints_t asn_PER_type_PER_Visible_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000929 { APC_CONSTRAINED, 3, 3, 65, 70 } /* (65..70) */,
930 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
931 0, 0 /* No PER character map necessary */
932};
933
Lev Walkin59b176e2005-11-26 11:25:14 +0000934/*** <<< STAT-DEFS [PER-Visible] >>> ***/
935
Lev Walkina7591b52014-10-12 18:37:35 -0700936static const ber_tlv_tag_t asn_DEF_PER_Visible_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000937 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
938};
Lev Walkin59b176e2005-11-26 11:25:14 +0000939asn_TYPE_descriptor_t asn_DEF_PER_Visible = {
940 "PER-Visible",
941 "PER-Visible",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800942 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +0000943 PER_Visible_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000944 asn_DEF_PER_Visible_tags_1,
945 sizeof(asn_DEF_PER_Visible_tags_1)
946 /sizeof(asn_DEF_PER_Visible_tags_1[0]), /* 1 */
947 asn_DEF_PER_Visible_tags_1, /* Same as above */
948 sizeof(asn_DEF_PER_Visible_tags_1)
949 /sizeof(asn_DEF_PER_Visible_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400950 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000951 &asn_PER_type_PER_Visible_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000952 0, 0, /* No members */
953 0 /* No specifics */
954};
955
956
957/*** <<< INCLUDES [PER-Visible-2] >>> ***/
958
Lev Walkin22b5ed42006-09-13 02:51:20 +0000959#include "PER-Visible.h"
Lev Walkin59b176e2005-11-26 11:25:14 +0000960
961/*** <<< TYPE-DECLS [PER-Visible-2] >>> ***/
962
963typedef PER_Visible_t PER_Visible_2_t;
964
965/*** <<< FUNC-DECLS [PER-Visible-2] >>> ***/
966
967extern asn_TYPE_descriptor_t asn_DEF_PER_Visible_2;
968asn_struct_free_f PER_Visible_2_free;
969asn_struct_print_f PER_Visible_2_print;
970asn_constr_check_f PER_Visible_2_constraint;
971ber_type_decoder_f PER_Visible_2_decode_ber;
972der_type_encoder_f PER_Visible_2_encode_der;
973xer_type_decoder_f PER_Visible_2_decode_xer;
974xer_type_encoder_f PER_Visible_2_encode_xer;
975per_type_decoder_f PER_Visible_2_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000976per_type_encoder_f PER_Visible_2_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000977
978/*** <<< CTABLES [PER-Visible-2] >>> ***/
979
980static int check_permitted_alphabet_1(const void *sptr) {
981 /* The underlying type is IA5String */
982 const IA5String_t *st = (const IA5String_t *)sptr;
983 const uint8_t *ch = st->buf;
984 const uint8_t *end = ch + st->size;
985
986 for(; ch < end; ch++) {
987 uint8_t cv = *ch;
988 if(!(cv >= 69 && cv <= 70)) return -1;
989 }
990 return 0;
991}
992
993
994/*** <<< CODE [PER-Visible-2] >>> ***/
995
996int
997PER_Visible_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000998 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000999 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1000
1001 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001002 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001003 "%s: value not given (%s:%d)",
1004 td->name, __FILE__, __LINE__);
1005 return -1;
1006 }
1007
1008
1009 if(!check_permitted_alphabet_1(st)) {
1010 /* Constraint check succeeded */
1011 return 0;
1012 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001013 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001014 "%s: constraint failed (%s:%d)",
1015 td->name, __FILE__, __LINE__);
1016 return -1;
1017 }
1018}
1019
1020/*
1021 * This type is implemented using PER_Visible,
1022 * so here we adjust the DEF accordingly.
1023 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001024
Lev Walkin725883b2006-10-09 12:07:58 +00001025/*** <<< CTDEFS [PER-Visible-2] >>> ***/
1026
Lev Walkin2fce55d2013-03-28 05:00:39 -07001027static asn_per_constraints_t asn_PER_type_PER_Visible_2_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001028 { APC_CONSTRAINED, 1, 1, 69, 70 } /* (69..70) */,
1029 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
1030 0, 0 /* No PER character map necessary */
1031};
1032
Lev Walkin59b176e2005-11-26 11:25:14 +00001033/*** <<< STAT-DEFS [PER-Visible-2] >>> ***/
1034
Lev Walkina7591b52014-10-12 18:37:35 -07001035static const ber_tlv_tag_t asn_DEF_PER_Visible_2_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001036 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1037};
Lev Walkin59b176e2005-11-26 11:25:14 +00001038asn_TYPE_descriptor_t asn_DEF_PER_Visible_2 = {
1039 "PER-Visible-2",
1040 "PER-Visible-2",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001041 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001042 PER_Visible_2_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +00001043 asn_DEF_PER_Visible_2_tags_1,
1044 sizeof(asn_DEF_PER_Visible_2_tags_1)
1045 /sizeof(asn_DEF_PER_Visible_2_tags_1[0]), /* 1 */
1046 asn_DEF_PER_Visible_2_tags_1, /* Same as above */
1047 sizeof(asn_DEF_PER_Visible_2_tags_1)
1048 /sizeof(asn_DEF_PER_Visible_2_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04001049 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001050 &asn_PER_type_PER_Visible_2_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001051 0, 0, /* No members */
1052 0 /* No specifics */
1053};
1054
1055
1056/*** <<< INCLUDES [Not-PER-Visible-1] >>> ***/
1057
Lev Walkin22b5ed42006-09-13 02:51:20 +00001058#include "PER-Visible.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001059
1060/*** <<< TYPE-DECLS [Not-PER-Visible-1] >>> ***/
1061
1062typedef PER_Visible_t Not_PER_Visible_1_t;
1063
1064/*** <<< FUNC-DECLS [Not-PER-Visible-1] >>> ***/
1065
1066extern asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_1;
1067asn_struct_free_f Not_PER_Visible_1_free;
1068asn_struct_print_f Not_PER_Visible_1_print;
1069asn_constr_check_f Not_PER_Visible_1_constraint;
1070ber_type_decoder_f Not_PER_Visible_1_decode_ber;
1071der_type_encoder_f Not_PER_Visible_1_encode_der;
1072xer_type_decoder_f Not_PER_Visible_1_decode_xer;
1073xer_type_encoder_f Not_PER_Visible_1_encode_xer;
1074per_type_decoder_f Not_PER_Visible_1_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001075per_type_encoder_f Not_PER_Visible_1_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001076
1077/*** <<< CTABLES [Not-PER-Visible-1] >>> ***/
1078
1079static int check_permitted_alphabet_1(const void *sptr) {
1080 /* The underlying type is IA5String */
1081 const IA5String_t *st = (const IA5String_t *)sptr;
1082 const uint8_t *ch = st->buf;
1083 const uint8_t *end = ch + st->size;
1084
1085 for(; ch < end; ch++) {
1086 uint8_t cv = *ch;
1087 if(!(cv >= 65 && cv <= 70)) return -1;
1088 }
1089 return 0;
1090}
1091
1092
1093/*** <<< CODE [Not-PER-Visible-1] >>> ***/
1094
1095int
1096Not_PER_Visible_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001097 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001098 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1099
1100 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001101 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001102 "%s: value not given (%s:%d)",
1103 td->name, __FILE__, __LINE__);
1104 return -1;
1105 }
1106
1107
1108 if(!check_permitted_alphabet_1(st)) {
1109 /* Constraint check succeeded */
1110 return 0;
1111 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001112 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001113 "%s: constraint failed (%s:%d)",
1114 td->name, __FILE__, __LINE__);
1115 return -1;
1116 }
1117}
1118
1119/*
1120 * This type is implemented using PER_Visible,
1121 * so here we adjust the DEF accordingly.
1122 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001123
Lev Walkin725883b2006-10-09 12:07:58 +00001124/*** <<< CTDEFS [Not-PER-Visible-1] >>> ***/
1125
Lev Walkin2fce55d2013-03-28 05:00:39 -07001126static asn_per_constraints_t asn_PER_type_Not_PER_Visible_1_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001127 { APC_CONSTRAINED, 3, 3, 65, 70 } /* (65..70) */,
1128 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
1129 0, 0 /* No PER character map necessary */
1130};
1131
Lev Walkin59b176e2005-11-26 11:25:14 +00001132/*** <<< STAT-DEFS [Not-PER-Visible-1] >>> ***/
1133
Lev Walkina7591b52014-10-12 18:37:35 -07001134static const ber_tlv_tag_t asn_DEF_Not_PER_Visible_1_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001135 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1136};
Lev Walkin59b176e2005-11-26 11:25:14 +00001137asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_1 = {
1138 "Not-PER-Visible-1",
1139 "Not-PER-Visible-1",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001140 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001141 Not_PER_Visible_1_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +00001142 asn_DEF_Not_PER_Visible_1_tags_1,
1143 sizeof(asn_DEF_Not_PER_Visible_1_tags_1)
1144 /sizeof(asn_DEF_Not_PER_Visible_1_tags_1[0]), /* 1 */
1145 asn_DEF_Not_PER_Visible_1_tags_1, /* Same as above */
1146 sizeof(asn_DEF_Not_PER_Visible_1_tags_1)
1147 /sizeof(asn_DEF_Not_PER_Visible_1_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04001148 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001149 &asn_PER_type_Not_PER_Visible_1_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001150 0, 0, /* No members */
1151 0 /* No specifics */
1152};
1153
1154
1155/*** <<< INCLUDES [Not-PER-Visible-2] >>> ***/
1156
Lev Walkin22b5ed42006-09-13 02:51:20 +00001157#include "PER-Visible.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001158
1159/*** <<< TYPE-DECLS [Not-PER-Visible-2] >>> ***/
1160
1161typedef PER_Visible_t Not_PER_Visible_2_t;
1162
1163/*** <<< FUNC-DECLS [Not-PER-Visible-2] >>> ***/
1164
1165extern asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_2;
1166asn_struct_free_f Not_PER_Visible_2_free;
1167asn_struct_print_f Not_PER_Visible_2_print;
1168asn_constr_check_f Not_PER_Visible_2_constraint;
1169ber_type_decoder_f Not_PER_Visible_2_decode_ber;
1170der_type_encoder_f Not_PER_Visible_2_encode_der;
1171xer_type_decoder_f Not_PER_Visible_2_decode_xer;
1172xer_type_encoder_f Not_PER_Visible_2_encode_xer;
1173per_type_decoder_f Not_PER_Visible_2_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001174per_type_encoder_f Not_PER_Visible_2_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001175
1176/*** <<< CTABLES [Not-PER-Visible-2] >>> ***/
1177
1178static int check_permitted_alphabet_1(const void *sptr) {
1179 /* The underlying type is IA5String */
1180 const IA5String_t *st = (const IA5String_t *)sptr;
1181 const uint8_t *ch = st->buf;
1182 const uint8_t *end = ch + st->size;
1183
1184 for(; ch < end; ch++) {
1185 uint8_t cv = *ch;
1186 if(!(cv >= 65 && cv <= 66)) return -1;
1187 }
1188 return 0;
1189}
1190
1191
1192/*** <<< CODE [Not-PER-Visible-2] >>> ***/
1193
1194int
1195Not_PER_Visible_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001196 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001197 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1198
1199 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001200 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001201 "%s: value not given (%s:%d)",
1202 td->name, __FILE__, __LINE__);
1203 return -1;
1204 }
1205
1206
1207 if(!check_permitted_alphabet_1(st)) {
1208 /* Constraint check succeeded */
1209 return 0;
1210 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001211 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001212 "%s: constraint failed (%s:%d)",
1213 td->name, __FILE__, __LINE__);
1214 return -1;
1215 }
1216}
1217
1218/*
1219 * This type is implemented using PER_Visible,
1220 * so here we adjust the DEF accordingly.
1221 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001222
Lev Walkin725883b2006-10-09 12:07:58 +00001223/*** <<< CTDEFS [Not-PER-Visible-2] >>> ***/
1224
Lev Walkin2fce55d2013-03-28 05:00:39 -07001225static asn_per_constraints_t asn_PER_type_Not_PER_Visible_2_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001226 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1227 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
1228 0, 0 /* No PER character map necessary */
1229};
1230
Lev Walkin59b176e2005-11-26 11:25:14 +00001231/*** <<< STAT-DEFS [Not-PER-Visible-2] >>> ***/
1232
Lev Walkina7591b52014-10-12 18:37:35 -07001233static const ber_tlv_tag_t asn_DEF_Not_PER_Visible_2_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001234 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1235};
Lev Walkin59b176e2005-11-26 11:25:14 +00001236asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_2 = {
1237 "Not-PER-Visible-2",
1238 "Not-PER-Visible-2",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001239 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001240 Not_PER_Visible_2_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +00001241 asn_DEF_Not_PER_Visible_2_tags_1,
1242 sizeof(asn_DEF_Not_PER_Visible_2_tags_1)
1243 /sizeof(asn_DEF_Not_PER_Visible_2_tags_1[0]), /* 1 */
1244 asn_DEF_Not_PER_Visible_2_tags_1, /* Same as above */
1245 sizeof(asn_DEF_Not_PER_Visible_2_tags_1)
1246 /sizeof(asn_DEF_Not_PER_Visible_2_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04001247 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001248 &asn_PER_type_Not_PER_Visible_2_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001249 0, 0, /* No members */
1250 0 /* No specifics */
1251};
1252
1253
1254/*** <<< INCLUDES [Not-PER-Visible-3] >>> ***/
1255
Lev Walkin22b5ed42006-09-13 02:51:20 +00001256#include "PER-Visible.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001257
1258/*** <<< TYPE-DECLS [Not-PER-Visible-3] >>> ***/
1259
1260typedef PER_Visible_t Not_PER_Visible_3_t;
1261
1262/*** <<< FUNC-DECLS [Not-PER-Visible-3] >>> ***/
1263
1264extern asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_3;
1265asn_struct_free_f Not_PER_Visible_3_free;
1266asn_struct_print_f Not_PER_Visible_3_print;
1267asn_constr_check_f Not_PER_Visible_3_constraint;
1268ber_type_decoder_f Not_PER_Visible_3_decode_ber;
1269der_type_encoder_f Not_PER_Visible_3_encode_der;
1270xer_type_decoder_f Not_PER_Visible_3_decode_xer;
1271xer_type_encoder_f Not_PER_Visible_3_encode_xer;
1272per_type_decoder_f Not_PER_Visible_3_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001273per_type_encoder_f Not_PER_Visible_3_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001274
1275/*** <<< CTABLES [Not-PER-Visible-3] >>> ***/
1276
1277static int check_permitted_alphabet_1(const void *sptr) {
1278 /* The underlying type is IA5String */
1279 const IA5String_t *st = (const IA5String_t *)sptr;
1280 const uint8_t *ch = st->buf;
1281 const uint8_t *end = ch + st->size;
1282
1283 for(; ch < end; ch++) {
1284 uint8_t cv = *ch;
1285 if(!(cv >= 65 && cv <= 66)) return -1;
1286 }
1287 return 0;
1288}
1289
1290
1291/*** <<< CODE [Not-PER-Visible-3] >>> ***/
1292
1293int
1294Not_PER_Visible_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001295 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001296 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1297
1298 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001299 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001300 "%s: value not given (%s:%d)",
1301 td->name, __FILE__, __LINE__);
1302 return -1;
1303 }
1304
1305
1306 if(!check_permitted_alphabet_1(st)) {
1307 /* Constraint check succeeded */
1308 return 0;
1309 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001310 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001311 "%s: constraint failed (%s:%d)",
1312 td->name, __FILE__, __LINE__);
1313 return -1;
1314 }
1315}
1316
1317/*
1318 * This type is implemented using PER_Visible,
1319 * so here we adjust the DEF accordingly.
1320 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001321
Lev Walkin725883b2006-10-09 12:07:58 +00001322/*** <<< CTDEFS [Not-PER-Visible-3] >>> ***/
1323
Lev Walkin2fce55d2013-03-28 05:00:39 -07001324static asn_per_constraints_t asn_PER_type_Not_PER_Visible_3_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001325 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1326 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
1327 0, 0 /* No PER character map necessary */
1328};
1329
Lev Walkin59b176e2005-11-26 11:25:14 +00001330/*** <<< STAT-DEFS [Not-PER-Visible-3] >>> ***/
1331
Lev Walkina7591b52014-10-12 18:37:35 -07001332static const ber_tlv_tag_t asn_DEF_Not_PER_Visible_3_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001333 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1334};
Lev Walkin59b176e2005-11-26 11:25:14 +00001335asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_3 = {
1336 "Not-PER-Visible-3",
1337 "Not-PER-Visible-3",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001338 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001339 Not_PER_Visible_3_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +00001340 asn_DEF_Not_PER_Visible_3_tags_1,
1341 sizeof(asn_DEF_Not_PER_Visible_3_tags_1)
1342 /sizeof(asn_DEF_Not_PER_Visible_3_tags_1[0]), /* 1 */
1343 asn_DEF_Not_PER_Visible_3_tags_1, /* Same as above */
1344 sizeof(asn_DEF_Not_PER_Visible_3_tags_1)
1345 /sizeof(asn_DEF_Not_PER_Visible_3_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04001346 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001347 &asn_PER_type_Not_PER_Visible_3_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001348 0, 0, /* No members */
1349 0 /* No specifics */
1350};
1351
1352
1353/*** <<< INCLUDES [SIZE-but-not-FROM] >>> ***/
1354
Lev Walkin22b5ed42006-09-13 02:51:20 +00001355#include "PER-Visible.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001356
1357/*** <<< TYPE-DECLS [SIZE-but-not-FROM] >>> ***/
1358
1359typedef PER_Visible_t SIZE_but_not_FROM_t;
1360
1361/*** <<< FUNC-DECLS [SIZE-but-not-FROM] >>> ***/
1362
1363extern asn_TYPE_descriptor_t asn_DEF_SIZE_but_not_FROM;
1364asn_struct_free_f SIZE_but_not_FROM_free;
1365asn_struct_print_f SIZE_but_not_FROM_print;
1366asn_constr_check_f SIZE_but_not_FROM_constraint;
1367ber_type_decoder_f SIZE_but_not_FROM_decode_ber;
1368der_type_encoder_f SIZE_but_not_FROM_encode_der;
1369xer_type_decoder_f SIZE_but_not_FROM_decode_xer;
1370xer_type_encoder_f SIZE_but_not_FROM_encode_xer;
1371per_type_decoder_f SIZE_but_not_FROM_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001372per_type_encoder_f SIZE_but_not_FROM_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001373
1374/*** <<< CTABLES [SIZE-but-not-FROM] >>> ***/
1375
1376static int check_permitted_alphabet_1(const void *sptr) {
1377 /* The underlying type is IA5String */
1378 const IA5String_t *st = (const IA5String_t *)sptr;
1379 const uint8_t *ch = st->buf;
1380 const uint8_t *end = ch + st->size;
1381
1382 for(; ch < end; ch++) {
1383 uint8_t cv = *ch;
1384 if(!(cv >= 65 && cv <= 68)) return -1;
1385 }
1386 return 0;
1387}
1388
1389
1390/*** <<< CODE [SIZE-but-not-FROM] >>> ***/
1391
1392int
1393SIZE_but_not_FROM_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001394 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001395 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1396 size_t size;
1397
1398 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001399 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001400 "%s: value not given (%s:%d)",
1401 td->name, __FILE__, __LINE__);
1402 return -1;
1403 }
1404
1405 size = st->size;
1406
1407 if((size >= 1 && size <= 4)
1408 && !check_permitted_alphabet_1(st)) {
1409 /* Constraint check succeeded */
1410 return 0;
1411 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001412 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001413 "%s: constraint failed (%s:%d)",
1414 td->name, __FILE__, __LINE__);
1415 return -1;
1416 }
1417}
1418
1419/*
1420 * This type is implemented using PER_Visible,
1421 * so here we adjust the DEF accordingly.
1422 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001423
Lev Walkin725883b2006-10-09 12:07:58 +00001424/*** <<< CTDEFS [SIZE-but-not-FROM] >>> ***/
1425
Lev Walkin2fce55d2013-03-28 05:00:39 -07001426static asn_per_constraints_t asn_PER_type_SIZE_but_not_FROM_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001427 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1428 { APC_CONSTRAINED, 2, 2, 1, 4 } /* (SIZE(1..4)) */,
1429 0, 0 /* No PER character map necessary */
1430};
1431
Lev Walkin59b176e2005-11-26 11:25:14 +00001432/*** <<< STAT-DEFS [SIZE-but-not-FROM] >>> ***/
1433
Lev Walkina7591b52014-10-12 18:37:35 -07001434static const ber_tlv_tag_t asn_DEF_SIZE_but_not_FROM_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001435 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1436};
Lev Walkin59b176e2005-11-26 11:25:14 +00001437asn_TYPE_descriptor_t asn_DEF_SIZE_but_not_FROM = {
1438 "SIZE-but-not-FROM",
1439 "SIZE-but-not-FROM",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001440 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001441 SIZE_but_not_FROM_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +00001442 asn_DEF_SIZE_but_not_FROM_tags_1,
1443 sizeof(asn_DEF_SIZE_but_not_FROM_tags_1)
1444 /sizeof(asn_DEF_SIZE_but_not_FROM_tags_1[0]), /* 1 */
1445 asn_DEF_SIZE_but_not_FROM_tags_1, /* Same as above */
1446 sizeof(asn_DEF_SIZE_but_not_FROM_tags_1)
1447 /sizeof(asn_DEF_SIZE_but_not_FROM_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04001448 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001449 &asn_PER_type_SIZE_but_not_FROM_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001450 0, 0, /* No members */
1451 0 /* No specifics */
1452};
1453
1454
1455/*** <<< INCLUDES [SIZE-and-FROM] >>> ***/
1456
Lev Walkin22b5ed42006-09-13 02:51:20 +00001457#include "PER-Visible.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001458
1459/*** <<< TYPE-DECLS [SIZE-and-FROM] >>> ***/
1460
1461typedef PER_Visible_t SIZE_and_FROM_t;
1462
1463/*** <<< FUNC-DECLS [SIZE-and-FROM] >>> ***/
1464
1465extern asn_TYPE_descriptor_t asn_DEF_SIZE_and_FROM;
1466asn_struct_free_f SIZE_and_FROM_free;
1467asn_struct_print_f SIZE_and_FROM_print;
1468asn_constr_check_f SIZE_and_FROM_constraint;
1469ber_type_decoder_f SIZE_and_FROM_decode_ber;
1470der_type_encoder_f SIZE_and_FROM_encode_der;
1471xer_type_decoder_f SIZE_and_FROM_decode_xer;
1472xer_type_encoder_f SIZE_and_FROM_encode_xer;
1473per_type_decoder_f SIZE_and_FROM_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001474per_type_encoder_f SIZE_and_FROM_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001475
1476/*** <<< CTABLES [SIZE-and-FROM] >>> ***/
1477
1478static int check_permitted_alphabet_1(const void *sptr) {
1479 /* The underlying type is IA5String */
1480 const IA5String_t *st = (const IA5String_t *)sptr;
1481 const uint8_t *ch = st->buf;
1482 const uint8_t *end = ch + st->size;
1483
1484 for(; ch < end; ch++) {
1485 uint8_t cv = *ch;
1486 if(!(cv >= 65 && cv <= 68)) return -1;
1487 }
1488 return 0;
1489}
1490
1491
1492/*** <<< CODE [SIZE-and-FROM] >>> ***/
1493
1494int
1495SIZE_and_FROM_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001496 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001497 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1498 size_t size;
1499
1500 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001501 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001502 "%s: value not given (%s:%d)",
1503 td->name, __FILE__, __LINE__);
1504 return -1;
1505 }
1506
1507 size = st->size;
1508
1509 if((size >= 1 && size <= 4)
1510 && !check_permitted_alphabet_1(st)) {
1511 /* Constraint check succeeded */
1512 return 0;
1513 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001514 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001515 "%s: constraint failed (%s:%d)",
1516 td->name, __FILE__, __LINE__);
1517 return -1;
1518 }
1519}
1520
1521/*
1522 * This type is implemented using PER_Visible,
1523 * so here we adjust the DEF accordingly.
1524 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001525
Lev Walkin725883b2006-10-09 12:07:58 +00001526/*** <<< CTDEFS [SIZE-and-FROM] >>> ***/
1527
Lev Walkin2fce55d2013-03-28 05:00:39 -07001528static asn_per_constraints_t asn_PER_type_SIZE_and_FROM_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001529 { APC_CONSTRAINED, 2, 2, 65, 68 } /* (65..68) */,
1530 { APC_CONSTRAINED, 2, 2, 1, 4 } /* (SIZE(1..4)) */,
1531 0, 0 /* No PER character map necessary */
1532};
1533
Lev Walkin59b176e2005-11-26 11:25:14 +00001534/*** <<< STAT-DEFS [SIZE-and-FROM] >>> ***/
1535
Lev Walkina7591b52014-10-12 18:37:35 -07001536static const ber_tlv_tag_t asn_DEF_SIZE_and_FROM_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001537 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1538};
Lev Walkin59b176e2005-11-26 11:25:14 +00001539asn_TYPE_descriptor_t asn_DEF_SIZE_and_FROM = {
1540 "SIZE-and-FROM",
1541 "SIZE-and-FROM",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001542 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001543 SIZE_and_FROM_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +00001544 asn_DEF_SIZE_and_FROM_tags_1,
1545 sizeof(asn_DEF_SIZE_and_FROM_tags_1)
1546 /sizeof(asn_DEF_SIZE_and_FROM_tags_1[0]), /* 1 */
1547 asn_DEF_SIZE_and_FROM_tags_1, /* Same as above */
1548 sizeof(asn_DEF_SIZE_and_FROM_tags_1)
1549 /sizeof(asn_DEF_SIZE_and_FROM_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04001550 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001551 &asn_PER_type_SIZE_and_FROM_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001552 0, 0, /* No members */
1553 0 /* No specifics */
1554};
1555
1556
1557/*** <<< INCLUDES [Neither-SIZE-nor-FROM] >>> ***/
1558
Lev Walkin22b5ed42006-09-13 02:51:20 +00001559#include "PER-Visible.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001560
1561/*** <<< TYPE-DECLS [Neither-SIZE-nor-FROM] >>> ***/
1562
1563typedef PER_Visible_t Neither_SIZE_nor_FROM_t;
1564
1565/*** <<< FUNC-DECLS [Neither-SIZE-nor-FROM] >>> ***/
1566
1567extern asn_TYPE_descriptor_t asn_DEF_Neither_SIZE_nor_FROM;
1568asn_struct_free_f Neither_SIZE_nor_FROM_free;
1569asn_struct_print_f Neither_SIZE_nor_FROM_print;
1570asn_constr_check_f Neither_SIZE_nor_FROM_constraint;
1571ber_type_decoder_f Neither_SIZE_nor_FROM_decode_ber;
1572der_type_encoder_f Neither_SIZE_nor_FROM_encode_der;
1573xer_type_decoder_f Neither_SIZE_nor_FROM_decode_xer;
1574xer_type_encoder_f Neither_SIZE_nor_FROM_encode_xer;
1575per_type_decoder_f Neither_SIZE_nor_FROM_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001576per_type_encoder_f Neither_SIZE_nor_FROM_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001577
1578/*** <<< CTABLES [Neither-SIZE-nor-FROM] >>> ***/
1579
1580static int check_permitted_alphabet_1(const void *sptr) {
1581 /* The underlying type is IA5String */
1582 const IA5String_t *st = (const IA5String_t *)sptr;
1583 const uint8_t *ch = st->buf;
1584 const uint8_t *end = ch + st->size;
1585
1586 for(; ch < end; ch++) {
1587 uint8_t cv = *ch;
1588 if(!(cv >= 65 && cv <= 70)) return -1;
1589 }
1590 return 0;
1591}
1592
1593
1594/*** <<< CODE [Neither-SIZE-nor-FROM] >>> ***/
1595
1596int
1597Neither_SIZE_nor_FROM_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001598 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001599 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1600
1601 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001602 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001603 "%s: value not given (%s:%d)",
1604 td->name, __FILE__, __LINE__);
1605 return -1;
1606 }
1607
1608
1609 if(!check_permitted_alphabet_1(st)) {
1610 /* Constraint check succeeded */
1611 return 0;
1612 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001613 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001614 "%s: constraint failed (%s:%d)",
1615 td->name, __FILE__, __LINE__);
1616 return -1;
1617 }
1618}
1619
1620/*
1621 * This type is implemented using PER_Visible,
1622 * so here we adjust the DEF accordingly.
1623 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001624
Lev Walkin725883b2006-10-09 12:07:58 +00001625/*** <<< CTDEFS [Neither-SIZE-nor-FROM] >>> ***/
1626
Lev Walkin2fce55d2013-03-28 05:00:39 -07001627static asn_per_constraints_t asn_PER_type_Neither_SIZE_nor_FROM_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001628 { APC_CONSTRAINED, 3, 3, 65, 70 } /* (65..70) */,
1629 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
1630 0, 0 /* No PER character map necessary */
1631};
1632
Lev Walkin59b176e2005-11-26 11:25:14 +00001633/*** <<< STAT-DEFS [Neither-SIZE-nor-FROM] >>> ***/
1634
Lev Walkina7591b52014-10-12 18:37:35 -07001635static const ber_tlv_tag_t asn_DEF_Neither_SIZE_nor_FROM_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001636 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1637};
Lev Walkin59b176e2005-11-26 11:25:14 +00001638asn_TYPE_descriptor_t asn_DEF_Neither_SIZE_nor_FROM = {
1639 "Neither-SIZE-nor-FROM",
1640 "Neither-SIZE-nor-FROM",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001641 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001642 Neither_SIZE_nor_FROM_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +00001643 asn_DEF_Neither_SIZE_nor_FROM_tags_1,
1644 sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1)
1645 /sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1[0]), /* 1 */
1646 asn_DEF_Neither_SIZE_nor_FROM_tags_1, /* Same as above */
1647 sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1)
1648 /sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04001649 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001650 &asn_PER_type_Neither_SIZE_nor_FROM_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001651 0, 0, /* No members */
1652 0 /* No specifics */
1653};
1654
1655
1656/*** <<< INCLUDES [Utf8-4] >>> ***/
1657
1658#include <UTF8String.h>
1659
1660/*** <<< TYPE-DECLS [Utf8-4] >>> ***/
1661
1662typedef UTF8String_t Utf8_4_t;
1663
1664/*** <<< FUNC-DECLS [Utf8-4] >>> ***/
1665
1666extern asn_TYPE_descriptor_t asn_DEF_Utf8_4;
1667asn_struct_free_f Utf8_4_free;
1668asn_struct_print_f Utf8_4_print;
1669asn_constr_check_f Utf8_4_constraint;
1670ber_type_decoder_f Utf8_4_decode_ber;
1671der_type_encoder_f Utf8_4_encode_der;
1672xer_type_decoder_f Utf8_4_decode_xer;
1673xer_type_encoder_f Utf8_4_encode_xer;
1674per_type_decoder_f Utf8_4_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001675per_type_encoder_f Utf8_4_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001676
1677/*** <<< CTABLES [Utf8-4] >>> ***/
1678
1679static int check_permitted_alphabet_1(const void *sptr) {
1680 if(UTF8String_length((const UTF8String_t *)sptr) < 0)
1681 return -1; /* Alphabet (sic!) test failed. */
1682
1683 return 0;
1684}
1685
1686
1687/*** <<< CODE [Utf8-4] >>> ***/
1688
1689int
1690Utf8_4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001691 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001692 const UTF8String_t *st = (const UTF8String_t *)sptr;
1693
1694 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001695 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001696 "%s: value not given (%s:%d)",
1697 td->name, __FILE__, __LINE__);
1698 return -1;
1699 }
1700
1701
1702 if(!check_permitted_alphabet_1(st)) {
1703 /* Constraint check succeeded */
1704 return 0;
1705 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001706 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001707 "%s: constraint failed (%s:%d)",
1708 td->name, __FILE__, __LINE__);
1709 return -1;
1710 }
1711}
1712
1713/*
1714 * This type is implemented using UTF8String,
1715 * so here we adjust the DEF accordingly.
1716 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001717
Lev Walkin725883b2006-10-09 12:07:58 +00001718/*** <<< CTDEFS [Utf8-4] >>> ***/
1719
Lev Walkin2fce55d2013-03-28 05:00:39 -07001720static asn_per_constraints_t asn_PER_type_Utf8_4_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001721 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1722 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1723 0, 0 /* No PER value map */
1724};
1725
Lev Walkin59b176e2005-11-26 11:25:14 +00001726/*** <<< STAT-DEFS [Utf8-4] >>> ***/
1727
Lev Walkina7591b52014-10-12 18:37:35 -07001728static const ber_tlv_tag_t asn_DEF_Utf8_4_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001729 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
1730};
Lev Walkin59b176e2005-11-26 11:25:14 +00001731asn_TYPE_descriptor_t asn_DEF_Utf8_4 = {
1732 "Utf8-4",
1733 "Utf8-4",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001734 &asn_OP_UTF8String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001735 Utf8_4_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +00001736 asn_DEF_Utf8_4_tags_1,
1737 sizeof(asn_DEF_Utf8_4_tags_1)
1738 /sizeof(asn_DEF_Utf8_4_tags_1[0]), /* 1 */
1739 asn_DEF_Utf8_4_tags_1, /* Same as above */
1740 sizeof(asn_DEF_Utf8_4_tags_1)
1741 /sizeof(asn_DEF_Utf8_4_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04001742 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001743 &asn_PER_type_Utf8_4_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001744 0, 0, /* No members */
1745 0 /* No specifics */
1746};
1747
1748
1749/*** <<< INCLUDES [Utf8-3] >>> ***/
1750
Lev Walkin22b5ed42006-09-13 02:51:20 +00001751#include "Utf8-2.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001752
1753/*** <<< TYPE-DECLS [Utf8-3] >>> ***/
1754
1755typedef Utf8_2_t Utf8_3_t;
1756
1757/*** <<< FUNC-DECLS [Utf8-3] >>> ***/
1758
1759extern asn_TYPE_descriptor_t asn_DEF_Utf8_3;
1760asn_struct_free_f Utf8_3_free;
1761asn_struct_print_f Utf8_3_print;
1762asn_constr_check_f Utf8_3_constraint;
1763ber_type_decoder_f Utf8_3_decode_ber;
1764der_type_encoder_f Utf8_3_encode_der;
1765xer_type_decoder_f Utf8_3_decode_xer;
1766xer_type_encoder_f Utf8_3_encode_xer;
1767per_type_decoder_f Utf8_3_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001768per_type_encoder_f Utf8_3_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001769
1770/*** <<< CTABLES [Utf8-3] >>> ***/
1771
Lev Walkina7591b52014-10-12 18:37:35 -07001772static const int permitted_alphabet_table_1[128] = {
Lev Walkin5b62ca82006-09-21 01:52:07 +00001773 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
1774 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
1775 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
1776 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
1777 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15, /* ABCDEFGHIJKLMNO */
177816,17,18,19,20,21,22,23,24,25,26, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */
1779 0,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41, /* abcdefghijklmno */
178042,43,44,45,46,47,48,49,50,51,52, 0, 0, 0, 0, 0, /* pqrstuvwxyz */
Lev Walkin59b176e2005-11-26 11:25:14 +00001781};
1782
1783static int check_permitted_alphabet_1(const void *sptr) {
Lev Walkina7591b52014-10-12 18:37:35 -07001784 const int *table = permitted_alphabet_table_1;
Lev Walkin59b176e2005-11-26 11:25:14 +00001785 /* The underlying type is UTF8String */
1786 const UTF8String_t *st = (const UTF8String_t *)sptr;
1787 const uint8_t *ch = st->buf;
1788 const uint8_t *end = ch + st->size;
1789
1790 for(; ch < end; ch++) {
1791 uint8_t cv = *ch;
1792 if(cv >= 0x80) return -1;
1793 if(!table[cv]) return -1;
1794 }
1795 return 0;
1796}
1797
1798
1799/*** <<< CODE [Utf8-3] >>> ***/
1800
1801int
1802Utf8_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001803 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001804 const Utf8_2_t *st = (const Utf8_2_t *)sptr;
1805 size_t size;
1806
1807 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001808 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001809 "%s: value not given (%s:%d)",
1810 td->name, __FILE__, __LINE__);
1811 return -1;
1812 }
1813
1814 size = UTF8String_length(st);
1815 if((ssize_t)size < 0) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001816 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001817 "%s: UTF-8: broken encoding (%s:%d)",
1818 td->name, __FILE__, __LINE__);
1819 return -1;
1820 }
1821
1822 if((size >= 1 && size <= 2)
1823 && !check_permitted_alphabet_1(st)) {
1824 /* Constraint check succeeded */
1825 return 0;
1826 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001827 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001828 "%s: constraint failed (%s:%d)",
1829 td->name, __FILE__, __LINE__);
1830 return -1;
1831 }
1832}
1833
1834/*
1835 * This type is implemented using Utf8_2,
1836 * so here we adjust the DEF accordingly.
1837 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001838
Lev Walkin725883b2006-10-09 12:07:58 +00001839/*** <<< CTDEFS [Utf8-3] >>> ***/
1840
Lev Walkin2fce55d2013-03-28 05:00:39 -07001841static asn_per_constraints_t asn_PER_type_Utf8_3_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001842 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1843 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1844 0, 0 /* No PER value map */
1845};
1846
Lev Walkin59b176e2005-11-26 11:25:14 +00001847/*** <<< STAT-DEFS [Utf8-3] >>> ***/
1848
Lev Walkina7591b52014-10-12 18:37:35 -07001849static const ber_tlv_tag_t asn_DEF_Utf8_3_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001850 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
1851};
Lev Walkin59b176e2005-11-26 11:25:14 +00001852asn_TYPE_descriptor_t asn_DEF_Utf8_3 = {
1853 "Utf8-3",
1854 "Utf8-3",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001855 &asn_OP_UTF8String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001856 Utf8_3_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +00001857 asn_DEF_Utf8_3_tags_1,
1858 sizeof(asn_DEF_Utf8_3_tags_1)
1859 /sizeof(asn_DEF_Utf8_3_tags_1[0]), /* 1 */
1860 asn_DEF_Utf8_3_tags_1, /* Same as above */
1861 sizeof(asn_DEF_Utf8_3_tags_1)
1862 /sizeof(asn_DEF_Utf8_3_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04001863 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001864 &asn_PER_type_Utf8_3_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001865 0, 0, /* No members */
1866 0 /* No specifics */
1867};
1868
1869
1870/*** <<< INCLUDES [Utf8-2] >>> ***/
1871
Lev Walkin22b5ed42006-09-13 02:51:20 +00001872#include "Utf8-1.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001873
1874/*** <<< TYPE-DECLS [Utf8-2] >>> ***/
1875
1876typedef Utf8_1_t Utf8_2_t;
1877
1878/*** <<< FUNC-DECLS [Utf8-2] >>> ***/
1879
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08001880extern asn_per_constraints_t asn_PER_type_Utf8_2_constr_1;
Lev Walkin59b176e2005-11-26 11:25:14 +00001881extern asn_TYPE_descriptor_t asn_DEF_Utf8_2;
1882asn_struct_free_f Utf8_2_free;
1883asn_struct_print_f Utf8_2_print;
1884asn_constr_check_f Utf8_2_constraint;
1885ber_type_decoder_f Utf8_2_decode_ber;
1886der_type_encoder_f Utf8_2_encode_der;
1887xer_type_decoder_f Utf8_2_decode_xer;
1888xer_type_encoder_f Utf8_2_encode_xer;
1889per_type_decoder_f Utf8_2_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001890per_type_encoder_f Utf8_2_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001891
1892/*** <<< CODE [Utf8-2] >>> ***/
1893
1894int
1895Utf8_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001896 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001897 const Utf8_1_t *st = (const Utf8_1_t *)sptr;
1898 size_t size;
1899
1900 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001901 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001902 "%s: value not given (%s:%d)",
1903 td->name, __FILE__, __LINE__);
1904 return -1;
1905 }
1906
1907 size = UTF8String_length(st);
1908 if((ssize_t)size < 0) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001909 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001910 "%s: UTF-8: broken encoding (%s:%d)",
1911 td->name, __FILE__, __LINE__);
1912 return -1;
1913 }
1914
1915 if((size >= 1 && size <= 2)) {
1916 /* Constraint check succeeded */
1917 return 0;
1918 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001919 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001920 "%s: constraint failed (%s:%d)",
1921 td->name, __FILE__, __LINE__);
1922 return -1;
1923 }
1924}
1925
1926/*
1927 * This type is implemented using Utf8_1,
1928 * so here we adjust the DEF accordingly.
1929 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001930
Lev Walkin725883b2006-10-09 12:07:58 +00001931/*** <<< CTDEFS [Utf8-2] >>> ***/
1932
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08001933asn_per_constraints_t asn_PER_type_Utf8_2_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001934 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1935 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1936 0, 0 /* No PER value map */
1937};
1938
Lev Walkin59b176e2005-11-26 11:25:14 +00001939/*** <<< STAT-DEFS [Utf8-2] >>> ***/
1940
Lev Walkina7591b52014-10-12 18:37:35 -07001941static const ber_tlv_tag_t asn_DEF_Utf8_2_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001942 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
1943};
Lev Walkin59b176e2005-11-26 11:25:14 +00001944asn_TYPE_descriptor_t asn_DEF_Utf8_2 = {
1945 "Utf8-2",
1946 "Utf8-2",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001947 &asn_OP_UTF8String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001948 Utf8_2_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +00001949 asn_DEF_Utf8_2_tags_1,
1950 sizeof(asn_DEF_Utf8_2_tags_1)
1951 /sizeof(asn_DEF_Utf8_2_tags_1[0]), /* 1 */
1952 asn_DEF_Utf8_2_tags_1, /* Same as above */
1953 sizeof(asn_DEF_Utf8_2_tags_1)
1954 /sizeof(asn_DEF_Utf8_2_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04001955 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001956 &asn_PER_type_Utf8_2_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001957 0, 0, /* No members */
1958 0 /* No specifics */
1959};
1960
1961
1962/*** <<< INCLUDES [Utf8-1] >>> ***/
1963
1964#include <UTF8String.h>
1965
1966/*** <<< TYPE-DECLS [Utf8-1] >>> ***/
1967
1968typedef UTF8String_t Utf8_1_t;
1969
1970/*** <<< FUNC-DECLS [Utf8-1] >>> ***/
1971
1972extern asn_TYPE_descriptor_t asn_DEF_Utf8_1;
1973asn_struct_free_f Utf8_1_free;
1974asn_struct_print_f Utf8_1_print;
1975asn_constr_check_f Utf8_1_constraint;
1976ber_type_decoder_f Utf8_1_decode_ber;
1977der_type_encoder_f Utf8_1_encode_der;
1978xer_type_decoder_f Utf8_1_decode_xer;
1979xer_type_encoder_f Utf8_1_encode_xer;
1980per_type_decoder_f Utf8_1_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001981per_type_encoder_f Utf8_1_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001982
1983/*** <<< CODE [Utf8-1] >>> ***/
1984
Lev Walkin59b176e2005-11-26 11:25:14 +00001985/*
1986 * This type is implemented using UTF8String,
1987 * so here we adjust the DEF accordingly.
1988 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001989
1990/*** <<< STAT-DEFS [Utf8-1] >>> ***/
1991
Lev Walkina7591b52014-10-12 18:37:35 -07001992static const ber_tlv_tag_t asn_DEF_Utf8_1_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001993 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
1994};
1995asn_TYPE_descriptor_t asn_DEF_Utf8_1 = {
1996 "Utf8-1",
1997 "Utf8-1",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001998 &asn_OP_UTF8String,
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08001999 UTF8String_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +00002000 asn_DEF_Utf8_1_tags_1,
2001 sizeof(asn_DEF_Utf8_1_tags_1)
2002 /sizeof(asn_DEF_Utf8_1_tags_1[0]), /* 1 */
2003 asn_DEF_Utf8_1_tags_1, /* Same as above */
2004 sizeof(asn_DEF_Utf8_1_tags_1)
2005 /sizeof(asn_DEF_Utf8_1_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04002006 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +00002007 0, /* No PER visible constraints */
2008 0, 0, /* No members */
2009 0 /* No specifics */
2010};
2011
2012
2013/*** <<< INCLUDES [VisibleIdentifier] >>> ***/
2014
Lev Walkin22b5ed42006-09-13 02:51:20 +00002015#include "Identifier.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00002016
2017/*** <<< TYPE-DECLS [VisibleIdentifier] >>> ***/
2018
2019typedef Identifier_t VisibleIdentifier_t;
2020
2021/*** <<< FUNC-DECLS [VisibleIdentifier] >>> ***/
2022
2023extern asn_TYPE_descriptor_t asn_DEF_VisibleIdentifier;
2024asn_struct_free_f VisibleIdentifier_free;
2025asn_struct_print_f VisibleIdentifier_print;
2026asn_constr_check_f VisibleIdentifier_constraint;
2027ber_type_decoder_f VisibleIdentifier_decode_ber;
2028der_type_encoder_f VisibleIdentifier_encode_der;
2029xer_type_decoder_f VisibleIdentifier_decode_xer;
2030xer_type_encoder_f VisibleIdentifier_encode_xer;
2031per_type_decoder_f VisibleIdentifier_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002032per_type_encoder_f VisibleIdentifier_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002033
2034/*** <<< CTABLES [VisibleIdentifier] >>> ***/
2035
Lev Walkina7591b52014-10-12 18:37:35 -07002036static const int permitted_alphabet_table_1[256] = {
Lev Walkin5b62ca82006-09-21 01:52:07 +00002037 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
2038 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
2039 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* $ */
2040 2, 3, 4, 5, 6, 7, 8, 9,10,11, 0, 0, 0, 0, 0, 0, /* 0123456789 */
2041 0,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26, /* ABCDEFGHIJKLMNO */
204227,28,29,30,31,32,33,34,35,36,37, 0, 0, 0, 0,38, /* PQRSTUVWXYZ _ */
2043 0,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53, /* abcdefghijklmno */
204454,55,56,57,58,59,60,61,62,63,64, 0, 0, 0, 0, 0, /* pqrstuvwxyz */
Lev Walkin59b176e2005-11-26 11:25:14 +00002045};
Lev Walkina7591b52014-10-12 18:37:35 -07002046static const int permitted_alphabet_code2value_1[64] = {
Lev Walkin5b62ca82006-09-21 01:52:07 +0000204736,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,
204870,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,
204986,87,88,89,90,95,97,98,99,100,101,102,103,104,105,106,
2050107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,
2051};
2052
Lev Walkin59b176e2005-11-26 11:25:14 +00002053
2054static int check_permitted_alphabet_1(const void *sptr) {
Lev Walkina7591b52014-10-12 18:37:35 -07002055 const int *table = permitted_alphabet_table_1;
Lev Walkin59b176e2005-11-26 11:25:14 +00002056 /* The underlying type is VisibleString */
2057 const VisibleString_t *st = (const VisibleString_t *)sptr;
2058 const uint8_t *ch = st->buf;
2059 const uint8_t *end = ch + st->size;
2060
2061 for(; ch < end; ch++) {
2062 uint8_t cv = *ch;
2063 if(!table[cv]) return -1;
2064 }
2065 return 0;
2066}
2067
2068
2069/*** <<< CODE [VisibleIdentifier] >>> ***/
2070
2071int
2072VisibleIdentifier_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002073 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002074 const Identifier_t *st = (const Identifier_t *)sptr;
2075 size_t size;
2076
2077 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002078 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002079 "%s: value not given (%s:%d)",
2080 td->name, __FILE__, __LINE__);
2081 return -1;
2082 }
2083
2084 size = st->size;
2085
2086 if((size >= 1 && size <= 32)
2087 && !check_permitted_alphabet_1(st)) {
2088 /* Constraint check succeeded */
2089 return 0;
2090 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002091 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002092 "%s: constraint failed (%s:%d)",
2093 td->name, __FILE__, __LINE__);
2094 return -1;
2095 }
2096}
2097
Lev Walkin135d7dd2017-08-28 00:21:38 -07002098static int asn_PER_MAP_VisibleIdentifier_1_v2c(unsigned int value) {
2099 if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0]))
2100 return -1;
2101 return permitted_alphabet_table_1[value] - 1;
2102}
2103static int asn_PER_MAP_VisibleIdentifier_1_c2v(unsigned int code) {
2104 if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0]))
2105 return -1;
2106 return permitted_alphabet_code2value_1[code];
2107}
Lev Walkin59b176e2005-11-26 11:25:14 +00002108/*
2109 * This type is implemented using Identifier,
2110 * so here we adjust the DEF accordingly.
2111 */
Lev Walkin59b176e2005-11-26 11:25:14 +00002112
Lev Walkin135d7dd2017-08-28 00:21:38 -07002113/*** <<< CTDEFS [VisibleIdentifier] >>> ***/
2114
2115static asn_per_constraints_t asn_PER_type_VisibleIdentifier_constr_1 GCC_NOTUSED = {
2116 { APC_CONSTRAINED, 6, 6, 36, 122 } /* (36..122) */,
2117 { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */,
2118 asn_PER_MAP_VisibleIdentifier_1_v2c, /* Value to PER code map */
2119 asn_PER_MAP_VisibleIdentifier_1_c2v /* PER code to value map */
2120};
2121
Lev Walkin59b176e2005-11-26 11:25:14 +00002122/*** <<< STAT-DEFS [VisibleIdentifier] >>> ***/
2123
Lev Walkina7591b52014-10-12 18:37:35 -07002124static const ber_tlv_tag_t asn_DEF_VisibleIdentifier_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002125 (ASN_TAG_CLASS_UNIVERSAL | (26 << 2))
2126};
2127asn_TYPE_descriptor_t asn_DEF_VisibleIdentifier = {
2128 "VisibleIdentifier",
2129 "VisibleIdentifier",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08002130 &asn_OP_VisibleString,
Lev Walkin59b176e2005-11-26 11:25:14 +00002131 VisibleIdentifier_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +00002132 asn_DEF_VisibleIdentifier_tags_1,
2133 sizeof(asn_DEF_VisibleIdentifier_tags_1)
2134 /sizeof(asn_DEF_VisibleIdentifier_tags_1[0]), /* 1 */
2135 asn_DEF_VisibleIdentifier_tags_1, /* Same as above */
2136 sizeof(asn_DEF_VisibleIdentifier_tags_1)
2137 /sizeof(asn_DEF_VisibleIdentifier_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04002138 0, /* No OER visible constraints */
Lev Walkin135d7dd2017-08-28 00:21:38 -07002139 &asn_PER_type_VisibleIdentifier_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00002140 0, 0, /* No members */
2141 0 /* No specifics */
2142};
2143
2144
2145/*** <<< INCLUDES [Sequence] >>> ***/
2146
Lev Walkin22b5ed42006-09-13 02:51:20 +00002147#include "Int1.h"
2148#include "Int4.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00002149#include <BOOLEAN.h>
Lev Walkin2a744a72013-03-27 01:56:23 -07002150#include <NativeEnumerated.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00002151#include <NULL.h>
Lev Walkin22b5ed42006-09-13 02:51:20 +00002152#include "Int5.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00002153#include <constr_SEQUENCE.h>
2154
2155/*** <<< DEPS [Sequence] >>> ***/
2156
2157typedef enum enum_c {
2158 enum_c_one = 1,
2159 enum_c_two = 2,
2160 /*
2161 * Enumeration is extensible
2162 */
2163 enum_c_three = 3
Lev Walkin171487e2006-03-21 07:25:18 +00002164} e_enum_c;
Lev Walkin59b176e2005-11-26 11:25:14 +00002165
2166/*** <<< TYPE-DECLS [Sequence] >>> ***/
2167
2168typedef struct Sequence {
2169 Int1_t *int1_c /* DEFAULT 3 */;
2170 Int4_t int4;
2171 Int4_t int4_c;
Lev Walkin2a744a72013-03-27 01:56:23 -07002172 BOOLEAN_t *Bool /* DEFAULT 1 */;
2173 long enum_c;
Lev Walkin59b176e2005-11-26 11:25:14 +00002174 NULL_t *null /* OPTIONAL */;
2175 /*
2176 * This type is extensible,
2177 * possible extensions are below.
2178 */
2179 Int5_t *int5_c /* OPTIONAL */;
2180
2181 /* Context for parsing across buffer boundaries */
2182 asn_struct_ctx_t _asn_ctx;
2183} Sequence_t;
2184
2185/*** <<< FUNC-DECLS [Sequence] >>> ***/
2186
2187/* extern asn_TYPE_descriptor_t asn_DEF_enum_c_6; // (Use -fall-defs-global to expose) */
2188extern asn_TYPE_descriptor_t asn_DEF_Sequence;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08002189extern asn_SEQUENCE_specifics_t asn_SPC_Sequence_specs_1;
2190extern asn_TYPE_member_t asn_MBR_Sequence_1[7];
Lev Walkin59b176e2005-11-26 11:25:14 +00002191
2192/*** <<< CODE [Sequence] >>> ***/
2193
Lev Walkin59b176e2005-11-26 11:25:14 +00002194/*
Lev Walkin2a744a72013-03-27 01:56:23 -07002195 * This type is implemented using NativeEnumerated,
Lev Walkin59b176e2005-11-26 11:25:14 +00002196 * so here we adjust the DEF accordingly.
2197 */
Lev Walkin59b176e2005-11-26 11:25:14 +00002198static int
2199memb_int1_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002200 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002201 long value;
2202
2203 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002204 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002205 "%s: value not given (%s:%d)",
2206 td->name, __FILE__, __LINE__);
2207 return -1;
2208 }
2209
Lev Walkin2a744a72013-03-27 01:56:23 -07002210 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +00002211
2212 if((value >= -2)) {
2213 /* Constraint check succeeded */
2214 return 0;
2215 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002216 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002217 "%s: constraint failed (%s:%d)",
2218 td->name, __FILE__, __LINE__);
2219 return -1;
2220 }
2221}
2222
2223static int
2224memb_int4_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002225 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002226 long value;
2227
2228 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002229 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002230 "%s: value not given (%s:%d)",
2231 td->name, __FILE__, __LINE__);
2232 return -1;
2233 }
2234
Lev Walkin2a744a72013-03-27 01:56:23 -07002235 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +00002236
2237 if((value >= 5 && value <= 7)) {
2238 /* Constraint check succeeded */
2239 return 0;
2240 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002241 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002242 "%s: constraint failed (%s:%d)",
2243 td->name, __FILE__, __LINE__);
2244 return -1;
2245 }
2246}
2247
2248static int
2249memb_int5_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002250 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002251 long value;
2252
2253 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002254 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002255 "%s: value not given (%s:%d)",
2256 td->name, __FILE__, __LINE__);
2257 return -1;
2258 }
2259
Lev Walkin2a744a72013-03-27 01:56:23 -07002260 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +00002261
2262 if((value == 5)) {
2263 /* Constraint check succeeded */
2264 return 0;
2265 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002266 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002267 "%s: constraint failed (%s:%d)",
2268 td->name, __FILE__, __LINE__);
2269 return -1;
2270 }
2271}
2272
2273
Lev Walkin725883b2006-10-09 12:07:58 +00002274/*** <<< CTDEFS [Sequence] >>> ***/
2275
Lev Walkin2fce55d2013-03-28 05:00:39 -07002276static asn_per_constraints_t asn_PER_type_enum_c_constr_6 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002277 { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */,
2278 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2279 0, 0 /* No PER value map */
2280};
Lev Walkin2fce55d2013-03-28 05:00:39 -07002281static asn_per_constraints_t asn_PER_memb_int1_c_constr_2 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002282 { APC_SEMI_CONSTRAINED, -1, -1, -2, 0 } /* (-2..MAX) */,
2283 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2284 0, 0 /* No PER value map */
2285};
Lev Walkin2fce55d2013-03-28 05:00:39 -07002286static asn_per_constraints_t asn_PER_memb_int4_c_constr_4 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002287 { APC_CONSTRAINED, 2, 2, 5, 7 } /* (5..7) */,
2288 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2289 0, 0 /* No PER value map */
2290};
Lev Walkin2fce55d2013-03-28 05:00:39 -07002291static asn_per_constraints_t asn_PER_memb_int5_c_constr_13 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002292 { APC_CONSTRAINED, 0, 0, 5, 5 } /* (5..5) */,
2293 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2294 0, 0 /* No PER value map */
2295};
2296
Lev Walkin59b176e2005-11-26 11:25:14 +00002297/*** <<< STAT-DEFS [Sequence] >>> ***/
2298
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002299static int asn_DFL_2_set_3(int set_value, void **sptr) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002300 Int1_t *st = *sptr;
2301
2302 if(!st) {
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002303 if(!set_value) return -1; /* Not a default value */
Lev Walkin59b176e2005-11-26 11:25:14 +00002304 st = (*sptr = CALLOC(1, sizeof(*st)));
2305 if(!st) return -1;
2306 }
2307
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002308 if(set_value) {
2309 /* Install default value 3 */
Lev Walkin2a744a72013-03-27 01:56:23 -07002310 *st = 3;
2311 return 0;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002312 } else {
2313 /* Test default value 3 */
Lev Walkin2a744a72013-03-27 01:56:23 -07002314 return (*st == 3);
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002315 }
Lev Walkin59b176e2005-11-26 11:25:14 +00002316}
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002317static int asn_DFL_5_set_1(int set_value, void **sptr) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002318 BOOLEAN_t *st = *sptr;
2319
2320 if(!st) {
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002321 if(!set_value) return -1; /* Not a default value */
Lev Walkin59b176e2005-11-26 11:25:14 +00002322 st = (*sptr = CALLOC(1, sizeof(*st)));
2323 if(!st) return -1;
2324 }
2325
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002326 if(set_value) {
2327 /* Install default value 1 */
2328 *st = 1;
2329 return 0;
2330 } else {
2331 /* Test default value 1 */
2332 return (*st == 1);
2333 }
Lev Walkin59b176e2005-11-26 11:25:14 +00002334}
Lev Walkina7591b52014-10-12 18:37:35 -07002335static const asn_INTEGER_enum_map_t asn_MAP_enum_c_value2enum_6[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002336 { 1, 3, "one" },
2337 { 2, 3, "two" },
2338 { 3, 5, "three" }
2339 /* This list is extensible */
2340};
Lev Walkina7591b52014-10-12 18:37:35 -07002341static const unsigned int asn_MAP_enum_c_enum2value_6[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002342 0, /* one(1) */
2343 2, /* three(3) */
2344 1 /* two(2) */
2345 /* This list is extensible */
2346};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08002347static const asn_INTEGER_specifics_t asn_SPC_enum_c_specs_6 = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002348 asn_MAP_enum_c_value2enum_6, /* "tag" => N; sorted by tag */
2349 asn_MAP_enum_c_enum2value_6, /* N => "tag"; sorted by N */
2350 3, /* Number of elements in the maps */
2351 3, /* Extensions before this member */
Lev Walkin8bb57a22007-12-03 13:41:36 +00002352 1, /* Strict enumeration */
2353 0, /* Native long size */
2354 0
Lev Walkin59b176e2005-11-26 11:25:14 +00002355};
Lev Walkina7591b52014-10-12 18:37:35 -07002356static const ber_tlv_tag_t asn_DEF_enum_c_tags_6[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002357 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
2358};
Lev Walkin59b176e2005-11-26 11:25:14 +00002359static /* Use -fall-defs-global to expose */
2360asn_TYPE_descriptor_t asn_DEF_enum_c_6 = {
2361 "enum-c",
2362 "enum-c",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08002363 &asn_OP_NativeEnumerated,
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08002364 NativeEnumerated_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +00002365 asn_DEF_enum_c_tags_6,
2366 sizeof(asn_DEF_enum_c_tags_6)
2367 /sizeof(asn_DEF_enum_c_tags_6[0]), /* 1 */
2368 asn_DEF_enum_c_tags_6, /* Same as above */
2369 sizeof(asn_DEF_enum_c_tags_6)
2370 /sizeof(asn_DEF_enum_c_tags_6[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04002371 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00002372 &asn_PER_type_enum_c_constr_6,
Lev Walkin59b176e2005-11-26 11:25:14 +00002373 0, 0, /* Defined elsewhere */
2374 &asn_SPC_enum_c_specs_6 /* Additional specs */
2375};
2376
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08002377asn_TYPE_member_t asn_MBR_Sequence_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002378 { ATF_POINTER, 1, offsetof(struct Sequence, int1_c),
2379 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
2380 .tag_mode = 0,
2381 .type = &asn_DEF_Int1,
Lev Walkin67a30122017-08-10 05:48:54 -07002382 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +00002383 .memb_constraints = memb_int1_c_constraint_1,
Lev Walkinb33425f2017-07-14 14:59:52 +04002384 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin4b5dae32006-10-09 12:27:44 +00002385 .per_constraints = &asn_PER_memb_int1_c_constr_2,
Lev Walkin59b176e2005-11-26 11:25:14 +00002386 .default_value = asn_DFL_2_set_3, /* DEFAULT 3 */
2387 .name = "int1-c"
2388 },
2389 { ATF_NOFLAGS, 0, offsetof(struct Sequence, int4),
2390 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
2391 .tag_mode = +1, /* EXPLICIT tag at current level */
2392 .type = &asn_DEF_Int4,
Lev Walkin67a30122017-08-10 05:48:54 -07002393 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +00002394 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +04002395 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +00002396 .per_constraints = 0, /* No PER visible constraints */
2397 .default_value = 0,
2398 .name = "int4"
2399 },
2400 { ATF_NOFLAGS, 0, offsetof(struct Sequence, int4_c),
2401 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
2402 .tag_mode = 0,
2403 .type = &asn_DEF_Int4,
Lev Walkin67a30122017-08-10 05:48:54 -07002404 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +00002405 .memb_constraints = memb_int4_c_constraint_1,
Lev Walkinb33425f2017-07-14 14:59:52 +04002406 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin4b5dae32006-10-09 12:27:44 +00002407 .per_constraints = &asn_PER_memb_int4_c_constr_4,
Lev Walkin59b176e2005-11-26 11:25:14 +00002408 .default_value = 0,
2409 .name = "int4-c"
2410 },
Lev Walkin2a744a72013-03-27 01:56:23 -07002411 { ATF_POINTER, 1, offsetof(struct Sequence, Bool),
Lev Walkin59b176e2005-11-26 11:25:14 +00002412 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
2413 .tag_mode = 0,
2414 .type = &asn_DEF_BOOLEAN,
Lev Walkin67a30122017-08-10 05:48:54 -07002415 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +00002416 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +04002417 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +00002418 .per_constraints = 0, /* No PER visible constraints */
2419 .default_value = asn_DFL_5_set_1, /* DEFAULT 1 */
2420 .name = "bool"
2421 },
2422 { ATF_NOFLAGS, 0, offsetof(struct Sequence, enum_c),
2423 .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
2424 .tag_mode = 0,
2425 .type = &asn_DEF_enum_c_6,
Lev Walkin67a30122017-08-10 05:48:54 -07002426 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +00002427 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +04002428 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin07aaa342006-10-09 12:52:15 +00002429 .per_constraints = 0, /* No PER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +00002430 .default_value = 0,
2431 .name = "enum-c"
2432 },
2433 { ATF_POINTER, 2, offsetof(struct Sequence, null),
2434 .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)),
2435 .tag_mode = 0,
2436 .type = &asn_DEF_NULL,
Lev Walkin67a30122017-08-10 05:48:54 -07002437 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +00002438 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +04002439 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +00002440 .per_constraints = 0, /* No PER visible constraints */
2441 .default_value = 0,
2442 .name = "null"
2443 },
2444 { ATF_POINTER, 1, offsetof(struct Sequence, int5_c),
2445 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
2446 .tag_mode = 0,
2447 .type = &asn_DEF_Int5,
Lev Walkin67a30122017-08-10 05:48:54 -07002448 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +00002449 .memb_constraints = memb_int5_c_constraint_1,
Lev Walkinb33425f2017-07-14 14:59:52 +04002450 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin4b5dae32006-10-09 12:27:44 +00002451 .per_constraints = &asn_PER_memb_int5_c_constr_13,
Lev Walkin59b176e2005-11-26 11:25:14 +00002452 .default_value = 0,
2453 .name = "int5-c"
2454 },
2455};
Lev Walkina7591b52014-10-12 18:37:35 -07002456static const int asn_MAP_Sequence_oms_1[] = { 0, 3, 5, 6 };
2457static const ber_tlv_tag_t asn_DEF_Sequence_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002458 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
2459};
Lev Walkina7591b52014-10-12 18:37:35 -07002460static const asn_TYPE_tag2member_t asn_MAP_Sequence_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -07002461 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool */
2462 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2 }, /* int1-c */
2463 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -1, 1 }, /* int4-c */
2464 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 6, -2, 0 }, /* int5-c */
2465 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 5, 0, 0 }, /* null */
2466 { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 4, 0, 0 }, /* enum-c */
2467 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 } /* int4 */
Lev Walkin59b176e2005-11-26 11:25:14 +00002468};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08002469asn_SEQUENCE_specifics_t asn_SPC_Sequence_specs_1 = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002470 sizeof(struct Sequence),
2471 offsetof(struct Sequence, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -07002472 .tag2el = asn_MAP_Sequence_tag2el_1,
2473 .tag2el_count = 7, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +00002474 asn_MAP_Sequence_oms_1, /* Optional members */
2475 3, 1, /* Root/Additions */
2476 5, /* Start extensions */
2477 8 /* Stop extensions */
2478};
2479asn_TYPE_descriptor_t asn_DEF_Sequence = {
2480 "Sequence",
2481 "Sequence",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08002482 &asn_OP_SEQUENCE,
Lev Walkin59b176e2005-11-26 11:25:14 +00002483 SEQUENCE_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +00002484 asn_DEF_Sequence_tags_1,
2485 sizeof(asn_DEF_Sequence_tags_1)
2486 /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
2487 asn_DEF_Sequence_tags_1, /* Same as above */
2488 sizeof(asn_DEF_Sequence_tags_1)
2489 /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04002490 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +00002491 0, /* No PER visible constraints */
2492 asn_MBR_Sequence_1,
2493 7, /* Elements count */
2494 &asn_SPC_Sequence_specs_1 /* Additional specs */
2495};
2496
2497
2498/*** <<< INCLUDES [SequenceOf] >>> ***/
2499
2500#include <asn_SEQUENCE_OF.h>
2501#include <constr_SEQUENCE_OF.h>
2502
2503/*** <<< FWD-DECLS [SequenceOf] >>> ***/
2504
2505struct Sequence;
2506
2507/*** <<< TYPE-DECLS [SequenceOf] >>> ***/
2508
2509typedef struct SequenceOf {
2510 A_SEQUENCE_OF(struct Sequence) list;
2511
2512 /* Context for parsing across buffer boundaries */
2513 asn_struct_ctx_t _asn_ctx;
2514} SequenceOf_t;
2515
2516/*** <<< FUNC-DECLS [SequenceOf] >>> ***/
2517
2518extern asn_TYPE_descriptor_t asn_DEF_SequenceOf;
2519
2520/*** <<< POST-INCLUDE [SequenceOf] >>> ***/
2521
Lev Walkin22b5ed42006-09-13 02:51:20 +00002522#include "Sequence.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00002523
Lev Walkin725883b2006-10-09 12:07:58 +00002524/*** <<< CTDEFS [SequenceOf] >>> ***/
2525
Lev Walkin2fce55d2013-03-28 05:00:39 -07002526static asn_per_constraints_t asn_PER_type_SequenceOf_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002527 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2528 { APC_CONSTRAINED, 1, 1, 1, 2 } /* (SIZE(1..2)) */,
2529 0, 0 /* No PER value map */
2530};
2531
Lev Walkin59b176e2005-11-26 11:25:14 +00002532/*** <<< STAT-DEFS [SequenceOf] >>> ***/
2533
2534static asn_TYPE_member_t asn_MBR_SequenceOf_1[] = {
2535 { ATF_POINTER, 0, 0,
2536 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
2537 .tag_mode = 0,
2538 .type = &asn_DEF_Sequence,
Lev Walkin67a30122017-08-10 05:48:54 -07002539 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +00002540 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +04002541 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +00002542 .per_constraints = 0, /* No PER visible constraints */
2543 .default_value = 0,
2544 .name = ""
2545 },
2546};
Lev Walkina7591b52014-10-12 18:37:35 -07002547static const ber_tlv_tag_t asn_DEF_SequenceOf_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002548 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
2549};
2550static asn_SET_OF_specifics_t asn_SPC_SequenceOf_specs_1 = {
2551 sizeof(struct SequenceOf),
2552 offsetof(struct SequenceOf, _asn_ctx),
2553 0, /* XER encoding is XMLDelimitedItemList */
2554};
Lev Walkin59b176e2005-11-26 11:25:14 +00002555asn_TYPE_descriptor_t asn_DEF_SequenceOf = {
2556 "SequenceOf",
2557 "SequenceOf",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08002558 &asn_OP_SEQUENCE_OF,
Lev Walkin59b176e2005-11-26 11:25:14 +00002559 SEQUENCE_OF_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +00002560 asn_DEF_SequenceOf_tags_1,
2561 sizeof(asn_DEF_SequenceOf_tags_1)
2562 /sizeof(asn_DEF_SequenceOf_tags_1[0]), /* 1 */
2563 asn_DEF_SequenceOf_tags_1, /* Same as above */
2564 sizeof(asn_DEF_SequenceOf_tags_1)
2565 /sizeof(asn_DEF_SequenceOf_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04002566 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00002567 &asn_PER_type_SequenceOf_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00002568 asn_MBR_SequenceOf_1,
2569 1, /* Single element */
2570 &asn_SPC_SequenceOf_specs_1 /* Additional specs */
2571};
2572
2573
2574/*** <<< INCLUDES [Enum0] >>> ***/
2575
Lev Walkin2a744a72013-03-27 01:56:23 -07002576#include <NativeEnumerated.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00002577
2578/*** <<< DEPS [Enum0] >>> ***/
2579
2580typedef enum Enum0 {
2581 Enum0_one = 0,
2582 Enum0_two = 1
Lev Walkin171487e2006-03-21 07:25:18 +00002583} e_Enum0;
Lev Walkin59b176e2005-11-26 11:25:14 +00002584
2585/*** <<< TYPE-DECLS [Enum0] >>> ***/
2586
Lev Walkin2a744a72013-03-27 01:56:23 -07002587typedef long Enum0_t;
Lev Walkin59b176e2005-11-26 11:25:14 +00002588
2589/*** <<< FUNC-DECLS [Enum0] >>> ***/
2590
2591extern asn_TYPE_descriptor_t asn_DEF_Enum0;
2592asn_struct_free_f Enum0_free;
2593asn_struct_print_f Enum0_print;
2594asn_constr_check_f Enum0_constraint;
2595ber_type_decoder_f Enum0_decode_ber;
2596der_type_encoder_f Enum0_encode_der;
2597xer_type_decoder_f Enum0_decode_xer;
2598xer_type_encoder_f Enum0_encode_xer;
2599per_type_decoder_f Enum0_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002600per_type_encoder_f Enum0_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002601
2602/*** <<< CODE [Enum0] >>> ***/
2603
Lev Walkin59b176e2005-11-26 11:25:14 +00002604/*
Lev Walkin2a744a72013-03-27 01:56:23 -07002605 * This type is implemented using NativeEnumerated,
Lev Walkin59b176e2005-11-26 11:25:14 +00002606 * so here we adjust the DEF accordingly.
2607 */
Lev Walkin59b176e2005-11-26 11:25:14 +00002608
Lev Walkin725883b2006-10-09 12:07:58 +00002609/*** <<< CTDEFS [Enum0] >>> ***/
2610
Lev Walkin2fce55d2013-03-28 05:00:39 -07002611static asn_per_constraints_t asn_PER_type_Enum0_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002612 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
2613 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2614 0, 0 /* No PER value map */
2615};
2616
Lev Walkin59b176e2005-11-26 11:25:14 +00002617/*** <<< STAT-DEFS [Enum0] >>> ***/
2618
Lev Walkina7591b52014-10-12 18:37:35 -07002619static const asn_INTEGER_enum_map_t asn_MAP_Enum0_value2enum_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002620 { 0, 3, "one" },
2621 { 1, 3, "two" }
2622};
Lev Walkina7591b52014-10-12 18:37:35 -07002623static const unsigned int asn_MAP_Enum0_enum2value_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002624 0, /* one(0) */
2625 1 /* two(1) */
2626};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08002627static const asn_INTEGER_specifics_t asn_SPC_Enum0_specs_1 = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002628 asn_MAP_Enum0_value2enum_1, /* "tag" => N; sorted by tag */
2629 asn_MAP_Enum0_enum2value_1, /* N => "tag"; sorted by N */
2630 2, /* Number of elements in the maps */
2631 0, /* Enumeration is not extensible */
Lev Walkin8bb57a22007-12-03 13:41:36 +00002632 1, /* Strict enumeration */
2633 0, /* Native long size */
2634 0
Lev Walkin59b176e2005-11-26 11:25:14 +00002635};
Lev Walkina7591b52014-10-12 18:37:35 -07002636static const ber_tlv_tag_t asn_DEF_Enum0_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002637 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
2638};
Lev Walkin59b176e2005-11-26 11:25:14 +00002639asn_TYPE_descriptor_t asn_DEF_Enum0 = {
2640 "Enum0",
2641 "Enum0",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08002642 &asn_OP_NativeEnumerated,
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08002643 NativeEnumerated_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +00002644 asn_DEF_Enum0_tags_1,
2645 sizeof(asn_DEF_Enum0_tags_1)
2646 /sizeof(asn_DEF_Enum0_tags_1[0]), /* 1 */
2647 asn_DEF_Enum0_tags_1, /* Same as above */
2648 sizeof(asn_DEF_Enum0_tags_1)
2649 /sizeof(asn_DEF_Enum0_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04002650 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00002651 &asn_PER_type_Enum0_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00002652 0, 0, /* Defined elsewhere */
2653 &asn_SPC_Enum0_specs_1 /* Additional specs */
2654};
2655
2656
2657/*** <<< INCLUDES [Enum1] >>> ***/
2658
2659#include <NativeEnumerated.h>
2660
2661/*** <<< DEPS [Enum1] >>> ***/
2662
2663typedef enum Enum1 {
2664 Enum1_one = 0,
2665 Enum1_two = 1
Lev Walkin171487e2006-03-21 07:25:18 +00002666} e_Enum1;
Lev Walkin59b176e2005-11-26 11:25:14 +00002667
2668/*** <<< TYPE-DECLS [Enum1] >>> ***/
2669
2670typedef long Enum1_t;
2671
2672/*** <<< FUNC-DECLS [Enum1] >>> ***/
2673
2674extern asn_TYPE_descriptor_t asn_DEF_Enum1;
2675asn_struct_free_f Enum1_free;
2676asn_struct_print_f Enum1_print;
2677asn_constr_check_f Enum1_constraint;
2678ber_type_decoder_f Enum1_decode_ber;
2679der_type_encoder_f Enum1_encode_der;
2680xer_type_decoder_f Enum1_decode_xer;
2681xer_type_encoder_f Enum1_encode_xer;
2682per_type_decoder_f Enum1_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002683per_type_encoder_f Enum1_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002684
2685/*** <<< CODE [Enum1] >>> ***/
2686
2687int
2688Enum1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002689 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002690 long value;
2691
2692 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002693 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002694 "%s: value not given (%s:%d)",
2695 td->name, __FILE__, __LINE__);
2696 return -1;
2697 }
2698
2699 value = *(const long *)sptr;
2700
2701 if((value == 0)) {
2702 /* Constraint check succeeded */
2703 return 0;
2704 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002705 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002706 "%s: constraint failed (%s:%d)",
2707 td->name, __FILE__, __LINE__);
2708 return -1;
2709 }
2710}
2711
2712/*
2713 * This type is implemented using NativeEnumerated,
2714 * so here we adjust the DEF accordingly.
2715 */
Lev Walkin59b176e2005-11-26 11:25:14 +00002716
Lev Walkin725883b2006-10-09 12:07:58 +00002717/*** <<< CTDEFS [Enum1] >>> ***/
2718
Lev Walkin2fce55d2013-03-28 05:00:39 -07002719static asn_per_constraints_t asn_PER_type_Enum1_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002720 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
2721 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2722 0, 0 /* No PER value map */
2723};
2724
Lev Walkin59b176e2005-11-26 11:25:14 +00002725/*** <<< STAT-DEFS [Enum1] >>> ***/
2726
Lev Walkina7591b52014-10-12 18:37:35 -07002727static const asn_INTEGER_enum_map_t asn_MAP_Enum1_value2enum_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002728 { 0, 3, "one" },
2729 { 1, 3, "two" }
2730};
Lev Walkina7591b52014-10-12 18:37:35 -07002731static const unsigned int asn_MAP_Enum1_enum2value_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002732 0, /* one(0) */
2733 1 /* two(1) */
2734};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08002735static const asn_INTEGER_specifics_t asn_SPC_Enum1_specs_1 = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002736 asn_MAP_Enum1_value2enum_1, /* "tag" => N; sorted by tag */
2737 asn_MAP_Enum1_enum2value_1, /* N => "tag"; sorted by N */
2738 2, /* Number of elements in the maps */
2739 0, /* Enumeration is not extensible */
Lev Walkin8bb57a22007-12-03 13:41:36 +00002740 1, /* Strict enumeration */
2741 0, /* Native long size */
2742 0
Lev Walkin59b176e2005-11-26 11:25:14 +00002743};
Lev Walkina7591b52014-10-12 18:37:35 -07002744static const ber_tlv_tag_t asn_DEF_Enum1_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002745 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
2746};
Lev Walkin59b176e2005-11-26 11:25:14 +00002747asn_TYPE_descriptor_t asn_DEF_Enum1 = {
2748 "Enum1",
2749 "Enum1",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08002750 &asn_OP_NativeEnumerated,
Lev Walkin59b176e2005-11-26 11:25:14 +00002751 Enum1_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +00002752 asn_DEF_Enum1_tags_1,
2753 sizeof(asn_DEF_Enum1_tags_1)
2754 /sizeof(asn_DEF_Enum1_tags_1[0]), /* 1 */
2755 asn_DEF_Enum1_tags_1, /* Same as above */
2756 sizeof(asn_DEF_Enum1_tags_1)
2757 /sizeof(asn_DEF_Enum1_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04002758 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00002759 &asn_PER_type_Enum1_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00002760 0, 0, /* Defined elsewhere */
2761 &asn_SPC_Enum1_specs_1 /* Additional specs */
2762};
2763
2764
2765/*** <<< INCLUDES [Identifier] >>> ***/
2766
2767#include <VisibleString.h>
2768
2769/*** <<< TYPE-DECLS [Identifier] >>> ***/
2770
2771typedef VisibleString_t Identifier_t;
2772
2773/*** <<< FUNC-DECLS [Identifier] >>> ***/
2774
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08002775extern asn_per_constraints_t asn_PER_type_Identifier_constr_1;
Lev Walkin59b176e2005-11-26 11:25:14 +00002776extern asn_TYPE_descriptor_t asn_DEF_Identifier;
2777asn_struct_free_f Identifier_free;
2778asn_struct_print_f Identifier_print;
2779asn_constr_check_f Identifier_constraint;
2780ber_type_decoder_f Identifier_decode_ber;
2781der_type_encoder_f Identifier_encode_der;
2782xer_type_decoder_f Identifier_decode_xer;
2783xer_type_encoder_f Identifier_encode_xer;
2784per_type_decoder_f Identifier_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002785per_type_encoder_f Identifier_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002786
2787/*** <<< CTABLES [Identifier] >>> ***/
2788
Lev Walkina7591b52014-10-12 18:37:35 -07002789static const int permitted_alphabet_table_1[256] = {
Lev Walkin5b62ca82006-09-21 01:52:07 +00002790 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
2791 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
2792 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* $ */
2793 2, 3, 4, 5, 6, 7, 8, 9,10,11, 0, 0, 0, 0, 0, 0, /* 0123456789 */
2794 0,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26, /* ABCDEFGHIJKLMNO */
279527,28,29,30,31,32,33,34,35,36,37, 0, 0, 0, 0,38, /* PQRSTUVWXYZ _ */
2796 0,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53, /* abcdefghijklmno */
279754,55,56,57,58,59,60,61,62,63,64, 0, 0, 0, 0, 0, /* pqrstuvwxyz */
Lev Walkin59b176e2005-11-26 11:25:14 +00002798};
Lev Walkina7591b52014-10-12 18:37:35 -07002799static const int permitted_alphabet_code2value_1[64] = {
Lev Walkin5b62ca82006-09-21 01:52:07 +0000280036,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,
280170,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,
280286,87,88,89,90,95,97,98,99,100,101,102,103,104,105,106,
2803107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,
2804};
2805
Lev Walkin59b176e2005-11-26 11:25:14 +00002806
2807static int check_permitted_alphabet_1(const void *sptr) {
Lev Walkina7591b52014-10-12 18:37:35 -07002808 const int *table = permitted_alphabet_table_1;
Lev Walkin59b176e2005-11-26 11:25:14 +00002809 /* The underlying type is VisibleString */
2810 const VisibleString_t *st = (const VisibleString_t *)sptr;
2811 const uint8_t *ch = st->buf;
2812 const uint8_t *end = ch + st->size;
2813
2814 for(; ch < end; ch++) {
2815 uint8_t cv = *ch;
2816 if(!table[cv]) return -1;
2817 }
2818 return 0;
2819}
2820
2821
2822/*** <<< CODE [Identifier] >>> ***/
2823
2824int
2825Identifier_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002826 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002827 const VisibleString_t *st = (const VisibleString_t *)sptr;
2828 size_t size;
2829
2830 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002831 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002832 "%s: value not given (%s:%d)",
2833 td->name, __FILE__, __LINE__);
2834 return -1;
2835 }
2836
2837 size = st->size;
2838
2839 if((size >= 1 && size <= 32)
2840 && !check_permitted_alphabet_1(st)) {
2841 /* Constraint check succeeded */
2842 return 0;
2843 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002844 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002845 "%s: constraint failed (%s:%d)",
2846 td->name, __FILE__, __LINE__);
2847 return -1;
2848 }
2849}
2850
Lev Walkin725883b2006-10-09 12:07:58 +00002851static int asn_PER_MAP_Identifier_1_v2c(unsigned int value) {
2852 if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0]))
2853 return -1;
2854 return permitted_alphabet_table_1[value] - 1;
2855}
2856static int asn_PER_MAP_Identifier_1_c2v(unsigned int code) {
2857 if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0]))
2858 return -1;
2859 return permitted_alphabet_code2value_1[code];
2860}
Lev Walkin59b176e2005-11-26 11:25:14 +00002861/*
2862 * This type is implemented using VisibleString,
2863 * so here we adjust the DEF accordingly.
2864 */
Lev Walkin59b176e2005-11-26 11:25:14 +00002865
Lev Walkin725883b2006-10-09 12:07:58 +00002866/*** <<< CTDEFS [Identifier] >>> ***/
2867
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08002868asn_per_constraints_t asn_PER_type_Identifier_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002869 { APC_CONSTRAINED, 6, 6, 36, 122 } /* (36..122) */,
2870 { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */,
2871 asn_PER_MAP_Identifier_1_v2c, /* Value to PER code map */
2872 asn_PER_MAP_Identifier_1_c2v /* PER code to value map */
2873};
2874
Lev Walkin59b176e2005-11-26 11:25:14 +00002875/*** <<< STAT-DEFS [Identifier] >>> ***/
2876
Lev Walkina7591b52014-10-12 18:37:35 -07002877static const ber_tlv_tag_t asn_DEF_Identifier_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002878 (ASN_TAG_CLASS_UNIVERSAL | (26 << 2))
2879};
Lev Walkin59b176e2005-11-26 11:25:14 +00002880asn_TYPE_descriptor_t asn_DEF_Identifier = {
2881 "Identifier",
2882 "Identifier",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08002883 &asn_OP_VisibleString,
Lev Walkin59b176e2005-11-26 11:25:14 +00002884 Identifier_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +00002885 asn_DEF_Identifier_tags_1,
2886 sizeof(asn_DEF_Identifier_tags_1)
2887 /sizeof(asn_DEF_Identifier_tags_1[0]), /* 1 */
2888 asn_DEF_Identifier_tags_1, /* Same as above */
2889 sizeof(asn_DEF_Identifier_tags_1)
2890 /sizeof(asn_DEF_Identifier_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04002891 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00002892 &asn_PER_type_Identifier_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00002893 0, 0, /* No members */
2894 0 /* No specifics */
2895};
2896