blob: 592e869f5752f99e7c10fb761bdfbfe3311274d2 [file] [log] [blame]
Lev Walkinc8285712005-03-04 22:18:20 +00001
2/*** <<< INCLUDES [Type] >>> ***/
3
4#include <asn_SEQUENCE_OF.h>
5#include <constr_SEQUENCE_OF.h>
6#include <constr_SEQUENCE.h>
7
8/*** <<< FWD-DECLS [Type] >>> ***/
9
Lev Walkind20f1742017-10-08 23:02:34 -070010struct EpytRef;
Lev Walkinc8285712005-03-04 22:18:20 +000011
12/*** <<< TYPE-DECLS [Type] >>> ***/
13
14typedef struct Type {
15 struct data {
Lev Walkind20f1742017-10-08 23:02:34 -070016 A_SEQUENCE_OF(struct EpytRef) list;
Lev Walkinc8285712005-03-04 22:18:20 +000017
18 /* Context for parsing across buffer boundaries */
19 asn_struct_ctx_t _asn_ctx;
20 } data;
21
22 /* Context for parsing across buffer boundaries */
23 asn_struct_ctx_t _asn_ctx;
24} Type_t;
25
26/*** <<< FUNC-DECLS [Type] >>> ***/
27
28extern asn_TYPE_descriptor_t asn_DEF_Type;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080029extern asn_SEQUENCE_specifics_t asn_SPC_Type_specs_1;
30extern asn_TYPE_member_t asn_MBR_Type_1[1];
Lev Walkinc8285712005-03-04 22:18:20 +000031
32/*** <<< POST-INCLUDE [Type] >>> ***/
33
Lev Walkin22b5ed42006-09-13 02:51:20 +000034#include "EpytRef.h"
Lev Walkinc8285712005-03-04 22:18:20 +000035
36/*** <<< STAT-DEFS [Type] >>> ***/
37
38static asn_TYPE_member_t asn_MBR_data_2[] = {
Lev Walkin8eb4b572005-08-16 16:57:17 +000039 { ATF_POINTER, 0, 0,
Lev Walkinc8285712005-03-04 22:18:20 +000040 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
41 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +000042 .type = &asn_DEF_EpytRef,
Lev Walkin67a30122017-08-10 05:48:54 -070043 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -070044 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -070045 0, 0, /* No default value */
Lev Walkinc8285712005-03-04 22:18:20 +000046 .name = ""
47 },
48};
Lev Walkina7591b52014-10-12 18:37:35 -070049static const ber_tlv_tag_t asn_DEF_data_tags_2[] = {
Lev Walkinc8285712005-03-04 22:18:20 +000050 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
51};
Lev Walkin59b176e2005-11-26 11:25:14 +000052static asn_SET_OF_specifics_t asn_SPC_data_specs_2 = {
Lev Walkinc8285712005-03-04 22:18:20 +000053 sizeof(struct data),
54 offsetof(struct data, _asn_ctx),
55 0, /* XER encoding is XMLDelimitedItemList */
56};
57static /* Use -fall-defs-global to expose */
58asn_TYPE_descriptor_t asn_DEF_data_2 = {
59 "data",
60 "data",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +080061 &asn_OP_SEQUENCE_OF,
Lev Walkin59b176e2005-11-26 11:25:14 +000062 asn_DEF_data_tags_2,
63 sizeof(asn_DEF_data_tags_2)
64 /sizeof(asn_DEF_data_tags_2[0]), /* 1 */
65 asn_DEF_data_tags_2, /* Same as above */
66 sizeof(asn_DEF_data_tags_2)
67 /sizeof(asn_DEF_data_tags_2[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -070068 { 0, 0, SEQUENCE_OF_constraint },
Lev Walkinc8285712005-03-04 22:18:20 +000069 asn_MBR_data_2,
70 1, /* Single element */
Lev Walkin59b176e2005-11-26 11:25:14 +000071 &asn_SPC_data_specs_2 /* Additional specs */
Lev Walkinc8285712005-03-04 22:18:20 +000072};
73
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080074asn_TYPE_member_t asn_MBR_Type_1[] = {
Lev Walkinc8285712005-03-04 22:18:20 +000075 { ATF_NOFLAGS, 0, offsetof(struct Type, data),
76 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
77 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +000078 .type = &asn_DEF_data_2,
Lev Walkin67a30122017-08-10 05:48:54 -070079 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -070080 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -070081 0, 0, /* No default value */
Lev Walkinc8285712005-03-04 22:18:20 +000082 .name = "data"
83 },
84};
Lev Walkina7591b52014-10-12 18:37:35 -070085static const ber_tlv_tag_t asn_DEF_Type_tags_1[] = {
Lev Walkinc8285712005-03-04 22:18:20 +000086 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
87};
Lev Walkina7591b52014-10-12 18:37:35 -070088static const asn_TYPE_tag2member_t asn_MAP_Type_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070089 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* data */
Lev Walkinc8285712005-03-04 22:18:20 +000090};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080091asn_SEQUENCE_specifics_t asn_SPC_Type_specs_1 = {
Lev Walkinc8285712005-03-04 22:18:20 +000092 sizeof(struct Type),
93 offsetof(struct Type, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -070094 .tag2el = asn_MAP_Type_tag2el_1,
95 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +000096 0, 0, 0, /* Optional elements (not needed) */
Lev Walkindf2edbb2017-10-21 13:40:07 -070097 -1, /* First extension addition */
Lev Walkinc8285712005-03-04 22:18:20 +000098};
99asn_TYPE_descriptor_t asn_DEF_Type = {
100 "Type",
101 "Type",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800102 &asn_OP_SEQUENCE,
Lev Walkin59b176e2005-11-26 11:25:14 +0000103 asn_DEF_Type_tags_1,
104 sizeof(asn_DEF_Type_tags_1)
105 /sizeof(asn_DEF_Type_tags_1[0]), /* 1 */
106 asn_DEF_Type_tags_1, /* Same as above */
107 sizeof(asn_DEF_Type_tags_1)
108 /sizeof(asn_DEF_Type_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700109 { 0, 0, SEQUENCE_constraint },
Lev Walkinc8285712005-03-04 22:18:20 +0000110 asn_MBR_Type_1,
111 1, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000112 &asn_SPC_Type_specs_1 /* Additional specs */
Lev Walkinc8285712005-03-04 22:18:20 +0000113};
114
115
Lev Walkincaf0d5a2005-03-04 23:48:19 +0000116/*** <<< INCLUDES [EpytRef] >>> ***/
117
Lev Walkin22b5ed42006-09-13 02:51:20 +0000118#include "Epyt.h"
Lev Walkincaf0d5a2005-03-04 23:48:19 +0000119
120/*** <<< TYPE-DECLS [EpytRef] >>> ***/
121
122typedef Epyt_t EpytRef_t;
123
124/*** <<< FUNC-DECLS [EpytRef] >>> ***/
125
126extern asn_TYPE_descriptor_t asn_DEF_EpytRef;
127asn_struct_free_f EpytRef_free;
128asn_struct_print_f EpytRef_print;
129asn_constr_check_f EpytRef_constraint;
130ber_type_decoder_f EpytRef_decode_ber;
131der_type_encoder_f EpytRef_encode_der;
132xer_type_decoder_f EpytRef_decode_xer;
133xer_type_encoder_f EpytRef_encode_xer;
134
135/*** <<< CODE [EpytRef] >>> ***/
136
Lev Walkincaf0d5a2005-03-04 23:48:19 +0000137/*
138 * This type is implemented using Epyt,
139 * so here we adjust the DEF accordingly.
140 */
Lev Walkincaf0d5a2005-03-04 23:48:19 +0000141
142/*** <<< STAT-DEFS [EpytRef] >>> ***/
143
Lev Walkina7591b52014-10-12 18:37:35 -0700144static const ber_tlv_tag_t asn_DEF_EpytRef_tags_1[] = {
Lev Walkincaf0d5a2005-03-04 23:48:19 +0000145 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
146};
147asn_TYPE_descriptor_t asn_DEF_EpytRef = {
148 "EpytRef",
149 "EpytRef",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800150 &asn_OP_SEQUENCE,
Lev Walkin59b176e2005-11-26 11:25:14 +0000151 asn_DEF_EpytRef_tags_1,
152 sizeof(asn_DEF_EpytRef_tags_1)
153 /sizeof(asn_DEF_EpytRef_tags_1[0]), /* 1 */
154 asn_DEF_EpytRef_tags_1, /* Same as above */
155 sizeof(asn_DEF_EpytRef_tags_1)
156 /sizeof(asn_DEF_EpytRef_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700157 { 0, 0, SEQUENCE_constraint },
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800158 asn_MBR_Epyt_1,
159 3, /* Elements count */
160 &asn_SPC_Epyt_specs_1 /* Additional specs */
Lev Walkincaf0d5a2005-03-04 23:48:19 +0000161};
162
163
Lev Walkinc8285712005-03-04 22:18:20 +0000164/*** <<< INCLUDES [Epyt] >>> ***/
165
166#include <asn_SET_OF.h>
167#include <constr_SET_OF.h>
168#include <constr_SEQUENCE.h>
169
170/*** <<< FWD-DECLS [Epyt] >>> ***/
171
Lev Walkinbf56d542005-03-04 23:50:56 +0000172struct Type;
173struct Ypet;
Lev Walkinc8285712005-03-04 22:18:20 +0000174
175/*** <<< TYPE-DECLS [Epyt] >>> ***/
176
177typedef struct Epyt {
178 struct stype {
179 A_SET_OF(struct Type) list;
180
181 /* Context for parsing across buffer boundaries */
182 asn_struct_ctx_t _asn_ctx;
183 } stype;
184 struct Type *type /* OPTIONAL */;
185 struct Ypet *ypet /* OPTIONAL */;
186
187 /* Context for parsing across buffer boundaries */
188 asn_struct_ctx_t _asn_ctx;
189} Epyt_t;
190
191/*** <<< FUNC-DECLS [Epyt] >>> ***/
192
193extern asn_TYPE_descriptor_t asn_DEF_Epyt;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800194extern asn_SEQUENCE_specifics_t asn_SPC_Epyt_specs_1;
195extern asn_TYPE_member_t asn_MBR_Epyt_1[3];
Lev Walkinc8285712005-03-04 22:18:20 +0000196
197/*** <<< POST-INCLUDE [Epyt] >>> ***/
198
Lev Walkin22b5ed42006-09-13 02:51:20 +0000199#include "Type.h"
200#include "Ypet.h"
Lev Walkinc8285712005-03-04 22:18:20 +0000201
202/*** <<< STAT-DEFS [Epyt] >>> ***/
203
204static asn_TYPE_member_t asn_MBR_stype_2[] = {
Lev Walkin8eb4b572005-08-16 16:57:17 +0000205 { ATF_POINTER, 0, 0,
Lev Walkinc8285712005-03-04 22:18:20 +0000206 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
207 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000208 .type = &asn_DEF_Type,
Lev Walkin67a30122017-08-10 05:48:54 -0700209 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700210 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700211 0, 0, /* No default value */
Lev Walkinc8285712005-03-04 22:18:20 +0000212 .name = ""
213 },
214};
Lev Walkina7591b52014-10-12 18:37:35 -0700215static const ber_tlv_tag_t asn_DEF_stype_tags_2[] = {
Lev Walkinc8285712005-03-04 22:18:20 +0000216 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
217};
Lev Walkin59b176e2005-11-26 11:25:14 +0000218static asn_SET_OF_specifics_t asn_SPC_stype_specs_2 = {
Lev Walkinc8285712005-03-04 22:18:20 +0000219 sizeof(struct stype),
220 offsetof(struct stype, _asn_ctx),
221 0, /* XER encoding is XMLDelimitedItemList */
222};
223static /* Use -fall-defs-global to expose */
224asn_TYPE_descriptor_t asn_DEF_stype_2 = {
225 "stype",
226 "stype",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800227 &asn_OP_SET_OF,
Lev Walkin59b176e2005-11-26 11:25:14 +0000228 asn_DEF_stype_tags_2,
229 sizeof(asn_DEF_stype_tags_2)
230 /sizeof(asn_DEF_stype_tags_2[0]), /* 1 */
231 asn_DEF_stype_tags_2, /* Same as above */
232 sizeof(asn_DEF_stype_tags_2)
233 /sizeof(asn_DEF_stype_tags_2[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700234 { 0, 0, SET_OF_constraint },
Lev Walkinc8285712005-03-04 22:18:20 +0000235 asn_MBR_stype_2,
236 1, /* Single element */
Lev Walkin59b176e2005-11-26 11:25:14 +0000237 &asn_SPC_stype_specs_2 /* Additional specs */
Lev Walkinc8285712005-03-04 22:18:20 +0000238};
239
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800240asn_TYPE_member_t asn_MBR_Epyt_1[] = {
Lev Walkinc8285712005-03-04 22:18:20 +0000241 { ATF_NOFLAGS, 0, offsetof(struct Epyt, stype),
242 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
243 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000244 .type = &asn_DEF_stype_2,
Lev Walkin67a30122017-08-10 05:48:54 -0700245 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700246 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700247 0, 0, /* No default value */
Lev Walkinc8285712005-03-04 22:18:20 +0000248 .name = "stype"
249 },
250 { ATF_POINTER, 2, offsetof(struct Epyt, type),
251 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
252 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000253 .type = &asn_DEF_Type,
Lev Walkin67a30122017-08-10 05:48:54 -0700254 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700255 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700256 0, 0, /* No default value */
Lev Walkinc8285712005-03-04 22:18:20 +0000257 .name = "type"
258 },
259 { ATF_POINTER, 1, offsetof(struct Epyt, ypet),
260 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
261 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000262 .type = &asn_DEF_Ypet,
Lev Walkin67a30122017-08-10 05:48:54 -0700263 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700264 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700265 0, 0, /* No default value */
Lev Walkinc8285712005-03-04 22:18:20 +0000266 .name = "ypet"
267 },
268};
Lev Walkina7591b52014-10-12 18:37:35 -0700269static const ber_tlv_tag_t asn_DEF_Epyt_tags_1[] = {
Lev Walkinc8285712005-03-04 22:18:20 +0000270 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
271};
Lev Walkina7591b52014-10-12 18:37:35 -0700272static const asn_TYPE_tag2member_t asn_MAP_Epyt_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700273 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* type */
274 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 1 }, /* stype */
275 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 2, -1, 0 } /* ypet */
Lev Walkinc8285712005-03-04 22:18:20 +0000276};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800277asn_SEQUENCE_specifics_t asn_SPC_Epyt_specs_1 = {
Lev Walkinc8285712005-03-04 22:18:20 +0000278 sizeof(struct Epyt),
279 offsetof(struct Epyt, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700280 .tag2el = asn_MAP_Epyt_tag2el_1,
281 .tag2el_count = 3, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000282 0, 0, 0, /* Optional elements (not needed) */
Lev Walkindf2edbb2017-10-21 13:40:07 -0700283 -1, /* First extension addition */
Lev Walkinc8285712005-03-04 22:18:20 +0000284};
285asn_TYPE_descriptor_t asn_DEF_Epyt = {
286 "Epyt",
287 "Epyt",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800288 &asn_OP_SEQUENCE,
Lev Walkin59b176e2005-11-26 11:25:14 +0000289 asn_DEF_Epyt_tags_1,
290 sizeof(asn_DEF_Epyt_tags_1)
291 /sizeof(asn_DEF_Epyt_tags_1[0]), /* 1 */
292 asn_DEF_Epyt_tags_1, /* Same as above */
293 sizeof(asn_DEF_Epyt_tags_1)
294 /sizeof(asn_DEF_Epyt_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700295 { 0, 0, SEQUENCE_constraint },
Lev Walkinc8285712005-03-04 22:18:20 +0000296 asn_MBR_Epyt_1,
297 3, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000298 &asn_SPC_Epyt_specs_1 /* Additional specs */
Lev Walkinc8285712005-03-04 22:18:20 +0000299};
300
301
302/*** <<< INCLUDES [Ypet] >>> ***/
303
Lev Walkinc8285712005-03-04 22:18:20 +0000304#include <INTEGER.h>
Lev Walkine8318b82005-03-06 09:29:03 +0000305#include <IA5String.h>
Lev Walkin22b5ed42006-09-13 02:51:20 +0000306#include "EnumType.h"
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000307#include <asn_SET_OF.h>
308#include <constr_SET_OF.h>
Lev Walkinc8285712005-03-04 22:18:20 +0000309#include <constr_SET.h>
310
311/*** <<< DEPS [Ypet] >>> ***/
312
313
314/*
315 * Method of determining the components presence
316 */
317typedef enum Ypet_PR {
318 Ypet_PR_epyt, /* Member epyt is present */
319 Ypet_PR_plain, /* Member plain is present */
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000320 Ypet_PR_senums, /* Member senums is present */
Lev Walkine8318b82005-03-06 09:29:03 +0000321 Ypet_PR_patest1, /* Member patest1 is present */
322 Ypet_PR_patest2, /* Member patest2 is present */
Lev Walkinc8285712005-03-04 22:18:20 +0000323} Ypet_PR;
324
Lev Walkinb85a8132005-08-18 13:38:19 +0000325/*** <<< FWD-DECLS [Ypet] >>> ***/
326
327struct Epyt;
328
Lev Walkinc8285712005-03-04 22:18:20 +0000329/*** <<< TYPE-DECLS [Ypet] >>> ***/
330
331typedef struct Ypet {
Lev Walkinb85a8132005-08-18 13:38:19 +0000332 struct Epyt *epyt;
Lev Walkinc8285712005-03-04 22:18:20 +0000333 INTEGER_t *plain /* DEFAULT 7 */;
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000334 struct senums {
335 A_SET_OF(EnumType_t) list;
336
337 /* Context for parsing across buffer boundaries */
338 asn_struct_ctx_t _asn_ctx;
339 } senums;
Lev Walkine8318b82005-03-06 09:29:03 +0000340 IA5String_t patest1;
341 IA5String_t patest2;
Lev Walkinc8285712005-03-04 22:18:20 +0000342
343 /* Presence bitmask: ASN_SET_ISPRESENT(pYpet, Ypet_PR_x) */
344 unsigned int _presence_map
Lev Walkine8318b82005-03-06 09:29:03 +0000345 [((5+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
Lev Walkinc8285712005-03-04 22:18:20 +0000346
347 /* Context for parsing across buffer boundaries */
348 asn_struct_ctx_t _asn_ctx;
349} Ypet_t;
350
351/*** <<< FUNC-DECLS [Ypet] >>> ***/
352
353extern asn_TYPE_descriptor_t asn_DEF_Ypet;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800354extern asn_SET_specifics_t asn_SPC_Ypet_specs_1;
355extern asn_TYPE_member_t asn_MBR_Ypet_1[5];
Lev Walkinc8285712005-03-04 22:18:20 +0000356
Lev Walkinb85a8132005-08-18 13:38:19 +0000357/*** <<< POST-INCLUDE [Ypet] >>> ***/
358
Lev Walkin22b5ed42006-09-13 02:51:20 +0000359#include "Epyt.h"
Lev Walkinb85a8132005-08-18 13:38:19 +0000360
Lev Walkine8318b82005-03-06 09:29:03 +0000361/*** <<< CTABLES [Ypet] >>> ***/
362
363static int check_permitted_alphabet_6(const void *sptr) {
364 /* The underlying type is IA5String */
365 const IA5String_t *st = (const IA5String_t *)sptr;
366 const uint8_t *ch = st->buf;
367 const uint8_t *end = ch + st->size;
368
369 for(; ch < end; ch++) {
370 uint8_t cv = *ch;
371 if(!(cv >= 65 && cv <= 90)) return -1;
372 }
373 return 0;
374}
375
376static int check_permitted_alphabet_7(const void *sptr) {
377 /* The underlying type is IA5String */
378 const IA5String_t *st = (const IA5String_t *)sptr;
379 const uint8_t *ch = st->buf;
380 const uint8_t *end = ch + st->size;
381
382 for(; ch < end; ch++) {
383 uint8_t cv = *ch;
384 if(!(cv >= 97 && cv <= 122)) return -1;
385 }
386 return 0;
387}
388
389
390/*** <<< CODE [Ypet] >>> ***/
391
392static int
Lev Walkin20696a42017-10-17 21:27:33 -0700393memb_patest1_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000394 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkine8318b82005-03-06 09:29:03 +0000395 const IA5String_t *st = (const IA5String_t *)sptr;
396
397 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700398 ASN__CTFAIL(app_key, td, sptr,
Lev Walkine8318b82005-03-06 09:29:03 +0000399 "%s: value not given (%s:%d)",
400 td->name, __FILE__, __LINE__);
401 return -1;
402 }
403
404
405 if(!check_permitted_alphabet_6(st)) {
406 /* Constraint check succeeded */
407 return 0;
408 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700409 ASN__CTFAIL(app_key, td, sptr,
Lev Walkine8318b82005-03-06 09:29:03 +0000410 "%s: constraint failed (%s:%d)",
411 td->name, __FILE__, __LINE__);
412 return -1;
413 }
414}
415
416static int
Lev Walkin20696a42017-10-17 21:27:33 -0700417memb_patest2_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000418 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkine8318b82005-03-06 09:29:03 +0000419 const IA5String_t *st = (const IA5String_t *)sptr;
420
421 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700422 ASN__CTFAIL(app_key, td, sptr,
Lev Walkine8318b82005-03-06 09:29:03 +0000423 "%s: value not given (%s:%d)",
424 td->name, __FILE__, __LINE__);
425 return -1;
426 }
427
428
429 if(!check_permitted_alphabet_7(st)) {
430 /* Constraint check succeeded */
431 return 0;
432 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700433 ASN__CTFAIL(app_key, td, sptr,
Lev Walkine8318b82005-03-06 09:29:03 +0000434 "%s: constraint failed (%s:%d)",
435 td->name, __FILE__, __LINE__);
436 return -1;
437 }
438}
439
440
Lev Walkinc8285712005-03-04 22:18:20 +0000441/*** <<< STAT-DEFS [Ypet] >>> ***/
442
Lev Walkin20696a42017-10-17 21:27:33 -0700443static int asn_DFL_3_cmp_7(const void *sptr) {
444 const INTEGER_t *st = sptr;
445
446 if(!st) {
447 return -1; /* No value is not a default value */
448 }
449
450 /* Test default value 7 */
451 long value;
452 if(asn_INTEGER2long(st, &value))
453 return -1;
454 return (value != 7);
455}
456static int asn_DFL_3_set_7(void **sptr) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000457 INTEGER_t *st = *sptr;
458
459 if(!st) {
460 st = (*sptr = CALLOC(1, sizeof(*st)));
461 if(!st) return -1;
462 }
463
Lev Walkin20696a42017-10-17 21:27:33 -0700464 /* Install default value 7 */
465 return asn_long2INTEGER(st, 7);
Lev Walkin59b176e2005-11-26 11:25:14 +0000466}
Lev Walkine8318b82005-03-06 09:29:03 +0000467static asn_TYPE_member_t asn_MBR_senums_4[] = {
Lev Walkin8eb4b572005-08-16 16:57:17 +0000468 { ATF_POINTER, 0, 0,
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000469 .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
470 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000471 .type = &asn_DEF_EnumType,
Lev Walkin67a30122017-08-10 05:48:54 -0700472 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700473 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700474 0, 0, /* No default value */
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000475 .name = ""
476 },
477};
Lev Walkina7591b52014-10-12 18:37:35 -0700478static const ber_tlv_tag_t asn_DEF_senums_tags_4[] = {
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000479 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
480};
Lev Walkin59b176e2005-11-26 11:25:14 +0000481static asn_SET_OF_specifics_t asn_SPC_senums_specs_4 = {
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000482 sizeof(struct senums),
483 offsetof(struct senums, _asn_ctx),
484 1, /* XER encoding is XMLValueList */
485};
486static /* Use -fall-defs-global to expose */
Lev Walkine8318b82005-03-06 09:29:03 +0000487asn_TYPE_descriptor_t asn_DEF_senums_4 = {
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000488 "senums",
489 "senums",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800490 &asn_OP_SET_OF,
Lev Walkin59b176e2005-11-26 11:25:14 +0000491 asn_DEF_senums_tags_4,
492 sizeof(asn_DEF_senums_tags_4)
493 /sizeof(asn_DEF_senums_tags_4[0]), /* 1 */
494 asn_DEF_senums_tags_4, /* Same as above */
495 sizeof(asn_DEF_senums_tags_4)
496 /sizeof(asn_DEF_senums_tags_4[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700497 { 0, 0, SET_OF_constraint },
Lev Walkine8318b82005-03-06 09:29:03 +0000498 asn_MBR_senums_4,
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000499 1, /* Single element */
Lev Walkin59b176e2005-11-26 11:25:14 +0000500 &asn_SPC_senums_specs_4 /* Additional specs */
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000501};
502
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800503asn_TYPE_member_t asn_MBR_Ypet_1[] = {
Lev Walkinb85a8132005-08-18 13:38:19 +0000504 { ATF_POINTER, 0, offsetof(struct Ypet, epyt),
Lev Walkinc8285712005-03-04 22:18:20 +0000505 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
506 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000507 .type = &asn_DEF_Epyt,
Lev Walkin67a30122017-08-10 05:48:54 -0700508 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700509 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700510 0, 0, /* No default value */
Lev Walkinc8285712005-03-04 22:18:20 +0000511 .name = "epyt"
512 },
513 { ATF_POINTER, 1, offsetof(struct Ypet, plain),
514 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
515 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000516 .type = &asn_DEF_INTEGER,
Lev Walkin67a30122017-08-10 05:48:54 -0700517 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700518 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkinb37ee632017-10-18 16:52:18 -0700519 .default_value_cmp = &asn_DFL_3_cmp_7, /* Compare DEFAULT 7 */
520 .default_value_set = &asn_DFL_3_set_7, /* Set DEFAULT 7 */
Lev Walkinc8285712005-03-04 22:18:20 +0000521 .name = "plain"
522 },
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000523 { ATF_NOFLAGS, 0, offsetof(struct Ypet, senums),
524 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
525 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000526 .type = &asn_DEF_senums_4,
Lev Walkin67a30122017-08-10 05:48:54 -0700527 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700528 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700529 0, 0, /* No default value */
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000530 .name = "senums"
531 },
Lev Walkine8318b82005-03-06 09:29:03 +0000532 { ATF_NOFLAGS, 0, offsetof(struct Ypet, patest1),
533 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
534 .tag_mode = +1, /* EXPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000535 .type = &asn_DEF_IA5String,
Lev Walkin67a30122017-08-10 05:48:54 -0700536 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700537 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_patest1_constraint_1 },
Lev Walkin20696a42017-10-17 21:27:33 -0700538 0, 0, /* No default value */
Lev Walkine8318b82005-03-06 09:29:03 +0000539 .name = "patest1"
540 },
541 { ATF_NOFLAGS, 0, offsetof(struct Ypet, patest2),
542 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
543 .tag_mode = +1, /* EXPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000544 .type = &asn_DEF_IA5String,
Lev Walkin67a30122017-08-10 05:48:54 -0700545 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700546 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_patest2_constraint_1 },
Lev Walkin20696a42017-10-17 21:27:33 -0700547 0, 0, /* No default value */
Lev Walkine8318b82005-03-06 09:29:03 +0000548 .name = "patest2"
549 },
Lev Walkinc8285712005-03-04 22:18:20 +0000550};
Lev Walkina7591b52014-10-12 18:37:35 -0700551static const ber_tlv_tag_t asn_DEF_Ypet_tags_1[] = {
Lev Walkinc8285712005-03-04 22:18:20 +0000552 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
553};
Lev Walkina7591b52014-10-12 18:37:35 -0700554static const asn_TYPE_tag2member_t asn_MAP_Ypet_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700555 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* plain */
556 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* epyt */
557 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 2, 0, 0 }, /* senums */
558 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 3, 0, 0 }, /* patest1 */
559 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 4, 0, 0 } /* patest2 */
Lev Walkinc8285712005-03-04 22:18:20 +0000560};
Lev Walkina7591b52014-10-12 18:37:35 -0700561static const uint8_t asn_MAP_Ypet_mmap_1[(5 + (8 * sizeof(unsigned int)) - 1) / 8] = {
Lev Walkine8318b82005-03-06 09:29:03 +0000562 (1 << 7) | (0 << 6) | (1 << 5) | (1 << 4) | (1 << 3)
Lev Walkinc8285712005-03-04 22:18:20 +0000563};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800564asn_SET_specifics_t asn_SPC_Ypet_specs_1 = {
Lev Walkinc8285712005-03-04 22:18:20 +0000565 sizeof(struct Ypet),
566 offsetof(struct Ypet, _asn_ctx),
567 offsetof(struct Ypet, _presence_map),
Lev Walkine3917082017-08-23 10:29:38 -0700568 .tag2el = asn_MAP_Ypet_tag2el_1,
569 .tag2el_count = 5, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000570 asn_MAP_Ypet_tag2el_1, /* Same as above */
Lev Walkine8318b82005-03-06 09:29:03 +0000571 5, /* Count of tags in the CXER map */
Lev Walkinc8285712005-03-04 22:18:20 +0000572 0, /* Whether extensible */
Lev Walkin46ef3f32017-07-06 08:47:53 -0700573 (const unsigned int *)asn_MAP_Ypet_mmap_1 /* Mandatory elements map */
Lev Walkinc8285712005-03-04 22:18:20 +0000574};
575asn_TYPE_descriptor_t asn_DEF_Ypet = {
576 "Ypet",
577 "Ypet",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800578 &asn_OP_SET,
Lev Walkin59b176e2005-11-26 11:25:14 +0000579 asn_DEF_Ypet_tags_1,
580 sizeof(asn_DEF_Ypet_tags_1)
581 /sizeof(asn_DEF_Ypet_tags_1[0]), /* 1 */
582 asn_DEF_Ypet_tags_1, /* Same as above */
583 sizeof(asn_DEF_Ypet_tags_1)
584 /sizeof(asn_DEF_Ypet_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700585 { 0, 0, SET_constraint },
Lev Walkinc8285712005-03-04 22:18:20 +0000586 asn_MBR_Ypet_1,
Lev Walkine8318b82005-03-06 09:29:03 +0000587 5, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000588 &asn_SPC_Ypet_specs_1 /* Additional specs */
Lev Walkinc8285712005-03-04 22:18:20 +0000589};
590
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000591
592/*** <<< INCLUDES [EnumType] >>> ***/
593
594#include <ENUMERATED.h>
595
596/*** <<< DEPS [EnumType] >>> ***/
597
598typedef enum EnumType {
599 EnumType_one = 0,
600 EnumType_two = 1
Lev Walkin171487e2006-03-21 07:25:18 +0000601} e_EnumType;
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000602
603/*** <<< TYPE-DECLS [EnumType] >>> ***/
604
605typedef ENUMERATED_t EnumType_t;
606
607/*** <<< FUNC-DECLS [EnumType] >>> ***/
608
609extern asn_TYPE_descriptor_t asn_DEF_EnumType;
Lev Walkin9ded96c2017-08-23 04:38:31 -0700610extern const asn_INTEGER_specifics_t asn_SPC_EnumType_specs_1;
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000611asn_struct_free_f EnumType_free;
612asn_struct_print_f EnumType_print;
613asn_constr_check_f EnumType_constraint;
614ber_type_decoder_f EnumType_decode_ber;
615der_type_encoder_f EnumType_encode_der;
616xer_type_decoder_f EnumType_decode_xer;
617xer_type_encoder_f EnumType_encode_xer;
618
619/*** <<< CODE [EnumType] >>> ***/
620
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000621/*
622 * This type is implemented using ENUMERATED,
623 * so here we adjust the DEF accordingly.
624 */
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000625
626/*** <<< STAT-DEFS [EnumType] >>> ***/
627
Lev Walkina7591b52014-10-12 18:37:35 -0700628static const asn_INTEGER_enum_map_t asn_MAP_EnumType_value2enum_1[] = {
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000629 { 0, 3, "one" },
630 { 1, 3, "two" }
631};
Lev Walkina7591b52014-10-12 18:37:35 -0700632static const unsigned int asn_MAP_EnumType_enum2value_1[] = {
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000633 0, /* one(0) */
634 1 /* two(1) */
635};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800636const asn_INTEGER_specifics_t asn_SPC_EnumType_specs_1 = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000637 asn_MAP_EnumType_value2enum_1, /* "tag" => N; sorted by tag */
638 asn_MAP_EnumType_enum2value_1, /* N => "tag"; sorted by N */
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000639 2, /* Number of elements in the maps */
640 0, /* Enumeration is not extensible */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000641 1, /* Strict enumeration */
642 0, /* Native long size */
643 0
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000644};
Lev Walkina7591b52014-10-12 18:37:35 -0700645static const ber_tlv_tag_t asn_DEF_EnumType_tags_1[] = {
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000646 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
647};
648asn_TYPE_descriptor_t asn_DEF_EnumType = {
649 "EnumType",
650 "EnumType",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800651 &asn_OP_ENUMERATED,
Lev Walkin59b176e2005-11-26 11:25:14 +0000652 asn_DEF_EnumType_tags_1,
653 sizeof(asn_DEF_EnumType_tags_1)
654 /sizeof(asn_DEF_EnumType_tags_1[0]), /* 1 */
655 asn_DEF_EnumType_tags_1, /* Same as above */
656 sizeof(asn_DEF_EnumType_tags_1)
657 /sizeof(asn_DEF_EnumType_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700658 { 0, 0, ENUMERATED_constraint },
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000659 0, 0, /* Defined elsewhere */
Lev Walkin59b176e2005-11-26 11:25:14 +0000660 &asn_SPC_EnumType_specs_1 /* Additional specs */
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000661};
662