blob: a3d1096e4aaa7159855e98861a0ed5318c6241f1 [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 */
13enum T1_PR_e {
14 T1_PR_i, /* Member i is present */
15};
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)
76 /sizeof(asn1_DEF_T1_tags[0]),
77 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 */
94enum T2_PR_e {
95 T2_PR_i, /* Member i is present */
96};
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)
157 /sizeof(asn1_DEF_T2_tags[0]),
158 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 */
175} T3_PR_e;
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 Walkinb47ddce2004-08-11 05:25:47 +0000182 T3_PR_e 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};
205static ber_tlv_tag_t asn1_DEF_T3_tags[] = {
206
207};
208static asn1_TYPE_tag2member_t asn1_DEF_T3_tag2el[] = {
209 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 16 */
210};
211static asn1_CHOICE_specifics_t asn1_DEF_T3_specs = {
212 sizeof(struct T3),
213 offsetof(struct T3, _ber_dec_ctx),
214 offsetof(struct T3, present),
215 sizeof(((struct T3 *)0)->present),
216 asn1_DEF_T3_elements,
217 1, /* Elements count */
218 asn1_DEF_T3_tag2el,
219 1, /* Count of tags in the map */
220 1 /* Whether extensible */
221};
222asn1_TYPE_descriptor_t asn1_DEF_T3 = {
223 "T3",
224 CHOICE_constraint,
225 CHOICE_decode_ber,
226 CHOICE_encode_der,
227 CHOICE_print,
228 CHOICE_free,
229 CHOICE_outmost_tag,
230 asn1_DEF_T3_tags,
231 sizeof(asn1_DEF_T3_tags)
232 /sizeof(asn1_DEF_T3_tags[0]),
233 0, /* Tags to skip */
234 1, /* Whether CONSTRUCTED */
235 &asn1_DEF_T3_specs /* Additional specs */
236};
237
238
Lev Walkinb47ddce2004-08-11 05:25:47 +0000239/*** <<< INCLUDES [T4] >>> ***/
240
241#include <INTEGER.h>
242#include <constr_CHOICE.h>
243
Lev Walkin35631482004-07-01 00:52:50 +0000244/*** <<< DEPS [T4] >>> ***/
245
Lev Walkinb47ddce2004-08-11 05:25:47 +0000246typedef enum T4_PR {
247 T4_PR_NOTHING, /* No components present */
248 T4_PR_i,
249 /* Extensions may appear below */
250} T4_PR_e;
Lev Walkin35631482004-07-01 00:52:50 +0000251extern asn1_TYPE_descriptor_t asn1_DEF_T4;
252
253/*** <<< TYPE-DECLS [T4] >>> ***/
254
255
256typedef struct T4 {
Lev Walkinb47ddce2004-08-11 05:25:47 +0000257 T4_PR_e present;
Lev Walkin35631482004-07-01 00:52:50 +0000258 union {
259 INTEGER_t i;
260 /*
261 * This type is extensible,
262 * possible extensions are below.
263 */
264 } choice;
265
266 /* Context for parsing across buffer boundaries */
267 ber_dec_ctx_t _ber_dec_ctx;
268} T4_t;
269
270/*** <<< STAT-DEFS [T4] >>> ***/
271
Lev Walkin35631482004-07-01 00:52:50 +0000272static asn1_CHOICE_element_t asn1_DEF_T4_elements[] = {
273 { offsetof(struct T4, choice.i), 0,
274 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
275 0,
276 (void *)&asn1_DEF_INTEGER,
277 "i"
278 },
279};
280static ber_tlv_tag_t asn1_DEF_T4_tags[] = {
281
282};
283static asn1_TYPE_tag2member_t asn1_DEF_T4_tag2el[] = {
284 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 17 */
285};
286static asn1_CHOICE_specifics_t asn1_DEF_T4_specs = {
287 sizeof(struct T4),
288 offsetof(struct T4, _ber_dec_ctx),
289 offsetof(struct T4, present),
290 sizeof(((struct T4 *)0)->present),
291 asn1_DEF_T4_elements,
292 1, /* Elements count */
293 asn1_DEF_T4_tag2el,
294 1, /* Count of tags in the map */
295 1 /* Whether extensible */
296};
297asn1_TYPE_descriptor_t asn1_DEF_T4 = {
298 "T4",
299 CHOICE_constraint,
300 CHOICE_decode_ber,
301 CHOICE_encode_der,
302 CHOICE_print,
303 CHOICE_free,
304 CHOICE_outmost_tag,
305 asn1_DEF_T4_tags,
306 sizeof(asn1_DEF_T4_tags)
307 /sizeof(asn1_DEF_T4_tags[0]),
308 0, /* Tags to skip */
309 1, /* Whether CONSTRUCTED */
310 &asn1_DEF_T4_specs /* Additional specs */
311};
312