blob: e945ccfec00d5bea2f6e569022d6054ecf964668 [file] [log] [blame]
Lev Walkin35631482004-07-01 00:52:50 +00001
Lev Walkinb47ddce2004-08-11 05:25:47 +00002/*** <<< INCLUDES [T1] >>> ***/
Lev Walkin35631482004-07-01 00:52:50 +00003
Lev Walkin35631482004-07-01 00:52:50 +00004#include <INTEGER.h>
Lev Walkinb47ddce2004-08-11 05:25:47 +00005#include <constr_SET.h>
6
7/*** <<< DEPS [T1] >>> ***/
Lev Walkin35631482004-07-01 00:52:50 +00008
9
10/*
11 * Method of determining the components presence
12 */
Lev Walkin64399722004-08-11 07:17:22 +000013typedef enum T1_PR {
Lev Walkin35631482004-07-01 00:52:50 +000014 T1_PR_i, /* Member i is present */
Lev Walkin64399722004-08-11 07:17:22 +000015} T1_PR;
Lev Walkin35631482004-07-01 00:52:50 +000016extern asn1_TYPE_descriptor_t asn1_DEF_T1;
17
18/*** <<< TYPE-DECLS [T1] >>> ***/
19
20
21typedef struct T1 {
22 INTEGER_t i;
23 /*
24 * This type is extensible,
25 * possible extensions are below.
26 */
27
28 /* Presence bitmask: ASN_SET_ISPRESENT(pT1, T1_PR_x) */
29 unsigned int _presence_map
30 [((1+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
31
32 /* Context for parsing across buffer boundaries */
33 ber_dec_ctx_t _ber_dec_ctx;
34} T1_t;
35
36/*** <<< STAT-DEFS [T1] >>> ***/
37
Lev Walkin35631482004-07-01 00:52:50 +000038static asn1_SET_element_t asn1_DEF_T1_elements[] = {
39 { offsetof(struct T1, i), 0,
40 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
41 0,
42 (void *)&asn1_DEF_INTEGER,
43 "i"
44 },
45};
46static ber_tlv_tag_t asn1_DEF_T1_tags[] = {
47 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
48};
49static asn1_TYPE_tag2member_t asn1_DEF_T1_tag2el[] = {
50 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 14 */
51};
52static uint8_t asn1_DEF_T1_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
53 (1 << 7)
54};
55static asn1_SET_specifics_t asn1_DEF_T1_specs = {
56 sizeof(struct T1),
57 offsetof(struct T1, _ber_dec_ctx),
58 offsetof(struct T1, _presence_map),
59 asn1_DEF_T1_elements,
60 1, /* Elements count */
61 asn1_DEF_T1_tag2el,
62 1, /* Count of tags in the map */
63 1, /* Whether extensible */
64 (unsigned int *)asn1_DEF_T1_mmap /* Mandatory elements map */
65};
66asn1_TYPE_descriptor_t asn1_DEF_T1 = {
67 "T1",
68 SET_constraint,
69 SET_decode_ber,
70 SET_encode_der,
71 SET_print,
72 SET_free,
73 0, /* Use generic outmost tag fetcher */
74 asn1_DEF_T1_tags,
75 sizeof(asn1_DEF_T1_tags)
Lev Walkin64399722004-08-11 07:17:22 +000076 /sizeof(asn1_DEF_T1_tags[0]), /* 1 */
Lev Walkin35631482004-07-01 00:52:50 +000077 1, /* Tags to skip */
78 1, /* Whether CONSTRUCTED */
79 &asn1_DEF_T1_specs /* Additional specs */
80};
81
82
Lev Walkinb47ddce2004-08-11 05:25:47 +000083/*** <<< INCLUDES [T2] >>> ***/
Lev Walkin35631482004-07-01 00:52:50 +000084
Lev Walkin35631482004-07-01 00:52:50 +000085#include <INTEGER.h>
Lev Walkinb47ddce2004-08-11 05:25:47 +000086#include <constr_SET.h>
87
88/*** <<< DEPS [T2] >>> ***/
Lev Walkin35631482004-07-01 00:52:50 +000089
90
91/*
92 * Method of determining the components presence
93 */
Lev Walkin64399722004-08-11 07:17:22 +000094typedef enum T2_PR {
Lev Walkin35631482004-07-01 00:52:50 +000095 T2_PR_i, /* Member i is present */
Lev Walkin64399722004-08-11 07:17:22 +000096} T2_PR;
Lev Walkin35631482004-07-01 00:52:50 +000097extern asn1_TYPE_descriptor_t asn1_DEF_T2;
98
99/*** <<< TYPE-DECLS [T2] >>> ***/
100
101
102typedef struct T2 {
103 INTEGER_t i;
104 /*
105 * This type is extensible,
106 * possible extensions are below.
107 */
108
109 /* Presence bitmask: ASN_SET_ISPRESENT(pT2, T2_PR_x) */
110 unsigned int _presence_map
111 [((1+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
112
113 /* Context for parsing across buffer boundaries */
114 ber_dec_ctx_t _ber_dec_ctx;
115} T2_t;
116
117/*** <<< STAT-DEFS [T2] >>> ***/
118
Lev Walkin35631482004-07-01 00:52:50 +0000119static asn1_SET_element_t asn1_DEF_T2_elements[] = {
120 { offsetof(struct T2, i), 0,
121 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
122 0,
123 (void *)&asn1_DEF_INTEGER,
124 "i"
125 },
126};
127static ber_tlv_tag_t asn1_DEF_T2_tags[] = {
128 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
129};
130static asn1_TYPE_tag2member_t asn1_DEF_T2_tag2el[] = {
131 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 15 */
132};
133static uint8_t asn1_DEF_T2_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
134 (1 << 7)
135};
136static asn1_SET_specifics_t asn1_DEF_T2_specs = {
137 sizeof(struct T2),
138 offsetof(struct T2, _ber_dec_ctx),
139 offsetof(struct T2, _presence_map),
140 asn1_DEF_T2_elements,
141 1, /* Elements count */
142 asn1_DEF_T2_tag2el,
143 1, /* Count of tags in the map */
144 1, /* Whether extensible */
145 (unsigned int *)asn1_DEF_T2_mmap /* Mandatory elements map */
146};
147asn1_TYPE_descriptor_t asn1_DEF_T2 = {
148 "T2",
149 SET_constraint,
150 SET_decode_ber,
151 SET_encode_der,
152 SET_print,
153 SET_free,
154 0, /* Use generic outmost tag fetcher */
155 asn1_DEF_T2_tags,
156 sizeof(asn1_DEF_T2_tags)
Lev Walkin64399722004-08-11 07:17:22 +0000157 /sizeof(asn1_DEF_T2_tags[0]), /* 1 */
Lev Walkin35631482004-07-01 00:52:50 +0000158 1, /* Tags to skip */
159 1, /* Whether CONSTRUCTED */
160 &asn1_DEF_T2_specs /* Additional specs */
161};
162
163
Lev Walkinb47ddce2004-08-11 05:25:47 +0000164/*** <<< INCLUDES [T3] >>> ***/
165
166#include <INTEGER.h>
167#include <constr_CHOICE.h>
168
Lev Walkin35631482004-07-01 00:52:50 +0000169/*** <<< DEPS [T3] >>> ***/
170
Lev Walkinb47ddce2004-08-11 05:25:47 +0000171typedef enum T3_PR {
172 T3_PR_NOTHING, /* No components present */
173 T3_PR_i,
174 /* Extensions may appear below */
Lev Walkin64399722004-08-11 07:17:22 +0000175} T3_PR;
Lev Walkin35631482004-07-01 00:52:50 +0000176extern asn1_TYPE_descriptor_t asn1_DEF_T3;
177
178/*** <<< TYPE-DECLS [T3] >>> ***/
179
180
181typedef struct T3 {
Lev Walkin64399722004-08-11 07:17:22 +0000182 T3_PR present;
Lev Walkin35631482004-07-01 00:52:50 +0000183 union {
184 INTEGER_t i;
185 /*
186 * This type is extensible,
187 * possible extensions are below.
188 */
189 } choice;
190
191 /* Context for parsing across buffer boundaries */
192 ber_dec_ctx_t _ber_dec_ctx;
193} T3_t;
194
195/*** <<< STAT-DEFS [T3] >>> ***/
196
Lev Walkin35631482004-07-01 00:52:50 +0000197static asn1_CHOICE_element_t asn1_DEF_T3_elements[] = {
198 { offsetof(struct T3, choice.i), 0,
199 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
200 0,
201 (void *)&asn1_DEF_INTEGER,
202 "i"
203 },
204};
Lev Walkin35631482004-07-01 00:52:50 +0000205static asn1_TYPE_tag2member_t asn1_DEF_T3_tag2el[] = {
206 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 16 */
207};
208static asn1_CHOICE_specifics_t asn1_DEF_T3_specs = {
209 sizeof(struct T3),
210 offsetof(struct T3, _ber_dec_ctx),
211 offsetof(struct T3, present),
212 sizeof(((struct T3 *)0)->present),
213 asn1_DEF_T3_elements,
214 1, /* Elements count */
215 asn1_DEF_T3_tag2el,
216 1, /* Count of tags in the map */
217 1 /* Whether extensible */
218};
219asn1_TYPE_descriptor_t asn1_DEF_T3 = {
220 "T3",
221 CHOICE_constraint,
222 CHOICE_decode_ber,
223 CHOICE_encode_der,
224 CHOICE_print,
225 CHOICE_free,
226 CHOICE_outmost_tag,
Lev Walkin64399722004-08-11 07:17:22 +0000227 0, /* No explicit tags (pointer) */
228 0, /* No explicit tags (count) */
Lev Walkin35631482004-07-01 00:52:50 +0000229 0, /* Tags to skip */
230 1, /* Whether CONSTRUCTED */
231 &asn1_DEF_T3_specs /* Additional specs */
232};
233
234
Lev Walkinb47ddce2004-08-11 05:25:47 +0000235/*** <<< INCLUDES [T4] >>> ***/
236
237#include <INTEGER.h>
238#include <constr_CHOICE.h>
239
Lev Walkin35631482004-07-01 00:52:50 +0000240/*** <<< DEPS [T4] >>> ***/
241
Lev Walkinb47ddce2004-08-11 05:25:47 +0000242typedef enum T4_PR {
243 T4_PR_NOTHING, /* No components present */
244 T4_PR_i,
245 /* Extensions may appear below */
Lev Walkin64399722004-08-11 07:17:22 +0000246} T4_PR;
Lev Walkin35631482004-07-01 00:52:50 +0000247extern asn1_TYPE_descriptor_t asn1_DEF_T4;
248
249/*** <<< TYPE-DECLS [T4] >>> ***/
250
251
252typedef struct T4 {
Lev Walkin64399722004-08-11 07:17:22 +0000253 T4_PR present;
Lev Walkin35631482004-07-01 00:52:50 +0000254 union {
255 INTEGER_t i;
256 /*
257 * This type is extensible,
258 * possible extensions are below.
259 */
260 } choice;
261
262 /* Context for parsing across buffer boundaries */
263 ber_dec_ctx_t _ber_dec_ctx;
264} T4_t;
265
266/*** <<< STAT-DEFS [T4] >>> ***/
267
Lev Walkin35631482004-07-01 00:52:50 +0000268static asn1_CHOICE_element_t asn1_DEF_T4_elements[] = {
269 { offsetof(struct T4, choice.i), 0,
270 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
271 0,
272 (void *)&asn1_DEF_INTEGER,
273 "i"
274 },
275};
Lev Walkin35631482004-07-01 00:52:50 +0000276static asn1_TYPE_tag2member_t asn1_DEF_T4_tag2el[] = {
277 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 17 */
278};
279static asn1_CHOICE_specifics_t asn1_DEF_T4_specs = {
280 sizeof(struct T4),
281 offsetof(struct T4, _ber_dec_ctx),
282 offsetof(struct T4, present),
283 sizeof(((struct T4 *)0)->present),
284 asn1_DEF_T4_elements,
285 1, /* Elements count */
286 asn1_DEF_T4_tag2el,
287 1, /* Count of tags in the map */
288 1 /* Whether extensible */
289};
290asn1_TYPE_descriptor_t asn1_DEF_T4 = {
291 "T4",
292 CHOICE_constraint,
293 CHOICE_decode_ber,
294 CHOICE_encode_der,
295 CHOICE_print,
296 CHOICE_free,
297 CHOICE_outmost_tag,
Lev Walkin64399722004-08-11 07:17:22 +0000298 0, /* No explicit tags (pointer) */
299 0, /* No explicit tags (count) */
Lev Walkin35631482004-07-01 00:52:50 +0000300 0, /* Tags to skip */
301 1, /* Whether CONSTRUCTED */
302 &asn1_DEF_T4_specs /* Additional specs */
303};
304