blob: 383cafc4b124b8ea5d4647a6dac277f071423414 [file] [log] [blame]
vlmfa67ddc2004-06-03 03:38:44 +00001
vlmeb2157b2004-08-11 05:22:22 +00002/*** <<< INCLUDES [T] >>> ***/
vlmfa67ddc2004-06-03 03:38:44 +00003
vlmfa67ddc2004-06-03 03:38:44 +00004#include <INTEGER.h>
vlmfa67ddc2004-06-03 03:38:44 +00005#include <T2.h>
6#include <asn_SEQUENCE_OF.h>
vlmeb2157b2004-08-11 05:22:22 +00007#include <constr_SEQUENCE_OF.h>
vlmfa67ddc2004-06-03 03:38:44 +00008#include <constr_SEQUENCE.h>
9
vlmeb2157b2004-08-11 05:22:22 +000010/*** <<< DEPS [T] >>> ***/
11
vlmfa67ddc2004-06-03 03:38:44 +000012extern asn1_TYPE_descriptor_t asn1_DEF_T;
13
14/*** <<< TYPE-DECLS [T] >>> ***/
15
16
17typedef struct T {
18 INTEGER_t int;
19 struct collection {
20 A_SEQUENCE_OF(struct T2) list;
21
22 /* Context for parsing across buffer boundaries */
23 ber_dec_ctx_t _ber_dec_ctx;
24 } collection;
25
26 /* Context for parsing across buffer boundaries */
27 ber_dec_ctx_t _ber_dec_ctx;
28} T_t;
29
30/*** <<< STAT-DEFS [T] >>> ***/
31
32 static asn1_SET_OF_element_t asn1_DEF_collection_elements[] = {
33 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
34 (void *)&asn1_DEF_T2 },
35 };
36 static ber_tlv_tag_t asn1_DEF_collection_tags[] = {
37 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
38 };
39 static asn1_SET_OF_specifics_t asn1_DEF_collection_specs = {
40 sizeof(struct collection),
41 offsetof(struct collection, _ber_dec_ctx),
42 asn1_DEF_collection_elements
43 };
44 asn1_TYPE_descriptor_t asn1_DEF_collection = {
45 "collection",
46 SEQUENCE_OF_constraint,
47 SEQUENCE_OF_decode_ber,
48 SEQUENCE_OF_encode_der,
49 SEQUENCE_OF_print,
50 SEQUENCE_OF_free,
51 0, /* Use generic outmost tag fetcher */
52 asn1_DEF_collection_tags,
53 sizeof(asn1_DEF_collection_tags)
vlm6e73a042004-08-11 07:17:22 +000054 /sizeof(asn1_DEF_collection_tags[0]), /* 1 */
vlm3df79662004-06-28 21:13:22 +000055 1, /* Tags to skip */
vlmfa67ddc2004-06-03 03:38:44 +000056 1, /* Whether CONSTRUCTED */
57 &asn1_DEF_collection_specs /* Additional specs */
58 };
59
vlmfa67ddc2004-06-03 03:38:44 +000060static asn1_SEQUENCE_element_t asn1_DEF_T_elements[] = {
61 { offsetof(struct T, int), 0,
62 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
63 0,
64 (void *)&asn1_DEF_INTEGER,
65 "int"
66 },
67 { offsetof(struct T, collection), 0,
68 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
69 0,
70 (void *)&asn1_DEF_collection,
71 "collection"
72 },
73};
74static ber_tlv_tag_t asn1_DEF_T_tags[] = {
75 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
76};
vlm35efd1b2004-06-06 07:20:52 +000077static asn1_TYPE_tag2member_t asn1_DEF_T_tag2el[] = {
vlmc8aeab42004-06-14 13:09:45 +000078 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* int at 15 */
79 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* collection at 17 */
vlm35efd1b2004-06-06 07:20:52 +000080};
vlmfa67ddc2004-06-03 03:38:44 +000081static asn1_SEQUENCE_specifics_t asn1_DEF_T_specs = {
82 sizeof(struct T),
83 offsetof(struct T, _ber_dec_ctx),
84 asn1_DEF_T_elements,
85 2, /* Elements count */
vlm35efd1b2004-06-06 07:20:52 +000086 asn1_DEF_T_tag2el,
87 2, /* Count of tags in the map */
vlmfa67ddc2004-06-03 03:38:44 +000088 -1, /* Start extensions */
89 -1 /* Stop extensions */
90};
91asn1_TYPE_descriptor_t asn1_DEF_T = {
92 "T",
93 SEQUENCE_constraint,
94 SEQUENCE_decode_ber,
95 SEQUENCE_encode_der,
96 SEQUENCE_print,
97 SEQUENCE_free,
98 0, /* Use generic outmost tag fetcher */
99 asn1_DEF_T_tags,
100 sizeof(asn1_DEF_T_tags)
vlm6e73a042004-08-11 07:17:22 +0000101 /sizeof(asn1_DEF_T_tags[0]), /* 1 */
vlm3df79662004-06-28 21:13:22 +0000102 1, /* Tags to skip */
vlmfa67ddc2004-06-03 03:38:44 +0000103 1, /* Whether CONSTRUCTED */
104 &asn1_DEF_T_specs /* Additional specs */
105};
106
107
vlmeb2157b2004-08-11 05:22:22 +0000108/*** <<< INCLUDES [T2] >>> ***/
vlmfa67ddc2004-06-03 03:38:44 +0000109
vlmfa67ddc2004-06-03 03:38:44 +0000110#include <BOOLEAN.h>
111#include <UTF8String.h>
vlmfa67ddc2004-06-03 03:38:44 +0000112#include <constr_SEQUENCE.h>
113
vlmeb2157b2004-08-11 05:22:22 +0000114/*** <<< DEPS [T2] >>> ***/
115
vlmfa67ddc2004-06-03 03:38:44 +0000116extern asn1_TYPE_descriptor_t asn1_DEF_T2;
117
118/*** <<< TYPE-DECLS [T2] >>> ***/
119
120
121typedef struct T2 {
122 BOOLEAN_t flag;
123 UTF8String_t str;
124
125 /* Context for parsing across buffer boundaries */
126 ber_dec_ctx_t _ber_dec_ctx;
127} T2_t;
128
129/*** <<< STAT-DEFS [T2] >>> ***/
130
vlmfa67ddc2004-06-03 03:38:44 +0000131static asn1_SEQUENCE_element_t asn1_DEF_T2_elements[] = {
132 { offsetof(struct T2, flag), 0,
133 (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
134 0,
135 (void *)&asn1_DEF_BOOLEAN,
136 "flag"
137 },
138 { offsetof(struct T2, str), 0,
139 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)),
140 0,
141 (void *)&asn1_DEF_UTF8String,
142 "str"
143 },
144};
145static ber_tlv_tag_t asn1_DEF_T2_tags[] = {
146 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
147};
vlm35efd1b2004-06-06 07:20:52 +0000148static asn1_TYPE_tag2member_t asn1_DEF_T2_tag2el[] = {
vlmc8aeab42004-06-14 13:09:45 +0000149 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* flag at 20 */
150 { (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 1, 0, 0 }, /* str at 21 */
vlm35efd1b2004-06-06 07:20:52 +0000151};
vlmfa67ddc2004-06-03 03:38:44 +0000152static asn1_SEQUENCE_specifics_t asn1_DEF_T2_specs = {
153 sizeof(struct T2),
154 offsetof(struct T2, _ber_dec_ctx),
155 asn1_DEF_T2_elements,
156 2, /* Elements count */
vlm35efd1b2004-06-06 07:20:52 +0000157 asn1_DEF_T2_tag2el,
158 2, /* Count of tags in the map */
vlmfa67ddc2004-06-03 03:38:44 +0000159 -1, /* Start extensions */
160 -1 /* Stop extensions */
161};
162asn1_TYPE_descriptor_t asn1_DEF_T2 = {
163 "T2",
164 SEQUENCE_constraint,
165 SEQUENCE_decode_ber,
166 SEQUENCE_encode_der,
167 SEQUENCE_print,
168 SEQUENCE_free,
169 0, /* Use generic outmost tag fetcher */
170 asn1_DEF_T2_tags,
171 sizeof(asn1_DEF_T2_tags)
vlm6e73a042004-08-11 07:17:22 +0000172 /sizeof(asn1_DEF_T2_tags[0]), /* 1 */
vlm3df79662004-06-28 21:13:22 +0000173 1, /* Tags to skip */
vlmfa67ddc2004-06-03 03:38:44 +0000174 1, /* Whether CONSTRUCTED */
175 &asn1_DEF_T2_specs /* Additional specs */
176};
177