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