Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [Forest] >>> ***/ |
| 3 | |
| 4 | #include <Tree.h> |
| 5 | #include <asn_SET_OF.h> |
| 6 | #include <constr_SET_OF.h> |
| 7 | |
| 8 | /*** <<< DEPS [Forest] >>> ***/ |
| 9 | |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 10 | extern asn_TYPE_descriptor_t asn_DEF_Forest; |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 11 | |
| 12 | /*** <<< TYPE-DECLS [Forest] >>> ***/ |
| 13 | |
| 14 | |
| 15 | typedef struct Forest { |
Lev Walkin | 8dd0eed | 2004-09-17 06:32:12 +0000 | [diff] [blame] | 16 | A_SET_OF(Tree_t) list; |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 17 | |
| 18 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 19 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 20 | } Forest_t; |
| 21 | |
| 22 | /*** <<< STAT-DEFS [Forest] >>> ***/ |
| 23 | |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 24 | static asn_TYPE_member_t asn_MBR_Forest[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 25 | { ATF_NOFLAGS, 0, 0, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 26 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 27 | .tag_mode = 0, |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 28 | .type = (void *)&asn_DEF_Tree, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 29 | .memb_constraints = 0, /* Defer to actual type */ |
| 30 | .name = "" |
| 31 | }, |
| 32 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 33 | static ber_tlv_tag_t asn_DEF_Forest_tags[] = { |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 34 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 35 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 36 | static asn_SET_OF_specifics_t asn_DEF_Forest_specs = { |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 37 | sizeof(struct Forest), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 38 | offsetof(struct Forest, _asn_ctx), |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 39 | 0, /* XER encoding is XMLDelimitedItemList */ |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 40 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 41 | asn_TYPE_descriptor_t asn_DEF_Forest = { |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 42 | "Forest", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 43 | "Forest", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 44 | SET_OF_free, |
| 45 | SET_OF_print, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 46 | SET_OF_constraint, |
| 47 | SET_OF_decode_ber, |
| 48 | SET_OF_encode_der, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 49 | 0, /* Not implemented yet */ |
| 50 | SET_OF_encode_xer, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 51 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 52 | asn_DEF_Forest_tags, |
| 53 | sizeof(asn_DEF_Forest_tags) |
| 54 | /sizeof(asn_DEF_Forest_tags[0]), /* 1 */ |
| 55 | asn_DEF_Forest_tags, /* Same as above */ |
| 56 | sizeof(asn_DEF_Forest_tags) |
| 57 | /sizeof(asn_DEF_Forest_tags[0]), /* 1 */ |
| 58 | asn_MBR_Forest, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 59 | 1, /* Single element */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 60 | &asn_DEF_Forest_specs /* Additional specs */ |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 61 | }; |
| 62 | |
| 63 | |
| 64 | /*** <<< INCLUDES [Tree] >>> ***/ |
| 65 | |
| 66 | #include <INTEGER.h> |
| 67 | #include <constr_SEQUENCE.h> |
| 68 | |
| 69 | /*** <<< DEPS [Tree] >>> ***/ |
| 70 | |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 71 | extern asn_TYPE_descriptor_t asn_DEF_Tree; |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 72 | |
| 73 | /*** <<< TYPE-DECLS [Tree] >>> ***/ |
| 74 | |
| 75 | |
| 76 | typedef struct Tree { |
| 77 | INTEGER_t height; |
| 78 | INTEGER_t width; |
| 79 | |
| 80 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 81 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 82 | } Tree_t; |
| 83 | |
| 84 | /*** <<< STAT-DEFS [Tree] >>> ***/ |
| 85 | |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 86 | static asn_TYPE_member_t asn_MBR_Tree[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 87 | { ATF_NOFLAGS, 0, offsetof(struct Tree, height), |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 88 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 89 | .tag_mode = 0, |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 90 | .type = (void *)&asn_DEF_INTEGER, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 91 | .memb_constraints = 0, /* Defer to actual type */ |
| 92 | .name = "height" |
| 93 | }, |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 94 | { ATF_NOFLAGS, 0, offsetof(struct Tree, width), |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 95 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 96 | .tag_mode = 0, |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 97 | .type = (void *)&asn_DEF_INTEGER, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 98 | .memb_constraints = 0, /* Defer to actual type */ |
| 99 | .name = "width" |
| 100 | }, |
| 101 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 102 | static ber_tlv_tag_t asn_DEF_Tree_tags[] = { |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 103 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 104 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 105 | static asn_TYPE_tag2member_t asn_DEF_Tree_tag2el[] = { |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 106 | { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* height at 17 */ |
| 107 | { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* width at 19 */ |
| 108 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 109 | static asn_SEQUENCE_specifics_t asn_DEF_Tree_specs = { |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 110 | sizeof(struct Tree), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 111 | offsetof(struct Tree, _asn_ctx), |
| 112 | asn_DEF_Tree_tag2el, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 113 | 2, /* Count of tags in the map */ |
| 114 | -1, /* Start extensions */ |
| 115 | -1 /* Stop extensions */ |
| 116 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 117 | asn_TYPE_descriptor_t asn_DEF_Tree = { |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 118 | "Tree", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 119 | "Tree", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 120 | SEQUENCE_free, |
| 121 | SEQUENCE_print, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 122 | SEQUENCE_constraint, |
| 123 | SEQUENCE_decode_ber, |
| 124 | SEQUENCE_encode_der, |
Lev Walkin | 61b40d8 | 2004-10-23 15:07:45 +0000 | [diff] [blame] | 125 | SEQUENCE_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 126 | SEQUENCE_encode_xer, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 127 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 128 | asn_DEF_Tree_tags, |
| 129 | sizeof(asn_DEF_Tree_tags) |
| 130 | /sizeof(asn_DEF_Tree_tags[0]), /* 1 */ |
| 131 | asn_DEF_Tree_tags, /* Same as above */ |
| 132 | sizeof(asn_DEF_Tree_tags) |
| 133 | /sizeof(asn_DEF_Tree_tags[0]), /* 1 */ |
| 134 | asn_MBR_Tree, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 135 | 2, /* Elements count */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 136 | &asn_DEF_Tree_specs /* Additional specs */ |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 137 | }; |
| 138 | |
| 139 | |
| 140 | /*** <<< INCLUDES [Stuff] >>> ***/ |
| 141 | |
| 142 | #include <Forest.h> |
| 143 | #include <asn_SET_OF.h> |
| 144 | #include <constr_SET_OF.h> |
| 145 | #include <BIT_STRING.h> |
| 146 | #include <constr_SEQUENCE.h> |
Lev Walkin | 2a8672e | 2004-10-03 09:14:49 +0000 | [diff] [blame] | 147 | #include <INTEGER.h> |
| 148 | #include <constr_CHOICE.h> |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 149 | #include <constr_SET.h> |
| 150 | |
| 151 | /*** <<< DEPS [Stuff] >>> ***/ |
| 152 | |
| 153 | |
| 154 | /* |
| 155 | * Method of determining the components presence |
| 156 | */ |
| 157 | typedef enum Stuff_PR { |
| 158 | Stuff_PR_trees, /* Member trees is present */ |
| 159 | Stuff_PR_anything, /* Member anything is present */ |
Lev Walkin | 2a8672e | 2004-10-03 09:14:49 +0000 | [diff] [blame] | 160 | Stuff_PR_other, /* Member other is present */ |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 161 | } Stuff_PR; |
Lev Walkin | 2a8672e | 2004-10-03 09:14:49 +0000 | [diff] [blame] | 162 | typedef enum other_PR { |
| 163 | other_PR_NOTHING, /* No components present */ |
| 164 | other_PR_a, |
| 165 | other_PR_b, |
| 166 | } other_PR; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 167 | extern asn_TYPE_descriptor_t asn_DEF_Stuff; |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 168 | |
| 169 | /*** <<< TYPE-DECLS [Stuff] >>> ***/ |
| 170 | |
| 171 | |
| 172 | typedef struct Stuff { |
| 173 | struct trees { |
Lev Walkin | 8dd0eed | 2004-09-17 06:32:12 +0000 | [diff] [blame] | 174 | A_SET_OF(Forest_t) list; |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 175 | |
| 176 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 177 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 178 | } *trees; |
| 179 | struct anything { |
| 180 | A_SET_OF(struct anything_member { |
| 181 | BIT_STRING_t cup_of_coffee; |
| 182 | /* |
| 183 | * This type is extensible, |
| 184 | * possible extensions are below. |
| 185 | */ |
| 186 | |
| 187 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 188 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 189 | } ) list; |
| 190 | |
| 191 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 192 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 193 | } *anything; |
Lev Walkin | 2a8672e | 2004-10-03 09:14:49 +0000 | [diff] [blame] | 194 | /* |
| 195 | * This type is extensible, |
| 196 | * possible extensions are below. |
| 197 | */ |
| 198 | struct other { |
| 199 | other_PR present; |
| 200 | union { |
| 201 | INTEGER_t a; |
| 202 | INTEGER_t b; |
| 203 | } choice; |
| 204 | |
| 205 | /* Context for parsing across buffer boundaries */ |
| 206 | asn_struct_ctx_t _asn_ctx; |
| 207 | } *other; |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 208 | |
| 209 | /* Presence bitmask: ASN_SET_ISPRESENT(pStuff, Stuff_PR_x) */ |
| 210 | unsigned int _presence_map |
Lev Walkin | 2a8672e | 2004-10-03 09:14:49 +0000 | [diff] [blame] | 211 | [((3+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))]; |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 212 | |
| 213 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 214 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 215 | } Stuff_t; |
| 216 | |
| 217 | /*** <<< STAT-DEFS [Stuff] >>> ***/ |
| 218 | |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 219 | static asn_TYPE_member_t asn_MBR_trees[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 220 | { ATF_NOFLAGS, 0, 0, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 221 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), |
| 222 | .tag_mode = 0, |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 223 | .type = (void *)&asn_DEF_Forest, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 224 | .memb_constraints = 0, /* Defer to actual type */ |
| 225 | .name = "" |
| 226 | }, |
| 227 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 228 | static ber_tlv_tag_t asn_DEF_trees_tags[] = { |
Lev Walkin | 2a8672e | 2004-10-03 09:14:49 +0000 | [diff] [blame] | 229 | (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
Lev Walkin | 188ed2c | 2004-09-13 08:31:01 +0000 | [diff] [blame] | 230 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 231 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 232 | static asn_SET_OF_specifics_t asn_DEF_trees_specs = { |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 233 | sizeof(struct trees), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 234 | offsetof(struct trees, _asn_ctx), |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 235 | 0, /* XER encoding is XMLDelimitedItemList */ |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 236 | }; |
Lev Walkin | d04430c | 2004-09-07 06:44:29 +0000 | [diff] [blame] | 237 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 238 | asn_TYPE_descriptor_t asn_DEF_trees = { |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 239 | "trees", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 240 | "trees", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 241 | SET_OF_free, |
| 242 | SET_OF_print, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 243 | SET_OF_constraint, |
| 244 | SET_OF_decode_ber, |
| 245 | SET_OF_encode_der, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 246 | 0, /* Not implemented yet */ |
| 247 | SET_OF_encode_xer, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 248 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 249 | asn_DEF_trees_tags, |
| 250 | sizeof(asn_DEF_trees_tags) |
| 251 | /sizeof(asn_DEF_trees_tags[0]) - 1, /* 1 */ |
| 252 | asn_DEF_trees_tags, /* Same as above */ |
| 253 | sizeof(asn_DEF_trees_tags) |
| 254 | /sizeof(asn_DEF_trees_tags[0]), /* 2 */ |
| 255 | asn_MBR_trees, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 256 | 1, /* Single element */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 257 | &asn_DEF_trees_specs /* Additional specs */ |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 258 | }; |
| 259 | |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 260 | static asn_TYPE_member_t asn_MBR_anything_member[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 261 | { ATF_NOFLAGS, 0, offsetof(struct anything_member, cup_of_coffee), |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 262 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), |
| 263 | .tag_mode = 0, |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 264 | .type = (void *)&asn_DEF_BIT_STRING, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 265 | .memb_constraints = 0, /* Defer to actual type */ |
| 266 | .name = "cup-of-coffee" |
| 267 | }, |
| 268 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 269 | static ber_tlv_tag_t asn_DEF_anything_member_tags[] = { |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 270 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 271 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 272 | static asn_TYPE_tag2member_t asn_DEF_anything_member_tag2el[] = { |
Lev Walkin | 2a8672e | 2004-10-03 09:14:49 +0000 | [diff] [blame] | 273 | { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 0 }, /* cup-of-coffee at 32 */ |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 274 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 275 | static asn_SEQUENCE_specifics_t asn_DEF_anything_member_specs = { |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 276 | sizeof(struct anything_member), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 277 | offsetof(struct anything_member, _asn_ctx), |
| 278 | asn_DEF_anything_member_tag2el, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 279 | 1, /* Count of tags in the map */ |
| 280 | 0, /* Start extensions */ |
| 281 | 2 /* Stop extensions */ |
| 282 | }; |
Lev Walkin | d04430c | 2004-09-07 06:44:29 +0000 | [diff] [blame] | 283 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 284 | asn_TYPE_descriptor_t asn_DEF_anything_member = { |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 285 | "", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 286 | "", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 287 | SEQUENCE_free, |
| 288 | SEQUENCE_print, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 289 | SEQUENCE_constraint, |
| 290 | SEQUENCE_decode_ber, |
| 291 | SEQUENCE_encode_der, |
Lev Walkin | 61b40d8 | 2004-10-23 15:07:45 +0000 | [diff] [blame] | 292 | SEQUENCE_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 293 | SEQUENCE_encode_xer, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 294 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 295 | asn_DEF_anything_member_tags, |
| 296 | sizeof(asn_DEF_anything_member_tags) |
| 297 | /sizeof(asn_DEF_anything_member_tags[0]), /* 1 */ |
| 298 | asn_DEF_anything_member_tags, /* Same as above */ |
| 299 | sizeof(asn_DEF_anything_member_tags) |
| 300 | /sizeof(asn_DEF_anything_member_tags[0]), /* 1 */ |
| 301 | asn_MBR_anything_member, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 302 | 1, /* Elements count */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 303 | &asn_DEF_anything_member_specs /* Additional specs */ |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 304 | }; |
| 305 | |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 306 | static asn_TYPE_member_t asn_MBR_anything[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 307 | { ATF_NOFLAGS, 0, 0, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 308 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 309 | .tag_mode = 0, |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 310 | .type = (void *)&asn_DEF_anything_member, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 311 | .memb_constraints = 0, /* Defer to actual type */ |
| 312 | .name = "" |
| 313 | }, |
| 314 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 315 | static ber_tlv_tag_t asn_DEF_anything_tags[] = { |
Lev Walkin | 2a8672e | 2004-10-03 09:14:49 +0000 | [diff] [blame] | 316 | (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
Lev Walkin | 188ed2c | 2004-09-13 08:31:01 +0000 | [diff] [blame] | 317 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 318 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 319 | static asn_SET_OF_specifics_t asn_DEF_anything_specs = { |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 320 | sizeof(struct anything), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 321 | offsetof(struct anything, _asn_ctx), |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 322 | 0, /* XER encoding is XMLDelimitedItemList */ |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 323 | }; |
Lev Walkin | d04430c | 2004-09-07 06:44:29 +0000 | [diff] [blame] | 324 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 325 | asn_TYPE_descriptor_t asn_DEF_anything = { |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 326 | "anything", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 327 | "anything", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 328 | SET_OF_free, |
| 329 | SET_OF_print, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 330 | SET_OF_constraint, |
| 331 | SET_OF_decode_ber, |
| 332 | SET_OF_encode_der, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 333 | 0, /* Not implemented yet */ |
| 334 | SET_OF_encode_xer, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 335 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 336 | asn_DEF_anything_tags, |
| 337 | sizeof(asn_DEF_anything_tags) |
| 338 | /sizeof(asn_DEF_anything_tags[0]) - 1, /* 1 */ |
| 339 | asn_DEF_anything_tags, /* Same as above */ |
| 340 | sizeof(asn_DEF_anything_tags) |
| 341 | /sizeof(asn_DEF_anything_tags[0]), /* 2 */ |
| 342 | asn_MBR_anything, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 343 | 1, /* Single element */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 344 | &asn_DEF_anything_specs /* Additional specs */ |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 345 | }; |
| 346 | |
Lev Walkin | 2a8672e | 2004-10-03 09:14:49 +0000 | [diff] [blame] | 347 | static asn_TYPE_member_t asn_MBR_other[] = { |
| 348 | { ATF_NOFLAGS, 0, offsetof(struct other, choice.a), |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 349 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 350 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
Lev Walkin | 2a8672e | 2004-10-03 09:14:49 +0000 | [diff] [blame] | 351 | .type = (void *)&asn_DEF_INTEGER, |
| 352 | .memb_constraints = 0, /* Defer to actual type */ |
| 353 | .name = "a" |
| 354 | }, |
| 355 | { ATF_NOFLAGS, 0, offsetof(struct other, choice.b), |
| 356 | .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
| 357 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 358 | .type = (void *)&asn_DEF_INTEGER, |
| 359 | .memb_constraints = 0, /* Defer to actual type */ |
| 360 | .name = "b" |
| 361 | }, |
| 362 | }; |
| 363 | static asn_TYPE_tag2member_t asn_DEF_other_tag2el[] = { |
| 364 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* a at 26 */ |
| 365 | { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 }, /* b at 28 */ |
| 366 | }; |
| 367 | static asn_CHOICE_specifics_t asn_DEF_other_specs = { |
| 368 | sizeof(struct other), |
| 369 | offsetof(struct other, _asn_ctx), |
| 370 | offsetof(struct other, present), |
| 371 | sizeof(((struct other *)0)->present), |
| 372 | asn_DEF_other_tag2el, |
| 373 | 2, /* Count of tags in the map */ |
| 374 | 0 /* Whether extensible */ |
| 375 | }; |
| 376 | static /* Use -fall-defs-global to expose */ |
| 377 | asn_TYPE_descriptor_t asn_DEF_other = { |
| 378 | "other", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 379 | "other", |
Lev Walkin | 2a8672e | 2004-10-03 09:14:49 +0000 | [diff] [blame] | 380 | CHOICE_free, |
| 381 | CHOICE_print, |
| 382 | CHOICE_constraint, |
| 383 | CHOICE_decode_ber, |
| 384 | CHOICE_encode_der, |
Lev Walkin | 61b40d8 | 2004-10-23 15:07:45 +0000 | [diff] [blame] | 385 | CHOICE_decode_xer, |
Lev Walkin | 2a8672e | 2004-10-03 09:14:49 +0000 | [diff] [blame] | 386 | CHOICE_encode_xer, |
| 387 | CHOICE_outmost_tag, |
| 388 | 0, /* No effective tags (pointer) */ |
| 389 | 0, /* No effective tags (count) */ |
| 390 | 0, /* No tags (pointer) */ |
| 391 | 0, /* No tags (count) */ |
| 392 | asn_MBR_other, |
| 393 | 2, /* Elements count */ |
| 394 | &asn_DEF_other_specs /* Additional specs */ |
| 395 | }; |
| 396 | |
| 397 | static asn_TYPE_member_t asn_MBR_Stuff[] = { |
| 398 | { ATF_POINTER, 3, offsetof(struct Stuff, trees), |
| 399 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 400 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 401 | .type = (void *)&asn_DEF_trees, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 402 | .memb_constraints = 0, /* Defer to actual type */ |
| 403 | .name = "trees" |
| 404 | }, |
Lev Walkin | 2a8672e | 2004-10-03 09:14:49 +0000 | [diff] [blame] | 405 | { ATF_POINTER, 2, offsetof(struct Stuff, anything), |
| 406 | .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 407 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 408 | .type = (void *)&asn_DEF_anything, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 409 | .memb_constraints = 0, /* Defer to actual type */ |
| 410 | .name = "anything" |
| 411 | }, |
Lev Walkin | 2a8672e | 2004-10-03 09:14:49 +0000 | [diff] [blame] | 412 | { ATF_POINTER, 0, offsetof(struct Stuff, other), |
| 413 | .tag = -1 /* Ambiguous tag (CHOICE?) */, |
| 414 | .tag_mode = 0, |
| 415 | .type = (void *)&asn_DEF_other, |
| 416 | .memb_constraints = 0, /* Defer to actual type */ |
| 417 | .name = "other" |
| 418 | }, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 419 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 420 | static ber_tlv_tag_t asn_DEF_Stuff_tags[] = { |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 421 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 422 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 423 | static asn_TYPE_tag2member_t asn_DEF_Stuff_tag2el[] = { |
Lev Walkin | 2a8672e | 2004-10-03 09:14:49 +0000 | [diff] [blame] | 424 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* a at 26 */ |
| 425 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* trees at 23 */ |
| 426 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* anything at 34 */ |
| 427 | { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* b at 28 */ |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 428 | }; |
Lev Walkin | 2a8672e | 2004-10-03 09:14:49 +0000 | [diff] [blame] | 429 | static asn_TYPE_tag2member_t asn_DEF_Stuff_tag2el_cxer[] = { |
| 430 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* trees at 23 */ |
| 431 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* anything at 34 */ |
| 432 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* a at 26 */ |
| 433 | }; |
| 434 | static uint8_t asn_DEF_Stuff_mmap[(3 + (8 * sizeof(unsigned int)) - 1) / 8] = { |
| 435 | (0 << 7) | (0 << 6) | (0 << 5) |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 436 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 437 | static asn_SET_specifics_t asn_DEF_Stuff_specs = { |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 438 | sizeof(struct Stuff), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 439 | offsetof(struct Stuff, _asn_ctx), |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 440 | offsetof(struct Stuff, _presence_map), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 441 | asn_DEF_Stuff_tag2el, |
Lev Walkin | 2a8672e | 2004-10-03 09:14:49 +0000 | [diff] [blame] | 442 | 4, /* Count of tags in the map */ |
| 443 | asn_DEF_Stuff_tag2el_cxer, |
| 444 | 3, /* Count of tags in the CANONICAL-XER map */ |
| 445 | 1, /* Whether extensible */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 446 | (unsigned int *)asn_DEF_Stuff_mmap /* Mandatory elements map */ |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 447 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 448 | asn_TYPE_descriptor_t asn_DEF_Stuff = { |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 449 | "Stuff", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 450 | "Stuff", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 451 | SET_free, |
| 452 | SET_print, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 453 | SET_constraint, |
| 454 | SET_decode_ber, |
| 455 | SET_encode_der, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 456 | 0, /* Not implemented yet */ |
| 457 | SET_encode_xer, |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 458 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 459 | asn_DEF_Stuff_tags, |
| 460 | sizeof(asn_DEF_Stuff_tags) |
| 461 | /sizeof(asn_DEF_Stuff_tags[0]), /* 1 */ |
| 462 | asn_DEF_Stuff_tags, /* Same as above */ |
| 463 | sizeof(asn_DEF_Stuff_tags) |
| 464 | /sizeof(asn_DEF_Stuff_tags[0]), /* 1 */ |
| 465 | asn_MBR_Stuff, |
Lev Walkin | 2a8672e | 2004-10-03 09:14:49 +0000 | [diff] [blame] | 466 | 3, /* Elements count */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 467 | &asn_DEF_Stuff_specs /* Additional specs */ |
Lev Walkin | 03ba3e9 | 2004-08-22 03:18:17 +0000 | [diff] [blame] | 468 | }; |
| 469 | |