blob: c1b6fd8383a1ac7c83b4a21dee1b916bd6f3b3fe [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,
Lev Walkin59b176e2005-11-26 11:25:14 +000039 asn_DEF_Int1_tags_1,
40 sizeof(asn_DEF_Int1_tags_1)
41 /sizeof(asn_DEF_Int1_tags_1[0]), /* 1 */
42 asn_DEF_Int1_tags_1, /* Same as above */
43 sizeof(asn_DEF_Int1_tags_1)
44 /sizeof(asn_DEF_Int1_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -070045 { 0, 0, NativeInteger_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +000046 0, 0, /* No members */
47 0 /* No specifics */
48};
49
50
51/*** <<< INCLUDES [Int2] >>> ***/
52
Lev Walkin22b5ed42006-09-13 02:51:20 +000053#include "Int1.h"
Lev Walkin59b176e2005-11-26 11:25:14 +000054
55/*** <<< TYPE-DECLS [Int2] >>> ***/
56
57typedef Int1_t Int2_t;
58
59/*** <<< FUNC-DECLS [Int2] >>> ***/
60
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080061extern asn_per_constraints_t asn_PER_type_Int2_constr_1;
Lev Walkin59b176e2005-11-26 11:25:14 +000062extern asn_TYPE_descriptor_t asn_DEF_Int2;
63asn_struct_free_f Int2_free;
64asn_struct_print_f Int2_print;
65asn_constr_check_f Int2_constraint;
66ber_type_decoder_f Int2_decode_ber;
67der_type_encoder_f Int2_encode_der;
68xer_type_decoder_f Int2_decode_xer;
69xer_type_encoder_f Int2_encode_xer;
70per_type_decoder_f Int2_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +000071per_type_encoder_f Int2_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +000072
73/*** <<< CODE [Int2] >>> ***/
74
75int
76Int2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +000077 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkine0f2a5b2017-08-30 20:02:29 -070078 unsigned long value;
Lev Walkin59b176e2005-11-26 11:25:14 +000079
80 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -070081 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +000082 "%s: value not given (%s:%d)",
83 td->name, __FILE__, __LINE__);
84 return -1;
85 }
86
Lev Walkin2a744a72013-03-27 01:56:23 -070087 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +000088
89 if((value >= 0)) {
90 /* Constraint check succeeded */
91 return 0;
92 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -070093 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +000094 "%s: constraint failed (%s:%d)",
95 td->name, __FILE__, __LINE__);
96 return -1;
97 }
98}
99
100/*
101 * This type is implemented using Int1,
102 * so here we adjust the DEF accordingly.
103 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000104
Lev Walkin725883b2006-10-09 12:07:58 +0000105/*** <<< CTDEFS [Int2] >>> ***/
106
Lev Walkin0479e042017-09-26 18:39:58 -0700107asn_per_constraints_t asn_PER_type_Int2_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000108 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (0..MAX) */,
109 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
110 0, 0 /* No PER value map */
111};
112
Lev Walkin59b176e2005-11-26 11:25:14 +0000113/*** <<< STAT-DEFS [Int2] >>> ***/
114
Lev Walkina7591b52014-10-12 18:37:35 -0700115static const ber_tlv_tag_t asn_DEF_Int2_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000116 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
117};
Lev Walkin59b176e2005-11-26 11:25:14 +0000118asn_TYPE_descriptor_t asn_DEF_Int2 = {
119 "Int2",
120 "Int2",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800121 &asn_OP_NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000122 asn_DEF_Int2_tags_1,
123 sizeof(asn_DEF_Int2_tags_1)
124 /sizeof(asn_DEF_Int2_tags_1[0]), /* 1 */
125 asn_DEF_Int2_tags_1, /* Same as above */
126 sizeof(asn_DEF_Int2_tags_1)
127 /sizeof(asn_DEF_Int2_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700128 { 0, &asn_PER_type_Int2_constr_1, Int2_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000129 0, 0, /* No members */
130 0 /* No specifics */
131};
132
133
134/*** <<< INCLUDES [Int3] >>> ***/
135
Lev Walkin22b5ed42006-09-13 02:51:20 +0000136#include "Int2.h"
Lev Walkin59b176e2005-11-26 11:25:14 +0000137
138/*** <<< TYPE-DECLS [Int3] >>> ***/
139
140typedef Int2_t Int3_t;
141
142/*** <<< FUNC-DECLS [Int3] >>> ***/
143
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800144extern asn_per_constraints_t asn_PER_type_Int3_constr_1;
Lev Walkin59b176e2005-11-26 11:25:14 +0000145extern asn_TYPE_descriptor_t asn_DEF_Int3;
146asn_struct_free_f Int3_free;
147asn_struct_print_f Int3_print;
148asn_constr_check_f Int3_constraint;
149ber_type_decoder_f Int3_decode_ber;
150der_type_encoder_f Int3_encode_der;
151xer_type_decoder_f Int3_decode_xer;
152xer_type_encoder_f Int3_encode_xer;
153per_type_decoder_f Int3_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000154per_type_encoder_f Int3_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000155
156/*** <<< CODE [Int3] >>> ***/
157
158int
159Int3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000160 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000161 long value;
162
163 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700164 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000165 "%s: value not given (%s:%d)",
166 td->name, __FILE__, __LINE__);
167 return -1;
168 }
169
Lev Walkin2a744a72013-03-27 01:56:23 -0700170 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +0000171
172 if((value >= 0 && value <= 10)) {
173 /* Constraint check succeeded */
174 return 0;
175 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700176 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000177 "%s: constraint failed (%s:%d)",
178 td->name, __FILE__, __LINE__);
179 return -1;
180 }
181}
182
183/*
184 * This type is implemented using Int2,
185 * so here we adjust the DEF accordingly.
186 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000187
Lev Walkin725883b2006-10-09 12:07:58 +0000188/*** <<< CTDEFS [Int3] >>> ***/
189
Lev Walkin0479e042017-09-26 18:39:58 -0700190asn_per_constraints_t asn_PER_type_Int3_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000191 { APC_CONSTRAINED, 4, 4, 0, 10 } /* (0..10) */,
192 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
193 0, 0 /* No PER value map */
194};
195
Lev Walkin59b176e2005-11-26 11:25:14 +0000196/*** <<< STAT-DEFS [Int3] >>> ***/
197
Lev Walkina7591b52014-10-12 18:37:35 -0700198static const ber_tlv_tag_t asn_DEF_Int3_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000199 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
200};
Lev Walkin59b176e2005-11-26 11:25:14 +0000201asn_TYPE_descriptor_t asn_DEF_Int3 = {
202 "Int3",
203 "Int3",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800204 &asn_OP_NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000205 asn_DEF_Int3_tags_1,
206 sizeof(asn_DEF_Int3_tags_1)
207 /sizeof(asn_DEF_Int3_tags_1[0]), /* 1 */
208 asn_DEF_Int3_tags_1, /* Same as above */
209 sizeof(asn_DEF_Int3_tags_1)
210 /sizeof(asn_DEF_Int3_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700211 { 0, &asn_PER_type_Int3_constr_1, Int3_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000212 0, 0, /* No members */
213 0 /* No specifics */
214};
215
216
217/*** <<< INCLUDES [Int4] >>> ***/
218
Lev Walkin22b5ed42006-09-13 02:51:20 +0000219#include "Int3.h"
Lev Walkin59b176e2005-11-26 11:25:14 +0000220
221/*** <<< TYPE-DECLS [Int4] >>> ***/
222
223typedef Int3_t Int4_t;
224
225/*** <<< FUNC-DECLS [Int4] >>> ***/
226
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800227extern asn_per_constraints_t asn_PER_type_Int4_constr_1;
Lev Walkin59b176e2005-11-26 11:25:14 +0000228extern asn_TYPE_descriptor_t asn_DEF_Int4;
229asn_struct_free_f Int4_free;
230asn_struct_print_f Int4_print;
231asn_constr_check_f Int4_constraint;
232ber_type_decoder_f Int4_decode_ber;
233der_type_encoder_f Int4_encode_der;
234xer_type_decoder_f Int4_decode_xer;
235xer_type_encoder_f Int4_encode_xer;
236per_type_decoder_f Int4_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000237per_type_encoder_f Int4_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000238
239/*** <<< CODE [Int4] >>> ***/
240
241int
242Int4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000243 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000244 long value;
245
246 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700247 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000248 "%s: value not given (%s:%d)",
249 td->name, __FILE__, __LINE__);
250 return -1;
251 }
252
Lev Walkin2a744a72013-03-27 01:56:23 -0700253 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +0000254
255 if((value >= 1 && value <= 10)) {
256 /* Constraint check succeeded */
257 return 0;
258 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700259 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000260 "%s: constraint failed (%s:%d)",
261 td->name, __FILE__, __LINE__);
262 return -1;
263 }
264}
265
266/*
267 * This type is implemented using Int3,
268 * so here we adjust the DEF accordingly.
269 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000270
Lev Walkin725883b2006-10-09 12:07:58 +0000271/*** <<< CTDEFS [Int4] >>> ***/
272
Lev Walkin0479e042017-09-26 18:39:58 -0700273asn_per_constraints_t asn_PER_type_Int4_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000274 { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 1, 10 } /* (1..10,...) */,
275 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
276 0, 0 /* No PER value map */
277};
278
Lev Walkin59b176e2005-11-26 11:25:14 +0000279/*** <<< STAT-DEFS [Int4] >>> ***/
280
Lev Walkina7591b52014-10-12 18:37:35 -0700281static const ber_tlv_tag_t asn_DEF_Int4_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000282 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
283};
Lev Walkin59b176e2005-11-26 11:25:14 +0000284asn_TYPE_descriptor_t asn_DEF_Int4 = {
285 "Int4",
286 "Int4",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800287 &asn_OP_NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000288 asn_DEF_Int4_tags_1,
289 sizeof(asn_DEF_Int4_tags_1)
290 /sizeof(asn_DEF_Int4_tags_1[0]), /* 1 */
291 asn_DEF_Int4_tags_1, /* Same as above */
292 sizeof(asn_DEF_Int4_tags_1)
293 /sizeof(asn_DEF_Int4_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700294 { 0, &asn_PER_type_Int4_constr_1, Int4_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000295 0, 0, /* No members */
296 0 /* No specifics */
297};
298
299
300/*** <<< INCLUDES [Int5] >>> ***/
301
Lev Walkin22b5ed42006-09-13 02:51:20 +0000302#include "Int4.h"
Lev Walkin59b176e2005-11-26 11:25:14 +0000303
304/*** <<< TYPE-DECLS [Int5] >>> ***/
305
306typedef Int4_t Int5_t;
307
308/*** <<< FUNC-DECLS [Int5] >>> ***/
309
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800310extern asn_per_constraints_t asn_PER_type_Int5_constr_1;
Lev Walkin59b176e2005-11-26 11:25:14 +0000311extern asn_TYPE_descriptor_t asn_DEF_Int5;
312asn_struct_free_f Int5_free;
313asn_struct_print_f Int5_print;
314asn_constr_check_f Int5_constraint;
315ber_type_decoder_f Int5_decode_ber;
316der_type_encoder_f Int5_encode_der;
317xer_type_decoder_f Int5_decode_xer;
318xer_type_encoder_f Int5_encode_xer;
319per_type_decoder_f Int5_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000320per_type_encoder_f Int5_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000321
322/*** <<< CODE [Int5] >>> ***/
323
324int
325Int5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000326 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000327 long value;
328
329 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700330 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000331 "%s: value not given (%s:%d)",
332 td->name, __FILE__, __LINE__);
333 return -1;
334 }
335
Lev Walkin2a744a72013-03-27 01:56:23 -0700336 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +0000337
338 if((value == 5)) {
339 /* Constraint check succeeded */
340 return 0;
341 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700342 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000343 "%s: constraint failed (%s:%d)",
344 td->name, __FILE__, __LINE__);
345 return -1;
346 }
347}
348
349/*
350 * This type is implemented using Int4,
351 * so here we adjust the DEF accordingly.
352 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000353
Lev Walkin725883b2006-10-09 12:07:58 +0000354/*** <<< CTDEFS [Int5] >>> ***/
355
Lev Walkin0479e042017-09-26 18:39:58 -0700356asn_per_constraints_t asn_PER_type_Int5_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000357 { APC_CONSTRAINED, 0, 0, 5, 5 } /* (5..5) */,
358 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
359 0, 0 /* No PER value map */
360};
361
Lev Walkin59b176e2005-11-26 11:25:14 +0000362/*** <<< STAT-DEFS [Int5] >>> ***/
363
Lev Walkina7591b52014-10-12 18:37:35 -0700364static const ber_tlv_tag_t asn_DEF_Int5_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000365 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
366};
Lev Walkin59b176e2005-11-26 11:25:14 +0000367asn_TYPE_descriptor_t asn_DEF_Int5 = {
368 "Int5",
369 "Int5",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800370 &asn_OP_NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000371 asn_DEF_Int5_tags_1,
372 sizeof(asn_DEF_Int5_tags_1)
373 /sizeof(asn_DEF_Int5_tags_1[0]), /* 1 */
374 asn_DEF_Int5_tags_1, /* Same as above */
375 sizeof(asn_DEF_Int5_tags_1)
376 /sizeof(asn_DEF_Int5_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700377 { 0, &asn_PER_type_Int5_constr_1, Int5_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000378 0, 0, /* No members */
379 0 /* No specifics */
380};
381
382
383/*** <<< INCLUDES [ExtensibleExtensions] >>> ***/
384
Lev Walkin2a744a72013-03-27 01:56:23 -0700385#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +0000386
387/*** <<< TYPE-DECLS [ExtensibleExtensions] >>> ***/
388
Lev Walkin2a744a72013-03-27 01:56:23 -0700389typedef long ExtensibleExtensions_t;
Lev Walkin59b176e2005-11-26 11:25:14 +0000390
391/*** <<< FUNC-DECLS [ExtensibleExtensions] >>> ***/
392
393extern asn_TYPE_descriptor_t asn_DEF_ExtensibleExtensions;
394asn_struct_free_f ExtensibleExtensions_free;
395asn_struct_print_f ExtensibleExtensions_print;
396asn_constr_check_f ExtensibleExtensions_constraint;
397ber_type_decoder_f ExtensibleExtensions_decode_ber;
398der_type_encoder_f ExtensibleExtensions_encode_der;
399xer_type_decoder_f ExtensibleExtensions_decode_xer;
400xer_type_encoder_f ExtensibleExtensions_encode_xer;
401per_type_decoder_f ExtensibleExtensions_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000402per_type_encoder_f ExtensibleExtensions_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000403
404/*** <<< CODE [ExtensibleExtensions] >>> ***/
405
406int
407ExtensibleExtensions_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000408 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000409 long value;
410
411 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700412 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000413 "%s: value not given (%s:%d)",
414 td->name, __FILE__, __LINE__);
415 return -1;
416 }
417
Lev Walkin2a744a72013-03-27 01:56:23 -0700418 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +0000419
Lev Walkin0c686452017-09-07 22:59:36 -0700420 if((value >= 1 && value <= 255)) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000421 /* Constraint check succeeded */
422 return 0;
423 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700424 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000425 "%s: constraint failed (%s:%d)",
426 td->name, __FILE__, __LINE__);
427 return -1;
428 }
429}
430
431/*
Lev Walkin2a744a72013-03-27 01:56:23 -0700432 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000433 * so here we adjust the DEF accordingly.
434 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000435
Lev Walkin725883b2006-10-09 12:07:58 +0000436/*** <<< CTDEFS [ExtensibleExtensions] >>> ***/
437
Lev Walkin0479e042017-09-26 18:39:58 -0700438static asn_per_constraints_t asn_PER_type_ExtensibleExtensions_constr_1 CC_NOTUSED = {
Lev Walkin0c686452017-09-07 22:59:36 -0700439 { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 255 } /* (1..255,...) */,
Lev Walkin725883b2006-10-09 12:07:58 +0000440 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
441 0, 0 /* No PER value map */
442};
443
Lev Walkin59b176e2005-11-26 11:25:14 +0000444/*** <<< STAT-DEFS [ExtensibleExtensions] >>> ***/
445
Lev Walkina7591b52014-10-12 18:37:35 -0700446static const ber_tlv_tag_t asn_DEF_ExtensibleExtensions_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000447 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
448};
Lev Walkin59b176e2005-11-26 11:25:14 +0000449asn_TYPE_descriptor_t asn_DEF_ExtensibleExtensions = {
450 "ExtensibleExtensions",
451 "ExtensibleExtensions",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800452 &asn_OP_NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000453 asn_DEF_ExtensibleExtensions_tags_1,
454 sizeof(asn_DEF_ExtensibleExtensions_tags_1)
455 /sizeof(asn_DEF_ExtensibleExtensions_tags_1[0]), /* 1 */
456 asn_DEF_ExtensibleExtensions_tags_1, /* Same as above */
457 sizeof(asn_DEF_ExtensibleExtensions_tags_1)
458 /sizeof(asn_DEF_ExtensibleExtensions_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700459 { 0, &asn_PER_type_ExtensibleExtensions_constr_1, ExtensibleExtensions_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000460 0, 0, /* No members */
461 0 /* No specifics */
462};
463
464
465/*** <<< INCLUDES [Str1] >>> ***/
466
467#include <IA5String.h>
468
469/*** <<< TYPE-DECLS [Str1] >>> ***/
470
471typedef IA5String_t Str1_t;
472
473/*** <<< FUNC-DECLS [Str1] >>> ***/
474
475extern asn_TYPE_descriptor_t asn_DEF_Str1;
476asn_struct_free_f Str1_free;
477asn_struct_print_f Str1_print;
478asn_constr_check_f Str1_constraint;
479ber_type_decoder_f Str1_decode_ber;
480der_type_encoder_f Str1_encode_der;
481xer_type_decoder_f Str1_decode_xer;
482xer_type_encoder_f Str1_encode_xer;
483per_type_decoder_f Str1_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000484per_type_encoder_f Str1_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000485
486/*** <<< CODE [Str1] >>> ***/
487
Lev Walkin59b176e2005-11-26 11:25:14 +0000488/*
489 * This type is implemented using IA5String,
490 * so here we adjust the DEF accordingly.
491 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000492
493/*** <<< STAT-DEFS [Str1] >>> ***/
494
Lev Walkina7591b52014-10-12 18:37:35 -0700495static const ber_tlv_tag_t asn_DEF_Str1_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000496 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
497};
498asn_TYPE_descriptor_t asn_DEF_Str1 = {
499 "Str1",
500 "Str1",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800501 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +0000502 asn_DEF_Str1_tags_1,
503 sizeof(asn_DEF_Str1_tags_1)
504 /sizeof(asn_DEF_Str1_tags_1[0]), /* 1 */
505 asn_DEF_Str1_tags_1, /* Same as above */
506 sizeof(asn_DEF_Str1_tags_1)
507 /sizeof(asn_DEF_Str1_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700508 { 0, 0, IA5String_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000509 0, 0, /* No members */
510 0 /* No specifics */
511};
512
513
514/*** <<< INCLUDES [Str2] >>> ***/
515
Lev Walkin22b5ed42006-09-13 02:51:20 +0000516#include "Str1.h"
Lev Walkin59b176e2005-11-26 11:25:14 +0000517
518/*** <<< TYPE-DECLS [Str2] >>> ***/
519
520typedef Str1_t Str2_t;
521
522/*** <<< FUNC-DECLS [Str2] >>> ***/
523
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800524extern asn_per_constraints_t asn_PER_type_Str2_constr_1;
Lev Walkin59b176e2005-11-26 11:25:14 +0000525extern asn_TYPE_descriptor_t asn_DEF_Str2;
526asn_struct_free_f Str2_free;
527asn_struct_print_f Str2_print;
528asn_constr_check_f Str2_constraint;
529ber_type_decoder_f Str2_decode_ber;
530der_type_encoder_f Str2_encode_der;
531xer_type_decoder_f Str2_decode_xer;
532xer_type_encoder_f Str2_encode_xer;
533per_type_decoder_f Str2_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000534per_type_encoder_f Str2_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000535
536/*** <<< CTABLES [Str2] >>> ***/
537
538static int check_permitted_alphabet_1(const void *sptr) {
539 /* The underlying type is IA5String */
540 const IA5String_t *st = (const IA5String_t *)sptr;
541 const uint8_t *ch = st->buf;
542 const uint8_t *end = ch + st->size;
543
544 for(; ch < end; ch++) {
545 uint8_t cv = *ch;
546 if(!(cv <= 127)) return -1;
547 }
548 return 0;
549}
550
551
552/*** <<< CODE [Str2] >>> ***/
553
554int
555Str2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000556 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000557 const Str1_t *st = (const Str1_t *)sptr;
558 size_t size;
559
560 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700561 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000562 "%s: value not given (%s:%d)",
563 td->name, __FILE__, __LINE__);
564 return -1;
565 }
566
567 size = st->size;
568
569 if(((size <= 20) || (size >= 25 && size <= 30))
570 && !check_permitted_alphabet_1(st)) {
571 /* Constraint check succeeded */
572 return 0;
573 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700574 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000575 "%s: constraint failed (%s:%d)",
576 td->name, __FILE__, __LINE__);
577 return -1;
578 }
579}
580
581/*
582 * This type is implemented using Str1,
583 * so here we adjust the DEF accordingly.
584 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000585
Lev Walkin725883b2006-10-09 12:07:58 +0000586/*** <<< CTDEFS [Str2] >>> ***/
587
Lev Walkin0479e042017-09-26 18:39:58 -0700588asn_per_constraints_t asn_PER_type_Str2_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000589 { APC_CONSTRAINED, 7, 7, 0, 127 } /* (0..127) */,
590 { APC_CONSTRAINED, 5, 5, 0, 30 } /* (SIZE(0..30)) */,
591 0, 0 /* No PER character map necessary */
592};
593
Lev Walkin59b176e2005-11-26 11:25:14 +0000594/*** <<< STAT-DEFS [Str2] >>> ***/
595
Lev Walkina7591b52014-10-12 18:37:35 -0700596static const ber_tlv_tag_t asn_DEF_Str2_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000597 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
598};
Lev Walkin59b176e2005-11-26 11:25:14 +0000599asn_TYPE_descriptor_t asn_DEF_Str2 = {
600 "Str2",
601 "Str2",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800602 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +0000603 asn_DEF_Str2_tags_1,
604 sizeof(asn_DEF_Str2_tags_1)
605 /sizeof(asn_DEF_Str2_tags_1[0]), /* 1 */
606 asn_DEF_Str2_tags_1, /* Same as above */
607 sizeof(asn_DEF_Str2_tags_1)
608 /sizeof(asn_DEF_Str2_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700609 { 0, &asn_PER_type_Str2_constr_1, Str2_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000610 0, 0, /* No members */
611 0 /* No specifics */
612};
613
614
615/*** <<< INCLUDES [Str3] >>> ***/
616
Lev Walkin22b5ed42006-09-13 02:51:20 +0000617#include "Str2.h"
Lev Walkin59b176e2005-11-26 11:25:14 +0000618
619/*** <<< TYPE-DECLS [Str3] >>> ***/
620
621typedef Str2_t Str3_t;
622
623/*** <<< FUNC-DECLS [Str3] >>> ***/
624
625extern asn_TYPE_descriptor_t asn_DEF_Str3;
626asn_struct_free_f Str3_free;
627asn_struct_print_f Str3_print;
628asn_constr_check_f Str3_constraint;
629ber_type_decoder_f Str3_decode_ber;
630der_type_encoder_f Str3_encode_der;
631xer_type_decoder_f Str3_decode_xer;
632xer_type_encoder_f Str3_encode_xer;
633per_type_decoder_f Str3_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000634per_type_encoder_f Str3_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000635
636/*** <<< CTABLES [Str3] >>> ***/
637
Lev Walkina7591b52014-10-12 18:37:35 -0700638static const int permitted_alphabet_table_1[256] = {
Lev Walkin5b62ca82006-09-21 01:52:07 +0000639 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
640 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
641 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
642 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
643 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ABC */
644 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
645 0, 0, 0, 0, 4, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* def */
Lev Walkin59b176e2005-11-26 11:25:14 +0000646};
Lev Walkina7591b52014-10-12 18:37:35 -0700647static const int permitted_alphabet_code2value_1[6] = {
Lev Walkin5b62ca82006-09-21 01:52:07 +000064865,66,67,100,101,102,};
649
Lev Walkin59b176e2005-11-26 11:25:14 +0000650
651static int check_permitted_alphabet_1(const void *sptr) {
Lev Walkina7591b52014-10-12 18:37:35 -0700652 const int *table = permitted_alphabet_table_1;
Lev Walkin59b176e2005-11-26 11:25:14 +0000653 /* The underlying type is IA5String */
654 const IA5String_t *st = (const IA5String_t *)sptr;
655 const uint8_t *ch = st->buf;
656 const uint8_t *end = ch + st->size;
657
658 for(; ch < end; ch++) {
659 uint8_t cv = *ch;
660 if(!table[cv]) return -1;
661 }
662 return 0;
663}
664
665
666/*** <<< CODE [Str3] >>> ***/
667
668int
669Str3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000670 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000671 const Str2_t *st = (const Str2_t *)sptr;
672 size_t size;
673
674 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700675 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000676 "%s: value not given (%s:%d)",
677 td->name, __FILE__, __LINE__);
678 return -1;
679 }
680
681 size = st->size;
682
683 if(((size >= 10 && size <= 20) || (size >= 25 && size <= 27))
684 && !check_permitted_alphabet_1(st)) {
685 /* Constraint check succeeded */
686 return 0;
687 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700688 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000689 "%s: constraint failed (%s:%d)",
690 td->name, __FILE__, __LINE__);
691 return -1;
692 }
693}
694
Lev Walkin725883b2006-10-09 12:07:58 +0000695static int asn_PER_MAP_Str3_1_v2c(unsigned int value) {
696 if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0]))
697 return -1;
698 return permitted_alphabet_table_1[value] - 1;
699}
700static int asn_PER_MAP_Str3_1_c2v(unsigned int code) {
701 if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0]))
702 return -1;
703 return permitted_alphabet_code2value_1[code];
704}
Lev Walkin59b176e2005-11-26 11:25:14 +0000705/*
706 * This type is implemented using Str2,
707 * so here we adjust the DEF accordingly.
708 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000709
Lev Walkin725883b2006-10-09 12:07:58 +0000710/*** <<< CTDEFS [Str3] >>> ***/
711
Lev Walkin0479e042017-09-26 18:39:58 -0700712static asn_per_constraints_t asn_PER_type_Str3_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000713 { APC_CONSTRAINED, 3, 3, 65, 102 } /* (65..102) */,
714 { APC_CONSTRAINED, 5, 5, 10, 27 } /* (SIZE(10..27)) */,
715 asn_PER_MAP_Str3_1_v2c, /* Value to PER code map */
716 asn_PER_MAP_Str3_1_c2v /* PER code to value map */
717};
718
Lev Walkin59b176e2005-11-26 11:25:14 +0000719/*** <<< STAT-DEFS [Str3] >>> ***/
720
Lev Walkina7591b52014-10-12 18:37:35 -0700721static const ber_tlv_tag_t asn_DEF_Str3_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000722 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
723};
Lev Walkin59b176e2005-11-26 11:25:14 +0000724asn_TYPE_descriptor_t asn_DEF_Str3 = {
725 "Str3",
726 "Str3",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800727 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +0000728 asn_DEF_Str3_tags_1,
729 sizeof(asn_DEF_Str3_tags_1)
730 /sizeof(asn_DEF_Str3_tags_1[0]), /* 1 */
731 asn_DEF_Str3_tags_1, /* Same as above */
732 sizeof(asn_DEF_Str3_tags_1)
733 /sizeof(asn_DEF_Str3_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700734 { 0, &asn_PER_type_Str3_constr_1, Str3_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000735 0, 0, /* No members */
736 0 /* No specifics */
737};
738
739
740/*** <<< INCLUDES [Str4] >>> ***/
741
742#include <IA5String.h>
743
744/*** <<< TYPE-DECLS [Str4] >>> ***/
745
746typedef IA5String_t Str4_t;
747
748/*** <<< FUNC-DECLS [Str4] >>> ***/
749
750extern asn_TYPE_descriptor_t asn_DEF_Str4;
751asn_struct_free_f Str4_free;
752asn_struct_print_f Str4_print;
753asn_constr_check_f Str4_constraint;
754ber_type_decoder_f Str4_decode_ber;
755der_type_encoder_f Str4_encode_der;
756xer_type_decoder_f Str4_decode_xer;
757xer_type_encoder_f Str4_encode_xer;
758per_type_decoder_f Str4_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000759per_type_encoder_f Str4_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000760
761/*** <<< CTABLES [Str4] >>> ***/
762
763static int check_permitted_alphabet_1(const void *sptr) {
764 /* The underlying type is IA5String */
765 const IA5String_t *st = (const IA5String_t *)sptr;
766 const uint8_t *ch = st->buf;
767 const uint8_t *end = ch + st->size;
768
769 for(; ch < end; ch++) {
770 uint8_t cv = *ch;
771 if(!(cv <= 127)) return -1;
772 }
773 return 0;
774}
775
776
777/*** <<< CODE [Str4] >>> ***/
778
779int
780Str4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000781 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000782 const IA5String_t *st = (const IA5String_t *)sptr;
783
784 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700785 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000786 "%s: value not given (%s:%d)",
787 td->name, __FILE__, __LINE__);
788 return -1;
789 }
790
791
792 if(!check_permitted_alphabet_1(st)) {
793 /* Constraint check succeeded */
794 return 0;
795 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700796 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000797 "%s: constraint failed (%s:%d)",
798 td->name, __FILE__, __LINE__);
799 return -1;
800 }
801}
802
803/*
804 * This type is implemented using IA5String,
805 * so here we adjust the DEF accordingly.
806 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000807
Lev Walkin725883b2006-10-09 12:07:58 +0000808/*** <<< CTDEFS [Str4] >>> ***/
809
Lev Walkin0479e042017-09-26 18:39:58 -0700810static asn_per_constraints_t asn_PER_type_Str4_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000811 { APC_CONSTRAINED, 7, 7, 0, 127 } /* (0..127) */,
812 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
813 0, 0 /* No PER character map necessary */
814};
815
Lev Walkin59b176e2005-11-26 11:25:14 +0000816/*** <<< STAT-DEFS [Str4] >>> ***/
817
Lev Walkina7591b52014-10-12 18:37:35 -0700818static const ber_tlv_tag_t asn_DEF_Str4_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000819 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
820};
Lev Walkin59b176e2005-11-26 11:25:14 +0000821asn_TYPE_descriptor_t asn_DEF_Str4 = {
822 "Str4",
823 "Str4",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800824 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +0000825 asn_DEF_Str4_tags_1,
826 sizeof(asn_DEF_Str4_tags_1)
827 /sizeof(asn_DEF_Str4_tags_1[0]), /* 1 */
828 asn_DEF_Str4_tags_1, /* Same as above */
829 sizeof(asn_DEF_Str4_tags_1)
830 /sizeof(asn_DEF_Str4_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700831 { 0, &asn_PER_type_Str4_constr_1, Str4_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000832 0, 0, /* No members */
833 0 /* No specifics */
834};
835
836
837/*** <<< INCLUDES [PER-Visible] >>> ***/
838
839#include <IA5String.h>
840
841/*** <<< TYPE-DECLS [PER-Visible] >>> ***/
842
843typedef IA5String_t PER_Visible_t;
844
845/*** <<< FUNC-DECLS [PER-Visible] >>> ***/
846
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800847extern asn_per_constraints_t asn_PER_type_PER_Visible_constr_1;
Lev Walkin59b176e2005-11-26 11:25:14 +0000848extern asn_TYPE_descriptor_t asn_DEF_PER_Visible;
849asn_struct_free_f PER_Visible_free;
850asn_struct_print_f PER_Visible_print;
851asn_constr_check_f PER_Visible_constraint;
852ber_type_decoder_f PER_Visible_decode_ber;
853der_type_encoder_f PER_Visible_encode_der;
854xer_type_decoder_f PER_Visible_decode_xer;
855xer_type_encoder_f PER_Visible_encode_xer;
856per_type_decoder_f PER_Visible_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000857per_type_encoder_f PER_Visible_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000858
859/*** <<< CTABLES [PER-Visible] >>> ***/
860
861static int check_permitted_alphabet_1(const void *sptr) {
862 /* The underlying type is IA5String */
863 const IA5String_t *st = (const IA5String_t *)sptr;
864 const uint8_t *ch = st->buf;
865 const uint8_t *end = ch + st->size;
866
867 for(; ch < end; ch++) {
868 uint8_t cv = *ch;
869 if(!(cv >= 65 && cv <= 70)) return -1;
870 }
871 return 0;
872}
873
874
875/*** <<< CODE [PER-Visible] >>> ***/
876
877int
878PER_Visible_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000879 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000880 const IA5String_t *st = (const IA5String_t *)sptr;
881
882 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700883 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000884 "%s: value not given (%s:%d)",
885 td->name, __FILE__, __LINE__);
886 return -1;
887 }
888
889
890 if(!check_permitted_alphabet_1(st)) {
891 /* Constraint check succeeded */
892 return 0;
893 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700894 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000895 "%s: constraint failed (%s:%d)",
896 td->name, __FILE__, __LINE__);
897 return -1;
898 }
899}
900
901/*
902 * This type is implemented using IA5String,
903 * so here we adjust the DEF accordingly.
904 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000905
Lev Walkin725883b2006-10-09 12:07:58 +0000906/*** <<< CTDEFS [PER-Visible] >>> ***/
907
Lev Walkin0479e042017-09-26 18:39:58 -0700908asn_per_constraints_t asn_PER_type_PER_Visible_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000909 { APC_CONSTRAINED, 3, 3, 65, 70 } /* (65..70) */,
910 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
911 0, 0 /* No PER character map necessary */
912};
913
Lev Walkin59b176e2005-11-26 11:25:14 +0000914/*** <<< STAT-DEFS [PER-Visible] >>> ***/
915
Lev Walkina7591b52014-10-12 18:37:35 -0700916static const ber_tlv_tag_t asn_DEF_PER_Visible_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000917 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
918};
Lev Walkin59b176e2005-11-26 11:25:14 +0000919asn_TYPE_descriptor_t asn_DEF_PER_Visible = {
920 "PER-Visible",
921 "PER-Visible",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800922 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +0000923 asn_DEF_PER_Visible_tags_1,
924 sizeof(asn_DEF_PER_Visible_tags_1)
925 /sizeof(asn_DEF_PER_Visible_tags_1[0]), /* 1 */
926 asn_DEF_PER_Visible_tags_1, /* Same as above */
927 sizeof(asn_DEF_PER_Visible_tags_1)
928 /sizeof(asn_DEF_PER_Visible_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700929 { 0, &asn_PER_type_PER_Visible_constr_1, PER_Visible_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000930 0, 0, /* No members */
931 0 /* No specifics */
932};
933
934
935/*** <<< INCLUDES [PER-Visible-2] >>> ***/
936
Lev Walkin22b5ed42006-09-13 02:51:20 +0000937#include "PER-Visible.h"
Lev Walkin59b176e2005-11-26 11:25:14 +0000938
939/*** <<< TYPE-DECLS [PER-Visible-2] >>> ***/
940
941typedef PER_Visible_t PER_Visible_2_t;
942
943/*** <<< FUNC-DECLS [PER-Visible-2] >>> ***/
944
945extern asn_TYPE_descriptor_t asn_DEF_PER_Visible_2;
946asn_struct_free_f PER_Visible_2_free;
947asn_struct_print_f PER_Visible_2_print;
948asn_constr_check_f PER_Visible_2_constraint;
949ber_type_decoder_f PER_Visible_2_decode_ber;
950der_type_encoder_f PER_Visible_2_encode_der;
951xer_type_decoder_f PER_Visible_2_decode_xer;
952xer_type_encoder_f PER_Visible_2_encode_xer;
953per_type_decoder_f PER_Visible_2_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000954per_type_encoder_f PER_Visible_2_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000955
956/*** <<< CTABLES [PER-Visible-2] >>> ***/
957
958static int check_permitted_alphabet_1(const void *sptr) {
959 /* The underlying type is IA5String */
960 const IA5String_t *st = (const IA5String_t *)sptr;
961 const uint8_t *ch = st->buf;
962 const uint8_t *end = ch + st->size;
963
964 for(; ch < end; ch++) {
965 uint8_t cv = *ch;
966 if(!(cv >= 69 && cv <= 70)) return -1;
967 }
968 return 0;
969}
970
971
972/*** <<< CODE [PER-Visible-2] >>> ***/
973
974int
975PER_Visible_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000976 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000977 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
978
979 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700980 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000981 "%s: value not given (%s:%d)",
982 td->name, __FILE__, __LINE__);
983 return -1;
984 }
985
986
987 if(!check_permitted_alphabet_1(st)) {
988 /* Constraint check succeeded */
989 return 0;
990 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700991 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000992 "%s: constraint failed (%s:%d)",
993 td->name, __FILE__, __LINE__);
994 return -1;
995 }
996}
997
998/*
999 * This type is implemented using PER_Visible,
1000 * so here we adjust the DEF accordingly.
1001 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001002
Lev Walkin725883b2006-10-09 12:07:58 +00001003/*** <<< CTDEFS [PER-Visible-2] >>> ***/
1004
Lev Walkin0479e042017-09-26 18:39:58 -07001005static asn_per_constraints_t asn_PER_type_PER_Visible_2_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001006 { APC_CONSTRAINED, 1, 1, 69, 70 } /* (69..70) */,
1007 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
1008 0, 0 /* No PER character map necessary */
1009};
1010
Lev Walkin59b176e2005-11-26 11:25:14 +00001011/*** <<< STAT-DEFS [PER-Visible-2] >>> ***/
1012
Lev Walkina7591b52014-10-12 18:37:35 -07001013static const ber_tlv_tag_t asn_DEF_PER_Visible_2_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001014 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1015};
Lev Walkin59b176e2005-11-26 11:25:14 +00001016asn_TYPE_descriptor_t asn_DEF_PER_Visible_2 = {
1017 "PER-Visible-2",
1018 "PER-Visible-2",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001019 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001020 asn_DEF_PER_Visible_2_tags_1,
1021 sizeof(asn_DEF_PER_Visible_2_tags_1)
1022 /sizeof(asn_DEF_PER_Visible_2_tags_1[0]), /* 1 */
1023 asn_DEF_PER_Visible_2_tags_1, /* Same as above */
1024 sizeof(asn_DEF_PER_Visible_2_tags_1)
1025 /sizeof(asn_DEF_PER_Visible_2_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07001026 { 0, &asn_PER_type_PER_Visible_2_constr_1, PER_Visible_2_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00001027 0, 0, /* No members */
1028 0 /* No specifics */
1029};
1030
1031
1032/*** <<< INCLUDES [Not-PER-Visible-1] >>> ***/
1033
Lev Walkin22b5ed42006-09-13 02:51:20 +00001034#include "PER-Visible.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001035
1036/*** <<< TYPE-DECLS [Not-PER-Visible-1] >>> ***/
1037
1038typedef PER_Visible_t Not_PER_Visible_1_t;
1039
1040/*** <<< FUNC-DECLS [Not-PER-Visible-1] >>> ***/
1041
1042extern asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_1;
1043asn_struct_free_f Not_PER_Visible_1_free;
1044asn_struct_print_f Not_PER_Visible_1_print;
1045asn_constr_check_f Not_PER_Visible_1_constraint;
1046ber_type_decoder_f Not_PER_Visible_1_decode_ber;
1047der_type_encoder_f Not_PER_Visible_1_encode_der;
1048xer_type_decoder_f Not_PER_Visible_1_decode_xer;
1049xer_type_encoder_f Not_PER_Visible_1_encode_xer;
1050per_type_decoder_f Not_PER_Visible_1_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001051per_type_encoder_f Not_PER_Visible_1_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001052
1053/*** <<< CTABLES [Not-PER-Visible-1] >>> ***/
1054
1055static int check_permitted_alphabet_1(const void *sptr) {
1056 /* The underlying type is IA5String */
1057 const IA5String_t *st = (const IA5String_t *)sptr;
1058 const uint8_t *ch = st->buf;
1059 const uint8_t *end = ch + st->size;
1060
1061 for(; ch < end; ch++) {
1062 uint8_t cv = *ch;
1063 if(!(cv >= 65 && cv <= 70)) return -1;
1064 }
1065 return 0;
1066}
1067
1068
1069/*** <<< CODE [Not-PER-Visible-1] >>> ***/
1070
1071int
1072Not_PER_Visible_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001073 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001074 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1075
1076 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001077 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001078 "%s: value not given (%s:%d)",
1079 td->name, __FILE__, __LINE__);
1080 return -1;
1081 }
1082
1083
1084 if(!check_permitted_alphabet_1(st)) {
1085 /* Constraint check succeeded */
1086 return 0;
1087 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001088 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001089 "%s: constraint failed (%s:%d)",
1090 td->name, __FILE__, __LINE__);
1091 return -1;
1092 }
1093}
1094
1095/*
1096 * This type is implemented using PER_Visible,
1097 * so here we adjust the DEF accordingly.
1098 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001099
Lev Walkin725883b2006-10-09 12:07:58 +00001100/*** <<< CTDEFS [Not-PER-Visible-1] >>> ***/
1101
Lev Walkin0479e042017-09-26 18:39:58 -07001102static asn_per_constraints_t asn_PER_type_Not_PER_Visible_1_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001103 { APC_CONSTRAINED, 3, 3, 65, 70 } /* (65..70) */,
1104 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
1105 0, 0 /* No PER character map necessary */
1106};
1107
Lev Walkin59b176e2005-11-26 11:25:14 +00001108/*** <<< STAT-DEFS [Not-PER-Visible-1] >>> ***/
1109
Lev Walkina7591b52014-10-12 18:37:35 -07001110static const ber_tlv_tag_t asn_DEF_Not_PER_Visible_1_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001111 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1112};
Lev Walkin59b176e2005-11-26 11:25:14 +00001113asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_1 = {
1114 "Not-PER-Visible-1",
1115 "Not-PER-Visible-1",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001116 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001117 asn_DEF_Not_PER_Visible_1_tags_1,
1118 sizeof(asn_DEF_Not_PER_Visible_1_tags_1)
1119 /sizeof(asn_DEF_Not_PER_Visible_1_tags_1[0]), /* 1 */
1120 asn_DEF_Not_PER_Visible_1_tags_1, /* Same as above */
1121 sizeof(asn_DEF_Not_PER_Visible_1_tags_1)
1122 /sizeof(asn_DEF_Not_PER_Visible_1_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07001123 { 0, &asn_PER_type_Not_PER_Visible_1_constr_1, Not_PER_Visible_1_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00001124 0, 0, /* No members */
1125 0 /* No specifics */
1126};
1127
1128
1129/*** <<< INCLUDES [Not-PER-Visible-2] >>> ***/
1130
Lev Walkin22b5ed42006-09-13 02:51:20 +00001131#include "PER-Visible.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001132
1133/*** <<< TYPE-DECLS [Not-PER-Visible-2] >>> ***/
1134
1135typedef PER_Visible_t Not_PER_Visible_2_t;
1136
1137/*** <<< FUNC-DECLS [Not-PER-Visible-2] >>> ***/
1138
1139extern asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_2;
1140asn_struct_free_f Not_PER_Visible_2_free;
1141asn_struct_print_f Not_PER_Visible_2_print;
1142asn_constr_check_f Not_PER_Visible_2_constraint;
1143ber_type_decoder_f Not_PER_Visible_2_decode_ber;
1144der_type_encoder_f Not_PER_Visible_2_encode_der;
1145xer_type_decoder_f Not_PER_Visible_2_decode_xer;
1146xer_type_encoder_f Not_PER_Visible_2_encode_xer;
1147per_type_decoder_f Not_PER_Visible_2_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001148per_type_encoder_f Not_PER_Visible_2_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001149
1150/*** <<< CTABLES [Not-PER-Visible-2] >>> ***/
1151
1152static int check_permitted_alphabet_1(const void *sptr) {
1153 /* The underlying type is IA5String */
1154 const IA5String_t *st = (const IA5String_t *)sptr;
1155 const uint8_t *ch = st->buf;
1156 const uint8_t *end = ch + st->size;
1157
1158 for(; ch < end; ch++) {
1159 uint8_t cv = *ch;
1160 if(!(cv >= 65 && cv <= 66)) return -1;
1161 }
1162 return 0;
1163}
1164
1165
1166/*** <<< CODE [Not-PER-Visible-2] >>> ***/
1167
1168int
1169Not_PER_Visible_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001170 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001171 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1172
1173 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001174 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001175 "%s: value not given (%s:%d)",
1176 td->name, __FILE__, __LINE__);
1177 return -1;
1178 }
1179
1180
1181 if(!check_permitted_alphabet_1(st)) {
1182 /* Constraint check succeeded */
1183 return 0;
1184 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001185 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001186 "%s: constraint failed (%s:%d)",
1187 td->name, __FILE__, __LINE__);
1188 return -1;
1189 }
1190}
1191
1192/*
1193 * This type is implemented using PER_Visible,
1194 * so here we adjust the DEF accordingly.
1195 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001196
Lev Walkin725883b2006-10-09 12:07:58 +00001197/*** <<< CTDEFS [Not-PER-Visible-2] >>> ***/
1198
Lev Walkin0479e042017-09-26 18:39:58 -07001199static asn_per_constraints_t asn_PER_type_Not_PER_Visible_2_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001200 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1201 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
1202 0, 0 /* No PER character map necessary */
1203};
1204
Lev Walkin59b176e2005-11-26 11:25:14 +00001205/*** <<< STAT-DEFS [Not-PER-Visible-2] >>> ***/
1206
Lev Walkina7591b52014-10-12 18:37:35 -07001207static const ber_tlv_tag_t asn_DEF_Not_PER_Visible_2_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001208 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1209};
Lev Walkin59b176e2005-11-26 11:25:14 +00001210asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_2 = {
1211 "Not-PER-Visible-2",
1212 "Not-PER-Visible-2",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001213 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001214 asn_DEF_Not_PER_Visible_2_tags_1,
1215 sizeof(asn_DEF_Not_PER_Visible_2_tags_1)
1216 /sizeof(asn_DEF_Not_PER_Visible_2_tags_1[0]), /* 1 */
1217 asn_DEF_Not_PER_Visible_2_tags_1, /* Same as above */
1218 sizeof(asn_DEF_Not_PER_Visible_2_tags_1)
1219 /sizeof(asn_DEF_Not_PER_Visible_2_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07001220 { 0, &asn_PER_type_Not_PER_Visible_2_constr_1, Not_PER_Visible_2_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00001221 0, 0, /* No members */
1222 0 /* No specifics */
1223};
1224
1225
1226/*** <<< INCLUDES [Not-PER-Visible-3] >>> ***/
1227
Lev Walkin22b5ed42006-09-13 02:51:20 +00001228#include "PER-Visible.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001229
1230/*** <<< TYPE-DECLS [Not-PER-Visible-3] >>> ***/
1231
1232typedef PER_Visible_t Not_PER_Visible_3_t;
1233
1234/*** <<< FUNC-DECLS [Not-PER-Visible-3] >>> ***/
1235
1236extern asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_3;
1237asn_struct_free_f Not_PER_Visible_3_free;
1238asn_struct_print_f Not_PER_Visible_3_print;
1239asn_constr_check_f Not_PER_Visible_3_constraint;
1240ber_type_decoder_f Not_PER_Visible_3_decode_ber;
1241der_type_encoder_f Not_PER_Visible_3_encode_der;
1242xer_type_decoder_f Not_PER_Visible_3_decode_xer;
1243xer_type_encoder_f Not_PER_Visible_3_encode_xer;
1244per_type_decoder_f Not_PER_Visible_3_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001245per_type_encoder_f Not_PER_Visible_3_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001246
1247/*** <<< CTABLES [Not-PER-Visible-3] >>> ***/
1248
1249static int check_permitted_alphabet_1(const void *sptr) {
1250 /* The underlying type is IA5String */
1251 const IA5String_t *st = (const IA5String_t *)sptr;
1252 const uint8_t *ch = st->buf;
1253 const uint8_t *end = ch + st->size;
1254
1255 for(; ch < end; ch++) {
1256 uint8_t cv = *ch;
1257 if(!(cv >= 65 && cv <= 66)) return -1;
1258 }
1259 return 0;
1260}
1261
1262
1263/*** <<< CODE [Not-PER-Visible-3] >>> ***/
1264
1265int
1266Not_PER_Visible_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001267 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001268 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1269
1270 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001271 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001272 "%s: value not given (%s:%d)",
1273 td->name, __FILE__, __LINE__);
1274 return -1;
1275 }
1276
1277
1278 if(!check_permitted_alphabet_1(st)) {
1279 /* Constraint check succeeded */
1280 return 0;
1281 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001282 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001283 "%s: constraint failed (%s:%d)",
1284 td->name, __FILE__, __LINE__);
1285 return -1;
1286 }
1287}
1288
1289/*
1290 * This type is implemented using PER_Visible,
1291 * so here we adjust the DEF accordingly.
1292 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001293
Lev Walkin725883b2006-10-09 12:07:58 +00001294/*** <<< CTDEFS [Not-PER-Visible-3] >>> ***/
1295
Lev Walkin0479e042017-09-26 18:39:58 -07001296static asn_per_constraints_t asn_PER_type_Not_PER_Visible_3_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001297 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1298 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
1299 0, 0 /* No PER character map necessary */
1300};
1301
Lev Walkin59b176e2005-11-26 11:25:14 +00001302/*** <<< STAT-DEFS [Not-PER-Visible-3] >>> ***/
1303
Lev Walkina7591b52014-10-12 18:37:35 -07001304static const ber_tlv_tag_t asn_DEF_Not_PER_Visible_3_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001305 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1306};
Lev Walkin59b176e2005-11-26 11:25:14 +00001307asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_3 = {
1308 "Not-PER-Visible-3",
1309 "Not-PER-Visible-3",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001310 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001311 asn_DEF_Not_PER_Visible_3_tags_1,
1312 sizeof(asn_DEF_Not_PER_Visible_3_tags_1)
1313 /sizeof(asn_DEF_Not_PER_Visible_3_tags_1[0]), /* 1 */
1314 asn_DEF_Not_PER_Visible_3_tags_1, /* Same as above */
1315 sizeof(asn_DEF_Not_PER_Visible_3_tags_1)
1316 /sizeof(asn_DEF_Not_PER_Visible_3_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07001317 { 0, &asn_PER_type_Not_PER_Visible_3_constr_1, Not_PER_Visible_3_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00001318 0, 0, /* No members */
1319 0 /* No specifics */
1320};
1321
1322
1323/*** <<< INCLUDES [SIZE-but-not-FROM] >>> ***/
1324
Lev Walkin22b5ed42006-09-13 02:51:20 +00001325#include "PER-Visible.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001326
1327/*** <<< TYPE-DECLS [SIZE-but-not-FROM] >>> ***/
1328
1329typedef PER_Visible_t SIZE_but_not_FROM_t;
1330
1331/*** <<< FUNC-DECLS [SIZE-but-not-FROM] >>> ***/
1332
1333extern asn_TYPE_descriptor_t asn_DEF_SIZE_but_not_FROM;
1334asn_struct_free_f SIZE_but_not_FROM_free;
1335asn_struct_print_f SIZE_but_not_FROM_print;
1336asn_constr_check_f SIZE_but_not_FROM_constraint;
1337ber_type_decoder_f SIZE_but_not_FROM_decode_ber;
1338der_type_encoder_f SIZE_but_not_FROM_encode_der;
1339xer_type_decoder_f SIZE_but_not_FROM_decode_xer;
1340xer_type_encoder_f SIZE_but_not_FROM_encode_xer;
1341per_type_decoder_f SIZE_but_not_FROM_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001342per_type_encoder_f SIZE_but_not_FROM_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001343
1344/*** <<< CTABLES [SIZE-but-not-FROM] >>> ***/
1345
1346static int check_permitted_alphabet_1(const void *sptr) {
1347 /* The underlying type is IA5String */
1348 const IA5String_t *st = (const IA5String_t *)sptr;
1349 const uint8_t *ch = st->buf;
1350 const uint8_t *end = ch + st->size;
1351
1352 for(; ch < end; ch++) {
1353 uint8_t cv = *ch;
1354 if(!(cv >= 65 && cv <= 68)) return -1;
1355 }
1356 return 0;
1357}
1358
1359
1360/*** <<< CODE [SIZE-but-not-FROM] >>> ***/
1361
1362int
1363SIZE_but_not_FROM_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001364 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001365 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1366 size_t size;
1367
1368 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001369 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001370 "%s: value not given (%s:%d)",
1371 td->name, __FILE__, __LINE__);
1372 return -1;
1373 }
1374
1375 size = st->size;
1376
1377 if((size >= 1 && size <= 4)
1378 && !check_permitted_alphabet_1(st)) {
1379 /* Constraint check succeeded */
1380 return 0;
1381 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001382 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001383 "%s: constraint failed (%s:%d)",
1384 td->name, __FILE__, __LINE__);
1385 return -1;
1386 }
1387}
1388
1389/*
1390 * This type is implemented using PER_Visible,
1391 * so here we adjust the DEF accordingly.
1392 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001393
Lev Walkin725883b2006-10-09 12:07:58 +00001394/*** <<< CTDEFS [SIZE-but-not-FROM] >>> ***/
1395
Lev Walkin0479e042017-09-26 18:39:58 -07001396static asn_per_constraints_t asn_PER_type_SIZE_but_not_FROM_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001397 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1398 { APC_CONSTRAINED, 2, 2, 1, 4 } /* (SIZE(1..4)) */,
1399 0, 0 /* No PER character map necessary */
1400};
1401
Lev Walkin59b176e2005-11-26 11:25:14 +00001402/*** <<< STAT-DEFS [SIZE-but-not-FROM] >>> ***/
1403
Lev Walkina7591b52014-10-12 18:37:35 -07001404static const ber_tlv_tag_t asn_DEF_SIZE_but_not_FROM_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001405 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1406};
Lev Walkin59b176e2005-11-26 11:25:14 +00001407asn_TYPE_descriptor_t asn_DEF_SIZE_but_not_FROM = {
1408 "SIZE-but-not-FROM",
1409 "SIZE-but-not-FROM",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001410 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001411 asn_DEF_SIZE_but_not_FROM_tags_1,
1412 sizeof(asn_DEF_SIZE_but_not_FROM_tags_1)
1413 /sizeof(asn_DEF_SIZE_but_not_FROM_tags_1[0]), /* 1 */
1414 asn_DEF_SIZE_but_not_FROM_tags_1, /* Same as above */
1415 sizeof(asn_DEF_SIZE_but_not_FROM_tags_1)
1416 /sizeof(asn_DEF_SIZE_but_not_FROM_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07001417 { 0, &asn_PER_type_SIZE_but_not_FROM_constr_1, SIZE_but_not_FROM_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00001418 0, 0, /* No members */
1419 0 /* No specifics */
1420};
1421
1422
1423/*** <<< INCLUDES [SIZE-and-FROM] >>> ***/
1424
Lev Walkin22b5ed42006-09-13 02:51:20 +00001425#include "PER-Visible.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001426
1427/*** <<< TYPE-DECLS [SIZE-and-FROM] >>> ***/
1428
1429typedef PER_Visible_t SIZE_and_FROM_t;
1430
1431/*** <<< FUNC-DECLS [SIZE-and-FROM] >>> ***/
1432
1433extern asn_TYPE_descriptor_t asn_DEF_SIZE_and_FROM;
1434asn_struct_free_f SIZE_and_FROM_free;
1435asn_struct_print_f SIZE_and_FROM_print;
1436asn_constr_check_f SIZE_and_FROM_constraint;
1437ber_type_decoder_f SIZE_and_FROM_decode_ber;
1438der_type_encoder_f SIZE_and_FROM_encode_der;
1439xer_type_decoder_f SIZE_and_FROM_decode_xer;
1440xer_type_encoder_f SIZE_and_FROM_encode_xer;
1441per_type_decoder_f SIZE_and_FROM_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001442per_type_encoder_f SIZE_and_FROM_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001443
1444/*** <<< CTABLES [SIZE-and-FROM] >>> ***/
1445
1446static int check_permitted_alphabet_1(const void *sptr) {
1447 /* The underlying type is IA5String */
1448 const IA5String_t *st = (const IA5String_t *)sptr;
1449 const uint8_t *ch = st->buf;
1450 const uint8_t *end = ch + st->size;
1451
1452 for(; ch < end; ch++) {
1453 uint8_t cv = *ch;
1454 if(!(cv >= 65 && cv <= 68)) return -1;
1455 }
1456 return 0;
1457}
1458
1459
1460/*** <<< CODE [SIZE-and-FROM] >>> ***/
1461
1462int
1463SIZE_and_FROM_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001464 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001465 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1466 size_t size;
1467
1468 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001469 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001470 "%s: value not given (%s:%d)",
1471 td->name, __FILE__, __LINE__);
1472 return -1;
1473 }
1474
1475 size = st->size;
1476
1477 if((size >= 1 && size <= 4)
1478 && !check_permitted_alphabet_1(st)) {
1479 /* Constraint check succeeded */
1480 return 0;
1481 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001482 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001483 "%s: constraint failed (%s:%d)",
1484 td->name, __FILE__, __LINE__);
1485 return -1;
1486 }
1487}
1488
1489/*
1490 * This type is implemented using PER_Visible,
1491 * so here we adjust the DEF accordingly.
1492 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001493
Lev Walkin725883b2006-10-09 12:07:58 +00001494/*** <<< CTDEFS [SIZE-and-FROM] >>> ***/
1495
Lev Walkin0479e042017-09-26 18:39:58 -07001496static asn_per_constraints_t asn_PER_type_SIZE_and_FROM_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001497 { APC_CONSTRAINED, 2, 2, 65, 68 } /* (65..68) */,
1498 { APC_CONSTRAINED, 2, 2, 1, 4 } /* (SIZE(1..4)) */,
1499 0, 0 /* No PER character map necessary */
1500};
1501
Lev Walkin59b176e2005-11-26 11:25:14 +00001502/*** <<< STAT-DEFS [SIZE-and-FROM] >>> ***/
1503
Lev Walkina7591b52014-10-12 18:37:35 -07001504static const ber_tlv_tag_t asn_DEF_SIZE_and_FROM_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001505 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1506};
Lev Walkin59b176e2005-11-26 11:25:14 +00001507asn_TYPE_descriptor_t asn_DEF_SIZE_and_FROM = {
1508 "SIZE-and-FROM",
1509 "SIZE-and-FROM",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001510 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001511 asn_DEF_SIZE_and_FROM_tags_1,
1512 sizeof(asn_DEF_SIZE_and_FROM_tags_1)
1513 /sizeof(asn_DEF_SIZE_and_FROM_tags_1[0]), /* 1 */
1514 asn_DEF_SIZE_and_FROM_tags_1, /* Same as above */
1515 sizeof(asn_DEF_SIZE_and_FROM_tags_1)
1516 /sizeof(asn_DEF_SIZE_and_FROM_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07001517 { 0, &asn_PER_type_SIZE_and_FROM_constr_1, SIZE_and_FROM_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00001518 0, 0, /* No members */
1519 0 /* No specifics */
1520};
1521
1522
1523/*** <<< INCLUDES [Neither-SIZE-nor-FROM] >>> ***/
1524
Lev Walkin22b5ed42006-09-13 02:51:20 +00001525#include "PER-Visible.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001526
1527/*** <<< TYPE-DECLS [Neither-SIZE-nor-FROM] >>> ***/
1528
1529typedef PER_Visible_t Neither_SIZE_nor_FROM_t;
1530
1531/*** <<< FUNC-DECLS [Neither-SIZE-nor-FROM] >>> ***/
1532
1533extern asn_TYPE_descriptor_t asn_DEF_Neither_SIZE_nor_FROM;
1534asn_struct_free_f Neither_SIZE_nor_FROM_free;
1535asn_struct_print_f Neither_SIZE_nor_FROM_print;
1536asn_constr_check_f Neither_SIZE_nor_FROM_constraint;
1537ber_type_decoder_f Neither_SIZE_nor_FROM_decode_ber;
1538der_type_encoder_f Neither_SIZE_nor_FROM_encode_der;
1539xer_type_decoder_f Neither_SIZE_nor_FROM_decode_xer;
1540xer_type_encoder_f Neither_SIZE_nor_FROM_encode_xer;
1541per_type_decoder_f Neither_SIZE_nor_FROM_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001542per_type_encoder_f Neither_SIZE_nor_FROM_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001543
1544/*** <<< CTABLES [Neither-SIZE-nor-FROM] >>> ***/
1545
1546static int check_permitted_alphabet_1(const void *sptr) {
1547 /* The underlying type is IA5String */
1548 const IA5String_t *st = (const IA5String_t *)sptr;
1549 const uint8_t *ch = st->buf;
1550 const uint8_t *end = ch + st->size;
1551
1552 for(; ch < end; ch++) {
1553 uint8_t cv = *ch;
1554 if(!(cv >= 65 && cv <= 70)) return -1;
1555 }
1556 return 0;
1557}
1558
1559
1560/*** <<< CODE [Neither-SIZE-nor-FROM] >>> ***/
1561
1562int
1563Neither_SIZE_nor_FROM_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001564 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001565 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1566
1567 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001568 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001569 "%s: value not given (%s:%d)",
1570 td->name, __FILE__, __LINE__);
1571 return -1;
1572 }
1573
1574
1575 if(!check_permitted_alphabet_1(st)) {
1576 /* Constraint check succeeded */
1577 return 0;
1578 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001579 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001580 "%s: constraint failed (%s:%d)",
1581 td->name, __FILE__, __LINE__);
1582 return -1;
1583 }
1584}
1585
1586/*
1587 * This type is implemented using PER_Visible,
1588 * so here we adjust the DEF accordingly.
1589 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001590
Lev Walkin725883b2006-10-09 12:07:58 +00001591/*** <<< CTDEFS [Neither-SIZE-nor-FROM] >>> ***/
1592
Lev Walkin0479e042017-09-26 18:39:58 -07001593static asn_per_constraints_t asn_PER_type_Neither_SIZE_nor_FROM_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001594 { APC_CONSTRAINED, 3, 3, 65, 70 } /* (65..70) */,
1595 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
1596 0, 0 /* No PER character map necessary */
1597};
1598
Lev Walkin59b176e2005-11-26 11:25:14 +00001599/*** <<< STAT-DEFS [Neither-SIZE-nor-FROM] >>> ***/
1600
Lev Walkina7591b52014-10-12 18:37:35 -07001601static const ber_tlv_tag_t asn_DEF_Neither_SIZE_nor_FROM_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001602 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1603};
Lev Walkin59b176e2005-11-26 11:25:14 +00001604asn_TYPE_descriptor_t asn_DEF_Neither_SIZE_nor_FROM = {
1605 "Neither-SIZE-nor-FROM",
1606 "Neither-SIZE-nor-FROM",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001607 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001608 asn_DEF_Neither_SIZE_nor_FROM_tags_1,
1609 sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1)
1610 /sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1[0]), /* 1 */
1611 asn_DEF_Neither_SIZE_nor_FROM_tags_1, /* Same as above */
1612 sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1)
1613 /sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07001614 { 0, &asn_PER_type_Neither_SIZE_nor_FROM_constr_1, Neither_SIZE_nor_FROM_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00001615 0, 0, /* No members */
1616 0 /* No specifics */
1617};
1618
1619
1620/*** <<< INCLUDES [Utf8-4] >>> ***/
1621
1622#include <UTF8String.h>
1623
1624/*** <<< TYPE-DECLS [Utf8-4] >>> ***/
1625
1626typedef UTF8String_t Utf8_4_t;
1627
1628/*** <<< FUNC-DECLS [Utf8-4] >>> ***/
1629
1630extern asn_TYPE_descriptor_t asn_DEF_Utf8_4;
1631asn_struct_free_f Utf8_4_free;
1632asn_struct_print_f Utf8_4_print;
1633asn_constr_check_f Utf8_4_constraint;
1634ber_type_decoder_f Utf8_4_decode_ber;
1635der_type_encoder_f Utf8_4_encode_der;
1636xer_type_decoder_f Utf8_4_decode_xer;
1637xer_type_encoder_f Utf8_4_encode_xer;
1638per_type_decoder_f Utf8_4_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001639per_type_encoder_f Utf8_4_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001640
1641/*** <<< CTABLES [Utf8-4] >>> ***/
1642
1643static int check_permitted_alphabet_1(const void *sptr) {
1644 if(UTF8String_length((const UTF8String_t *)sptr) < 0)
1645 return -1; /* Alphabet (sic!) test failed. */
1646
1647 return 0;
1648}
1649
1650
1651/*** <<< CODE [Utf8-4] >>> ***/
1652
1653int
1654Utf8_4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001655 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001656 const UTF8String_t *st = (const UTF8String_t *)sptr;
1657
1658 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001659 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001660 "%s: value not given (%s:%d)",
1661 td->name, __FILE__, __LINE__);
1662 return -1;
1663 }
1664
1665
1666 if(!check_permitted_alphabet_1(st)) {
1667 /* Constraint check succeeded */
1668 return 0;
1669 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001670 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001671 "%s: constraint failed (%s:%d)",
1672 td->name, __FILE__, __LINE__);
1673 return -1;
1674 }
1675}
1676
1677/*
1678 * This type is implemented using UTF8String,
1679 * so here we adjust the DEF accordingly.
1680 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001681
Lev Walkin725883b2006-10-09 12:07:58 +00001682/*** <<< CTDEFS [Utf8-4] >>> ***/
1683
Lev Walkin0479e042017-09-26 18:39:58 -07001684static asn_per_constraints_t asn_PER_type_Utf8_4_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001685 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1686 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1687 0, 0 /* No PER value map */
1688};
1689
Lev Walkin59b176e2005-11-26 11:25:14 +00001690/*** <<< STAT-DEFS [Utf8-4] >>> ***/
1691
Lev Walkina7591b52014-10-12 18:37:35 -07001692static const ber_tlv_tag_t asn_DEF_Utf8_4_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001693 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
1694};
Lev Walkin59b176e2005-11-26 11:25:14 +00001695asn_TYPE_descriptor_t asn_DEF_Utf8_4 = {
1696 "Utf8-4",
1697 "Utf8-4",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001698 &asn_OP_UTF8String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001699 asn_DEF_Utf8_4_tags_1,
1700 sizeof(asn_DEF_Utf8_4_tags_1)
1701 /sizeof(asn_DEF_Utf8_4_tags_1[0]), /* 1 */
1702 asn_DEF_Utf8_4_tags_1, /* Same as above */
1703 sizeof(asn_DEF_Utf8_4_tags_1)
1704 /sizeof(asn_DEF_Utf8_4_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07001705 { 0, &asn_PER_type_Utf8_4_constr_1, Utf8_4_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00001706 0, 0, /* No members */
1707 0 /* No specifics */
1708};
1709
1710
1711/*** <<< INCLUDES [Utf8-3] >>> ***/
1712
Lev Walkin22b5ed42006-09-13 02:51:20 +00001713#include "Utf8-2.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001714
1715/*** <<< TYPE-DECLS [Utf8-3] >>> ***/
1716
1717typedef Utf8_2_t Utf8_3_t;
1718
1719/*** <<< FUNC-DECLS [Utf8-3] >>> ***/
1720
1721extern asn_TYPE_descriptor_t asn_DEF_Utf8_3;
1722asn_struct_free_f Utf8_3_free;
1723asn_struct_print_f Utf8_3_print;
1724asn_constr_check_f Utf8_3_constraint;
1725ber_type_decoder_f Utf8_3_decode_ber;
1726der_type_encoder_f Utf8_3_encode_der;
1727xer_type_decoder_f Utf8_3_decode_xer;
1728xer_type_encoder_f Utf8_3_encode_xer;
1729per_type_decoder_f Utf8_3_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001730per_type_encoder_f Utf8_3_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001731
1732/*** <<< CTABLES [Utf8-3] >>> ***/
1733
Lev Walkina7591b52014-10-12 18:37:35 -07001734static const int permitted_alphabet_table_1[128] = {
Lev Walkin5b62ca82006-09-21 01:52:07 +00001735 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
1736 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
1737 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
1738 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
1739 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15, /* ABCDEFGHIJKLMNO */
174016,17,18,19,20,21,22,23,24,25,26, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */
1741 0,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41, /* abcdefghijklmno */
174242,43,44,45,46,47,48,49,50,51,52, 0, 0, 0, 0, 0, /* pqrstuvwxyz */
Lev Walkin59b176e2005-11-26 11:25:14 +00001743};
1744
1745static int check_permitted_alphabet_1(const void *sptr) {
Lev Walkina7591b52014-10-12 18:37:35 -07001746 const int *table = permitted_alphabet_table_1;
Lev Walkin59b176e2005-11-26 11:25:14 +00001747 /* The underlying type is UTF8String */
1748 const UTF8String_t *st = (const UTF8String_t *)sptr;
1749 const uint8_t *ch = st->buf;
1750 const uint8_t *end = ch + st->size;
1751
1752 for(; ch < end; ch++) {
1753 uint8_t cv = *ch;
1754 if(cv >= 0x80) return -1;
1755 if(!table[cv]) return -1;
1756 }
1757 return 0;
1758}
1759
1760
1761/*** <<< CODE [Utf8-3] >>> ***/
1762
1763int
1764Utf8_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001765 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001766 const Utf8_2_t *st = (const Utf8_2_t *)sptr;
1767 size_t size;
1768
1769 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001770 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001771 "%s: value not given (%s:%d)",
1772 td->name, __FILE__, __LINE__);
1773 return -1;
1774 }
1775
1776 size = UTF8String_length(st);
1777 if((ssize_t)size < 0) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001778 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001779 "%s: UTF-8: broken encoding (%s:%d)",
1780 td->name, __FILE__, __LINE__);
1781 return -1;
1782 }
1783
1784 if((size >= 1 && size <= 2)
1785 && !check_permitted_alphabet_1(st)) {
1786 /* Constraint check succeeded */
1787 return 0;
1788 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001789 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001790 "%s: constraint failed (%s:%d)",
1791 td->name, __FILE__, __LINE__);
1792 return -1;
1793 }
1794}
1795
1796/*
1797 * This type is implemented using Utf8_2,
1798 * so here we adjust the DEF accordingly.
1799 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001800
Lev Walkin725883b2006-10-09 12:07:58 +00001801/*** <<< CTDEFS [Utf8-3] >>> ***/
1802
Lev Walkin0479e042017-09-26 18:39:58 -07001803static asn_per_constraints_t asn_PER_type_Utf8_3_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001804 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1805 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1806 0, 0 /* No PER value map */
1807};
1808
Lev Walkin59b176e2005-11-26 11:25:14 +00001809/*** <<< STAT-DEFS [Utf8-3] >>> ***/
1810
Lev Walkina7591b52014-10-12 18:37:35 -07001811static const ber_tlv_tag_t asn_DEF_Utf8_3_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001812 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
1813};
Lev Walkin59b176e2005-11-26 11:25:14 +00001814asn_TYPE_descriptor_t asn_DEF_Utf8_3 = {
1815 "Utf8-3",
1816 "Utf8-3",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001817 &asn_OP_UTF8String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001818 asn_DEF_Utf8_3_tags_1,
1819 sizeof(asn_DEF_Utf8_3_tags_1)
1820 /sizeof(asn_DEF_Utf8_3_tags_1[0]), /* 1 */
1821 asn_DEF_Utf8_3_tags_1, /* Same as above */
1822 sizeof(asn_DEF_Utf8_3_tags_1)
1823 /sizeof(asn_DEF_Utf8_3_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07001824 { 0, &asn_PER_type_Utf8_3_constr_1, Utf8_3_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00001825 0, 0, /* No members */
1826 0 /* No specifics */
1827};
1828
1829
1830/*** <<< INCLUDES [Utf8-2] >>> ***/
1831
Lev Walkin22b5ed42006-09-13 02:51:20 +00001832#include "Utf8-1.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001833
1834/*** <<< TYPE-DECLS [Utf8-2] >>> ***/
1835
1836typedef Utf8_1_t Utf8_2_t;
1837
1838/*** <<< FUNC-DECLS [Utf8-2] >>> ***/
1839
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08001840extern asn_per_constraints_t asn_PER_type_Utf8_2_constr_1;
Lev Walkin59b176e2005-11-26 11:25:14 +00001841extern asn_TYPE_descriptor_t asn_DEF_Utf8_2;
1842asn_struct_free_f Utf8_2_free;
1843asn_struct_print_f Utf8_2_print;
1844asn_constr_check_f Utf8_2_constraint;
1845ber_type_decoder_f Utf8_2_decode_ber;
1846der_type_encoder_f Utf8_2_encode_der;
1847xer_type_decoder_f Utf8_2_decode_xer;
1848xer_type_encoder_f Utf8_2_encode_xer;
1849per_type_decoder_f Utf8_2_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001850per_type_encoder_f Utf8_2_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001851
1852/*** <<< CODE [Utf8-2] >>> ***/
1853
1854int
1855Utf8_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001856 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001857 const Utf8_1_t *st = (const Utf8_1_t *)sptr;
1858 size_t size;
1859
1860 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001861 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001862 "%s: value not given (%s:%d)",
1863 td->name, __FILE__, __LINE__);
1864 return -1;
1865 }
1866
1867 size = UTF8String_length(st);
1868 if((ssize_t)size < 0) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001869 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001870 "%s: UTF-8: broken encoding (%s:%d)",
1871 td->name, __FILE__, __LINE__);
1872 return -1;
1873 }
1874
1875 if((size >= 1 && size <= 2)) {
1876 /* Constraint check succeeded */
1877 return 0;
1878 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001879 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001880 "%s: constraint failed (%s:%d)",
1881 td->name, __FILE__, __LINE__);
1882 return -1;
1883 }
1884}
1885
1886/*
1887 * This type is implemented using Utf8_1,
1888 * so here we adjust the DEF accordingly.
1889 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001890
Lev Walkin725883b2006-10-09 12:07:58 +00001891/*** <<< CTDEFS [Utf8-2] >>> ***/
1892
Lev Walkin0479e042017-09-26 18:39:58 -07001893asn_per_constraints_t asn_PER_type_Utf8_2_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001894 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1895 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1896 0, 0 /* No PER value map */
1897};
1898
Lev Walkin59b176e2005-11-26 11:25:14 +00001899/*** <<< STAT-DEFS [Utf8-2] >>> ***/
1900
Lev Walkina7591b52014-10-12 18:37:35 -07001901static const ber_tlv_tag_t asn_DEF_Utf8_2_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001902 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
1903};
Lev Walkin59b176e2005-11-26 11:25:14 +00001904asn_TYPE_descriptor_t asn_DEF_Utf8_2 = {
1905 "Utf8-2",
1906 "Utf8-2",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001907 &asn_OP_UTF8String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001908 asn_DEF_Utf8_2_tags_1,
1909 sizeof(asn_DEF_Utf8_2_tags_1)
1910 /sizeof(asn_DEF_Utf8_2_tags_1[0]), /* 1 */
1911 asn_DEF_Utf8_2_tags_1, /* Same as above */
1912 sizeof(asn_DEF_Utf8_2_tags_1)
1913 /sizeof(asn_DEF_Utf8_2_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07001914 { 0, &asn_PER_type_Utf8_2_constr_1, Utf8_2_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00001915 0, 0, /* No members */
1916 0 /* No specifics */
1917};
1918
1919
1920/*** <<< INCLUDES [Utf8-1] >>> ***/
1921
1922#include <UTF8String.h>
1923
1924/*** <<< TYPE-DECLS [Utf8-1] >>> ***/
1925
1926typedef UTF8String_t Utf8_1_t;
1927
1928/*** <<< FUNC-DECLS [Utf8-1] >>> ***/
1929
1930extern asn_TYPE_descriptor_t asn_DEF_Utf8_1;
1931asn_struct_free_f Utf8_1_free;
1932asn_struct_print_f Utf8_1_print;
1933asn_constr_check_f Utf8_1_constraint;
1934ber_type_decoder_f Utf8_1_decode_ber;
1935der_type_encoder_f Utf8_1_encode_der;
1936xer_type_decoder_f Utf8_1_decode_xer;
1937xer_type_encoder_f Utf8_1_encode_xer;
1938per_type_decoder_f Utf8_1_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001939per_type_encoder_f Utf8_1_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001940
1941/*** <<< CODE [Utf8-1] >>> ***/
1942
Lev Walkin59b176e2005-11-26 11:25:14 +00001943/*
1944 * This type is implemented using UTF8String,
1945 * so here we adjust the DEF accordingly.
1946 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001947
1948/*** <<< STAT-DEFS [Utf8-1] >>> ***/
1949
Lev Walkina7591b52014-10-12 18:37:35 -07001950static const ber_tlv_tag_t asn_DEF_Utf8_1_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001951 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
1952};
1953asn_TYPE_descriptor_t asn_DEF_Utf8_1 = {
1954 "Utf8-1",
1955 "Utf8-1",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001956 &asn_OP_UTF8String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001957 asn_DEF_Utf8_1_tags_1,
1958 sizeof(asn_DEF_Utf8_1_tags_1)
1959 /sizeof(asn_DEF_Utf8_1_tags_1[0]), /* 1 */
1960 asn_DEF_Utf8_1_tags_1, /* Same as above */
1961 sizeof(asn_DEF_Utf8_1_tags_1)
1962 /sizeof(asn_DEF_Utf8_1_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07001963 { 0, 0, UTF8String_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00001964 0, 0, /* No members */
1965 0 /* No specifics */
1966};
1967
1968
1969/*** <<< INCLUDES [VisibleIdentifier] >>> ***/
1970
Lev Walkin22b5ed42006-09-13 02:51:20 +00001971#include "Identifier.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001972
1973/*** <<< TYPE-DECLS [VisibleIdentifier] >>> ***/
1974
1975typedef Identifier_t VisibleIdentifier_t;
1976
1977/*** <<< FUNC-DECLS [VisibleIdentifier] >>> ***/
1978
1979extern asn_TYPE_descriptor_t asn_DEF_VisibleIdentifier;
1980asn_struct_free_f VisibleIdentifier_free;
1981asn_struct_print_f VisibleIdentifier_print;
1982asn_constr_check_f VisibleIdentifier_constraint;
1983ber_type_decoder_f VisibleIdentifier_decode_ber;
1984der_type_encoder_f VisibleIdentifier_encode_der;
1985xer_type_decoder_f VisibleIdentifier_decode_xer;
1986xer_type_encoder_f VisibleIdentifier_encode_xer;
1987per_type_decoder_f VisibleIdentifier_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001988per_type_encoder_f VisibleIdentifier_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001989
1990/*** <<< CTABLES [VisibleIdentifier] >>> ***/
1991
Lev Walkina7591b52014-10-12 18:37:35 -07001992static const int permitted_alphabet_table_1[256] = {
Lev Walkin5b62ca82006-09-21 01:52:07 +00001993 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
1994 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
1995 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* $ */
1996 2, 3, 4, 5, 6, 7, 8, 9,10,11, 0, 0, 0, 0, 0, 0, /* 0123456789 */
1997 0,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26, /* ABCDEFGHIJKLMNO */
199827,28,29,30,31,32,33,34,35,36,37, 0, 0, 0, 0,38, /* PQRSTUVWXYZ _ */
1999 0,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53, /* abcdefghijklmno */
200054,55,56,57,58,59,60,61,62,63,64, 0, 0, 0, 0, 0, /* pqrstuvwxyz */
Lev Walkin59b176e2005-11-26 11:25:14 +00002001};
Lev Walkina7591b52014-10-12 18:37:35 -07002002static const int permitted_alphabet_code2value_1[64] = {
Lev Walkin5b62ca82006-09-21 01:52:07 +0000200336,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,
200470,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,
200586,87,88,89,90,95,97,98,99,100,101,102,103,104,105,106,
2006107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,
2007};
2008
Lev Walkin59b176e2005-11-26 11:25:14 +00002009
2010static int check_permitted_alphabet_1(const void *sptr) {
Lev Walkina7591b52014-10-12 18:37:35 -07002011 const int *table = permitted_alphabet_table_1;
Lev Walkin59b176e2005-11-26 11:25:14 +00002012 /* The underlying type is VisibleString */
2013 const VisibleString_t *st = (const VisibleString_t *)sptr;
2014 const uint8_t *ch = st->buf;
2015 const uint8_t *end = ch + st->size;
2016
2017 for(; ch < end; ch++) {
2018 uint8_t cv = *ch;
2019 if(!table[cv]) return -1;
2020 }
2021 return 0;
2022}
2023
2024
2025/*** <<< CODE [VisibleIdentifier] >>> ***/
2026
2027int
2028VisibleIdentifier_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002029 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002030 const Identifier_t *st = (const Identifier_t *)sptr;
2031 size_t size;
2032
2033 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002034 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002035 "%s: value not given (%s:%d)",
2036 td->name, __FILE__, __LINE__);
2037 return -1;
2038 }
2039
2040 size = st->size;
2041
2042 if((size >= 1 && size <= 32)
2043 && !check_permitted_alphabet_1(st)) {
2044 /* Constraint check succeeded */
2045 return 0;
2046 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002047 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002048 "%s: constraint failed (%s:%d)",
2049 td->name, __FILE__, __LINE__);
2050 return -1;
2051 }
2052}
2053
Lev Walkin135d7dd2017-08-28 00:21:38 -07002054static int asn_PER_MAP_VisibleIdentifier_1_v2c(unsigned int value) {
2055 if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0]))
2056 return -1;
2057 return permitted_alphabet_table_1[value] - 1;
2058}
2059static int asn_PER_MAP_VisibleIdentifier_1_c2v(unsigned int code) {
2060 if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0]))
2061 return -1;
2062 return permitted_alphabet_code2value_1[code];
2063}
Lev Walkin59b176e2005-11-26 11:25:14 +00002064/*
2065 * This type is implemented using Identifier,
2066 * so here we adjust the DEF accordingly.
2067 */
Lev Walkin59b176e2005-11-26 11:25:14 +00002068
Lev Walkin135d7dd2017-08-28 00:21:38 -07002069/*** <<< CTDEFS [VisibleIdentifier] >>> ***/
2070
Lev Walkin0479e042017-09-26 18:39:58 -07002071static asn_per_constraints_t asn_PER_type_VisibleIdentifier_constr_1 CC_NOTUSED = {
Lev Walkin135d7dd2017-08-28 00:21:38 -07002072 { APC_CONSTRAINED, 6, 6, 36, 122 } /* (36..122) */,
2073 { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */,
2074 asn_PER_MAP_VisibleIdentifier_1_v2c, /* Value to PER code map */
2075 asn_PER_MAP_VisibleIdentifier_1_c2v /* PER code to value map */
2076};
2077
Lev Walkin59b176e2005-11-26 11:25:14 +00002078/*** <<< STAT-DEFS [VisibleIdentifier] >>> ***/
2079
Lev Walkina7591b52014-10-12 18:37:35 -07002080static const ber_tlv_tag_t asn_DEF_VisibleIdentifier_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002081 (ASN_TAG_CLASS_UNIVERSAL | (26 << 2))
2082};
2083asn_TYPE_descriptor_t asn_DEF_VisibleIdentifier = {
2084 "VisibleIdentifier",
2085 "VisibleIdentifier",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08002086 &asn_OP_VisibleString,
Lev Walkin59b176e2005-11-26 11:25:14 +00002087 asn_DEF_VisibleIdentifier_tags_1,
2088 sizeof(asn_DEF_VisibleIdentifier_tags_1)
2089 /sizeof(asn_DEF_VisibleIdentifier_tags_1[0]), /* 1 */
2090 asn_DEF_VisibleIdentifier_tags_1, /* Same as above */
2091 sizeof(asn_DEF_VisibleIdentifier_tags_1)
2092 /sizeof(asn_DEF_VisibleIdentifier_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07002093 { 0, &asn_PER_type_VisibleIdentifier_constr_1, VisibleIdentifier_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00002094 0, 0, /* No members */
2095 0 /* No specifics */
2096};
2097
2098
2099/*** <<< INCLUDES [Sequence] >>> ***/
2100
Lev Walkin22b5ed42006-09-13 02:51:20 +00002101#include "Int1.h"
2102#include "Int4.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00002103#include <BOOLEAN.h>
Lev Walkin2a744a72013-03-27 01:56:23 -07002104#include <NativeEnumerated.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00002105#include <NULL.h>
Lev Walkin22b5ed42006-09-13 02:51:20 +00002106#include "Int5.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00002107#include <constr_SEQUENCE.h>
2108
2109/*** <<< DEPS [Sequence] >>> ***/
2110
2111typedef enum enum_c {
2112 enum_c_one = 1,
2113 enum_c_two = 2,
2114 /*
2115 * Enumeration is extensible
2116 */
2117 enum_c_three = 3
Lev Walkin171487e2006-03-21 07:25:18 +00002118} e_enum_c;
Lev Walkin59b176e2005-11-26 11:25:14 +00002119
2120/*** <<< TYPE-DECLS [Sequence] >>> ***/
2121
2122typedef struct Sequence {
2123 Int1_t *int1_c /* DEFAULT 3 */;
2124 Int4_t int4;
2125 Int4_t int4_c;
Lev Walkin2a744a72013-03-27 01:56:23 -07002126 BOOLEAN_t *Bool /* DEFAULT 1 */;
2127 long enum_c;
Lev Walkin59b176e2005-11-26 11:25:14 +00002128 NULL_t *null /* OPTIONAL */;
2129 /*
2130 * This type is extensible,
2131 * possible extensions are below.
2132 */
2133 Int5_t *int5_c /* OPTIONAL */;
2134
2135 /* Context for parsing across buffer boundaries */
2136 asn_struct_ctx_t _asn_ctx;
2137} Sequence_t;
2138
2139/*** <<< FUNC-DECLS [Sequence] >>> ***/
2140
2141/* extern asn_TYPE_descriptor_t asn_DEF_enum_c_6; // (Use -fall-defs-global to expose) */
2142extern asn_TYPE_descriptor_t asn_DEF_Sequence;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08002143extern asn_SEQUENCE_specifics_t asn_SPC_Sequence_specs_1;
2144extern asn_TYPE_member_t asn_MBR_Sequence_1[7];
Lev Walkin59b176e2005-11-26 11:25:14 +00002145
2146/*** <<< CODE [Sequence] >>> ***/
2147
Lev Walkin59b176e2005-11-26 11:25:14 +00002148/*
Lev Walkin2a744a72013-03-27 01:56:23 -07002149 * This type is implemented using NativeEnumerated,
Lev Walkin59b176e2005-11-26 11:25:14 +00002150 * so here we adjust the DEF accordingly.
2151 */
Lev Walkin59b176e2005-11-26 11:25:14 +00002152static int
2153memb_int1_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002154 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002155 long value;
2156
2157 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002158 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002159 "%s: value not given (%s:%d)",
2160 td->name, __FILE__, __LINE__);
2161 return -1;
2162 }
2163
Lev Walkin2a744a72013-03-27 01:56:23 -07002164 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +00002165
2166 if((value >= -2)) {
2167 /* Constraint check succeeded */
2168 return 0;
2169 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002170 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002171 "%s: constraint failed (%s:%d)",
2172 td->name, __FILE__, __LINE__);
2173 return -1;
2174 }
2175}
2176
2177static int
2178memb_int4_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002179 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002180 long value;
2181
2182 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002183 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002184 "%s: value not given (%s:%d)",
2185 td->name, __FILE__, __LINE__);
2186 return -1;
2187 }
2188
Lev Walkin2a744a72013-03-27 01:56:23 -07002189 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +00002190
2191 if((value >= 5 && value <= 7)) {
2192 /* Constraint check succeeded */
2193 return 0;
2194 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002195 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002196 "%s: constraint failed (%s:%d)",
2197 td->name, __FILE__, __LINE__);
2198 return -1;
2199 }
2200}
2201
2202static int
2203memb_int5_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002204 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002205 long value;
2206
2207 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002208 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002209 "%s: value not given (%s:%d)",
2210 td->name, __FILE__, __LINE__);
2211 return -1;
2212 }
2213
Lev Walkin2a744a72013-03-27 01:56:23 -07002214 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +00002215
2216 if((value == 5)) {
2217 /* Constraint check succeeded */
2218 return 0;
2219 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002220 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002221 "%s: constraint failed (%s:%d)",
2222 td->name, __FILE__, __LINE__);
2223 return -1;
2224 }
2225}
2226
2227
Lev Walkin725883b2006-10-09 12:07:58 +00002228/*** <<< CTDEFS [Sequence] >>> ***/
2229
Lev Walkin0479e042017-09-26 18:39:58 -07002230static asn_per_constraints_t asn_PER_type_enum_c_constr_6 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002231 { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */,
2232 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2233 0, 0 /* No PER value map */
2234};
Lev Walkin0479e042017-09-26 18:39:58 -07002235static asn_per_constraints_t asn_PER_memb_int1_c_constr_2 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002236 { APC_SEMI_CONSTRAINED, -1, -1, -2, 0 } /* (-2..MAX) */,
2237 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2238 0, 0 /* No PER value map */
2239};
Lev Walkin0479e042017-09-26 18:39:58 -07002240static asn_per_constraints_t asn_PER_memb_int4_c_constr_4 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002241 { APC_CONSTRAINED, 2, 2, 5, 7 } /* (5..7) */,
2242 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2243 0, 0 /* No PER value map */
2244};
Lev Walkin0479e042017-09-26 18:39:58 -07002245static asn_per_constraints_t asn_PER_memb_int5_c_constr_13 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002246 { APC_CONSTRAINED, 0, 0, 5, 5 } /* (5..5) */,
2247 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2248 0, 0 /* No PER value map */
2249};
2250
Lev Walkin59b176e2005-11-26 11:25:14 +00002251/*** <<< STAT-DEFS [Sequence] >>> ***/
2252
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002253static int asn_DFL_2_set_3(int set_value, void **sptr) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002254 Int1_t *st = *sptr;
2255
2256 if(!st) {
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002257 if(!set_value) return -1; /* Not a default value */
Lev Walkin59b176e2005-11-26 11:25:14 +00002258 st = (*sptr = CALLOC(1, sizeof(*st)));
2259 if(!st) return -1;
2260 }
2261
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002262 if(set_value) {
2263 /* Install default value 3 */
Lev Walkin2a744a72013-03-27 01:56:23 -07002264 *st = 3;
2265 return 0;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002266 } else {
2267 /* Test default value 3 */
Lev Walkin2a744a72013-03-27 01:56:23 -07002268 return (*st == 3);
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002269 }
Lev Walkin59b176e2005-11-26 11:25:14 +00002270}
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002271static int asn_DFL_5_set_1(int set_value, void **sptr) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002272 BOOLEAN_t *st = *sptr;
2273
2274 if(!st) {
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002275 if(!set_value) return -1; /* Not a default value */
Lev Walkin59b176e2005-11-26 11:25:14 +00002276 st = (*sptr = CALLOC(1, sizeof(*st)));
2277 if(!st) return -1;
2278 }
2279
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002280 if(set_value) {
2281 /* Install default value 1 */
2282 *st = 1;
2283 return 0;
2284 } else {
2285 /* Test default value 1 */
2286 return (*st == 1);
2287 }
Lev Walkin59b176e2005-11-26 11:25:14 +00002288}
Lev Walkina7591b52014-10-12 18:37:35 -07002289static const asn_INTEGER_enum_map_t asn_MAP_enum_c_value2enum_6[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002290 { 1, 3, "one" },
2291 { 2, 3, "two" },
2292 { 3, 5, "three" }
2293 /* This list is extensible */
2294};
Lev Walkina7591b52014-10-12 18:37:35 -07002295static const unsigned int asn_MAP_enum_c_enum2value_6[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002296 0, /* one(1) */
2297 2, /* three(3) */
2298 1 /* two(2) */
2299 /* This list is extensible */
2300};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08002301static const asn_INTEGER_specifics_t asn_SPC_enum_c_specs_6 = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002302 asn_MAP_enum_c_value2enum_6, /* "tag" => N; sorted by tag */
2303 asn_MAP_enum_c_enum2value_6, /* N => "tag"; sorted by N */
2304 3, /* Number of elements in the maps */
2305 3, /* Extensions before this member */
Lev Walkin8bb57a22007-12-03 13:41:36 +00002306 1, /* Strict enumeration */
2307 0, /* Native long size */
2308 0
Lev Walkin59b176e2005-11-26 11:25:14 +00002309};
Lev Walkina7591b52014-10-12 18:37:35 -07002310static const ber_tlv_tag_t asn_DEF_enum_c_tags_6[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002311 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
2312};
Lev Walkin59b176e2005-11-26 11:25:14 +00002313static /* Use -fall-defs-global to expose */
2314asn_TYPE_descriptor_t asn_DEF_enum_c_6 = {
2315 "enum-c",
2316 "enum-c",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08002317 &asn_OP_NativeEnumerated,
Lev Walkin59b176e2005-11-26 11:25:14 +00002318 asn_DEF_enum_c_tags_6,
2319 sizeof(asn_DEF_enum_c_tags_6)
2320 /sizeof(asn_DEF_enum_c_tags_6[0]), /* 1 */
2321 asn_DEF_enum_c_tags_6, /* Same as above */
2322 sizeof(asn_DEF_enum_c_tags_6)
2323 /sizeof(asn_DEF_enum_c_tags_6[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07002324 { 0, &asn_PER_type_enum_c_constr_6, NativeEnumerated_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00002325 0, 0, /* Defined elsewhere */
2326 &asn_SPC_enum_c_specs_6 /* Additional specs */
2327};
2328
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08002329asn_TYPE_member_t asn_MBR_Sequence_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002330 { ATF_POINTER, 1, offsetof(struct Sequence, int1_c),
2331 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
2332 .tag_mode = 0,
2333 .type = &asn_DEF_Int1,
Lev Walkin67a30122017-08-10 05:48:54 -07002334 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -07002335 { .oer_constraints = 0, .per_constraints = &asn_PER_memb_int1_c_constr_2, .general_constraints = memb_int1_c_constraint_1 },
Lev Walkin59b176e2005-11-26 11:25:14 +00002336 .default_value = asn_DFL_2_set_3, /* DEFAULT 3 */
2337 .name = "int1-c"
2338 },
2339 { ATF_NOFLAGS, 0, offsetof(struct Sequence, int4),
2340 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
2341 .tag_mode = +1, /* EXPLICIT tag at current level */
2342 .type = &asn_DEF_Int4,
Lev Walkin67a30122017-08-10 05:48:54 -07002343 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -07002344 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +00002345 .default_value = 0,
2346 .name = "int4"
2347 },
2348 { ATF_NOFLAGS, 0, offsetof(struct Sequence, int4_c),
2349 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
2350 .tag_mode = 0,
2351 .type = &asn_DEF_Int4,
Lev Walkin67a30122017-08-10 05:48:54 -07002352 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -07002353 { .oer_constraints = 0, .per_constraints = &asn_PER_memb_int4_c_constr_4, .general_constraints = memb_int4_c_constraint_1 },
Lev Walkin59b176e2005-11-26 11:25:14 +00002354 .default_value = 0,
2355 .name = "int4-c"
2356 },
Lev Walkin2a744a72013-03-27 01:56:23 -07002357 { ATF_POINTER, 1, offsetof(struct Sequence, Bool),
Lev Walkin59b176e2005-11-26 11:25:14 +00002358 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
2359 .tag_mode = 0,
2360 .type = &asn_DEF_BOOLEAN,
Lev Walkin67a30122017-08-10 05:48:54 -07002361 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -07002362 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +00002363 .default_value = asn_DFL_5_set_1, /* DEFAULT 1 */
2364 .name = "bool"
2365 },
2366 { ATF_NOFLAGS, 0, offsetof(struct Sequence, enum_c),
2367 .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
2368 .tag_mode = 0,
2369 .type = &asn_DEF_enum_c_6,
Lev Walkin67a30122017-08-10 05:48:54 -07002370 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -07002371 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +00002372 .default_value = 0,
2373 .name = "enum-c"
2374 },
2375 { ATF_POINTER, 2, offsetof(struct Sequence, null),
2376 .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)),
2377 .tag_mode = 0,
2378 .type = &asn_DEF_NULL,
Lev Walkin67a30122017-08-10 05:48:54 -07002379 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -07002380 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +00002381 .default_value = 0,
2382 .name = "null"
2383 },
2384 { ATF_POINTER, 1, offsetof(struct Sequence, int5_c),
2385 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
2386 .tag_mode = 0,
2387 .type = &asn_DEF_Int5,
Lev Walkin67a30122017-08-10 05:48:54 -07002388 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -07002389 { .oer_constraints = 0, .per_constraints = &asn_PER_memb_int5_c_constr_13, .general_constraints = memb_int5_c_constraint_1 },
Lev Walkin59b176e2005-11-26 11:25:14 +00002390 .default_value = 0,
2391 .name = "int5-c"
2392 },
2393};
Lev Walkina7591b52014-10-12 18:37:35 -07002394static const int asn_MAP_Sequence_oms_1[] = { 0, 3, 5, 6 };
2395static const ber_tlv_tag_t asn_DEF_Sequence_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002396 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
2397};
Lev Walkina7591b52014-10-12 18:37:35 -07002398static const asn_TYPE_tag2member_t asn_MAP_Sequence_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -07002399 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool */
2400 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2 }, /* int1-c */
2401 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -1, 1 }, /* int4-c */
2402 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 6, -2, 0 }, /* int5-c */
2403 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 5, 0, 0 }, /* null */
2404 { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 4, 0, 0 }, /* enum-c */
2405 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 } /* int4 */
Lev Walkin59b176e2005-11-26 11:25:14 +00002406};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08002407asn_SEQUENCE_specifics_t asn_SPC_Sequence_specs_1 = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002408 sizeof(struct Sequence),
2409 offsetof(struct Sequence, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -07002410 .tag2el = asn_MAP_Sequence_tag2el_1,
2411 .tag2el_count = 7, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +00002412 asn_MAP_Sequence_oms_1, /* Optional members */
2413 3, 1, /* Root/Additions */
2414 5, /* Start extensions */
2415 8 /* Stop extensions */
2416};
2417asn_TYPE_descriptor_t asn_DEF_Sequence = {
2418 "Sequence",
2419 "Sequence",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08002420 &asn_OP_SEQUENCE,
Lev Walkin59b176e2005-11-26 11:25:14 +00002421 asn_DEF_Sequence_tags_1,
2422 sizeof(asn_DEF_Sequence_tags_1)
2423 /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
2424 asn_DEF_Sequence_tags_1, /* Same as above */
2425 sizeof(asn_DEF_Sequence_tags_1)
2426 /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07002427 { 0, 0, SEQUENCE_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00002428 asn_MBR_Sequence_1,
2429 7, /* Elements count */
2430 &asn_SPC_Sequence_specs_1 /* Additional specs */
2431};
2432
2433
2434/*** <<< INCLUDES [SequenceOf] >>> ***/
2435
2436#include <asn_SEQUENCE_OF.h>
2437#include <constr_SEQUENCE_OF.h>
2438
2439/*** <<< FWD-DECLS [SequenceOf] >>> ***/
2440
2441struct Sequence;
2442
2443/*** <<< TYPE-DECLS [SequenceOf] >>> ***/
2444
2445typedef struct SequenceOf {
2446 A_SEQUENCE_OF(struct Sequence) list;
2447
2448 /* Context for parsing across buffer boundaries */
2449 asn_struct_ctx_t _asn_ctx;
2450} SequenceOf_t;
2451
2452/*** <<< FUNC-DECLS [SequenceOf] >>> ***/
2453
2454extern asn_TYPE_descriptor_t asn_DEF_SequenceOf;
2455
2456/*** <<< POST-INCLUDE [SequenceOf] >>> ***/
2457
Lev Walkin22b5ed42006-09-13 02:51:20 +00002458#include "Sequence.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00002459
Lev Walkin725883b2006-10-09 12:07:58 +00002460/*** <<< CTDEFS [SequenceOf] >>> ***/
2461
Lev Walkin0479e042017-09-26 18:39:58 -07002462static asn_per_constraints_t asn_PER_type_SequenceOf_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002463 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2464 { APC_CONSTRAINED, 1, 1, 1, 2 } /* (SIZE(1..2)) */,
2465 0, 0 /* No PER value map */
2466};
2467
Lev Walkin59b176e2005-11-26 11:25:14 +00002468/*** <<< STAT-DEFS [SequenceOf] >>> ***/
2469
2470static asn_TYPE_member_t asn_MBR_SequenceOf_1[] = {
2471 { ATF_POINTER, 0, 0,
2472 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
2473 .tag_mode = 0,
2474 .type = &asn_DEF_Sequence,
Lev Walkin67a30122017-08-10 05:48:54 -07002475 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -07002476 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +00002477 .default_value = 0,
2478 .name = ""
2479 },
2480};
Lev Walkina7591b52014-10-12 18:37:35 -07002481static const ber_tlv_tag_t asn_DEF_SequenceOf_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002482 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
2483};
2484static asn_SET_OF_specifics_t asn_SPC_SequenceOf_specs_1 = {
2485 sizeof(struct SequenceOf),
2486 offsetof(struct SequenceOf, _asn_ctx),
2487 0, /* XER encoding is XMLDelimitedItemList */
2488};
Lev Walkin59b176e2005-11-26 11:25:14 +00002489asn_TYPE_descriptor_t asn_DEF_SequenceOf = {
2490 "SequenceOf",
2491 "SequenceOf",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08002492 &asn_OP_SEQUENCE_OF,
Lev Walkin59b176e2005-11-26 11:25:14 +00002493 asn_DEF_SequenceOf_tags_1,
2494 sizeof(asn_DEF_SequenceOf_tags_1)
2495 /sizeof(asn_DEF_SequenceOf_tags_1[0]), /* 1 */
2496 asn_DEF_SequenceOf_tags_1, /* Same as above */
2497 sizeof(asn_DEF_SequenceOf_tags_1)
2498 /sizeof(asn_DEF_SequenceOf_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07002499 { 0, &asn_PER_type_SequenceOf_constr_1, SEQUENCE_OF_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00002500 asn_MBR_SequenceOf_1,
2501 1, /* Single element */
2502 &asn_SPC_SequenceOf_specs_1 /* Additional specs */
2503};
2504
2505
2506/*** <<< INCLUDES [Enum0] >>> ***/
2507
Lev Walkin2a744a72013-03-27 01:56:23 -07002508#include <NativeEnumerated.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00002509
2510/*** <<< DEPS [Enum0] >>> ***/
2511
2512typedef enum Enum0 {
2513 Enum0_one = 0,
2514 Enum0_two = 1
Lev Walkin171487e2006-03-21 07:25:18 +00002515} e_Enum0;
Lev Walkin59b176e2005-11-26 11:25:14 +00002516
2517/*** <<< TYPE-DECLS [Enum0] >>> ***/
2518
Lev Walkin2a744a72013-03-27 01:56:23 -07002519typedef long Enum0_t;
Lev Walkin59b176e2005-11-26 11:25:14 +00002520
2521/*** <<< FUNC-DECLS [Enum0] >>> ***/
2522
2523extern asn_TYPE_descriptor_t asn_DEF_Enum0;
2524asn_struct_free_f Enum0_free;
2525asn_struct_print_f Enum0_print;
2526asn_constr_check_f Enum0_constraint;
2527ber_type_decoder_f Enum0_decode_ber;
2528der_type_encoder_f Enum0_encode_der;
2529xer_type_decoder_f Enum0_decode_xer;
2530xer_type_encoder_f Enum0_encode_xer;
2531per_type_decoder_f Enum0_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002532per_type_encoder_f Enum0_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002533
2534/*** <<< CODE [Enum0] >>> ***/
2535
Lev Walkin59b176e2005-11-26 11:25:14 +00002536/*
Lev Walkin2a744a72013-03-27 01:56:23 -07002537 * This type is implemented using NativeEnumerated,
Lev Walkin59b176e2005-11-26 11:25:14 +00002538 * so here we adjust the DEF accordingly.
2539 */
Lev Walkin59b176e2005-11-26 11:25:14 +00002540
Lev Walkin725883b2006-10-09 12:07:58 +00002541/*** <<< CTDEFS [Enum0] >>> ***/
2542
Lev Walkin0479e042017-09-26 18:39:58 -07002543static asn_per_constraints_t asn_PER_type_Enum0_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002544 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
2545 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2546 0, 0 /* No PER value map */
2547};
2548
Lev Walkin59b176e2005-11-26 11:25:14 +00002549/*** <<< STAT-DEFS [Enum0] >>> ***/
2550
Lev Walkina7591b52014-10-12 18:37:35 -07002551static const asn_INTEGER_enum_map_t asn_MAP_Enum0_value2enum_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002552 { 0, 3, "one" },
2553 { 1, 3, "two" }
2554};
Lev Walkina7591b52014-10-12 18:37:35 -07002555static const unsigned int asn_MAP_Enum0_enum2value_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002556 0, /* one(0) */
2557 1 /* two(1) */
2558};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08002559static const asn_INTEGER_specifics_t asn_SPC_Enum0_specs_1 = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002560 asn_MAP_Enum0_value2enum_1, /* "tag" => N; sorted by tag */
2561 asn_MAP_Enum0_enum2value_1, /* N => "tag"; sorted by N */
2562 2, /* Number of elements in the maps */
2563 0, /* Enumeration is not extensible */
Lev Walkin8bb57a22007-12-03 13:41:36 +00002564 1, /* Strict enumeration */
2565 0, /* Native long size */
2566 0
Lev Walkin59b176e2005-11-26 11:25:14 +00002567};
Lev Walkina7591b52014-10-12 18:37:35 -07002568static const ber_tlv_tag_t asn_DEF_Enum0_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002569 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
2570};
Lev Walkin59b176e2005-11-26 11:25:14 +00002571asn_TYPE_descriptor_t asn_DEF_Enum0 = {
2572 "Enum0",
2573 "Enum0",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08002574 &asn_OP_NativeEnumerated,
Lev Walkin59b176e2005-11-26 11:25:14 +00002575 asn_DEF_Enum0_tags_1,
2576 sizeof(asn_DEF_Enum0_tags_1)
2577 /sizeof(asn_DEF_Enum0_tags_1[0]), /* 1 */
2578 asn_DEF_Enum0_tags_1, /* Same as above */
2579 sizeof(asn_DEF_Enum0_tags_1)
2580 /sizeof(asn_DEF_Enum0_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07002581 { 0, &asn_PER_type_Enum0_constr_1, NativeEnumerated_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00002582 0, 0, /* Defined elsewhere */
2583 &asn_SPC_Enum0_specs_1 /* Additional specs */
2584};
2585
2586
2587/*** <<< INCLUDES [Enum1] >>> ***/
2588
2589#include <NativeEnumerated.h>
2590
2591/*** <<< DEPS [Enum1] >>> ***/
2592
2593typedef enum Enum1 {
2594 Enum1_one = 0,
2595 Enum1_two = 1
Lev Walkin171487e2006-03-21 07:25:18 +00002596} e_Enum1;
Lev Walkin59b176e2005-11-26 11:25:14 +00002597
2598/*** <<< TYPE-DECLS [Enum1] >>> ***/
2599
2600typedef long Enum1_t;
2601
2602/*** <<< FUNC-DECLS [Enum1] >>> ***/
2603
2604extern asn_TYPE_descriptor_t asn_DEF_Enum1;
2605asn_struct_free_f Enum1_free;
2606asn_struct_print_f Enum1_print;
2607asn_constr_check_f Enum1_constraint;
2608ber_type_decoder_f Enum1_decode_ber;
2609der_type_encoder_f Enum1_encode_der;
2610xer_type_decoder_f Enum1_decode_xer;
2611xer_type_encoder_f Enum1_encode_xer;
2612per_type_decoder_f Enum1_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002613per_type_encoder_f Enum1_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002614
2615/*** <<< CODE [Enum1] >>> ***/
2616
2617int
2618Enum1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002619 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002620 long value;
2621
2622 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002623 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002624 "%s: value not given (%s:%d)",
2625 td->name, __FILE__, __LINE__);
2626 return -1;
2627 }
2628
2629 value = *(const long *)sptr;
2630
2631 if((value == 0)) {
2632 /* Constraint check succeeded */
2633 return 0;
2634 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002635 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002636 "%s: constraint failed (%s:%d)",
2637 td->name, __FILE__, __LINE__);
2638 return -1;
2639 }
2640}
2641
2642/*
2643 * This type is implemented using NativeEnumerated,
2644 * so here we adjust the DEF accordingly.
2645 */
Lev Walkin59b176e2005-11-26 11:25:14 +00002646
Lev Walkin725883b2006-10-09 12:07:58 +00002647/*** <<< CTDEFS [Enum1] >>> ***/
2648
Lev Walkin0479e042017-09-26 18:39:58 -07002649static asn_per_constraints_t asn_PER_type_Enum1_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002650 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
2651 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2652 0, 0 /* No PER value map */
2653};
2654
Lev Walkin59b176e2005-11-26 11:25:14 +00002655/*** <<< STAT-DEFS [Enum1] >>> ***/
2656
Lev Walkina7591b52014-10-12 18:37:35 -07002657static const asn_INTEGER_enum_map_t asn_MAP_Enum1_value2enum_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002658 { 0, 3, "one" },
2659 { 1, 3, "two" }
2660};
Lev Walkina7591b52014-10-12 18:37:35 -07002661static const unsigned int asn_MAP_Enum1_enum2value_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002662 0, /* one(0) */
2663 1 /* two(1) */
2664};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08002665static const asn_INTEGER_specifics_t asn_SPC_Enum1_specs_1 = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002666 asn_MAP_Enum1_value2enum_1, /* "tag" => N; sorted by tag */
2667 asn_MAP_Enum1_enum2value_1, /* N => "tag"; sorted by N */
2668 2, /* Number of elements in the maps */
2669 0, /* Enumeration is not extensible */
Lev Walkin8bb57a22007-12-03 13:41:36 +00002670 1, /* Strict enumeration */
2671 0, /* Native long size */
2672 0
Lev Walkin59b176e2005-11-26 11:25:14 +00002673};
Lev Walkina7591b52014-10-12 18:37:35 -07002674static const ber_tlv_tag_t asn_DEF_Enum1_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002675 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
2676};
Lev Walkin59b176e2005-11-26 11:25:14 +00002677asn_TYPE_descriptor_t asn_DEF_Enum1 = {
2678 "Enum1",
2679 "Enum1",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08002680 &asn_OP_NativeEnumerated,
Lev Walkin59b176e2005-11-26 11:25:14 +00002681 asn_DEF_Enum1_tags_1,
2682 sizeof(asn_DEF_Enum1_tags_1)
2683 /sizeof(asn_DEF_Enum1_tags_1[0]), /* 1 */
2684 asn_DEF_Enum1_tags_1, /* Same as above */
2685 sizeof(asn_DEF_Enum1_tags_1)
2686 /sizeof(asn_DEF_Enum1_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07002687 { 0, &asn_PER_type_Enum1_constr_1, Enum1_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00002688 0, 0, /* Defined elsewhere */
2689 &asn_SPC_Enum1_specs_1 /* Additional specs */
2690};
2691
2692
2693/*** <<< INCLUDES [Identifier] >>> ***/
2694
2695#include <VisibleString.h>
2696
2697/*** <<< TYPE-DECLS [Identifier] >>> ***/
2698
2699typedef VisibleString_t Identifier_t;
2700
2701/*** <<< FUNC-DECLS [Identifier] >>> ***/
2702
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08002703extern asn_per_constraints_t asn_PER_type_Identifier_constr_1;
Lev Walkin59b176e2005-11-26 11:25:14 +00002704extern asn_TYPE_descriptor_t asn_DEF_Identifier;
2705asn_struct_free_f Identifier_free;
2706asn_struct_print_f Identifier_print;
2707asn_constr_check_f Identifier_constraint;
2708ber_type_decoder_f Identifier_decode_ber;
2709der_type_encoder_f Identifier_encode_der;
2710xer_type_decoder_f Identifier_decode_xer;
2711xer_type_encoder_f Identifier_encode_xer;
2712per_type_decoder_f Identifier_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002713per_type_encoder_f Identifier_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002714
2715/*** <<< CTABLES [Identifier] >>> ***/
2716
Lev Walkina7591b52014-10-12 18:37:35 -07002717static const int permitted_alphabet_table_1[256] = {
Lev Walkin5b62ca82006-09-21 01:52:07 +00002718 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
2719 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
2720 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* $ */
2721 2, 3, 4, 5, 6, 7, 8, 9,10,11, 0, 0, 0, 0, 0, 0, /* 0123456789 */
2722 0,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26, /* ABCDEFGHIJKLMNO */
272327,28,29,30,31,32,33,34,35,36,37, 0, 0, 0, 0,38, /* PQRSTUVWXYZ _ */
2724 0,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53, /* abcdefghijklmno */
272554,55,56,57,58,59,60,61,62,63,64, 0, 0, 0, 0, 0, /* pqrstuvwxyz */
Lev Walkin59b176e2005-11-26 11:25:14 +00002726};
Lev Walkina7591b52014-10-12 18:37:35 -07002727static const int permitted_alphabet_code2value_1[64] = {
Lev Walkin5b62ca82006-09-21 01:52:07 +0000272836,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,
272970,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,
273086,87,88,89,90,95,97,98,99,100,101,102,103,104,105,106,
2731107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,
2732};
2733
Lev Walkin59b176e2005-11-26 11:25:14 +00002734
2735static int check_permitted_alphabet_1(const void *sptr) {
Lev Walkina7591b52014-10-12 18:37:35 -07002736 const int *table = permitted_alphabet_table_1;
Lev Walkin59b176e2005-11-26 11:25:14 +00002737 /* The underlying type is VisibleString */
2738 const VisibleString_t *st = (const VisibleString_t *)sptr;
2739 const uint8_t *ch = st->buf;
2740 const uint8_t *end = ch + st->size;
2741
2742 for(; ch < end; ch++) {
2743 uint8_t cv = *ch;
2744 if(!table[cv]) return -1;
2745 }
2746 return 0;
2747}
2748
2749
2750/*** <<< CODE [Identifier] >>> ***/
2751
2752int
2753Identifier_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002754 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002755 const VisibleString_t *st = (const VisibleString_t *)sptr;
2756 size_t size;
2757
2758 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002759 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002760 "%s: value not given (%s:%d)",
2761 td->name, __FILE__, __LINE__);
2762 return -1;
2763 }
2764
2765 size = st->size;
2766
2767 if((size >= 1 && size <= 32)
2768 && !check_permitted_alphabet_1(st)) {
2769 /* Constraint check succeeded */
2770 return 0;
2771 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002772 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002773 "%s: constraint failed (%s:%d)",
2774 td->name, __FILE__, __LINE__);
2775 return -1;
2776 }
2777}
2778
Lev Walkin725883b2006-10-09 12:07:58 +00002779static int asn_PER_MAP_Identifier_1_v2c(unsigned int value) {
2780 if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0]))
2781 return -1;
2782 return permitted_alphabet_table_1[value] - 1;
2783}
2784static int asn_PER_MAP_Identifier_1_c2v(unsigned int code) {
2785 if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0]))
2786 return -1;
2787 return permitted_alphabet_code2value_1[code];
2788}
Lev Walkin59b176e2005-11-26 11:25:14 +00002789/*
2790 * This type is implemented using VisibleString,
2791 * so here we adjust the DEF accordingly.
2792 */
Lev Walkin59b176e2005-11-26 11:25:14 +00002793
Lev Walkin725883b2006-10-09 12:07:58 +00002794/*** <<< CTDEFS [Identifier] >>> ***/
2795
Lev Walkin0479e042017-09-26 18:39:58 -07002796asn_per_constraints_t asn_PER_type_Identifier_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002797 { APC_CONSTRAINED, 6, 6, 36, 122 } /* (36..122) */,
2798 { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */,
2799 asn_PER_MAP_Identifier_1_v2c, /* Value to PER code map */
2800 asn_PER_MAP_Identifier_1_c2v /* PER code to value map */
2801};
2802
Lev Walkin59b176e2005-11-26 11:25:14 +00002803/*** <<< STAT-DEFS [Identifier] >>> ***/
2804
Lev Walkina7591b52014-10-12 18:37:35 -07002805static const ber_tlv_tag_t asn_DEF_Identifier_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002806 (ASN_TAG_CLASS_UNIVERSAL | (26 << 2))
2807};
Lev Walkin59b176e2005-11-26 11:25:14 +00002808asn_TYPE_descriptor_t asn_DEF_Identifier = {
2809 "Identifier",
2810 "Identifier",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08002811 &asn_OP_VisibleString,
Lev Walkin59b176e2005-11-26 11:25:14 +00002812 asn_DEF_Identifier_tags_1,
2813 sizeof(asn_DEF_Identifier_tags_1)
2814 /sizeof(asn_DEF_Identifier_tags_1[0]), /* 1 */
2815 asn_DEF_Identifier_tags_1, /* Same as above */
2816 sizeof(asn_DEF_Identifier_tags_1)
2817 /sizeof(asn_DEF_Identifier_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07002818 { 0, &asn_PER_type_Identifier_constr_1, Identifier_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00002819 0, 0, /* No members */
2820 0 /* No specifics */
2821};
2822