blob: d0bdb28b440955c5097ab42e693e4bdebd23e394 [file] [log] [blame]
Harald Welte3aa901d2018-08-13 18:32:36 +02001/*
2 * Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
3 * From ASN.1 module "RSPRO"
4 * found in "../../asn1/RSPRO.asn"
5 */
6
7#include <osmocom/rspro/RsproPDU.h>
8
9static int
10memb_version_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
11 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
12 long value;
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 value = *(const long *)sptr;
22
23 if((value >= 0l && value <= 32l)) {
24 /* Constraint check succeeded */
25 return 0;
26 } else {
27 _ASN_CTFAIL(app_key, td, sptr,
28 "%s: constraint failed (%s:%d)",
29 td->name, __FILE__, __LINE__);
30 return -1;
31 }
32}
33
Harald Welte3aa901d2018-08-13 18:32:36 +020034static asn_TYPE_member_t asn_MBR_RsproPDU_1[] = {
Harald Welte293478c2018-09-24 14:49:41 +020035 { ATF_NOFLAGS, 0, offsetof(struct RsproPDU, version),
Harald Welte3aa901d2018-08-13 18:32:36 +020036 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
37 -1, /* IMPLICIT tag at current level */
38 &asn_DEF_NativeInteger,
39 memb_version_constraint_1,
40 0, /* PER is not compiled, use -gen-PER */
Harald Welte293478c2018-09-24 14:49:41 +020041 0,
Harald Welte3aa901d2018-08-13 18:32:36 +020042 "version"
43 },
44 { ATF_NOFLAGS, 0, offsetof(struct RsproPDU, tag),
45 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
46 -1, /* IMPLICIT tag at current level */
47 &asn_DEF_OperationTag,
48 0, /* Defer constraints checking to the member type */
49 0, /* PER is not compiled, use -gen-PER */
50 0,
51 "tag"
52 },
53 { ATF_NOFLAGS, 0, offsetof(struct RsproPDU, msg),
54 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
55 +1, /* EXPLICIT tag at current level */
56 &asn_DEF_RsproPDUchoice,
57 0, /* Defer constraints checking to the member type */
58 0, /* PER is not compiled, use -gen-PER */
59 0,
60 "msg"
61 },
62};
63static const ber_tlv_tag_t asn_DEF_RsproPDU_tags_1[] = {
64 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
65};
66static const asn_TYPE_tag2member_t asn_MAP_RsproPDU_tag2el_1[] = {
67 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */
68 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* tag */
69 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* msg */
70};
71static asn_SEQUENCE_specifics_t asn_SPC_RsproPDU_specs_1 = {
72 sizeof(struct RsproPDU),
73 offsetof(struct RsproPDU, _asn_ctx),
74 asn_MAP_RsproPDU_tag2el_1,
75 3, /* Count of tags in the map */
76 0, 0, 0, /* Optional elements (not needed) */
77 -1, /* Start extensions */
78 -1 /* Stop extensions */
79};
80asn_TYPE_descriptor_t asn_DEF_RsproPDU = {
81 "RsproPDU",
82 "RsproPDU",
83 SEQUENCE_free,
84 SEQUENCE_print,
85 SEQUENCE_constraint,
86 SEQUENCE_decode_ber,
87 SEQUENCE_encode_der,
88 SEQUENCE_decode_xer,
89 SEQUENCE_encode_xer,
90 0, 0, /* No UPER support, use "-gen-PER" to enable */
91 0, 0, /* No APER support, use "-gen-PER" to enable */
92 0, /* Use generic outmost tag fetcher */
93 asn_DEF_RsproPDU_tags_1,
94 sizeof(asn_DEF_RsproPDU_tags_1)
95 /sizeof(asn_DEF_RsproPDU_tags_1[0]), /* 1 */
96 asn_DEF_RsproPDU_tags_1, /* Same as above */
97 sizeof(asn_DEF_RsproPDU_tags_1)
98 /sizeof(asn_DEF_RsproPDU_tags_1[0]), /* 1 */
99 0, /* No PER visible constraints */
100 asn_MBR_RsproPDU_1,
101 3, /* Elements count */
102 &asn_SPC_RsproPDU_specs_1 /* Additional specs */
103};
104