blob: 51e6411253791eb57cc62edd9b97521cb94bc091 [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 Walkinbf56d542005-03-04 23:50:56 +000010struct Epyt;
Lev Walkinc8285712005-03-04 22:18:20 +000011
12/*** <<< TYPE-DECLS [Type] >>> ***/
13
14typedef struct Type {
15 struct data {
16 A_SEQUENCE_OF(struct Epyt) list;
17
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 Walkin59b176e2005-11-26 11:25:14 +000045 .default_value = 0,
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 Walkin59b176e2005-11-26 11:25:14 +000081 .default_value = 0,
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 Walkinc8285712005-03-04 22:18:20 +000097 -1, /* Start extensions */
98 -1 /* Stop extensions */
99};
100asn_TYPE_descriptor_t asn_DEF_Type = {
101 "Type",
102 "Type",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800103 &asn_OP_SEQUENCE,
Lev Walkin59b176e2005-11-26 11:25:14 +0000104 asn_DEF_Type_tags_1,
105 sizeof(asn_DEF_Type_tags_1)
106 /sizeof(asn_DEF_Type_tags_1[0]), /* 1 */
107 asn_DEF_Type_tags_1, /* Same as above */
108 sizeof(asn_DEF_Type_tags_1)
109 /sizeof(asn_DEF_Type_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700110 { 0, 0, SEQUENCE_constraint },
Lev Walkinc8285712005-03-04 22:18:20 +0000111 asn_MBR_Type_1,
112 1, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000113 &asn_SPC_Type_specs_1 /* Additional specs */
Lev Walkinc8285712005-03-04 22:18:20 +0000114};
115
116
Lev Walkincaf0d5a2005-03-04 23:48:19 +0000117/*** <<< INCLUDES [EpytRef] >>> ***/
118
Lev Walkin22b5ed42006-09-13 02:51:20 +0000119#include "Epyt.h"
Lev Walkincaf0d5a2005-03-04 23:48:19 +0000120
121/*** <<< TYPE-DECLS [EpytRef] >>> ***/
122
123typedef Epyt_t EpytRef_t;
124
125/*** <<< FUNC-DECLS [EpytRef] >>> ***/
126
127extern asn_TYPE_descriptor_t asn_DEF_EpytRef;
128asn_struct_free_f EpytRef_free;
129asn_struct_print_f EpytRef_print;
130asn_constr_check_f EpytRef_constraint;
131ber_type_decoder_f EpytRef_decode_ber;
132der_type_encoder_f EpytRef_encode_der;
133xer_type_decoder_f EpytRef_decode_xer;
134xer_type_encoder_f EpytRef_encode_xer;
135
136/*** <<< CODE [EpytRef] >>> ***/
137
Lev Walkincaf0d5a2005-03-04 23:48:19 +0000138/*
139 * This type is implemented using Epyt,
140 * so here we adjust the DEF accordingly.
141 */
Lev Walkincaf0d5a2005-03-04 23:48:19 +0000142
143/*** <<< STAT-DEFS [EpytRef] >>> ***/
144
Lev Walkina7591b52014-10-12 18:37:35 -0700145static const ber_tlv_tag_t asn_DEF_EpytRef_tags_1[] = {
Lev Walkincaf0d5a2005-03-04 23:48:19 +0000146 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
147};
148asn_TYPE_descriptor_t asn_DEF_EpytRef = {
149 "EpytRef",
150 "EpytRef",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800151 &asn_OP_SEQUENCE,
Lev Walkin59b176e2005-11-26 11:25:14 +0000152 asn_DEF_EpytRef_tags_1,
153 sizeof(asn_DEF_EpytRef_tags_1)
154 /sizeof(asn_DEF_EpytRef_tags_1[0]), /* 1 */
155 asn_DEF_EpytRef_tags_1, /* Same as above */
156 sizeof(asn_DEF_EpytRef_tags_1)
157 /sizeof(asn_DEF_EpytRef_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700158 { 0, 0, SEQUENCE_constraint },
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800159 asn_MBR_Epyt_1,
160 3, /* Elements count */
161 &asn_SPC_Epyt_specs_1 /* Additional specs */
Lev Walkincaf0d5a2005-03-04 23:48:19 +0000162};
163
164
Lev Walkinc8285712005-03-04 22:18:20 +0000165/*** <<< INCLUDES [Epyt] >>> ***/
166
167#include <asn_SET_OF.h>
168#include <constr_SET_OF.h>
169#include <constr_SEQUENCE.h>
170
171/*** <<< FWD-DECLS [Epyt] >>> ***/
172
Lev Walkinbf56d542005-03-04 23:50:56 +0000173struct Type;
174struct Ypet;
Lev Walkinc8285712005-03-04 22:18:20 +0000175
176/*** <<< TYPE-DECLS [Epyt] >>> ***/
177
178typedef struct Epyt {
179 struct stype {
180 A_SET_OF(struct Type) list;
181
182 /* Context for parsing across buffer boundaries */
183 asn_struct_ctx_t _asn_ctx;
184 } stype;
185 struct Type *type /* OPTIONAL */;
186 struct Ypet *ypet /* OPTIONAL */;
187
188 /* Context for parsing across buffer boundaries */
189 asn_struct_ctx_t _asn_ctx;
190} Epyt_t;
191
192/*** <<< FUNC-DECLS [Epyt] >>> ***/
193
194extern asn_TYPE_descriptor_t asn_DEF_Epyt;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800195extern asn_SEQUENCE_specifics_t asn_SPC_Epyt_specs_1;
196extern asn_TYPE_member_t asn_MBR_Epyt_1[3];
Lev Walkinc8285712005-03-04 22:18:20 +0000197
198/*** <<< POST-INCLUDE [Epyt] >>> ***/
199
Lev Walkin22b5ed42006-09-13 02:51:20 +0000200#include "Type.h"
201#include "Ypet.h"
Lev Walkinc8285712005-03-04 22:18:20 +0000202
203/*** <<< STAT-DEFS [Epyt] >>> ***/
204
205static asn_TYPE_member_t asn_MBR_stype_2[] = {
Lev Walkin8eb4b572005-08-16 16:57:17 +0000206 { ATF_POINTER, 0, 0,
Lev Walkinc8285712005-03-04 22:18:20 +0000207 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
208 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000209 .type = &asn_DEF_Type,
Lev Walkin67a30122017-08-10 05:48:54 -0700210 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700211 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +0000212 .default_value = 0,
Lev Walkinc8285712005-03-04 22:18:20 +0000213 .name = ""
214 },
215};
Lev Walkina7591b52014-10-12 18:37:35 -0700216static const ber_tlv_tag_t asn_DEF_stype_tags_2[] = {
Lev Walkinc8285712005-03-04 22:18:20 +0000217 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
218};
Lev Walkin59b176e2005-11-26 11:25:14 +0000219static asn_SET_OF_specifics_t asn_SPC_stype_specs_2 = {
Lev Walkinc8285712005-03-04 22:18:20 +0000220 sizeof(struct stype),
221 offsetof(struct stype, _asn_ctx),
222 0, /* XER encoding is XMLDelimitedItemList */
223};
224static /* Use -fall-defs-global to expose */
225asn_TYPE_descriptor_t asn_DEF_stype_2 = {
226 "stype",
227 "stype",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800228 &asn_OP_SET_OF,
Lev Walkin59b176e2005-11-26 11:25:14 +0000229 asn_DEF_stype_tags_2,
230 sizeof(asn_DEF_stype_tags_2)
231 /sizeof(asn_DEF_stype_tags_2[0]), /* 1 */
232 asn_DEF_stype_tags_2, /* Same as above */
233 sizeof(asn_DEF_stype_tags_2)
234 /sizeof(asn_DEF_stype_tags_2[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700235 { 0, 0, SET_OF_constraint },
Lev Walkinc8285712005-03-04 22:18:20 +0000236 asn_MBR_stype_2,
237 1, /* Single element */
Lev Walkin59b176e2005-11-26 11:25:14 +0000238 &asn_SPC_stype_specs_2 /* Additional specs */
Lev Walkinc8285712005-03-04 22:18:20 +0000239};
240
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800241asn_TYPE_member_t asn_MBR_Epyt_1[] = {
Lev Walkinc8285712005-03-04 22:18:20 +0000242 { ATF_NOFLAGS, 0, offsetof(struct Epyt, stype),
243 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
244 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000245 .type = &asn_DEF_stype_2,
Lev Walkin67a30122017-08-10 05:48:54 -0700246 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700247 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +0000248 .default_value = 0,
Lev Walkinc8285712005-03-04 22:18:20 +0000249 .name = "stype"
250 },
251 { ATF_POINTER, 2, offsetof(struct Epyt, type),
252 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
253 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000254 .type = &asn_DEF_Type,
Lev Walkin67a30122017-08-10 05:48:54 -0700255 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700256 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +0000257 .default_value = 0,
Lev Walkinc8285712005-03-04 22:18:20 +0000258 .name = "type"
259 },
260 { ATF_POINTER, 1, offsetof(struct Epyt, ypet),
261 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
262 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000263 .type = &asn_DEF_Ypet,
Lev Walkin67a30122017-08-10 05:48:54 -0700264 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700265 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +0000266 .default_value = 0,
Lev Walkinc8285712005-03-04 22:18:20 +0000267 .name = "ypet"
268 },
269};
Lev Walkina7591b52014-10-12 18:37:35 -0700270static const ber_tlv_tag_t asn_DEF_Epyt_tags_1[] = {
Lev Walkinc8285712005-03-04 22:18:20 +0000271 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
272};
Lev Walkina7591b52014-10-12 18:37:35 -0700273static const asn_TYPE_tag2member_t asn_MAP_Epyt_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700274 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* type */
275 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 1 }, /* stype */
276 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 2, -1, 0 } /* ypet */
Lev Walkinc8285712005-03-04 22:18:20 +0000277};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800278asn_SEQUENCE_specifics_t asn_SPC_Epyt_specs_1 = {
Lev Walkinc8285712005-03-04 22:18:20 +0000279 sizeof(struct Epyt),
280 offsetof(struct Epyt, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700281 .tag2el = asn_MAP_Epyt_tag2el_1,
282 .tag2el_count = 3, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000283 0, 0, 0, /* Optional elements (not needed) */
Lev Walkinc8285712005-03-04 22:18:20 +0000284 -1, /* Start extensions */
285 -1 /* Stop extensions */
286};
287asn_TYPE_descriptor_t asn_DEF_Epyt = {
288 "Epyt",
289 "Epyt",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800290 &asn_OP_SEQUENCE,
Lev Walkin59b176e2005-11-26 11:25:14 +0000291 asn_DEF_Epyt_tags_1,
292 sizeof(asn_DEF_Epyt_tags_1)
293 /sizeof(asn_DEF_Epyt_tags_1[0]), /* 1 */
294 asn_DEF_Epyt_tags_1, /* Same as above */
295 sizeof(asn_DEF_Epyt_tags_1)
296 /sizeof(asn_DEF_Epyt_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700297 { 0, 0, SEQUENCE_constraint },
Lev Walkinc8285712005-03-04 22:18:20 +0000298 asn_MBR_Epyt_1,
299 3, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000300 &asn_SPC_Epyt_specs_1 /* Additional specs */
Lev Walkinc8285712005-03-04 22:18:20 +0000301};
302
303
304/*** <<< INCLUDES [Ypet] >>> ***/
305
Lev Walkinc8285712005-03-04 22:18:20 +0000306#include <INTEGER.h>
Lev Walkine8318b82005-03-06 09:29:03 +0000307#include <IA5String.h>
Lev Walkin22b5ed42006-09-13 02:51:20 +0000308#include "EnumType.h"
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000309#include <asn_SET_OF.h>
310#include <constr_SET_OF.h>
Lev Walkinc8285712005-03-04 22:18:20 +0000311#include <constr_SET.h>
312
313/*** <<< DEPS [Ypet] >>> ***/
314
315
316/*
317 * Method of determining the components presence
318 */
319typedef enum Ypet_PR {
320 Ypet_PR_epyt, /* Member epyt is present */
321 Ypet_PR_plain, /* Member plain is present */
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000322 Ypet_PR_senums, /* Member senums is present */
Lev Walkine8318b82005-03-06 09:29:03 +0000323 Ypet_PR_patest1, /* Member patest1 is present */
324 Ypet_PR_patest2, /* Member patest2 is present */
Lev Walkinc8285712005-03-04 22:18:20 +0000325} Ypet_PR;
326
Lev Walkinb85a8132005-08-18 13:38:19 +0000327/*** <<< FWD-DECLS [Ypet] >>> ***/
328
329struct Epyt;
330
Lev Walkinc8285712005-03-04 22:18:20 +0000331/*** <<< TYPE-DECLS [Ypet] >>> ***/
332
333typedef struct Ypet {
Lev Walkinb85a8132005-08-18 13:38:19 +0000334 struct Epyt *epyt;
Lev Walkinc8285712005-03-04 22:18:20 +0000335 INTEGER_t *plain /* DEFAULT 7 */;
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000336 struct senums {
337 A_SET_OF(EnumType_t) list;
338
339 /* Context for parsing across buffer boundaries */
340 asn_struct_ctx_t _asn_ctx;
341 } senums;
Lev Walkine8318b82005-03-06 09:29:03 +0000342 IA5String_t patest1;
343 IA5String_t patest2;
Lev Walkinc8285712005-03-04 22:18:20 +0000344
345 /* Presence bitmask: ASN_SET_ISPRESENT(pYpet, Ypet_PR_x) */
346 unsigned int _presence_map
Lev Walkine8318b82005-03-06 09:29:03 +0000347 [((5+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
Lev Walkinc8285712005-03-04 22:18:20 +0000348
349 /* Context for parsing across buffer boundaries */
350 asn_struct_ctx_t _asn_ctx;
351} Ypet_t;
352
353/*** <<< FUNC-DECLS [Ypet] >>> ***/
354
355extern asn_TYPE_descriptor_t asn_DEF_Ypet;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800356extern asn_SET_specifics_t asn_SPC_Ypet_specs_1;
357extern asn_TYPE_member_t asn_MBR_Ypet_1[5];
Lev Walkinc8285712005-03-04 22:18:20 +0000358
Lev Walkinb85a8132005-08-18 13:38:19 +0000359/*** <<< POST-INCLUDE [Ypet] >>> ***/
360
Lev Walkin22b5ed42006-09-13 02:51:20 +0000361#include "Epyt.h"
Lev Walkinb85a8132005-08-18 13:38:19 +0000362
Lev Walkine8318b82005-03-06 09:29:03 +0000363/*** <<< CTABLES [Ypet] >>> ***/
364
365static int check_permitted_alphabet_6(const void *sptr) {
366 /* The underlying type is IA5String */
367 const IA5String_t *st = (const IA5String_t *)sptr;
368 const uint8_t *ch = st->buf;
369 const uint8_t *end = ch + st->size;
370
371 for(; ch < end; ch++) {
372 uint8_t cv = *ch;
373 if(!(cv >= 65 && cv <= 90)) return -1;
374 }
375 return 0;
376}
377
378static int check_permitted_alphabet_7(const void *sptr) {
379 /* The underlying type is IA5String */
380 const IA5String_t *st = (const IA5String_t *)sptr;
381 const uint8_t *ch = st->buf;
382 const uint8_t *end = ch + st->size;
383
384 for(; ch < end; ch++) {
385 uint8_t cv = *ch;
386 if(!(cv >= 97 && cv <= 122)) return -1;
387 }
388 return 0;
389}
390
391
392/*** <<< CODE [Ypet] >>> ***/
393
394static int
Lev Walkin59b176e2005-11-26 11:25:14 +0000395memb_patest1_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000396 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkine8318b82005-03-06 09:29:03 +0000397 const IA5String_t *st = (const IA5String_t *)sptr;
398
399 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700400 ASN__CTFAIL(app_key, td, sptr,
Lev Walkine8318b82005-03-06 09:29:03 +0000401 "%s: value not given (%s:%d)",
402 td->name, __FILE__, __LINE__);
403 return -1;
404 }
405
406
407 if(!check_permitted_alphabet_6(st)) {
408 /* Constraint check succeeded */
409 return 0;
410 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700411 ASN__CTFAIL(app_key, td, sptr,
Lev Walkine8318b82005-03-06 09:29:03 +0000412 "%s: constraint failed (%s:%d)",
413 td->name, __FILE__, __LINE__);
414 return -1;
415 }
416}
417
418static int
Lev Walkin59b176e2005-11-26 11:25:14 +0000419memb_patest2_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000420 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkine8318b82005-03-06 09:29:03 +0000421 const IA5String_t *st = (const IA5String_t *)sptr;
422
423 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700424 ASN__CTFAIL(app_key, td, sptr,
Lev Walkine8318b82005-03-06 09:29:03 +0000425 "%s: value not given (%s:%d)",
426 td->name, __FILE__, __LINE__);
427 return -1;
428 }
429
430
431 if(!check_permitted_alphabet_7(st)) {
432 /* Constraint check succeeded */
433 return 0;
434 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700435 ASN__CTFAIL(app_key, td, sptr,
Lev Walkine8318b82005-03-06 09:29:03 +0000436 "%s: constraint failed (%s:%d)",
437 td->name, __FILE__, __LINE__);
438 return -1;
439 }
440}
441
442
Lev Walkinc8285712005-03-04 22:18:20 +0000443/*** <<< STAT-DEFS [Ypet] >>> ***/
444
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000445static int asn_DFL_3_set_7(int set_value, void **sptr) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000446 INTEGER_t *st = *sptr;
447
448 if(!st) {
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000449 if(!set_value) return -1; /* Not a default value */
Lev Walkin59b176e2005-11-26 11:25:14 +0000450 st = (*sptr = CALLOC(1, sizeof(*st)));
451 if(!st) return -1;
452 }
453
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000454 if(set_value) {
455 /* Install default value 7 */
456 return asn_long2INTEGER(st, 7);
457 } else {
458 /* Test default value 7 */
459 long value;
460 if(asn_INTEGER2long(st, &value))
461 return -1;
462 return (value == 7);
463 }
Lev Walkin59b176e2005-11-26 11:25:14 +0000464}
Lev Walkine8318b82005-03-06 09:29:03 +0000465static asn_TYPE_member_t asn_MBR_senums_4[] = {
Lev Walkin8eb4b572005-08-16 16:57:17 +0000466 { ATF_POINTER, 0, 0,
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000467 .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
468 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000469 .type = &asn_DEF_EnumType,
Lev Walkin67a30122017-08-10 05:48:54 -0700470 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700471 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +0000472 .default_value = 0,
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000473 .name = ""
474 },
475};
Lev Walkina7591b52014-10-12 18:37:35 -0700476static const ber_tlv_tag_t asn_DEF_senums_tags_4[] = {
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000477 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
478};
Lev Walkin59b176e2005-11-26 11:25:14 +0000479static asn_SET_OF_specifics_t asn_SPC_senums_specs_4 = {
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000480 sizeof(struct senums),
481 offsetof(struct senums, _asn_ctx),
482 1, /* XER encoding is XMLValueList */
483};
484static /* Use -fall-defs-global to expose */
Lev Walkine8318b82005-03-06 09:29:03 +0000485asn_TYPE_descriptor_t asn_DEF_senums_4 = {
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000486 "senums",
487 "senums",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800488 &asn_OP_SET_OF,
Lev Walkin59b176e2005-11-26 11:25:14 +0000489 asn_DEF_senums_tags_4,
490 sizeof(asn_DEF_senums_tags_4)
491 /sizeof(asn_DEF_senums_tags_4[0]), /* 1 */
492 asn_DEF_senums_tags_4, /* Same as above */
493 sizeof(asn_DEF_senums_tags_4)
494 /sizeof(asn_DEF_senums_tags_4[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700495 { 0, 0, SET_OF_constraint },
Lev Walkine8318b82005-03-06 09:29:03 +0000496 asn_MBR_senums_4,
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000497 1, /* Single element */
Lev Walkin59b176e2005-11-26 11:25:14 +0000498 &asn_SPC_senums_specs_4 /* Additional specs */
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000499};
500
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800501asn_TYPE_member_t asn_MBR_Ypet_1[] = {
Lev Walkinb85a8132005-08-18 13:38:19 +0000502 { ATF_POINTER, 0, offsetof(struct Ypet, epyt),
Lev Walkinc8285712005-03-04 22:18:20 +0000503 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
504 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000505 .type = &asn_DEF_Epyt,
Lev Walkin67a30122017-08-10 05:48:54 -0700506 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700507 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +0000508 .default_value = 0,
Lev Walkinc8285712005-03-04 22:18:20 +0000509 .name = "epyt"
510 },
511 { ATF_POINTER, 1, offsetof(struct Ypet, plain),
512 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
513 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000514 .type = &asn_DEF_INTEGER,
Lev Walkin67a30122017-08-10 05:48:54 -0700515 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700516 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +0000517 .default_value = asn_DFL_3_set_7, /* DEFAULT 7 */
Lev Walkinc8285712005-03-04 22:18:20 +0000518 .name = "plain"
519 },
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000520 { ATF_NOFLAGS, 0, offsetof(struct Ypet, senums),
521 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
522 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000523 .type = &asn_DEF_senums_4,
Lev Walkin67a30122017-08-10 05:48:54 -0700524 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700525 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +0000526 .default_value = 0,
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000527 .name = "senums"
528 },
Lev Walkine8318b82005-03-06 09:29:03 +0000529 { ATF_NOFLAGS, 0, offsetof(struct Ypet, patest1),
530 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
531 .tag_mode = +1, /* EXPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000532 .type = &asn_DEF_IA5String,
Lev Walkin67a30122017-08-10 05:48:54 -0700533 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700534 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_patest1_constraint_1 },
Lev Walkin59b176e2005-11-26 11:25:14 +0000535 .default_value = 0,
Lev Walkine8318b82005-03-06 09:29:03 +0000536 .name = "patest1"
537 },
538 { ATF_NOFLAGS, 0, offsetof(struct Ypet, patest2),
539 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
540 .tag_mode = +1, /* EXPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000541 .type = &asn_DEF_IA5String,
Lev Walkin67a30122017-08-10 05:48:54 -0700542 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700543 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_patest2_constraint_1 },
Lev Walkin59b176e2005-11-26 11:25:14 +0000544 .default_value = 0,
Lev Walkine8318b82005-03-06 09:29:03 +0000545 .name = "patest2"
546 },
Lev Walkinc8285712005-03-04 22:18:20 +0000547};
Lev Walkina7591b52014-10-12 18:37:35 -0700548static const ber_tlv_tag_t asn_DEF_Ypet_tags_1[] = {
Lev Walkinc8285712005-03-04 22:18:20 +0000549 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
550};
Lev Walkina7591b52014-10-12 18:37:35 -0700551static const asn_TYPE_tag2member_t asn_MAP_Ypet_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700552 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* plain */
553 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* epyt */
554 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 2, 0, 0 }, /* senums */
555 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 3, 0, 0 }, /* patest1 */
556 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 4, 0, 0 } /* patest2 */
Lev Walkinc8285712005-03-04 22:18:20 +0000557};
Lev Walkina7591b52014-10-12 18:37:35 -0700558static const uint8_t asn_MAP_Ypet_mmap_1[(5 + (8 * sizeof(unsigned int)) - 1) / 8] = {
Lev Walkine8318b82005-03-06 09:29:03 +0000559 (1 << 7) | (0 << 6) | (1 << 5) | (1 << 4) | (1 << 3)
Lev Walkinc8285712005-03-04 22:18:20 +0000560};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800561asn_SET_specifics_t asn_SPC_Ypet_specs_1 = {
Lev Walkinc8285712005-03-04 22:18:20 +0000562 sizeof(struct Ypet),
563 offsetof(struct Ypet, _asn_ctx),
564 offsetof(struct Ypet, _presence_map),
Lev Walkine3917082017-08-23 10:29:38 -0700565 .tag2el = asn_MAP_Ypet_tag2el_1,
566 .tag2el_count = 5, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000567 asn_MAP_Ypet_tag2el_1, /* Same as above */
Lev Walkine8318b82005-03-06 09:29:03 +0000568 5, /* Count of tags in the CXER map */
Lev Walkinc8285712005-03-04 22:18:20 +0000569 0, /* Whether extensible */
Lev Walkin46ef3f32017-07-06 08:47:53 -0700570 (const unsigned int *)asn_MAP_Ypet_mmap_1 /* Mandatory elements map */
Lev Walkinc8285712005-03-04 22:18:20 +0000571};
572asn_TYPE_descriptor_t asn_DEF_Ypet = {
573 "Ypet",
574 "Ypet",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800575 &asn_OP_SET,
Lev Walkin59b176e2005-11-26 11:25:14 +0000576 asn_DEF_Ypet_tags_1,
577 sizeof(asn_DEF_Ypet_tags_1)
578 /sizeof(asn_DEF_Ypet_tags_1[0]), /* 1 */
579 asn_DEF_Ypet_tags_1, /* Same as above */
580 sizeof(asn_DEF_Ypet_tags_1)
581 /sizeof(asn_DEF_Ypet_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700582 { 0, 0, SET_constraint },
Lev Walkinc8285712005-03-04 22:18:20 +0000583 asn_MBR_Ypet_1,
Lev Walkine8318b82005-03-06 09:29:03 +0000584 5, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000585 &asn_SPC_Ypet_specs_1 /* Additional specs */
Lev Walkinc8285712005-03-04 22:18:20 +0000586};
587
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000588
589/*** <<< INCLUDES [EnumType] >>> ***/
590
591#include <ENUMERATED.h>
592
593/*** <<< DEPS [EnumType] >>> ***/
594
595typedef enum EnumType {
596 EnumType_one = 0,
597 EnumType_two = 1
Lev Walkin171487e2006-03-21 07:25:18 +0000598} e_EnumType;
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000599
600/*** <<< TYPE-DECLS [EnumType] >>> ***/
601
602typedef ENUMERATED_t EnumType_t;
603
604/*** <<< FUNC-DECLS [EnumType] >>> ***/
605
606extern asn_TYPE_descriptor_t asn_DEF_EnumType;
Lev Walkin9ded96c2017-08-23 04:38:31 -0700607extern const asn_INTEGER_specifics_t asn_SPC_EnumType_specs_1;
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000608asn_struct_free_f EnumType_free;
609asn_struct_print_f EnumType_print;
610asn_constr_check_f EnumType_constraint;
611ber_type_decoder_f EnumType_decode_ber;
612der_type_encoder_f EnumType_encode_der;
613xer_type_decoder_f EnumType_decode_xer;
614xer_type_encoder_f EnumType_encode_xer;
615
616/*** <<< CODE [EnumType] >>> ***/
617
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000618/*
619 * This type is implemented using ENUMERATED,
620 * so here we adjust the DEF accordingly.
621 */
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000622
623/*** <<< STAT-DEFS [EnumType] >>> ***/
624
Lev Walkina7591b52014-10-12 18:37:35 -0700625static const asn_INTEGER_enum_map_t asn_MAP_EnumType_value2enum_1[] = {
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000626 { 0, 3, "one" },
627 { 1, 3, "two" }
628};
Lev Walkina7591b52014-10-12 18:37:35 -0700629static const unsigned int asn_MAP_EnumType_enum2value_1[] = {
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000630 0, /* one(0) */
631 1 /* two(1) */
632};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800633const asn_INTEGER_specifics_t asn_SPC_EnumType_specs_1 = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000634 asn_MAP_EnumType_value2enum_1, /* "tag" => N; sorted by tag */
635 asn_MAP_EnumType_enum2value_1, /* N => "tag"; sorted by N */
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000636 2, /* Number of elements in the maps */
637 0, /* Enumeration is not extensible */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000638 1, /* Strict enumeration */
639 0, /* Native long size */
640 0
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000641};
Lev Walkina7591b52014-10-12 18:37:35 -0700642static const ber_tlv_tag_t asn_DEF_EnumType_tags_1[] = {
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000643 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
644};
645asn_TYPE_descriptor_t asn_DEF_EnumType = {
646 "EnumType",
647 "EnumType",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800648 &asn_OP_ENUMERATED,
Lev Walkin59b176e2005-11-26 11:25:14 +0000649 asn_DEF_EnumType_tags_1,
650 sizeof(asn_DEF_EnumType_tags_1)
651 /sizeof(asn_DEF_EnumType_tags_1[0]), /* 1 */
652 asn_DEF_EnumType_tags_1, /* Same as above */
653 sizeof(asn_DEF_EnumType_tags_1)
654 /sizeof(asn_DEF_EnumType_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700655 { 0, 0, ENUMERATED_constraint },
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000656 0, 0, /* Defined elsewhere */
Lev Walkin59b176e2005-11-26 11:25:14 +0000657 &asn_SPC_EnumType_specs_1 /* Additional specs */
Lev Walkinfe7f6ec2005-03-04 22:38:22 +0000658};
659