blob: 9993bcd2d3ee1d65430711ac4bd40652b441aa95 [file] [log] [blame]
Harald Welteee091892015-09-10 10:22:03 +02001/*
2 * Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
3 * From ASN.1 module "RANAP-IEs"
4 * found in "../../asn1/ranap/RANAP-IEs.asn"
5 */
6
Neels Hofmeyrf1f2d7c2016-01-05 12:00:06 +01007#include <osmocom/ranap/RANAP_RSRVCC-Information.h>
Harald Welteee091892015-09-10 10:22:03 +02008
9static int
10memb_nonce_constraint_1(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 == 128l)) {
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
40static int
41memb_iMSInformation_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
42 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
43 const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
44 size_t size;
45
46 if(!sptr) {
47 _ASN_CTFAIL(app_key, td, sptr,
48 "%s: value not given (%s:%d)",
49 td->name, __FILE__, __LINE__);
50 return -1;
51 }
52
53 size = st->size;
54
55 if((size >= 1l && size <= 32l)) {
56 /* Constraint check succeeded */
57 return 0;
58 } else {
59 _ASN_CTFAIL(app_key, td, sptr,
60 "%s: constraint failed (%s:%d)",
61 td->name, __FILE__, __LINE__);
62 return -1;
63 }
64}
65
66static asn_per_constraints_t asn_PER_memb_nonce_constr_2 GCC_NOTUSED = {
67 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
68 { APC_CONSTRAINED, 0, 0, 128l, 128l } /* (SIZE(128..128)) */,
69 0, 0 /* No PER value map */
70};
71static asn_per_constraints_t asn_PER_memb_iMSInformation_constr_3 GCC_NOTUSED = {
72 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
73 { APC_CONSTRAINED, 5, 5, 1l, 32l } /* (SIZE(1..32)) */,
74 0, 0 /* No PER value map */
75};
76static asn_TYPE_member_t asn_MBR_RANAP_RSRVCC_Information_1[] = {
77 { ATF_NOFLAGS, 0, offsetof(struct RANAP_RSRVCC_Information, nonce),
78 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
79 -1, /* IMPLICIT tag at current level */
80 &asn_DEF_BIT_STRING,
81 memb_nonce_constraint_1,
82 &asn_PER_memb_nonce_constr_2,
83 0,
84 "nonce"
85 },
86 { ATF_NOFLAGS, 0, offsetof(struct RANAP_RSRVCC_Information, iMSInformation),
87 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
88 -1, /* IMPLICIT tag at current level */
89 &asn_DEF_OCTET_STRING,
90 memb_iMSInformation_constraint_1,
91 &asn_PER_memb_iMSInformation_constr_3,
92 0,
93 "iMSInformation"
94 },
95 { ATF_POINTER, 1, offsetof(struct RANAP_RSRVCC_Information, iE_Extensions),
96 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
97 -1, /* IMPLICIT tag at current level */
98 &asn_DEF_RANAP_IE_Extensions,
99 0, /* Defer constraints checking to the member type */
100 0, /* No PER visible constraints */
101 0,
102 "iE-Extensions"
103 },
104};
105static const int asn_MAP_RANAP_RSRVCC_Information_oms_1[] = { 2 };
106static const ber_tlv_tag_t asn_DEF_RANAP_RSRVCC_Information_tags_1[] = {
107 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
108};
109static const asn_TYPE_tag2member_t asn_MAP_RANAP_RSRVCC_Information_tag2el_1[] = {
110 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nonce */
111 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* iMSInformation */
112 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */
113};
114static asn_SEQUENCE_specifics_t asn_SPC_RANAP_RSRVCC_Information_specs_1 = {
115 sizeof(struct RANAP_RSRVCC_Information),
116 offsetof(struct RANAP_RSRVCC_Information, _asn_ctx),
117 asn_MAP_RANAP_RSRVCC_Information_tag2el_1,
118 3, /* Count of tags in the map */
119 asn_MAP_RANAP_RSRVCC_Information_oms_1, /* Optional members */
120 1, 0, /* Root/Additions */
121 2, /* Start extensions */
122 4 /* Stop extensions */
123};
124asn_TYPE_descriptor_t asn_DEF_RANAP_RSRVCC_Information = {
125 "RANAP_RSRVCC-Information",
126 "RANAP_RSRVCC-Information",
127 SEQUENCE_free,
128 SEQUENCE_print,
129 SEQUENCE_constraint,
130 SEQUENCE_decode_ber,
131 SEQUENCE_encode_der,
132 SEQUENCE_decode_xer,
133 SEQUENCE_encode_xer,
134 SEQUENCE_decode_uper,
135 SEQUENCE_encode_uper,
136 SEQUENCE_decode_aper,
137 SEQUENCE_encode_aper,
138 0, /* Use generic outmost tag fetcher */
139 asn_DEF_RANAP_RSRVCC_Information_tags_1,
140 sizeof(asn_DEF_RANAP_RSRVCC_Information_tags_1)
141 /sizeof(asn_DEF_RANAP_RSRVCC_Information_tags_1[0]), /* 1 */
142 asn_DEF_RANAP_RSRVCC_Information_tags_1, /* Same as above */
143 sizeof(asn_DEF_RANAP_RSRVCC_Information_tags_1)
144 /sizeof(asn_DEF_RANAP_RSRVCC_Information_tags_1[0]), /* 1 */
145 0, /* No PER visible constraints */
146 asn_MBR_RANAP_RSRVCC_Information_1,
147 3, /* Elements count */
148 &asn_SPC_RANAP_RSRVCC_Information_specs_1 /* Additional specs */
149};
150