vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [Type] >>> ***/ |
| 3 | |
| 4 | #include <asn_SET_OF.h> |
| 5 | #include <Type1.h> |
| 6 | #include <Type2.h> |
| 7 | #include <constr_SEQUENCE.h> |
| 8 | #include <constr_SET_OF.h> |
| 9 | |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 10 | /*** <<< TYPE-DECLS [Type] >>> ***/ |
| 11 | |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 12 | typedef struct Type { |
| 13 | A_SET_OF(struct Member { |
| 14 | Type1_t t1; |
| 15 | Type2_t t2; |
| 16 | |
| 17 | /* Context for parsing across buffer boundaries */ |
| 18 | asn_struct_ctx_t _asn_ctx; |
| 19 | } ) list; |
| 20 | |
| 21 | /* Context for parsing across buffer boundaries */ |
| 22 | asn_struct_ctx_t _asn_ctx; |
| 23 | } Type_t; |
| 24 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 25 | /*** <<< FUNC-DECLS [Type] >>> ***/ |
| 26 | |
| 27 | extern asn_TYPE_descriptor_t asn_DEF_Type; |
| 28 | |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 29 | /*** <<< STAT-DEFS [Type] >>> ***/ |
| 30 | |
| 31 | static asn_TYPE_member_t asn_MBR_Member_2[] = { |
| 32 | { ATF_NOFLAGS, 0, offsetof(struct Member, t1), |
| 33 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 34 | .tag_mode = 0, |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 35 | .type = &asn_DEF_Type1, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 36 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 37 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 38 | .default_value = 0, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 39 | .name = "t1" |
| 40 | }, |
| 41 | { ATF_NOFLAGS, 0, offsetof(struct Member, t2), |
| 42 | .tag = -1 /* Ambiguous tag (CHOICE?) */, |
| 43 | .tag_mode = 0, |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 44 | .type = &asn_DEF_Type2, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 45 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 46 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 47 | .default_value = 0, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 48 | .name = "t2" |
| 49 | }, |
| 50 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 51 | static ber_tlv_tag_t asn_DEF_Member_tags_2[] = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 52 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 53 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 54 | static asn_TYPE_tag2member_t asn_MAP_Member_tag2el_2[] = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 55 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* t1 at 21 */ |
| 56 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 }, /* one-name at 37 */ |
| 57 | { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 1, 0, 0 } /* two-name at 43 */ |
| 58 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 59 | static asn_SEQUENCE_specifics_t asn_SPC_Member_specs_2 = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 60 | sizeof(struct Member), |
| 61 | offsetof(struct Member, _asn_ctx), |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 62 | asn_MAP_Member_tag2el_2, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 63 | 3, /* Count of tags in the map */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 64 | 0, 0, 0, /* Optional elements (not needed) */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 65 | -1, /* Start extensions */ |
| 66 | -1 /* Stop extensions */ |
| 67 | }; |
| 68 | static /* Use -fall-defs-global to expose */ |
| 69 | asn_TYPE_descriptor_t asn_DEF_Member_2 = { |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 70 | "SEQUENCE", |
| 71 | "SEQUENCE", |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 72 | SEQUENCE_free, |
| 73 | SEQUENCE_print, |
| 74 | SEQUENCE_constraint, |
| 75 | SEQUENCE_decode_ber, |
| 76 | SEQUENCE_encode_der, |
| 77 | SEQUENCE_decode_xer, |
| 78 | SEQUENCE_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 79 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 80 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 81 | asn_DEF_Member_tags_2, |
| 82 | sizeof(asn_DEF_Member_tags_2) |
| 83 | /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */ |
| 84 | asn_DEF_Member_tags_2, /* Same as above */ |
| 85 | sizeof(asn_DEF_Member_tags_2) |
| 86 | /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */ |
| 87 | 0, /* No PER visible constraints */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 88 | asn_MBR_Member_2, |
| 89 | 2, /* Elements count */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 90 | &asn_SPC_Member_specs_2 /* Additional specs */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 91 | }; |
| 92 | |
| 93 | static asn_TYPE_member_t asn_MBR_Type_1[] = { |
vlm | 2cebdf3 | 2005-08-16 16:57:17 +0000 | [diff] [blame] | 94 | { ATF_POINTER, 0, 0, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 95 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 96 | .tag_mode = 0, |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 97 | .type = &asn_DEF_Member_2, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 98 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 99 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 100 | .default_value = 0, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 101 | .name = "" |
| 102 | }, |
| 103 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 104 | static ber_tlv_tag_t asn_DEF_Type_tags_1[] = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 105 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 106 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 107 | static asn_SET_OF_specifics_t asn_SPC_Type_specs_1 = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 108 | sizeof(struct Type), |
| 109 | offsetof(struct Type, _asn_ctx), |
| 110 | 0, /* XER encoding is XMLDelimitedItemList */ |
| 111 | }; |
| 112 | asn_TYPE_descriptor_t asn_DEF_Type = { |
| 113 | "Type", |
| 114 | "Type", |
| 115 | SET_OF_free, |
| 116 | SET_OF_print, |
| 117 | SET_OF_constraint, |
| 118 | SET_OF_decode_ber, |
| 119 | SET_OF_encode_der, |
| 120 | SET_OF_decode_xer, |
| 121 | SET_OF_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 122 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 123 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 124 | asn_DEF_Type_tags_1, |
| 125 | sizeof(asn_DEF_Type_tags_1) |
| 126 | /sizeof(asn_DEF_Type_tags_1[0]), /* 1 */ |
| 127 | asn_DEF_Type_tags_1, /* Same as above */ |
| 128 | sizeof(asn_DEF_Type_tags_1) |
| 129 | /sizeof(asn_DEF_Type_tags_1[0]), /* 1 */ |
| 130 | 0, /* No PER visible constraints */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 131 | asn_MBR_Type_1, |
| 132 | 1, /* Single element */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 133 | &asn_SPC_Type_specs_1 /* Additional specs */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 134 | }; |
| 135 | |
| 136 | |
| 137 | /*** <<< INCLUDES [Type1] >>> ***/ |
| 138 | |
| 139 | #include <INTEGER.h> |
| 140 | #include <constr_SEQUENCE.h> |
| 141 | #include <constr_CHOICE.h> |
| 142 | |
| 143 | /*** <<< DEPS [Type1] >>> ***/ |
| 144 | |
| 145 | typedef enum one_name_PR { |
| 146 | one_name_PR_NOTHING, /* No components present */ |
| 147 | one_name_PR_another_name, |
| 148 | } one_name_PR; |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 149 | |
| 150 | /*** <<< TYPE-DECLS [Type1] >>> ***/ |
| 151 | |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 152 | typedef struct Type1 { |
| 153 | struct one_name { |
| 154 | one_name_PR present; |
vlm | 2e77428 | 2005-08-14 15:03:31 +0000 | [diff] [blame] | 155 | union Type1__one_name_u { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 156 | struct another_name { |
| 157 | INTEGER_t a; |
| 158 | INTEGER_t b; |
| 159 | |
| 160 | /* Context for parsing across buffer boundaries */ |
| 161 | asn_struct_ctx_t _asn_ctx; |
| 162 | } another_name; |
| 163 | } choice; |
| 164 | |
| 165 | /* Context for parsing across buffer boundaries */ |
| 166 | asn_struct_ctx_t _asn_ctx; |
| 167 | } one_name; |
| 168 | |
| 169 | /* Context for parsing across buffer boundaries */ |
| 170 | asn_struct_ctx_t _asn_ctx; |
| 171 | } Type1_t; |
| 172 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 173 | /*** <<< FUNC-DECLS [Type1] >>> ***/ |
| 174 | |
| 175 | extern asn_TYPE_descriptor_t asn_DEF_Type1; |
| 176 | |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 177 | /*** <<< STAT-DEFS [Type1] >>> ***/ |
| 178 | |
| 179 | static asn_TYPE_member_t asn_MBR_another_name_3[] = { |
| 180 | { ATF_NOFLAGS, 0, offsetof(struct another_name, a), |
| 181 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 182 | .tag_mode = 0, |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 183 | .type = &asn_DEF_INTEGER, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 184 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 185 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 186 | .default_value = 0, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 187 | .name = "a" |
| 188 | }, |
| 189 | { ATF_NOFLAGS, 0, offsetof(struct another_name, b), |
| 190 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 191 | .tag_mode = 0, |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 192 | .type = &asn_DEF_INTEGER, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 193 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 194 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 195 | .default_value = 0, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 196 | .name = "b" |
| 197 | }, |
| 198 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 199 | static ber_tlv_tag_t asn_DEF_another_name_tags_3[] = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 200 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 201 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 202 | static asn_TYPE_tag2member_t asn_MAP_another_name_tag2el_3[] = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 203 | { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* a at 27 */ |
| 204 | { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* b at 27 */ |
| 205 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 206 | static asn_SEQUENCE_specifics_t asn_SPC_another_name_specs_3 = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 207 | sizeof(struct another_name), |
| 208 | offsetof(struct another_name, _asn_ctx), |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 209 | asn_MAP_another_name_tag2el_3, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 210 | 2, /* Count of tags in the map */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 211 | 0, 0, 0, /* Optional elements (not needed) */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 212 | -1, /* Start extensions */ |
| 213 | -1 /* Stop extensions */ |
| 214 | }; |
| 215 | static /* Use -fall-defs-global to expose */ |
| 216 | asn_TYPE_descriptor_t asn_DEF_another_name_3 = { |
| 217 | "another-name", |
| 218 | "another-name", |
| 219 | SEQUENCE_free, |
| 220 | SEQUENCE_print, |
| 221 | SEQUENCE_constraint, |
| 222 | SEQUENCE_decode_ber, |
| 223 | SEQUENCE_encode_der, |
| 224 | SEQUENCE_decode_xer, |
| 225 | SEQUENCE_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 226 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 227 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 228 | asn_DEF_another_name_tags_3, |
| 229 | sizeof(asn_DEF_another_name_tags_3) |
| 230 | /sizeof(asn_DEF_another_name_tags_3[0]), /* 1 */ |
| 231 | asn_DEF_another_name_tags_3, /* Same as above */ |
| 232 | sizeof(asn_DEF_another_name_tags_3) |
| 233 | /sizeof(asn_DEF_another_name_tags_3[0]), /* 1 */ |
| 234 | 0, /* No PER visible constraints */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 235 | asn_MBR_another_name_3, |
| 236 | 2, /* Elements count */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 237 | &asn_SPC_another_name_specs_3 /* Additional specs */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 238 | }; |
| 239 | |
| 240 | static asn_TYPE_member_t asn_MBR_one_name_2[] = { |
| 241 | { ATF_NOFLAGS, 0, offsetof(struct one_name, choice.another_name), |
| 242 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 243 | .tag_mode = 0, |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 244 | .type = &asn_DEF_another_name_3, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 245 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 246 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 247 | .default_value = 0, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 248 | .name = "another-name" |
| 249 | }, |
| 250 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 251 | static asn_TYPE_tag2member_t asn_MAP_one_name_tag2el_2[] = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 252 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name at 27 */ |
| 253 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 254 | static asn_CHOICE_specifics_t asn_SPC_one_name_specs_2 = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 255 | sizeof(struct one_name), |
| 256 | offsetof(struct one_name, _asn_ctx), |
| 257 | offsetof(struct one_name, present), |
| 258 | sizeof(((struct one_name *)0)->present), |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 259 | asn_MAP_one_name_tag2el_2, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 260 | 1, /* Count of tags in the map */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 261 | .canonical_order = 0, |
| 262 | .ext_start = -1 /* Extensions start */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 263 | }; |
| 264 | static /* Use -fall-defs-global to expose */ |
| 265 | asn_TYPE_descriptor_t asn_DEF_one_name_2 = { |
| 266 | "one-name", |
| 267 | "one-name", |
| 268 | CHOICE_free, |
| 269 | CHOICE_print, |
| 270 | CHOICE_constraint, |
| 271 | CHOICE_decode_ber, |
| 272 | CHOICE_encode_der, |
| 273 | CHOICE_decode_xer, |
| 274 | CHOICE_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 275 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 276 | CHOICE_outmost_tag, |
| 277 | 0, /* No effective tags (pointer) */ |
| 278 | 0, /* No effective tags (count) */ |
| 279 | 0, /* No tags (pointer) */ |
| 280 | 0, /* No tags (count) */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 281 | 0, /* No PER visible constraints */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 282 | asn_MBR_one_name_2, |
| 283 | 1, /* Elements count */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 284 | &asn_SPC_one_name_specs_2 /* Additional specs */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 285 | }; |
| 286 | |
| 287 | static asn_TYPE_member_t asn_MBR_Type1_1[] = { |
| 288 | { ATF_NOFLAGS, 0, offsetof(struct Type1, one_name), |
| 289 | .tag = -1 /* Ambiguous tag (CHOICE?) */, |
| 290 | .tag_mode = 0, |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 291 | .type = &asn_DEF_one_name_2, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 292 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 293 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 294 | .default_value = 0, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 295 | .name = "one-name" |
| 296 | }, |
| 297 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 298 | static ber_tlv_tag_t asn_DEF_Type1_tags_1[] = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 299 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 300 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 301 | static asn_TYPE_tag2member_t asn_MAP_Type1_tag2el_1[] = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 302 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name at 27 */ |
| 303 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 304 | static asn_SEQUENCE_specifics_t asn_SPC_Type1_specs_1 = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 305 | sizeof(struct Type1), |
| 306 | offsetof(struct Type1, _asn_ctx), |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 307 | asn_MAP_Type1_tag2el_1, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 308 | 1, /* Count of tags in the map */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 309 | 0, 0, 0, /* Optional elements (not needed) */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 310 | -1, /* Start extensions */ |
| 311 | -1 /* Stop extensions */ |
| 312 | }; |
| 313 | asn_TYPE_descriptor_t asn_DEF_Type1 = { |
| 314 | "Type1", |
| 315 | "Type1", |
| 316 | SEQUENCE_free, |
| 317 | SEQUENCE_print, |
| 318 | SEQUENCE_constraint, |
| 319 | SEQUENCE_decode_ber, |
| 320 | SEQUENCE_encode_der, |
| 321 | SEQUENCE_decode_xer, |
| 322 | SEQUENCE_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 323 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 324 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 325 | asn_DEF_Type1_tags_1, |
| 326 | sizeof(asn_DEF_Type1_tags_1) |
| 327 | /sizeof(asn_DEF_Type1_tags_1[0]), /* 1 */ |
| 328 | asn_DEF_Type1_tags_1, /* Same as above */ |
| 329 | sizeof(asn_DEF_Type1_tags_1) |
| 330 | /sizeof(asn_DEF_Type1_tags_1[0]), /* 1 */ |
| 331 | 0, /* No PER visible constraints */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 332 | asn_MBR_Type1_1, |
| 333 | 1, /* Elements count */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 334 | &asn_SPC_Type1_specs_1 /* Additional specs */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 335 | }; |
| 336 | |
| 337 | |
| 338 | /*** <<< INCLUDES [Type2] >>> ***/ |
| 339 | |
| 340 | #include <BIT_STRING.h> |
| 341 | #include <INTEGER.h> |
| 342 | #include <constr_SEQUENCE.h> |
| 343 | #include <constr_SET.h> |
| 344 | #include <constr_CHOICE.h> |
| 345 | |
| 346 | /*** <<< DEPS [Type2] >>> ***/ |
| 347 | |
| 348 | typedef enum Type2_PR { |
| 349 | Type2_PR_NOTHING, /* No components present */ |
| 350 | Type2_PR_one_name, |
| 351 | Type2_PR_two_name, |
| 352 | } Type2_PR; |
vlm | 96853d8 | 2005-08-13 23:51:47 +0000 | [diff] [blame] | 353 | typedef enum a { |
| 354 | a_one = 0 |
vlm | 7c8aa5e | 2006-03-21 07:25:18 +0000 | [diff] [blame] | 355 | } e_a; |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 356 | |
| 357 | /* |
| 358 | * Method of determining the components presence |
| 359 | */ |
| 360 | typedef enum two_name_PR { |
| 361 | two_name_PR_another_name, /* Member another_name is present */ |
| 362 | } two_name_PR; |
vlm | 96853d8 | 2005-08-13 23:51:47 +0000 | [diff] [blame] | 363 | typedef enum a { |
| 364 | a_one = 0 |
vlm | 7c8aa5e | 2006-03-21 07:25:18 +0000 | [diff] [blame] | 365 | } e_a; |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 366 | |
| 367 | /*** <<< TYPE-DECLS [Type2] >>> ***/ |
| 368 | |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 369 | typedef struct Type2 { |
| 370 | Type2_PR present; |
vlm | 2e77428 | 2005-08-14 15:03:31 +0000 | [diff] [blame] | 371 | union Type2_u { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 372 | struct one_name { |
| 373 | struct another_name { |
| 374 | BIT_STRING_t a; |
| 375 | INTEGER_t b; |
| 376 | |
| 377 | /* Context for parsing across buffer boundaries */ |
| 378 | asn_struct_ctx_t _asn_ctx; |
| 379 | } another_name; |
| 380 | |
| 381 | /* Context for parsing across buffer boundaries */ |
| 382 | asn_struct_ctx_t _asn_ctx; |
| 383 | } one_name; |
| 384 | struct two_name { |
| 385 | struct another_name { |
| 386 | BIT_STRING_t a; |
| 387 | INTEGER_t b; |
| 388 | |
| 389 | /* Context for parsing across buffer boundaries */ |
| 390 | asn_struct_ctx_t _asn_ctx; |
| 391 | } another_name; |
| 392 | |
| 393 | /* Presence bitmask: ASN_SET_ISPRESENT(ptwo_name, two_name_PR_x) */ |
| 394 | unsigned int _presence_map |
| 395 | [((1+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))]; |
| 396 | |
| 397 | /* Context for parsing across buffer boundaries */ |
| 398 | asn_struct_ctx_t _asn_ctx; |
| 399 | } two_name; |
| 400 | } choice; |
| 401 | |
| 402 | /* Context for parsing across buffer boundaries */ |
| 403 | asn_struct_ctx_t _asn_ctx; |
| 404 | } Type2_t; |
| 405 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 406 | /*** <<< FUNC-DECLS [Type2] >>> ***/ |
| 407 | |
| 408 | extern asn_TYPE_descriptor_t asn_DEF_Type2; |
| 409 | |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 410 | /*** <<< CODE [Type2] >>> ***/ |
| 411 | |
| 412 | static int |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 413 | memb_a_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 414 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 415 | const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; |
| 416 | size_t size; |
| 417 | |
| 418 | if(!sptr) { |
| 419 | _ASN_ERRLOG(app_errlog, app_key, |
| 420 | "%s: value not given (%s:%d)", |
| 421 | td->name, __FILE__, __LINE__); |
| 422 | return -1; |
| 423 | } |
| 424 | |
| 425 | if(st->size > 0) { |
| 426 | /* Size in bits */ |
| 427 | size = 8 * (st->size - 1) - (st->buf[0] & 0x7); |
| 428 | } else { |
| 429 | size = 0; |
| 430 | } |
| 431 | |
| 432 | if((size == 2)) { |
| 433 | /* Constraint check succeeded */ |
| 434 | return 0; |
| 435 | } else { |
| 436 | _ASN_ERRLOG(app_errlog, app_key, |
| 437 | "%s: constraint failed (%s:%d)", |
| 438 | td->name, __FILE__, __LINE__); |
| 439 | return -1; |
| 440 | } |
| 441 | } |
| 442 | |
| 443 | static int |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 444 | memb_a_constraint_8(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 445 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 446 | const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; |
| 447 | size_t size; |
| 448 | |
| 449 | if(!sptr) { |
| 450 | _ASN_ERRLOG(app_errlog, app_key, |
| 451 | "%s: value not given (%s:%d)", |
| 452 | td->name, __FILE__, __LINE__); |
| 453 | return -1; |
| 454 | } |
| 455 | |
| 456 | if(st->size > 0) { |
| 457 | /* Size in bits */ |
| 458 | size = 8 * (st->size - 1) - (st->buf[0] & 0x7); |
| 459 | } else { |
| 460 | size = 0; |
| 461 | } |
| 462 | |
| 463 | if((size == 2)) { |
| 464 | /* Constraint check succeeded */ |
| 465 | return 0; |
| 466 | } else { |
| 467 | _ASN_ERRLOG(app_errlog, app_key, |
| 468 | "%s: constraint failed (%s:%d)", |
| 469 | td->name, __FILE__, __LINE__); |
| 470 | return -1; |
| 471 | } |
| 472 | } |
| 473 | |
| 474 | |
| 475 | /*** <<< STAT-DEFS [Type2] >>> ***/ |
| 476 | |
| 477 | static asn_TYPE_member_t asn_MBR_another_name_3[] = { |
| 478 | { ATF_NOFLAGS, 0, offsetof(struct another_name, a), |
| 479 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), |
| 480 | .tag_mode = 0, |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 481 | .type = &asn_DEF_BIT_STRING, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 482 | .memb_constraints = memb_a_constraint_3, |
| 483 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 484 | .default_value = 0, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 485 | .name = "a" |
| 486 | }, |
| 487 | { ATF_NOFLAGS, 0, offsetof(struct another_name, b), |
| 488 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 489 | .tag_mode = 0, |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 490 | .type = &asn_DEF_INTEGER, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 491 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 492 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 493 | .default_value = 0, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 494 | .name = "b" |
| 495 | }, |
| 496 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 497 | static ber_tlv_tag_t asn_DEF_another_name_tags_3[] = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 498 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 499 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 500 | static asn_TYPE_tag2member_t asn_MAP_another_name_tag2el_3[] = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 501 | { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* b at 36 */ |
| 502 | { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 0 } /* a at 34 */ |
| 503 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 504 | static asn_SEQUENCE_specifics_t asn_SPC_another_name_specs_3 = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 505 | sizeof(struct another_name), |
| 506 | offsetof(struct another_name, _asn_ctx), |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 507 | asn_MAP_another_name_tag2el_3, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 508 | 2, /* Count of tags in the map */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 509 | 0, 0, 0, /* Optional elements (not needed) */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 510 | -1, /* Start extensions */ |
| 511 | -1 /* Stop extensions */ |
| 512 | }; |
| 513 | static /* Use -fall-defs-global to expose */ |
| 514 | asn_TYPE_descriptor_t asn_DEF_another_name_3 = { |
| 515 | "another-name", |
| 516 | "another-name", |
| 517 | SEQUENCE_free, |
| 518 | SEQUENCE_print, |
| 519 | SEQUENCE_constraint, |
| 520 | SEQUENCE_decode_ber, |
| 521 | SEQUENCE_encode_der, |
| 522 | SEQUENCE_decode_xer, |
| 523 | SEQUENCE_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 524 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 525 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 526 | asn_DEF_another_name_tags_3, |
| 527 | sizeof(asn_DEF_another_name_tags_3) |
| 528 | /sizeof(asn_DEF_another_name_tags_3[0]), /* 1 */ |
| 529 | asn_DEF_another_name_tags_3, /* Same as above */ |
| 530 | sizeof(asn_DEF_another_name_tags_3) |
| 531 | /sizeof(asn_DEF_another_name_tags_3[0]), /* 1 */ |
| 532 | 0, /* No PER visible constraints */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 533 | asn_MBR_another_name_3, |
| 534 | 2, /* Elements count */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 535 | &asn_SPC_another_name_specs_3 /* Additional specs */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 536 | }; |
| 537 | |
| 538 | static asn_TYPE_member_t asn_MBR_one_name_2[] = { |
| 539 | { ATF_NOFLAGS, 0, offsetof(struct one_name, another_name), |
| 540 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 541 | .tag_mode = 0, |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 542 | .type = &asn_DEF_another_name_3, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 543 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 544 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 545 | .default_value = 0, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 546 | .name = "another-name" |
| 547 | }, |
| 548 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 549 | static ber_tlv_tag_t asn_DEF_one_name_tags_2[] = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 550 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 551 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 552 | static asn_TYPE_tag2member_t asn_MAP_one_name_tag2el_2[] = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 553 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name at 34 */ |
| 554 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 555 | static asn_SEQUENCE_specifics_t asn_SPC_one_name_specs_2 = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 556 | sizeof(struct one_name), |
| 557 | offsetof(struct one_name, _asn_ctx), |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 558 | asn_MAP_one_name_tag2el_2, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 559 | 1, /* Count of tags in the map */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 560 | 0, 0, 0, /* Optional elements (not needed) */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 561 | -1, /* Start extensions */ |
| 562 | -1 /* Stop extensions */ |
| 563 | }; |
| 564 | static /* Use -fall-defs-global to expose */ |
| 565 | asn_TYPE_descriptor_t asn_DEF_one_name_2 = { |
| 566 | "one-name", |
| 567 | "one-name", |
| 568 | SEQUENCE_free, |
| 569 | SEQUENCE_print, |
| 570 | SEQUENCE_constraint, |
| 571 | SEQUENCE_decode_ber, |
| 572 | SEQUENCE_encode_der, |
| 573 | SEQUENCE_decode_xer, |
| 574 | SEQUENCE_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 575 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 576 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 577 | asn_DEF_one_name_tags_2, |
| 578 | sizeof(asn_DEF_one_name_tags_2) |
| 579 | /sizeof(asn_DEF_one_name_tags_2[0]), /* 1 */ |
| 580 | asn_DEF_one_name_tags_2, /* Same as above */ |
| 581 | sizeof(asn_DEF_one_name_tags_2) |
| 582 | /sizeof(asn_DEF_one_name_tags_2[0]), /* 1 */ |
| 583 | 0, /* No PER visible constraints */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 584 | asn_MBR_one_name_2, |
| 585 | 1, /* Elements count */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 586 | &asn_SPC_one_name_specs_2 /* Additional specs */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 587 | }; |
| 588 | |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 589 | static asn_TYPE_member_t asn_MBR_another_name_8[] = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 590 | { ATF_NOFLAGS, 0, offsetof(struct another_name, a), |
| 591 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), |
| 592 | .tag_mode = 0, |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 593 | .type = &asn_DEF_BIT_STRING, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 594 | .memb_constraints = memb_a_constraint_8, |
| 595 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 596 | .default_value = 0, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 597 | .name = "a" |
| 598 | }, |
| 599 | { ATF_NOFLAGS, 0, offsetof(struct another_name, b), |
| 600 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 601 | .tag_mode = 0, |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 602 | .type = &asn_DEF_INTEGER, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 603 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 604 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 605 | .default_value = 0, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 606 | .name = "b" |
| 607 | }, |
| 608 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 609 | static ber_tlv_tag_t asn_DEF_another_name_tags_8[] = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 610 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 611 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 612 | static asn_TYPE_tag2member_t asn_MAP_another_name_tag2el_8[] = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 613 | { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* b at 42 */ |
| 614 | { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 0 } /* a at 40 */ |
| 615 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 616 | static asn_SEQUENCE_specifics_t asn_SPC_another_name_specs_8 = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 617 | sizeof(struct another_name), |
| 618 | offsetof(struct another_name, _asn_ctx), |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 619 | asn_MAP_another_name_tag2el_8, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 620 | 2, /* Count of tags in the map */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 621 | 0, 0, 0, /* Optional elements (not needed) */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 622 | -1, /* Start extensions */ |
| 623 | -1 /* Stop extensions */ |
| 624 | }; |
| 625 | static /* Use -fall-defs-global to expose */ |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 626 | asn_TYPE_descriptor_t asn_DEF_another_name_8 = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 627 | "another-name", |
| 628 | "another-name", |
| 629 | SEQUENCE_free, |
| 630 | SEQUENCE_print, |
| 631 | SEQUENCE_constraint, |
| 632 | SEQUENCE_decode_ber, |
| 633 | SEQUENCE_encode_der, |
| 634 | SEQUENCE_decode_xer, |
| 635 | SEQUENCE_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 636 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 637 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 638 | asn_DEF_another_name_tags_8, |
| 639 | sizeof(asn_DEF_another_name_tags_8) |
| 640 | /sizeof(asn_DEF_another_name_tags_8[0]), /* 1 */ |
| 641 | asn_DEF_another_name_tags_8, /* Same as above */ |
| 642 | sizeof(asn_DEF_another_name_tags_8) |
| 643 | /sizeof(asn_DEF_another_name_tags_8[0]), /* 1 */ |
| 644 | 0, /* No PER visible constraints */ |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 645 | asn_MBR_another_name_8, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 646 | 2, /* Elements count */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 647 | &asn_SPC_another_name_specs_8 /* Additional specs */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 648 | }; |
| 649 | |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 650 | static asn_TYPE_member_t asn_MBR_two_name_7[] = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 651 | { ATF_NOFLAGS, 0, offsetof(struct two_name, another_name), |
| 652 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 653 | .tag_mode = 0, |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 654 | .type = &asn_DEF_another_name_8, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 655 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 656 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 657 | .default_value = 0, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 658 | .name = "another-name" |
| 659 | }, |
| 660 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 661 | static ber_tlv_tag_t asn_DEF_two_name_tags_7[] = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 662 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 663 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 664 | static asn_TYPE_tag2member_t asn_MAP_two_name_tag2el_7[] = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 665 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name at 40 */ |
| 666 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 667 | static uint8_t asn_MAP_two_name_mmap_7[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 668 | (1 << 7) |
| 669 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 670 | static asn_SET_specifics_t asn_SPC_two_name_specs_7 = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 671 | sizeof(struct two_name), |
| 672 | offsetof(struct two_name, _asn_ctx), |
| 673 | offsetof(struct two_name, _presence_map), |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 674 | asn_MAP_two_name_tag2el_7, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 675 | 1, /* Count of tags in the map */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 676 | asn_MAP_two_name_tag2el_7, /* Same as above */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 677 | 1, /* Count of tags in the CXER map */ |
| 678 | 0, /* Whether extensible */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 679 | (unsigned int *)asn_MAP_two_name_mmap_7 /* Mandatory elements map */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 680 | }; |
| 681 | static /* Use -fall-defs-global to expose */ |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 682 | asn_TYPE_descriptor_t asn_DEF_two_name_7 = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 683 | "two-name", |
| 684 | "two-name", |
| 685 | SET_free, |
| 686 | SET_print, |
| 687 | SET_constraint, |
| 688 | SET_decode_ber, |
| 689 | SET_encode_der, |
| 690 | SET_decode_xer, |
| 691 | SET_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 692 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 693 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 694 | asn_DEF_two_name_tags_7, |
| 695 | sizeof(asn_DEF_two_name_tags_7) |
| 696 | /sizeof(asn_DEF_two_name_tags_7[0]), /* 1 */ |
| 697 | asn_DEF_two_name_tags_7, /* Same as above */ |
| 698 | sizeof(asn_DEF_two_name_tags_7) |
| 699 | /sizeof(asn_DEF_two_name_tags_7[0]), /* 1 */ |
| 700 | 0, /* No PER visible constraints */ |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 701 | asn_MBR_two_name_7, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 702 | 1, /* Elements count */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 703 | &asn_SPC_two_name_specs_7 /* Additional specs */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 704 | }; |
| 705 | |
| 706 | static asn_TYPE_member_t asn_MBR_Type2_1[] = { |
| 707 | { ATF_NOFLAGS, 0, offsetof(struct Type2, choice.one_name), |
| 708 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 709 | .tag_mode = 0, |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 710 | .type = &asn_DEF_one_name_2, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 711 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 712 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 713 | .default_value = 0, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 714 | .name = "one-name" |
| 715 | }, |
| 716 | { ATF_NOFLAGS, 0, offsetof(struct Type2, choice.two_name), |
| 717 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), |
| 718 | .tag_mode = 0, |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 719 | .type = &asn_DEF_two_name_7, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 720 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 721 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 722 | .default_value = 0, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 723 | .name = "two-name" |
| 724 | }, |
| 725 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 726 | static asn_TYPE_tag2member_t asn_MAP_Type2_tag2el_1[] = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 727 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* one-name at 37 */ |
| 728 | { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 1, 0, 0 } /* two-name at 43 */ |
| 729 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 730 | static asn_CHOICE_specifics_t asn_SPC_Type2_specs_1 = { |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 731 | sizeof(struct Type2), |
| 732 | offsetof(struct Type2, _asn_ctx), |
| 733 | offsetof(struct Type2, present), |
| 734 | sizeof(((struct Type2 *)0)->present), |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 735 | asn_MAP_Type2_tag2el_1, |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 736 | 2, /* Count of tags in the map */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 737 | .canonical_order = 0, |
| 738 | .ext_start = -1 /* Extensions start */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 739 | }; |
| 740 | asn_TYPE_descriptor_t asn_DEF_Type2 = { |
| 741 | "Type2", |
| 742 | "Type2", |
| 743 | CHOICE_free, |
| 744 | CHOICE_print, |
| 745 | CHOICE_constraint, |
| 746 | CHOICE_decode_ber, |
| 747 | CHOICE_encode_der, |
| 748 | CHOICE_decode_xer, |
| 749 | CHOICE_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 750 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 751 | CHOICE_outmost_tag, |
| 752 | 0, /* No effective tags (pointer) */ |
| 753 | 0, /* No effective tags (count) */ |
| 754 | 0, /* No tags (pointer) */ |
| 755 | 0, /* No tags (count) */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 756 | 0, /* No PER visible constraints */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 757 | asn_MBR_Type2_1, |
| 758 | 2, /* Elements count */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 759 | &asn_SPC_Type2_specs_1 /* Additional specs */ |
vlm | 37236de | 2005-03-04 09:10:19 +0000 | [diff] [blame] | 760 | }; |
| 761 | |