blob: 660048b35ae146a148fd6bab63bc3abd890e4924 [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 +000016
17/*** <<< TYPE-DECLS [T1] >>> ***/
18
Lev Walkin35631482004-07-01 00:52:50 +000019typedef struct T1 {
20 INTEGER_t i;
21 /*
22 * This type is extensible,
23 * possible extensions are below.
24 */
25
26 /* Presence bitmask: ASN_SET_ISPRESENT(pT1, T1_PR_x) */
27 unsigned int _presence_map
28 [((1+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
29
30 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +000031 asn_struct_ctx_t _asn_ctx;
Lev Walkin35631482004-07-01 00:52:50 +000032} T1_t;
33
Lev Walkinc8285712005-03-04 22:18:20 +000034/*** <<< FUNC-DECLS [T1] >>> ***/
35
36extern asn_TYPE_descriptor_t asn_DEF_T1;
37
Lev Walkin35631482004-07-01 00:52:50 +000038/*** <<< STAT-DEFS [T1] >>> ***/
39
Lev Walkine0272aa2005-03-04 11:26:08 +000040static asn_TYPE_member_t asn_MBR_T1_1[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +000041 { ATF_NOFLAGS, 0, offsetof(struct T1, i),
Lev Walkin2e3055d2004-08-20 13:36:32 +000042 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
43 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +000044 .type = (void *)&asn_DEF_INTEGER,
Lev Walkinba58e1b2005-01-17 12:20:19 +000045 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +000046 .name = "i"
Lev Walkin35631482004-07-01 00:52:50 +000047 },
48};
Lev Walkine0272aa2005-03-04 11:26:08 +000049static ber_tlv_tag_t asn_DEF_T1_1_tags[] = {
Lev Walkin35631482004-07-01 00:52:50 +000050 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
51};
Lev Walkine0272aa2005-03-04 11:26:08 +000052static asn_TYPE_tag2member_t asn_MAP_T1_1_tag2el[] = {
Lev Walkinf82138b2005-02-25 08:20:32 +000053 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* i at 14 */
Lev Walkin35631482004-07-01 00:52:50 +000054};
Lev Walkine0272aa2005-03-04 11:26:08 +000055static uint8_t asn_MAP_T1_1_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
Lev Walkin35631482004-07-01 00:52:50 +000056 (1 << 7)
57};
Lev Walkine0272aa2005-03-04 11:26:08 +000058static asn_SET_specifics_t asn_SPC_T1_1_specs = {
Lev Walkin35631482004-07-01 00:52:50 +000059 sizeof(struct T1),
Lev Walkindfae9752004-09-29 13:19:37 +000060 offsetof(struct T1, _asn_ctx),
Lev Walkin35631482004-07-01 00:52:50 +000061 offsetof(struct T1, _presence_map),
Lev Walkine0272aa2005-03-04 11:26:08 +000062 asn_MAP_T1_1_tag2el,
Lev Walkin35631482004-07-01 00:52:50 +000063 1, /* Count of tags in the map */
Lev Walkine0272aa2005-03-04 11:26:08 +000064 asn_MAP_T1_1_tag2el, /* Same as above */
Lev Walkinf82138b2005-02-25 08:20:32 +000065 1, /* Count of tags in the CXER map */
Lev Walkin35631482004-07-01 00:52:50 +000066 1, /* Whether extensible */
Lev Walkine0272aa2005-03-04 11:26:08 +000067 (unsigned int *)asn_MAP_T1_1_mmap /* Mandatory elements map */
Lev Walkin35631482004-07-01 00:52:50 +000068};
Lev Walkindfae9752004-09-29 13:19:37 +000069asn_TYPE_descriptor_t asn_DEF_T1 = {
Lev Walkin35631482004-07-01 00:52:50 +000070 "T1",
Lev Walkindc06f6b2004-10-20 15:50:55 +000071 "T1",
Lev Walkina9cc46e2004-09-22 16:06:28 +000072 SET_free,
73 SET_print,
Lev Walkin35631482004-07-01 00:52:50 +000074 SET_constraint,
75 SET_decode_ber,
76 SET_encode_der,
Lev Walkinb2230802005-02-14 20:31:31 +000077 SET_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +000078 SET_encode_xer,
Lev Walkin35631482004-07-01 00:52:50 +000079 0, /* Use generic outmost tag fetcher */
Lev Walkine0272aa2005-03-04 11:26:08 +000080 asn_DEF_T1_1_tags,
81 sizeof(asn_DEF_T1_1_tags)
82 /sizeof(asn_DEF_T1_1_tags[0]), /* 1 */
83 asn_DEF_T1_1_tags, /* Same as above */
84 sizeof(asn_DEF_T1_1_tags)
85 /sizeof(asn_DEF_T1_1_tags[0]), /* 1 */
86 asn_MBR_T1_1,
Lev Walkin2e3055d2004-08-20 13:36:32 +000087 1, /* Elements count */
Lev Walkine0272aa2005-03-04 11:26:08 +000088 &asn_SPC_T1_1_specs /* Additional specs */
Lev Walkin35631482004-07-01 00:52:50 +000089};
90
91
Lev Walkinb47ddce2004-08-11 05:25:47 +000092/*** <<< INCLUDES [T2] >>> ***/
Lev Walkin35631482004-07-01 00:52:50 +000093
Lev Walkin35631482004-07-01 00:52:50 +000094#include <INTEGER.h>
Lev Walkinb47ddce2004-08-11 05:25:47 +000095#include <constr_SET.h>
96
97/*** <<< DEPS [T2] >>> ***/
Lev Walkin35631482004-07-01 00:52:50 +000098
99
100/*
101 * Method of determining the components presence
102 */
Lev Walkin64399722004-08-11 07:17:22 +0000103typedef enum T2_PR {
Lev Walkin35631482004-07-01 00:52:50 +0000104 T2_PR_i, /* Member i is present */
Lev Walkin64399722004-08-11 07:17:22 +0000105} T2_PR;
Lev Walkin35631482004-07-01 00:52:50 +0000106
107/*** <<< TYPE-DECLS [T2] >>> ***/
108
Lev Walkin35631482004-07-01 00:52:50 +0000109typedef struct T2 {
110 INTEGER_t i;
111 /*
112 * This type is extensible,
113 * possible extensions are below.
114 */
115
116 /* Presence bitmask: ASN_SET_ISPRESENT(pT2, T2_PR_x) */
117 unsigned int _presence_map
118 [((1+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
119
120 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +0000121 asn_struct_ctx_t _asn_ctx;
Lev Walkin35631482004-07-01 00:52:50 +0000122} T2_t;
123
Lev Walkinc8285712005-03-04 22:18:20 +0000124/*** <<< FUNC-DECLS [T2] >>> ***/
125
126extern asn_TYPE_descriptor_t asn_DEF_T2;
127
Lev Walkin35631482004-07-01 00:52:50 +0000128/*** <<< STAT-DEFS [T2] >>> ***/
129
Lev Walkine0272aa2005-03-04 11:26:08 +0000130static asn_TYPE_member_t asn_MBR_T2_1[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000131 { ATF_NOFLAGS, 0, offsetof(struct T2, i),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000132 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
133 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +0000134 .type = (void *)&asn_DEF_INTEGER,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000135 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000136 .name = "i"
Lev Walkin35631482004-07-01 00:52:50 +0000137 },
138};
Lev Walkine0272aa2005-03-04 11:26:08 +0000139static ber_tlv_tag_t asn_DEF_T2_1_tags[] = {
Lev Walkin35631482004-07-01 00:52:50 +0000140 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
141};
Lev Walkine0272aa2005-03-04 11:26:08 +0000142static asn_TYPE_tag2member_t asn_MAP_T2_1_tag2el[] = {
Lev Walkinf82138b2005-02-25 08:20:32 +0000143 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* i at 15 */
Lev Walkin35631482004-07-01 00:52:50 +0000144};
Lev Walkine0272aa2005-03-04 11:26:08 +0000145static uint8_t asn_MAP_T2_1_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
Lev Walkin35631482004-07-01 00:52:50 +0000146 (1 << 7)
147};
Lev Walkine0272aa2005-03-04 11:26:08 +0000148static asn_SET_specifics_t asn_SPC_T2_1_specs = {
Lev Walkin35631482004-07-01 00:52:50 +0000149 sizeof(struct T2),
Lev Walkindfae9752004-09-29 13:19:37 +0000150 offsetof(struct T2, _asn_ctx),
Lev Walkin35631482004-07-01 00:52:50 +0000151 offsetof(struct T2, _presence_map),
Lev Walkine0272aa2005-03-04 11:26:08 +0000152 asn_MAP_T2_1_tag2el,
Lev Walkin35631482004-07-01 00:52:50 +0000153 1, /* Count of tags in the map */
Lev Walkine0272aa2005-03-04 11:26:08 +0000154 asn_MAP_T2_1_tag2el, /* Same as above */
Lev Walkinf82138b2005-02-25 08:20:32 +0000155 1, /* Count of tags in the CXER map */
Lev Walkin35631482004-07-01 00:52:50 +0000156 1, /* Whether extensible */
Lev Walkine0272aa2005-03-04 11:26:08 +0000157 (unsigned int *)asn_MAP_T2_1_mmap /* Mandatory elements map */
Lev Walkin35631482004-07-01 00:52:50 +0000158};
Lev Walkindfae9752004-09-29 13:19:37 +0000159asn_TYPE_descriptor_t asn_DEF_T2 = {
Lev Walkin35631482004-07-01 00:52:50 +0000160 "T2",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000161 "T2",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000162 SET_free,
163 SET_print,
Lev Walkin35631482004-07-01 00:52:50 +0000164 SET_constraint,
165 SET_decode_ber,
166 SET_encode_der,
Lev Walkinb2230802005-02-14 20:31:31 +0000167 SET_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000168 SET_encode_xer,
Lev Walkin35631482004-07-01 00:52:50 +0000169 0, /* Use generic outmost tag fetcher */
Lev Walkine0272aa2005-03-04 11:26:08 +0000170 asn_DEF_T2_1_tags,
171 sizeof(asn_DEF_T2_1_tags)
172 /sizeof(asn_DEF_T2_1_tags[0]), /* 1 */
173 asn_DEF_T2_1_tags, /* Same as above */
174 sizeof(asn_DEF_T2_1_tags)
175 /sizeof(asn_DEF_T2_1_tags[0]), /* 1 */
176 asn_MBR_T2_1,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000177 1, /* Elements count */
Lev Walkine0272aa2005-03-04 11:26:08 +0000178 &asn_SPC_T2_1_specs /* Additional specs */
Lev Walkin35631482004-07-01 00:52:50 +0000179};
180
181
Lev Walkinb47ddce2004-08-11 05:25:47 +0000182/*** <<< INCLUDES [T3] >>> ***/
183
184#include <INTEGER.h>
185#include <constr_CHOICE.h>
186
Lev Walkin35631482004-07-01 00:52:50 +0000187/*** <<< DEPS [T3] >>> ***/
188
Lev Walkinb47ddce2004-08-11 05:25:47 +0000189typedef enum T3_PR {
190 T3_PR_NOTHING, /* No components present */
191 T3_PR_i,
192 /* Extensions may appear below */
Lev Walkin64399722004-08-11 07:17:22 +0000193} T3_PR;
Lev Walkin35631482004-07-01 00:52:50 +0000194
195/*** <<< TYPE-DECLS [T3] >>> ***/
196
Lev Walkin35631482004-07-01 00:52:50 +0000197typedef struct T3 {
Lev Walkin64399722004-08-11 07:17:22 +0000198 T3_PR present;
Lev Walkin35631482004-07-01 00:52:50 +0000199 union {
200 INTEGER_t i;
201 /*
202 * This type is extensible,
203 * possible extensions are below.
204 */
205 } choice;
206
207 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +0000208 asn_struct_ctx_t _asn_ctx;
Lev Walkin35631482004-07-01 00:52:50 +0000209} T3_t;
210
Lev Walkinc8285712005-03-04 22:18:20 +0000211/*** <<< FUNC-DECLS [T3] >>> ***/
212
213extern asn_TYPE_descriptor_t asn_DEF_T3;
214
Lev Walkin35631482004-07-01 00:52:50 +0000215/*** <<< STAT-DEFS [T3] >>> ***/
216
Lev Walkine0272aa2005-03-04 11:26:08 +0000217static asn_TYPE_member_t asn_MBR_T3_1[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000218 { ATF_NOFLAGS, 0, offsetof(struct T3, choice.i),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000219 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
220 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +0000221 .type = (void *)&asn_DEF_INTEGER,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000222 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000223 .name = "i"
Lev Walkin35631482004-07-01 00:52:50 +0000224 },
225};
Lev Walkine0272aa2005-03-04 11:26:08 +0000226static asn_TYPE_tag2member_t asn_MAP_T3_1_tag2el[] = {
Lev Walkinf82138b2005-02-25 08:20:32 +0000227 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* i at 16 */
Lev Walkin35631482004-07-01 00:52:50 +0000228};
Lev Walkine0272aa2005-03-04 11:26:08 +0000229static asn_CHOICE_specifics_t asn_SPC_T3_1_specs = {
Lev Walkin35631482004-07-01 00:52:50 +0000230 sizeof(struct T3),
Lev Walkindfae9752004-09-29 13:19:37 +0000231 offsetof(struct T3, _asn_ctx),
Lev Walkin35631482004-07-01 00:52:50 +0000232 offsetof(struct T3, present),
233 sizeof(((struct T3 *)0)->present),
Lev Walkine0272aa2005-03-04 11:26:08 +0000234 asn_MAP_T3_1_tag2el,
Lev Walkin35631482004-07-01 00:52:50 +0000235 1, /* Count of tags in the map */
236 1 /* Whether extensible */
237};
Lev Walkindfae9752004-09-29 13:19:37 +0000238asn_TYPE_descriptor_t asn_DEF_T3 = {
Lev Walkin35631482004-07-01 00:52:50 +0000239 "T3",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000240 "T3",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000241 CHOICE_free,
242 CHOICE_print,
Lev Walkin35631482004-07-01 00:52:50 +0000243 CHOICE_constraint,
244 CHOICE_decode_ber,
245 CHOICE_encode_der,
Lev Walkin61b40d82004-10-23 15:07:45 +0000246 CHOICE_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000247 CHOICE_encode_xer,
Lev Walkin35631482004-07-01 00:52:50 +0000248 CHOICE_outmost_tag,
Lev Walkin188ed2c2004-09-13 08:31:01 +0000249 0, /* No effective tags (pointer) */
250 0, /* No effective tags (count) */
251 0, /* No tags (pointer) */
252 0, /* No tags (count) */
Lev Walkine0272aa2005-03-04 11:26:08 +0000253 asn_MBR_T3_1,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000254 1, /* Elements count */
Lev Walkine0272aa2005-03-04 11:26:08 +0000255 &asn_SPC_T3_1_specs /* Additional specs */
Lev Walkin35631482004-07-01 00:52:50 +0000256};
257
258
Lev Walkinb47ddce2004-08-11 05:25:47 +0000259/*** <<< INCLUDES [T4] >>> ***/
260
261#include <INTEGER.h>
262#include <constr_CHOICE.h>
263
Lev Walkin35631482004-07-01 00:52:50 +0000264/*** <<< DEPS [T4] >>> ***/
265
Lev Walkinb47ddce2004-08-11 05:25:47 +0000266typedef enum T4_PR {
267 T4_PR_NOTHING, /* No components present */
268 T4_PR_i,
269 /* Extensions may appear below */
Lev Walkin64399722004-08-11 07:17:22 +0000270} T4_PR;
Lev Walkin35631482004-07-01 00:52:50 +0000271
272/*** <<< TYPE-DECLS [T4] >>> ***/
273
Lev Walkin35631482004-07-01 00:52:50 +0000274typedef struct T4 {
Lev Walkin64399722004-08-11 07:17:22 +0000275 T4_PR present;
Lev Walkin35631482004-07-01 00:52:50 +0000276 union {
277 INTEGER_t i;
278 /*
279 * This type is extensible,
280 * possible extensions are below.
281 */
282 } choice;
283
284 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +0000285 asn_struct_ctx_t _asn_ctx;
Lev Walkin35631482004-07-01 00:52:50 +0000286} T4_t;
287
Lev Walkinc8285712005-03-04 22:18:20 +0000288/*** <<< FUNC-DECLS [T4] >>> ***/
289
290extern asn_TYPE_descriptor_t asn_DEF_T4;
291
Lev Walkin35631482004-07-01 00:52:50 +0000292/*** <<< STAT-DEFS [T4] >>> ***/
293
Lev Walkine0272aa2005-03-04 11:26:08 +0000294static asn_TYPE_member_t asn_MBR_T4_1[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +0000295 { ATF_NOFLAGS, 0, offsetof(struct T4, choice.i),
Lev Walkin2e3055d2004-08-20 13:36:32 +0000296 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
297 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +0000298 .type = (void *)&asn_DEF_INTEGER,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000299 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000300 .name = "i"
Lev Walkin35631482004-07-01 00:52:50 +0000301 },
302};
Lev Walkine0272aa2005-03-04 11:26:08 +0000303static asn_TYPE_tag2member_t asn_MAP_T4_1_tag2el[] = {
Lev Walkinf82138b2005-02-25 08:20:32 +0000304 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* i at 17 */
Lev Walkin35631482004-07-01 00:52:50 +0000305};
Lev Walkine0272aa2005-03-04 11:26:08 +0000306static asn_CHOICE_specifics_t asn_SPC_T4_1_specs = {
Lev Walkin35631482004-07-01 00:52:50 +0000307 sizeof(struct T4),
Lev Walkindfae9752004-09-29 13:19:37 +0000308 offsetof(struct T4, _asn_ctx),
Lev Walkin35631482004-07-01 00:52:50 +0000309 offsetof(struct T4, present),
310 sizeof(((struct T4 *)0)->present),
Lev Walkine0272aa2005-03-04 11:26:08 +0000311 asn_MAP_T4_1_tag2el,
Lev Walkin35631482004-07-01 00:52:50 +0000312 1, /* Count of tags in the map */
313 1 /* Whether extensible */
314};
Lev Walkindfae9752004-09-29 13:19:37 +0000315asn_TYPE_descriptor_t asn_DEF_T4 = {
Lev Walkin35631482004-07-01 00:52:50 +0000316 "T4",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000317 "T4",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000318 CHOICE_free,
319 CHOICE_print,
Lev Walkin35631482004-07-01 00:52:50 +0000320 CHOICE_constraint,
321 CHOICE_decode_ber,
322 CHOICE_encode_der,
Lev Walkin61b40d82004-10-23 15:07:45 +0000323 CHOICE_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000324 CHOICE_encode_xer,
Lev Walkin35631482004-07-01 00:52:50 +0000325 CHOICE_outmost_tag,
Lev Walkin188ed2c2004-09-13 08:31:01 +0000326 0, /* No effective tags (pointer) */
327 0, /* No effective tags (count) */
328 0, /* No tags (pointer) */
329 0, /* No tags (count) */
Lev Walkine0272aa2005-03-04 11:26:08 +0000330 asn_MBR_T4_1,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000331 1, /* Elements count */
Lev Walkine0272aa2005-03-04 11:26:08 +0000332 &asn_SPC_T4_1_specs /* Additional specs */
Lev Walkin35631482004-07-01 00:52:50 +0000333};
334