blob: 3f80bdef61c7767c75fd478e35163aa546f59da7 [file] [log] [blame]
Lev Walkinb9189732004-09-10 09:37:12 +00001
2/*** <<< INCLUDES [T1] >>> ***/
3
4#include <INTEGER.h>
5#include <ANY.h>
6#include <constr_SEQUENCE.h>
7
Lev Walkinb9189732004-09-10 09:37:12 +00008/*** <<< TYPE-DECLS [T1] >>> ***/
9
Lev Walkinb9189732004-09-10 09:37:12 +000010typedef struct T1 {
11 INTEGER_t i;
12 ANY_t any;
13
14 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +000015 asn_struct_ctx_t _asn_ctx;
Lev Walkinb9189732004-09-10 09:37:12 +000016} T1_t;
17
Lev Walkinc8285712005-03-04 22:18:20 +000018/*** <<< FUNC-DECLS [T1] >>> ***/
19
20extern asn_TYPE_descriptor_t asn_DEF_T1;
21
Lev Walkinb9189732004-09-10 09:37:12 +000022/*** <<< STAT-DEFS [T1] >>> ***/
23
Lev Walkine0272aa2005-03-04 11:26:08 +000024static asn_TYPE_member_t asn_MBR_T1_1[] = {
Lev Walkinb9189732004-09-10 09:37:12 +000025 { ATF_NOFLAGS, 0, offsetof(struct T1, i),
26 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
27 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +000028 .type = (void *)&asn_DEF_INTEGER,
Lev Walkinba58e1b2005-01-17 12:20:19 +000029 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb9189732004-09-10 09:37:12 +000030 .name = "i"
31 },
32 { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct T1, any),
33 .tag = -1 /* Ambiguous tag (ANY?) */,
34 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +000035 .type = (void *)&asn_DEF_ANY,
Lev Walkinba58e1b2005-01-17 12:20:19 +000036 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb9189732004-09-10 09:37:12 +000037 .name = "any"
38 },
39};
Lev Walkine0272aa2005-03-04 11:26:08 +000040static ber_tlv_tag_t asn_DEF_T1_1_tags[] = {
Lev Walkinb9189732004-09-10 09:37:12 +000041 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
42};
Lev Walkine0272aa2005-03-04 11:26:08 +000043static asn_TYPE_tag2member_t asn_MAP_T1_1_tag2el[] = {
Lev Walkin4756e5e2005-02-25 08:19:34 +000044 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* i at 15 */
Lev Walkinb9189732004-09-10 09:37:12 +000045};
Lev Walkine0272aa2005-03-04 11:26:08 +000046static asn_SEQUENCE_specifics_t asn_SPC_T1_1_specs = {
Lev Walkinb9189732004-09-10 09:37:12 +000047 sizeof(struct T1),
Lev Walkindfae9752004-09-29 13:19:37 +000048 offsetof(struct T1, _asn_ctx),
Lev Walkine0272aa2005-03-04 11:26:08 +000049 asn_MAP_T1_1_tag2el,
Lev Walkinb9189732004-09-10 09:37:12 +000050 1, /* Count of tags in the map */
51 -1, /* Start extensions */
52 -1 /* Stop extensions */
53};
Lev Walkindfae9752004-09-29 13:19:37 +000054asn_TYPE_descriptor_t asn_DEF_T1 = {
Lev Walkinb9189732004-09-10 09:37:12 +000055 "T1",
Lev Walkindc06f6b2004-10-20 15:50:55 +000056 "T1",
Lev Walkina9cc46e2004-09-22 16:06:28 +000057 SEQUENCE_free,
58 SEQUENCE_print,
Lev Walkinb9189732004-09-10 09:37:12 +000059 SEQUENCE_constraint,
60 SEQUENCE_decode_ber,
61 SEQUENCE_encode_der,
Lev Walkin61b40d82004-10-23 15:07:45 +000062 SEQUENCE_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +000063 SEQUENCE_encode_xer,
Lev Walkinb9189732004-09-10 09:37:12 +000064 0, /* Use generic outmost tag fetcher */
Lev Walkine0272aa2005-03-04 11:26:08 +000065 asn_DEF_T1_1_tags,
66 sizeof(asn_DEF_T1_1_tags)
67 /sizeof(asn_DEF_T1_1_tags[0]), /* 1 */
68 asn_DEF_T1_1_tags, /* Same as above */
69 sizeof(asn_DEF_T1_1_tags)
70 /sizeof(asn_DEF_T1_1_tags[0]), /* 1 */
71 asn_MBR_T1_1,
Lev Walkinb9189732004-09-10 09:37:12 +000072 2, /* Elements count */
Lev Walkine0272aa2005-03-04 11:26:08 +000073 &asn_SPC_T1_1_specs /* Additional specs */
Lev Walkinb9189732004-09-10 09:37:12 +000074};
75
76
77/*** <<< INCLUDES [T2] >>> ***/
78
79#include <INTEGER.h>
80#include <ANY.h>
81#include <constr_SEQUENCE.h>
82
Lev Walkinb9189732004-09-10 09:37:12 +000083/*** <<< TYPE-DECLS [T2] >>> ***/
84
Lev Walkinb9189732004-09-10 09:37:12 +000085typedef struct T2 {
86 INTEGER_t i;
87 ANY_t *any /* OPTIONAL */;
88
89 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +000090 asn_struct_ctx_t _asn_ctx;
Lev Walkinb9189732004-09-10 09:37:12 +000091} T2_t;
92
Lev Walkinc8285712005-03-04 22:18:20 +000093/*** <<< FUNC-DECLS [T2] >>> ***/
94
95extern asn_TYPE_descriptor_t asn_DEF_T2;
96
Lev Walkinb9189732004-09-10 09:37:12 +000097/*** <<< STAT-DEFS [T2] >>> ***/
98
Lev Walkine0272aa2005-03-04 11:26:08 +000099static asn_TYPE_member_t asn_MBR_T2_1[] = {
Lev Walkinb9189732004-09-10 09:37:12 +0000100 { ATF_NOFLAGS, 0, offsetof(struct T2, i),
101 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
102 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +0000103 .type = (void *)&asn_DEF_INTEGER,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000104 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb9189732004-09-10 09:37:12 +0000105 .name = "i"
106 },
107 { ATF_POINTER, 1, offsetof(struct T2, any),
108 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
109 .tag_mode = +1, /* EXPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000110 .type = (void *)&asn_DEF_ANY,
Lev Walkinba58e1b2005-01-17 12:20:19 +0000111 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb9189732004-09-10 09:37:12 +0000112 .name = "any"
113 },
114};
Lev Walkine0272aa2005-03-04 11:26:08 +0000115static ber_tlv_tag_t asn_DEF_T2_1_tags[] = {
Lev Walkinb9189732004-09-10 09:37:12 +0000116 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
117};
Lev Walkine0272aa2005-03-04 11:26:08 +0000118static asn_TYPE_tag2member_t asn_MAP_T2_1_tag2el[] = {
Lev Walkinb9189732004-09-10 09:37:12 +0000119 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 20 */
Lev Walkin4756e5e2005-02-25 08:19:34 +0000120 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 } /* any at 21 */
Lev Walkinb9189732004-09-10 09:37:12 +0000121};
Lev Walkine0272aa2005-03-04 11:26:08 +0000122static asn_SEQUENCE_specifics_t asn_SPC_T2_1_specs = {
Lev Walkinb9189732004-09-10 09:37:12 +0000123 sizeof(struct T2),
Lev Walkindfae9752004-09-29 13:19:37 +0000124 offsetof(struct T2, _asn_ctx),
Lev Walkine0272aa2005-03-04 11:26:08 +0000125 asn_MAP_T2_1_tag2el,
Lev Walkinb9189732004-09-10 09:37:12 +0000126 2, /* Count of tags in the map */
127 -1, /* Start extensions */
128 -1 /* Stop extensions */
129};
Lev Walkindfae9752004-09-29 13:19:37 +0000130asn_TYPE_descriptor_t asn_DEF_T2 = {
Lev Walkinb9189732004-09-10 09:37:12 +0000131 "T2",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000132 "T2",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000133 SEQUENCE_free,
134 SEQUENCE_print,
Lev Walkinb9189732004-09-10 09:37:12 +0000135 SEQUENCE_constraint,
136 SEQUENCE_decode_ber,
137 SEQUENCE_encode_der,
Lev Walkin61b40d82004-10-23 15:07:45 +0000138 SEQUENCE_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000139 SEQUENCE_encode_xer,
Lev Walkinb9189732004-09-10 09:37:12 +0000140 0, /* Use generic outmost tag fetcher */
Lev Walkine0272aa2005-03-04 11:26:08 +0000141 asn_DEF_T2_1_tags,
142 sizeof(asn_DEF_T2_1_tags)
143 /sizeof(asn_DEF_T2_1_tags[0]), /* 1 */
144 asn_DEF_T2_1_tags, /* Same as above */
145 sizeof(asn_DEF_T2_1_tags)
146 /sizeof(asn_DEF_T2_1_tags[0]), /* 1 */
147 asn_MBR_T2_1,
Lev Walkinb9189732004-09-10 09:37:12 +0000148 2, /* Elements count */
Lev Walkine0272aa2005-03-04 11:26:08 +0000149 &asn_SPC_T2_1_specs /* Additional specs */
Lev Walkinb9189732004-09-10 09:37:12 +0000150};
151
Lev Walkinb3ee6a62005-05-27 21:58:41 +0000152
153/*** <<< INCLUDES [T3] >>> ***/
154
155#include <ANY.h>
156#include <constr_SEQUENCE.h>
157
158/*** <<< TYPE-DECLS [T3] >>> ***/
159
160typedef struct T3 {
161 ANY_t any1;
162 ANY_t any2;
163
164 /* Context for parsing across buffer boundaries */
165 asn_struct_ctx_t _asn_ctx;
166} T3_t;
167
168/*** <<< FUNC-DECLS [T3] >>> ***/
169
170extern asn_TYPE_descriptor_t asn_DEF_T3;
171
172/*** <<< STAT-DEFS [T3] >>> ***/
173
174static asn_TYPE_member_t asn_MBR_T3_1[] = {
175 { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct T3, any1),
176 .tag = -1 /* Ambiguous tag (ANY?) */,
177 .tag_mode = 0,
178 .type = (void *)&asn_DEF_ANY,
179 .memb_constraints = 0, /* Defer constraints checking to the member type */
180 .name = "any1"
181 },
182 { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct T3, any2),
183 .tag = -1 /* Ambiguous tag (ANY?) */,
184 .tag_mode = 0,
185 .type = (void *)&asn_DEF_ANY,
186 .memb_constraints = 0, /* Defer constraints checking to the member type */
187 .name = "any2"
188 },
189};
190static ber_tlv_tag_t asn_DEF_T3_1_tags[] = {
191 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
192};
193static asn_SEQUENCE_specifics_t asn_SPC_T3_1_specs = {
194 sizeof(struct T3),
195 offsetof(struct T3, _asn_ctx),
196 0, /* No top level tags */
197 0, /* No tags in the map */
198 -1, /* Start extensions */
199 -1 /* Stop extensions */
200};
201asn_TYPE_descriptor_t asn_DEF_T3 = {
202 "T3",
203 "T3",
204 SEQUENCE_free,
205 SEQUENCE_print,
206 SEQUENCE_constraint,
207 SEQUENCE_decode_ber,
208 SEQUENCE_encode_der,
209 SEQUENCE_decode_xer,
210 SEQUENCE_encode_xer,
211 0, /* Use generic outmost tag fetcher */
212 asn_DEF_T3_1_tags,
213 sizeof(asn_DEF_T3_1_tags)
214 /sizeof(asn_DEF_T3_1_tags[0]), /* 1 */
215 asn_DEF_T3_1_tags, /* Same as above */
216 sizeof(asn_DEF_T3_1_tags)
217 /sizeof(asn_DEF_T3_1_tags[0]), /* 1 */
218 asn_MBR_T3_1,
219 2, /* Elements count */
220 &asn_SPC_T3_1_specs /* Additional specs */
221};
222