blob: bd781e042b8ec3a215a69bfa95ab9427491a2bbd [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_SRVCC-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 asn_per_constraints_t asn_PER_memb_nonce_constr_2 GCC_NOTUSED = {
41 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
42 { APC_CONSTRAINED, 0, 0, 128l, 128l } /* (SIZE(128..128)) */,
43 0, 0 /* No PER value map */
44};
45static asn_TYPE_member_t asn_MBR_RANAP_SRVCC_Information_1[] = {
46 { ATF_NOFLAGS, 0, offsetof(struct RANAP_SRVCC_Information, nonce),
47 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
48 -1, /* IMPLICIT tag at current level */
49 &asn_DEF_BIT_STRING,
50 memb_nonce_constraint_1,
51 &asn_PER_memb_nonce_constr_2,
52 0,
53 "nonce"
54 },
55 { ATF_POINTER, 1, offsetof(struct RANAP_SRVCC_Information, iE_Extensions),
56 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
57 -1, /* IMPLICIT tag at current level */
58 &asn_DEF_RANAP_IE_Extensions,
59 0, /* Defer constraints checking to the member type */
60 0, /* No PER visible constraints */
61 0,
62 "iE-Extensions"
63 },
64};
65static const int asn_MAP_RANAP_SRVCC_Information_oms_1[] = { 1 };
66static const ber_tlv_tag_t asn_DEF_RANAP_SRVCC_Information_tags_1[] = {
67 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
68};
69static const asn_TYPE_tag2member_t asn_MAP_RANAP_SRVCC_Information_tag2el_1[] = {
70 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nonce */
71 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */
72};
73static asn_SEQUENCE_specifics_t asn_SPC_RANAP_SRVCC_Information_specs_1 = {
74 sizeof(struct RANAP_SRVCC_Information),
75 offsetof(struct RANAP_SRVCC_Information, _asn_ctx),
76 asn_MAP_RANAP_SRVCC_Information_tag2el_1,
77 2, /* Count of tags in the map */
78 asn_MAP_RANAP_SRVCC_Information_oms_1, /* Optional members */
79 1, 0, /* Root/Additions */
80 1, /* Start extensions */
81 3 /* Stop extensions */
82};
83asn_TYPE_descriptor_t asn_DEF_RANAP_SRVCC_Information = {
84 "RANAP_SRVCC-Information",
85 "RANAP_SRVCC-Information",
86 SEQUENCE_free,
87 SEQUENCE_print,
88 SEQUENCE_constraint,
89 SEQUENCE_decode_ber,
90 SEQUENCE_encode_der,
91 SEQUENCE_decode_xer,
92 SEQUENCE_encode_xer,
93 SEQUENCE_decode_uper,
94 SEQUENCE_encode_uper,
95 SEQUENCE_decode_aper,
96 SEQUENCE_encode_aper,
97 0, /* Use generic outmost tag fetcher */
98 asn_DEF_RANAP_SRVCC_Information_tags_1,
99 sizeof(asn_DEF_RANAP_SRVCC_Information_tags_1)
100 /sizeof(asn_DEF_RANAP_SRVCC_Information_tags_1[0]), /* 1 */
101 asn_DEF_RANAP_SRVCC_Information_tags_1, /* Same as above */
102 sizeof(asn_DEF_RANAP_SRVCC_Information_tags_1)
103 /sizeof(asn_DEF_RANAP_SRVCC_Information_tags_1[0]), /* 1 */
104 0, /* No PER visible constraints */
105 asn_MBR_RANAP_SRVCC_Information_1,
106 2, /* Elements count */
107 &asn_SPC_RANAP_SRVCC_Information_specs_1 /* Additional specs */
108};
109