blob: 9a49a798eefc6c4539e5512b708a615c20d470d2 [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
vlm21e46002004-08-20 13:36:32 +000032static asn1_TYPE_member_t asn1_MBR_collection[] = {
33 { 0, 0,
34 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
35 .tag_mode = 0,
36 .type = (void *)&asn1_DEF_T2,
37 .memb_constraints = 0, /* Defer to actual type */
38 .name = ""
vlmfa67ddc2004-06-03 03:38:44 +000039 },
vlm21e46002004-08-20 13:36:32 +000040};
41static ber_tlv_tag_t asn1_DEF_collection_tags[] = {
42 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
43};
44static asn1_SET_OF_specifics_t asn1_DEF_collection_specs = {
45 sizeof(struct collection),
46 offsetof(struct collection, _ber_dec_ctx),
47};
vlm1dc848e2004-09-07 06:44:29 +000048static /* Use -fall-defs-global to expose */
vlm21e46002004-08-20 13:36:32 +000049asn1_TYPE_descriptor_t asn1_DEF_collection = {
50 "collection",
51 SEQUENCE_OF_constraint,
52 SEQUENCE_OF_decode_ber,
53 SEQUENCE_OF_encode_der,
54 SEQUENCE_OF_print,
55 SEQUENCE_OF_free,
56 0, /* Use generic outmost tag fetcher */
57 asn1_DEF_collection_tags,
58 sizeof(asn1_DEF_collection_tags)
59 /sizeof(asn1_DEF_collection_tags[0]), /* 1 */
60 1, /* Tags to skip */
61 1, /* Whether CONSTRUCTED */
62 asn1_MBR_collection,
63 1, /* Single element */
64 &asn1_DEF_collection_specs /* Additional specs */
65};
66
67static asn1_TYPE_member_t asn1_MBR_T[] = {
68 { 0, offsetof(struct T, int),
69 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
70 .tag_mode = 0,
71 .type = (void *)&asn1_DEF_INTEGER,
72 .memb_constraints = 0, /* Defer to actual type */
73 .name = "int"
74 },
75 { 0, offsetof(struct T, collection),
76 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
77 .tag_mode = 0,
78 .type = (void *)&asn1_DEF_collection,
79 .memb_constraints = 0, /* Defer to actual type */
80 .name = "collection"
vlmfa67ddc2004-06-03 03:38:44 +000081 },
82};
83static ber_tlv_tag_t asn1_DEF_T_tags[] = {
84 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
85};
vlm35efd1b2004-06-06 07:20:52 +000086static asn1_TYPE_tag2member_t asn1_DEF_T_tag2el[] = {
vlmc8aeab42004-06-14 13:09:45 +000087 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* int at 15 */
88 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* collection at 17 */
vlm35efd1b2004-06-06 07:20:52 +000089};
vlmfa67ddc2004-06-03 03:38:44 +000090static asn1_SEQUENCE_specifics_t asn1_DEF_T_specs = {
91 sizeof(struct T),
92 offsetof(struct T, _ber_dec_ctx),
vlm35efd1b2004-06-06 07:20:52 +000093 asn1_DEF_T_tag2el,
94 2, /* Count of tags in the map */
vlmfa67ddc2004-06-03 03:38:44 +000095 -1, /* Start extensions */
96 -1 /* Stop extensions */
97};
98asn1_TYPE_descriptor_t asn1_DEF_T = {
99 "T",
100 SEQUENCE_constraint,
101 SEQUENCE_decode_ber,
102 SEQUENCE_encode_der,
103 SEQUENCE_print,
104 SEQUENCE_free,
105 0, /* Use generic outmost tag fetcher */
106 asn1_DEF_T_tags,
107 sizeof(asn1_DEF_T_tags)
vlm6e73a042004-08-11 07:17:22 +0000108 /sizeof(asn1_DEF_T_tags[0]), /* 1 */
vlm3df79662004-06-28 21:13:22 +0000109 1, /* Tags to skip */
vlmfa67ddc2004-06-03 03:38:44 +0000110 1, /* Whether CONSTRUCTED */
vlm21e46002004-08-20 13:36:32 +0000111 asn1_MBR_T,
112 2, /* Elements count */
vlmfa67ddc2004-06-03 03:38:44 +0000113 &asn1_DEF_T_specs /* Additional specs */
114};
115
116
vlmeb2157b2004-08-11 05:22:22 +0000117/*** <<< INCLUDES [T2] >>> ***/
vlmfa67ddc2004-06-03 03:38:44 +0000118
vlmfa67ddc2004-06-03 03:38:44 +0000119#include <BOOLEAN.h>
120#include <UTF8String.h>
vlmfa67ddc2004-06-03 03:38:44 +0000121#include <constr_SEQUENCE.h>
122
vlmeb2157b2004-08-11 05:22:22 +0000123/*** <<< DEPS [T2] >>> ***/
124
vlmfa67ddc2004-06-03 03:38:44 +0000125extern asn1_TYPE_descriptor_t asn1_DEF_T2;
126
127/*** <<< TYPE-DECLS [T2] >>> ***/
128
129
130typedef struct T2 {
131 BOOLEAN_t flag;
132 UTF8String_t str;
133
134 /* Context for parsing across buffer boundaries */
135 ber_dec_ctx_t _ber_dec_ctx;
136} T2_t;
137
138/*** <<< STAT-DEFS [T2] >>> ***/
139
vlm21e46002004-08-20 13:36:32 +0000140static asn1_TYPE_member_t asn1_MBR_T2[] = {
141 { 0, offsetof(struct T2, flag),
142 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
143 .tag_mode = 0,
144 .type = (void *)&asn1_DEF_BOOLEAN,
145 .memb_constraints = 0, /* Defer to actual type */
146 .name = "flag"
vlmfa67ddc2004-06-03 03:38:44 +0000147 },
vlm21e46002004-08-20 13:36:32 +0000148 { 0, offsetof(struct T2, str),
149 .tag = (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)),
150 .tag_mode = 0,
151 .type = (void *)&asn1_DEF_UTF8String,
152 .memb_constraints = 0, /* Defer to actual type */
153 .name = "str"
vlmfa67ddc2004-06-03 03:38:44 +0000154 },
155};
156static ber_tlv_tag_t asn1_DEF_T2_tags[] = {
157 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
158};
vlm35efd1b2004-06-06 07:20:52 +0000159static asn1_TYPE_tag2member_t asn1_DEF_T2_tag2el[] = {
vlmc8aeab42004-06-14 13:09:45 +0000160 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* flag at 20 */
161 { (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 1, 0, 0 }, /* str at 21 */
vlm35efd1b2004-06-06 07:20:52 +0000162};
vlmfa67ddc2004-06-03 03:38:44 +0000163static asn1_SEQUENCE_specifics_t asn1_DEF_T2_specs = {
164 sizeof(struct T2),
165 offsetof(struct T2, _ber_dec_ctx),
vlm35efd1b2004-06-06 07:20:52 +0000166 asn1_DEF_T2_tag2el,
167 2, /* Count of tags in the map */
vlmfa67ddc2004-06-03 03:38:44 +0000168 -1, /* Start extensions */
169 -1 /* Stop extensions */
170};
171asn1_TYPE_descriptor_t asn1_DEF_T2 = {
172 "T2",
173 SEQUENCE_constraint,
174 SEQUENCE_decode_ber,
175 SEQUENCE_encode_der,
176 SEQUENCE_print,
177 SEQUENCE_free,
178 0, /* Use generic outmost tag fetcher */
179 asn1_DEF_T2_tags,
180 sizeof(asn1_DEF_T2_tags)
vlm6e73a042004-08-11 07:17:22 +0000181 /sizeof(asn1_DEF_T2_tags[0]), /* 1 */
vlm3df79662004-06-28 21:13:22 +0000182 1, /* Tags to skip */
vlmfa67ddc2004-06-03 03:38:44 +0000183 1, /* Whether CONSTRUCTED */
vlm21e46002004-08-20 13:36:32 +0000184 asn1_MBR_T2,
185 2, /* Elements count */
vlmfa67ddc2004-06-03 03:38:44 +0000186 &asn1_DEF_T2_specs /* Additional specs */
187};
188