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