blob: 25035fdd1b67d48451ffdced92e7e3e8047b75ee [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
Lev Walkin20696a42017-10-17 21:27:33 -070076Int2_constraint(const 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
Lev Walkinbc09dd42017-10-19 02:16:35 -070089 if(1 /* No applicable constraints whatsoever */) {
90 (void)value; /* Unused variable */
91 /* Nothing is here. See below */
Lev Walkin59b176e2005-11-26 11:25:14 +000092 }
Lev Walkinbc09dd42017-10-19 02:16:35 -070093
94 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin59b176e2005-11-26 11:25:14 +000095}
96
97/*
98 * This type is implemented using Int1,
99 * so here we adjust the DEF accordingly.
100 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000101
Lev Walkin725883b2006-10-09 12:07:58 +0000102/*** <<< CTDEFS [Int2] >>> ***/
103
Lev Walkin0479e042017-09-26 18:39:58 -0700104asn_per_constraints_t asn_PER_type_Int2_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000105 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (0..MAX) */,
106 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
107 0, 0 /* No PER value map */
108};
109
Lev Walkin59b176e2005-11-26 11:25:14 +0000110/*** <<< STAT-DEFS [Int2] >>> ***/
111
Lev Walkina7591b52014-10-12 18:37:35 -0700112static const ber_tlv_tag_t asn_DEF_Int2_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000113 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
114};
Lev Walkin59b176e2005-11-26 11:25:14 +0000115asn_TYPE_descriptor_t asn_DEF_Int2 = {
116 "Int2",
117 "Int2",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800118 &asn_OP_NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000119 asn_DEF_Int2_tags_1,
120 sizeof(asn_DEF_Int2_tags_1)
121 /sizeof(asn_DEF_Int2_tags_1[0]), /* 1 */
122 asn_DEF_Int2_tags_1, /* Same as above */
123 sizeof(asn_DEF_Int2_tags_1)
124 /sizeof(asn_DEF_Int2_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700125 { 0, &asn_PER_type_Int2_constr_1, Int2_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000126 0, 0, /* No members */
127 0 /* No specifics */
128};
129
130
131/*** <<< INCLUDES [Int3] >>> ***/
132
Lev Walkin22b5ed42006-09-13 02:51:20 +0000133#include "Int2.h"
Lev Walkin59b176e2005-11-26 11:25:14 +0000134
135/*** <<< TYPE-DECLS [Int3] >>> ***/
136
137typedef Int2_t Int3_t;
138
139/*** <<< FUNC-DECLS [Int3] >>> ***/
140
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800141extern asn_per_constraints_t asn_PER_type_Int3_constr_1;
Lev Walkin59b176e2005-11-26 11:25:14 +0000142extern asn_TYPE_descriptor_t asn_DEF_Int3;
143asn_struct_free_f Int3_free;
144asn_struct_print_f Int3_print;
145asn_constr_check_f Int3_constraint;
146ber_type_decoder_f Int3_decode_ber;
147der_type_encoder_f Int3_encode_der;
148xer_type_decoder_f Int3_decode_xer;
149xer_type_encoder_f Int3_encode_xer;
150per_type_decoder_f Int3_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000151per_type_encoder_f Int3_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000152
153/*** <<< CODE [Int3] >>> ***/
154
155int
Lev Walkin20696a42017-10-17 21:27:33 -0700156Int3_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000157 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000158 long value;
159
160 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700161 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000162 "%s: value not given (%s:%d)",
163 td->name, __FILE__, __LINE__);
164 return -1;
165 }
166
Lev Walkin2a744a72013-03-27 01:56:23 -0700167 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +0000168
169 if((value >= 0 && value <= 10)) {
170 /* Constraint check succeeded */
171 return 0;
172 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700173 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000174 "%s: constraint failed (%s:%d)",
175 td->name, __FILE__, __LINE__);
176 return -1;
177 }
178}
179
180/*
181 * This type is implemented using Int2,
182 * so here we adjust the DEF accordingly.
183 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000184
Lev Walkin725883b2006-10-09 12:07:58 +0000185/*** <<< CTDEFS [Int3] >>> ***/
186
Lev Walkin0479e042017-09-26 18:39:58 -0700187asn_per_constraints_t asn_PER_type_Int3_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000188 { APC_CONSTRAINED, 4, 4, 0, 10 } /* (0..10) */,
189 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
190 0, 0 /* No PER value map */
191};
192
Lev Walkin59b176e2005-11-26 11:25:14 +0000193/*** <<< STAT-DEFS [Int3] >>> ***/
194
Lev Walkina7591b52014-10-12 18:37:35 -0700195static const ber_tlv_tag_t asn_DEF_Int3_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000196 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
197};
Lev Walkin59b176e2005-11-26 11:25:14 +0000198asn_TYPE_descriptor_t asn_DEF_Int3 = {
199 "Int3",
200 "Int3",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800201 &asn_OP_NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000202 asn_DEF_Int3_tags_1,
203 sizeof(asn_DEF_Int3_tags_1)
204 /sizeof(asn_DEF_Int3_tags_1[0]), /* 1 */
205 asn_DEF_Int3_tags_1, /* Same as above */
206 sizeof(asn_DEF_Int3_tags_1)
207 /sizeof(asn_DEF_Int3_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700208 { 0, &asn_PER_type_Int3_constr_1, Int3_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000209 0, 0, /* No members */
210 0 /* No specifics */
211};
212
213
214/*** <<< INCLUDES [Int4] >>> ***/
215
Lev Walkin22b5ed42006-09-13 02:51:20 +0000216#include "Int3.h"
Lev Walkin59b176e2005-11-26 11:25:14 +0000217
218/*** <<< TYPE-DECLS [Int4] >>> ***/
219
220typedef Int3_t Int4_t;
221
222/*** <<< FUNC-DECLS [Int4] >>> ***/
223
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800224extern asn_per_constraints_t asn_PER_type_Int4_constr_1;
Lev Walkin59b176e2005-11-26 11:25:14 +0000225extern asn_TYPE_descriptor_t asn_DEF_Int4;
226asn_struct_free_f Int4_free;
227asn_struct_print_f Int4_print;
228asn_constr_check_f Int4_constraint;
229ber_type_decoder_f Int4_decode_ber;
230der_type_encoder_f Int4_encode_der;
231xer_type_decoder_f Int4_decode_xer;
232xer_type_encoder_f Int4_encode_xer;
233per_type_decoder_f Int4_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000234per_type_encoder_f Int4_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000235
236/*** <<< CODE [Int4] >>> ***/
237
238int
Lev Walkin20696a42017-10-17 21:27:33 -0700239Int4_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000240 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000241 long value;
242
243 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700244 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000245 "%s: value not given (%s:%d)",
246 td->name, __FILE__, __LINE__);
247 return -1;
248 }
249
Lev Walkin2a744a72013-03-27 01:56:23 -0700250 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +0000251
252 if((value >= 1 && value <= 10)) {
253 /* Constraint check succeeded */
254 return 0;
255 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700256 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000257 "%s: constraint failed (%s:%d)",
258 td->name, __FILE__, __LINE__);
259 return -1;
260 }
261}
262
263/*
264 * This type is implemented using Int3,
265 * so here we adjust the DEF accordingly.
266 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000267
Lev Walkin725883b2006-10-09 12:07:58 +0000268/*** <<< CTDEFS [Int4] >>> ***/
269
Lev Walkin0479e042017-09-26 18:39:58 -0700270asn_per_constraints_t asn_PER_type_Int4_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000271 { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 1, 10 } /* (1..10,...) */,
272 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
273 0, 0 /* No PER value map */
274};
275
Lev Walkin59b176e2005-11-26 11:25:14 +0000276/*** <<< STAT-DEFS [Int4] >>> ***/
277
Lev Walkina7591b52014-10-12 18:37:35 -0700278static const ber_tlv_tag_t asn_DEF_Int4_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000279 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
280};
Lev Walkin59b176e2005-11-26 11:25:14 +0000281asn_TYPE_descriptor_t asn_DEF_Int4 = {
282 "Int4",
283 "Int4",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800284 &asn_OP_NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000285 asn_DEF_Int4_tags_1,
286 sizeof(asn_DEF_Int4_tags_1)
287 /sizeof(asn_DEF_Int4_tags_1[0]), /* 1 */
288 asn_DEF_Int4_tags_1, /* Same as above */
289 sizeof(asn_DEF_Int4_tags_1)
290 /sizeof(asn_DEF_Int4_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700291 { 0, &asn_PER_type_Int4_constr_1, Int4_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000292 0, 0, /* No members */
293 0 /* No specifics */
294};
295
296
297/*** <<< INCLUDES [Int5] >>> ***/
298
Lev Walkin22b5ed42006-09-13 02:51:20 +0000299#include "Int4.h"
Lev Walkin59b176e2005-11-26 11:25:14 +0000300
301/*** <<< TYPE-DECLS [Int5] >>> ***/
302
303typedef Int4_t Int5_t;
304
305/*** <<< FUNC-DECLS [Int5] >>> ***/
306
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800307extern asn_per_constraints_t asn_PER_type_Int5_constr_1;
Lev Walkin59b176e2005-11-26 11:25:14 +0000308extern asn_TYPE_descriptor_t asn_DEF_Int5;
309asn_struct_free_f Int5_free;
310asn_struct_print_f Int5_print;
311asn_constr_check_f Int5_constraint;
312ber_type_decoder_f Int5_decode_ber;
313der_type_encoder_f Int5_encode_der;
314xer_type_decoder_f Int5_decode_xer;
315xer_type_encoder_f Int5_encode_xer;
316per_type_decoder_f Int5_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000317per_type_encoder_f Int5_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000318
319/*** <<< CODE [Int5] >>> ***/
320
321int
Lev Walkin20696a42017-10-17 21:27:33 -0700322Int5_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000323 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000324 long value;
325
326 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700327 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000328 "%s: value not given (%s:%d)",
329 td->name, __FILE__, __LINE__);
330 return -1;
331 }
332
Lev Walkin2a744a72013-03-27 01:56:23 -0700333 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +0000334
335 if((value == 5)) {
336 /* Constraint check succeeded */
337 return 0;
338 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700339 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000340 "%s: constraint failed (%s:%d)",
341 td->name, __FILE__, __LINE__);
342 return -1;
343 }
344}
345
346/*
347 * This type is implemented using Int4,
348 * so here we adjust the DEF accordingly.
349 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000350
Lev Walkin725883b2006-10-09 12:07:58 +0000351/*** <<< CTDEFS [Int5] >>> ***/
352
Lev Walkin0479e042017-09-26 18:39:58 -0700353asn_per_constraints_t asn_PER_type_Int5_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000354 { APC_CONSTRAINED, 0, 0, 5, 5 } /* (5..5) */,
355 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
356 0, 0 /* No PER value map */
357};
358
Lev Walkin59b176e2005-11-26 11:25:14 +0000359/*** <<< STAT-DEFS [Int5] >>> ***/
360
Lev Walkina7591b52014-10-12 18:37:35 -0700361static const ber_tlv_tag_t asn_DEF_Int5_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000362 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
363};
Lev Walkin59b176e2005-11-26 11:25:14 +0000364asn_TYPE_descriptor_t asn_DEF_Int5 = {
365 "Int5",
366 "Int5",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800367 &asn_OP_NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000368 asn_DEF_Int5_tags_1,
369 sizeof(asn_DEF_Int5_tags_1)
370 /sizeof(asn_DEF_Int5_tags_1[0]), /* 1 */
371 asn_DEF_Int5_tags_1, /* Same as above */
372 sizeof(asn_DEF_Int5_tags_1)
373 /sizeof(asn_DEF_Int5_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700374 { 0, &asn_PER_type_Int5_constr_1, Int5_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000375 0, 0, /* No members */
376 0 /* No specifics */
377};
378
379
380/*** <<< INCLUDES [ExtensibleExtensions] >>> ***/
381
Lev Walkin2a744a72013-03-27 01:56:23 -0700382#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +0000383
384/*** <<< TYPE-DECLS [ExtensibleExtensions] >>> ***/
385
Lev Walkin2a744a72013-03-27 01:56:23 -0700386typedef long ExtensibleExtensions_t;
Lev Walkin59b176e2005-11-26 11:25:14 +0000387
388/*** <<< FUNC-DECLS [ExtensibleExtensions] >>> ***/
389
390extern asn_TYPE_descriptor_t asn_DEF_ExtensibleExtensions;
391asn_struct_free_f ExtensibleExtensions_free;
392asn_struct_print_f ExtensibleExtensions_print;
393asn_constr_check_f ExtensibleExtensions_constraint;
394ber_type_decoder_f ExtensibleExtensions_decode_ber;
395der_type_encoder_f ExtensibleExtensions_encode_der;
396xer_type_decoder_f ExtensibleExtensions_decode_xer;
397xer_type_encoder_f ExtensibleExtensions_encode_xer;
398per_type_decoder_f ExtensibleExtensions_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000399per_type_encoder_f ExtensibleExtensions_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000400
401/*** <<< CODE [ExtensibleExtensions] >>> ***/
402
403int
Lev Walkin20696a42017-10-17 21:27:33 -0700404ExtensibleExtensions_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000405 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000406 long value;
407
408 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700409 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000410 "%s: value not given (%s:%d)",
411 td->name, __FILE__, __LINE__);
412 return -1;
413 }
414
Lev Walkin2a744a72013-03-27 01:56:23 -0700415 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +0000416
Lev Walkin0c686452017-09-07 22:59:36 -0700417 if((value >= 1 && value <= 255)) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000418 /* Constraint check succeeded */
419 return 0;
420 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700421 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000422 "%s: constraint failed (%s:%d)",
423 td->name, __FILE__, __LINE__);
424 return -1;
425 }
426}
427
428/*
Lev Walkin2a744a72013-03-27 01:56:23 -0700429 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000430 * so here we adjust the DEF accordingly.
431 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000432
Lev Walkin725883b2006-10-09 12:07:58 +0000433/*** <<< CTDEFS [ExtensibleExtensions] >>> ***/
434
Lev Walkin0479e042017-09-26 18:39:58 -0700435static asn_per_constraints_t asn_PER_type_ExtensibleExtensions_constr_1 CC_NOTUSED = {
Lev Walkin0c686452017-09-07 22:59:36 -0700436 { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 255 } /* (1..255,...) */,
Lev Walkin725883b2006-10-09 12:07:58 +0000437 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
438 0, 0 /* No PER value map */
439};
440
Lev Walkin59b176e2005-11-26 11:25:14 +0000441/*** <<< STAT-DEFS [ExtensibleExtensions] >>> ***/
442
Lev Walkina7591b52014-10-12 18:37:35 -0700443static const ber_tlv_tag_t asn_DEF_ExtensibleExtensions_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000444 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
445};
Lev Walkin59b176e2005-11-26 11:25:14 +0000446asn_TYPE_descriptor_t asn_DEF_ExtensibleExtensions = {
447 "ExtensibleExtensions",
448 "ExtensibleExtensions",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800449 &asn_OP_NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000450 asn_DEF_ExtensibleExtensions_tags_1,
451 sizeof(asn_DEF_ExtensibleExtensions_tags_1)
452 /sizeof(asn_DEF_ExtensibleExtensions_tags_1[0]), /* 1 */
453 asn_DEF_ExtensibleExtensions_tags_1, /* Same as above */
454 sizeof(asn_DEF_ExtensibleExtensions_tags_1)
455 /sizeof(asn_DEF_ExtensibleExtensions_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700456 { 0, &asn_PER_type_ExtensibleExtensions_constr_1, ExtensibleExtensions_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000457 0, 0, /* No members */
458 0 /* No specifics */
459};
460
461
462/*** <<< INCLUDES [Str1] >>> ***/
463
464#include <IA5String.h>
465
466/*** <<< TYPE-DECLS [Str1] >>> ***/
467
468typedef IA5String_t Str1_t;
469
470/*** <<< FUNC-DECLS [Str1] >>> ***/
471
Lev Walkin22cef6c2017-10-16 20:33:07 -0700472extern asn_per_constraints_t asn_PER_type_Str1_constr_1;
Lev Walkin59b176e2005-11-26 11:25:14 +0000473extern asn_TYPE_descriptor_t asn_DEF_Str1;
474asn_struct_free_f Str1_free;
475asn_struct_print_f Str1_print;
476asn_constr_check_f Str1_constraint;
477ber_type_decoder_f Str1_decode_ber;
478der_type_encoder_f Str1_encode_der;
479xer_type_decoder_f Str1_decode_xer;
480xer_type_encoder_f Str1_encode_xer;
481per_type_decoder_f Str1_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000482per_type_encoder_f Str1_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000483
484/*** <<< CODE [Str1] >>> ***/
485
Lev Walkin59b176e2005-11-26 11:25:14 +0000486/*
487 * This type is implemented using IA5String,
488 * so here we adjust the DEF accordingly.
489 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000490
Lev Walkin22cef6c2017-10-16 20:33:07 -0700491/*** <<< CTDEFS [Str1] >>> ***/
492
493asn_per_constraints_t asn_PER_type_Str1_constr_1 CC_NOTUSED = {
494 { APC_CONSTRAINED, 7, 7, 0, 127 } /* (0..127) */,
495 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
496 0, 0 /* No PER character map necessary */
497};
498
Lev Walkin59b176e2005-11-26 11:25:14 +0000499/*** <<< STAT-DEFS [Str1] >>> ***/
500
Lev Walkina7591b52014-10-12 18:37:35 -0700501static const ber_tlv_tag_t asn_DEF_Str1_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000502 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
503};
504asn_TYPE_descriptor_t asn_DEF_Str1 = {
505 "Str1",
506 "Str1",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800507 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +0000508 asn_DEF_Str1_tags_1,
509 sizeof(asn_DEF_Str1_tags_1)
510 /sizeof(asn_DEF_Str1_tags_1[0]), /* 1 */
511 asn_DEF_Str1_tags_1, /* Same as above */
512 sizeof(asn_DEF_Str1_tags_1)
513 /sizeof(asn_DEF_Str1_tags_1[0]), /* 1 */
Lev Walkin22cef6c2017-10-16 20:33:07 -0700514 { 0, &asn_PER_type_Str1_constr_1, IA5String_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000515 0, 0, /* No members */
516 0 /* No specifics */
517};
518
519
520/*** <<< INCLUDES [Str2] >>> ***/
521
Lev Walkin22b5ed42006-09-13 02:51:20 +0000522#include "Str1.h"
Lev Walkin59b176e2005-11-26 11:25:14 +0000523
524/*** <<< TYPE-DECLS [Str2] >>> ***/
525
526typedef Str1_t Str2_t;
527
528/*** <<< FUNC-DECLS [Str2] >>> ***/
529
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800530extern asn_per_constraints_t asn_PER_type_Str2_constr_1;
Lev Walkin59b176e2005-11-26 11:25:14 +0000531extern asn_TYPE_descriptor_t asn_DEF_Str2;
532asn_struct_free_f Str2_free;
533asn_struct_print_f Str2_print;
534asn_constr_check_f Str2_constraint;
535ber_type_decoder_f Str2_decode_ber;
536der_type_encoder_f Str2_encode_der;
537xer_type_decoder_f Str2_decode_xer;
538xer_type_encoder_f Str2_encode_xer;
539per_type_decoder_f Str2_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000540per_type_encoder_f Str2_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000541
542/*** <<< CTABLES [Str2] >>> ***/
543
544static int check_permitted_alphabet_1(const void *sptr) {
545 /* The underlying type is IA5String */
546 const IA5String_t *st = (const IA5String_t *)sptr;
547 const uint8_t *ch = st->buf;
548 const uint8_t *end = ch + st->size;
549
550 for(; ch < end; ch++) {
551 uint8_t cv = *ch;
552 if(!(cv <= 127)) return -1;
553 }
554 return 0;
555}
556
557
558/*** <<< CODE [Str2] >>> ***/
559
560int
Lev Walkin20696a42017-10-17 21:27:33 -0700561Str2_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000562 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000563 const Str1_t *st = (const Str1_t *)sptr;
564 size_t size;
565
566 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700567 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000568 "%s: value not given (%s:%d)",
569 td->name, __FILE__, __LINE__);
570 return -1;
571 }
572
573 size = st->size;
574
575 if(((size <= 20) || (size >= 25 && size <= 30))
576 && !check_permitted_alphabet_1(st)) {
577 /* Constraint check succeeded */
578 return 0;
579 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700580 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000581 "%s: constraint failed (%s:%d)",
582 td->name, __FILE__, __LINE__);
583 return -1;
584 }
585}
586
587/*
588 * This type is implemented using Str1,
589 * so here we adjust the DEF accordingly.
590 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000591
Lev Walkin725883b2006-10-09 12:07:58 +0000592/*** <<< CTDEFS [Str2] >>> ***/
593
Lev Walkin0479e042017-09-26 18:39:58 -0700594asn_per_constraints_t asn_PER_type_Str2_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000595 { APC_CONSTRAINED, 7, 7, 0, 127 } /* (0..127) */,
596 { APC_CONSTRAINED, 5, 5, 0, 30 } /* (SIZE(0..30)) */,
597 0, 0 /* No PER character map necessary */
598};
599
Lev Walkin59b176e2005-11-26 11:25:14 +0000600/*** <<< STAT-DEFS [Str2] >>> ***/
601
Lev Walkina7591b52014-10-12 18:37:35 -0700602static const ber_tlv_tag_t asn_DEF_Str2_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000603 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
604};
Lev Walkin59b176e2005-11-26 11:25:14 +0000605asn_TYPE_descriptor_t asn_DEF_Str2 = {
606 "Str2",
607 "Str2",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800608 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +0000609 asn_DEF_Str2_tags_1,
610 sizeof(asn_DEF_Str2_tags_1)
611 /sizeof(asn_DEF_Str2_tags_1[0]), /* 1 */
612 asn_DEF_Str2_tags_1, /* Same as above */
613 sizeof(asn_DEF_Str2_tags_1)
614 /sizeof(asn_DEF_Str2_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700615 { 0, &asn_PER_type_Str2_constr_1, Str2_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000616 0, 0, /* No members */
617 0 /* No specifics */
618};
619
620
621/*** <<< INCLUDES [Str3] >>> ***/
622
Lev Walkin22b5ed42006-09-13 02:51:20 +0000623#include "Str2.h"
Lev Walkin59b176e2005-11-26 11:25:14 +0000624
625/*** <<< TYPE-DECLS [Str3] >>> ***/
626
627typedef Str2_t Str3_t;
628
629/*** <<< FUNC-DECLS [Str3] >>> ***/
630
631extern asn_TYPE_descriptor_t asn_DEF_Str3;
632asn_struct_free_f Str3_free;
633asn_struct_print_f Str3_print;
634asn_constr_check_f Str3_constraint;
635ber_type_decoder_f Str3_decode_ber;
636der_type_encoder_f Str3_encode_der;
637xer_type_decoder_f Str3_decode_xer;
638xer_type_encoder_f Str3_encode_xer;
639per_type_decoder_f Str3_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000640per_type_encoder_f Str3_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000641
642/*** <<< CTABLES [Str3] >>> ***/
643
Lev Walkina7591b52014-10-12 18:37:35 -0700644static const int permitted_alphabet_table_1[256] = {
Lev Walkin5b62ca82006-09-21 01:52:07 +0000645 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
646 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
647 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
648 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
649 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ABC */
650 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
651 0, 0, 0, 0, 4, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* def */
Lev Walkin59b176e2005-11-26 11:25:14 +0000652};
Lev Walkina7591b52014-10-12 18:37:35 -0700653static const int permitted_alphabet_code2value_1[6] = {
Lev Walkin5b62ca82006-09-21 01:52:07 +000065465,66,67,100,101,102,};
655
Lev Walkin59b176e2005-11-26 11:25:14 +0000656
657static int check_permitted_alphabet_1(const void *sptr) {
Lev Walkina7591b52014-10-12 18:37:35 -0700658 const int *table = permitted_alphabet_table_1;
Lev Walkin59b176e2005-11-26 11:25:14 +0000659 /* The underlying type is IA5String */
660 const IA5String_t *st = (const IA5String_t *)sptr;
661 const uint8_t *ch = st->buf;
662 const uint8_t *end = ch + st->size;
663
664 for(; ch < end; ch++) {
665 uint8_t cv = *ch;
666 if(!table[cv]) return -1;
667 }
668 return 0;
669}
670
671
672/*** <<< CODE [Str3] >>> ***/
673
674int
Lev Walkin20696a42017-10-17 21:27:33 -0700675Str3_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000676 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000677 const Str2_t *st = (const Str2_t *)sptr;
678 size_t size;
679
680 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700681 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000682 "%s: value not given (%s:%d)",
683 td->name, __FILE__, __LINE__);
684 return -1;
685 }
686
687 size = st->size;
688
689 if(((size >= 10 && size <= 20) || (size >= 25 && size <= 27))
690 && !check_permitted_alphabet_1(st)) {
691 /* Constraint check succeeded */
692 return 0;
693 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700694 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000695 "%s: constraint failed (%s:%d)",
696 td->name, __FILE__, __LINE__);
697 return -1;
698 }
699}
700
Lev Walkin725883b2006-10-09 12:07:58 +0000701static int asn_PER_MAP_Str3_1_v2c(unsigned int value) {
702 if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0]))
703 return -1;
704 return permitted_alphabet_table_1[value] - 1;
705}
706static int asn_PER_MAP_Str3_1_c2v(unsigned int code) {
707 if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0]))
708 return -1;
709 return permitted_alphabet_code2value_1[code];
710}
Lev Walkin59b176e2005-11-26 11:25:14 +0000711/*
712 * This type is implemented using Str2,
713 * so here we adjust the DEF accordingly.
714 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000715
Lev Walkin725883b2006-10-09 12:07:58 +0000716/*** <<< CTDEFS [Str3] >>> ***/
717
Lev Walkin0479e042017-09-26 18:39:58 -0700718static asn_per_constraints_t asn_PER_type_Str3_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000719 { APC_CONSTRAINED, 3, 3, 65, 102 } /* (65..102) */,
720 { APC_CONSTRAINED, 5, 5, 10, 27 } /* (SIZE(10..27)) */,
721 asn_PER_MAP_Str3_1_v2c, /* Value to PER code map */
722 asn_PER_MAP_Str3_1_c2v /* PER code to value map */
723};
724
Lev Walkin59b176e2005-11-26 11:25:14 +0000725/*** <<< STAT-DEFS [Str3] >>> ***/
726
Lev Walkina7591b52014-10-12 18:37:35 -0700727static const ber_tlv_tag_t asn_DEF_Str3_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000728 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
729};
Lev Walkin59b176e2005-11-26 11:25:14 +0000730asn_TYPE_descriptor_t asn_DEF_Str3 = {
731 "Str3",
732 "Str3",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800733 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +0000734 asn_DEF_Str3_tags_1,
735 sizeof(asn_DEF_Str3_tags_1)
736 /sizeof(asn_DEF_Str3_tags_1[0]), /* 1 */
737 asn_DEF_Str3_tags_1, /* Same as above */
738 sizeof(asn_DEF_Str3_tags_1)
739 /sizeof(asn_DEF_Str3_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700740 { 0, &asn_PER_type_Str3_constr_1, Str3_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000741 0, 0, /* No members */
742 0 /* No specifics */
743};
744
745
746/*** <<< INCLUDES [Str4] >>> ***/
747
748#include <IA5String.h>
749
750/*** <<< TYPE-DECLS [Str4] >>> ***/
751
752typedef IA5String_t Str4_t;
753
754/*** <<< FUNC-DECLS [Str4] >>> ***/
755
756extern asn_TYPE_descriptor_t asn_DEF_Str4;
757asn_struct_free_f Str4_free;
758asn_struct_print_f Str4_print;
759asn_constr_check_f Str4_constraint;
760ber_type_decoder_f Str4_decode_ber;
761der_type_encoder_f Str4_encode_der;
762xer_type_decoder_f Str4_decode_xer;
763xer_type_encoder_f Str4_encode_xer;
764per_type_decoder_f Str4_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000765per_type_encoder_f Str4_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000766
767/*** <<< CTABLES [Str4] >>> ***/
768
769static int check_permitted_alphabet_1(const void *sptr) {
770 /* The underlying type is IA5String */
771 const IA5String_t *st = (const IA5String_t *)sptr;
772 const uint8_t *ch = st->buf;
773 const uint8_t *end = ch + st->size;
774
775 for(; ch < end; ch++) {
776 uint8_t cv = *ch;
777 if(!(cv <= 127)) return -1;
778 }
779 return 0;
780}
781
782
783/*** <<< CODE [Str4] >>> ***/
784
785int
Lev Walkin20696a42017-10-17 21:27:33 -0700786Str4_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000787 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000788 const IA5String_t *st = (const IA5String_t *)sptr;
789
790 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700791 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000792 "%s: value not given (%s:%d)",
793 td->name, __FILE__, __LINE__);
794 return -1;
795 }
796
797
798 if(!check_permitted_alphabet_1(st)) {
799 /* Constraint check succeeded */
800 return 0;
801 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700802 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000803 "%s: constraint failed (%s:%d)",
804 td->name, __FILE__, __LINE__);
805 return -1;
806 }
807}
808
809/*
810 * This type is implemented using IA5String,
811 * so here we adjust the DEF accordingly.
812 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000813
Lev Walkin725883b2006-10-09 12:07:58 +0000814/*** <<< CTDEFS [Str4] >>> ***/
815
Lev Walkin0479e042017-09-26 18:39:58 -0700816static asn_per_constraints_t asn_PER_type_Str4_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000817 { APC_CONSTRAINED, 7, 7, 0, 127 } /* (0..127) */,
818 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
819 0, 0 /* No PER character map necessary */
820};
821
Lev Walkin59b176e2005-11-26 11:25:14 +0000822/*** <<< STAT-DEFS [Str4] >>> ***/
823
Lev Walkina7591b52014-10-12 18:37:35 -0700824static const ber_tlv_tag_t asn_DEF_Str4_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000825 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
826};
Lev Walkin59b176e2005-11-26 11:25:14 +0000827asn_TYPE_descriptor_t asn_DEF_Str4 = {
828 "Str4",
829 "Str4",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800830 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +0000831 asn_DEF_Str4_tags_1,
832 sizeof(asn_DEF_Str4_tags_1)
833 /sizeof(asn_DEF_Str4_tags_1[0]), /* 1 */
834 asn_DEF_Str4_tags_1, /* Same as above */
835 sizeof(asn_DEF_Str4_tags_1)
836 /sizeof(asn_DEF_Str4_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700837 { 0, &asn_PER_type_Str4_constr_1, Str4_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000838 0, 0, /* No members */
839 0 /* No specifics */
840};
841
842
843/*** <<< INCLUDES [PER-Visible] >>> ***/
844
845#include <IA5String.h>
846
847/*** <<< TYPE-DECLS [PER-Visible] >>> ***/
848
849typedef IA5String_t PER_Visible_t;
850
851/*** <<< FUNC-DECLS [PER-Visible] >>> ***/
852
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800853extern asn_per_constraints_t asn_PER_type_PER_Visible_constr_1;
Lev Walkin59b176e2005-11-26 11:25:14 +0000854extern asn_TYPE_descriptor_t asn_DEF_PER_Visible;
855asn_struct_free_f PER_Visible_free;
856asn_struct_print_f PER_Visible_print;
857asn_constr_check_f PER_Visible_constraint;
858ber_type_decoder_f PER_Visible_decode_ber;
859der_type_encoder_f PER_Visible_encode_der;
860xer_type_decoder_f PER_Visible_decode_xer;
861xer_type_encoder_f PER_Visible_encode_xer;
862per_type_decoder_f PER_Visible_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000863per_type_encoder_f PER_Visible_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000864
865/*** <<< CTABLES [PER-Visible] >>> ***/
866
867static int check_permitted_alphabet_1(const void *sptr) {
868 /* The underlying type is IA5String */
869 const IA5String_t *st = (const IA5String_t *)sptr;
870 const uint8_t *ch = st->buf;
871 const uint8_t *end = ch + st->size;
872
873 for(; ch < end; ch++) {
874 uint8_t cv = *ch;
875 if(!(cv >= 65 && cv <= 70)) return -1;
876 }
877 return 0;
878}
879
880
881/*** <<< CODE [PER-Visible] >>> ***/
882
883int
Lev Walkin20696a42017-10-17 21:27:33 -0700884PER_Visible_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000885 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000886 const IA5String_t *st = (const IA5String_t *)sptr;
887
888 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700889 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000890 "%s: value not given (%s:%d)",
891 td->name, __FILE__, __LINE__);
892 return -1;
893 }
894
895
896 if(!check_permitted_alphabet_1(st)) {
897 /* Constraint check succeeded */
898 return 0;
899 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700900 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000901 "%s: constraint failed (%s:%d)",
902 td->name, __FILE__, __LINE__);
903 return -1;
904 }
905}
906
907/*
908 * This type is implemented using IA5String,
909 * so here we adjust the DEF accordingly.
910 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000911
Lev Walkin725883b2006-10-09 12:07:58 +0000912/*** <<< CTDEFS [PER-Visible] >>> ***/
913
Lev Walkin0479e042017-09-26 18:39:58 -0700914asn_per_constraints_t asn_PER_type_PER_Visible_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000915 { APC_CONSTRAINED, 3, 3, 65, 70 } /* (65..70) */,
916 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
917 0, 0 /* No PER character map necessary */
918};
919
Lev Walkin59b176e2005-11-26 11:25:14 +0000920/*** <<< STAT-DEFS [PER-Visible] >>> ***/
921
Lev Walkina7591b52014-10-12 18:37:35 -0700922static const ber_tlv_tag_t asn_DEF_PER_Visible_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000923 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
924};
Lev Walkin59b176e2005-11-26 11:25:14 +0000925asn_TYPE_descriptor_t asn_DEF_PER_Visible = {
926 "PER-Visible",
927 "PER-Visible",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800928 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +0000929 asn_DEF_PER_Visible_tags_1,
930 sizeof(asn_DEF_PER_Visible_tags_1)
931 /sizeof(asn_DEF_PER_Visible_tags_1[0]), /* 1 */
932 asn_DEF_PER_Visible_tags_1, /* Same as above */
933 sizeof(asn_DEF_PER_Visible_tags_1)
934 /sizeof(asn_DEF_PER_Visible_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700935 { 0, &asn_PER_type_PER_Visible_constr_1, PER_Visible_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000936 0, 0, /* No members */
937 0 /* No specifics */
938};
939
940
941/*** <<< INCLUDES [PER-Visible-2] >>> ***/
942
Lev Walkin22b5ed42006-09-13 02:51:20 +0000943#include "PER-Visible.h"
Lev Walkin59b176e2005-11-26 11:25:14 +0000944
945/*** <<< TYPE-DECLS [PER-Visible-2] >>> ***/
946
947typedef PER_Visible_t PER_Visible_2_t;
948
949/*** <<< FUNC-DECLS [PER-Visible-2] >>> ***/
950
951extern asn_TYPE_descriptor_t asn_DEF_PER_Visible_2;
952asn_struct_free_f PER_Visible_2_free;
953asn_struct_print_f PER_Visible_2_print;
954asn_constr_check_f PER_Visible_2_constraint;
955ber_type_decoder_f PER_Visible_2_decode_ber;
956der_type_encoder_f PER_Visible_2_encode_der;
957xer_type_decoder_f PER_Visible_2_decode_xer;
958xer_type_encoder_f PER_Visible_2_encode_xer;
959per_type_decoder_f PER_Visible_2_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000960per_type_encoder_f PER_Visible_2_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000961
962/*** <<< CTABLES [PER-Visible-2] >>> ***/
963
964static int check_permitted_alphabet_1(const void *sptr) {
965 /* The underlying type is IA5String */
966 const IA5String_t *st = (const IA5String_t *)sptr;
967 const uint8_t *ch = st->buf;
968 const uint8_t *end = ch + st->size;
969
970 for(; ch < end; ch++) {
971 uint8_t cv = *ch;
972 if(!(cv >= 69 && cv <= 70)) return -1;
973 }
974 return 0;
975}
976
977
978/*** <<< CODE [PER-Visible-2] >>> ***/
979
980int
Lev Walkin20696a42017-10-17 21:27:33 -0700981PER_Visible_2_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000982 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000983 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
984
985 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700986 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000987 "%s: value not given (%s:%d)",
988 td->name, __FILE__, __LINE__);
989 return -1;
990 }
991
992
993 if(!check_permitted_alphabet_1(st)) {
994 /* Constraint check succeeded */
995 return 0;
996 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700997 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000998 "%s: constraint failed (%s:%d)",
999 td->name, __FILE__, __LINE__);
1000 return -1;
1001 }
1002}
1003
1004/*
1005 * This type is implemented using PER_Visible,
1006 * so here we adjust the DEF accordingly.
1007 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001008
Lev Walkin725883b2006-10-09 12:07:58 +00001009/*** <<< CTDEFS [PER-Visible-2] >>> ***/
1010
Lev Walkin0479e042017-09-26 18:39:58 -07001011static asn_per_constraints_t asn_PER_type_PER_Visible_2_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001012 { APC_CONSTRAINED, 1, 1, 69, 70 } /* (69..70) */,
1013 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
1014 0, 0 /* No PER character map necessary */
1015};
1016
Lev Walkin59b176e2005-11-26 11:25:14 +00001017/*** <<< STAT-DEFS [PER-Visible-2] >>> ***/
1018
Lev Walkina7591b52014-10-12 18:37:35 -07001019static const ber_tlv_tag_t asn_DEF_PER_Visible_2_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001020 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1021};
Lev Walkin59b176e2005-11-26 11:25:14 +00001022asn_TYPE_descriptor_t asn_DEF_PER_Visible_2 = {
1023 "PER-Visible-2",
1024 "PER-Visible-2",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001025 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001026 asn_DEF_PER_Visible_2_tags_1,
1027 sizeof(asn_DEF_PER_Visible_2_tags_1)
1028 /sizeof(asn_DEF_PER_Visible_2_tags_1[0]), /* 1 */
1029 asn_DEF_PER_Visible_2_tags_1, /* Same as above */
1030 sizeof(asn_DEF_PER_Visible_2_tags_1)
1031 /sizeof(asn_DEF_PER_Visible_2_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07001032 { 0, &asn_PER_type_PER_Visible_2_constr_1, PER_Visible_2_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00001033 0, 0, /* No members */
1034 0 /* No specifics */
1035};
1036
1037
1038/*** <<< INCLUDES [Not-PER-Visible-1] >>> ***/
1039
Lev Walkin22b5ed42006-09-13 02:51:20 +00001040#include "PER-Visible.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001041
1042/*** <<< TYPE-DECLS [Not-PER-Visible-1] >>> ***/
1043
1044typedef PER_Visible_t Not_PER_Visible_1_t;
1045
1046/*** <<< FUNC-DECLS [Not-PER-Visible-1] >>> ***/
1047
1048extern asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_1;
1049asn_struct_free_f Not_PER_Visible_1_free;
1050asn_struct_print_f Not_PER_Visible_1_print;
1051asn_constr_check_f Not_PER_Visible_1_constraint;
1052ber_type_decoder_f Not_PER_Visible_1_decode_ber;
1053der_type_encoder_f Not_PER_Visible_1_encode_der;
1054xer_type_decoder_f Not_PER_Visible_1_decode_xer;
1055xer_type_encoder_f Not_PER_Visible_1_encode_xer;
1056per_type_decoder_f Not_PER_Visible_1_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001057per_type_encoder_f Not_PER_Visible_1_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001058
1059/*** <<< CTABLES [Not-PER-Visible-1] >>> ***/
1060
1061static int check_permitted_alphabet_1(const void *sptr) {
1062 /* The underlying type is IA5String */
1063 const IA5String_t *st = (const IA5String_t *)sptr;
1064 const uint8_t *ch = st->buf;
1065 const uint8_t *end = ch + st->size;
1066
1067 for(; ch < end; ch++) {
1068 uint8_t cv = *ch;
1069 if(!(cv >= 65 && cv <= 70)) return -1;
1070 }
1071 return 0;
1072}
1073
1074
1075/*** <<< CODE [Not-PER-Visible-1] >>> ***/
1076
1077int
Lev Walkin20696a42017-10-17 21:27:33 -07001078Not_PER_Visible_1_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001079 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001080 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1081
1082 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001083 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001084 "%s: value not given (%s:%d)",
1085 td->name, __FILE__, __LINE__);
1086 return -1;
1087 }
1088
1089
1090 if(!check_permitted_alphabet_1(st)) {
1091 /* Constraint check succeeded */
1092 return 0;
1093 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001094 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001095 "%s: constraint failed (%s:%d)",
1096 td->name, __FILE__, __LINE__);
1097 return -1;
1098 }
1099}
1100
1101/*
1102 * This type is implemented using PER_Visible,
1103 * so here we adjust the DEF accordingly.
1104 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001105
Lev Walkin725883b2006-10-09 12:07:58 +00001106/*** <<< CTDEFS [Not-PER-Visible-1] >>> ***/
1107
Lev Walkin0479e042017-09-26 18:39:58 -07001108static asn_per_constraints_t asn_PER_type_Not_PER_Visible_1_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001109 { APC_CONSTRAINED, 3, 3, 65, 70 } /* (65..70) */,
1110 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
1111 0, 0 /* No PER character map necessary */
1112};
1113
Lev Walkin59b176e2005-11-26 11:25:14 +00001114/*** <<< STAT-DEFS [Not-PER-Visible-1] >>> ***/
1115
Lev Walkina7591b52014-10-12 18:37:35 -07001116static const ber_tlv_tag_t asn_DEF_Not_PER_Visible_1_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001117 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1118};
Lev Walkin59b176e2005-11-26 11:25:14 +00001119asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_1 = {
1120 "Not-PER-Visible-1",
1121 "Not-PER-Visible-1",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001122 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001123 asn_DEF_Not_PER_Visible_1_tags_1,
1124 sizeof(asn_DEF_Not_PER_Visible_1_tags_1)
1125 /sizeof(asn_DEF_Not_PER_Visible_1_tags_1[0]), /* 1 */
1126 asn_DEF_Not_PER_Visible_1_tags_1, /* Same as above */
1127 sizeof(asn_DEF_Not_PER_Visible_1_tags_1)
1128 /sizeof(asn_DEF_Not_PER_Visible_1_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07001129 { 0, &asn_PER_type_Not_PER_Visible_1_constr_1, Not_PER_Visible_1_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00001130 0, 0, /* No members */
1131 0 /* No specifics */
1132};
1133
1134
1135/*** <<< INCLUDES [Not-PER-Visible-2] >>> ***/
1136
Lev Walkin22b5ed42006-09-13 02:51:20 +00001137#include "PER-Visible.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001138
1139/*** <<< TYPE-DECLS [Not-PER-Visible-2] >>> ***/
1140
1141typedef PER_Visible_t Not_PER_Visible_2_t;
1142
1143/*** <<< FUNC-DECLS [Not-PER-Visible-2] >>> ***/
1144
1145extern asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_2;
1146asn_struct_free_f Not_PER_Visible_2_free;
1147asn_struct_print_f Not_PER_Visible_2_print;
1148asn_constr_check_f Not_PER_Visible_2_constraint;
1149ber_type_decoder_f Not_PER_Visible_2_decode_ber;
1150der_type_encoder_f Not_PER_Visible_2_encode_der;
1151xer_type_decoder_f Not_PER_Visible_2_decode_xer;
1152xer_type_encoder_f Not_PER_Visible_2_encode_xer;
1153per_type_decoder_f Not_PER_Visible_2_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001154per_type_encoder_f Not_PER_Visible_2_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001155
1156/*** <<< CTABLES [Not-PER-Visible-2] >>> ***/
1157
1158static int check_permitted_alphabet_1(const void *sptr) {
1159 /* The underlying type is IA5String */
1160 const IA5String_t *st = (const IA5String_t *)sptr;
1161 const uint8_t *ch = st->buf;
1162 const uint8_t *end = ch + st->size;
1163
1164 for(; ch < end; ch++) {
1165 uint8_t cv = *ch;
1166 if(!(cv >= 65 && cv <= 66)) return -1;
1167 }
1168 return 0;
1169}
1170
1171
1172/*** <<< CODE [Not-PER-Visible-2] >>> ***/
1173
1174int
Lev Walkin20696a42017-10-17 21:27:33 -07001175Not_PER_Visible_2_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001176 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001177 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1178
1179 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001180 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001181 "%s: value not given (%s:%d)",
1182 td->name, __FILE__, __LINE__);
1183 return -1;
1184 }
1185
1186
1187 if(!check_permitted_alphabet_1(st)) {
1188 /* Constraint check succeeded */
1189 return 0;
1190 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001191 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001192 "%s: constraint failed (%s:%d)",
1193 td->name, __FILE__, __LINE__);
1194 return -1;
1195 }
1196}
1197
1198/*
1199 * This type is implemented using PER_Visible,
1200 * so here we adjust the DEF accordingly.
1201 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001202
Lev Walkin725883b2006-10-09 12:07:58 +00001203/*** <<< CTDEFS [Not-PER-Visible-2] >>> ***/
1204
Lev Walkin0479e042017-09-26 18:39:58 -07001205static asn_per_constraints_t asn_PER_type_Not_PER_Visible_2_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001206 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1207 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
1208 0, 0 /* No PER character map necessary */
1209};
1210
Lev Walkin59b176e2005-11-26 11:25:14 +00001211/*** <<< STAT-DEFS [Not-PER-Visible-2] >>> ***/
1212
Lev Walkina7591b52014-10-12 18:37:35 -07001213static const ber_tlv_tag_t asn_DEF_Not_PER_Visible_2_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001214 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1215};
Lev Walkin59b176e2005-11-26 11:25:14 +00001216asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_2 = {
1217 "Not-PER-Visible-2",
1218 "Not-PER-Visible-2",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001219 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001220 asn_DEF_Not_PER_Visible_2_tags_1,
1221 sizeof(asn_DEF_Not_PER_Visible_2_tags_1)
1222 /sizeof(asn_DEF_Not_PER_Visible_2_tags_1[0]), /* 1 */
1223 asn_DEF_Not_PER_Visible_2_tags_1, /* Same as above */
1224 sizeof(asn_DEF_Not_PER_Visible_2_tags_1)
1225 /sizeof(asn_DEF_Not_PER_Visible_2_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07001226 { 0, &asn_PER_type_Not_PER_Visible_2_constr_1, Not_PER_Visible_2_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00001227 0, 0, /* No members */
1228 0 /* No specifics */
1229};
1230
1231
1232/*** <<< INCLUDES [Not-PER-Visible-3] >>> ***/
1233
Lev Walkin22b5ed42006-09-13 02:51:20 +00001234#include "PER-Visible.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001235
1236/*** <<< TYPE-DECLS [Not-PER-Visible-3] >>> ***/
1237
1238typedef PER_Visible_t Not_PER_Visible_3_t;
1239
1240/*** <<< FUNC-DECLS [Not-PER-Visible-3] >>> ***/
1241
1242extern asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_3;
1243asn_struct_free_f Not_PER_Visible_3_free;
1244asn_struct_print_f Not_PER_Visible_3_print;
1245asn_constr_check_f Not_PER_Visible_3_constraint;
1246ber_type_decoder_f Not_PER_Visible_3_decode_ber;
1247der_type_encoder_f Not_PER_Visible_3_encode_der;
1248xer_type_decoder_f Not_PER_Visible_3_decode_xer;
1249xer_type_encoder_f Not_PER_Visible_3_encode_xer;
1250per_type_decoder_f Not_PER_Visible_3_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001251per_type_encoder_f Not_PER_Visible_3_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001252
1253/*** <<< CTABLES [Not-PER-Visible-3] >>> ***/
1254
1255static int check_permitted_alphabet_1(const void *sptr) {
1256 /* The underlying type is IA5String */
1257 const IA5String_t *st = (const IA5String_t *)sptr;
1258 const uint8_t *ch = st->buf;
1259 const uint8_t *end = ch + st->size;
1260
1261 for(; ch < end; ch++) {
1262 uint8_t cv = *ch;
1263 if(!(cv >= 65 && cv <= 66)) return -1;
1264 }
1265 return 0;
1266}
1267
1268
1269/*** <<< CODE [Not-PER-Visible-3] >>> ***/
1270
1271int
Lev Walkin20696a42017-10-17 21:27:33 -07001272Not_PER_Visible_3_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001273 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001274 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1275
1276 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001277 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001278 "%s: value not given (%s:%d)",
1279 td->name, __FILE__, __LINE__);
1280 return -1;
1281 }
1282
1283
1284 if(!check_permitted_alphabet_1(st)) {
1285 /* Constraint check succeeded */
1286 return 0;
1287 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001288 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001289 "%s: constraint failed (%s:%d)",
1290 td->name, __FILE__, __LINE__);
1291 return -1;
1292 }
1293}
1294
1295/*
1296 * This type is implemented using PER_Visible,
1297 * so here we adjust the DEF accordingly.
1298 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001299
Lev Walkin725883b2006-10-09 12:07:58 +00001300/*** <<< CTDEFS [Not-PER-Visible-3] >>> ***/
1301
Lev Walkin0479e042017-09-26 18:39:58 -07001302static asn_per_constraints_t asn_PER_type_Not_PER_Visible_3_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001303 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1304 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
1305 0, 0 /* No PER character map necessary */
1306};
1307
Lev Walkin59b176e2005-11-26 11:25:14 +00001308/*** <<< STAT-DEFS [Not-PER-Visible-3] >>> ***/
1309
Lev Walkina7591b52014-10-12 18:37:35 -07001310static const ber_tlv_tag_t asn_DEF_Not_PER_Visible_3_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001311 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1312};
Lev Walkin59b176e2005-11-26 11:25:14 +00001313asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_3 = {
1314 "Not-PER-Visible-3",
1315 "Not-PER-Visible-3",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001316 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001317 asn_DEF_Not_PER_Visible_3_tags_1,
1318 sizeof(asn_DEF_Not_PER_Visible_3_tags_1)
1319 /sizeof(asn_DEF_Not_PER_Visible_3_tags_1[0]), /* 1 */
1320 asn_DEF_Not_PER_Visible_3_tags_1, /* Same as above */
1321 sizeof(asn_DEF_Not_PER_Visible_3_tags_1)
1322 /sizeof(asn_DEF_Not_PER_Visible_3_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07001323 { 0, &asn_PER_type_Not_PER_Visible_3_constr_1, Not_PER_Visible_3_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00001324 0, 0, /* No members */
1325 0 /* No specifics */
1326};
1327
1328
1329/*** <<< INCLUDES [SIZE-but-not-FROM] >>> ***/
1330
Lev Walkin22b5ed42006-09-13 02:51:20 +00001331#include "PER-Visible.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001332
1333/*** <<< TYPE-DECLS [SIZE-but-not-FROM] >>> ***/
1334
1335typedef PER_Visible_t SIZE_but_not_FROM_t;
1336
1337/*** <<< FUNC-DECLS [SIZE-but-not-FROM] >>> ***/
1338
1339extern asn_TYPE_descriptor_t asn_DEF_SIZE_but_not_FROM;
1340asn_struct_free_f SIZE_but_not_FROM_free;
1341asn_struct_print_f SIZE_but_not_FROM_print;
1342asn_constr_check_f SIZE_but_not_FROM_constraint;
1343ber_type_decoder_f SIZE_but_not_FROM_decode_ber;
1344der_type_encoder_f SIZE_but_not_FROM_encode_der;
1345xer_type_decoder_f SIZE_but_not_FROM_decode_xer;
1346xer_type_encoder_f SIZE_but_not_FROM_encode_xer;
1347per_type_decoder_f SIZE_but_not_FROM_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001348per_type_encoder_f SIZE_but_not_FROM_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001349
1350/*** <<< CTABLES [SIZE-but-not-FROM] >>> ***/
1351
1352static int check_permitted_alphabet_1(const void *sptr) {
1353 /* The underlying type is IA5String */
1354 const IA5String_t *st = (const IA5String_t *)sptr;
1355 const uint8_t *ch = st->buf;
1356 const uint8_t *end = ch + st->size;
1357
1358 for(; ch < end; ch++) {
1359 uint8_t cv = *ch;
1360 if(!(cv >= 65 && cv <= 68)) return -1;
1361 }
1362 return 0;
1363}
1364
1365
1366/*** <<< CODE [SIZE-but-not-FROM] >>> ***/
1367
1368int
Lev Walkin20696a42017-10-17 21:27:33 -07001369SIZE_but_not_FROM_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001370 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001371 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1372 size_t size;
1373
1374 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001375 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001376 "%s: value not given (%s:%d)",
1377 td->name, __FILE__, __LINE__);
1378 return -1;
1379 }
1380
1381 size = st->size;
1382
1383 if((size >= 1 && size <= 4)
1384 && !check_permitted_alphabet_1(st)) {
1385 /* Constraint check succeeded */
1386 return 0;
1387 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001388 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001389 "%s: constraint failed (%s:%d)",
1390 td->name, __FILE__, __LINE__);
1391 return -1;
1392 }
1393}
1394
1395/*
1396 * This type is implemented using PER_Visible,
1397 * so here we adjust the DEF accordingly.
1398 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001399
Lev Walkin725883b2006-10-09 12:07:58 +00001400/*** <<< CTDEFS [SIZE-but-not-FROM] >>> ***/
1401
Lev Walkin0479e042017-09-26 18:39:58 -07001402static asn_per_constraints_t asn_PER_type_SIZE_but_not_FROM_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001403 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1404 { APC_CONSTRAINED, 2, 2, 1, 4 } /* (SIZE(1..4)) */,
1405 0, 0 /* No PER character map necessary */
1406};
1407
Lev Walkin59b176e2005-11-26 11:25:14 +00001408/*** <<< STAT-DEFS [SIZE-but-not-FROM] >>> ***/
1409
Lev Walkina7591b52014-10-12 18:37:35 -07001410static const ber_tlv_tag_t asn_DEF_SIZE_but_not_FROM_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001411 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1412};
Lev Walkin59b176e2005-11-26 11:25:14 +00001413asn_TYPE_descriptor_t asn_DEF_SIZE_but_not_FROM = {
1414 "SIZE-but-not-FROM",
1415 "SIZE-but-not-FROM",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001416 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001417 asn_DEF_SIZE_but_not_FROM_tags_1,
1418 sizeof(asn_DEF_SIZE_but_not_FROM_tags_1)
1419 /sizeof(asn_DEF_SIZE_but_not_FROM_tags_1[0]), /* 1 */
1420 asn_DEF_SIZE_but_not_FROM_tags_1, /* Same as above */
1421 sizeof(asn_DEF_SIZE_but_not_FROM_tags_1)
1422 /sizeof(asn_DEF_SIZE_but_not_FROM_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07001423 { 0, &asn_PER_type_SIZE_but_not_FROM_constr_1, SIZE_but_not_FROM_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00001424 0, 0, /* No members */
1425 0 /* No specifics */
1426};
1427
1428
1429/*** <<< INCLUDES [SIZE-and-FROM] >>> ***/
1430
Lev Walkin22b5ed42006-09-13 02:51:20 +00001431#include "PER-Visible.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001432
1433/*** <<< TYPE-DECLS [SIZE-and-FROM] >>> ***/
1434
1435typedef PER_Visible_t SIZE_and_FROM_t;
1436
1437/*** <<< FUNC-DECLS [SIZE-and-FROM] >>> ***/
1438
1439extern asn_TYPE_descriptor_t asn_DEF_SIZE_and_FROM;
1440asn_struct_free_f SIZE_and_FROM_free;
1441asn_struct_print_f SIZE_and_FROM_print;
1442asn_constr_check_f SIZE_and_FROM_constraint;
1443ber_type_decoder_f SIZE_and_FROM_decode_ber;
1444der_type_encoder_f SIZE_and_FROM_encode_der;
1445xer_type_decoder_f SIZE_and_FROM_decode_xer;
1446xer_type_encoder_f SIZE_and_FROM_encode_xer;
1447per_type_decoder_f SIZE_and_FROM_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001448per_type_encoder_f SIZE_and_FROM_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001449
1450/*** <<< CTABLES [SIZE-and-FROM] >>> ***/
1451
1452static int check_permitted_alphabet_1(const void *sptr) {
1453 /* The underlying type is IA5String */
1454 const IA5String_t *st = (const IA5String_t *)sptr;
1455 const uint8_t *ch = st->buf;
1456 const uint8_t *end = ch + st->size;
1457
1458 for(; ch < end; ch++) {
1459 uint8_t cv = *ch;
1460 if(!(cv >= 65 && cv <= 68)) return -1;
1461 }
1462 return 0;
1463}
1464
1465
1466/*** <<< CODE [SIZE-and-FROM] >>> ***/
1467
1468int
Lev Walkin20696a42017-10-17 21:27:33 -07001469SIZE_and_FROM_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001470 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001471 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1472 size_t size;
1473
1474 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001475 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001476 "%s: value not given (%s:%d)",
1477 td->name, __FILE__, __LINE__);
1478 return -1;
1479 }
1480
1481 size = st->size;
1482
1483 if((size >= 1 && size <= 4)
1484 && !check_permitted_alphabet_1(st)) {
1485 /* Constraint check succeeded */
1486 return 0;
1487 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001488 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001489 "%s: constraint failed (%s:%d)",
1490 td->name, __FILE__, __LINE__);
1491 return -1;
1492 }
1493}
1494
1495/*
1496 * This type is implemented using PER_Visible,
1497 * so here we adjust the DEF accordingly.
1498 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001499
Lev Walkin725883b2006-10-09 12:07:58 +00001500/*** <<< CTDEFS [SIZE-and-FROM] >>> ***/
1501
Lev Walkin0479e042017-09-26 18:39:58 -07001502static asn_per_constraints_t asn_PER_type_SIZE_and_FROM_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001503 { APC_CONSTRAINED, 2, 2, 65, 68 } /* (65..68) */,
1504 { APC_CONSTRAINED, 2, 2, 1, 4 } /* (SIZE(1..4)) */,
1505 0, 0 /* No PER character map necessary */
1506};
1507
Lev Walkin59b176e2005-11-26 11:25:14 +00001508/*** <<< STAT-DEFS [SIZE-and-FROM] >>> ***/
1509
Lev Walkina7591b52014-10-12 18:37:35 -07001510static const ber_tlv_tag_t asn_DEF_SIZE_and_FROM_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001511 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1512};
Lev Walkin59b176e2005-11-26 11:25:14 +00001513asn_TYPE_descriptor_t asn_DEF_SIZE_and_FROM = {
1514 "SIZE-and-FROM",
1515 "SIZE-and-FROM",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001516 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001517 asn_DEF_SIZE_and_FROM_tags_1,
1518 sizeof(asn_DEF_SIZE_and_FROM_tags_1)
1519 /sizeof(asn_DEF_SIZE_and_FROM_tags_1[0]), /* 1 */
1520 asn_DEF_SIZE_and_FROM_tags_1, /* Same as above */
1521 sizeof(asn_DEF_SIZE_and_FROM_tags_1)
1522 /sizeof(asn_DEF_SIZE_and_FROM_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07001523 { 0, &asn_PER_type_SIZE_and_FROM_constr_1, SIZE_and_FROM_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00001524 0, 0, /* No members */
1525 0 /* No specifics */
1526};
1527
1528
1529/*** <<< INCLUDES [Neither-SIZE-nor-FROM] >>> ***/
1530
Lev Walkin22b5ed42006-09-13 02:51:20 +00001531#include "PER-Visible.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001532
1533/*** <<< TYPE-DECLS [Neither-SIZE-nor-FROM] >>> ***/
1534
1535typedef PER_Visible_t Neither_SIZE_nor_FROM_t;
1536
1537/*** <<< FUNC-DECLS [Neither-SIZE-nor-FROM] >>> ***/
1538
1539extern asn_TYPE_descriptor_t asn_DEF_Neither_SIZE_nor_FROM;
1540asn_struct_free_f Neither_SIZE_nor_FROM_free;
1541asn_struct_print_f Neither_SIZE_nor_FROM_print;
1542asn_constr_check_f Neither_SIZE_nor_FROM_constraint;
1543ber_type_decoder_f Neither_SIZE_nor_FROM_decode_ber;
1544der_type_encoder_f Neither_SIZE_nor_FROM_encode_der;
1545xer_type_decoder_f Neither_SIZE_nor_FROM_decode_xer;
1546xer_type_encoder_f Neither_SIZE_nor_FROM_encode_xer;
1547per_type_decoder_f Neither_SIZE_nor_FROM_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001548per_type_encoder_f Neither_SIZE_nor_FROM_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001549
1550/*** <<< CTABLES [Neither-SIZE-nor-FROM] >>> ***/
1551
1552static int check_permitted_alphabet_1(const void *sptr) {
1553 /* The underlying type is IA5String */
1554 const IA5String_t *st = (const IA5String_t *)sptr;
1555 const uint8_t *ch = st->buf;
1556 const uint8_t *end = ch + st->size;
1557
1558 for(; ch < end; ch++) {
1559 uint8_t cv = *ch;
1560 if(!(cv >= 65 && cv <= 70)) return -1;
1561 }
1562 return 0;
1563}
1564
1565
1566/*** <<< CODE [Neither-SIZE-nor-FROM] >>> ***/
1567
1568int
Lev Walkin20696a42017-10-17 21:27:33 -07001569Neither_SIZE_nor_FROM_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001570 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001571 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1572
1573 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001574 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001575 "%s: value not given (%s:%d)",
1576 td->name, __FILE__, __LINE__);
1577 return -1;
1578 }
1579
1580
1581 if(!check_permitted_alphabet_1(st)) {
1582 /* Constraint check succeeded */
1583 return 0;
1584 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001585 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001586 "%s: constraint failed (%s:%d)",
1587 td->name, __FILE__, __LINE__);
1588 return -1;
1589 }
1590}
1591
1592/*
1593 * This type is implemented using PER_Visible,
1594 * so here we adjust the DEF accordingly.
1595 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001596
Lev Walkin725883b2006-10-09 12:07:58 +00001597/*** <<< CTDEFS [Neither-SIZE-nor-FROM] >>> ***/
1598
Lev Walkin0479e042017-09-26 18:39:58 -07001599static asn_per_constraints_t asn_PER_type_Neither_SIZE_nor_FROM_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001600 { APC_CONSTRAINED, 3, 3, 65, 70 } /* (65..70) */,
1601 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
1602 0, 0 /* No PER character map necessary */
1603};
1604
Lev Walkin59b176e2005-11-26 11:25:14 +00001605/*** <<< STAT-DEFS [Neither-SIZE-nor-FROM] >>> ***/
1606
Lev Walkina7591b52014-10-12 18:37:35 -07001607static const ber_tlv_tag_t asn_DEF_Neither_SIZE_nor_FROM_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001608 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1609};
Lev Walkin59b176e2005-11-26 11:25:14 +00001610asn_TYPE_descriptor_t asn_DEF_Neither_SIZE_nor_FROM = {
1611 "Neither-SIZE-nor-FROM",
1612 "Neither-SIZE-nor-FROM",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001613 &asn_OP_IA5String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001614 asn_DEF_Neither_SIZE_nor_FROM_tags_1,
1615 sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1)
1616 /sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1[0]), /* 1 */
1617 asn_DEF_Neither_SIZE_nor_FROM_tags_1, /* Same as above */
1618 sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1)
1619 /sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07001620 { 0, &asn_PER_type_Neither_SIZE_nor_FROM_constr_1, Neither_SIZE_nor_FROM_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00001621 0, 0, /* No members */
1622 0 /* No specifics */
1623};
1624
1625
1626/*** <<< INCLUDES [Utf8-4] >>> ***/
1627
1628#include <UTF8String.h>
1629
1630/*** <<< TYPE-DECLS [Utf8-4] >>> ***/
1631
1632typedef UTF8String_t Utf8_4_t;
1633
1634/*** <<< FUNC-DECLS [Utf8-4] >>> ***/
1635
1636extern asn_TYPE_descriptor_t asn_DEF_Utf8_4;
1637asn_struct_free_f Utf8_4_free;
1638asn_struct_print_f Utf8_4_print;
1639asn_constr_check_f Utf8_4_constraint;
1640ber_type_decoder_f Utf8_4_decode_ber;
1641der_type_encoder_f Utf8_4_encode_der;
1642xer_type_decoder_f Utf8_4_decode_xer;
1643xer_type_encoder_f Utf8_4_encode_xer;
1644per_type_decoder_f Utf8_4_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001645per_type_encoder_f Utf8_4_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001646
1647/*** <<< CTABLES [Utf8-4] >>> ***/
1648
1649static int check_permitted_alphabet_1(const void *sptr) {
1650 if(UTF8String_length((const UTF8String_t *)sptr) < 0)
1651 return -1; /* Alphabet (sic!) test failed. */
1652
1653 return 0;
1654}
1655
1656
1657/*** <<< CODE [Utf8-4] >>> ***/
1658
1659int
Lev Walkin20696a42017-10-17 21:27:33 -07001660Utf8_4_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001661 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001662 const UTF8String_t *st = (const UTF8String_t *)sptr;
1663
1664 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001665 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001666 "%s: value not given (%s:%d)",
1667 td->name, __FILE__, __LINE__);
1668 return -1;
1669 }
1670
1671
1672 if(!check_permitted_alphabet_1(st)) {
1673 /* Constraint check succeeded */
1674 return 0;
1675 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001676 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001677 "%s: constraint failed (%s:%d)",
1678 td->name, __FILE__, __LINE__);
1679 return -1;
1680 }
1681}
1682
1683/*
1684 * This type is implemented using UTF8String,
1685 * so here we adjust the DEF accordingly.
1686 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001687
Lev Walkin725883b2006-10-09 12:07:58 +00001688/*** <<< CTDEFS [Utf8-4] >>> ***/
1689
Lev Walkin0479e042017-09-26 18:39:58 -07001690static asn_per_constraints_t asn_PER_type_Utf8_4_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001691 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1692 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1693 0, 0 /* No PER value map */
1694};
1695
Lev Walkin59b176e2005-11-26 11:25:14 +00001696/*** <<< STAT-DEFS [Utf8-4] >>> ***/
1697
Lev Walkina7591b52014-10-12 18:37:35 -07001698static const ber_tlv_tag_t asn_DEF_Utf8_4_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001699 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
1700};
Lev Walkin59b176e2005-11-26 11:25:14 +00001701asn_TYPE_descriptor_t asn_DEF_Utf8_4 = {
1702 "Utf8-4",
1703 "Utf8-4",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001704 &asn_OP_UTF8String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001705 asn_DEF_Utf8_4_tags_1,
1706 sizeof(asn_DEF_Utf8_4_tags_1)
1707 /sizeof(asn_DEF_Utf8_4_tags_1[0]), /* 1 */
1708 asn_DEF_Utf8_4_tags_1, /* Same as above */
1709 sizeof(asn_DEF_Utf8_4_tags_1)
1710 /sizeof(asn_DEF_Utf8_4_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07001711 { 0, &asn_PER_type_Utf8_4_constr_1, Utf8_4_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00001712 0, 0, /* No members */
1713 0 /* No specifics */
1714};
1715
1716
1717/*** <<< INCLUDES [Utf8-3] >>> ***/
1718
Lev Walkin22b5ed42006-09-13 02:51:20 +00001719#include "Utf8-2.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001720
1721/*** <<< TYPE-DECLS [Utf8-3] >>> ***/
1722
1723typedef Utf8_2_t Utf8_3_t;
1724
1725/*** <<< FUNC-DECLS [Utf8-3] >>> ***/
1726
1727extern asn_TYPE_descriptor_t asn_DEF_Utf8_3;
1728asn_struct_free_f Utf8_3_free;
1729asn_struct_print_f Utf8_3_print;
1730asn_constr_check_f Utf8_3_constraint;
1731ber_type_decoder_f Utf8_3_decode_ber;
1732der_type_encoder_f Utf8_3_encode_der;
1733xer_type_decoder_f Utf8_3_decode_xer;
1734xer_type_encoder_f Utf8_3_encode_xer;
1735per_type_decoder_f Utf8_3_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001736per_type_encoder_f Utf8_3_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001737
1738/*** <<< CTABLES [Utf8-3] >>> ***/
1739
Lev Walkina7591b52014-10-12 18:37:35 -07001740static const int permitted_alphabet_table_1[128] = {
Lev Walkin5b62ca82006-09-21 01:52:07 +00001741 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
1742 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
1743 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
1744 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
1745 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15, /* ABCDEFGHIJKLMNO */
174616,17,18,19,20,21,22,23,24,25,26, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */
1747 0,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41, /* abcdefghijklmno */
174842,43,44,45,46,47,48,49,50,51,52, 0, 0, 0, 0, 0, /* pqrstuvwxyz */
Lev Walkin59b176e2005-11-26 11:25:14 +00001749};
1750
1751static int check_permitted_alphabet_1(const void *sptr) {
Lev Walkina7591b52014-10-12 18:37:35 -07001752 const int *table = permitted_alphabet_table_1;
Lev Walkin59b176e2005-11-26 11:25:14 +00001753 /* The underlying type is UTF8String */
1754 const UTF8String_t *st = (const UTF8String_t *)sptr;
1755 const uint8_t *ch = st->buf;
1756 const uint8_t *end = ch + st->size;
1757
1758 for(; ch < end; ch++) {
1759 uint8_t cv = *ch;
1760 if(cv >= 0x80) return -1;
1761 if(!table[cv]) return -1;
1762 }
1763 return 0;
1764}
1765
1766
1767/*** <<< CODE [Utf8-3] >>> ***/
1768
1769int
Lev Walkin20696a42017-10-17 21:27:33 -07001770Utf8_3_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001771 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001772 const Utf8_2_t *st = (const Utf8_2_t *)sptr;
1773 size_t size;
1774
1775 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001776 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001777 "%s: value not given (%s:%d)",
1778 td->name, __FILE__, __LINE__);
1779 return -1;
1780 }
1781
1782 size = UTF8String_length(st);
1783 if((ssize_t)size < 0) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001784 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001785 "%s: UTF-8: broken encoding (%s:%d)",
1786 td->name, __FILE__, __LINE__);
1787 return -1;
1788 }
1789
1790 if((size >= 1 && size <= 2)
1791 && !check_permitted_alphabet_1(st)) {
1792 /* Constraint check succeeded */
1793 return 0;
1794 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001795 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001796 "%s: constraint failed (%s:%d)",
1797 td->name, __FILE__, __LINE__);
1798 return -1;
1799 }
1800}
1801
1802/*
1803 * This type is implemented using Utf8_2,
1804 * so here we adjust the DEF accordingly.
1805 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001806
Lev Walkin725883b2006-10-09 12:07:58 +00001807/*** <<< CTDEFS [Utf8-3] >>> ***/
1808
Lev Walkin0479e042017-09-26 18:39:58 -07001809static asn_per_constraints_t asn_PER_type_Utf8_3_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001810 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1811 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1812 0, 0 /* No PER value map */
1813};
1814
Lev Walkin59b176e2005-11-26 11:25:14 +00001815/*** <<< STAT-DEFS [Utf8-3] >>> ***/
1816
Lev Walkina7591b52014-10-12 18:37:35 -07001817static const ber_tlv_tag_t asn_DEF_Utf8_3_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001818 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
1819};
Lev Walkin59b176e2005-11-26 11:25:14 +00001820asn_TYPE_descriptor_t asn_DEF_Utf8_3 = {
1821 "Utf8-3",
1822 "Utf8-3",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001823 &asn_OP_UTF8String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001824 asn_DEF_Utf8_3_tags_1,
1825 sizeof(asn_DEF_Utf8_3_tags_1)
1826 /sizeof(asn_DEF_Utf8_3_tags_1[0]), /* 1 */
1827 asn_DEF_Utf8_3_tags_1, /* Same as above */
1828 sizeof(asn_DEF_Utf8_3_tags_1)
1829 /sizeof(asn_DEF_Utf8_3_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07001830 { 0, &asn_PER_type_Utf8_3_constr_1, Utf8_3_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00001831 0, 0, /* No members */
1832 0 /* No specifics */
1833};
1834
1835
1836/*** <<< INCLUDES [Utf8-2] >>> ***/
1837
Lev Walkin22b5ed42006-09-13 02:51:20 +00001838#include "Utf8-1.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001839
1840/*** <<< TYPE-DECLS [Utf8-2] >>> ***/
1841
1842typedef Utf8_1_t Utf8_2_t;
1843
1844/*** <<< FUNC-DECLS [Utf8-2] >>> ***/
1845
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08001846extern asn_per_constraints_t asn_PER_type_Utf8_2_constr_1;
Lev Walkin59b176e2005-11-26 11:25:14 +00001847extern asn_TYPE_descriptor_t asn_DEF_Utf8_2;
1848asn_struct_free_f Utf8_2_free;
1849asn_struct_print_f Utf8_2_print;
1850asn_constr_check_f Utf8_2_constraint;
1851ber_type_decoder_f Utf8_2_decode_ber;
1852der_type_encoder_f Utf8_2_encode_der;
1853xer_type_decoder_f Utf8_2_decode_xer;
1854xer_type_encoder_f Utf8_2_encode_xer;
1855per_type_decoder_f Utf8_2_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001856per_type_encoder_f Utf8_2_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001857
1858/*** <<< CODE [Utf8-2] >>> ***/
1859
1860int
Lev Walkin20696a42017-10-17 21:27:33 -07001861Utf8_2_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001862 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001863 const Utf8_1_t *st = (const Utf8_1_t *)sptr;
1864 size_t size;
1865
1866 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001867 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001868 "%s: value not given (%s:%d)",
1869 td->name, __FILE__, __LINE__);
1870 return -1;
1871 }
1872
1873 size = UTF8String_length(st);
1874 if((ssize_t)size < 0) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001875 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001876 "%s: UTF-8: broken encoding (%s:%d)",
1877 td->name, __FILE__, __LINE__);
1878 return -1;
1879 }
1880
1881 if((size >= 1 && size <= 2)) {
1882 /* Constraint check succeeded */
1883 return 0;
1884 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001885 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001886 "%s: constraint failed (%s:%d)",
1887 td->name, __FILE__, __LINE__);
1888 return -1;
1889 }
1890}
1891
1892/*
1893 * This type is implemented using Utf8_1,
1894 * so here we adjust the DEF accordingly.
1895 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001896
Lev Walkin725883b2006-10-09 12:07:58 +00001897/*** <<< CTDEFS [Utf8-2] >>> ***/
1898
Lev Walkin0479e042017-09-26 18:39:58 -07001899asn_per_constraints_t asn_PER_type_Utf8_2_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001900 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1901 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1902 0, 0 /* No PER value map */
1903};
1904
Lev Walkin59b176e2005-11-26 11:25:14 +00001905/*** <<< STAT-DEFS [Utf8-2] >>> ***/
1906
Lev Walkina7591b52014-10-12 18:37:35 -07001907static const ber_tlv_tag_t asn_DEF_Utf8_2_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001908 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
1909};
Lev Walkin59b176e2005-11-26 11:25:14 +00001910asn_TYPE_descriptor_t asn_DEF_Utf8_2 = {
1911 "Utf8-2",
1912 "Utf8-2",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001913 &asn_OP_UTF8String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001914 asn_DEF_Utf8_2_tags_1,
1915 sizeof(asn_DEF_Utf8_2_tags_1)
1916 /sizeof(asn_DEF_Utf8_2_tags_1[0]), /* 1 */
1917 asn_DEF_Utf8_2_tags_1, /* Same as above */
1918 sizeof(asn_DEF_Utf8_2_tags_1)
1919 /sizeof(asn_DEF_Utf8_2_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07001920 { 0, &asn_PER_type_Utf8_2_constr_1, Utf8_2_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00001921 0, 0, /* No members */
1922 0 /* No specifics */
1923};
1924
1925
1926/*** <<< INCLUDES [Utf8-1] >>> ***/
1927
1928#include <UTF8String.h>
1929
1930/*** <<< TYPE-DECLS [Utf8-1] >>> ***/
1931
1932typedef UTF8String_t Utf8_1_t;
1933
1934/*** <<< FUNC-DECLS [Utf8-1] >>> ***/
1935
1936extern asn_TYPE_descriptor_t asn_DEF_Utf8_1;
1937asn_struct_free_f Utf8_1_free;
1938asn_struct_print_f Utf8_1_print;
1939asn_constr_check_f Utf8_1_constraint;
1940ber_type_decoder_f Utf8_1_decode_ber;
1941der_type_encoder_f Utf8_1_encode_der;
1942xer_type_decoder_f Utf8_1_decode_xer;
1943xer_type_encoder_f Utf8_1_encode_xer;
1944per_type_decoder_f Utf8_1_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001945per_type_encoder_f Utf8_1_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001946
1947/*** <<< CODE [Utf8-1] >>> ***/
1948
Lev Walkin59b176e2005-11-26 11:25:14 +00001949/*
1950 * This type is implemented using UTF8String,
1951 * so here we adjust the DEF accordingly.
1952 */
Lev Walkin59b176e2005-11-26 11:25:14 +00001953
1954/*** <<< STAT-DEFS [Utf8-1] >>> ***/
1955
Lev Walkina7591b52014-10-12 18:37:35 -07001956static const ber_tlv_tag_t asn_DEF_Utf8_1_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001957 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
1958};
1959asn_TYPE_descriptor_t asn_DEF_Utf8_1 = {
1960 "Utf8-1",
1961 "Utf8-1",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08001962 &asn_OP_UTF8String,
Lev Walkin59b176e2005-11-26 11:25:14 +00001963 asn_DEF_Utf8_1_tags_1,
1964 sizeof(asn_DEF_Utf8_1_tags_1)
1965 /sizeof(asn_DEF_Utf8_1_tags_1[0]), /* 1 */
1966 asn_DEF_Utf8_1_tags_1, /* Same as above */
1967 sizeof(asn_DEF_Utf8_1_tags_1)
1968 /sizeof(asn_DEF_Utf8_1_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07001969 { 0, 0, UTF8String_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00001970 0, 0, /* No members */
1971 0 /* No specifics */
1972};
1973
1974
1975/*** <<< INCLUDES [VisibleIdentifier] >>> ***/
1976
Lev Walkin22b5ed42006-09-13 02:51:20 +00001977#include "Identifier.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00001978
1979/*** <<< TYPE-DECLS [VisibleIdentifier] >>> ***/
1980
1981typedef Identifier_t VisibleIdentifier_t;
1982
1983/*** <<< FUNC-DECLS [VisibleIdentifier] >>> ***/
1984
1985extern asn_TYPE_descriptor_t asn_DEF_VisibleIdentifier;
1986asn_struct_free_f VisibleIdentifier_free;
1987asn_struct_print_f VisibleIdentifier_print;
1988asn_constr_check_f VisibleIdentifier_constraint;
1989ber_type_decoder_f VisibleIdentifier_decode_ber;
1990der_type_encoder_f VisibleIdentifier_encode_der;
1991xer_type_decoder_f VisibleIdentifier_decode_xer;
1992xer_type_encoder_f VisibleIdentifier_encode_xer;
1993per_type_decoder_f VisibleIdentifier_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001994per_type_encoder_f VisibleIdentifier_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001995
1996/*** <<< CTABLES [VisibleIdentifier] >>> ***/
1997
Lev Walkina7591b52014-10-12 18:37:35 -07001998static const int permitted_alphabet_table_1[256] = {
Lev Walkin5b62ca82006-09-21 01:52:07 +00001999 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
2000 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
2001 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* $ */
2002 2, 3, 4, 5, 6, 7, 8, 9,10,11, 0, 0, 0, 0, 0, 0, /* 0123456789 */
2003 0,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26, /* ABCDEFGHIJKLMNO */
200427,28,29,30,31,32,33,34,35,36,37, 0, 0, 0, 0,38, /* PQRSTUVWXYZ _ */
2005 0,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53, /* abcdefghijklmno */
200654,55,56,57,58,59,60,61,62,63,64, 0, 0, 0, 0, 0, /* pqrstuvwxyz */
Lev Walkin59b176e2005-11-26 11:25:14 +00002007};
Lev Walkina7591b52014-10-12 18:37:35 -07002008static const int permitted_alphabet_code2value_1[64] = {
Lev Walkin5b62ca82006-09-21 01:52:07 +0000200936,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,
201070,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,
201186,87,88,89,90,95,97,98,99,100,101,102,103,104,105,106,
2012107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,
2013};
2014
Lev Walkin59b176e2005-11-26 11:25:14 +00002015
2016static int check_permitted_alphabet_1(const void *sptr) {
Lev Walkina7591b52014-10-12 18:37:35 -07002017 const int *table = permitted_alphabet_table_1;
Lev Walkin59b176e2005-11-26 11:25:14 +00002018 /* The underlying type is VisibleString */
2019 const VisibleString_t *st = (const VisibleString_t *)sptr;
2020 const uint8_t *ch = st->buf;
2021 const uint8_t *end = ch + st->size;
2022
2023 for(; ch < end; ch++) {
2024 uint8_t cv = *ch;
2025 if(!table[cv]) return -1;
2026 }
2027 return 0;
2028}
2029
2030
2031/*** <<< CODE [VisibleIdentifier] >>> ***/
2032
2033int
Lev Walkin20696a42017-10-17 21:27:33 -07002034VisibleIdentifier_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002035 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002036 const Identifier_t *st = (const Identifier_t *)sptr;
2037 size_t size;
2038
2039 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002040 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002041 "%s: value not given (%s:%d)",
2042 td->name, __FILE__, __LINE__);
2043 return -1;
2044 }
2045
2046 size = st->size;
2047
2048 if((size >= 1 && size <= 32)
2049 && !check_permitted_alphabet_1(st)) {
2050 /* Constraint check succeeded */
2051 return 0;
2052 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002053 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002054 "%s: constraint failed (%s:%d)",
2055 td->name, __FILE__, __LINE__);
2056 return -1;
2057 }
2058}
2059
Lev Walkin135d7dd2017-08-28 00:21:38 -07002060static int asn_PER_MAP_VisibleIdentifier_1_v2c(unsigned int value) {
2061 if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0]))
2062 return -1;
2063 return permitted_alphabet_table_1[value] - 1;
2064}
2065static int asn_PER_MAP_VisibleIdentifier_1_c2v(unsigned int code) {
2066 if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0]))
2067 return -1;
2068 return permitted_alphabet_code2value_1[code];
2069}
Lev Walkin59b176e2005-11-26 11:25:14 +00002070/*
2071 * This type is implemented using Identifier,
2072 * so here we adjust the DEF accordingly.
2073 */
Lev Walkin59b176e2005-11-26 11:25:14 +00002074
Lev Walkin135d7dd2017-08-28 00:21:38 -07002075/*** <<< CTDEFS [VisibleIdentifier] >>> ***/
2076
Lev Walkin0479e042017-09-26 18:39:58 -07002077static asn_per_constraints_t asn_PER_type_VisibleIdentifier_constr_1 CC_NOTUSED = {
Lev Walkin135d7dd2017-08-28 00:21:38 -07002078 { APC_CONSTRAINED, 6, 6, 36, 122 } /* (36..122) */,
2079 { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */,
2080 asn_PER_MAP_VisibleIdentifier_1_v2c, /* Value to PER code map */
2081 asn_PER_MAP_VisibleIdentifier_1_c2v /* PER code to value map */
2082};
2083
Lev Walkin59b176e2005-11-26 11:25:14 +00002084/*** <<< STAT-DEFS [VisibleIdentifier] >>> ***/
2085
Lev Walkina7591b52014-10-12 18:37:35 -07002086static const ber_tlv_tag_t asn_DEF_VisibleIdentifier_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002087 (ASN_TAG_CLASS_UNIVERSAL | (26 << 2))
2088};
2089asn_TYPE_descriptor_t asn_DEF_VisibleIdentifier = {
2090 "VisibleIdentifier",
2091 "VisibleIdentifier",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08002092 &asn_OP_VisibleString,
Lev Walkin59b176e2005-11-26 11:25:14 +00002093 asn_DEF_VisibleIdentifier_tags_1,
2094 sizeof(asn_DEF_VisibleIdentifier_tags_1)
2095 /sizeof(asn_DEF_VisibleIdentifier_tags_1[0]), /* 1 */
2096 asn_DEF_VisibleIdentifier_tags_1, /* Same as above */
2097 sizeof(asn_DEF_VisibleIdentifier_tags_1)
2098 /sizeof(asn_DEF_VisibleIdentifier_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07002099 { 0, &asn_PER_type_VisibleIdentifier_constr_1, VisibleIdentifier_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00002100 0, 0, /* No members */
2101 0 /* No specifics */
2102};
2103
2104
2105/*** <<< INCLUDES [Sequence] >>> ***/
2106
Lev Walkin22b5ed42006-09-13 02:51:20 +00002107#include "Int1.h"
2108#include "Int4.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00002109#include <BOOLEAN.h>
Lev Walkin2a744a72013-03-27 01:56:23 -07002110#include <NativeEnumerated.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00002111#include <NULL.h>
Lev Walkin22b5ed42006-09-13 02:51:20 +00002112#include "Int5.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00002113#include <constr_SEQUENCE.h>
2114
2115/*** <<< DEPS [Sequence] >>> ***/
2116
2117typedef enum enum_c {
2118 enum_c_one = 1,
2119 enum_c_two = 2,
2120 /*
2121 * Enumeration is extensible
2122 */
2123 enum_c_three = 3
Lev Walkin171487e2006-03-21 07:25:18 +00002124} e_enum_c;
Lev Walkin59b176e2005-11-26 11:25:14 +00002125
2126/*** <<< TYPE-DECLS [Sequence] >>> ***/
2127
2128typedef struct Sequence {
2129 Int1_t *int1_c /* DEFAULT 3 */;
2130 Int4_t int4;
2131 Int4_t int4_c;
Lev Walkin2a744a72013-03-27 01:56:23 -07002132 BOOLEAN_t *Bool /* DEFAULT 1 */;
2133 long enum_c;
Lev Walkin59b176e2005-11-26 11:25:14 +00002134 NULL_t *null /* OPTIONAL */;
2135 /*
2136 * This type is extensible,
2137 * possible extensions are below.
2138 */
2139 Int5_t *int5_c /* OPTIONAL */;
2140
2141 /* Context for parsing across buffer boundaries */
2142 asn_struct_ctx_t _asn_ctx;
2143} Sequence_t;
2144
2145/*** <<< FUNC-DECLS [Sequence] >>> ***/
2146
2147/* extern asn_TYPE_descriptor_t asn_DEF_enum_c_6; // (Use -fall-defs-global to expose) */
2148extern asn_TYPE_descriptor_t asn_DEF_Sequence;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08002149extern asn_SEQUENCE_specifics_t asn_SPC_Sequence_specs_1;
2150extern asn_TYPE_member_t asn_MBR_Sequence_1[7];
Lev Walkin59b176e2005-11-26 11:25:14 +00002151
2152/*** <<< CODE [Sequence] >>> ***/
2153
Lev Walkin59b176e2005-11-26 11:25:14 +00002154/*
Lev Walkin2a744a72013-03-27 01:56:23 -07002155 * This type is implemented using NativeEnumerated,
Lev Walkin59b176e2005-11-26 11:25:14 +00002156 * so here we adjust the DEF accordingly.
2157 */
Lev Walkin59b176e2005-11-26 11:25:14 +00002158static int
Lev Walkin20696a42017-10-17 21:27:33 -07002159memb_int1_c_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002160 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002161 long value;
2162
2163 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002164 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002165 "%s: value not given (%s:%d)",
2166 td->name, __FILE__, __LINE__);
2167 return -1;
2168 }
2169
Lev Walkin2a744a72013-03-27 01:56:23 -07002170 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +00002171
2172 if((value >= -2)) {
2173 /* Constraint check succeeded */
2174 return 0;
2175 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002176 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002177 "%s: constraint failed (%s:%d)",
2178 td->name, __FILE__, __LINE__);
2179 return -1;
2180 }
2181}
2182
2183static int
Lev Walkin20696a42017-10-17 21:27:33 -07002184memb_int4_c_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002185 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002186 long value;
2187
2188 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002189 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002190 "%s: value not given (%s:%d)",
2191 td->name, __FILE__, __LINE__);
2192 return -1;
2193 }
2194
Lev Walkin2a744a72013-03-27 01:56:23 -07002195 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +00002196
2197 if((value >= 5 && value <= 7)) {
2198 /* Constraint check succeeded */
2199 return 0;
2200 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002201 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002202 "%s: constraint failed (%s:%d)",
2203 td->name, __FILE__, __LINE__);
2204 return -1;
2205 }
2206}
2207
2208static int
Lev Walkin20696a42017-10-17 21:27:33 -07002209memb_int5_c_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002210 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002211 long value;
2212
2213 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002214 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002215 "%s: value not given (%s:%d)",
2216 td->name, __FILE__, __LINE__);
2217 return -1;
2218 }
2219
Lev Walkin2a744a72013-03-27 01:56:23 -07002220 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +00002221
2222 if((value == 5)) {
2223 /* Constraint check succeeded */
2224 return 0;
2225 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002226 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002227 "%s: constraint failed (%s:%d)",
2228 td->name, __FILE__, __LINE__);
2229 return -1;
2230 }
2231}
2232
2233
Lev Walkin725883b2006-10-09 12:07:58 +00002234/*** <<< CTDEFS [Sequence] >>> ***/
2235
Lev Walkin0479e042017-09-26 18:39:58 -07002236static asn_per_constraints_t asn_PER_type_enum_c_constr_6 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002237 { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */,
2238 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2239 0, 0 /* No PER value map */
2240};
Lev Walkin0479e042017-09-26 18:39:58 -07002241static asn_per_constraints_t asn_PER_memb_int1_c_constr_2 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002242 { APC_SEMI_CONSTRAINED, -1, -1, -2, 0 } /* (-2..MAX) */,
2243 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2244 0, 0 /* No PER value map */
2245};
Lev Walkin0479e042017-09-26 18:39:58 -07002246static asn_per_constraints_t asn_PER_memb_int4_c_constr_4 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002247 { APC_CONSTRAINED, 2, 2, 5, 7 } /* (5..7) */,
2248 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2249 0, 0 /* No PER value map */
2250};
Lev Walkin0479e042017-09-26 18:39:58 -07002251static asn_per_constraints_t asn_PER_memb_int5_c_constr_13 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002252 { APC_CONSTRAINED, 0, 0, 5, 5 } /* (5..5) */,
2253 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2254 0, 0 /* No PER value map */
2255};
2256
Lev Walkin59b176e2005-11-26 11:25:14 +00002257/*** <<< STAT-DEFS [Sequence] >>> ***/
2258
Lev Walkin20696a42017-10-17 21:27:33 -07002259static int asn_DFL_2_cmp_3(const void *sptr) {
2260 const Int1_t *st = sptr;
2261
2262 if(!st) {
2263 return -1; /* No value is not a default value */
2264 }
2265
2266 /* Test default value 3 */
2267 return (*st != 3);
2268}
2269static int asn_DFL_2_set_3(void **sptr) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002270 Int1_t *st = *sptr;
2271
2272 if(!st) {
2273 st = (*sptr = CALLOC(1, sizeof(*st)));
2274 if(!st) return -1;
2275 }
2276
Lev Walkin20696a42017-10-17 21:27:33 -07002277 /* Install default value 3 */
2278 *st = 3;
2279 return 0;
Lev Walkin59b176e2005-11-26 11:25:14 +00002280}
Lev Walkin20696a42017-10-17 21:27:33 -07002281static int asn_DFL_5_cmp_1(const void *sptr) {
2282 const BOOLEAN_t *st = sptr;
2283
2284 if(!st) {
2285 return -1; /* No value is not a default value */
2286 }
2287
2288 /* Test default value 1 */
2289 return (*st != 1);
2290}
2291static int asn_DFL_5_set_1(void **sptr) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002292 BOOLEAN_t *st = *sptr;
2293
2294 if(!st) {
2295 st = (*sptr = CALLOC(1, sizeof(*st)));
2296 if(!st) return -1;
2297 }
2298
Lev Walkin20696a42017-10-17 21:27:33 -07002299 /* Install default value 1 */
2300 *st = 1;
2301 return 0;
Lev Walkin59b176e2005-11-26 11:25:14 +00002302}
Lev Walkina7591b52014-10-12 18:37:35 -07002303static const asn_INTEGER_enum_map_t asn_MAP_enum_c_value2enum_6[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002304 { 1, 3, "one" },
2305 { 2, 3, "two" },
2306 { 3, 5, "three" }
2307 /* This list is extensible */
2308};
Lev Walkina7591b52014-10-12 18:37:35 -07002309static const unsigned int asn_MAP_enum_c_enum2value_6[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002310 0, /* one(1) */
2311 2, /* three(3) */
2312 1 /* two(2) */
2313 /* This list is extensible */
2314};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08002315static const asn_INTEGER_specifics_t asn_SPC_enum_c_specs_6 = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002316 asn_MAP_enum_c_value2enum_6, /* "tag" => N; sorted by tag */
2317 asn_MAP_enum_c_enum2value_6, /* N => "tag"; sorted by N */
2318 3, /* Number of elements in the maps */
2319 3, /* Extensions before this member */
Lev Walkin8bb57a22007-12-03 13:41:36 +00002320 1, /* Strict enumeration */
2321 0, /* Native long size */
2322 0
Lev Walkin59b176e2005-11-26 11:25:14 +00002323};
Lev Walkina7591b52014-10-12 18:37:35 -07002324static const ber_tlv_tag_t asn_DEF_enum_c_tags_6[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002325 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
2326};
Lev Walkin59b176e2005-11-26 11:25:14 +00002327static /* Use -fall-defs-global to expose */
2328asn_TYPE_descriptor_t asn_DEF_enum_c_6 = {
2329 "enum-c",
2330 "enum-c",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08002331 &asn_OP_NativeEnumerated,
Lev Walkin59b176e2005-11-26 11:25:14 +00002332 asn_DEF_enum_c_tags_6,
2333 sizeof(asn_DEF_enum_c_tags_6)
2334 /sizeof(asn_DEF_enum_c_tags_6[0]), /* 1 */
2335 asn_DEF_enum_c_tags_6, /* Same as above */
2336 sizeof(asn_DEF_enum_c_tags_6)
2337 /sizeof(asn_DEF_enum_c_tags_6[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07002338 { 0, &asn_PER_type_enum_c_constr_6, NativeEnumerated_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00002339 0, 0, /* Defined elsewhere */
2340 &asn_SPC_enum_c_specs_6 /* Additional specs */
2341};
2342
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08002343asn_TYPE_member_t asn_MBR_Sequence_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002344 { ATF_POINTER, 1, offsetof(struct Sequence, int1_c),
2345 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
2346 .tag_mode = 0,
2347 .type = &asn_DEF_Int1,
Lev Walkin67a30122017-08-10 05:48:54 -07002348 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -07002349 { .oer_constraints = 0, .per_constraints = &asn_PER_memb_int1_c_constr_2, .general_constraints = memb_int1_c_constraint_1 },
Lev Walkinb37ee632017-10-18 16:52:18 -07002350 .default_value_cmp = &asn_DFL_2_cmp_3, /* Compare DEFAULT 3 */
2351 .default_value_set = &asn_DFL_2_set_3, /* Set DEFAULT 3 */
Lev Walkin59b176e2005-11-26 11:25:14 +00002352 .name = "int1-c"
2353 },
2354 { ATF_NOFLAGS, 0, offsetof(struct Sequence, int4),
2355 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
2356 .tag_mode = +1, /* EXPLICIT tag at current level */
2357 .type = &asn_DEF_Int4,
Lev Walkin67a30122017-08-10 05:48:54 -07002358 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -07002359 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -07002360 0, 0, /* No default value */
Lev Walkin59b176e2005-11-26 11:25:14 +00002361 .name = "int4"
2362 },
2363 { ATF_NOFLAGS, 0, offsetof(struct Sequence, int4_c),
2364 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
2365 .tag_mode = 0,
2366 .type = &asn_DEF_Int4,
Lev Walkin67a30122017-08-10 05:48:54 -07002367 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -07002368 { .oer_constraints = 0, .per_constraints = &asn_PER_memb_int4_c_constr_4, .general_constraints = memb_int4_c_constraint_1 },
Lev Walkin20696a42017-10-17 21:27:33 -07002369 0, 0, /* No default value */
Lev Walkin59b176e2005-11-26 11:25:14 +00002370 .name = "int4-c"
2371 },
Lev Walkin2a744a72013-03-27 01:56:23 -07002372 { ATF_POINTER, 1, offsetof(struct Sequence, Bool),
Lev Walkin59b176e2005-11-26 11:25:14 +00002373 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
2374 .tag_mode = 0,
2375 .type = &asn_DEF_BOOLEAN,
Lev Walkin67a30122017-08-10 05:48:54 -07002376 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -07002377 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkinb37ee632017-10-18 16:52:18 -07002378 .default_value_cmp = &asn_DFL_5_cmp_1, /* Compare DEFAULT 1 */
2379 .default_value_set = &asn_DFL_5_set_1, /* Set DEFAULT 1 */
Lev Walkin59b176e2005-11-26 11:25:14 +00002380 .name = "bool"
2381 },
2382 { ATF_NOFLAGS, 0, offsetof(struct Sequence, enum_c),
2383 .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
2384 .tag_mode = 0,
2385 .type = &asn_DEF_enum_c_6,
Lev Walkin67a30122017-08-10 05:48:54 -07002386 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -07002387 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -07002388 0, 0, /* No default value */
Lev Walkin59b176e2005-11-26 11:25:14 +00002389 .name = "enum-c"
2390 },
2391 { ATF_POINTER, 2, offsetof(struct Sequence, null),
2392 .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)),
2393 .tag_mode = 0,
2394 .type = &asn_DEF_NULL,
Lev Walkin67a30122017-08-10 05:48:54 -07002395 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -07002396 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -07002397 0, 0, /* No default value */
Lev Walkin59b176e2005-11-26 11:25:14 +00002398 .name = "null"
2399 },
2400 { ATF_POINTER, 1, offsetof(struct Sequence, int5_c),
2401 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
2402 .tag_mode = 0,
2403 .type = &asn_DEF_Int5,
Lev Walkin67a30122017-08-10 05:48:54 -07002404 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -07002405 { .oer_constraints = 0, .per_constraints = &asn_PER_memb_int5_c_constr_13, .general_constraints = memb_int5_c_constraint_1 },
Lev Walkin20696a42017-10-17 21:27:33 -07002406 0, 0, /* No default value */
Lev Walkin59b176e2005-11-26 11:25:14 +00002407 .name = "int5-c"
2408 },
2409};
Lev Walkina7591b52014-10-12 18:37:35 -07002410static const int asn_MAP_Sequence_oms_1[] = { 0, 3, 5, 6 };
2411static const ber_tlv_tag_t asn_DEF_Sequence_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002412 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
2413};
Lev Walkina7591b52014-10-12 18:37:35 -07002414static const asn_TYPE_tag2member_t asn_MAP_Sequence_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -07002415 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool */
2416 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2 }, /* int1-c */
2417 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -1, 1 }, /* int4-c */
2418 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 6, -2, 0 }, /* int5-c */
2419 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 5, 0, 0 }, /* null */
2420 { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 4, 0, 0 }, /* enum-c */
2421 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 } /* int4 */
Lev Walkin59b176e2005-11-26 11:25:14 +00002422};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08002423asn_SEQUENCE_specifics_t asn_SPC_Sequence_specs_1 = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002424 sizeof(struct Sequence),
2425 offsetof(struct Sequence, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -07002426 .tag2el = asn_MAP_Sequence_tag2el_1,
2427 .tag2el_count = 7, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +00002428 asn_MAP_Sequence_oms_1, /* Optional members */
2429 3, 1, /* Root/Additions */
2430 5, /* Start extensions */
2431 8 /* Stop extensions */
2432};
2433asn_TYPE_descriptor_t asn_DEF_Sequence = {
2434 "Sequence",
2435 "Sequence",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08002436 &asn_OP_SEQUENCE,
Lev Walkin59b176e2005-11-26 11:25:14 +00002437 asn_DEF_Sequence_tags_1,
2438 sizeof(asn_DEF_Sequence_tags_1)
2439 /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
2440 asn_DEF_Sequence_tags_1, /* Same as above */
2441 sizeof(asn_DEF_Sequence_tags_1)
2442 /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07002443 { 0, 0, SEQUENCE_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00002444 asn_MBR_Sequence_1,
2445 7, /* Elements count */
2446 &asn_SPC_Sequence_specs_1 /* Additional specs */
2447};
2448
2449
2450/*** <<< INCLUDES [SequenceOf] >>> ***/
2451
2452#include <asn_SEQUENCE_OF.h>
2453#include <constr_SEQUENCE_OF.h>
2454
2455/*** <<< FWD-DECLS [SequenceOf] >>> ***/
2456
2457struct Sequence;
2458
2459/*** <<< TYPE-DECLS [SequenceOf] >>> ***/
2460
2461typedef struct SequenceOf {
2462 A_SEQUENCE_OF(struct Sequence) list;
2463
2464 /* Context for parsing across buffer boundaries */
2465 asn_struct_ctx_t _asn_ctx;
2466} SequenceOf_t;
2467
2468/*** <<< FUNC-DECLS [SequenceOf] >>> ***/
2469
2470extern asn_TYPE_descriptor_t asn_DEF_SequenceOf;
2471
2472/*** <<< POST-INCLUDE [SequenceOf] >>> ***/
2473
Lev Walkin22b5ed42006-09-13 02:51:20 +00002474#include "Sequence.h"
Lev Walkin59b176e2005-11-26 11:25:14 +00002475
Lev Walkin725883b2006-10-09 12:07:58 +00002476/*** <<< CTDEFS [SequenceOf] >>> ***/
2477
Lev Walkin0479e042017-09-26 18:39:58 -07002478static asn_per_constraints_t asn_PER_type_SequenceOf_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002479 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2480 { APC_CONSTRAINED, 1, 1, 1, 2 } /* (SIZE(1..2)) */,
2481 0, 0 /* No PER value map */
2482};
2483
Lev Walkin59b176e2005-11-26 11:25:14 +00002484/*** <<< STAT-DEFS [SequenceOf] >>> ***/
2485
2486static asn_TYPE_member_t asn_MBR_SequenceOf_1[] = {
2487 { ATF_POINTER, 0, 0,
2488 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
2489 .tag_mode = 0,
2490 .type = &asn_DEF_Sequence,
Lev Walkin67a30122017-08-10 05:48:54 -07002491 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -07002492 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -07002493 0, 0, /* No default value */
Lev Walkin59b176e2005-11-26 11:25:14 +00002494 .name = ""
2495 },
2496};
Lev Walkina7591b52014-10-12 18:37:35 -07002497static const ber_tlv_tag_t asn_DEF_SequenceOf_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002498 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
2499};
2500static asn_SET_OF_specifics_t asn_SPC_SequenceOf_specs_1 = {
2501 sizeof(struct SequenceOf),
2502 offsetof(struct SequenceOf, _asn_ctx),
2503 0, /* XER encoding is XMLDelimitedItemList */
2504};
Lev Walkin59b176e2005-11-26 11:25:14 +00002505asn_TYPE_descriptor_t asn_DEF_SequenceOf = {
2506 "SequenceOf",
2507 "SequenceOf",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08002508 &asn_OP_SEQUENCE_OF,
Lev Walkin59b176e2005-11-26 11:25:14 +00002509 asn_DEF_SequenceOf_tags_1,
2510 sizeof(asn_DEF_SequenceOf_tags_1)
2511 /sizeof(asn_DEF_SequenceOf_tags_1[0]), /* 1 */
2512 asn_DEF_SequenceOf_tags_1, /* Same as above */
2513 sizeof(asn_DEF_SequenceOf_tags_1)
2514 /sizeof(asn_DEF_SequenceOf_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07002515 { 0, &asn_PER_type_SequenceOf_constr_1, SEQUENCE_OF_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00002516 asn_MBR_SequenceOf_1,
2517 1, /* Single element */
2518 &asn_SPC_SequenceOf_specs_1 /* Additional specs */
2519};
2520
2521
2522/*** <<< INCLUDES [Enum0] >>> ***/
2523
Lev Walkin2a744a72013-03-27 01:56:23 -07002524#include <NativeEnumerated.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00002525
2526/*** <<< DEPS [Enum0] >>> ***/
2527
2528typedef enum Enum0 {
2529 Enum0_one = 0,
2530 Enum0_two = 1
Lev Walkin171487e2006-03-21 07:25:18 +00002531} e_Enum0;
Lev Walkin59b176e2005-11-26 11:25:14 +00002532
2533/*** <<< TYPE-DECLS [Enum0] >>> ***/
2534
Lev Walkin2a744a72013-03-27 01:56:23 -07002535typedef long Enum0_t;
Lev Walkin59b176e2005-11-26 11:25:14 +00002536
2537/*** <<< FUNC-DECLS [Enum0] >>> ***/
2538
2539extern asn_TYPE_descriptor_t asn_DEF_Enum0;
2540asn_struct_free_f Enum0_free;
2541asn_struct_print_f Enum0_print;
2542asn_constr_check_f Enum0_constraint;
2543ber_type_decoder_f Enum0_decode_ber;
2544der_type_encoder_f Enum0_encode_der;
2545xer_type_decoder_f Enum0_decode_xer;
2546xer_type_encoder_f Enum0_encode_xer;
2547per_type_decoder_f Enum0_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002548per_type_encoder_f Enum0_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002549
2550/*** <<< CODE [Enum0] >>> ***/
2551
Lev Walkin59b176e2005-11-26 11:25:14 +00002552/*
Lev Walkin2a744a72013-03-27 01:56:23 -07002553 * This type is implemented using NativeEnumerated,
Lev Walkin59b176e2005-11-26 11:25:14 +00002554 * so here we adjust the DEF accordingly.
2555 */
Lev Walkin59b176e2005-11-26 11:25:14 +00002556
Lev Walkin725883b2006-10-09 12:07:58 +00002557/*** <<< CTDEFS [Enum0] >>> ***/
2558
Lev Walkin0479e042017-09-26 18:39:58 -07002559static asn_per_constraints_t asn_PER_type_Enum0_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002560 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
2561 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2562 0, 0 /* No PER value map */
2563};
2564
Lev Walkin59b176e2005-11-26 11:25:14 +00002565/*** <<< STAT-DEFS [Enum0] >>> ***/
2566
Lev Walkina7591b52014-10-12 18:37:35 -07002567static const asn_INTEGER_enum_map_t asn_MAP_Enum0_value2enum_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002568 { 0, 3, "one" },
2569 { 1, 3, "two" }
2570};
Lev Walkina7591b52014-10-12 18:37:35 -07002571static const unsigned int asn_MAP_Enum0_enum2value_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002572 0, /* one(0) */
2573 1 /* two(1) */
2574};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08002575static const asn_INTEGER_specifics_t asn_SPC_Enum0_specs_1 = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002576 asn_MAP_Enum0_value2enum_1, /* "tag" => N; sorted by tag */
2577 asn_MAP_Enum0_enum2value_1, /* N => "tag"; sorted by N */
2578 2, /* Number of elements in the maps */
2579 0, /* Enumeration is not extensible */
Lev Walkin8bb57a22007-12-03 13:41:36 +00002580 1, /* Strict enumeration */
2581 0, /* Native long size */
2582 0
Lev Walkin59b176e2005-11-26 11:25:14 +00002583};
Lev Walkina7591b52014-10-12 18:37:35 -07002584static const ber_tlv_tag_t asn_DEF_Enum0_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002585 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
2586};
Lev Walkin59b176e2005-11-26 11:25:14 +00002587asn_TYPE_descriptor_t asn_DEF_Enum0 = {
2588 "Enum0",
2589 "Enum0",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08002590 &asn_OP_NativeEnumerated,
Lev Walkin59b176e2005-11-26 11:25:14 +00002591 asn_DEF_Enum0_tags_1,
2592 sizeof(asn_DEF_Enum0_tags_1)
2593 /sizeof(asn_DEF_Enum0_tags_1[0]), /* 1 */
2594 asn_DEF_Enum0_tags_1, /* Same as above */
2595 sizeof(asn_DEF_Enum0_tags_1)
2596 /sizeof(asn_DEF_Enum0_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07002597 { 0, &asn_PER_type_Enum0_constr_1, NativeEnumerated_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00002598 0, 0, /* Defined elsewhere */
2599 &asn_SPC_Enum0_specs_1 /* Additional specs */
2600};
2601
2602
2603/*** <<< INCLUDES [Enum1] >>> ***/
2604
2605#include <NativeEnumerated.h>
2606
2607/*** <<< DEPS [Enum1] >>> ***/
2608
2609typedef enum Enum1 {
2610 Enum1_one = 0,
2611 Enum1_two = 1
Lev Walkin171487e2006-03-21 07:25:18 +00002612} e_Enum1;
Lev Walkin59b176e2005-11-26 11:25:14 +00002613
2614/*** <<< TYPE-DECLS [Enum1] >>> ***/
2615
2616typedef long Enum1_t;
2617
2618/*** <<< FUNC-DECLS [Enum1] >>> ***/
2619
2620extern asn_TYPE_descriptor_t asn_DEF_Enum1;
2621asn_struct_free_f Enum1_free;
2622asn_struct_print_f Enum1_print;
2623asn_constr_check_f Enum1_constraint;
2624ber_type_decoder_f Enum1_decode_ber;
2625der_type_encoder_f Enum1_encode_der;
2626xer_type_decoder_f Enum1_decode_xer;
2627xer_type_encoder_f Enum1_encode_xer;
2628per_type_decoder_f Enum1_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002629per_type_encoder_f Enum1_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002630
2631/*** <<< CODE [Enum1] >>> ***/
2632
2633int
Lev Walkin20696a42017-10-17 21:27:33 -07002634Enum1_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002635 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002636 long value;
2637
2638 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002639 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002640 "%s: value not given (%s:%d)",
2641 td->name, __FILE__, __LINE__);
2642 return -1;
2643 }
2644
2645 value = *(const long *)sptr;
2646
2647 if((value == 0)) {
2648 /* Constraint check succeeded */
2649 return 0;
2650 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002651 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002652 "%s: constraint failed (%s:%d)",
2653 td->name, __FILE__, __LINE__);
2654 return -1;
2655 }
2656}
2657
2658/*
2659 * This type is implemented using NativeEnumerated,
2660 * so here we adjust the DEF accordingly.
2661 */
Lev Walkin59b176e2005-11-26 11:25:14 +00002662
Lev Walkin725883b2006-10-09 12:07:58 +00002663/*** <<< CTDEFS [Enum1] >>> ***/
2664
Lev Walkin0479e042017-09-26 18:39:58 -07002665static asn_per_constraints_t asn_PER_type_Enum1_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002666 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
2667 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2668 0, 0 /* No PER value map */
2669};
2670
Lev Walkin59b176e2005-11-26 11:25:14 +00002671/*** <<< STAT-DEFS [Enum1] >>> ***/
2672
Lev Walkina7591b52014-10-12 18:37:35 -07002673static const asn_INTEGER_enum_map_t asn_MAP_Enum1_value2enum_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002674 { 0, 3, "one" },
2675 { 1, 3, "two" }
2676};
Lev Walkina7591b52014-10-12 18:37:35 -07002677static const unsigned int asn_MAP_Enum1_enum2value_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002678 0, /* one(0) */
2679 1 /* two(1) */
2680};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08002681static const asn_INTEGER_specifics_t asn_SPC_Enum1_specs_1 = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002682 asn_MAP_Enum1_value2enum_1, /* "tag" => N; sorted by tag */
2683 asn_MAP_Enum1_enum2value_1, /* N => "tag"; sorted by N */
2684 2, /* Number of elements in the maps */
2685 0, /* Enumeration is not extensible */
Lev Walkin8bb57a22007-12-03 13:41:36 +00002686 1, /* Strict enumeration */
2687 0, /* Native long size */
2688 0
Lev Walkin59b176e2005-11-26 11:25:14 +00002689};
Lev Walkina7591b52014-10-12 18:37:35 -07002690static const ber_tlv_tag_t asn_DEF_Enum1_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002691 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
2692};
Lev Walkin59b176e2005-11-26 11:25:14 +00002693asn_TYPE_descriptor_t asn_DEF_Enum1 = {
2694 "Enum1",
2695 "Enum1",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08002696 &asn_OP_NativeEnumerated,
Lev Walkin59b176e2005-11-26 11:25:14 +00002697 asn_DEF_Enum1_tags_1,
2698 sizeof(asn_DEF_Enum1_tags_1)
2699 /sizeof(asn_DEF_Enum1_tags_1[0]), /* 1 */
2700 asn_DEF_Enum1_tags_1, /* Same as above */
2701 sizeof(asn_DEF_Enum1_tags_1)
2702 /sizeof(asn_DEF_Enum1_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07002703 { 0, &asn_PER_type_Enum1_constr_1, Enum1_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00002704 0, 0, /* Defined elsewhere */
2705 &asn_SPC_Enum1_specs_1 /* Additional specs */
2706};
2707
2708
2709/*** <<< INCLUDES [Identifier] >>> ***/
2710
2711#include <VisibleString.h>
2712
2713/*** <<< TYPE-DECLS [Identifier] >>> ***/
2714
2715typedef VisibleString_t Identifier_t;
2716
2717/*** <<< FUNC-DECLS [Identifier] >>> ***/
2718
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +08002719extern asn_per_constraints_t asn_PER_type_Identifier_constr_1;
Lev Walkin59b176e2005-11-26 11:25:14 +00002720extern asn_TYPE_descriptor_t asn_DEF_Identifier;
2721asn_struct_free_f Identifier_free;
2722asn_struct_print_f Identifier_print;
2723asn_constr_check_f Identifier_constraint;
2724ber_type_decoder_f Identifier_decode_ber;
2725der_type_encoder_f Identifier_encode_der;
2726xer_type_decoder_f Identifier_decode_xer;
2727xer_type_encoder_f Identifier_encode_xer;
2728per_type_decoder_f Identifier_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002729per_type_encoder_f Identifier_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002730
2731/*** <<< CTABLES [Identifier] >>> ***/
2732
Lev Walkina7591b52014-10-12 18:37:35 -07002733static const int permitted_alphabet_table_1[256] = {
Lev Walkin5b62ca82006-09-21 01:52:07 +00002734 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
2735 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
2736 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* $ */
2737 2, 3, 4, 5, 6, 7, 8, 9,10,11, 0, 0, 0, 0, 0, 0, /* 0123456789 */
2738 0,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26, /* ABCDEFGHIJKLMNO */
273927,28,29,30,31,32,33,34,35,36,37, 0, 0, 0, 0,38, /* PQRSTUVWXYZ _ */
2740 0,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53, /* abcdefghijklmno */
274154,55,56,57,58,59,60,61,62,63,64, 0, 0, 0, 0, 0, /* pqrstuvwxyz */
Lev Walkin59b176e2005-11-26 11:25:14 +00002742};
Lev Walkina7591b52014-10-12 18:37:35 -07002743static const int permitted_alphabet_code2value_1[64] = {
Lev Walkin5b62ca82006-09-21 01:52:07 +0000274436,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,
274570,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,
274686,87,88,89,90,95,97,98,99,100,101,102,103,104,105,106,
2747107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,
2748};
2749
Lev Walkin59b176e2005-11-26 11:25:14 +00002750
2751static int check_permitted_alphabet_1(const void *sptr) {
Lev Walkina7591b52014-10-12 18:37:35 -07002752 const int *table = permitted_alphabet_table_1;
Lev Walkin59b176e2005-11-26 11:25:14 +00002753 /* The underlying type is VisibleString */
2754 const VisibleString_t *st = (const VisibleString_t *)sptr;
2755 const uint8_t *ch = st->buf;
2756 const uint8_t *end = ch + st->size;
2757
2758 for(; ch < end; ch++) {
2759 uint8_t cv = *ch;
2760 if(!table[cv]) return -1;
2761 }
2762 return 0;
2763}
2764
2765
2766/*** <<< CODE [Identifier] >>> ***/
2767
2768int
Lev Walkin20696a42017-10-17 21:27:33 -07002769Identifier_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002770 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002771 const VisibleString_t *st = (const VisibleString_t *)sptr;
2772 size_t size;
2773
2774 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002775 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002776 "%s: value not given (%s:%d)",
2777 td->name, __FILE__, __LINE__);
2778 return -1;
2779 }
2780
2781 size = st->size;
2782
2783 if((size >= 1 && size <= 32)
2784 && !check_permitted_alphabet_1(st)) {
2785 /* Constraint check succeeded */
2786 return 0;
2787 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002788 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002789 "%s: constraint failed (%s:%d)",
2790 td->name, __FILE__, __LINE__);
2791 return -1;
2792 }
2793}
2794
Lev Walkin725883b2006-10-09 12:07:58 +00002795static int asn_PER_MAP_Identifier_1_v2c(unsigned int value) {
2796 if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0]))
2797 return -1;
2798 return permitted_alphabet_table_1[value] - 1;
2799}
2800static int asn_PER_MAP_Identifier_1_c2v(unsigned int code) {
2801 if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0]))
2802 return -1;
2803 return permitted_alphabet_code2value_1[code];
2804}
Lev Walkin59b176e2005-11-26 11:25:14 +00002805/*
2806 * This type is implemented using VisibleString,
2807 * so here we adjust the DEF accordingly.
2808 */
Lev Walkin59b176e2005-11-26 11:25:14 +00002809
Lev Walkin725883b2006-10-09 12:07:58 +00002810/*** <<< CTDEFS [Identifier] >>> ***/
2811
Lev Walkin0479e042017-09-26 18:39:58 -07002812asn_per_constraints_t asn_PER_type_Identifier_constr_1 CC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002813 { APC_CONSTRAINED, 6, 6, 36, 122 } /* (36..122) */,
2814 { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */,
2815 asn_PER_MAP_Identifier_1_v2c, /* Value to PER code map */
2816 asn_PER_MAP_Identifier_1_c2v /* PER code to value map */
2817};
2818
Lev Walkin59b176e2005-11-26 11:25:14 +00002819/*** <<< STAT-DEFS [Identifier] >>> ***/
2820
Lev Walkina7591b52014-10-12 18:37:35 -07002821static const ber_tlv_tag_t asn_DEF_Identifier_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002822 (ASN_TAG_CLASS_UNIVERSAL | (26 << 2))
2823};
Lev Walkin59b176e2005-11-26 11:25:14 +00002824asn_TYPE_descriptor_t asn_DEF_Identifier = {
2825 "Identifier",
2826 "Identifier",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +08002827 &asn_OP_VisibleString,
Lev Walkin59b176e2005-11-26 11:25:14 +00002828 asn_DEF_Identifier_tags_1,
2829 sizeof(asn_DEF_Identifier_tags_1)
2830 /sizeof(asn_DEF_Identifier_tags_1[0]), /* 1 */
2831 asn_DEF_Identifier_tags_1, /* Same as above */
2832 sizeof(asn_DEF_Identifier_tags_1)
2833 /sizeof(asn_DEF_Identifier_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -07002834 { 0, &asn_PER_type_Identifier_constr_1, Identifier_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +00002835 0, 0, /* No members */
2836 0 /* No specifics */
2837};
2838