blob: bcc364b095a311c49b5e4ecda487e113dd3c5233 [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 Walkin2e3055d2004-08-20 13:36:32 +000038static asn1_TYPE_member_t asn1_MBR_T1[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +000039 { ATF_NOFLAGS, 0, offsetof(struct T1, i),
Lev Walkin2e3055d2004-08-20 13:36:32 +000040 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
41 .tag_mode = 0,
42 .type = (void *)&asn1_DEF_INTEGER,
43 .memb_constraints = 0, /* Defer to actual type */
44 .name = "i"
Lev Walkin35631482004-07-01 00:52:50 +000045 },
46};
47static ber_tlv_tag_t asn1_DEF_T1_tags[] = {
48 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
49};
50static asn1_TYPE_tag2member_t asn1_DEF_T1_tag2el[] = {
51 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 14 */
52};
53static uint8_t asn1_DEF_T1_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
54 (1 << 7)
55};
56static asn1_SET_specifics_t asn1_DEF_T1_specs = {
57 sizeof(struct T1),
58 offsetof(struct T1, _ber_dec_ctx),
59 offsetof(struct T1, _presence_map),
Lev Walkin35631482004-07-01 00:52:50 +000060 asn1_DEF_T1_tag2el,
61 1, /* Count of tags in the map */
62 1, /* Whether extensible */
63 (unsigned int *)asn1_DEF_T1_mmap /* Mandatory elements map */
64};
65asn1_TYPE_descriptor_t asn1_DEF_T1 = {
66 "T1",
Lev Walkina9cc46e2004-09-22 16:06:28 +000067 SET_free,
68 SET_print,
Lev Walkin35631482004-07-01 00:52:50 +000069 SET_constraint,
70 SET_decode_ber,
71 SET_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +000072 0, /* Not implemented yet */
73 SET_encode_xer,
Lev Walkin35631482004-07-01 00:52:50 +000074 0, /* Use generic outmost tag fetcher */
75 asn1_DEF_T1_tags,
76 sizeof(asn1_DEF_T1_tags)
Lev Walkin64399722004-08-11 07:17:22 +000077 /sizeof(asn1_DEF_T1_tags[0]), /* 1 */
Lev Walkin188ed2c2004-09-13 08:31:01 +000078 asn1_DEF_T1_tags, /* Same as above */
79 sizeof(asn1_DEF_T1_tags)
80 /sizeof(asn1_DEF_T1_tags[0]), /* 1 */
Lev Walkin35631482004-07-01 00:52:50 +000081 1, /* Whether CONSTRUCTED */
Lev Walkin2e3055d2004-08-20 13:36:32 +000082 asn1_MBR_T1,
83 1, /* Elements count */
Lev Walkin35631482004-07-01 00:52:50 +000084 &asn1_DEF_T1_specs /* Additional specs */
85};
86
87
Lev Walkinb47ddce2004-08-11 05:25:47 +000088/*** <<< INCLUDES [T2] >>> ***/
Lev Walkin35631482004-07-01 00:52:50 +000089
Lev Walkin35631482004-07-01 00:52:50 +000090#include <INTEGER.h>
Lev Walkinb47ddce2004-08-11 05:25:47 +000091#include <constr_SET.h>
92
93/*** <<< DEPS [T2] >>> ***/
Lev Walkin35631482004-07-01 00:52:50 +000094
95
96/*
97 * Method of determining the components presence
98 */
Lev Walkin64399722004-08-11 07:17:22 +000099typedef enum T2_PR {
Lev Walkin35631482004-07-01 00:52:50 +0000100 T2_PR_i, /* Member i is present */
Lev Walkin64399722004-08-11 07:17:22 +0000101} T2_PR;
Lev Walkin35631482004-07-01 00:52:50 +0000102extern asn1_TYPE_descriptor_t asn1_DEF_T2;
103
104/*** <<< TYPE-DECLS [T2] >>> ***/
105
106
107typedef struct T2 {
108 INTEGER_t i;
109 /*
110 * This type is extensible,
111 * possible extensions are below.
112 */
113
114 /* Presence bitmask: ASN_SET_ISPRESENT(pT2, T2_PR_x) */
115 unsigned int _presence_map
116 [((1+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
117
118 /* Context for parsing across buffer boundaries */
119 ber_dec_ctx_t _ber_dec_ctx;
120} T2_t;
121
122/*** <<< STAT-DEFS [T2] >>> ***/
123
Lev Walkin2e3055d2004-08-20 13:36:32 +0000124static asn1_TYPE_member_t asn1_MBR_T2[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000125 { ATF_NOFLAGS, 0, offsetof(struct T2, i),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000126 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
127 .tag_mode = 0,
128 .type = (void *)&asn1_DEF_INTEGER,
129 .memb_constraints = 0, /* Defer to actual type */
130 .name = "i"
Lev Walkin35631482004-07-01 00:52:50 +0000131 },
132};
133static ber_tlv_tag_t asn1_DEF_T2_tags[] = {
134 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
135};
136static asn1_TYPE_tag2member_t asn1_DEF_T2_tag2el[] = {
137 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 15 */
138};
139static uint8_t asn1_DEF_T2_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
140 (1 << 7)
141};
142static asn1_SET_specifics_t asn1_DEF_T2_specs = {
143 sizeof(struct T2),
144 offsetof(struct T2, _ber_dec_ctx),
145 offsetof(struct T2, _presence_map),
Lev Walkin35631482004-07-01 00:52:50 +0000146 asn1_DEF_T2_tag2el,
147 1, /* Count of tags in the map */
148 1, /* Whether extensible */
149 (unsigned int *)asn1_DEF_T2_mmap /* Mandatory elements map */
150};
151asn1_TYPE_descriptor_t asn1_DEF_T2 = {
152 "T2",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000153 SET_free,
154 SET_print,
Lev Walkin35631482004-07-01 00:52:50 +0000155 SET_constraint,
156 SET_decode_ber,
157 SET_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000158 0, /* Not implemented yet */
159 SET_encode_xer,
Lev Walkin35631482004-07-01 00:52:50 +0000160 0, /* Use generic outmost tag fetcher */
161 asn1_DEF_T2_tags,
162 sizeof(asn1_DEF_T2_tags)
Lev Walkin64399722004-08-11 07:17:22 +0000163 /sizeof(asn1_DEF_T2_tags[0]), /* 1 */
Lev Walkin188ed2c2004-09-13 08:31:01 +0000164 asn1_DEF_T2_tags, /* Same as above */
165 sizeof(asn1_DEF_T2_tags)
166 /sizeof(asn1_DEF_T2_tags[0]), /* 1 */
Lev Walkin35631482004-07-01 00:52:50 +0000167 1, /* Whether CONSTRUCTED */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000168 asn1_MBR_T2,
169 1, /* Elements count */
Lev Walkin35631482004-07-01 00:52:50 +0000170 &asn1_DEF_T2_specs /* Additional specs */
171};
172
173
Lev Walkinb47ddce2004-08-11 05:25:47 +0000174/*** <<< INCLUDES [T3] >>> ***/
175
176#include <INTEGER.h>
177#include <constr_CHOICE.h>
178
Lev Walkin35631482004-07-01 00:52:50 +0000179/*** <<< DEPS [T3] >>> ***/
180
Lev Walkinb47ddce2004-08-11 05:25:47 +0000181typedef enum T3_PR {
182 T3_PR_NOTHING, /* No components present */
183 T3_PR_i,
184 /* Extensions may appear below */
Lev Walkin64399722004-08-11 07:17:22 +0000185} T3_PR;
Lev Walkin35631482004-07-01 00:52:50 +0000186extern asn1_TYPE_descriptor_t asn1_DEF_T3;
187
188/*** <<< TYPE-DECLS [T3] >>> ***/
189
190
191typedef struct T3 {
Lev Walkin64399722004-08-11 07:17:22 +0000192 T3_PR present;
Lev Walkin35631482004-07-01 00:52:50 +0000193 union {
194 INTEGER_t i;
195 /*
196 * This type is extensible,
197 * possible extensions are below.
198 */
199 } choice;
200
201 /* Context for parsing across buffer boundaries */
202 ber_dec_ctx_t _ber_dec_ctx;
203} T3_t;
204
205/*** <<< STAT-DEFS [T3] >>> ***/
206
Lev Walkin2e3055d2004-08-20 13:36:32 +0000207static asn1_TYPE_member_t asn1_MBR_T3[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000208 { ATF_NOFLAGS, 0, offsetof(struct T3, choice.i),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000209 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
210 .tag_mode = 0,
211 .type = (void *)&asn1_DEF_INTEGER,
212 .memb_constraints = 0, /* Defer to actual type */
213 .name = "i"
Lev Walkin35631482004-07-01 00:52:50 +0000214 },
215};
Lev Walkin35631482004-07-01 00:52:50 +0000216static asn1_TYPE_tag2member_t asn1_DEF_T3_tag2el[] = {
217 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 16 */
218};
219static asn1_CHOICE_specifics_t asn1_DEF_T3_specs = {
220 sizeof(struct T3),
221 offsetof(struct T3, _ber_dec_ctx),
222 offsetof(struct T3, present),
223 sizeof(((struct T3 *)0)->present),
Lev Walkin35631482004-07-01 00:52:50 +0000224 asn1_DEF_T3_tag2el,
225 1, /* Count of tags in the map */
226 1 /* Whether extensible */
227};
228asn1_TYPE_descriptor_t asn1_DEF_T3 = {
229 "T3",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000230 CHOICE_free,
231 CHOICE_print,
Lev Walkin35631482004-07-01 00:52:50 +0000232 CHOICE_constraint,
233 CHOICE_decode_ber,
234 CHOICE_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000235 0, /* Not implemented yet */
236 CHOICE_encode_xer,
Lev Walkin35631482004-07-01 00:52:50 +0000237 CHOICE_outmost_tag,
Lev Walkin188ed2c2004-09-13 08:31:01 +0000238 0, /* No effective tags (pointer) */
239 0, /* No effective tags (count) */
240 0, /* No tags (pointer) */
241 0, /* No tags (count) */
Lev Walkin35631482004-07-01 00:52:50 +0000242 1, /* Whether CONSTRUCTED */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000243 asn1_MBR_T3,
244 1, /* Elements count */
Lev Walkin35631482004-07-01 00:52:50 +0000245 &asn1_DEF_T3_specs /* Additional specs */
246};
247
248
Lev Walkinb47ddce2004-08-11 05:25:47 +0000249/*** <<< INCLUDES [T4] >>> ***/
250
251#include <INTEGER.h>
252#include <constr_CHOICE.h>
253
Lev Walkin35631482004-07-01 00:52:50 +0000254/*** <<< DEPS [T4] >>> ***/
255
Lev Walkinb47ddce2004-08-11 05:25:47 +0000256typedef enum T4_PR {
257 T4_PR_NOTHING, /* No components present */
258 T4_PR_i,
259 /* Extensions may appear below */
Lev Walkin64399722004-08-11 07:17:22 +0000260} T4_PR;
Lev Walkin35631482004-07-01 00:52:50 +0000261extern asn1_TYPE_descriptor_t asn1_DEF_T4;
262
263/*** <<< TYPE-DECLS [T4] >>> ***/
264
265
266typedef struct T4 {
Lev Walkin64399722004-08-11 07:17:22 +0000267 T4_PR present;
Lev Walkin35631482004-07-01 00:52:50 +0000268 union {
269 INTEGER_t i;
270 /*
271 * This type is extensible,
272 * possible extensions are below.
273 */
274 } choice;
275
276 /* Context for parsing across buffer boundaries */
277 ber_dec_ctx_t _ber_dec_ctx;
278} T4_t;
279
280/*** <<< STAT-DEFS [T4] >>> ***/
281
Lev Walkin2e3055d2004-08-20 13:36:32 +0000282static asn1_TYPE_member_t asn1_MBR_T4[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000283 { ATF_NOFLAGS, 0, offsetof(struct T4, choice.i),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000284 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
285 .tag_mode = 0,
286 .type = (void *)&asn1_DEF_INTEGER,
287 .memb_constraints = 0, /* Defer to actual type */
288 .name = "i"
Lev Walkin35631482004-07-01 00:52:50 +0000289 },
290};
Lev Walkin35631482004-07-01 00:52:50 +0000291static asn1_TYPE_tag2member_t asn1_DEF_T4_tag2el[] = {
292 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 17 */
293};
294static asn1_CHOICE_specifics_t asn1_DEF_T4_specs = {
295 sizeof(struct T4),
296 offsetof(struct T4, _ber_dec_ctx),
297 offsetof(struct T4, present),
298 sizeof(((struct T4 *)0)->present),
Lev Walkin35631482004-07-01 00:52:50 +0000299 asn1_DEF_T4_tag2el,
300 1, /* Count of tags in the map */
301 1 /* Whether extensible */
302};
303asn1_TYPE_descriptor_t asn1_DEF_T4 = {
304 "T4",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000305 CHOICE_free,
306 CHOICE_print,
Lev Walkin35631482004-07-01 00:52:50 +0000307 CHOICE_constraint,
308 CHOICE_decode_ber,
309 CHOICE_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000310 0, /* Not implemented yet */
311 CHOICE_encode_xer,
Lev Walkin35631482004-07-01 00:52:50 +0000312 CHOICE_outmost_tag,
Lev Walkin188ed2c2004-09-13 08:31:01 +0000313 0, /* No effective tags (pointer) */
314 0, /* No effective tags (count) */
315 0, /* No tags (pointer) */
316 0, /* No tags (count) */
Lev Walkin35631482004-07-01 00:52:50 +0000317 1, /* Whether CONSTRUCTED */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000318 asn1_MBR_T4,
319 1, /* Elements count */
Lev Walkin35631482004-07-01 00:52:50 +0000320 &asn1_DEF_T4_specs /* Additional specs */
321};
322