Harald Welte | 019830c | 2015-09-10 10:20:56 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Generated by asn1c-0.9.28 (http://lionet.info/asn1c) |
| 3 | * From ASN.1 module "RUA-IEs" |
| 4 | * found in "../../asn1/rua/RUA-IEs.asn" |
| 5 | */ |
| 6 | |
Neels Hofmeyr | f1f2d7c | 2016-01-05 12:00:06 +0100 | [diff] [blame] | 7 | #include <osmocom/rua/RUA_IntraDomainNasNodeSelector.h> |
Harald Welte | 019830c | 2015-09-10 10:20:56 +0200 | [diff] [blame] | 8 | |
| 9 | static int |
| 10 | memb_futurecoding_constraint_7(asn_TYPE_descriptor_t *td, const void *sptr, |
| 11 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 12 | const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; |
| 13 | size_t size; |
| 14 | |
| 15 | if(!sptr) { |
| 16 | _ASN_CTFAIL(app_key, td, sptr, |
| 17 | "%s: value not given (%s:%d)", |
| 18 | td->name, __FILE__, __LINE__); |
| 19 | return -1; |
| 20 | } |
| 21 | |
| 22 | if(st->size > 0) { |
| 23 | /* Size in bits */ |
| 24 | size = 8 * st->size - (st->bits_unused & 0x07); |
| 25 | } else { |
| 26 | size = 0; |
| 27 | } |
| 28 | |
| 29 | if((size == 15l)) { |
| 30 | /* Constraint check succeeded */ |
| 31 | return 0; |
| 32 | } else { |
| 33 | _ASN_CTFAIL(app_key, td, sptr, |
| 34 | "%s: constraint failed (%s:%d)", |
| 35 | td->name, __FILE__, __LINE__); |
| 36 | return -1; |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | static asn_per_constraints_t asn_PER_type_cn_Type_constr_4 GCC_NOTUSED = { |
| 41 | { APC_CONSTRAINED, 1, 1, 0l, 1l } /* (0..1) */, |
| 42 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 43 | 0, 0 /* No PER value map */ |
| 44 | }; |
| 45 | static asn_per_constraints_t asn_PER_memb_futurecoding_constr_8 GCC_NOTUSED = { |
| 46 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 47 | { APC_CONSTRAINED, 0, 0, 15l, 15l } /* (SIZE(15..15)) */, |
| 48 | 0, 0 /* No PER value map */ |
| 49 | }; |
| 50 | static asn_per_constraints_t asn_PER_type_version_constr_2 GCC_NOTUSED = { |
| 51 | { APC_CONSTRAINED, 1, 1, 0l, 1l } /* (0..1) */, |
| 52 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 53 | 0, 0 /* No PER value map */ |
| 54 | }; |
| 55 | static asn_TYPE_member_t asn_MBR_cn_Type_4[] = { |
| 56 | { ATF_NOFLAGS, 0, offsetof(struct cn_Type, choice.gsm_Map_IDNNS), |
| 57 | (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 58 | -1, /* IMPLICIT tag at current level */ |
| 59 | &asn_DEF_RUA_Gsm_map_IDNNS, |
| 60 | 0, /* Defer constraints checking to the member type */ |
| 61 | 0, /* No PER visible constraints */ |
| 62 | 0, |
| 63 | "gsm-Map-IDNNS" |
| 64 | }, |
| 65 | { ATF_NOFLAGS, 0, offsetof(struct cn_Type, choice.ansi_41_IDNNS), |
| 66 | (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 67 | -1, /* IMPLICIT tag at current level */ |
| 68 | &asn_DEF_RUA_Ansi_41_IDNNS, |
| 69 | 0, /* Defer constraints checking to the member type */ |
| 70 | 0, /* No PER visible constraints */ |
| 71 | 0, |
| 72 | "ansi-41-IDNNS" |
| 73 | }, |
| 74 | }; |
| 75 | static const asn_TYPE_tag2member_t asn_MAP_cn_Type_tag2el_4[] = { |
| 76 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gsm-Map-IDNNS */ |
| 77 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ansi-41-IDNNS */ |
| 78 | }; |
| 79 | static asn_CHOICE_specifics_t asn_SPC_cn_Type_specs_4 = { |
| 80 | sizeof(struct cn_Type), |
| 81 | offsetof(struct cn_Type, _asn_ctx), |
| 82 | offsetof(struct cn_Type, present), |
| 83 | sizeof(((struct cn_Type *)0)->present), |
| 84 | asn_MAP_cn_Type_tag2el_4, |
| 85 | 2, /* Count of tags in the map */ |
| 86 | 0, |
| 87 | -1 /* Extensions start */ |
| 88 | }; |
| 89 | static /* Use -fall-defs-global to expose */ |
| 90 | asn_TYPE_descriptor_t asn_DEF_cn_Type_4 = { |
| 91 | "cn-Type", |
| 92 | "cn-Type", |
| 93 | CHOICE_free, |
| 94 | CHOICE_print, |
| 95 | CHOICE_constraint, |
| 96 | CHOICE_decode_ber, |
| 97 | CHOICE_encode_der, |
| 98 | CHOICE_decode_xer, |
| 99 | CHOICE_encode_xer, |
| 100 | CHOICE_decode_uper, |
| 101 | CHOICE_encode_uper, |
| 102 | CHOICE_decode_aper, |
| 103 | CHOICE_encode_aper, |
| 104 | CHOICE_outmost_tag, |
| 105 | 0, /* No effective tags (pointer) */ |
| 106 | 0, /* No effective tags (count) */ |
| 107 | 0, /* No tags (pointer) */ |
| 108 | 0, /* No tags (count) */ |
| 109 | &asn_PER_type_cn_Type_constr_4, |
| 110 | asn_MBR_cn_Type_4, |
| 111 | 2, /* Elements count */ |
| 112 | &asn_SPC_cn_Type_specs_4 /* Additional specs */ |
| 113 | }; |
| 114 | |
| 115 | static asn_TYPE_member_t asn_MBR_release99_3[] = { |
| 116 | { ATF_NOFLAGS, 0, offsetof(struct release99, cn_Type), |
| 117 | (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 118 | +1, /* EXPLICIT tag at current level */ |
| 119 | &asn_DEF_cn_Type_4, |
| 120 | 0, /* Defer constraints checking to the member type */ |
| 121 | 0, /* No PER visible constraints */ |
| 122 | 0, |
| 123 | "cn-Type" |
| 124 | }, |
| 125 | }; |
| 126 | static const ber_tlv_tag_t asn_DEF_release99_tags_3[] = { |
| 127 | (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 128 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 129 | }; |
| 130 | static const asn_TYPE_tag2member_t asn_MAP_release99_tag2el_3[] = { |
| 131 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* cn-Type */ |
| 132 | }; |
| 133 | static asn_SEQUENCE_specifics_t asn_SPC_release99_specs_3 = { |
| 134 | sizeof(struct release99), |
| 135 | offsetof(struct release99, _asn_ctx), |
| 136 | asn_MAP_release99_tag2el_3, |
| 137 | 1, /* Count of tags in the map */ |
| 138 | 0, 0, 0, /* Optional elements (not needed) */ |
| 139 | -1, /* Start extensions */ |
| 140 | -1 /* Stop extensions */ |
| 141 | }; |
| 142 | static /* Use -fall-defs-global to expose */ |
| 143 | asn_TYPE_descriptor_t asn_DEF_release99_3 = { |
| 144 | "release99", |
| 145 | "release99", |
| 146 | SEQUENCE_free, |
| 147 | SEQUENCE_print, |
| 148 | SEQUENCE_constraint, |
| 149 | SEQUENCE_decode_ber, |
| 150 | SEQUENCE_encode_der, |
| 151 | SEQUENCE_decode_xer, |
| 152 | SEQUENCE_encode_xer, |
| 153 | SEQUENCE_decode_uper, |
| 154 | SEQUENCE_encode_uper, |
| 155 | SEQUENCE_decode_aper, |
| 156 | SEQUENCE_encode_aper, |
| 157 | 0, /* Use generic outmost tag fetcher */ |
| 158 | asn_DEF_release99_tags_3, |
| 159 | sizeof(asn_DEF_release99_tags_3) |
| 160 | /sizeof(asn_DEF_release99_tags_3[0]) - 1, /* 1 */ |
| 161 | asn_DEF_release99_tags_3, /* Same as above */ |
| 162 | sizeof(asn_DEF_release99_tags_3) |
| 163 | /sizeof(asn_DEF_release99_tags_3[0]), /* 2 */ |
| 164 | 0, /* No PER visible constraints */ |
| 165 | asn_MBR_release99_3, |
| 166 | 1, /* Elements count */ |
| 167 | &asn_SPC_release99_specs_3 /* Additional specs */ |
| 168 | }; |
| 169 | |
| 170 | static asn_TYPE_member_t asn_MBR_later_7[] = { |
| 171 | { ATF_NOFLAGS, 0, offsetof(struct later, futurecoding), |
| 172 | (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 173 | -1, /* IMPLICIT tag at current level */ |
| 174 | &asn_DEF_BIT_STRING, |
| 175 | memb_futurecoding_constraint_7, |
| 176 | &asn_PER_memb_futurecoding_constr_8, |
| 177 | 0, |
| 178 | "futurecoding" |
| 179 | }, |
| 180 | }; |
| 181 | static const ber_tlv_tag_t asn_DEF_later_tags_7[] = { |
| 182 | (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 183 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 184 | }; |
| 185 | static const asn_TYPE_tag2member_t asn_MAP_later_tag2el_7[] = { |
| 186 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* futurecoding */ |
| 187 | }; |
| 188 | static asn_SEQUENCE_specifics_t asn_SPC_later_specs_7 = { |
| 189 | sizeof(struct later), |
| 190 | offsetof(struct later, _asn_ctx), |
| 191 | asn_MAP_later_tag2el_7, |
| 192 | 1, /* Count of tags in the map */ |
| 193 | 0, 0, 0, /* Optional elements (not needed) */ |
| 194 | -1, /* Start extensions */ |
| 195 | -1 /* Stop extensions */ |
| 196 | }; |
| 197 | static /* Use -fall-defs-global to expose */ |
| 198 | asn_TYPE_descriptor_t asn_DEF_later_7 = { |
| 199 | "later", |
| 200 | "later", |
| 201 | SEQUENCE_free, |
| 202 | SEQUENCE_print, |
| 203 | SEQUENCE_constraint, |
| 204 | SEQUENCE_decode_ber, |
| 205 | SEQUENCE_encode_der, |
| 206 | SEQUENCE_decode_xer, |
| 207 | SEQUENCE_encode_xer, |
| 208 | SEQUENCE_decode_uper, |
| 209 | SEQUENCE_encode_uper, |
| 210 | SEQUENCE_decode_aper, |
| 211 | SEQUENCE_encode_aper, |
| 212 | 0, /* Use generic outmost tag fetcher */ |
| 213 | asn_DEF_later_tags_7, |
| 214 | sizeof(asn_DEF_later_tags_7) |
| 215 | /sizeof(asn_DEF_later_tags_7[0]) - 1, /* 1 */ |
| 216 | asn_DEF_later_tags_7, /* Same as above */ |
| 217 | sizeof(asn_DEF_later_tags_7) |
| 218 | /sizeof(asn_DEF_later_tags_7[0]), /* 2 */ |
| 219 | 0, /* No PER visible constraints */ |
| 220 | asn_MBR_later_7, |
| 221 | 1, /* Elements count */ |
| 222 | &asn_SPC_later_specs_7 /* Additional specs */ |
| 223 | }; |
| 224 | |
| 225 | static asn_TYPE_member_t asn_MBR_version_2[] = { |
| 226 | { ATF_NOFLAGS, 0, offsetof(struct version, choice.release99), |
| 227 | (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 228 | 0, |
| 229 | &asn_DEF_release99_3, |
| 230 | 0, /* Defer constraints checking to the member type */ |
| 231 | 0, /* No PER visible constraints */ |
| 232 | 0, |
| 233 | "release99" |
| 234 | }, |
| 235 | { ATF_NOFLAGS, 0, offsetof(struct version, choice.later), |
| 236 | (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 237 | 0, |
| 238 | &asn_DEF_later_7, |
| 239 | 0, /* Defer constraints checking to the member type */ |
| 240 | 0, /* No PER visible constraints */ |
| 241 | 0, |
| 242 | "later" |
| 243 | }, |
| 244 | }; |
| 245 | static const asn_TYPE_tag2member_t asn_MAP_version_tag2el_2[] = { |
| 246 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* release99 */ |
| 247 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* later */ |
| 248 | }; |
| 249 | static asn_CHOICE_specifics_t asn_SPC_version_specs_2 = { |
| 250 | sizeof(struct version), |
| 251 | offsetof(struct version, _asn_ctx), |
| 252 | offsetof(struct version, present), |
| 253 | sizeof(((struct version *)0)->present), |
| 254 | asn_MAP_version_tag2el_2, |
| 255 | 2, /* Count of tags in the map */ |
| 256 | 0, |
| 257 | -1 /* Extensions start */ |
| 258 | }; |
| 259 | static /* Use -fall-defs-global to expose */ |
| 260 | asn_TYPE_descriptor_t asn_DEF_version_2 = { |
| 261 | "version", |
| 262 | "version", |
| 263 | CHOICE_free, |
| 264 | CHOICE_print, |
| 265 | CHOICE_constraint, |
| 266 | CHOICE_decode_ber, |
| 267 | CHOICE_encode_der, |
| 268 | CHOICE_decode_xer, |
| 269 | CHOICE_encode_xer, |
| 270 | CHOICE_decode_uper, |
| 271 | CHOICE_encode_uper, |
| 272 | CHOICE_decode_aper, |
| 273 | CHOICE_encode_aper, |
| 274 | CHOICE_outmost_tag, |
| 275 | 0, /* No effective tags (pointer) */ |
| 276 | 0, /* No effective tags (count) */ |
| 277 | 0, /* No tags (pointer) */ |
| 278 | 0, /* No tags (count) */ |
| 279 | &asn_PER_type_version_constr_2, |
| 280 | asn_MBR_version_2, |
| 281 | 2, /* Elements count */ |
| 282 | &asn_SPC_version_specs_2 /* Additional specs */ |
| 283 | }; |
| 284 | |
| 285 | static asn_TYPE_member_t asn_MBR_RUA_IntraDomainNasNodeSelector_1[] = { |
| 286 | { ATF_NOFLAGS, 0, offsetof(struct RUA_IntraDomainNasNodeSelector, version), |
| 287 | (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 288 | +1, /* EXPLICIT tag at current level */ |
| 289 | &asn_DEF_version_2, |
| 290 | 0, /* Defer constraints checking to the member type */ |
| 291 | 0, /* No PER visible constraints */ |
| 292 | 0, |
| 293 | "version" |
| 294 | }, |
| 295 | }; |
| 296 | static const ber_tlv_tag_t asn_DEF_RUA_IntraDomainNasNodeSelector_tags_1[] = { |
| 297 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 298 | }; |
| 299 | static const asn_TYPE_tag2member_t asn_MAP_RUA_IntraDomainNasNodeSelector_tag2el_1[] = { |
| 300 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* version */ |
| 301 | }; |
| 302 | static asn_SEQUENCE_specifics_t asn_SPC_RUA_IntraDomainNasNodeSelector_specs_1 = { |
| 303 | sizeof(struct RUA_IntraDomainNasNodeSelector), |
| 304 | offsetof(struct RUA_IntraDomainNasNodeSelector, _asn_ctx), |
| 305 | asn_MAP_RUA_IntraDomainNasNodeSelector_tag2el_1, |
| 306 | 1, /* Count of tags in the map */ |
| 307 | 0, 0, 0, /* Optional elements (not needed) */ |
| 308 | -1, /* Start extensions */ |
| 309 | -1 /* Stop extensions */ |
| 310 | }; |
| 311 | asn_TYPE_descriptor_t asn_DEF_RUA_IntraDomainNasNodeSelector = { |
| 312 | "RUA_IntraDomainNasNodeSelector", |
| 313 | "RUA_IntraDomainNasNodeSelector", |
| 314 | SEQUENCE_free, |
| 315 | SEQUENCE_print, |
| 316 | SEQUENCE_constraint, |
| 317 | SEQUENCE_decode_ber, |
| 318 | SEQUENCE_encode_der, |
| 319 | SEQUENCE_decode_xer, |
| 320 | SEQUENCE_encode_xer, |
| 321 | SEQUENCE_decode_uper, |
| 322 | SEQUENCE_encode_uper, |
| 323 | SEQUENCE_decode_aper, |
| 324 | SEQUENCE_encode_aper, |
| 325 | 0, /* Use generic outmost tag fetcher */ |
| 326 | asn_DEF_RUA_IntraDomainNasNodeSelector_tags_1, |
| 327 | sizeof(asn_DEF_RUA_IntraDomainNasNodeSelector_tags_1) |
| 328 | /sizeof(asn_DEF_RUA_IntraDomainNasNodeSelector_tags_1[0]), /* 1 */ |
| 329 | asn_DEF_RUA_IntraDomainNasNodeSelector_tags_1, /* Same as above */ |
| 330 | sizeof(asn_DEF_RUA_IntraDomainNasNodeSelector_tags_1) |
| 331 | /sizeof(asn_DEF_RUA_IntraDomainNasNodeSelector_tags_1[0]), /* 1 */ |
| 332 | 0, /* No PER visible constraints */ |
| 333 | asn_MBR_RUA_IntraDomainNasNodeSelector_1, |
| 334 | 1, /* Elements count */ |
| 335 | &asn_SPC_RUA_IntraDomainNasNodeSelector_specs_1 /* Additional specs */ |
| 336 | }; |
| 337 | |