blob: 0e207d52e2e5b7ac13b035d16e2d0cb7afa0a855 [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 Walkin2e3055d2004-08-20 13:36:32 +000081 asn1_MBR_T1,
82 1, /* Elements count */
Lev Walkin35631482004-07-01 00:52:50 +000083 &asn1_DEF_T1_specs /* Additional specs */
84};
85
86
Lev Walkinb47ddce2004-08-11 05:25:47 +000087/*** <<< INCLUDES [T2] >>> ***/
Lev Walkin35631482004-07-01 00:52:50 +000088
Lev Walkin35631482004-07-01 00:52:50 +000089#include <INTEGER.h>
Lev Walkinb47ddce2004-08-11 05:25:47 +000090#include <constr_SET.h>
91
92/*** <<< DEPS [T2] >>> ***/
Lev Walkin35631482004-07-01 00:52:50 +000093
94
95/*
96 * Method of determining the components presence
97 */
Lev Walkin64399722004-08-11 07:17:22 +000098typedef enum T2_PR {
Lev Walkin35631482004-07-01 00:52:50 +000099 T2_PR_i, /* Member i is present */
Lev Walkin64399722004-08-11 07:17:22 +0000100} T2_PR;
Lev Walkin35631482004-07-01 00:52:50 +0000101extern asn1_TYPE_descriptor_t asn1_DEF_T2;
102
103/*** <<< TYPE-DECLS [T2] >>> ***/
104
105
106typedef struct T2 {
107 INTEGER_t i;
108 /*
109 * This type is extensible,
110 * possible extensions are below.
111 */
112
113 /* Presence bitmask: ASN_SET_ISPRESENT(pT2, T2_PR_x) */
114 unsigned int _presence_map
115 [((1+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
116
117 /* Context for parsing across buffer boundaries */
118 ber_dec_ctx_t _ber_dec_ctx;
119} T2_t;
120
121/*** <<< STAT-DEFS [T2] >>> ***/
122
Lev Walkin2e3055d2004-08-20 13:36:32 +0000123static asn1_TYPE_member_t asn1_MBR_T2[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000124 { ATF_NOFLAGS, 0, offsetof(struct T2, i),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000125 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
126 .tag_mode = 0,
127 .type = (void *)&asn1_DEF_INTEGER,
128 .memb_constraints = 0, /* Defer to actual type */
129 .name = "i"
Lev Walkin35631482004-07-01 00:52:50 +0000130 },
131};
132static ber_tlv_tag_t asn1_DEF_T2_tags[] = {
133 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
134};
135static asn1_TYPE_tag2member_t asn1_DEF_T2_tag2el[] = {
136 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 15 */
137};
138static uint8_t asn1_DEF_T2_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
139 (1 << 7)
140};
141static asn1_SET_specifics_t asn1_DEF_T2_specs = {
142 sizeof(struct T2),
143 offsetof(struct T2, _ber_dec_ctx),
144 offsetof(struct T2, _presence_map),
Lev Walkin35631482004-07-01 00:52:50 +0000145 asn1_DEF_T2_tag2el,
146 1, /* Count of tags in the map */
147 1, /* Whether extensible */
148 (unsigned int *)asn1_DEF_T2_mmap /* Mandatory elements map */
149};
150asn1_TYPE_descriptor_t asn1_DEF_T2 = {
151 "T2",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000152 SET_free,
153 SET_print,
Lev Walkin35631482004-07-01 00:52:50 +0000154 SET_constraint,
155 SET_decode_ber,
156 SET_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000157 0, /* Not implemented yet */
158 SET_encode_xer,
Lev Walkin35631482004-07-01 00:52:50 +0000159 0, /* Use generic outmost tag fetcher */
160 asn1_DEF_T2_tags,
161 sizeof(asn1_DEF_T2_tags)
Lev Walkin64399722004-08-11 07:17:22 +0000162 /sizeof(asn1_DEF_T2_tags[0]), /* 1 */
Lev Walkin188ed2c2004-09-13 08:31:01 +0000163 asn1_DEF_T2_tags, /* Same as above */
164 sizeof(asn1_DEF_T2_tags)
165 /sizeof(asn1_DEF_T2_tags[0]), /* 1 */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000166 asn1_MBR_T2,
167 1, /* Elements count */
Lev Walkin35631482004-07-01 00:52:50 +0000168 &asn1_DEF_T2_specs /* Additional specs */
169};
170
171
Lev Walkinb47ddce2004-08-11 05:25:47 +0000172/*** <<< INCLUDES [T3] >>> ***/
173
174#include <INTEGER.h>
175#include <constr_CHOICE.h>
176
Lev Walkin35631482004-07-01 00:52:50 +0000177/*** <<< DEPS [T3] >>> ***/
178
Lev Walkinb47ddce2004-08-11 05:25:47 +0000179typedef enum T3_PR {
180 T3_PR_NOTHING, /* No components present */
181 T3_PR_i,
182 /* Extensions may appear below */
Lev Walkin64399722004-08-11 07:17:22 +0000183} T3_PR;
Lev Walkin35631482004-07-01 00:52:50 +0000184extern asn1_TYPE_descriptor_t asn1_DEF_T3;
185
186/*** <<< TYPE-DECLS [T3] >>> ***/
187
188
189typedef struct T3 {
Lev Walkin64399722004-08-11 07:17:22 +0000190 T3_PR present;
Lev Walkin35631482004-07-01 00:52:50 +0000191 union {
192 INTEGER_t i;
193 /*
194 * This type is extensible,
195 * possible extensions are below.
196 */
197 } choice;
198
199 /* Context for parsing across buffer boundaries */
200 ber_dec_ctx_t _ber_dec_ctx;
201} T3_t;
202
203/*** <<< STAT-DEFS [T3] >>> ***/
204
Lev Walkin2e3055d2004-08-20 13:36:32 +0000205static asn1_TYPE_member_t asn1_MBR_T3[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000206 { ATF_NOFLAGS, 0, offsetof(struct T3, choice.i),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000207 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
208 .tag_mode = 0,
209 .type = (void *)&asn1_DEF_INTEGER,
210 .memb_constraints = 0, /* Defer to actual type */
211 .name = "i"
Lev Walkin35631482004-07-01 00:52:50 +0000212 },
213};
Lev Walkin35631482004-07-01 00:52:50 +0000214static asn1_TYPE_tag2member_t asn1_DEF_T3_tag2el[] = {
215 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 16 */
216};
217static asn1_CHOICE_specifics_t asn1_DEF_T3_specs = {
218 sizeof(struct T3),
219 offsetof(struct T3, _ber_dec_ctx),
220 offsetof(struct T3, present),
221 sizeof(((struct T3 *)0)->present),
Lev Walkin35631482004-07-01 00:52:50 +0000222 asn1_DEF_T3_tag2el,
223 1, /* Count of tags in the map */
224 1 /* Whether extensible */
225};
226asn1_TYPE_descriptor_t asn1_DEF_T3 = {
227 "T3",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000228 CHOICE_free,
229 CHOICE_print,
Lev Walkin35631482004-07-01 00:52:50 +0000230 CHOICE_constraint,
231 CHOICE_decode_ber,
232 CHOICE_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000233 0, /* Not implemented yet */
234 CHOICE_encode_xer,
Lev Walkin35631482004-07-01 00:52:50 +0000235 CHOICE_outmost_tag,
Lev Walkin188ed2c2004-09-13 08:31:01 +0000236 0, /* No effective tags (pointer) */
237 0, /* No effective tags (count) */
238 0, /* No tags (pointer) */
239 0, /* No tags (count) */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000240 asn1_MBR_T3,
241 1, /* Elements count */
Lev Walkin35631482004-07-01 00:52:50 +0000242 &asn1_DEF_T3_specs /* Additional specs */
243};
244
245
Lev Walkinb47ddce2004-08-11 05:25:47 +0000246/*** <<< INCLUDES [T4] >>> ***/
247
248#include <INTEGER.h>
249#include <constr_CHOICE.h>
250
Lev Walkin35631482004-07-01 00:52:50 +0000251/*** <<< DEPS [T4] >>> ***/
252
Lev Walkinb47ddce2004-08-11 05:25:47 +0000253typedef enum T4_PR {
254 T4_PR_NOTHING, /* No components present */
255 T4_PR_i,
256 /* Extensions may appear below */
Lev Walkin64399722004-08-11 07:17:22 +0000257} T4_PR;
Lev Walkin35631482004-07-01 00:52:50 +0000258extern asn1_TYPE_descriptor_t asn1_DEF_T4;
259
260/*** <<< TYPE-DECLS [T4] >>> ***/
261
262
263typedef struct T4 {
Lev Walkin64399722004-08-11 07:17:22 +0000264 T4_PR present;
Lev Walkin35631482004-07-01 00:52:50 +0000265 union {
266 INTEGER_t i;
267 /*
268 * This type is extensible,
269 * possible extensions are below.
270 */
271 } choice;
272
273 /* Context for parsing across buffer boundaries */
274 ber_dec_ctx_t _ber_dec_ctx;
275} T4_t;
276
277/*** <<< STAT-DEFS [T4] >>> ***/
278
Lev Walkin2e3055d2004-08-20 13:36:32 +0000279static asn1_TYPE_member_t asn1_MBR_T4[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000280 { ATF_NOFLAGS, 0, offsetof(struct T4, choice.i),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000281 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
282 .tag_mode = 0,
283 .type = (void *)&asn1_DEF_INTEGER,
284 .memb_constraints = 0, /* Defer to actual type */
285 .name = "i"
Lev Walkin35631482004-07-01 00:52:50 +0000286 },
287};
Lev Walkin35631482004-07-01 00:52:50 +0000288static asn1_TYPE_tag2member_t asn1_DEF_T4_tag2el[] = {
289 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 17 */
290};
291static asn1_CHOICE_specifics_t asn1_DEF_T4_specs = {
292 sizeof(struct T4),
293 offsetof(struct T4, _ber_dec_ctx),
294 offsetof(struct T4, present),
295 sizeof(((struct T4 *)0)->present),
Lev Walkin35631482004-07-01 00:52:50 +0000296 asn1_DEF_T4_tag2el,
297 1, /* Count of tags in the map */
298 1 /* Whether extensible */
299};
300asn1_TYPE_descriptor_t asn1_DEF_T4 = {
301 "T4",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000302 CHOICE_free,
303 CHOICE_print,
Lev Walkin35631482004-07-01 00:52:50 +0000304 CHOICE_constraint,
305 CHOICE_decode_ber,
306 CHOICE_encode_der,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000307 0, /* Not implemented yet */
308 CHOICE_encode_xer,
Lev Walkin35631482004-07-01 00:52:50 +0000309 CHOICE_outmost_tag,
Lev Walkin188ed2c2004-09-13 08:31:01 +0000310 0, /* No effective tags (pointer) */
311 0, /* No effective tags (count) */
312 0, /* No tags (pointer) */
313 0, /* No tags (count) */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000314 asn1_MBR_T4,
315 1, /* Elements count */
Lev Walkin35631482004-07-01 00:52:50 +0000316 &asn1_DEF_T4_specs /* Additional specs */
317};
318