blob: c5682cdae7366606d9bd31c1f940e7cc32010334 [file] [log] [blame]
Lev Walkin59b176e2005-11-26 11:25:14 +00001
2/*** <<< INCLUDES [Choice] >>> ***/
3
4#include <RELATIVE-OID.h>
5#include <BIT_STRING.h>
6#include <BOOLEAN.h>
7#include <NULL.h>
8#include <INTEGER.h>
9#include <constr_CHOICE.h>
10
11/*** <<< DEPS [Choice] >>> ***/
12
13typedef enum Choice_PR {
14 Choice_PR_NOTHING, /* No components present */
15 Choice_PR_roid,
16 Choice_PR_bitstr,
17 Choice_PR_ch,
18 /* Extensions may appear below */
Lev Walkin9f5bb3a2006-08-18 01:46:46 +000019 Choice_PR_bool
Lev Walkin59b176e2005-11-26 11:25:14 +000020} Choice_PR;
21typedef enum ch_PR {
22 ch_PR_NOTHING, /* No components present */
23 ch_PR_null,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +000024 ch_PR_int
Lev Walkin59b176e2005-11-26 11:25:14 +000025} ch_PR;
26
27/*** <<< TYPE-DECLS [Choice] >>> ***/
28
29typedef struct Choice {
30 Choice_PR present;
31 union Choice_u {
32 RELATIVE_OID_t roid;
33 BIT_STRING_t bitstr;
34 struct ch {
35 ch_PR present;
36 union Choice__ch_u {
37 NULL_t null;
38 INTEGER_t Int;
39 } choice;
40
41 /* Context for parsing across buffer boundaries */
42 asn_struct_ctx_t _asn_ctx;
43 } ch;
44 /*
45 * This type is extensible,
46 * possible extensions are below.
47 */
Lev Walkin2a744a72013-03-27 01:56:23 -070048 BOOLEAN_t Bool;
Lev Walkin59b176e2005-11-26 11:25:14 +000049 } choice;
50
51 /* Context for parsing across buffer boundaries */
52 asn_struct_ctx_t _asn_ctx;
53} Choice_t;
54
55/*** <<< FUNC-DECLS [Choice] >>> ***/
56
57extern asn_TYPE_descriptor_t asn_DEF_Choice;
58
59/*** <<< STAT-DEFS [Choice] >>> ***/
60
61static asn_TYPE_member_t asn_MBR_ch_4[] = {
62 { ATF_NOFLAGS, 0, offsetof(struct ch, choice.null),
63 .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)),
64 .tag_mode = 0,
65 .type = &asn_DEF_NULL,
Lev Walkin67a30122017-08-10 05:48:54 -070066 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -070067 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -070068 0, 0, /* No default value */
Lev Walkin59b176e2005-11-26 11:25:14 +000069 .name = "null"
70 },
71 { ATF_NOFLAGS, 0, offsetof(struct ch, choice.Int),
72 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
73 .tag_mode = 0,
74 .type = &asn_DEF_INTEGER,
Lev Walkin67a30122017-08-10 05:48:54 -070075 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -070076 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -070077 0, 0, /* No default value */
Lev Walkin59b176e2005-11-26 11:25:14 +000078 .name = "int"
79 },
80};
Lev Walkina7591b52014-10-12 18:37:35 -070081static const asn_TYPE_tag2member_t asn_MAP_ch_tag2el_4[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070082 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* int */
83 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 0, 0, 0 } /* null */
Lev Walkin59b176e2005-11-26 11:25:14 +000084};
85static asn_CHOICE_specifics_t asn_SPC_ch_specs_4 = {
86 sizeof(struct ch),
87 offsetof(struct ch, _asn_ctx),
88 offsetof(struct ch, present),
89 sizeof(((struct ch *)0)->present),
Lev Walkine3917082017-08-23 10:29:38 -070090 .tag2el = asn_MAP_ch_tag2el_4,
91 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkin20696a42017-10-17 21:27:33 -070092 0, 0,
Lev Walkindf2edbb2017-10-21 13:40:07 -070093 .first_extension = -1 /* Extensions start */
Lev Walkin59b176e2005-11-26 11:25:14 +000094};
95static /* Use -fall-defs-global to expose */
96asn_TYPE_descriptor_t asn_DEF_ch_4 = {
97 "ch",
98 "ch",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +080099 &asn_OP_CHOICE,
Lev Walkin59b176e2005-11-26 11:25:14 +0000100 0, /* No effective tags (pointer) */
101 0, /* No effective tags (count) */
102 0, /* No tags (pointer) */
103 0, /* No tags (count) */
Lev Walkin0bfea562017-09-29 23:16:48 -0700104 { 0, 0, CHOICE_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000105 asn_MBR_ch_4,
106 2, /* Elements count */
107 &asn_SPC_ch_specs_4 /* Additional specs */
108};
109
110static asn_TYPE_member_t asn_MBR_Choice_1[] = {
111 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.roid),
112 .tag = (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)),
113 .tag_mode = 0,
114 .type = &asn_DEF_RELATIVE_OID,
Lev Walkin67a30122017-08-10 05:48:54 -0700115 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700116 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700117 0, 0, /* No default value */
Lev Walkin59b176e2005-11-26 11:25:14 +0000118 .name = "roid"
119 },
120 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.bitstr),
121 .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
122 .tag_mode = 0,
123 .type = &asn_DEF_BIT_STRING,
Lev Walkin67a30122017-08-10 05:48:54 -0700124 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700125 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700126 0, 0, /* No default value */
Lev Walkin59b176e2005-11-26 11:25:14 +0000127 .name = "bitstr"
128 },
129 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.ch),
130 .tag = -1 /* Ambiguous tag (CHOICE?) */,
131 .tag_mode = 0,
132 .type = &asn_DEF_ch_4,
Lev Walkin67a30122017-08-10 05:48:54 -0700133 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700134 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700135 0, 0, /* No default value */
Lev Walkin59b176e2005-11-26 11:25:14 +0000136 .name = "ch"
137 },
Lev Walkin2a744a72013-03-27 01:56:23 -0700138 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.Bool),
Lev Walkin59b176e2005-11-26 11:25:14 +0000139 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
140 .tag_mode = 0,
141 .type = &asn_DEF_BOOLEAN,
Lev Walkin67a30122017-08-10 05:48:54 -0700142 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700143 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700144 0, 0, /* No default value */
Lev Walkin59b176e2005-11-26 11:25:14 +0000145 .name = "bool"
146 },
147};
Lev Walkina7591b52014-10-12 18:37:35 -0700148static const asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700149 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool */
150 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, 0, 0 }, /* int */
151 { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 1, 0, 0 }, /* bitstr */
152 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 2, 0, 0 }, /* null */
153 { (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)), 0, 0, 0 } /* roid */
Lev Walkin59b176e2005-11-26 11:25:14 +0000154};
155static asn_CHOICE_specifics_t asn_SPC_Choice_specs_1 = {
156 sizeof(struct Choice),
157 offsetof(struct Choice, _asn_ctx),
158 offsetof(struct Choice, present),
159 sizeof(((struct Choice *)0)->present),
Lev Walkine3917082017-08-23 10:29:38 -0700160 .tag2el = asn_MAP_Choice_tag2el_1,
161 .tag2el_count = 5, /* Count of tags in the map */
Lev Walkin20696a42017-10-17 21:27:33 -0700162 0, 0,
Lev Walkindf2edbb2017-10-21 13:40:07 -0700163 .first_extension = 3 /* Extensions start */
Lev Walkin59b176e2005-11-26 11:25:14 +0000164};
165asn_TYPE_descriptor_t asn_DEF_Choice = {
166 "Choice",
167 "Choice",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800168 &asn_OP_CHOICE,
Lev Walkin59b176e2005-11-26 11:25:14 +0000169 0, /* No effective tags (pointer) */
170 0, /* No effective tags (count) */
171 0, /* No tags (pointer) */
172 0, /* No tags (count) */
Lev Walkin0bfea562017-09-29 23:16:48 -0700173 { 0, 0, CHOICE_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000174 asn_MBR_Choice_1,
175 4, /* Elements count */
176 &asn_SPC_Choice_specs_1 /* Additional specs */
177};
178
179
180/*** <<< INCLUDES [Choice2] >>> ***/
181
182#include <BIT_STRING.h>
183#include <RELATIVE-OID.h>
184#include <constr_CHOICE.h>
185
186/*** <<< DEPS [Choice2] >>> ***/
187
188typedef enum Choice2_PR {
189 Choice2_PR_NOTHING, /* No components present */
190 Choice2_PR_bitstr,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000191 Choice2_PR_roid
Lev Walkin59b176e2005-11-26 11:25:14 +0000192} Choice2_PR;
193
194/*** <<< TYPE-DECLS [Choice2] >>> ***/
195
196typedef struct Choice2 {
197 Choice2_PR present;
198 union Choice2_u {
199 BIT_STRING_t bitstr;
200 RELATIVE_OID_t roid;
201 } choice;
202
203 /* Context for parsing across buffer boundaries */
204 asn_struct_ctx_t _asn_ctx;
205} Choice2_t;
206
207/*** <<< FUNC-DECLS [Choice2] >>> ***/
208
209extern asn_TYPE_descriptor_t asn_DEF_Choice2;
210
211/*** <<< STAT-DEFS [Choice2] >>> ***/
212
213static asn_TYPE_member_t asn_MBR_Choice2_1[] = {
214 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.bitstr),
215 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
216 .tag_mode = +1, /* EXPLICIT tag at current level */
217 .type = &asn_DEF_BIT_STRING,
Lev Walkin67a30122017-08-10 05:48:54 -0700218 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700219 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700220 0, 0, /* No default value */
Lev Walkin59b176e2005-11-26 11:25:14 +0000221 .name = "bitstr"
222 },
223 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.roid),
224 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
225 .tag_mode = +1, /* EXPLICIT tag at current level */
226 .type = &asn_DEF_RELATIVE_OID,
Lev Walkin67a30122017-08-10 05:48:54 -0700227 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700228 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700229 0, 0, /* No default value */
Lev Walkin59b176e2005-11-26 11:25:14 +0000230 .name = "roid"
231 },
232};
Lev Walkina7591b52014-10-12 18:37:35 -0700233static const asn_TYPE_tag2member_t asn_MAP_Choice2_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700234 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* bitstr */
235 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* roid */
Lev Walkin59b176e2005-11-26 11:25:14 +0000236};
237static asn_CHOICE_specifics_t asn_SPC_Choice2_specs_1 = {
238 sizeof(struct Choice2),
239 offsetof(struct Choice2, _asn_ctx),
240 offsetof(struct Choice2, present),
241 sizeof(((struct Choice2 *)0)->present),
Lev Walkine3917082017-08-23 10:29:38 -0700242 .tag2el = asn_MAP_Choice2_tag2el_1,
243 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkin20696a42017-10-17 21:27:33 -0700244 0, 0,
Lev Walkindf2edbb2017-10-21 13:40:07 -0700245 .first_extension = -1 /* Extensions start */
Lev Walkin59b176e2005-11-26 11:25:14 +0000246};
247asn_TYPE_descriptor_t asn_DEF_Choice2 = {
248 "Choice2",
249 "Choice2",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800250 &asn_OP_CHOICE,
Lev Walkin59b176e2005-11-26 11:25:14 +0000251 0, /* No effective tags (pointer) */
252 0, /* No effective tags (count) */
253 0, /* No tags (pointer) */
254 0, /* No tags (count) */
Lev Walkin0bfea562017-09-29 23:16:48 -0700255 { 0, 0, CHOICE_constraint },
Lev Walkin59b176e2005-11-26 11:25:14 +0000256 asn_MBR_Choice2_1,
257 2, /* Elements count */
258 &asn_SPC_Choice2_specs_1 /* Additional specs */
259};
260