blob: 948e4ad62b644e75e5f2491e566740f5951f877c [file] [log] [blame]
Harald Weltee844bf72019-05-06 15:25:10 +02001/*
2 * Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
3 * From ASN.1 module "SABP-PDU"
4 * found in "../../asn1/sabp/SABP-PDU.asn"
5 */
6
7#include <osmocom/sabp/SABP_Load-Query-Failure.h>
8
9static int
10memb_load_Query_Failure_ies_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
11 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
12 size_t size;
13
14 if(!sptr) {
15 _ASN_CTFAIL(app_key, td, sptr,
16 "%s: value not given (%s:%d)",
17 td->name, __FILE__, __LINE__);
18 return -1;
19 }
20
21 /* Determine the number of elements */
22 size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
23
24 if((size <= 65535l)) {
25 /* Perform validation of the inner elements */
26 return td->check_constraints(td, sptr, ctfailcb, app_key);
27 } else {
28 _ASN_CTFAIL(app_key, td, sptr,
29 "%s: constraint failed (%s:%d)",
30 td->name, __FILE__, __LINE__);
31 return -1;
32 }
33}
34
35static asn_per_constraints_t asn_PER_type_load_Query_Failure_ies_constr_2 GCC_NOTUSED = {
36 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
37 { APC_CONSTRAINED, 16, 16, 0l, 65535l } /* (SIZE(0..65535)) */,
38 0, 0 /* No PER value map */
39};
40static asn_per_constraints_t asn_PER_memb_load_Query_Failure_ies_constr_2 GCC_NOTUSED = {
41 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
42 { APC_CONSTRAINED, 16, 16, 0l, 65535l } /* (SIZE(0..65535)) */,
43 0, 0 /* No PER value map */
44};
45static asn_TYPE_member_t asn_MBR_load_Query_Failure_ies_2[] = {
46 { ATF_POINTER, 0, 0,
47 -1 /* Ambiguous tag (CHOICE?) */,
48 0,
49 &asn_DEF_SABP_IE,
50 0, /* Defer constraints checking to the member type */
51 0, /* No PER visible constraints */
52 0,
53 ""
54 },
55};
56static const ber_tlv_tag_t asn_DEF_load_Query_Failure_ies_tags_2[] = {
57 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
58 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
59};
60static asn_SET_OF_specifics_t asn_SPC_load_Query_Failure_ies_specs_2 = {
61 sizeof(struct load_Query_Failure_ies),
62 offsetof(struct load_Query_Failure_ies, _asn_ctx),
63 0, /* XER encoding is XMLDelimitedItemList */
64};
65static /* Use -fall-defs-global to expose */
66asn_TYPE_descriptor_t asn_DEF_load_Query_Failure_ies_2 = {
67 "load-Query-Failure-ies",
68 "load-Query-Failure-ies",
69 SEQUENCE_OF_free,
70 SEQUENCE_OF_print,
71 SEQUENCE_OF_constraint,
72 SEQUENCE_OF_decode_ber,
73 SEQUENCE_OF_encode_der,
74 SEQUENCE_OF_decode_xer,
75 SEQUENCE_OF_encode_xer,
76 SEQUENCE_OF_decode_uper,
77 SEQUENCE_OF_encode_uper,
78 SEQUENCE_OF_decode_aper,
79 SEQUENCE_OF_encode_aper,
80 0, /* Use generic outmost tag fetcher */
81 asn_DEF_load_Query_Failure_ies_tags_2,
82 sizeof(asn_DEF_load_Query_Failure_ies_tags_2)
83 /sizeof(asn_DEF_load_Query_Failure_ies_tags_2[0]) - 1, /* 1 */
84 asn_DEF_load_Query_Failure_ies_tags_2, /* Same as above */
85 sizeof(asn_DEF_load_Query_Failure_ies_tags_2)
86 /sizeof(asn_DEF_load_Query_Failure_ies_tags_2[0]), /* 2 */
87 &asn_PER_type_load_Query_Failure_ies_constr_2,
88 asn_MBR_load_Query_Failure_ies_2,
89 1, /* Single element */
90 &asn_SPC_load_Query_Failure_ies_specs_2 /* Additional specs */
91};
92
93static asn_TYPE_member_t asn_MBR_SABP_Load_Query_Failure_1[] = {
94 { ATF_NOFLAGS, 0, offsetof(struct SABP_Load_Query_Failure, load_Query_Failure_ies),
95 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
96 0,
97 &asn_DEF_load_Query_Failure_ies_2,
98 memb_load_Query_Failure_ies_constraint_1,
99 &asn_PER_memb_load_Query_Failure_ies_constr_2,
100 0,
101 "load-Query-Failure-ies"
102 },
103};
104static const ber_tlv_tag_t asn_DEF_SABP_Load_Query_Failure_tags_1[] = {
105 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
106};
107static const asn_TYPE_tag2member_t asn_MAP_SABP_Load_Query_Failure_tag2el_1[] = {
108 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* load-Query-Failure-ies */
109};
110static asn_SEQUENCE_specifics_t asn_SPC_SABP_Load_Query_Failure_specs_1 = {
111 sizeof(struct SABP_Load_Query_Failure),
112 offsetof(struct SABP_Load_Query_Failure, _asn_ctx),
113 asn_MAP_SABP_Load_Query_Failure_tag2el_1,
114 1, /* Count of tags in the map */
115 0, 0, 0, /* Optional elements (not needed) */
116 0, /* Start extensions */
117 2 /* Stop extensions */
118};
119asn_TYPE_descriptor_t asn_DEF_SABP_Load_Query_Failure = {
120 "SABP_Load-Query-Failure",
121 "SABP_Load-Query-Failure",
122 SEQUENCE_free,
123 SEQUENCE_print,
124 SEQUENCE_constraint,
125 SEQUENCE_decode_ber,
126 SEQUENCE_encode_der,
127 SEQUENCE_decode_xer,
128 SEQUENCE_encode_xer,
129 SEQUENCE_decode_uper,
130 SEQUENCE_encode_uper,
131 SEQUENCE_decode_aper,
132 SEQUENCE_encode_aper,
133 0, /* Use generic outmost tag fetcher */
134 asn_DEF_SABP_Load_Query_Failure_tags_1,
135 sizeof(asn_DEF_SABP_Load_Query_Failure_tags_1)
136 /sizeof(asn_DEF_SABP_Load_Query_Failure_tags_1[0]), /* 1 */
137 asn_DEF_SABP_Load_Query_Failure_tags_1, /* Same as above */
138 sizeof(asn_DEF_SABP_Load_Query_Failure_tags_1)
139 /sizeof(asn_DEF_SABP_Load_Query_Failure_tags_1[0]), /* 1 */
140 0, /* No PER visible constraints */
141 asn_MBR_SABP_Load_Query_Failure_1,
142 1, /* Elements count */
143 &asn_SPC_SABP_Load_Query_Failure_specs_1 /* Additional specs */
144};
145