blob: 51b77acd60d02df9fbdebc7e7e6661896134c4e8 [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",
67 SET_constraint,
68 SET_decode_ber,
69 SET_encode_der,
70 SET_print,
71 SET_free,
72 0, /* Use generic outmost tag fetcher */
73 asn1_DEF_T1_tags,
74 sizeof(asn1_DEF_T1_tags)
Lev Walkin64399722004-08-11 07:17:22 +000075 /sizeof(asn1_DEF_T1_tags[0]), /* 1 */
Lev Walkin188ed2c2004-09-13 08:31:01 +000076 asn1_DEF_T1_tags, /* Same as above */
77 sizeof(asn1_DEF_T1_tags)
78 /sizeof(asn1_DEF_T1_tags[0]), /* 1 */
Lev Walkin35631482004-07-01 00:52:50 +000079 1, /* Whether CONSTRUCTED */
Lev Walkin2e3055d2004-08-20 13:36:32 +000080 asn1_MBR_T1,
81 1, /* Elements count */
Lev Walkin35631482004-07-01 00:52:50 +000082 &asn1_DEF_T1_specs /* Additional specs */
83};
84
85
Lev Walkinb47ddce2004-08-11 05:25:47 +000086/*** <<< INCLUDES [T2] >>> ***/
Lev Walkin35631482004-07-01 00:52:50 +000087
Lev Walkin35631482004-07-01 00:52:50 +000088#include <INTEGER.h>
Lev Walkinb47ddce2004-08-11 05:25:47 +000089#include <constr_SET.h>
90
91/*** <<< DEPS [T2] >>> ***/
Lev Walkin35631482004-07-01 00:52:50 +000092
93
94/*
95 * Method of determining the components presence
96 */
Lev Walkin64399722004-08-11 07:17:22 +000097typedef enum T2_PR {
Lev Walkin35631482004-07-01 00:52:50 +000098 T2_PR_i, /* Member i is present */
Lev Walkin64399722004-08-11 07:17:22 +000099} T2_PR;
Lev Walkin35631482004-07-01 00:52:50 +0000100extern asn1_TYPE_descriptor_t asn1_DEF_T2;
101
102/*** <<< TYPE-DECLS [T2] >>> ***/
103
104
105typedef struct T2 {
106 INTEGER_t i;
107 /*
108 * This type is extensible,
109 * possible extensions are below.
110 */
111
112 /* Presence bitmask: ASN_SET_ISPRESENT(pT2, T2_PR_x) */
113 unsigned int _presence_map
114 [((1+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
115
116 /* Context for parsing across buffer boundaries */
117 ber_dec_ctx_t _ber_dec_ctx;
118} T2_t;
119
120/*** <<< STAT-DEFS [T2] >>> ***/
121
Lev Walkin2e3055d2004-08-20 13:36:32 +0000122static asn1_TYPE_member_t asn1_MBR_T2[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000123 { ATF_NOFLAGS, 0, offsetof(struct T2, i),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000124 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
125 .tag_mode = 0,
126 .type = (void *)&asn1_DEF_INTEGER,
127 .memb_constraints = 0, /* Defer to actual type */
128 .name = "i"
Lev Walkin35631482004-07-01 00:52:50 +0000129 },
130};
131static ber_tlv_tag_t asn1_DEF_T2_tags[] = {
132 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
133};
134static asn1_TYPE_tag2member_t asn1_DEF_T2_tag2el[] = {
135 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 15 */
136};
137static uint8_t asn1_DEF_T2_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
138 (1 << 7)
139};
140static asn1_SET_specifics_t asn1_DEF_T2_specs = {
141 sizeof(struct T2),
142 offsetof(struct T2, _ber_dec_ctx),
143 offsetof(struct T2, _presence_map),
Lev Walkin35631482004-07-01 00:52:50 +0000144 asn1_DEF_T2_tag2el,
145 1, /* Count of tags in the map */
146 1, /* Whether extensible */
147 (unsigned int *)asn1_DEF_T2_mmap /* Mandatory elements map */
148};
149asn1_TYPE_descriptor_t asn1_DEF_T2 = {
150 "T2",
151 SET_constraint,
152 SET_decode_ber,
153 SET_encode_der,
154 SET_print,
155 SET_free,
156 0, /* Use generic outmost tag fetcher */
157 asn1_DEF_T2_tags,
158 sizeof(asn1_DEF_T2_tags)
Lev Walkin64399722004-08-11 07:17:22 +0000159 /sizeof(asn1_DEF_T2_tags[0]), /* 1 */
Lev Walkin188ed2c2004-09-13 08:31:01 +0000160 asn1_DEF_T2_tags, /* Same as above */
161 sizeof(asn1_DEF_T2_tags)
162 /sizeof(asn1_DEF_T2_tags[0]), /* 1 */
Lev Walkin35631482004-07-01 00:52:50 +0000163 1, /* Whether CONSTRUCTED */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000164 asn1_MBR_T2,
165 1, /* Elements count */
Lev Walkin35631482004-07-01 00:52:50 +0000166 &asn1_DEF_T2_specs /* Additional specs */
167};
168
169
Lev Walkinb47ddce2004-08-11 05:25:47 +0000170/*** <<< INCLUDES [T3] >>> ***/
171
172#include <INTEGER.h>
173#include <constr_CHOICE.h>
174
Lev Walkin35631482004-07-01 00:52:50 +0000175/*** <<< DEPS [T3] >>> ***/
176
Lev Walkinb47ddce2004-08-11 05:25:47 +0000177typedef enum T3_PR {
178 T3_PR_NOTHING, /* No components present */
179 T3_PR_i,
180 /* Extensions may appear below */
Lev Walkin64399722004-08-11 07:17:22 +0000181} T3_PR;
Lev Walkin35631482004-07-01 00:52:50 +0000182extern asn1_TYPE_descriptor_t asn1_DEF_T3;
183
184/*** <<< TYPE-DECLS [T3] >>> ***/
185
186
187typedef struct T3 {
Lev Walkin64399722004-08-11 07:17:22 +0000188 T3_PR present;
Lev Walkin35631482004-07-01 00:52:50 +0000189 union {
190 INTEGER_t i;
191 /*
192 * This type is extensible,
193 * possible extensions are below.
194 */
195 } choice;
196
197 /* Context for parsing across buffer boundaries */
198 ber_dec_ctx_t _ber_dec_ctx;
199} T3_t;
200
201/*** <<< STAT-DEFS [T3] >>> ***/
202
Lev Walkin2e3055d2004-08-20 13:36:32 +0000203static asn1_TYPE_member_t asn1_MBR_T3[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000204 { ATF_NOFLAGS, 0, offsetof(struct T3, choice.i),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000205 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
206 .tag_mode = 0,
207 .type = (void *)&asn1_DEF_INTEGER,
208 .memb_constraints = 0, /* Defer to actual type */
209 .name = "i"
Lev Walkin35631482004-07-01 00:52:50 +0000210 },
211};
Lev Walkin35631482004-07-01 00:52:50 +0000212static asn1_TYPE_tag2member_t asn1_DEF_T3_tag2el[] = {
213 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 16 */
214};
215static asn1_CHOICE_specifics_t asn1_DEF_T3_specs = {
216 sizeof(struct T3),
217 offsetof(struct T3, _ber_dec_ctx),
218 offsetof(struct T3, present),
219 sizeof(((struct T3 *)0)->present),
Lev Walkin35631482004-07-01 00:52:50 +0000220 asn1_DEF_T3_tag2el,
221 1, /* Count of tags in the map */
222 1 /* Whether extensible */
223};
224asn1_TYPE_descriptor_t asn1_DEF_T3 = {
225 "T3",
226 CHOICE_constraint,
227 CHOICE_decode_ber,
228 CHOICE_encode_der,
229 CHOICE_print,
230 CHOICE_free,
231 CHOICE_outmost_tag,
Lev Walkin188ed2c2004-09-13 08:31:01 +0000232 0, /* No effective tags (pointer) */
233 0, /* No effective tags (count) */
234 0, /* No tags (pointer) */
235 0, /* No tags (count) */
Lev Walkin35631482004-07-01 00:52:50 +0000236 1, /* Whether CONSTRUCTED */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000237 asn1_MBR_T3,
238 1, /* Elements count */
Lev Walkin35631482004-07-01 00:52:50 +0000239 &asn1_DEF_T3_specs /* Additional specs */
240};
241
242
Lev Walkinb47ddce2004-08-11 05:25:47 +0000243/*** <<< INCLUDES [T4] >>> ***/
244
245#include <INTEGER.h>
246#include <constr_CHOICE.h>
247
Lev Walkin35631482004-07-01 00:52:50 +0000248/*** <<< DEPS [T4] >>> ***/
249
Lev Walkinb47ddce2004-08-11 05:25:47 +0000250typedef enum T4_PR {
251 T4_PR_NOTHING, /* No components present */
252 T4_PR_i,
253 /* Extensions may appear below */
Lev Walkin64399722004-08-11 07:17:22 +0000254} T4_PR;
Lev Walkin35631482004-07-01 00:52:50 +0000255extern asn1_TYPE_descriptor_t asn1_DEF_T4;
256
257/*** <<< TYPE-DECLS [T4] >>> ***/
258
259
260typedef struct T4 {
Lev Walkin64399722004-08-11 07:17:22 +0000261 T4_PR present;
Lev Walkin35631482004-07-01 00:52:50 +0000262 union {
263 INTEGER_t i;
264 /*
265 * This type is extensible,
266 * possible extensions are below.
267 */
268 } choice;
269
270 /* Context for parsing across buffer boundaries */
271 ber_dec_ctx_t _ber_dec_ctx;
272} T4_t;
273
274/*** <<< STAT-DEFS [T4] >>> ***/
275
Lev Walkin2e3055d2004-08-20 13:36:32 +0000276static asn1_TYPE_member_t asn1_MBR_T4[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000277 { ATF_NOFLAGS, 0, offsetof(struct T4, choice.i),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000278 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
279 .tag_mode = 0,
280 .type = (void *)&asn1_DEF_INTEGER,
281 .memb_constraints = 0, /* Defer to actual type */
282 .name = "i"
Lev Walkin35631482004-07-01 00:52:50 +0000283 },
284};
Lev Walkin35631482004-07-01 00:52:50 +0000285static asn1_TYPE_tag2member_t asn1_DEF_T4_tag2el[] = {
286 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 17 */
287};
288static asn1_CHOICE_specifics_t asn1_DEF_T4_specs = {
289 sizeof(struct T4),
290 offsetof(struct T4, _ber_dec_ctx),
291 offsetof(struct T4, present),
292 sizeof(((struct T4 *)0)->present),
Lev Walkin35631482004-07-01 00:52:50 +0000293 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,
Lev Walkin188ed2c2004-09-13 08:31:01 +0000305 0, /* No effective tags (pointer) */
306 0, /* No effective tags (count) */
307 0, /* No tags (pointer) */
308 0, /* No tags (count) */
Lev Walkin35631482004-07-01 00:52:50 +0000309 1, /* Whether CONSTRUCTED */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000310 asn1_MBR_T4,
311 1, /* Elements count */
Lev Walkin35631482004-07-01 00:52:50 +0000312 &asn1_DEF_T4_specs /* Additional specs */
313};
314