50-constraint-OK.asn1.-Pgen-PER 75.9 KB
Newer Older
Lev Walkin's avatar
Lev Walkin committed
1 2 3

/*** <<< INCLUDES [Int1] >>> ***/

4
#include <NativeInteger.h>
Lev Walkin's avatar
Lev Walkin committed
5 6 7

/*** <<< TYPE-DECLS [Int1] >>> ***/

8
typedef long	 Int1_t;
Lev Walkin's avatar
Lev Walkin committed
9 10 11 12 13 14 15 16 17 18 19 20

/*** <<< FUNC-DECLS [Int1] >>> ***/

extern asn_TYPE_descriptor_t asn_DEF_Int1;
asn_struct_free_f Int1_free;
asn_struct_print_f Int1_print;
asn_constr_check_f Int1_constraint;
ber_type_decoder_f Int1_decode_ber;
der_type_encoder_f Int1_encode_der;
xer_type_decoder_f Int1_decode_xer;
xer_type_encoder_f Int1_encode_xer;
per_type_decoder_f Int1_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
21
per_type_encoder_f Int1_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
22 23 24 25

/*** <<< CODE [Int1] >>> ***/

/*
26
 * This type is implemented using NativeInteger,
Lev Walkin's avatar
Lev Walkin committed
27 28 29 30 31
 * so here we adjust the DEF accordingly.
 */

/*** <<< STAT-DEFS [Int1] >>> ***/

32
static const ber_tlv_tag_t asn_DEF_Int1_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
33 34 35 36 37
	(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Int1 = {
	"Int1",
	"Int1",
38
	&asn_OP_NativeInteger,
39
	NativeInteger_constraint,
Lev Walkin's avatar
Lev Walkin committed
40 41 42 43 44 45
	asn_DEF_Int1_tags_1,
	sizeof(asn_DEF_Int1_tags_1)
		/sizeof(asn_DEF_Int1_tags_1[0]), /* 1 */
	asn_DEF_Int1_tags_1,	/* Same as above */
	sizeof(asn_DEF_Int1_tags_1)
		/sizeof(asn_DEF_Int1_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
46
	0,	/* No OER visible constraints */
Lev Walkin's avatar
Lev Walkin committed
47 48 49 50 51 52 53 54
	0,	/* No PER visible constraints */
	0, 0,	/* No members */
	0	/* No specifics */
};


/*** <<< INCLUDES [Int2] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
55
#include "Int1.h"
Lev Walkin's avatar
Lev Walkin committed
56 57 58 59 60 61 62

/*** <<< TYPE-DECLS [Int2] >>> ***/

typedef Int1_t	 Int2_t;

/*** <<< FUNC-DECLS [Int2] >>> ***/

63
extern asn_per_constraints_t asn_PER_type_Int2_constr_1;
Lev Walkin's avatar
Lev Walkin committed
64 65 66 67 68 69 70 71 72
extern asn_TYPE_descriptor_t asn_DEF_Int2;
asn_struct_free_f Int2_free;
asn_struct_print_f Int2_print;
asn_constr_check_f Int2_constraint;
ber_type_decoder_f Int2_decode_ber;
der_type_encoder_f Int2_encode_der;
xer_type_decoder_f Int2_decode_xer;
xer_type_encoder_f Int2_encode_xer;
per_type_decoder_f Int2_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
73
per_type_encoder_f Int2_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
74 75 76 77 78

/*** <<< CODE [Int2] >>> ***/

int
Int2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
79
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
80
	unsigned long value;
Lev Walkin's avatar
Lev Walkin committed
81 82
	
	if(!sptr) {
83
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
84 85 86 87 88
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
89
	value = *(const long *)sptr;
Lev Walkin's avatar
Lev Walkin committed
90 91 92 93 94
	
	if((value >= 0)) {
		/* Constraint check succeeded */
		return 0;
	} else {
95
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
96 97 98 99 100 101 102 103 104 105 106
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

/*
 * This type is implemented using Int1,
 * so here we adjust the DEF accordingly.
 */

Lev Walkin's avatar
Lev Walkin committed
107 108
/*** <<< CTDEFS [Int2] >>> ***/

109
asn_per_constraints_t asn_PER_type_Int2_constr_1 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
110 111 112 113 114
	{ APC_SEMI_CONSTRAINED,	-1, -1,  0,  0 }	/* (0..MAX) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};

Lev Walkin's avatar
Lev Walkin committed
115 116
/*** <<< STAT-DEFS [Int2] >>> ***/

117
static const ber_tlv_tag_t asn_DEF_Int2_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
118 119 120 121 122
	(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Int2 = {
	"Int2",
	"Int2",
123
	&asn_OP_NativeInteger,
Lev Walkin's avatar
Lev Walkin committed
124 125 126 127 128 129 130
	Int2_constraint,
	asn_DEF_Int2_tags_1,
	sizeof(asn_DEF_Int2_tags_1)
		/sizeof(asn_DEF_Int2_tags_1[0]), /* 1 */
	asn_DEF_Int2_tags_1,	/* Same as above */
	sizeof(asn_DEF_Int2_tags_1)
		/sizeof(asn_DEF_Int2_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
131
	0,	/* No OER visible constraints */
Lev Walkin's avatar
diffs  
Lev Walkin committed
132
	&asn_PER_type_Int2_constr_1,
Lev Walkin's avatar
Lev Walkin committed
133 134 135 136 137 138 139
	0, 0,	/* No members */
	0	/* No specifics */
};


/*** <<< INCLUDES [Int3] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
140
#include "Int2.h"
Lev Walkin's avatar
Lev Walkin committed
141 142 143 144 145 146 147

/*** <<< TYPE-DECLS [Int3] >>> ***/

typedef Int2_t	 Int3_t;

/*** <<< FUNC-DECLS [Int3] >>> ***/

148
extern asn_per_constraints_t asn_PER_type_Int3_constr_1;
Lev Walkin's avatar
Lev Walkin committed
149 150 151 152 153 154 155 156 157
extern asn_TYPE_descriptor_t asn_DEF_Int3;
asn_struct_free_f Int3_free;
asn_struct_print_f Int3_print;
asn_constr_check_f Int3_constraint;
ber_type_decoder_f Int3_decode_ber;
der_type_encoder_f Int3_encode_der;
xer_type_decoder_f Int3_decode_xer;
xer_type_encoder_f Int3_encode_xer;
per_type_decoder_f Int3_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
158
per_type_encoder_f Int3_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
159 160 161 162 163

/*** <<< CODE [Int3] >>> ***/

int
Int3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
164
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin's avatar
Lev Walkin committed
165 166 167
	long value;
	
	if(!sptr) {
168
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
169 170 171 172 173
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
174
	value = *(const long *)sptr;
Lev Walkin's avatar
Lev Walkin committed
175 176 177 178 179
	
	if((value >= 0 && value <= 10)) {
		/* Constraint check succeeded */
		return 0;
	} else {
180
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
181 182 183 184 185 186 187 188 189 190 191
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

/*
 * This type is implemented using Int2,
 * so here we adjust the DEF accordingly.
 */

Lev Walkin's avatar
Lev Walkin committed
192 193
/*** <<< CTDEFS [Int3] >>> ***/

194
asn_per_constraints_t asn_PER_type_Int3_constr_1 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
195 196 197 198 199
	{ APC_CONSTRAINED,	 4,  4,  0,  10 }	/* (0..10) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};

Lev Walkin's avatar
Lev Walkin committed
200 201
/*** <<< STAT-DEFS [Int3] >>> ***/

202
static const ber_tlv_tag_t asn_DEF_Int3_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
203 204 205 206 207
	(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Int3 = {
	"Int3",
	"Int3",
208
	&asn_OP_NativeInteger,
Lev Walkin's avatar
Lev Walkin committed
209 210 211 212 213 214 215
	Int3_constraint,
	asn_DEF_Int3_tags_1,
	sizeof(asn_DEF_Int3_tags_1)
		/sizeof(asn_DEF_Int3_tags_1[0]), /* 1 */
	asn_DEF_Int3_tags_1,	/* Same as above */
	sizeof(asn_DEF_Int3_tags_1)
		/sizeof(asn_DEF_Int3_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
216
	0,	/* No OER visible constraints */
Lev Walkin's avatar
diffs  
Lev Walkin committed
217
	&asn_PER_type_Int3_constr_1,
Lev Walkin's avatar
Lev Walkin committed
218 219 220 221 222 223 224
	0, 0,	/* No members */
	0	/* No specifics */
};


/*** <<< INCLUDES [Int4] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
225
#include "Int3.h"
Lev Walkin's avatar
Lev Walkin committed
226 227 228 229 230 231 232

/*** <<< TYPE-DECLS [Int4] >>> ***/

typedef Int3_t	 Int4_t;

/*** <<< FUNC-DECLS [Int4] >>> ***/

233
extern asn_per_constraints_t asn_PER_type_Int4_constr_1;
Lev Walkin's avatar
Lev Walkin committed
234 235 236 237 238 239 240 241 242
extern asn_TYPE_descriptor_t asn_DEF_Int4;
asn_struct_free_f Int4_free;
asn_struct_print_f Int4_print;
asn_constr_check_f Int4_constraint;
ber_type_decoder_f Int4_decode_ber;
der_type_encoder_f Int4_encode_der;
xer_type_decoder_f Int4_decode_xer;
xer_type_encoder_f Int4_encode_xer;
per_type_decoder_f Int4_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
243
per_type_encoder_f Int4_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
244 245 246 247 248

/*** <<< CODE [Int4] >>> ***/

int
Int4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
249
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin's avatar
Lev Walkin committed
250 251 252
	long value;
	
	if(!sptr) {
253
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
254 255 256 257 258
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
259
	value = *(const long *)sptr;
Lev Walkin's avatar
Lev Walkin committed
260 261 262 263 264
	
	if((value >= 1 && value <= 10)) {
		/* Constraint check succeeded */
		return 0;
	} else {
265
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
266 267 268 269 270 271 272 273 274 275 276
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

/*
 * This type is implemented using Int3,
 * so here we adjust the DEF accordingly.
 */

Lev Walkin's avatar
Lev Walkin committed
277 278
/*** <<< CTDEFS [Int4] >>> ***/

279
asn_per_constraints_t asn_PER_type_Int4_constr_1 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
280 281 282 283 284
	{ APC_CONSTRAINED | APC_EXTENSIBLE,  4,  4,  1,  10 }	/* (1..10,...) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};

Lev Walkin's avatar
Lev Walkin committed
285 286
/*** <<< STAT-DEFS [Int4] >>> ***/

287
static const ber_tlv_tag_t asn_DEF_Int4_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
288 289 290 291 292
	(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Int4 = {
	"Int4",
	"Int4",
293
	&asn_OP_NativeInteger,
Lev Walkin's avatar
Lev Walkin committed
294 295 296 297 298 299 300
	Int4_constraint,
	asn_DEF_Int4_tags_1,
	sizeof(asn_DEF_Int4_tags_1)
		/sizeof(asn_DEF_Int4_tags_1[0]), /* 1 */
	asn_DEF_Int4_tags_1,	/* Same as above */
	sizeof(asn_DEF_Int4_tags_1)
		/sizeof(asn_DEF_Int4_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
301
	0,	/* No OER visible constraints */
Lev Walkin's avatar
diffs  
Lev Walkin committed
302
	&asn_PER_type_Int4_constr_1,
Lev Walkin's avatar
Lev Walkin committed
303 304 305 306 307 308 309
	0, 0,	/* No members */
	0	/* No specifics */
};


/*** <<< INCLUDES [Int5] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
310
#include "Int4.h"
Lev Walkin's avatar
Lev Walkin committed
311 312 313 314 315 316 317

/*** <<< TYPE-DECLS [Int5] >>> ***/

typedef Int4_t	 Int5_t;

/*** <<< FUNC-DECLS [Int5] >>> ***/

318
extern asn_per_constraints_t asn_PER_type_Int5_constr_1;
Lev Walkin's avatar
Lev Walkin committed
319 320 321 322 323 324 325 326 327
extern asn_TYPE_descriptor_t asn_DEF_Int5;
asn_struct_free_f Int5_free;
asn_struct_print_f Int5_print;
asn_constr_check_f Int5_constraint;
ber_type_decoder_f Int5_decode_ber;
der_type_encoder_f Int5_encode_der;
xer_type_decoder_f Int5_decode_xer;
xer_type_encoder_f Int5_encode_xer;
per_type_decoder_f Int5_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
328
per_type_encoder_f Int5_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
329 330 331 332 333

/*** <<< CODE [Int5] >>> ***/

int
Int5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
334
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin's avatar
Lev Walkin committed
335 336 337
	long value;
	
	if(!sptr) {
338
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
339 340 341 342 343
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
344
	value = *(const long *)sptr;
Lev Walkin's avatar
Lev Walkin committed
345 346 347 348 349
	
	if((value == 5)) {
		/* Constraint check succeeded */
		return 0;
	} else {
350
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
351 352 353 354 355 356 357 358 359 360 361
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

/*
 * This type is implemented using Int4,
 * so here we adjust the DEF accordingly.
 */

Lev Walkin's avatar
Lev Walkin committed
362 363
/*** <<< CTDEFS [Int5] >>> ***/

364
asn_per_constraints_t asn_PER_type_Int5_constr_1 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
365 366 367 368 369
	{ APC_CONSTRAINED,	 0,  0,  5,  5 }	/* (5..5) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};

Lev Walkin's avatar
Lev Walkin committed
370 371
/*** <<< STAT-DEFS [Int5] >>> ***/

372
static const ber_tlv_tag_t asn_DEF_Int5_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
373 374 375 376 377
	(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Int5 = {
	"Int5",
	"Int5",
378
	&asn_OP_NativeInteger,
Lev Walkin's avatar
Lev Walkin committed
379 380 381 382 383 384 385
	Int5_constraint,
	asn_DEF_Int5_tags_1,
	sizeof(asn_DEF_Int5_tags_1)
		/sizeof(asn_DEF_Int5_tags_1[0]), /* 1 */
	asn_DEF_Int5_tags_1,	/* Same as above */
	sizeof(asn_DEF_Int5_tags_1)
		/sizeof(asn_DEF_Int5_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
386
	0,	/* No OER visible constraints */
Lev Walkin's avatar
diffs  
Lev Walkin committed
387
	&asn_PER_type_Int5_constr_1,
Lev Walkin's avatar
Lev Walkin committed
388 389 390 391 392 393 394
	0, 0,	/* No members */
	0	/* No specifics */
};


/*** <<< INCLUDES [ExtensibleExtensions] >>> ***/

395
#include <NativeInteger.h>
Lev Walkin's avatar
Lev Walkin committed
396 397 398

/*** <<< TYPE-DECLS [ExtensibleExtensions] >>> ***/

399
typedef long	 ExtensibleExtensions_t;
Lev Walkin's avatar
Lev Walkin committed
400 401 402 403 404 405 406 407 408 409 410 411

/*** <<< FUNC-DECLS [ExtensibleExtensions] >>> ***/

extern asn_TYPE_descriptor_t asn_DEF_ExtensibleExtensions;
asn_struct_free_f ExtensibleExtensions_free;
asn_struct_print_f ExtensibleExtensions_print;
asn_constr_check_f ExtensibleExtensions_constraint;
ber_type_decoder_f ExtensibleExtensions_decode_ber;
der_type_encoder_f ExtensibleExtensions_encode_der;
xer_type_decoder_f ExtensibleExtensions_decode_xer;
xer_type_encoder_f ExtensibleExtensions_encode_xer;
per_type_decoder_f ExtensibleExtensions_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
412
per_type_encoder_f ExtensibleExtensions_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
413 414 415 416 417

/*** <<< CODE [ExtensibleExtensions] >>> ***/

int
ExtensibleExtensions_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
418
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin's avatar
Lev Walkin committed
419 420 421
	long value;
	
	if(!sptr) {
422
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
423 424 425 426 427
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
428
	value = *(const long *)sptr;
Lev Walkin's avatar
Lev Walkin committed
429
	
Lev Walkin's avatar
Lev Walkin committed
430
	if((value >= 1 && value <= 255)) {
Lev Walkin's avatar
Lev Walkin committed
431 432 433
		/* Constraint check succeeded */
		return 0;
	} else {
434
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
435 436 437 438 439 440 441
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

/*
442
 * This type is implemented using NativeInteger,
Lev Walkin's avatar
Lev Walkin committed
443 444 445
 * so here we adjust the DEF accordingly.
 */

Lev Walkin's avatar
Lev Walkin committed
446 447
/*** <<< CTDEFS [ExtensibleExtensions] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
448
static asn_per_constraints_t asn_PER_type_ExtensibleExtensions_constr_1 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
449
	{ APC_CONSTRAINED | APC_EXTENSIBLE,  8,  8,  1,  255 }	/* (1..255,...) */,
Lev Walkin's avatar
Lev Walkin committed
450 451 452 453
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};

Lev Walkin's avatar
Lev Walkin committed
454 455
/*** <<< STAT-DEFS [ExtensibleExtensions] >>> ***/

456
static const ber_tlv_tag_t asn_DEF_ExtensibleExtensions_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
457 458 459 460 461
	(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_ExtensibleExtensions = {
	"ExtensibleExtensions",
	"ExtensibleExtensions",
462
	&asn_OP_NativeInteger,
Lev Walkin's avatar
Lev Walkin committed
463 464 465 466 467 468 469
	ExtensibleExtensions_constraint,
	asn_DEF_ExtensibleExtensions_tags_1,
	sizeof(asn_DEF_ExtensibleExtensions_tags_1)
		/sizeof(asn_DEF_ExtensibleExtensions_tags_1[0]), /* 1 */
	asn_DEF_ExtensibleExtensions_tags_1,	/* Same as above */
	sizeof(asn_DEF_ExtensibleExtensions_tags_1)
		/sizeof(asn_DEF_ExtensibleExtensions_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
470
	0,	/* No OER visible constraints */
Lev Walkin's avatar
diffs  
Lev Walkin committed
471
	&asn_PER_type_ExtensibleExtensions_constr_1,
Lev Walkin's avatar
Lev Walkin committed
472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495
	0, 0,	/* No members */
	0	/* No specifics */
};


/*** <<< INCLUDES [Str1] >>> ***/

#include <IA5String.h>

/*** <<< TYPE-DECLS [Str1] >>> ***/

typedef IA5String_t	 Str1_t;

/*** <<< FUNC-DECLS [Str1] >>> ***/

extern asn_TYPE_descriptor_t asn_DEF_Str1;
asn_struct_free_f Str1_free;
asn_struct_print_f Str1_print;
asn_constr_check_f Str1_constraint;
ber_type_decoder_f Str1_decode_ber;
der_type_encoder_f Str1_encode_der;
xer_type_decoder_f Str1_decode_xer;
xer_type_encoder_f Str1_encode_xer;
per_type_decoder_f Str1_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
496
per_type_encoder_f Str1_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
497 498 499 500 501 502 503 504 505 506

/*** <<< CODE [Str1] >>> ***/

/*
 * This type is implemented using IA5String,
 * so here we adjust the DEF accordingly.
 */

/*** <<< STAT-DEFS [Str1] >>> ***/

507
static const ber_tlv_tag_t asn_DEF_Str1_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
508 509 510 511 512
	(ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Str1 = {
	"Str1",
	"Str1",
513
	&asn_OP_IA5String,
514
	IA5String_constraint,
Lev Walkin's avatar
Lev Walkin committed
515 516 517 518 519 520
	asn_DEF_Str1_tags_1,
	sizeof(asn_DEF_Str1_tags_1)
		/sizeof(asn_DEF_Str1_tags_1[0]), /* 1 */
	asn_DEF_Str1_tags_1,	/* Same as above */
	sizeof(asn_DEF_Str1_tags_1)
		/sizeof(asn_DEF_Str1_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
521
	0,	/* No OER visible constraints */
Lev Walkin's avatar
Lev Walkin committed
522 523 524 525 526 527 528 529
	0,	/* No PER visible constraints */
	0, 0,	/* No members */
	0	/* No specifics */
};


/*** <<< INCLUDES [Str2] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
530
#include "Str1.h"
Lev Walkin's avatar
Lev Walkin committed
531 532 533 534 535 536 537

/*** <<< TYPE-DECLS [Str2] >>> ***/

typedef Str1_t	 Str2_t;

/*** <<< FUNC-DECLS [Str2] >>> ***/

538
extern asn_per_constraints_t asn_PER_type_Str2_constr_1;
Lev Walkin's avatar
Lev Walkin committed
539 540 541 542 543 544 545 546 547
extern asn_TYPE_descriptor_t asn_DEF_Str2;
asn_struct_free_f Str2_free;
asn_struct_print_f Str2_print;
asn_constr_check_f Str2_constraint;
ber_type_decoder_f Str2_decode_ber;
der_type_encoder_f Str2_encode_der;
xer_type_decoder_f Str2_decode_xer;
xer_type_encoder_f Str2_encode_xer;
per_type_decoder_f Str2_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
548
per_type_encoder_f Str2_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569

/*** <<< CTABLES [Str2] >>> ***/

static int check_permitted_alphabet_1(const void *sptr) {
	/* The underlying type is IA5String */
	const IA5String_t *st = (const IA5String_t *)sptr;
	const uint8_t *ch = st->buf;
	const uint8_t *end = ch + st->size;
	
	for(; ch < end; ch++) {
		uint8_t cv = *ch;
		if(!(cv <= 127)) return -1;
	}
	return 0;
}


/*** <<< CODE [Str2] >>> ***/

int
Str2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
570
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin's avatar
Lev Walkin committed
571 572 573 574
	const Str1_t *st = (const Str1_t *)sptr;
	size_t size;
	
	if(!sptr) {
575
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
576 577 578 579 580 581 582 583 584 585 586 587
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	size = st->size;
	
	if(((size <= 20) || (size >= 25 && size <= 30))
		 && !check_permitted_alphabet_1(st)) {
		/* Constraint check succeeded */
		return 0;
	} else {
588
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
589 590 591 592 593 594 595 596 597 598 599
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

/*
 * This type is implemented using Str1,
 * so here we adjust the DEF accordingly.
 */

Lev Walkin's avatar
Lev Walkin committed
600 601
/*** <<< CTDEFS [Str2] >>> ***/

602
asn_per_constraints_t asn_PER_type_Str2_constr_1 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
603 604 605 606 607
	{ APC_CONSTRAINED,	 7,  7,  0,  127 }	/* (0..127) */,
	{ APC_CONSTRAINED,	 5,  5,  0,  30 }	/* (SIZE(0..30)) */,
	0, 0	/* No PER character map necessary */
};

Lev Walkin's avatar
Lev Walkin committed
608 609
/*** <<< STAT-DEFS [Str2] >>> ***/

610
static const ber_tlv_tag_t asn_DEF_Str2_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
611 612 613 614 615
	(ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Str2 = {
	"Str2",
	"Str2",
616
	&asn_OP_IA5String,
Lev Walkin's avatar
Lev Walkin committed
617 618 619 620 621 622 623
	Str2_constraint,
	asn_DEF_Str2_tags_1,
	sizeof(asn_DEF_Str2_tags_1)
		/sizeof(asn_DEF_Str2_tags_1[0]), /* 1 */
	asn_DEF_Str2_tags_1,	/* Same as above */
	sizeof(asn_DEF_Str2_tags_1)
		/sizeof(asn_DEF_Str2_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
624
	0,	/* No OER visible constraints */
Lev Walkin's avatar
diffs  
Lev Walkin committed
625
	&asn_PER_type_Str2_constr_1,
Lev Walkin's avatar
Lev Walkin committed
626 627 628 629 630 631 632
	0, 0,	/* No members */
	0	/* No specifics */
};


/*** <<< INCLUDES [Str3] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
633
#include "Str2.h"
Lev Walkin's avatar
Lev Walkin committed
634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649

/*** <<< TYPE-DECLS [Str3] >>> ***/

typedef Str2_t	 Str3_t;

/*** <<< FUNC-DECLS [Str3] >>> ***/

extern asn_TYPE_descriptor_t asn_DEF_Str3;
asn_struct_free_f Str3_free;
asn_struct_print_f Str3_print;
asn_constr_check_f Str3_constraint;
ber_type_decoder_f Str3_decode_ber;
der_type_encoder_f Str3_encode_der;
xer_type_decoder_f Str3_decode_xer;
xer_type_encoder_f Str3_encode_xer;
per_type_decoder_f Str3_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
650
per_type_encoder_f Str3_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
651 652 653

/*** <<< CTABLES [Str3] >>> ***/

654
static const int permitted_alphabet_table_1[256] = {
655 656 657 658 659 660 661
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/*                  */
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/*                  */
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/*                  */
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/*                  */
 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/*  ABC             */
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/*                  */
 0, 0, 0, 0, 4, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/*     def          */
Lev Walkin's avatar
Lev Walkin committed
662
};
663
static const int permitted_alphabet_code2value_1[6] = {
664 665
65,66,67,100,101,102,};

Lev Walkin's avatar
Lev Walkin committed
666 667

static int check_permitted_alphabet_1(const void *sptr) {
668
	const int *table = permitted_alphabet_table_1;
Lev Walkin's avatar
Lev Walkin committed
669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685
	/* The underlying type is IA5String */
	const IA5String_t *st = (const IA5String_t *)sptr;
	const uint8_t *ch = st->buf;
	const uint8_t *end = ch + st->size;
	
	for(; ch < end; ch++) {
		uint8_t cv = *ch;
		if(!table[cv]) return -1;
	}
	return 0;
}


/*** <<< CODE [Str3] >>> ***/

int
Str3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
686
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin's avatar
Lev Walkin committed
687 688 689 690
	const Str2_t *st = (const Str2_t *)sptr;
	size_t size;
	
	if(!sptr) {
691
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
692 693 694 695 696 697 698 699 700 701 702 703
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	size = st->size;
	
	if(((size >= 10 && size <= 20) || (size >= 25 && size <= 27))
		 && !check_permitted_alphabet_1(st)) {
		/* Constraint check succeeded */
		return 0;
	} else {
704
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
705 706 707 708 709 710
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

Lev Walkin's avatar
Lev Walkin committed
711 712 713 714 715 716 717 718 719 720
static int asn_PER_MAP_Str3_1_v2c(unsigned int value) {
	if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0]))
		return -1;
	return permitted_alphabet_table_1[value] - 1;
}
static int asn_PER_MAP_Str3_1_c2v(unsigned int code) {
	if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0]))
		return -1;
	return permitted_alphabet_code2value_1[code];
}
Lev Walkin's avatar
Lev Walkin committed
721 722 723 724 725
/*
 * This type is implemented using Str2,
 * so here we adjust the DEF accordingly.
 */

Lev Walkin's avatar
Lev Walkin committed
726 727
/*** <<< CTDEFS [Str3] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
728
static asn_per_constraints_t asn_PER_type_Str3_constr_1 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
729 730 731 732 733 734
	{ APC_CONSTRAINED,	 3,  3,  65,  102 }	/* (65..102) */,
	{ APC_CONSTRAINED,	 5,  5,  10,  27 }	/* (SIZE(10..27)) */,
	asn_PER_MAP_Str3_1_v2c,	/* Value to PER code map */
	asn_PER_MAP_Str3_1_c2v	/* PER code to value map */
};

Lev Walkin's avatar
Lev Walkin committed
735 736
/*** <<< STAT-DEFS [Str3] >>> ***/

737
static const ber_tlv_tag_t asn_DEF_Str3_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
738 739 740 741 742
	(ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Str3 = {
	"Str3",
	"Str3",
743
	&asn_OP_IA5String,
Lev Walkin's avatar
Lev Walkin committed
744 745 746 747 748 749 750
	Str3_constraint,
	asn_DEF_Str3_tags_1,
	sizeof(asn_DEF_Str3_tags_1)
		/sizeof(asn_DEF_Str3_tags_1[0]), /* 1 */
	asn_DEF_Str3_tags_1,	/* Same as above */
	sizeof(asn_DEF_Str3_tags_1)
		/sizeof(asn_DEF_Str3_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
751
	0,	/* No OER visible constraints */
Lev Walkin's avatar
diffs  
Lev Walkin committed
752
	&asn_PER_type_Str3_constr_1,
Lev Walkin's avatar
Lev Walkin committed
753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776
	0, 0,	/* No members */
	0	/* No specifics */
};


/*** <<< INCLUDES [Str4] >>> ***/

#include <IA5String.h>

/*** <<< TYPE-DECLS [Str4] >>> ***/

typedef IA5String_t	 Str4_t;

/*** <<< FUNC-DECLS [Str4] >>> ***/

extern asn_TYPE_descriptor_t asn_DEF_Str4;
asn_struct_free_f Str4_free;
asn_struct_print_f Str4_print;
asn_constr_check_f Str4_constraint;
ber_type_decoder_f Str4_decode_ber;
der_type_encoder_f Str4_encode_der;
xer_type_decoder_f Str4_decode_xer;
xer_type_encoder_f Str4_encode_xer;
per_type_decoder_f Str4_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
777
per_type_encoder_f Str4_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798

/*** <<< CTABLES [Str4] >>> ***/

static int check_permitted_alphabet_1(const void *sptr) {
	/* The underlying type is IA5String */
	const IA5String_t *st = (const IA5String_t *)sptr;
	const uint8_t *ch = st->buf;
	const uint8_t *end = ch + st->size;
	
	for(; ch < end; ch++) {
		uint8_t cv = *ch;
		if(!(cv <= 127)) return -1;
	}
	return 0;
}


/*** <<< CODE [Str4] >>> ***/

int
Str4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
799
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin's avatar
Lev Walkin committed
800 801 802
	const IA5String_t *st = (const IA5String_t *)sptr;
	
	if(!sptr) {
803
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
804 805 806 807 808 809 810 811 812 813
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(!check_permitted_alphabet_1(st)) {
		/* Constraint check succeeded */
		return 0;
	} else {
814
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
815 816 817 818 819 820 821 822 823 824 825
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

/*
 * This type is implemented using IA5String,
 * so here we adjust the DEF accordingly.
 */

Lev Walkin's avatar
Lev Walkin committed
826 827
/*** <<< CTDEFS [Str4] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
828
static asn_per_constraints_t asn_PER_type_Str4_constr_1 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
829 830 831 832 833
	{ APC_CONSTRAINED,	 7,  7,  0,  127 }	/* (0..127) */,
	{ APC_SEMI_CONSTRAINED,	-1, -1,  0,  0 }	/* (SIZE(0..MAX)) */,
	0, 0	/* No PER character map necessary */
};

Lev Walkin's avatar
Lev Walkin committed
834 835
/*** <<< STAT-DEFS [Str4] >>> ***/

836
static const ber_tlv_tag_t asn_DEF_Str4_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
837 838 839 840 841
	(ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Str4 = {
	"Str4",
	"Str4",
842
	&asn_OP_IA5String,
Lev Walkin's avatar
Lev Walkin committed
843 844 845 846 847 848 849
	Str4_constraint,
	asn_DEF_Str4_tags_1,
	sizeof(asn_DEF_Str4_tags_1)
		/sizeof(asn_DEF_Str4_tags_1[0]), /* 1 */
	asn_DEF_Str4_tags_1,	/* Same as above */
	sizeof(asn_DEF_Str4_tags_1)
		/sizeof(asn_DEF_Str4_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
850
	0,	/* No OER visible constraints */
Lev Walkin's avatar
diffs  
Lev Walkin committed
851
	&asn_PER_type_Str4_constr_1,
Lev Walkin's avatar
Lev Walkin committed
852 853 854 855 856 857 858 859 860 861 862 863 864 865 866
	0, 0,	/* No members */
	0	/* No specifics */
};


/*** <<< INCLUDES [PER-Visible] >>> ***/

#include <IA5String.h>

/*** <<< TYPE-DECLS [PER-Visible] >>> ***/

typedef IA5String_t	 PER_Visible_t;

/*** <<< FUNC-DECLS [PER-Visible] >>> ***/

867
extern asn_per_constraints_t asn_PER_type_PER_Visible_constr_1;
Lev Walkin's avatar
Lev Walkin committed
868 869 870 871 872 873 874 875 876
extern asn_TYPE_descriptor_t asn_DEF_PER_Visible;
asn_struct_free_f PER_Visible_free;
asn_struct_print_f PER_Visible_print;
asn_constr_check_f PER_Visible_constraint;
ber_type_decoder_f PER_Visible_decode_ber;
der_type_encoder_f PER_Visible_encode_der;
xer_type_decoder_f PER_Visible_decode_xer;
xer_type_encoder_f PER_Visible_encode_xer;
per_type_decoder_f PER_Visible_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
877
per_type_encoder_f PER_Visible_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898

/*** <<< CTABLES [PER-Visible] >>> ***/

static int check_permitted_alphabet_1(const void *sptr) {
	/* The underlying type is IA5String */
	const IA5String_t *st = (const IA5String_t *)sptr;
	const uint8_t *ch = st->buf;
	const uint8_t *end = ch + st->size;
	
	for(; ch < end; ch++) {
		uint8_t cv = *ch;
		if(!(cv >= 65 && cv <= 70)) return -1;
	}
	return 0;
}


/*** <<< CODE [PER-Visible] >>> ***/

int
PER_Visible_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
899
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin's avatar
Lev Walkin committed
900 901 902
	const IA5String_t *st = (const IA5String_t *)sptr;
	
	if(!sptr) {
903
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
904 905 906 907 908 909 910 911 912 913
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(!check_permitted_alphabet_1(st)) {
		/* Constraint check succeeded */
		return 0;
	} else {
914
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
915 916 917 918 919 920 921 922 923 924 925
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

/*
 * This type is implemented using IA5String,
 * so here we adjust the DEF accordingly.
 */

Lev Walkin's avatar
Lev Walkin committed
926 927
/*** <<< CTDEFS [PER-Visible] >>> ***/

928
asn_per_constraints_t asn_PER_type_PER_Visible_constr_1 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
929 930 931 932 933
	{ APC_CONSTRAINED,	 3,  3,  65,  70 }	/* (65..70) */,
	{ APC_SEMI_CONSTRAINED,	-1, -1,  0,  0 }	/* (SIZE(0..MAX)) */,
	0, 0	/* No PER character map necessary */
};

Lev Walkin's avatar
Lev Walkin committed
934 935
/*** <<< STAT-DEFS [PER-Visible] >>> ***/

936
static const ber_tlv_tag_t asn_DEF_PER_Visible_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
937 938 939 940 941
	(ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
};
asn_TYPE_descriptor_t asn_DEF_PER_Visible = {
	"PER-Visible",
	"PER-Visible",
942
	&asn_OP_IA5String,
Lev Walkin's avatar
Lev Walkin committed
943 944 945 946 947 948 949
	PER_Visible_constraint,
	asn_DEF_PER_Visible_tags_1,
	sizeof(asn_DEF_PER_Visible_tags_1)
		/sizeof(asn_DEF_PER_Visible_tags_1[0]), /* 1 */
	asn_DEF_PER_Visible_tags_1,	/* Same as above */
	sizeof(asn_DEF_PER_Visible_tags_1)
		/sizeof(asn_DEF_PER_Visible_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
950
	0,	/* No OER visible constraints */
Lev Walkin's avatar
diffs  
Lev Walkin committed
951
	&asn_PER_type_PER_Visible_constr_1,
Lev Walkin's avatar
Lev Walkin committed
952 953 954 955 956 957 958
	0, 0,	/* No members */
	0	/* No specifics */
};


/*** <<< INCLUDES [PER-Visible-2] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
959
#include "PER-Visible.h"
Lev Walkin's avatar
Lev Walkin committed
960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975

/*** <<< TYPE-DECLS [PER-Visible-2] >>> ***/

typedef PER_Visible_t	 PER_Visible_2_t;

/*** <<< FUNC-DECLS [PER-Visible-2] >>> ***/

extern asn_TYPE_descriptor_t asn_DEF_PER_Visible_2;
asn_struct_free_f PER_Visible_2_free;
asn_struct_print_f PER_Visible_2_print;
asn_constr_check_f PER_Visible_2_constraint;
ber_type_decoder_f PER_Visible_2_decode_ber;
der_type_encoder_f PER_Visible_2_encode_der;
xer_type_decoder_f PER_Visible_2_decode_xer;
xer_type_encoder_f PER_Visible_2_encode_xer;
per_type_decoder_f PER_Visible_2_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
976
per_type_encoder_f PER_Visible_2_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997

/*** <<< CTABLES [PER-Visible-2] >>> ***/

static int check_permitted_alphabet_1(const void *sptr) {
	/* The underlying type is IA5String */
	const IA5String_t *st = (const IA5String_t *)sptr;
	const uint8_t *ch = st->buf;
	const uint8_t *end = ch + st->size;
	
	for(; ch < end; ch++) {
		uint8_t cv = *ch;
		if(!(cv >= 69 && cv <= 70)) return -1;
	}
	return 0;
}


/*** <<< CODE [PER-Visible-2] >>> ***/

int
PER_Visible_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
998
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin's avatar
Lev Walkin committed
999 1000 1001
	const PER_Visible_t *st = (const PER_Visible_t *)sptr;
	
	if(!sptr) {
1002
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
1003 1004 1005 1006 1007 1008 1009 1010 1011 1012
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(!check_permitted_alphabet_1(st)) {
		/* Constraint check succeeded */
		return 0;
	} else {
1013
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

/*
 * This type is implemented using PER_Visible,
 * so here we adjust the DEF accordingly.
 */

Lev Walkin's avatar
Lev Walkin committed
1025 1026
/*** <<< CTDEFS [PER-Visible-2] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
1027
static asn_per_constraints_t asn_PER_type_PER_Visible_2_constr_1 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
1028 1029 1030 1031 1032
	{ APC_CONSTRAINED,	 1,  1,  69,  70 }	/* (69..70) */,
	{ APC_SEMI_CONSTRAINED,	-1, -1,  0,  0 }	/* (SIZE(0..MAX)) */,
	0, 0	/* No PER character map necessary */
};

Lev Walkin's avatar
Lev Walkin committed
1033 1034
/*** <<< STAT-DEFS [PER-Visible-2] >>> ***/

1035
static const ber_tlv_tag_t asn_DEF_PER_Visible_2_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
1036 1037 1038 1039 1040
	(ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
};
asn_TYPE_descriptor_t asn_DEF_PER_Visible_2 = {
	"PER-Visible-2",
	"PER-Visible-2",
1041
	&asn_OP_IA5String,
Lev Walkin's avatar
Lev Walkin committed
1042 1043 1044 1045 1046 1047 1048
	PER_Visible_2_constraint,
	asn_DEF_PER_Visible_2_tags_1,
	sizeof(asn_DEF_PER_Visible_2_tags_1)
		/sizeof(asn_DEF_PER_Visible_2_tags_1[0]), /* 1 */
	asn_DEF_PER_Visible_2_tags_1,	/* Same as above */
	sizeof(asn_DEF_PER_Visible_2_tags_1)
		/sizeof(asn_DEF_PER_Visible_2_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
1049
	0,	/* No OER visible constraints */
Lev Walkin's avatar
diffs  
Lev Walkin committed
1050
	&asn_PER_type_PER_Visible_2_constr_1,
Lev Walkin's avatar
Lev Walkin committed
1051 1052 1053 1054 1055 1056 1057
	0, 0,	/* No members */
	0	/* No specifics */
};


/*** <<< INCLUDES [Not-PER-Visible-1] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
1058
#include "PER-Visible.h"
Lev Walkin's avatar
Lev Walkin committed
1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074

/*** <<< TYPE-DECLS [Not-PER-Visible-1] >>> ***/

typedef PER_Visible_t	 Not_PER_Visible_1_t;

/*** <<< FUNC-DECLS [Not-PER-Visible-1] >>> ***/

extern asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_1;
asn_struct_free_f Not_PER_Visible_1_free;
asn_struct_print_f Not_PER_Visible_1_print;
asn_constr_check_f Not_PER_Visible_1_constraint;
ber_type_decoder_f Not_PER_Visible_1_decode_ber;
der_type_encoder_f Not_PER_Visible_1_encode_der;
xer_type_decoder_f Not_PER_Visible_1_decode_xer;
xer_type_encoder_f Not_PER_Visible_1_encode_xer;
per_type_decoder_f Not_PER_Visible_1_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
1075
per_type_encoder_f Not_PER_Visible_1_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096

/*** <<< CTABLES [Not-PER-Visible-1] >>> ***/

static int check_permitted_alphabet_1(const void *sptr) {
	/* The underlying type is IA5String */
	const IA5String_t *st = (const IA5String_t *)sptr;
	const uint8_t *ch = st->buf;
	const uint8_t *end = ch + st->size;
	
	for(; ch < end; ch++) {
		uint8_t cv = *ch;
		if(!(cv >= 65 && cv <= 70)) return -1;
	}
	return 0;
}


/*** <<< CODE [Not-PER-Visible-1] >>> ***/

int
Not_PER_Visible_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
1097
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin's avatar
Lev Walkin committed
1098 1099 1100
	const PER_Visible_t *st = (const PER_Visible_t *)sptr;
	
	if(!sptr) {
1101
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
1102 1103 1104 1105 1106 1107 1108 1109 1110 1111
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(!check_permitted_alphabet_1(st)) {
		/* Constraint check succeeded */
		return 0;
	} else {
1112
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

/*
 * This type is implemented using PER_Visible,
 * so here we adjust the DEF accordingly.
 */

Lev Walkin's avatar
Lev Walkin committed
1124 1125
/*** <<< CTDEFS [Not-PER-Visible-1] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
1126
static asn_per_constraints_t asn_PER_type_Not_PER_Visible_1_constr_1 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
1127 1128 1129 1130 1131
	{ APC_CONSTRAINED,	 3,  3,  65,  70 }	/* (65..70) */,
	{ APC_SEMI_CONSTRAINED,	-1, -1,  0,  0 }	/* (SIZE(0..MAX)) */,
	0, 0	/* No PER character map necessary */
};

Lev Walkin's avatar
Lev Walkin committed
1132 1133
/*** <<< STAT-DEFS [Not-PER-Visible-1] >>> ***/

1134
static const ber_tlv_tag_t asn_DEF_Not_PER_Visible_1_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
1135 1136 1137 1138 1139
	(ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_1 = {
	"Not-PER-Visible-1",
	"Not-PER-Visible-1",
1140
	&asn_OP_IA5String,
Lev Walkin's avatar
Lev Walkin committed
1141 1142 1143 1144 1145 1146 1147
	Not_PER_Visible_1_constraint,
	asn_DEF_Not_PER_Visible_1_tags_1,
	sizeof(asn_DEF_Not_PER_Visible_1_tags_1)
		/sizeof(asn_DEF_Not_PER_Visible_1_tags_1[0]), /* 1 */
	asn_DEF_Not_PER_Visible_1_tags_1,	/* Same as above */
	sizeof(asn_DEF_Not_PER_Visible_1_tags_1)
		/sizeof(asn_DEF_Not_PER_Visible_1_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
1148
	0,	/* No OER visible constraints */
Lev Walkin's avatar
diffs  
Lev Walkin committed
1149
	&asn_PER_type_Not_PER_Visible_1_constr_1,
Lev Walkin's avatar
Lev Walkin committed
1150 1151 1152 1153 1154 1155 1156
	0, 0,	/* No members */
	0	/* No specifics */
};


/*** <<< INCLUDES [Not-PER-Visible-2] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
1157
#include "PER-Visible.h"
Lev Walkin's avatar
Lev Walkin committed
1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173

/*** <<< TYPE-DECLS [Not-PER-Visible-2] >>> ***/

typedef PER_Visible_t	 Not_PER_Visible_2_t;

/*** <<< FUNC-DECLS [Not-PER-Visible-2] >>> ***/

extern asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_2;
asn_struct_free_f Not_PER_Visible_2_free;
asn_struct_print_f Not_PER_Visible_2_print;
asn_constr_check_f Not_PER_Visible_2_constraint;
ber_type_decoder_f Not_PER_Visible_2_decode_ber;
der_type_encoder_f Not_PER_Visible_2_encode_der;
xer_type_decoder_f Not_PER_Visible_2_decode_xer;
xer_type_encoder_f Not_PER_Visible_2_encode_xer;
per_type_decoder_f Not_PER_Visible_2_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
1174
per_type_encoder_f Not_PER_Visible_2_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195

/*** <<< CTABLES [Not-PER-Visible-2] >>> ***/

static int check_permitted_alphabet_1(const void *sptr) {
	/* The underlying type is IA5String */
	const IA5String_t *st = (const IA5String_t *)sptr;
	const uint8_t *ch = st->buf;
	const uint8_t *end = ch + st->size;
	
	for(; ch < end; ch++) {
		uint8_t cv = *ch;
		if(!(cv >= 65 && cv <= 66)) return -1;
	}
	return 0;
}


/*** <<< CODE [Not-PER-Visible-2] >>> ***/

int
Not_PER_Visible_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
1196
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin's avatar
Lev Walkin committed
1197 1198 1199
	const PER_Visible_t *st = (const PER_Visible_t *)sptr;
	
	if(!sptr) {
1200
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
1201 1202 1203 1204 1205 1206 1207 1208 1209 1210
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(!check_permitted_alphabet_1(st)) {
		/* Constraint check succeeded */
		return 0;
	} else {
1211
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

/*
 * This type is implemented using PER_Visible,
 * so here we adjust the DEF accordingly.
 */

Lev Walkin's avatar
Lev Walkin committed
1223 1224
/*** <<< CTDEFS [Not-PER-Visible-2] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
1225
static asn_per_constraints_t asn_PER_type_Not_PER_Visible_2_constr_1 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
1226 1227 1228 1229 1230
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_SEMI_CONSTRAINED,	-1, -1,  0,  0 }	/* (SIZE(0..MAX)) */,
	0, 0	/* No PER character map necessary */
};

Lev Walkin's avatar
Lev Walkin committed
1231 1232
/*** <<< STAT-DEFS [Not-PER-Visible-2] >>> ***/

1233
static const ber_tlv_tag_t asn_DEF_Not_PER_Visible_2_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
1234 1235 1236 1237 1238
	(ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_2 = {
	"Not-PER-Visible-2",
	"Not-PER-Visible-2",
1239
	&asn_OP_IA5String,
Lev Walkin's avatar
Lev Walkin committed
1240 1241 1242 1243 1244 1245 1246
	Not_PER_Visible_2_constraint,
	asn_DEF_Not_PER_Visible_2_tags_1,
	sizeof(asn_DEF_Not_PER_Visible_2_tags_1)
		/sizeof(asn_DEF_Not_PER_Visible_2_tags_1[0]), /* 1 */
	asn_DEF_Not_PER_Visible_2_tags_1,	/* Same as above */
	sizeof(asn_DEF_Not_PER_Visible_2_tags_1)
		/sizeof(asn_DEF_Not_PER_Visible_2_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
1247
	0,	/* No OER visible constraints */
Lev Walkin's avatar
diffs  
Lev Walkin committed
1248
	&asn_PER_type_Not_PER_Visible_2_constr_1,
Lev Walkin's avatar
Lev Walkin committed
1249 1250 1251 1252 1253 1254 1255
	0, 0,	/* No members */
	0	/* No specifics */
};


/*** <<< INCLUDES [Not-PER-Visible-3] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
1256
#include "PER-Visible.h"
Lev Walkin's avatar
Lev Walkin committed
1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272

/*** <<< TYPE-DECLS [Not-PER-Visible-3] >>> ***/

typedef PER_Visible_t	 Not_PER_Visible_3_t;

/*** <<< FUNC-DECLS [Not-PER-Visible-3] >>> ***/

extern asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_3;
asn_struct_free_f Not_PER_Visible_3_free;
asn_struct_print_f Not_PER_Visible_3_print;
asn_constr_check_f Not_PER_Visible_3_constraint;
ber_type_decoder_f Not_PER_Visible_3_decode_ber;
der_type_encoder_f Not_PER_Visible_3_encode_der;
xer_type_decoder_f Not_PER_Visible_3_decode_xer;
xer_type_encoder_f Not_PER_Visible_3_encode_xer;
per_type_decoder_f Not_PER_Visible_3_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
1273
per_type_encoder_f Not_PER_Visible_3_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294

/*** <<< CTABLES [Not-PER-Visible-3] >>> ***/

static int check_permitted_alphabet_1(const void *sptr) {
	/* The underlying type is IA5String */
	const IA5String_t *st = (const IA5String_t *)sptr;
	const uint8_t *ch = st->buf;
	const uint8_t *end = ch + st->size;
	
	for(; ch < end; ch++) {
		uint8_t cv = *ch;
		if(!(cv >= 65 && cv <= 66)) return -1;
	}
	return 0;
}


/*** <<< CODE [Not-PER-Visible-3] >>> ***/

int
Not_PER_Visible_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
1295
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin's avatar
Lev Walkin committed
1296 1297 1298
	const PER_Visible_t *st = (const PER_Visible_t *)sptr;
	
	if(!sptr) {
1299
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
1300 1301 1302
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314
	}
	
	
	if(!check_permitted_alphabet_1(st)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
Lev Walkin's avatar
Lev Walkin committed
1315 1316
}

1317 1318 1319 1320
/*
 * This type is implemented using PER_Visible,
 * so here we adjust the DEF accordingly.
 */
Lev Walkin's avatar
Lev Walkin committed
1321

Lev Walkin's avatar
Lev Walkin committed
1322 1323
/*** <<< CTDEFS [Not-PER-Visible-3] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
1324
static asn_per_constraints_t asn_PER_type_Not_PER_Visible_3_constr_1 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
1325 1326 1327 1328 1329
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_SEMI_CONSTRAINED,	-1, -1,  0,  0 }	/* (SIZE(0..MAX)) */,
	0, 0	/* No PER character map necessary */
};

Lev Walkin's avatar
Lev Walkin committed
1330 1331
/*** <<< STAT-DEFS [Not-PER-Visible-3] >>> ***/

1332
static const ber_tlv_tag_t asn_DEF_Not_PER_Visible_3_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
1333 1334 1335 1336 1337
	(ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_3 = {
	"Not-PER-Visible-3",
	"Not-PER-Visible-3",
1338
	&asn_OP_IA5String,
Lev Walkin's avatar
Lev Walkin committed
1339 1340 1341 1342 1343 1344 1345
	Not_PER_Visible_3_constraint,
	asn_DEF_Not_PER_Visible_3_tags_1,
	sizeof(asn_DEF_Not_PER_Visible_3_tags_1)
		/sizeof(asn_DEF_Not_PER_Visible_3_tags_1[0]), /* 1 */
	asn_DEF_Not_PER_Visible_3_tags_1,	/* Same as above */
	sizeof(asn_DEF_Not_PER_Visible_3_tags_1)
		/sizeof(asn_DEF_Not_PER_Visible_3_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
1346
	0,	/* No OER visible constraints */
Lev Walkin's avatar
diffs  
Lev Walkin committed
1347
	&asn_PER_type_Not_PER_Visible_3_constr_1,
Lev Walkin's avatar
Lev Walkin committed
1348 1349 1350 1351 1352 1353 1354
	0, 0,	/* No members */
	0	/* No specifics */
};


/*** <<< INCLUDES [SIZE-but-not-FROM] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
1355
#include "PER-Visible.h"
Lev Walkin's avatar
Lev Walkin committed
1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371

/*** <<< TYPE-DECLS [SIZE-but-not-FROM] >>> ***/

typedef PER_Visible_t	 SIZE_but_not_FROM_t;

/*** <<< FUNC-DECLS [SIZE-but-not-FROM] >>> ***/

extern asn_TYPE_descriptor_t asn_DEF_SIZE_but_not_FROM;
asn_struct_free_f SIZE_but_not_FROM_free;
asn_struct_print_f SIZE_but_not_FROM_print;
asn_constr_check_f SIZE_but_not_FROM_constraint;
ber_type_decoder_f SIZE_but_not_FROM_decode_ber;
der_type_encoder_f SIZE_but_not_FROM_encode_der;
xer_type_decoder_f SIZE_but_not_FROM_decode_xer;
xer_type_encoder_f SIZE_but_not_FROM_encode_xer;
per_type_decoder_f SIZE_but_not_FROM_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
1372
per_type_encoder_f SIZE_but_not_FROM_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393

/*** <<< CTABLES [SIZE-but-not-FROM] >>> ***/

static int check_permitted_alphabet_1(const void *sptr) {
	/* The underlying type is IA5String */
	const IA5String_t *st = (const IA5String_t *)sptr;
	const uint8_t *ch = st->buf;
	const uint8_t *end = ch + st->size;
	
	for(; ch < end; ch++) {
		uint8_t cv = *ch;
		if(!(cv >= 65 && cv <= 68)) return -1;
	}
	return 0;
}


/*** <<< CODE [SIZE-but-not-FROM] >>> ***/

int
SIZE_but_not_FROM_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
1394
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin's avatar
Lev Walkin committed
1395 1396 1397 1398
	const PER_Visible_t *st = (const PER_Visible_t *)sptr;
	size_t size;
	
	if(!sptr) {
1399
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	size = st->size;
	
	if((size >= 1 && size <= 4)
		 && !check_permitted_alphabet_1(st)) {
		/* Constraint check succeeded */
		return 0;
	} else {
1412
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

/*
 * This type is implemented using PER_Visible,
 * so here we adjust the DEF accordingly.
 */

Lev Walkin's avatar
Lev Walkin committed
1424 1425
/*** <<< CTDEFS [SIZE-but-not-FROM] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
1426
static asn_per_constraints_t asn_PER_type_SIZE_but_not_FROM_constr_1 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
1427 1428 1429 1430 1431
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_CONSTRAINED,	 2,  2,  1,  4 }	/* (SIZE(1..4)) */,
	0, 0	/* No PER character map necessary */
};

Lev Walkin's avatar
Lev Walkin committed
1432 1433
/*** <<< STAT-DEFS [SIZE-but-not-FROM] >>> ***/

1434
static const ber_tlv_tag_t asn_DEF_SIZE_but_not_FROM_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
1435 1436 1437 1438 1439
	(ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
};
asn_TYPE_descriptor_t asn_DEF_SIZE_but_not_FROM = {
	"SIZE-but-not-FROM",
	"SIZE-but-not-FROM",
1440
	&asn_OP_IA5String,
Lev Walkin's avatar
Lev Walkin committed
1441 1442 1443 1444 1445 1446 1447
	SIZE_but_not_FROM_constraint,
	asn_DEF_SIZE_but_not_FROM_tags_1,
	sizeof(asn_DEF_SIZE_but_not_FROM_tags_1)
		/sizeof(asn_DEF_SIZE_but_not_FROM_tags_1[0]), /* 1 */
	asn_DEF_SIZE_but_not_FROM_tags_1,	/* Same as above */
	sizeof(asn_DEF_SIZE_but_not_FROM_tags_1)
		/sizeof(asn_DEF_SIZE_but_not_FROM_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
1448
	0,	/* No OER visible constraints */
Lev Walkin's avatar
diffs  
Lev Walkin committed
1449
	&asn_PER_type_SIZE_but_not_FROM_constr_1,
Lev Walkin's avatar
Lev Walkin committed
1450 1451 1452 1453 1454 1455 1456
	0, 0,	/* No members */
	0	/* No specifics */
};


/*** <<< INCLUDES [SIZE-and-FROM] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
1457
#include "PER-Visible.h"
Lev Walkin's avatar
Lev Walkin committed
1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473

/*** <<< TYPE-DECLS [SIZE-and-FROM] >>> ***/

typedef PER_Visible_t	 SIZE_and_FROM_t;

/*** <<< FUNC-DECLS [SIZE-and-FROM] >>> ***/

extern asn_TYPE_descriptor_t asn_DEF_SIZE_and_FROM;
asn_struct_free_f SIZE_and_FROM_free;
asn_struct_print_f SIZE_and_FROM_print;
asn_constr_check_f SIZE_and_FROM_constraint;
ber_type_decoder_f SIZE_and_FROM_decode_ber;
der_type_encoder_f SIZE_and_FROM_encode_der;
xer_type_decoder_f SIZE_and_FROM_decode_xer;
xer_type_encoder_f SIZE_and_FROM_encode_xer;
per_type_decoder_f SIZE_and_FROM_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
1474
per_type_encoder_f SIZE_and_FROM_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495

/*** <<< CTABLES [SIZE-and-FROM] >>> ***/

static int check_permitted_alphabet_1(const void *sptr) {
	/* The underlying type is IA5String */
	const IA5String_t *st = (const IA5String_t *)sptr;
	const uint8_t *ch = st->buf;
	const uint8_t *end = ch + st->size;
	
	for(; ch < end; ch++) {
		uint8_t cv = *ch;
		if(!(cv >= 65 && cv <= 68)) return -1;
	}
	return 0;
}


/*** <<< CODE [SIZE-and-FROM] >>> ***/

int
SIZE_and_FROM_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
1496
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin's avatar
Lev Walkin committed
1497 1498 1499 1500
	const PER_Visible_t *st = (const PER_Visible_t *)sptr;
	size_t size;
	
	if(!sptr) {
1501
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	size = st->size;
	
	if((size >= 1 && size <= 4)
		 && !check_permitted_alphabet_1(st)) {
		/* Constraint check succeeded */
		return 0;
	} else {
1514
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

/*
 * This type is implemented using PER_Visible,
 * so here we adjust the DEF accordingly.
 */

Lev Walkin's avatar
Lev Walkin committed
1526 1527
/*** <<< CTDEFS [SIZE-and-FROM] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
1528
static asn_per_constraints_t asn_PER_type_SIZE_and_FROM_constr_1 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
1529 1530 1531 1532 1533
	{ APC_CONSTRAINED,	 2,  2,  65,  68 }	/* (65..68) */,
	{ APC_CONSTRAINED,	 2,  2,  1,  4 }	/* (SIZE(1..4)) */,
	0, 0	/* No PER character map necessary */
};

Lev Walkin's avatar
Lev Walkin committed
1534 1535
/*** <<< STAT-DEFS [SIZE-and-FROM] >>> ***/

1536
static const ber_tlv_tag_t asn_DEF_SIZE_and_FROM_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
1537 1538 1539 1540 1541
	(ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
};
asn_TYPE_descriptor_t asn_DEF_SIZE_and_FROM = {
	"SIZE-and-FROM",
	"SIZE-and-FROM",
1542
	&asn_OP_IA5String,
Lev Walkin's avatar
Lev Walkin committed
1543 1544 1545 1546 1547 1548 1549
	SIZE_and_FROM_constraint,
	asn_DEF_SIZE_and_FROM_tags_1,
	sizeof(asn_DEF_SIZE_and_FROM_tags_1)
		/sizeof(asn_DEF_SIZE_and_FROM_tags_1[0]), /* 1 */
	asn_DEF_SIZE_and_FROM_tags_1,	/* Same as above */
	sizeof(asn_DEF_SIZE_and_FROM_tags_1)
		/sizeof(asn_DEF_SIZE_and_FROM_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
1550
	0,	/* No OER visible constraints */
Lev Walkin's avatar
diffs  
Lev Walkin committed
1551
	&asn_PER_type_SIZE_and_FROM_constr_1,
Lev Walkin's avatar
Lev Walkin committed
1552 1553 1554 1555 1556 1557 1558
	0, 0,	/* No members */
	0	/* No specifics */
};


/*** <<< INCLUDES [Neither-SIZE-nor-FROM] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
1559
#include "PER-Visible.h"
Lev Walkin's avatar
Lev Walkin committed
1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575

/*** <<< TYPE-DECLS [Neither-SIZE-nor-FROM] >>> ***/

typedef PER_Visible_t	 Neither_SIZE_nor_FROM_t;

/*** <<< FUNC-DECLS [Neither-SIZE-nor-FROM] >>> ***/

extern asn_TYPE_descriptor_t asn_DEF_Neither_SIZE_nor_FROM;
asn_struct_free_f Neither_SIZE_nor_FROM_free;
asn_struct_print_f Neither_SIZE_nor_FROM_print;
asn_constr_check_f Neither_SIZE_nor_FROM_constraint;
ber_type_decoder_f Neither_SIZE_nor_FROM_decode_ber;
der_type_encoder_f Neither_SIZE_nor_FROM_encode_der;
xer_type_decoder_f Neither_SIZE_nor_FROM_decode_xer;
xer_type_encoder_f Neither_SIZE_nor_FROM_encode_xer;
per_type_decoder_f Neither_SIZE_nor_FROM_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
1576
per_type_encoder_f Neither_SIZE_nor_FROM_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597

/*** <<< CTABLES [Neither-SIZE-nor-FROM] >>> ***/

static int check_permitted_alphabet_1(const void *sptr) {
	/* The underlying type is IA5String */
	const IA5String_t *st = (const IA5String_t *)sptr;
	const uint8_t *ch = st->buf;
	const uint8_t *end = ch + st->size;
	
	for(; ch < end; ch++) {
		uint8_t cv = *ch;
		if(!(cv >= 65 && cv <= 70)) return -1;
	}
	return 0;
}


/*** <<< CODE [Neither-SIZE-nor-FROM] >>> ***/

int
Neither_SIZE_nor_FROM_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
1598
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin's avatar
Lev Walkin committed
1599 1600 1601
	const PER_Visible_t *st = (const PER_Visible_t *)sptr;
	
	if(!sptr) {
1602
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
1603 1604 1605 1606 1607 1608 1609 1610 1611 1612
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(!check_permitted_alphabet_1(st)) {
		/* Constraint check succeeded */
		return 0;
	} else {
1613
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

/*
 * This type is implemented using PER_Visible,
 * so here we adjust the DEF accordingly.
 */

Lev Walkin's avatar
Lev Walkin committed
1625 1626
/*** <<< CTDEFS [Neither-SIZE-nor-FROM] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
1627
static asn_per_constraints_t asn_PER_type_Neither_SIZE_nor_FROM_constr_1 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
1628 1629 1630 1631 1632
	{ APC_CONSTRAINED,	 3,  3,  65,  70 }	/* (65..70) */,
	{ APC_SEMI_CONSTRAINED,	-1, -1,  0,  0 }	/* (SIZE(0..MAX)) */,
	0, 0	/* No PER character map necessary */
};

Lev Walkin's avatar
Lev Walkin committed
1633 1634
/*** <<< STAT-DEFS [Neither-SIZE-nor-FROM] >>> ***/

1635
static const ber_tlv_tag_t asn_DEF_Neither_SIZE_nor_FROM_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
1636 1637 1638 1639 1640
	(ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Neither_SIZE_nor_FROM = {
	"Neither-SIZE-nor-FROM",
	"Neither-SIZE-nor-FROM",
1641
	&asn_OP_IA5String,
Lev Walkin's avatar
Lev Walkin committed
1642 1643 1644 1645 1646 1647 1648
	Neither_SIZE_nor_FROM_constraint,
	asn_DEF_Neither_SIZE_nor_FROM_tags_1,
	sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1)
		/sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1[0]), /* 1 */
	asn_DEF_Neither_SIZE_nor_FROM_tags_1,	/* Same as above */
	sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1)
		/sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
1649
	0,	/* No OER visible constraints */
Lev Walkin's avatar
diffs  
Lev Walkin committed
1650
	&asn_PER_type_Neither_SIZE_nor_FROM_constr_1,
Lev Walkin's avatar
Lev Walkin committed
1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674
	0, 0,	/* No members */
	0	/* No specifics */
};


/*** <<< INCLUDES [Utf8-4] >>> ***/

#include <UTF8String.h>

/*** <<< TYPE-DECLS [Utf8-4] >>> ***/

typedef UTF8String_t	 Utf8_4_t;

/*** <<< FUNC-DECLS [Utf8-4] >>> ***/

extern asn_TYPE_descriptor_t asn_DEF_Utf8_4;
asn_struct_free_f Utf8_4_free;
asn_struct_print_f Utf8_4_print;
asn_constr_check_f Utf8_4_constraint;
ber_type_decoder_f Utf8_4_decode_ber;
der_type_encoder_f Utf8_4_encode_der;
xer_type_decoder_f Utf8_4_decode_xer;
xer_type_encoder_f Utf8_4_encode_xer;
per_type_decoder_f Utf8_4_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
1675
per_type_encoder_f Utf8_4_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690

/*** <<< CTABLES [Utf8-4] >>> ***/

static int check_permitted_alphabet_1(const void *sptr) {
	if(UTF8String_length((const UTF8String_t *)sptr) < 0)
		return -1; /* Alphabet (sic!) test failed. */
	
	return 0;
}


/*** <<< CODE [Utf8-4] >>> ***/

int
Utf8_4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
1691
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin's avatar
Lev Walkin committed
1692 1693 1694
	const UTF8String_t *st = (const UTF8String_t *)sptr;
	
	if(!sptr) {
1695
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
1696 1697 1698 1699 1700 1701 1702 1703 1704 1705
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(!check_permitted_alphabet_1(st)) {
		/* Constraint check succeeded */
		return 0;
	} else {
1706
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

/*
 * This type is implemented using UTF8String,
 * so here we adjust the DEF accordingly.
 */

Lev Walkin's avatar
Lev Walkin committed
1718 1719
/*** <<< CTDEFS [Utf8-4] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
1720
static asn_per_constraints_t asn_PER_type_Utf8_4_constr_1 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
1721 1722 1723 1724 1725
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};

Lev Walkin's avatar
Lev Walkin committed
1726 1727
/*** <<< STAT-DEFS [Utf8-4] >>> ***/

1728
static const ber_tlv_tag_t asn_DEF_Utf8_4_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
1729 1730 1731 1732 1733
	(ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Utf8_4 = {
	"Utf8-4",
	"Utf8-4",
1734
	&asn_OP_UTF8String,
Lev Walkin's avatar
Lev Walkin committed
1735 1736 1737 1738 1739 1740 1741
	Utf8_4_constraint,
	asn_DEF_Utf8_4_tags_1,
	sizeof(asn_DEF_Utf8_4_tags_1)
		/sizeof(asn_DEF_Utf8_4_tags_1[0]), /* 1 */
	asn_DEF_Utf8_4_tags_1,	/* Same as above */
	sizeof(asn_DEF_Utf8_4_tags_1)
		/sizeof(asn_DEF_Utf8_4_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
1742
	0,	/* No OER visible constraints */
Lev Walkin's avatar
diffs  
Lev Walkin committed
1743
	&asn_PER_type_Utf8_4_constr_1,
Lev Walkin's avatar
Lev Walkin committed
1744 1745 1746 1747 1748 1749 1750
	0, 0,	/* No members */
	0	/* No specifics */
};


/*** <<< INCLUDES [Utf8-3] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
1751
#include "Utf8-2.h"
Lev Walkin's avatar
Lev Walkin committed
1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767

/*** <<< TYPE-DECLS [Utf8-3] >>> ***/

typedef Utf8_2_t	 Utf8_3_t;

/*** <<< FUNC-DECLS [Utf8-3] >>> ***/

extern asn_TYPE_descriptor_t asn_DEF_Utf8_3;
asn_struct_free_f Utf8_3_free;
asn_struct_print_f Utf8_3_print;
asn_constr_check_f Utf8_3_constraint;
ber_type_decoder_f Utf8_3_decode_ber;
der_type_encoder_f Utf8_3_encode_der;
xer_type_decoder_f Utf8_3_decode_xer;
xer_type_encoder_f Utf8_3_encode_xer;
per_type_decoder_f Utf8_3_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
1768
per_type_encoder_f Utf8_3_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
1769 1770 1771

/*** <<< CTABLES [Utf8-3] >>> ***/

1772
static const int permitted_alphabet_table_1[128] = {
1773 1774 1775 1776 1777 1778 1779 1780
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/*                  */
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/*                  */
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/*                  */
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/*                  */
 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,	/*  ABCDEFGHIJKLMNO */
16,17,18,19,20,21,22,23,24,25,26, 0, 0, 0, 0, 0,	/* PQRSTUVWXYZ      */
 0,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,	/*  abcdefghijklmno */
42,43,44,45,46,47,48,49,50,51,52, 0, 0, 0, 0, 0,	/* pqrstuvwxyz      */
Lev Walkin's avatar
Lev Walkin committed
1781 1782 1783
};

static int check_permitted_alphabet_1(const void *sptr) {
1784
	const int *table = permitted_alphabet_table_1;
Lev Walkin's avatar
Lev Walkin committed
1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802
	/* The underlying type is UTF8String */
	const UTF8String_t *st = (const UTF8String_t *)sptr;
	const uint8_t *ch = st->buf;
	const uint8_t *end = ch + st->size;
	
	for(; ch < end; ch++) {
		uint8_t cv = *ch;
		if(cv >= 0x80) return -1;
		if(!table[cv]) return -1;
	}
	return 0;
}


/*** <<< CODE [Utf8-3] >>> ***/

int
Utf8_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
1803
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin's avatar
Lev Walkin committed
1804 1805 1806 1807
	const Utf8_2_t *st = (const Utf8_2_t *)sptr;
	size_t size;
	
	if(!sptr) {
1808
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
1809 1810 1811 1812 1813 1814 1815
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	size = UTF8String_length(st);
	if((ssize_t)size < 0) {
1816
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
1817 1818 1819 1820 1821 1822 1823 1824 1825 1826
			"%s: UTF-8: broken encoding (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	if((size >= 1 && size <= 2)
		 && !check_permitted_alphabet_1(st)) {
		/* Constraint check succeeded */
		return 0;
	} else {
1827
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

/*
 * This type is implemented using Utf8_2,
 * so here we adjust the DEF accordingly.
 */

Lev Walkin's avatar
Lev Walkin committed
1839 1840
/*** <<< CTDEFS [Utf8-3] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
1841
static asn_per_constraints_t asn_PER_type_Utf8_3_constr_1 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
1842 1843 1844 1845 1846
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};

Lev Walkin's avatar
Lev Walkin committed
1847 1848
/*** <<< STAT-DEFS [Utf8-3] >>> ***/

1849
static const ber_tlv_tag_t asn_DEF_Utf8_3_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
1850 1851 1852 1853 1854
	(ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Utf8_3 = {
	"Utf8-3",
	"Utf8-3",
1855
	&asn_OP_UTF8String,
Lev Walkin's avatar
Lev Walkin committed
1856 1857 1858 1859 1860 1861 1862
	Utf8_3_constraint,
	asn_DEF_Utf8_3_tags_1,
	sizeof(asn_DEF_Utf8_3_tags_1)
		/sizeof(asn_DEF_Utf8_3_tags_1[0]), /* 1 */
	asn_DEF_Utf8_3_tags_1,	/* Same as above */
	sizeof(asn_DEF_Utf8_3_tags_1)
		/sizeof(asn_DEF_Utf8_3_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
1863
	0,	/* No OER visible constraints */
Lev Walkin's avatar
diffs  
Lev Walkin committed
1864
	&asn_PER_type_Utf8_3_constr_1,
Lev Walkin's avatar
Lev Walkin committed
1865 1866 1867 1868 1869 1870 1871
	0, 0,	/* No members */
	0	/* No specifics */
};


/*** <<< INCLUDES [Utf8-2] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
1872
#include "Utf8-1.h"
Lev Walkin's avatar
Lev Walkin committed
1873 1874 1875 1876 1877 1878 1879

/*** <<< TYPE-DECLS [Utf8-2] >>> ***/

typedef Utf8_1_t	 Utf8_2_t;

/*** <<< FUNC-DECLS [Utf8-2] >>> ***/

1880
extern asn_per_constraints_t asn_PER_type_Utf8_2_constr_1;
Lev Walkin's avatar
Lev Walkin committed
1881 1882 1883 1884 1885 1886 1887 1888 1889
extern asn_TYPE_descriptor_t asn_DEF_Utf8_2;
asn_struct_free_f Utf8_2_free;
asn_struct_print_f Utf8_2_print;
asn_constr_check_f Utf8_2_constraint;
ber_type_decoder_f Utf8_2_decode_ber;
der_type_encoder_f Utf8_2_encode_der;
xer_type_decoder_f Utf8_2_decode_xer;
xer_type_encoder_f Utf8_2_encode_xer;
per_type_decoder_f Utf8_2_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
1890
per_type_encoder_f Utf8_2_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
1891 1892 1893 1894 1895

/*** <<< CODE [Utf8-2] >>> ***/

int
Utf8_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
1896
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin's avatar
Lev Walkin committed
1897 1898 1899 1900
	const Utf8_1_t *st = (const Utf8_1_t *)sptr;
	size_t size;
	
	if(!sptr) {
1901
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
1902 1903 1904 1905 1906 1907 1908
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	size = UTF8String_length(st);
	if((ssize_t)size < 0) {
1909
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
1910 1911 1912 1913 1914 1915 1916 1917 1918
			"%s: UTF-8: broken encoding (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	if((size >= 1 && size <= 2)) {
		/* Constraint check succeeded */
		return 0;
	} else {
1919
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

/*
 * This type is implemented using Utf8_1,
 * so here we adjust the DEF accordingly.
 */

Lev Walkin's avatar
Lev Walkin committed
1931 1932
/*** <<< CTDEFS [Utf8-2] >>> ***/

1933
asn_per_constraints_t asn_PER_type_Utf8_2_constr_1 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
1934 1935 1936 1937 1938
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};

Lev Walkin's avatar
Lev Walkin committed
1939 1940
/*** <<< STAT-DEFS [Utf8-2] >>> ***/

1941
static const ber_tlv_tag_t asn_DEF_Utf8_2_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
1942 1943 1944 1945 1946
	(ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Utf8_2 = {
	"Utf8-2",
	"Utf8-2",
1947
	&asn_OP_UTF8String,
Lev Walkin's avatar
Lev Walkin committed
1948 1949 1950 1951 1952 1953 1954
	Utf8_2_constraint,
	asn_DEF_Utf8_2_tags_1,
	sizeof(asn_DEF_Utf8_2_tags_1)
		/sizeof(asn_DEF_Utf8_2_tags_1[0]), /* 1 */
	asn_DEF_Utf8_2_tags_1,	/* Same as above */
	sizeof(asn_DEF_Utf8_2_tags_1)
		/sizeof(asn_DEF_Utf8_2_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
1955
	0,	/* No OER visible constraints */
Lev Walkin's avatar
diffs  
Lev Walkin committed
1956
	&asn_PER_type_Utf8_2_constr_1,
Lev Walkin's avatar
Lev Walkin committed
1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980
	0, 0,	/* No members */
	0	/* No specifics */
};


/*** <<< INCLUDES [Utf8-1] >>> ***/

#include <UTF8String.h>

/*** <<< TYPE-DECLS [Utf8-1] >>> ***/

typedef UTF8String_t	 Utf8_1_t;

/*** <<< FUNC-DECLS [Utf8-1] >>> ***/

extern asn_TYPE_descriptor_t asn_DEF_Utf8_1;
asn_struct_free_f Utf8_1_free;
asn_struct_print_f Utf8_1_print;
asn_constr_check_f Utf8_1_constraint;
ber_type_decoder_f Utf8_1_decode_ber;
der_type_encoder_f Utf8_1_encode_der;
xer_type_decoder_f Utf8_1_decode_xer;
xer_type_encoder_f Utf8_1_encode_xer;
per_type_decoder_f Utf8_1_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
1981
per_type_encoder_f Utf8_1_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
1982 1983 1984 1985 1986 1987 1988 1989 1990 1991

/*** <<< CODE [Utf8-1] >>> ***/

/*
 * This type is implemented using UTF8String,
 * so here we adjust the DEF accordingly.
 */

/*** <<< STAT-DEFS [Utf8-1] >>> ***/

1992
static const ber_tlv_tag_t asn_DEF_Utf8_1_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
1993 1994 1995 1996 1997
	(ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Utf8_1 = {
	"Utf8-1",
	"Utf8-1",
1998
	&asn_OP_UTF8String,
1999
	UTF8String_constraint,
Lev Walkin's avatar
Lev Walkin committed
2000 2001 2002 2003 2004 2005
	asn_DEF_Utf8_1_tags_1,
	sizeof(asn_DEF_Utf8_1_tags_1)
		/sizeof(asn_DEF_Utf8_1_tags_1[0]), /* 1 */
	asn_DEF_Utf8_1_tags_1,	/* Same as above */
	sizeof(asn_DEF_Utf8_1_tags_1)
		/sizeof(asn_DEF_Utf8_1_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
2006
	0,	/* No OER visible constraints */
Lev Walkin's avatar
Lev Walkin committed
2007 2008 2009 2010 2011 2012 2013 2014
	0,	/* No PER visible constraints */
	0, 0,	/* No members */
	0	/* No specifics */
};


/*** <<< INCLUDES [VisibleIdentifier] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
2015
#include "Identifier.h"
Lev Walkin's avatar
Lev Walkin committed
2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031

/*** <<< TYPE-DECLS [VisibleIdentifier] >>> ***/

typedef Identifier_t	 VisibleIdentifier_t;

/*** <<< FUNC-DECLS [VisibleIdentifier] >>> ***/

extern asn_TYPE_descriptor_t asn_DEF_VisibleIdentifier;
asn_struct_free_f VisibleIdentifier_free;
asn_struct_print_f VisibleIdentifier_print;
asn_constr_check_f VisibleIdentifier_constraint;
ber_type_decoder_f VisibleIdentifier_decode_ber;
der_type_encoder_f VisibleIdentifier_encode_der;
xer_type_decoder_f VisibleIdentifier_decode_xer;
xer_type_encoder_f VisibleIdentifier_encode_xer;
per_type_decoder_f VisibleIdentifier_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
2032
per_type_encoder_f VisibleIdentifier_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
2033 2034 2035

/*** <<< CTABLES [VisibleIdentifier] >>> ***/

2036
static const int permitted_alphabet_table_1[256] = {
2037 2038 2039 2040 2041 2042 2043 2044
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/*                  */
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/*                  */
 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/*     $            */
 2, 3, 4, 5, 6, 7, 8, 9,10,11, 0, 0, 0, 0, 0, 0,	/* 0123456789       */
 0,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,	/*  ABCDEFGHIJKLMNO */
27,28,29,30,31,32,33,34,35,36,37, 0, 0, 0, 0,38,	/* PQRSTUVWXYZ    _ */
 0,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,	/*  abcdefghijklmno */
54,55,56,57,58,59,60,61,62,63,64, 0, 0, 0, 0, 0,	/* pqrstuvwxyz      */
Lev Walkin's avatar
Lev Walkin committed
2045
};
2046
static const int permitted_alphabet_code2value_1[64] = {
2047 2048 2049 2050 2051 2052
36,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,
70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,
86,87,88,89,90,95,97,98,99,100,101,102,103,104,105,106,
107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,
};

Lev Walkin's avatar
Lev Walkin committed
2053 2054

static int check_permitted_alphabet_1(const void *sptr) {
2055
	const int *table = permitted_alphabet_table_1;
Lev Walkin's avatar
Lev Walkin committed
2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072
	/* The underlying type is VisibleString */
	const VisibleString_t *st = (const VisibleString_t *)sptr;
	const uint8_t *ch = st->buf;
	const uint8_t *end = ch + st->size;
	
	for(; ch < end; ch++) {
		uint8_t cv = *ch;
		if(!table[cv]) return -1;
	}
	return 0;
}


/*** <<< CODE [VisibleIdentifier] >>> ***/

int
VisibleIdentifier_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
2073
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin's avatar
Lev Walkin committed
2074 2075 2076 2077
	const Identifier_t *st = (const Identifier_t *)sptr;
	size_t size;
	
	if(!sptr) {
2078
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	size = st->size;
	
	if((size >= 1 && size <= 32)
		 && !check_permitted_alphabet_1(st)) {
		/* Constraint check succeeded */
		return 0;
	} else {
2091
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
2092 2093 2094 2095 2096 2097
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

2098 2099 2100 2101 2102 2103 2104 2105 2106 2107
static int asn_PER_MAP_VisibleIdentifier_1_v2c(unsigned int value) {
	if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0]))
		return -1;
	return permitted_alphabet_table_1[value] - 1;
}
static int asn_PER_MAP_VisibleIdentifier_1_c2v(unsigned int code) {
	if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0]))
		return -1;
	return permitted_alphabet_code2value_1[code];
}
Lev Walkin's avatar
Lev Walkin committed
2108 2109 2110 2111 2112
/*
 * This type is implemented using Identifier,
 * so here we adjust the DEF accordingly.
 */

2113 2114 2115 2116 2117 2118 2119 2120 2121
/*** <<< CTDEFS [VisibleIdentifier] >>> ***/

static asn_per_constraints_t asn_PER_type_VisibleIdentifier_constr_1 GCC_NOTUSED = {
	{ APC_CONSTRAINED,	 6,  6,  36,  122 }	/* (36..122) */,
	{ APC_CONSTRAINED,	 5,  5,  1,  32 }	/* (SIZE(1..32)) */,
	asn_PER_MAP_VisibleIdentifier_1_v2c,	/* Value to PER code map */
	asn_PER_MAP_VisibleIdentifier_1_c2v	/* PER code to value map */
};

Lev Walkin's avatar
Lev Walkin committed
2122 2123
/*** <<< STAT-DEFS [VisibleIdentifier] >>> ***/

2124
static const ber_tlv_tag_t asn_DEF_VisibleIdentifier_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
2125 2126 2127 2128 2129
	(ASN_TAG_CLASS_UNIVERSAL | (26 << 2))
};
asn_TYPE_descriptor_t asn_DEF_VisibleIdentifier = {
	"VisibleIdentifier",
	"VisibleIdentifier",
2130
	&asn_OP_VisibleString,
Lev Walkin's avatar
Lev Walkin committed
2131 2132 2133 2134 2135 2136 2137
	VisibleIdentifier_constraint,
	asn_DEF_VisibleIdentifier_tags_1,
	sizeof(asn_DEF_VisibleIdentifier_tags_1)
		/sizeof(asn_DEF_VisibleIdentifier_tags_1[0]), /* 1 */
	asn_DEF_VisibleIdentifier_tags_1,	/* Same as above */
	sizeof(asn_DEF_VisibleIdentifier_tags_1)
		/sizeof(asn_DEF_VisibleIdentifier_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
2138
	0,	/* No OER visible constraints */
2139
	&asn_PER_type_VisibleIdentifier_constr_1,
Lev Walkin's avatar
Lev Walkin committed
2140 2141 2142 2143 2144 2145 2146
	0, 0,	/* No members */
	0	/* No specifics */
};


/*** <<< INCLUDES [Sequence] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
2147 2148
#include "Int1.h"
#include "Int4.h"
Lev Walkin's avatar
Lev Walkin committed
2149
#include <BOOLEAN.h>
2150
#include <NativeEnumerated.h>
Lev Walkin's avatar
Lev Walkin committed
2151
#include <NULL.h>
Lev Walkin's avatar
Lev Walkin committed
2152
#include "Int5.h"
Lev Walkin's avatar
Lev Walkin committed
2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163
#include <constr_SEQUENCE.h>

/*** <<< DEPS [Sequence] >>> ***/

typedef enum enum_c {
	enum_c_one	= 1,
	enum_c_two	= 2,
	/*
	 * Enumeration is extensible
	 */
	enum_c_three	= 3
Lev Walkin's avatar
Lev Walkin committed
2164
} e_enum_c;
Lev Walkin's avatar
Lev Walkin committed
2165 2166 2167 2168 2169 2170 2171

/*** <<< TYPE-DECLS [Sequence] >>> ***/

typedef struct Sequence {
	Int1_t	*int1_c	/* DEFAULT 3 */;
	Int4_t	 int4;
	Int4_t	 int4_c;
2172 2173
	BOOLEAN_t	*Bool	/* DEFAULT 1 */;
	long	 enum_c;
Lev Walkin's avatar
Lev Walkin committed
2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188
	NULL_t	*null	/* OPTIONAL */;
	/*
	 * This type is extensible,
	 * possible extensions are below.
	 */
	Int5_t	*int5_c	/* OPTIONAL */;
	
	/* Context for parsing across buffer boundaries */
	asn_struct_ctx_t _asn_ctx;
} Sequence_t;

/*** <<< FUNC-DECLS [Sequence] >>> ***/

/* extern asn_TYPE_descriptor_t asn_DEF_enum_c_6;	// (Use -fall-defs-global to expose) */
extern asn_TYPE_descriptor_t asn_DEF_Sequence;
2189 2190
extern asn_SEQUENCE_specifics_t asn_SPC_Sequence_specs_1;
extern asn_TYPE_member_t asn_MBR_Sequence_1[7];
Lev Walkin's avatar
Lev Walkin committed
2191 2192 2193 2194

/*** <<< CODE [Sequence] >>> ***/

/*
2195
 * This type is implemented using NativeEnumerated,
Lev Walkin's avatar
Lev Walkin committed
2196 2197 2198 2199
 * so here we adjust the DEF accordingly.
 */
static int
memb_int1_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
2200
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin's avatar
Lev Walkin committed
2201 2202 2203
	long value;
	
	if(!sptr) {
2204
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
2205 2206 2207 2208 2209
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
2210
	value = *(const long *)sptr;
Lev Walkin's avatar
Lev Walkin committed
2211 2212 2213 2214 2215
	
	if((value >= -2)) {
		/* Constraint check succeeded */
		return 0;
	} else {
2216
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
2217 2218 2219 2220 2221 2222 2223 2224
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static int
memb_int4_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
2225
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin's avatar
Lev Walkin committed
2226 2227 2228
	long value;
	
	if(!sptr) {
2229
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
2230 2231 2232 2233 2234
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
2235
	value = *(const long *)sptr;
Lev Walkin's avatar
Lev Walkin committed
2236 2237 2238 2239 2240
	
	if((value >= 5 && value <= 7)) {
		/* Constraint check succeeded */
		return 0;
	} else {
2241
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
2242 2243 2244 2245 2246 2247 2248 2249
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static int
memb_int5_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
2250
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin's avatar
Lev Walkin committed
2251 2252 2253
	long value;
	
	if(!sptr) {
2254
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
2255 2256 2257 2258 2259
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
2260
	value = *(const long *)sptr;
Lev Walkin's avatar
Lev Walkin committed
2261 2262 2263 2264 2265
	
	if((value == 5)) {
		/* Constraint check succeeded */
		return 0;
	} else {
2266
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
2267 2268 2269 2270 2271 2272 2273
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}


Lev Walkin's avatar
Lev Walkin committed
2274 2275
/*** <<< CTDEFS [Sequence] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
2276
static asn_per_constraints_t asn_PER_type_enum_c_constr_6 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
2277 2278 2279 2280
	{ APC_CONSTRAINED | APC_EXTENSIBLE,  1,  1,  0,  1 }	/* (0..1,...) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
Lev Walkin's avatar
Lev Walkin committed
2281
static asn_per_constraints_t asn_PER_memb_int1_c_constr_2 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
2282 2283 2284 2285
	{ APC_SEMI_CONSTRAINED,	-1, -1, -2,  0 }	/* (-2..MAX) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
Lev Walkin's avatar
Lev Walkin committed
2286
static asn_per_constraints_t asn_PER_memb_int4_c_constr_4 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
2287 2288 2289 2290
	{ APC_CONSTRAINED,	 2,  2,  5,  7 }	/* (5..7) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
Lev Walkin's avatar
Lev Walkin committed
2291
static asn_per_constraints_t asn_PER_memb_int5_c_constr_13 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
2292 2293 2294 2295 2296
	{ APC_CONSTRAINED,	 0,  0,  5,  5 }	/* (5..5) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};

Lev Walkin's avatar
Lev Walkin committed
2297 2298
/*** <<< STAT-DEFS [Sequence] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
2299
static int asn_DFL_2_set_3(int set_value, void **sptr) {
Lev Walkin's avatar
Lev Walkin committed
2300 2301 2302
	Int1_t *st = *sptr;
	
	if(!st) {
Lev Walkin's avatar
Lev Walkin committed
2303
		if(!set_value) return -1;	/* Not a default value */
Lev Walkin's avatar
Lev Walkin committed
2304 2305 2306 2307
		st = (*sptr = CALLOC(1, sizeof(*st)));
		if(!st) return -1;
	}
	
Lev Walkin's avatar
Lev Walkin committed
2308 2309
	if(set_value) {
		/* Install default value 3 */
2310 2311
		*st = 3;
		return 0;
Lev Walkin's avatar
Lev Walkin committed
2312 2313
	} else {
		/* Test default value 3 */
2314
		return (*st == 3);
Lev Walkin's avatar
Lev Walkin committed
2315
	}
Lev Walkin's avatar
Lev Walkin committed
2316
}
Lev Walkin's avatar
Lev Walkin committed
2317
static int asn_DFL_5_set_1(int set_value, void **sptr) {
Lev Walkin's avatar
Lev Walkin committed
2318 2319 2320
	BOOLEAN_t *st = *sptr;
	
	if(!st) {
Lev Walkin's avatar
Lev Walkin committed
2321
		if(!set_value) return -1;	/* Not a default value */
Lev Walkin's avatar
Lev Walkin committed
2322 2323 2324 2325
		st = (*sptr = CALLOC(1, sizeof(*st)));
		if(!st) return -1;
	}
	
Lev Walkin's avatar
Lev Walkin committed
2326 2327 2328 2329 2330 2331 2332 2333
	if(set_value) {
		/* Install default value 1 */
		*st = 1;
		return 0;
	} else {
		/* Test default value 1 */
		return (*st == 1);
	}
Lev Walkin's avatar
Lev Walkin committed
2334
}
2335
static const asn_INTEGER_enum_map_t asn_MAP_enum_c_value2enum_6[] = {
Lev Walkin's avatar
Lev Walkin committed
2336 2337 2338 2339 2340
	{ 1,	3,	"one" },
	{ 2,	3,	"two" },
	{ 3,	5,	"three" }
	/* This list is extensible */
};
2341
static const unsigned int asn_MAP_enum_c_enum2value_6[] = {
Lev Walkin's avatar
Lev Walkin committed
2342 2343 2344 2345 2346
	0,	/* one(1) */
	2,	/* three(3) */
	1	/* two(2) */
	/* This list is extensible */
};
2347
static const asn_INTEGER_specifics_t asn_SPC_enum_c_specs_6 = {
Lev Walkin's avatar
Lev Walkin committed
2348 2349 2350 2351
	asn_MAP_enum_c_value2enum_6,	/* "tag" => N; sorted by tag */
	asn_MAP_enum_c_enum2value_6,	/* N => "tag"; sorted by N */
	3,	/* Number of elements in the maps */
	3,	/* Extensions before this member */
2352 2353 2354
	1,	/* Strict enumeration */
	0,	/* Native long size */
	0
Lev Walkin's avatar
Lev Walkin committed
2355
};
2356
static const ber_tlv_tag_t asn_DEF_enum_c_tags_6[] = {
Lev Walkin's avatar
Lev Walkin committed
2357 2358 2359 2360 2361 2362
	(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_enum_c_6 = {
	"enum-c",
	"enum-c",
2363
	&asn_OP_NativeEnumerated,
2364
	NativeEnumerated_constraint,
Lev Walkin's avatar
Lev Walkin committed
2365 2366 2367 2368 2369 2370
	asn_DEF_enum_c_tags_6,
	sizeof(asn_DEF_enum_c_tags_6)
		/sizeof(asn_DEF_enum_c_tags_6[0]), /* 1 */
	asn_DEF_enum_c_tags_6,	/* Same as above */
	sizeof(asn_DEF_enum_c_tags_6)
		/sizeof(asn_DEF_enum_c_tags_6[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
2371
	0,	/* No OER visible constraints */
Lev Walkin's avatar
diffs  
Lev Walkin committed
2372
	&asn_PER_type_enum_c_constr_6,
Lev Walkin's avatar
Lev Walkin committed
2373 2374 2375 2376
	0, 0,	/* Defined elsewhere */
	&asn_SPC_enum_c_specs_6	/* Additional specs */
};

2377
asn_TYPE_member_t asn_MBR_Sequence_1[] = {
Lev Walkin's avatar
Lev Walkin committed
2378 2379 2380 2381
	{ ATF_POINTER, 1, offsetof(struct Sequence, int1_c),
		.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
		.tag_mode = 0,
		.type = &asn_DEF_Int1,
Lev Walkin's avatar
Lev Walkin committed
2382
		.type_selector = 0,
Lev Walkin's avatar
Lev Walkin committed
2383
		.memb_constraints = memb_int1_c_constraint_1,
Lev Walkin's avatar
Lev Walkin committed
2384
		.oer_constraints = 0,	/* OER is not compiled, use -gen-OER */
Lev Walkin's avatar
diffs  
Lev Walkin committed
2385
		.per_constraints = &asn_PER_memb_int1_c_constr_2,
Lev Walkin's avatar
Lev Walkin committed
2386 2387 2388 2389 2390 2391 2392
		.default_value = asn_DFL_2_set_3,	/* DEFAULT 3 */
		.name = "int1-c"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct Sequence, int4),
		.tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		.tag_mode = +1,	/* EXPLICIT tag at current level */
		.type = &asn_DEF_Int4,
Lev Walkin's avatar
Lev Walkin committed
2393
		.type_selector = 0,
Lev Walkin's avatar
Lev Walkin committed
2394
		.memb_constraints = 0,	/* Defer constraints checking to the member type */
Lev Walkin's avatar
Lev Walkin committed
2395
		.oer_constraints = 0,	/* OER is not compiled, use -gen-OER */
Lev Walkin's avatar
Lev Walkin committed
2396 2397 2398 2399 2400 2401 2402 2403
		.per_constraints = 0,	/* No PER visible constraints */
		.default_value = 0,
		.name = "int4"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct Sequence, int4_c),
		.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
		.tag_mode = 0,
		.type = &asn_DEF_Int4,
Lev Walkin's avatar
Lev Walkin committed
2404
		.type_selector = 0,
Lev Walkin's avatar
Lev Walkin committed
2405
		.memb_constraints = memb_int4_c_constraint_1,
Lev Walkin's avatar
Lev Walkin committed
2406
		.oer_constraints = 0,	/* OER is not compiled, use -gen-OER */
Lev Walkin's avatar
diffs  
Lev Walkin committed
2407
		.per_constraints = &asn_PER_memb_int4_c_constr_4,
Lev Walkin's avatar
Lev Walkin committed
2408 2409 2410
		.default_value = 0,
		.name = "int4-c"
		},
2411
	{ ATF_POINTER, 1, offsetof(struct Sequence, Bool),
Lev Walkin's avatar
Lev Walkin committed
2412 2413 2414
		.tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
		.tag_mode = 0,
		.type = &asn_DEF_BOOLEAN,
Lev Walkin's avatar
Lev Walkin committed
2415
		.type_selector = 0,
Lev Walkin's avatar
Lev Walkin committed
2416
		.memb_constraints = 0,	/* Defer constraints checking to the member type */
Lev Walkin's avatar
Lev Walkin committed
2417
		.oer_constraints = 0,	/* OER is not compiled, use -gen-OER */
Lev Walkin's avatar
Lev Walkin committed
2418 2419 2420 2421 2422 2423 2424 2425
		.per_constraints = 0,	/* No PER visible constraints */
		.default_value = asn_DFL_5_set_1,	/* DEFAULT 1 */
		.name = "bool"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct Sequence, enum_c),
		.tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
		.tag_mode = 0,
		.type = &asn_DEF_enum_c_6,
Lev Walkin's avatar
Lev Walkin committed
2426
		.type_selector = 0,
Lev Walkin's avatar
Lev Walkin committed
2427
		.memb_constraints = 0,	/* Defer constraints checking to the member type */
Lev Walkin's avatar
Lev Walkin committed
2428
		.oer_constraints = 0,	/* OER is not compiled, use -gen-OER */
2429
		.per_constraints = 0,	/* No PER visible constraints */
Lev Walkin's avatar
Lev Walkin committed
2430 2431 2432 2433 2434 2435 2436
		.default_value = 0,
		.name = "enum-c"
		},
	{ ATF_POINTER, 2, offsetof(struct Sequence, null),
		.tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)),
		.tag_mode = 0,
		.type = &asn_DEF_NULL,
Lev Walkin's avatar
Lev Walkin committed
2437
		.type_selector = 0,
Lev Walkin's avatar
Lev Walkin committed
2438
		.memb_constraints = 0,	/* Defer constraints checking to the member type */
Lev Walkin's avatar
Lev Walkin committed
2439
		.oer_constraints = 0,	/* OER is not compiled, use -gen-OER */
Lev Walkin's avatar
Lev Walkin committed
2440 2441 2442 2443 2444 2445 2446 2447
		.per_constraints = 0,	/* No PER visible constraints */
		.default_value = 0,
		.name = "null"
		},
	{ ATF_POINTER, 1, offsetof(struct Sequence, int5_c),
		.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
		.tag_mode = 0,
		.type = &asn_DEF_Int5,
Lev Walkin's avatar
Lev Walkin committed
2448
		.type_selector = 0,
Lev Walkin's avatar
Lev Walkin committed
2449
		.memb_constraints = memb_int5_c_constraint_1,
Lev Walkin's avatar
Lev Walkin committed
2450
		.oer_constraints = 0,	/* OER is not compiled, use -gen-OER */
Lev Walkin's avatar
diffs  
Lev Walkin committed
2451
		.per_constraints = &asn_PER_memb_int5_c_constr_13,
Lev Walkin's avatar
Lev Walkin committed
2452 2453 2454 2455
		.default_value = 0,
		.name = "int5-c"
		},
};
2456 2457
static const int asn_MAP_Sequence_oms_1[] = { 0, 3, 5, 6 };
static const ber_tlv_tag_t asn_DEF_Sequence_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
2458 2459
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
2460
static const asn_TYPE_tag2member_t asn_MAP_Sequence_tag2el_1[] = {
Lev Walkin's avatar
Lev Walkin committed
2461 2462 2463 2464 2465 2466 2467
    { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool */
    { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2 }, /* int1-c */
    { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -1, 1 }, /* int4-c */
    { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 6, -2, 0 }, /* int5-c */
    { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 5, 0, 0 }, /* null */
    { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 4, 0, 0 }, /* enum-c */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 } /* int4 */
Lev Walkin's avatar
Lev Walkin committed
2468
};
2469
asn_SEQUENCE_specifics_t asn_SPC_Sequence_specs_1 = {
Lev Walkin's avatar
Lev Walkin committed
2470 2471
	sizeof(struct Sequence),
	offsetof(struct Sequence, _asn_ctx),
Lev Walkin's avatar
Lev Walkin committed
2472 2473
	.tag2el = asn_MAP_Sequence_tag2el_1,
	.tag2el_count = 7,	/* Count of tags in the map */
Lev Walkin's avatar
Lev Walkin committed
2474 2475 2476 2477 2478 2479 2480 2481
	asn_MAP_Sequence_oms_1,	/* Optional members */
	3, 1,	/* Root/Additions */
	5,	/* Start extensions */
	8	/* Stop extensions */
};
asn_TYPE_descriptor_t asn_DEF_Sequence = {
	"Sequence",
	"Sequence",
2482
	&asn_OP_SEQUENCE,
Lev Walkin's avatar
Lev Walkin committed
2483 2484 2485 2486 2487 2488 2489
	SEQUENCE_constraint,
	asn_DEF_Sequence_tags_1,
	sizeof(asn_DEF_Sequence_tags_1)
		/sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
	asn_DEF_Sequence_tags_1,	/* Same as above */
	sizeof(asn_DEF_Sequence_tags_1)
		/sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
2490
	0,	/* No OER visible constraints */
Lev Walkin's avatar
Lev Walkin committed
2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521
	0,	/* No PER visible constraints */
	asn_MBR_Sequence_1,
	7,	/* Elements count */
	&asn_SPC_Sequence_specs_1	/* Additional specs */
};


/*** <<< INCLUDES [SequenceOf] >>> ***/

#include <asn_SEQUENCE_OF.h>
#include <constr_SEQUENCE_OF.h>

/*** <<< FWD-DECLS [SequenceOf] >>> ***/

struct Sequence;

/*** <<< TYPE-DECLS [SequenceOf] >>> ***/

typedef struct SequenceOf {
	A_SEQUENCE_OF(struct Sequence) list;
	
	/* Context for parsing across buffer boundaries */
	asn_struct_ctx_t _asn_ctx;
} SequenceOf_t;

/*** <<< FUNC-DECLS [SequenceOf] >>> ***/

extern asn_TYPE_descriptor_t asn_DEF_SequenceOf;

/*** <<< POST-INCLUDE [SequenceOf] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
2522
#include "Sequence.h"
Lev Walkin's avatar
Lev Walkin committed
2523

Lev Walkin's avatar
Lev Walkin committed
2524 2525
/*** <<< CTDEFS [SequenceOf] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
2526
static asn_per_constraints_t asn_PER_type_SequenceOf_constr_1 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
2527 2528 2529 2530 2531
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_CONSTRAINED,	 1,  1,  1,  2 }	/* (SIZE(1..2)) */,
	0, 0	/* No PER value map */
};

Lev Walkin's avatar
Lev Walkin committed
2532 2533 2534 2535 2536 2537 2538
/*** <<< STAT-DEFS [SequenceOf] >>> ***/

static asn_TYPE_member_t asn_MBR_SequenceOf_1[] = {
	{ ATF_POINTER, 0, 0,
		.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		.tag_mode = 0,
		.type = &asn_DEF_Sequence,
Lev Walkin's avatar
Lev Walkin committed
2539
		.type_selector = 0,
Lev Walkin's avatar
Lev Walkin committed
2540
		.memb_constraints = 0,	/* Defer constraints checking to the member type */
Lev Walkin's avatar
Lev Walkin committed
2541
		.oer_constraints = 0,	/* OER is not compiled, use -gen-OER */
Lev Walkin's avatar
Lev Walkin committed
2542 2543 2544 2545 2546
		.per_constraints = 0,	/* No PER visible constraints */
		.default_value = 0,
		.name = ""
		},
};
2547
static const ber_tlv_tag_t asn_DEF_SequenceOf_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
2548 2549 2550 2551 2552 2553 2554 2555 2556 2557
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_SequenceOf_specs_1 = {
	sizeof(struct SequenceOf),
	offsetof(struct SequenceOf, _asn_ctx),
	0,	/* XER encoding is XMLDelimitedItemList */
};
asn_TYPE_descriptor_t asn_DEF_SequenceOf = {
	"SequenceOf",
	"SequenceOf",
2558
	&asn_OP_SEQUENCE_OF,
Lev Walkin's avatar
Lev Walkin committed
2559 2560 2561 2562 2563 2564 2565
	SEQUENCE_OF_constraint,
	asn_DEF_SequenceOf_tags_1,
	sizeof(asn_DEF_SequenceOf_tags_1)
		/sizeof(asn_DEF_SequenceOf_tags_1[0]), /* 1 */
	asn_DEF_SequenceOf_tags_1,	/* Same as above */
	sizeof(asn_DEF_SequenceOf_tags_1)
		/sizeof(asn_DEF_SequenceOf_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
2566
	0,	/* No OER visible constraints */
Lev Walkin's avatar
diffs  
Lev Walkin committed
2567
	&asn_PER_type_SequenceOf_constr_1,
Lev Walkin's avatar
Lev Walkin committed
2568 2569 2570 2571 2572 2573 2574 2575
	asn_MBR_SequenceOf_1,
	1,	/* Single element */
	&asn_SPC_SequenceOf_specs_1	/* Additional specs */
};


/*** <<< INCLUDES [Enum0] >>> ***/

2576
#include <NativeEnumerated.h>
Lev Walkin's avatar
Lev Walkin committed
2577 2578 2579 2580 2581 2582

/*** <<< DEPS [Enum0] >>> ***/

typedef enum Enum0 {
	Enum0_one	= 0,
	Enum0_two	= 1
Lev Walkin's avatar
Lev Walkin committed
2583
} e_Enum0;
Lev Walkin's avatar
Lev Walkin committed
2584 2585 2586

/*** <<< TYPE-DECLS [Enum0] >>> ***/

2587
typedef long	 Enum0_t;
Lev Walkin's avatar
Lev Walkin committed
2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599

/*** <<< FUNC-DECLS [Enum0] >>> ***/

extern asn_TYPE_descriptor_t asn_DEF_Enum0;
asn_struct_free_f Enum0_free;
asn_struct_print_f Enum0_print;
asn_constr_check_f Enum0_constraint;
ber_type_decoder_f Enum0_decode_ber;
der_type_encoder_f Enum0_encode_der;
xer_type_decoder_f Enum0_decode_xer;
xer_type_encoder_f Enum0_encode_xer;
per_type_decoder_f Enum0_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
2600
per_type_encoder_f Enum0_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
2601 2602 2603 2604

/*** <<< CODE [Enum0] >>> ***/

/*
2605
 * This type is implemented using NativeEnumerated,
Lev Walkin's avatar
Lev Walkin committed
2606 2607 2608
 * so here we adjust the DEF accordingly.
 */

Lev Walkin's avatar
Lev Walkin committed
2609 2610
/*** <<< CTDEFS [Enum0] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
2611
static asn_per_constraints_t asn_PER_type_Enum0_constr_1 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
2612 2613 2614 2615 2616
	{ APC_CONSTRAINED,	 1,  1,  0,  1 }	/* (0..1) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};

Lev Walkin's avatar
Lev Walkin committed
2617 2618
/*** <<< STAT-DEFS [Enum0] >>> ***/

2619
static const asn_INTEGER_enum_map_t asn_MAP_Enum0_value2enum_1[] = {
Lev Walkin's avatar
Lev Walkin committed
2620 2621 2622
	{ 0,	3,	"one" },
	{ 1,	3,	"two" }
};
2623
static const unsigned int asn_MAP_Enum0_enum2value_1[] = {
Lev Walkin's avatar
Lev Walkin committed
2624 2625 2626
	0,	/* one(0) */
	1	/* two(1) */
};
2627
static const asn_INTEGER_specifics_t asn_SPC_Enum0_specs_1 = {
Lev Walkin's avatar
Lev Walkin committed
2628 2629 2630 2631
	asn_MAP_Enum0_value2enum_1,	/* "tag" => N; sorted by tag */
	asn_MAP_Enum0_enum2value_1,	/* N => "tag"; sorted by N */
	2,	/* Number of elements in the maps */
	0,	/* Enumeration is not extensible */
2632 2633 2634
	1,	/* Strict enumeration */
	0,	/* Native long size */
	0
Lev Walkin's avatar
Lev Walkin committed
2635
};
2636
static const ber_tlv_tag_t asn_DEF_Enum0_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
2637 2638 2639 2640 2641
	(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Enum0 = {
	"Enum0",
	"Enum0",
2642
	&asn_OP_NativeEnumerated,
2643
	NativeEnumerated_constraint,
Lev Walkin's avatar
Lev Walkin committed
2644 2645 2646 2647 2648 2649
	asn_DEF_Enum0_tags_1,
	sizeof(asn_DEF_Enum0_tags_1)
		/sizeof(asn_DEF_Enum0_tags_1[0]), /* 1 */
	asn_DEF_Enum0_tags_1,	/* Same as above */
	sizeof(asn_DEF_Enum0_tags_1)
		/sizeof(asn_DEF_Enum0_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
2650
	0,	/* No OER visible constraints */
Lev Walkin's avatar
diffs  
Lev Walkin committed
2651
	&asn_PER_type_Enum0_constr_1,
Lev Walkin's avatar
Lev Walkin committed
2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665
	0, 0,	/* Defined elsewhere */
	&asn_SPC_Enum0_specs_1	/* Additional specs */
};


/*** <<< INCLUDES [Enum1] >>> ***/

#include <NativeEnumerated.h>

/*** <<< DEPS [Enum1] >>> ***/

typedef enum Enum1 {
	Enum1_one	= 0,
	Enum1_two	= 1
Lev Walkin's avatar
Lev Walkin committed
2666
} e_Enum1;
Lev Walkin's avatar
Lev Walkin committed
2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682

/*** <<< TYPE-DECLS [Enum1] >>> ***/

typedef long	 Enum1_t;

/*** <<< FUNC-DECLS [Enum1] >>> ***/

extern asn_TYPE_descriptor_t asn_DEF_Enum1;
asn_struct_free_f Enum1_free;
asn_struct_print_f Enum1_print;
asn_constr_check_f Enum1_constraint;
ber_type_decoder_f Enum1_decode_ber;
der_type_encoder_f Enum1_encode_der;
xer_type_decoder_f Enum1_decode_xer;
xer_type_encoder_f Enum1_encode_xer;
per_type_decoder_f Enum1_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
2683
per_type_encoder_f Enum1_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
2684 2685 2686 2687 2688

/*** <<< CODE [Enum1] >>> ***/

int
Enum1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
2689
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin's avatar
Lev Walkin committed
2690 2691 2692
	long value;
	
	if(!sptr) {
2693
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value == 0)) {
		/* Constraint check succeeded */
		return 0;
	} else {
2705
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

/*
 * This type is implemented using NativeEnumerated,
 * so here we adjust the DEF accordingly.
 */

Lev Walkin's avatar
Lev Walkin committed
2717 2718
/*** <<< CTDEFS [Enum1] >>> ***/

Lev Walkin's avatar
Lev Walkin committed
2719
static asn_per_constraints_t asn_PER_type_Enum1_constr_1 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
2720 2721 2722 2723 2724
	{ APC_CONSTRAINED,	 1,  1,  0,  1 }	/* (0..1) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};

Lev Walkin's avatar
Lev Walkin committed
2725 2726
/*** <<< STAT-DEFS [Enum1] >>> ***/

2727
static const asn_INTEGER_enum_map_t asn_MAP_Enum1_value2enum_1[] = {
Lev Walkin's avatar
Lev Walkin committed
2728 2729 2730
	{ 0,	3,	"one" },
	{ 1,	3,	"two" }
};
2731
static const unsigned int asn_MAP_Enum1_enum2value_1[] = {
Lev Walkin's avatar
Lev Walkin committed
2732 2733 2734
	0,	/* one(0) */
	1	/* two(1) */
};
2735
static const asn_INTEGER_specifics_t asn_SPC_Enum1_specs_1 = {
Lev Walkin's avatar
Lev Walkin committed
2736 2737 2738 2739
	asn_MAP_Enum1_value2enum_1,	/* "tag" => N; sorted by tag */
	asn_MAP_Enum1_enum2value_1,	/* N => "tag"; sorted by N */
	2,	/* Number of elements in the maps */
	0,	/* Enumeration is not extensible */
2740 2741 2742
	1,	/* Strict enumeration */
	0,	/* Native long size */
	0
Lev Walkin's avatar
Lev Walkin committed
2743
};
2744
static const ber_tlv_tag_t asn_DEF_Enum1_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
2745 2746 2747 2748 2749
	(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Enum1 = {
	"Enum1",
	"Enum1",
2750
	&asn_OP_NativeEnumerated,
Lev Walkin's avatar
Lev Walkin committed
2751 2752 2753 2754 2755 2756 2757
	Enum1_constraint,
	asn_DEF_Enum1_tags_1,
	sizeof(asn_DEF_Enum1_tags_1)
		/sizeof(asn_DEF_Enum1_tags_1[0]), /* 1 */
	asn_DEF_Enum1_tags_1,	/* Same as above */
	sizeof(asn_DEF_Enum1_tags_1)
		/sizeof(asn_DEF_Enum1_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
2758
	0,	/* No OER visible constraints */
Lev Walkin's avatar
diffs  
Lev Walkin committed
2759
	&asn_PER_type_Enum1_constr_1,
Lev Walkin's avatar
Lev Walkin committed
2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774
	0, 0,	/* Defined elsewhere */
	&asn_SPC_Enum1_specs_1	/* Additional specs */
};


/*** <<< INCLUDES [Identifier] >>> ***/

#include <VisibleString.h>

/*** <<< TYPE-DECLS [Identifier] >>> ***/

typedef VisibleString_t	 Identifier_t;

/*** <<< FUNC-DECLS [Identifier] >>> ***/

2775
extern asn_per_constraints_t asn_PER_type_Identifier_constr_1;
Lev Walkin's avatar
Lev Walkin committed
2776 2777 2778 2779 2780 2781 2782 2783 2784
extern asn_TYPE_descriptor_t asn_DEF_Identifier;
asn_struct_free_f Identifier_free;
asn_struct_print_f Identifier_print;
asn_constr_check_f Identifier_constraint;
ber_type_decoder_f Identifier_decode_ber;
der_type_encoder_f Identifier_encode_der;
xer_type_decoder_f Identifier_decode_xer;
xer_type_encoder_f Identifier_encode_xer;
per_type_decoder_f Identifier_decode_uper;
Lev Walkin's avatar
Lev Walkin committed
2785
per_type_encoder_f Identifier_encode_uper;
Lev Walkin's avatar
Lev Walkin committed
2786 2787 2788

/*** <<< CTABLES [Identifier] >>> ***/

2789
static const int permitted_alphabet_table_1[256] = {
2790 2791 2792 2793 2794 2795 2796 2797
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/*                  */
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/*                  */
 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/*     $            */
 2, 3, 4, 5, 6, 7, 8, 9,10,11, 0, 0, 0, 0, 0, 0,	/* 0123456789       */
 0,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,	/*  ABCDEFGHIJKLMNO */
27,28,29,30,31,32,33,34,35,36,37, 0, 0, 0, 0,38,	/* PQRSTUVWXYZ    _ */
 0,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,	/*  abcdefghijklmno */
54,55,56,57,58,59,60,61,62,63,64, 0, 0, 0, 0, 0,	/* pqrstuvwxyz      */
Lev Walkin's avatar
Lev Walkin committed
2798
};
2799
static const int permitted_alphabet_code2value_1[64] = {
2800 2801 2802 2803 2804 2805
36,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,
70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,
86,87,88,89,90,95,97,98,99,100,101,102,103,104,105,106,
107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,
};

Lev Walkin's avatar
Lev Walkin committed
2806 2807

static int check_permitted_alphabet_1(const void *sptr) {
2808
	const int *table = permitted_alphabet_table_1;
Lev Walkin's avatar
Lev Walkin committed
2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825
	/* The underlying type is VisibleString */
	const VisibleString_t *st = (const VisibleString_t *)sptr;
	const uint8_t *ch = st->buf;
	const uint8_t *end = ch + st->size;
	
	for(; ch < end; ch++) {
		uint8_t cv = *ch;
		if(!table[cv]) return -1;
	}
	return 0;
}


/*** <<< CODE [Identifier] >>> ***/

int
Identifier_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin's avatar
Lev Walkin committed
2826
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin's avatar
Lev Walkin committed
2827 2828 2829 2830
	const VisibleString_t *st = (const VisibleString_t *)sptr;
	size_t size;
	
	if(!sptr) {
2831
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	size = st->size;
	
	if((size >= 1 && size <= 32)
		 && !check_permitted_alphabet_1(st)) {
		/* Constraint check succeeded */
		return 0;
	} else {
2844
		ASN__CTFAIL(app_key, td, sptr,
Lev Walkin's avatar
Lev Walkin committed
2845 2846 2847 2848 2849 2850
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

Lev Walkin's avatar
Lev Walkin committed
2851 2852 2853 2854 2855 2856 2857 2858 2859 2860
static int asn_PER_MAP_Identifier_1_v2c(unsigned int value) {
	if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0]))
		return -1;
	return permitted_alphabet_table_1[value] - 1;
}
static int asn_PER_MAP_Identifier_1_c2v(unsigned int code) {
	if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0]))
		return -1;
	return permitted_alphabet_code2value_1[code];
}
Lev Walkin's avatar
Lev Walkin committed
2861 2862 2863 2864 2865
/*
 * This type is implemented using VisibleString,
 * so here we adjust the DEF accordingly.
 */

Lev Walkin's avatar
Lev Walkin committed
2866 2867
/*** <<< CTDEFS [Identifier] >>> ***/

2868
asn_per_constraints_t asn_PER_type_Identifier_constr_1 GCC_NOTUSED = {
Lev Walkin's avatar
Lev Walkin committed
2869 2870 2871 2872 2873 2874
	{ APC_CONSTRAINED,	 6,  6,  36,  122 }	/* (36..122) */,
	{ APC_CONSTRAINED,	 5,  5,  1,  32 }	/* (SIZE(1..32)) */,
	asn_PER_MAP_Identifier_1_v2c,	/* Value to PER code map */
	asn_PER_MAP_Identifier_1_c2v	/* PER code to value map */
};

Lev Walkin's avatar
Lev Walkin committed
2875 2876
/*** <<< STAT-DEFS [Identifier] >>> ***/

2877
static const ber_tlv_tag_t asn_DEF_Identifier_tags_1[] = {
Lev Walkin's avatar
Lev Walkin committed
2878 2879 2880 2881 2882
	(ASN_TAG_CLASS_UNIVERSAL | (26 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Identifier = {
	"Identifier",
	"Identifier",
2883
	&asn_OP_VisibleString,
Lev Walkin's avatar
Lev Walkin committed
2884 2885 2886 2887 2888 2889 2890
	Identifier_constraint,
	asn_DEF_Identifier_tags_1,
	sizeof(asn_DEF_Identifier_tags_1)
		/sizeof(asn_DEF_Identifier_tags_1[0]), /* 1 */
	asn_DEF_Identifier_tags_1,	/* Same as above */
	sizeof(asn_DEF_Identifier_tags_1)
		/sizeof(asn_DEF_Identifier_tags_1[0]), /* 1 */
Lev Walkin's avatar
Lev Walkin committed
2891
	0,	/* No OER visible constraints */
Lev Walkin's avatar
diffs  
Lev Walkin committed
2892
	&asn_PER_type_Identifier_constr_1,
Lev Walkin's avatar
Lev Walkin committed
2893 2894 2895 2896
	0, 0,	/* No members */
	0	/* No specifics */
};