blob: 9991cf5701ed21d01fd971e209ac1a684a13fed7 [file] [log] [blame]
vlm79b08d52004-07-01 00:52:50 +00001
vlm6e1b13e2004-08-11 05:25:47 +00002/*** <<< INCLUDES [T1] >>> ***/
vlm79b08d52004-07-01 00:52:50 +00003
vlm79b08d52004-07-01 00:52:50 +00004#include <INTEGER.h>
vlm6e1b13e2004-08-11 05:25:47 +00005#include <constr_SET.h>
6
7/*** <<< DEPS [T1] >>> ***/
vlm79b08d52004-07-01 00:52:50 +00008
9
10/*
11 * Method of determining the components presence
12 */
vlm6e73a042004-08-11 07:17:22 +000013typedef enum T1_PR {
vlm79b08d52004-07-01 00:52:50 +000014 T1_PR_i, /* Member i is present */
vlm6e73a042004-08-11 07:17:22 +000015} T1_PR;
vlm79b08d52004-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
vlm21e46002004-08-20 13:36:32 +000038static asn1_TYPE_member_t asn1_MBR_T1[] = {
39 { 0, offsetof(struct T1, i),
40 .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"
vlm79b08d52004-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),
vlm79b08d52004-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)
vlm6e73a042004-08-11 07:17:22 +000075 /sizeof(asn1_DEF_T1_tags[0]), /* 1 */
vlm79b08d52004-07-01 00:52:50 +000076 1, /* Tags to skip */
77 1, /* Whether CONSTRUCTED */
vlm21e46002004-08-20 13:36:32 +000078 asn1_MBR_T1,
79 1, /* Elements count */
vlm79b08d52004-07-01 00:52:50 +000080 &asn1_DEF_T1_specs /* Additional specs */
81};
82
83
vlm6e1b13e2004-08-11 05:25:47 +000084/*** <<< INCLUDES [T2] >>> ***/
vlm79b08d52004-07-01 00:52:50 +000085
vlm79b08d52004-07-01 00:52:50 +000086#include <INTEGER.h>
vlm6e1b13e2004-08-11 05:25:47 +000087#include <constr_SET.h>
88
89/*** <<< DEPS [T2] >>> ***/
vlm79b08d52004-07-01 00:52:50 +000090
91
92/*
93 * Method of determining the components presence
94 */
vlm6e73a042004-08-11 07:17:22 +000095typedef enum T2_PR {
vlm79b08d52004-07-01 00:52:50 +000096 T2_PR_i, /* Member i is present */
vlm6e73a042004-08-11 07:17:22 +000097} T2_PR;
vlm79b08d52004-07-01 00:52:50 +000098extern asn1_TYPE_descriptor_t asn1_DEF_T2;
99
100/*** <<< TYPE-DECLS [T2] >>> ***/
101
102
103typedef struct T2 {
104 INTEGER_t i;
105 /*
106 * This type is extensible,
107 * possible extensions are below.
108 */
109
110 /* Presence bitmask: ASN_SET_ISPRESENT(pT2, T2_PR_x) */
111 unsigned int _presence_map
112 [((1+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
113
114 /* Context for parsing across buffer boundaries */
115 ber_dec_ctx_t _ber_dec_ctx;
116} T2_t;
117
118/*** <<< STAT-DEFS [T2] >>> ***/
119
vlm21e46002004-08-20 13:36:32 +0000120static asn1_TYPE_member_t asn1_MBR_T2[] = {
121 { 0, offsetof(struct T2, i),
122 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
123 .tag_mode = 0,
124 .type = (void *)&asn1_DEF_INTEGER,
125 .memb_constraints = 0, /* Defer to actual type */
126 .name = "i"
vlm79b08d52004-07-01 00:52:50 +0000127 },
128};
129static ber_tlv_tag_t asn1_DEF_T2_tags[] = {
130 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
131};
132static asn1_TYPE_tag2member_t asn1_DEF_T2_tag2el[] = {
133 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 15 */
134};
135static uint8_t asn1_DEF_T2_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
136 (1 << 7)
137};
138static asn1_SET_specifics_t asn1_DEF_T2_specs = {
139 sizeof(struct T2),
140 offsetof(struct T2, _ber_dec_ctx),
141 offsetof(struct T2, _presence_map),
vlm79b08d52004-07-01 00:52:50 +0000142 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)
vlm6e73a042004-08-11 07:17:22 +0000157 /sizeof(asn1_DEF_T2_tags[0]), /* 1 */
vlm79b08d52004-07-01 00:52:50 +0000158 1, /* Tags to skip */
159 1, /* Whether CONSTRUCTED */
vlm21e46002004-08-20 13:36:32 +0000160 asn1_MBR_T2,
161 1, /* Elements count */
vlm79b08d52004-07-01 00:52:50 +0000162 &asn1_DEF_T2_specs /* Additional specs */
163};
164
165
vlm6e1b13e2004-08-11 05:25:47 +0000166/*** <<< INCLUDES [T3] >>> ***/
167
168#include <INTEGER.h>
169#include <constr_CHOICE.h>
170
vlm79b08d52004-07-01 00:52:50 +0000171/*** <<< DEPS [T3] >>> ***/
172
vlm6e1b13e2004-08-11 05:25:47 +0000173typedef enum T3_PR {
174 T3_PR_NOTHING, /* No components present */
175 T3_PR_i,
176 /* Extensions may appear below */
vlm6e73a042004-08-11 07:17:22 +0000177} T3_PR;
vlm79b08d52004-07-01 00:52:50 +0000178extern asn1_TYPE_descriptor_t asn1_DEF_T3;
179
180/*** <<< TYPE-DECLS [T3] >>> ***/
181
182
183typedef struct T3 {
vlm6e73a042004-08-11 07:17:22 +0000184 T3_PR present;
vlm79b08d52004-07-01 00:52:50 +0000185 union {
186 INTEGER_t i;
187 /*
188 * This type is extensible,
189 * possible extensions are below.
190 */
191 } choice;
192
193 /* Context for parsing across buffer boundaries */
194 ber_dec_ctx_t _ber_dec_ctx;
195} T3_t;
196
197/*** <<< STAT-DEFS [T3] >>> ***/
198
vlm21e46002004-08-20 13:36:32 +0000199static asn1_TYPE_member_t asn1_MBR_T3[] = {
200 { 0, offsetof(struct T3, choice.i),
201 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
202 .tag_mode = 0,
203 .type = (void *)&asn1_DEF_INTEGER,
204 .memb_constraints = 0, /* Defer to actual type */
205 .name = "i"
vlm79b08d52004-07-01 00:52:50 +0000206 },
207};
vlm79b08d52004-07-01 00:52:50 +0000208static 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),
vlm79b08d52004-07-01 00:52:50 +0000216 asn1_DEF_T3_tag2el,
217 1, /* Count of tags in the map */
218 1 /* Whether extensible */
219};
220asn1_TYPE_descriptor_t asn1_DEF_T3 = {
221 "T3",
222 CHOICE_constraint,
223 CHOICE_decode_ber,
224 CHOICE_encode_der,
225 CHOICE_print,
226 CHOICE_free,
227 CHOICE_outmost_tag,
vlm6e73a042004-08-11 07:17:22 +0000228 0, /* No explicit tags (pointer) */
229 0, /* No explicit tags (count) */
vlm79b08d52004-07-01 00:52:50 +0000230 0, /* Tags to skip */
231 1, /* Whether CONSTRUCTED */
vlm21e46002004-08-20 13:36:32 +0000232 asn1_MBR_T3,
233 1, /* Elements count */
vlm79b08d52004-07-01 00:52:50 +0000234 &asn1_DEF_T3_specs /* Additional specs */
235};
236
237
vlm6e1b13e2004-08-11 05:25:47 +0000238/*** <<< INCLUDES [T4] >>> ***/
239
240#include <INTEGER.h>
241#include <constr_CHOICE.h>
242
vlm79b08d52004-07-01 00:52:50 +0000243/*** <<< DEPS [T4] >>> ***/
244
vlm6e1b13e2004-08-11 05:25:47 +0000245typedef enum T4_PR {
246 T4_PR_NOTHING, /* No components present */
247 T4_PR_i,
248 /* Extensions may appear below */
vlm6e73a042004-08-11 07:17:22 +0000249} T4_PR;
vlm79b08d52004-07-01 00:52:50 +0000250extern asn1_TYPE_descriptor_t asn1_DEF_T4;
251
252/*** <<< TYPE-DECLS [T4] >>> ***/
253
254
255typedef struct T4 {
vlm6e73a042004-08-11 07:17:22 +0000256 T4_PR present;
vlm79b08d52004-07-01 00:52:50 +0000257 union {
258 INTEGER_t i;
259 /*
260 * This type is extensible,
261 * possible extensions are below.
262 */
263 } choice;
264
265 /* Context for parsing across buffer boundaries */
266 ber_dec_ctx_t _ber_dec_ctx;
267} T4_t;
268
269/*** <<< STAT-DEFS [T4] >>> ***/
270
vlm21e46002004-08-20 13:36:32 +0000271static asn1_TYPE_member_t asn1_MBR_T4[] = {
272 { 0, offsetof(struct T4, choice.i),
273 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
274 .tag_mode = 0,
275 .type = (void *)&asn1_DEF_INTEGER,
276 .memb_constraints = 0, /* Defer to actual type */
277 .name = "i"
vlm79b08d52004-07-01 00:52:50 +0000278 },
279};
vlm79b08d52004-07-01 00:52:50 +0000280static asn1_TYPE_tag2member_t asn1_DEF_T4_tag2el[] = {
281 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 17 */
282};
283static asn1_CHOICE_specifics_t asn1_DEF_T4_specs = {
284 sizeof(struct T4),
285 offsetof(struct T4, _ber_dec_ctx),
286 offsetof(struct T4, present),
287 sizeof(((struct T4 *)0)->present),
vlm79b08d52004-07-01 00:52:50 +0000288 asn1_DEF_T4_tag2el,
289 1, /* Count of tags in the map */
290 1 /* Whether extensible */
291};
292asn1_TYPE_descriptor_t asn1_DEF_T4 = {
293 "T4",
294 CHOICE_constraint,
295 CHOICE_decode_ber,
296 CHOICE_encode_der,
297 CHOICE_print,
298 CHOICE_free,
299 CHOICE_outmost_tag,
vlm6e73a042004-08-11 07:17:22 +0000300 0, /* No explicit tags (pointer) */
301 0, /* No explicit tags (count) */
vlm79b08d52004-07-01 00:52:50 +0000302 0, /* Tags to skip */
303 1, /* Whether CONSTRUCTED */
vlm21e46002004-08-20 13:36:32 +0000304 asn1_MBR_T4,
305 1, /* Elements count */
vlm79b08d52004-07-01 00:52:50 +0000306 &asn1_DEF_T4_specs /* Additional specs */
307};
308