vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [T1] >>> ***/ |
| 3 | |
| 4 | #include <INTEGER.h> |
| 5 | #include <ANY.h> |
| 6 | #include <constr_SEQUENCE.h> |
| 7 | |
| 8 | /*** <<< DEPS [T1] >>> ***/ |
| 9 | |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 10 | extern asn_TYPE_descriptor_t asn_DEF_T1; |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 11 | |
| 12 | /*** <<< TYPE-DECLS [T1] >>> ***/ |
| 13 | |
| 14 | |
| 15 | typedef struct T1 { |
| 16 | INTEGER_t i; |
| 17 | ANY_t any; |
| 18 | |
| 19 | /* Context for parsing across buffer boundaries */ |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 20 | asn_struct_ctx_t _asn_ctx; |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 21 | } T1_t; |
| 22 | |
| 23 | /*** <<< STAT-DEFS [T1] >>> ***/ |
| 24 | |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 25 | static asn_TYPE_member_t asn_MBR_T1[] = { |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 26 | { ATF_NOFLAGS, 0, offsetof(struct T1, i), |
| 27 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 28 | .tag_mode = 0, |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 29 | .type = (void *)&asn_DEF_INTEGER, |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 30 | .memb_constraints = 0, /* Defer to actual type */ |
| 31 | .name = "i" |
| 32 | }, |
| 33 | { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct T1, any), |
| 34 | .tag = -1 /* Ambiguous tag (ANY?) */, |
| 35 | .tag_mode = 0, |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 36 | .type = (void *)&asn_DEF_ANY, |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 37 | .memb_constraints = 0, /* Defer to actual type */ |
| 38 | .name = "any" |
| 39 | }, |
| 40 | }; |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 41 | static ber_tlv_tag_t asn_DEF_T1_tags[] = { |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 42 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 43 | }; |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 44 | static asn_TYPE_tag2member_t asn_DEF_T1_tag2el[] = { |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 45 | { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 15 */ |
| 46 | }; |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 47 | static asn_SEQUENCE_specifics_t asn_DEF_T1_specs = { |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 48 | sizeof(struct T1), |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 49 | offsetof(struct T1, _asn_ctx), |
| 50 | asn_DEF_T1_tag2el, |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 51 | 1, /* Count of tags in the map */ |
| 52 | -1, /* Start extensions */ |
| 53 | -1 /* Stop extensions */ |
| 54 | }; |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 55 | asn_TYPE_descriptor_t asn_DEF_T1 = { |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 56 | "T1", |
vlm | 9de248e | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 57 | "T1", |
vlm | 39ba4c4 | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 58 | SEQUENCE_free, |
| 59 | SEQUENCE_print, |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 60 | SEQUENCE_constraint, |
| 61 | SEQUENCE_decode_ber, |
| 62 | SEQUENCE_encode_der, |
vlm | 39ba4c4 | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 63 | 0, /* Not implemented yet */ |
| 64 | SEQUENCE_encode_xer, |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 65 | 0, /* Use generic outmost tag fetcher */ |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 66 | asn_DEF_T1_tags, |
| 67 | sizeof(asn_DEF_T1_tags) |
| 68 | /sizeof(asn_DEF_T1_tags[0]), /* 1 */ |
| 69 | asn_DEF_T1_tags, /* Same as above */ |
| 70 | sizeof(asn_DEF_T1_tags) |
| 71 | /sizeof(asn_DEF_T1_tags[0]), /* 1 */ |
| 72 | asn_MBR_T1, |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 73 | 2, /* Elements count */ |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 74 | &asn_DEF_T1_specs /* Additional specs */ |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 75 | }; |
| 76 | |
| 77 | |
| 78 | /*** <<< INCLUDES [T2] >>> ***/ |
| 79 | |
| 80 | #include <INTEGER.h> |
| 81 | #include <ANY.h> |
| 82 | #include <constr_SEQUENCE.h> |
| 83 | |
| 84 | /*** <<< DEPS [T2] >>> ***/ |
| 85 | |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 86 | extern asn_TYPE_descriptor_t asn_DEF_T2; |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 87 | |
| 88 | /*** <<< TYPE-DECLS [T2] >>> ***/ |
| 89 | |
| 90 | |
| 91 | typedef struct T2 { |
| 92 | INTEGER_t i; |
| 93 | ANY_t *any /* OPTIONAL */; |
| 94 | |
| 95 | /* Context for parsing across buffer boundaries */ |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 96 | asn_struct_ctx_t _asn_ctx; |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 97 | } T2_t; |
| 98 | |
| 99 | /*** <<< STAT-DEFS [T2] >>> ***/ |
| 100 | |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 101 | static asn_TYPE_member_t asn_MBR_T2[] = { |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 102 | { ATF_NOFLAGS, 0, offsetof(struct T2, i), |
| 103 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 104 | .tag_mode = 0, |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 105 | .type = (void *)&asn_DEF_INTEGER, |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 106 | .memb_constraints = 0, /* Defer to actual type */ |
| 107 | .name = "i" |
| 108 | }, |
| 109 | { ATF_POINTER, 1, offsetof(struct T2, any), |
| 110 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 111 | .tag_mode = +1, /* EXPLICIT tag at current level */ |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 112 | .type = (void *)&asn_DEF_ANY, |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 113 | .memb_constraints = 0, /* Defer to actual type */ |
| 114 | .name = "any" |
| 115 | }, |
| 116 | }; |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 117 | static ber_tlv_tag_t asn_DEF_T2_tags[] = { |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 118 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 119 | }; |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 120 | static asn_TYPE_tag2member_t asn_DEF_T2_tag2el[] = { |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 121 | { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 20 */ |
| 122 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* any at 21 */ |
| 123 | }; |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 124 | static asn_SEQUENCE_specifics_t asn_DEF_T2_specs = { |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 125 | sizeof(struct T2), |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 126 | offsetof(struct T2, _asn_ctx), |
| 127 | asn_DEF_T2_tag2el, |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 128 | 2, /* Count of tags in the map */ |
| 129 | -1, /* Start extensions */ |
| 130 | -1 /* Stop extensions */ |
| 131 | }; |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 132 | asn_TYPE_descriptor_t asn_DEF_T2 = { |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 133 | "T2", |
vlm | 9de248e | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 134 | "T2", |
vlm | 39ba4c4 | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 135 | SEQUENCE_free, |
| 136 | SEQUENCE_print, |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 137 | SEQUENCE_constraint, |
| 138 | SEQUENCE_decode_ber, |
| 139 | SEQUENCE_encode_der, |
vlm | 39ba4c4 | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 140 | 0, /* Not implemented yet */ |
| 141 | SEQUENCE_encode_xer, |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 142 | 0, /* Use generic outmost tag fetcher */ |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 143 | asn_DEF_T2_tags, |
| 144 | sizeof(asn_DEF_T2_tags) |
| 145 | /sizeof(asn_DEF_T2_tags[0]), /* 1 */ |
| 146 | asn_DEF_T2_tags, /* Same as above */ |
| 147 | sizeof(asn_DEF_T2_tags) |
| 148 | /sizeof(asn_DEF_T2_tags[0]), /* 1 */ |
| 149 | asn_MBR_T2, |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 150 | 2, /* Elements count */ |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 151 | &asn_DEF_T2_specs /* Additional specs */ |
vlm | 060fe2a | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 152 | }; |
| 153 | |