]> git.stg.codes - stg.git/blob - libs/smux/RRspPDU.c
Remove std::list from tariffs.
[stg.git] / libs / smux / RRspPDU.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 "RRspPDU.h"
11
12 int
13 RRspPDU_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
14                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
15         /* Replace with underlying type checker */
16         td->check_constraints = asn_DEF_INTEGER.check_constraints;
17         return td->check_constraints(td, sptr, ctfailcb, app_key);
18 }
19
20 /*
21  * This type is implemented using INTEGER,
22  * so here we adjust the DEF accordingly.
23  */
24 static void
25 RRspPDU_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
26         td->free_struct    = asn_DEF_INTEGER.free_struct;
27         td->print_struct   = asn_DEF_INTEGER.print_struct;
28         td->ber_decoder    = asn_DEF_INTEGER.ber_decoder;
29         td->der_encoder    = asn_DEF_INTEGER.der_encoder;
30         td->xer_decoder    = asn_DEF_INTEGER.xer_decoder;
31         td->xer_encoder    = asn_DEF_INTEGER.xer_encoder;
32         td->uper_decoder   = asn_DEF_INTEGER.uper_decoder;
33         td->uper_encoder   = asn_DEF_INTEGER.uper_encoder;
34         if(!td->per_constraints)
35                 td->per_constraints = asn_DEF_INTEGER.per_constraints;
36         td->elements       = asn_DEF_INTEGER.elements;
37         td->elements_count = asn_DEF_INTEGER.elements_count;
38         td->specifics      = asn_DEF_INTEGER.specifics;
39 }
40
41 void
42 RRspPDU_free(asn_TYPE_descriptor_t *td,
43                 void *struct_ptr, int contents_only) {
44         RRspPDU_1_inherit_TYPE_descriptor(td);
45         td->free_struct(td, struct_ptr, contents_only);
46 }
47
48 int
49 RRspPDU_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
50                 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
51         RRspPDU_1_inherit_TYPE_descriptor(td);
52         return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
53 }
54
55 asn_dec_rval_t
56 RRspPDU_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
57                 void **structure, const void *bufptr, size_t size, int tag_mode) {
58         RRspPDU_1_inherit_TYPE_descriptor(td);
59         return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
60 }
61
62 asn_enc_rval_t
63 RRspPDU_encode_der(asn_TYPE_descriptor_t *td,
64                 void *structure, int tag_mode, ber_tlv_tag_t tag,
65                 asn_app_consume_bytes_f *cb, void *app_key) {
66         RRspPDU_1_inherit_TYPE_descriptor(td);
67         return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
68 }
69
70 asn_dec_rval_t
71 RRspPDU_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
72                 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
73         RRspPDU_1_inherit_TYPE_descriptor(td);
74         return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
75 }
76
77 asn_enc_rval_t
78 RRspPDU_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
79                 int ilevel, enum xer_encoder_flags_e flags,
80                 asn_app_consume_bytes_f *cb, void *app_key) {
81         RRspPDU_1_inherit_TYPE_descriptor(td);
82         return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
83 }
84
85 static ber_tlv_tag_t asn_DEF_RRspPDU_tags_1[] = {
86         (ASN_TAG_CLASS_APPLICATION | (3 << 2)),
87         (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
88 };
89 asn_TYPE_descriptor_t asn_DEF_RRspPDU = {
90         "RRspPDU",
91         "RRspPDU",
92         RRspPDU_free,
93         RRspPDU_print,
94         RRspPDU_constraint,
95         RRspPDU_decode_ber,
96         RRspPDU_encode_der,
97         RRspPDU_decode_xer,
98         RRspPDU_encode_xer,
99         0, 0,   /* No PER support, use "-gen-PER" to enable */
100         0,      /* Use generic outmost tag fetcher */
101         asn_DEF_RRspPDU_tags_1,
102         sizeof(asn_DEF_RRspPDU_tags_1)
103                 /sizeof(asn_DEF_RRspPDU_tags_1[0]) - 1, /* 1 */
104         asn_DEF_RRspPDU_tags_1, /* Same as above */
105         sizeof(asn_DEF_RRspPDU_tags_1)
106                 /sizeof(asn_DEF_RRspPDU_tags_1[0]), /* 2 */
107         0,      /* No PER visible constraints */
108         0, 0,   /* Defined elsewhere */
109         0       /* No specifics */
110 };
111