blob: 59aa7b1db309fc2d50becfa4a4793054a631971c [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
8/*** <<< DEPS [T1] >>> ***/
9
Lev Walkindfae9752004-09-29 13:19:37 +000010extern asn_TYPE_descriptor_t asn_DEF_T1;
Lev Walkinb9189732004-09-10 09:37:12 +000011
12/*** <<< TYPE-DECLS [T1] >>> ***/
13
14
15typedef struct T1 {
16 INTEGER_t i;
17 ANY_t any;
18
19 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +000020 asn_struct_ctx_t _asn_ctx;
Lev Walkinb9189732004-09-10 09:37:12 +000021} T1_t;
22
23/*** <<< STAT-DEFS [T1] >>> ***/
24
Lev Walkindfae9752004-09-29 13:19:37 +000025static asn_TYPE_member_t asn_MBR_T1[] = {
Lev Walkinb9189732004-09-10 09:37:12 +000026 { ATF_NOFLAGS, 0, offsetof(struct T1, i),
27 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
28 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +000029 .type = (void *)&asn_DEF_INTEGER,
Lev Walkinb9189732004-09-10 09:37:12 +000030 .memb_constraints = 0, /* Defer to actual type */
31 .name = "i"
32 },
33 { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct T1, any),
34 .tag = -1 /* Ambiguous tag (ANY?) */,
35 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +000036 .type = (void *)&asn_DEF_ANY,
Lev Walkinb9189732004-09-10 09:37:12 +000037 .memb_constraints = 0, /* Defer to actual type */
38 .name = "any"
39 },
40};
Lev Walkindfae9752004-09-29 13:19:37 +000041static ber_tlv_tag_t asn_DEF_T1_tags[] = {
Lev Walkinb9189732004-09-10 09:37:12 +000042 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
43};
Lev Walkindfae9752004-09-29 13:19:37 +000044static asn_TYPE_tag2member_t asn_DEF_T1_tag2el[] = {
Lev Walkinb9189732004-09-10 09:37:12 +000045 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 15 */
46};
Lev Walkindfae9752004-09-29 13:19:37 +000047static asn_SEQUENCE_specifics_t asn_DEF_T1_specs = {
Lev Walkinb9189732004-09-10 09:37:12 +000048 sizeof(struct T1),
Lev Walkindfae9752004-09-29 13:19:37 +000049 offsetof(struct T1, _asn_ctx),
50 asn_DEF_T1_tag2el,
Lev Walkinb9189732004-09-10 09:37:12 +000051 1, /* Count of tags in the map */
52 -1, /* Start extensions */
53 -1 /* Stop extensions */
54};
Lev Walkindfae9752004-09-29 13:19:37 +000055asn_TYPE_descriptor_t asn_DEF_T1 = {
Lev Walkinb9189732004-09-10 09:37:12 +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 Walkina9cc46e2004-09-22 16:06:28 +000062 0, /* Not implemented yet */
63 SEQUENCE_encode_xer,
Lev Walkinb9189732004-09-10 09:37:12 +000064 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +000065 asn_DEF_T1_tags,
66 sizeof(asn_DEF_T1_tags)
67 /sizeof(asn_DEF_T1_tags[0]), /* 1 */
68 asn_DEF_T1_tags, /* Same as above */
69 sizeof(asn_DEF_T1_tags)
70 /sizeof(asn_DEF_T1_tags[0]), /* 1 */
71 asn_MBR_T1,
Lev Walkinb9189732004-09-10 09:37:12 +000072 2, /* Elements count */
Lev Walkindfae9752004-09-29 13:19:37 +000073 &asn_DEF_T1_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
83/*** <<< DEPS [T2] >>> ***/
84
Lev Walkindfae9752004-09-29 13:19:37 +000085extern asn_TYPE_descriptor_t asn_DEF_T2;
Lev Walkinb9189732004-09-10 09:37:12 +000086
87/*** <<< TYPE-DECLS [T2] >>> ***/
88
89
90typedef struct T2 {
91 INTEGER_t i;
92 ANY_t *any /* OPTIONAL */;
93
94 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +000095 asn_struct_ctx_t _asn_ctx;
Lev Walkinb9189732004-09-10 09:37:12 +000096} T2_t;
97
98/*** <<< STAT-DEFS [T2] >>> ***/
99
Lev Walkindfae9752004-09-29 13:19:37 +0000100static asn_TYPE_member_t asn_MBR_T2[] = {
Lev Walkinb9189732004-09-10 09:37:12 +0000101 { ATF_NOFLAGS, 0, offsetof(struct T2, i),
102 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
103 .tag_mode = 0,
Lev Walkindfae9752004-09-29 13:19:37 +0000104 .type = (void *)&asn_DEF_INTEGER,
Lev Walkinb9189732004-09-10 09:37:12 +0000105 .memb_constraints = 0, /* Defer to actual type */
106 .name = "i"
107 },
108 { ATF_POINTER, 1, offsetof(struct T2, any),
109 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
110 .tag_mode = +1, /* EXPLICIT tag at current level */
Lev Walkindfae9752004-09-29 13:19:37 +0000111 .type = (void *)&asn_DEF_ANY,
Lev Walkinb9189732004-09-10 09:37:12 +0000112 .memb_constraints = 0, /* Defer to actual type */
113 .name = "any"
114 },
115};
Lev Walkindfae9752004-09-29 13:19:37 +0000116static ber_tlv_tag_t asn_DEF_T2_tags[] = {
Lev Walkinb9189732004-09-10 09:37:12 +0000117 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
118};
Lev Walkindfae9752004-09-29 13:19:37 +0000119static asn_TYPE_tag2member_t asn_DEF_T2_tag2el[] = {
Lev Walkinb9189732004-09-10 09:37:12 +0000120 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 20 */
121 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* any at 21 */
122};
Lev Walkindfae9752004-09-29 13:19:37 +0000123static asn_SEQUENCE_specifics_t asn_DEF_T2_specs = {
Lev Walkinb9189732004-09-10 09:37:12 +0000124 sizeof(struct T2),
Lev Walkindfae9752004-09-29 13:19:37 +0000125 offsetof(struct T2, _asn_ctx),
126 asn_DEF_T2_tag2el,
Lev Walkinb9189732004-09-10 09:37:12 +0000127 2, /* Count of tags in the map */
128 -1, /* Start extensions */
129 -1 /* Stop extensions */
130};
Lev Walkindfae9752004-09-29 13:19:37 +0000131asn_TYPE_descriptor_t asn_DEF_T2 = {
Lev Walkinb9189732004-09-10 09:37:12 +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 Walkina9cc46e2004-09-22 16:06:28 +0000138 0, /* Not implemented yet */
139 SEQUENCE_encode_xer,
Lev Walkinb9189732004-09-10 09:37:12 +0000140 0, /* Use generic outmost tag fetcher */
Lev Walkindfae9752004-09-29 13:19:37 +0000141 asn_DEF_T2_tags,
142 sizeof(asn_DEF_T2_tags)
143 /sizeof(asn_DEF_T2_tags[0]), /* 1 */
144 asn_DEF_T2_tags, /* Same as above */
145 sizeof(asn_DEF_T2_tags)
146 /sizeof(asn_DEF_T2_tags[0]), /* 1 */
147 asn_MBR_T2,
Lev Walkinb9189732004-09-10 09:37:12 +0000148 2, /* Elements count */
Lev Walkindfae9752004-09-29 13:19:37 +0000149 &asn_DEF_T2_specs /* Additional specs */
Lev Walkinb9189732004-09-10 09:37:12 +0000150};
151