Harald Welte | d523a69 | 2015-08-30 23:11:19 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Generated by asn1c-0.9.28 (http://lionet.info/asn1c) |
| 3 | * From ASN.1 module "HNBAP-PDU" |
| 4 | * found in "../../asn1/hnbap/HNBAP-PDU.asn" |
| 5 | * `asn1c -gen-PER -fnative-types` |
| 6 | */ |
| 7 | |
| 8 | #include "HNBConfigTransferResponse.h" |
| 9 | |
| 10 | static int |
| 11 | memb_hnbConfigTransferResponse_ies_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 12 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 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 | /* Determine the number of elements */ |
| 23 | size = _A_CSEQUENCE_FROM_VOID(sptr)->count; |
| 24 | |
| 25 | if((size <= 65535l)) { |
| 26 | /* Perform validation of the inner elements */ |
| 27 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
| 28 | } else { |
| 29 | _ASN_CTFAIL(app_key, td, sptr, |
| 30 | "%s: constraint failed (%s:%d)", |
| 31 | td->name, __FILE__, __LINE__); |
| 32 | return -1; |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | static asn_per_constraints_t asn_PER_type_hnbConfigTransferResponse_ies_constr_2 GCC_NOTUSED = { |
| 37 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 38 | { APC_CONSTRAINED, 16, 16, 0l, 65535l } /* (SIZE(0..65535)) */, |
| 39 | 0, 0 /* No PER value map */ |
| 40 | }; |
| 41 | static asn_per_constraints_t asn_PER_memb_hnbConfigTransferResponse_ies_constr_2 GCC_NOTUSED = { |
| 42 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 43 | { APC_CONSTRAINED, 16, 16, 0l, 65535l } /* (SIZE(0..65535)) */, |
| 44 | 0, 0 /* No PER value map */ |
| 45 | }; |
| 46 | static asn_TYPE_member_t asn_MBR_hnbConfigTransferResponse_ies_2[] = { |
| 47 | { ATF_POINTER, 0, 0, |
| 48 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 49 | 0, |
| 50 | &asn_DEF_IE, |
| 51 | 0, /* Defer constraints checking to the member type */ |
| 52 | 0, /* No PER visible constraints */ |
| 53 | 0, |
| 54 | "" |
| 55 | }, |
| 56 | }; |
| 57 | static const ber_tlv_tag_t asn_DEF_hnbConfigTransferResponse_ies_tags_2[] = { |
| 58 | (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 59 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 60 | }; |
| 61 | static asn_SET_OF_specifics_t asn_SPC_hnbConfigTransferResponse_ies_specs_2 = { |
| 62 | sizeof(struct hnbConfigTransferResponse_ies), |
| 63 | offsetof(struct hnbConfigTransferResponse_ies, _asn_ctx), |
| 64 | 0, /* XER encoding is XMLDelimitedItemList */ |
| 65 | }; |
| 66 | static /* Use -fall-defs-global to expose */ |
| 67 | asn_TYPE_descriptor_t asn_DEF_hnbConfigTransferResponse_ies_2 = { |
| 68 | "hnbConfigTransferResponse-ies", |
| 69 | "hnbConfigTransferResponse-ies", |
| 70 | SEQUENCE_OF_free, |
| 71 | SEQUENCE_OF_print, |
| 72 | SEQUENCE_OF_constraint, |
| 73 | SEQUENCE_OF_decode_ber, |
| 74 | SEQUENCE_OF_encode_der, |
| 75 | SEQUENCE_OF_decode_xer, |
| 76 | SEQUENCE_OF_encode_xer, |
| 77 | SEQUENCE_OF_decode_uper, |
| 78 | SEQUENCE_OF_encode_uper, |
| 79 | SEQUENCE_OF_decode_aper, |
| 80 | SEQUENCE_OF_encode_aper, |
| 81 | 0, /* Use generic outmost tag fetcher */ |
| 82 | asn_DEF_hnbConfigTransferResponse_ies_tags_2, |
| 83 | sizeof(asn_DEF_hnbConfigTransferResponse_ies_tags_2) |
| 84 | /sizeof(asn_DEF_hnbConfigTransferResponse_ies_tags_2[0]) - 1, /* 1 */ |
| 85 | asn_DEF_hnbConfigTransferResponse_ies_tags_2, /* Same as above */ |
| 86 | sizeof(asn_DEF_hnbConfigTransferResponse_ies_tags_2) |
| 87 | /sizeof(asn_DEF_hnbConfigTransferResponse_ies_tags_2[0]), /* 2 */ |
| 88 | &asn_PER_type_hnbConfigTransferResponse_ies_constr_2, |
| 89 | asn_MBR_hnbConfigTransferResponse_ies_2, |
| 90 | 1, /* Single element */ |
| 91 | &asn_SPC_hnbConfigTransferResponse_ies_specs_2 /* Additional specs */ |
| 92 | }; |
| 93 | |
| 94 | static asn_TYPE_member_t asn_MBR_HNBConfigTransferResponse_1[] = { |
| 95 | { ATF_NOFLAGS, 0, offsetof(struct HNBConfigTransferResponse, hnbConfigTransferResponse_ies), |
| 96 | (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 97 | 0, |
| 98 | &asn_DEF_hnbConfigTransferResponse_ies_2, |
| 99 | memb_hnbConfigTransferResponse_ies_constraint_1, |
| 100 | &asn_PER_memb_hnbConfigTransferResponse_ies_constr_2, |
| 101 | 0, |
| 102 | "hnbConfigTransferResponse-ies" |
| 103 | }, |
| 104 | }; |
| 105 | static const ber_tlv_tag_t asn_DEF_HNBConfigTransferResponse_tags_1[] = { |
| 106 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 107 | }; |
| 108 | static const asn_TYPE_tag2member_t asn_MAP_HNBConfigTransferResponse_tag2el_1[] = { |
| 109 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* hnbConfigTransferResponse-ies */ |
| 110 | }; |
| 111 | static asn_SEQUENCE_specifics_t asn_SPC_HNBConfigTransferResponse_specs_1 = { |
| 112 | sizeof(struct HNBConfigTransferResponse), |
| 113 | offsetof(struct HNBConfigTransferResponse, _asn_ctx), |
| 114 | asn_MAP_HNBConfigTransferResponse_tag2el_1, |
| 115 | 1, /* Count of tags in the map */ |
| 116 | 0, 0, 0, /* Optional elements (not needed) */ |
| 117 | 0, /* Start extensions */ |
| 118 | 2 /* Stop extensions */ |
| 119 | }; |
| 120 | asn_TYPE_descriptor_t asn_DEF_HNBConfigTransferResponse = { |
| 121 | "HNBConfigTransferResponse", |
| 122 | "HNBConfigTransferResponse", |
| 123 | SEQUENCE_free, |
| 124 | SEQUENCE_print, |
| 125 | SEQUENCE_constraint, |
| 126 | SEQUENCE_decode_ber, |
| 127 | SEQUENCE_encode_der, |
| 128 | SEQUENCE_decode_xer, |
| 129 | SEQUENCE_encode_xer, |
| 130 | SEQUENCE_decode_uper, |
| 131 | SEQUENCE_encode_uper, |
| 132 | SEQUENCE_decode_aper, |
| 133 | SEQUENCE_encode_aper, |
| 134 | 0, /* Use generic outmost tag fetcher */ |
| 135 | asn_DEF_HNBConfigTransferResponse_tags_1, |
| 136 | sizeof(asn_DEF_HNBConfigTransferResponse_tags_1) |
| 137 | /sizeof(asn_DEF_HNBConfigTransferResponse_tags_1[0]), /* 1 */ |
| 138 | asn_DEF_HNBConfigTransferResponse_tags_1, /* Same as above */ |
| 139 | sizeof(asn_DEF_HNBConfigTransferResponse_tags_1) |
| 140 | /sizeof(asn_DEF_HNBConfigTransferResponse_tags_1[0]), /* 1 */ |
| 141 | 0, /* No PER visible constraints */ |
| 142 | asn_MBR_HNBConfigTransferResponse_1, |
| 143 | 1, /* Elements count */ |
| 144 | &asn_SPC_HNBConfigTransferResponse_specs_1 /* Additional specs */ |
| 145 | }; |
| 146 | |