]> git.stg.codes - stg.git/blob - libs/smux/RReqPDU.c
b19c3548e12e4c7655af89ec8f16e5695db469a7
[stg.git] / libs / smux / RReqPDU.c
1 /*
2  * Generated by asn1c-0.9.21 (http://lionet.info/asn1c)
3  * From ASN.1 module "SMUX"
4  *      found in "SMUX.asn1"
5  *      `asn1c -fskeletons-copy`
6  */
7
8 #include <asn_internal.h>
9
10 #include "RReqPDU.h"
11
12 static int
13 memb_priority_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
14                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
15         long value;
16         
17         if(!sptr) {
18                 _ASN_CTFAIL(app_key, td, sptr,
19                         "%s: value not given (%s:%d)",
20                         td->name, __FILE__, __LINE__);
21                 return -1;
22         }
23         
24         value = *(const long *)sptr;
25         
26         if((value >= -1 && value <= 2147483647)) {
27                 /* Constraint check succeeded */
28                 return 0;
29         } else {
30                 _ASN_CTFAIL(app_key, td, sptr,
31                         "%s: constraint failed (%s:%d)",
32                         td->name, __FILE__, __LINE__);
33                 return -1;
34         }
35 }
36
37 static asn_TYPE_member_t asn_MBR_RReqPDU_1[] = {
38         { ATF_NOFLAGS, 0, offsetof(struct RReqPDU, subtree),
39                 (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)),
40                 0,
41                 &asn_DEF_ObjectName,
42                 0,      /* Defer constraints checking to the member type */
43                 0,      /* PER is not compiled, use -gen-PER */
44                 0,
45                 "subtree"
46                 },
47         { ATF_NOFLAGS, 0, offsetof(struct RReqPDU, priority),
48                 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
49                 0,
50                 &asn_DEF_NativeInteger,
51                 memb_priority_constraint_1,
52                 0,      /* PER is not compiled, use -gen-PER */
53                 0,
54                 "priority"
55                 },
56         { ATF_NOFLAGS, 0, offsetof(struct RReqPDU, operation),
57                 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
58                 0,
59                 &asn_DEF_INTEGER,
60                 0,      /* Defer constraints checking to the member type */
61                 0,      /* PER is not compiled, use -gen-PER */
62                 0,
63                 "operation"
64                 },
65 };
66 static ber_tlv_tag_t asn_DEF_RReqPDU_tags_1[] = {
67         (ASN_TAG_CLASS_APPLICATION | (2 << 2)),
68         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
69 };
70 static asn_TYPE_tag2member_t asn_MAP_RReqPDU_tag2el_1[] = {
71     { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 1 }, /* priority at 96 */
72     { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -1, 0 }, /* operation at 101 */
73     { (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 0, 0, 0 } /* subtree at 93 */
74 };
75 static asn_SEQUENCE_specifics_t asn_SPC_RReqPDU_specs_1 = {
76         sizeof(struct RReqPDU),
77         offsetof(struct RReqPDU, _asn_ctx),
78         asn_MAP_RReqPDU_tag2el_1,
79         3,      /* Count of tags in the map */
80         0, 0, 0,        /* Optional elements (not needed) */
81         -1,     /* Start extensions */
82         -1      /* Stop extensions */
83 };
84 asn_TYPE_descriptor_t asn_DEF_RReqPDU = {
85         "RReqPDU",
86         "RReqPDU",
87         SEQUENCE_free,
88         SEQUENCE_print,
89         SEQUENCE_constraint,
90         SEQUENCE_decode_ber,
91         SEQUENCE_encode_der,
92         SEQUENCE_decode_xer,
93         SEQUENCE_encode_xer,
94         0, 0,   /* No PER support, use "-gen-PER" to enable */
95         0,      /* Use generic outmost tag fetcher */
96         asn_DEF_RReqPDU_tags_1,
97         sizeof(asn_DEF_RReqPDU_tags_1)
98                 /sizeof(asn_DEF_RReqPDU_tags_1[0]) - 1, /* 1 */
99         asn_DEF_RReqPDU_tags_1, /* Same as above */
100         sizeof(asn_DEF_RReqPDU_tags_1)
101                 /sizeof(asn_DEF_RReqPDU_tags_1[0]), /* 2 */
102         0,      /* No PER visible constraints */
103         asn_MBR_RReqPDU_1,
104         3,      /* Elements count */
105         &asn_SPC_RReqPDU_specs_1        /* Additional specs */
106 };
107