]> git.stg.codes - stg.git/blob - libs/smux/ClosePDU.c
Fix Boost package name.
[stg.git] / libs / smux / ClosePDU.c
1 /*
2  * Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
3  * From ASN.1 module "SMUX"
4  *      found in "SMUX.asn1"
5  *      `asn1c -S/mnt/data/software/asn1c/skeletons -fcompound-names -fwide-types`
6  */
7
8 #include "ClosePDU.h"
9
10 int
11 ClosePDU_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
12                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13         /* Replace with underlying type checker */
14         td->check_constraints = asn_DEF_INTEGER.check_constraints;
15         return td->check_constraints(td, sptr, ctfailcb, app_key);
16 }
17
18 /*
19  * This type is implemented using INTEGER,
20  * so here we adjust the DEF accordingly.
21  */
22 static void
23 ClosePDU_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
24         td->free_struct    = asn_DEF_INTEGER.free_struct;
25         td->print_struct   = asn_DEF_INTEGER.print_struct;
26         td->check_constraints = asn_DEF_INTEGER.check_constraints;
27         td->ber_decoder    = asn_DEF_INTEGER.ber_decoder;
28         td->der_encoder    = asn_DEF_INTEGER.der_encoder;
29         td->xer_decoder    = asn_DEF_INTEGER.xer_decoder;
30         td->xer_encoder    = asn_DEF_INTEGER.xer_encoder;
31         td->uper_decoder   = asn_DEF_INTEGER.uper_decoder;
32         td->uper_encoder   = asn_DEF_INTEGER.uper_encoder;
33         if(!td->per_constraints)
34                 td->per_constraints = asn_DEF_INTEGER.per_constraints;
35         td->elements       = asn_DEF_INTEGER.elements;
36         td->elements_count = asn_DEF_INTEGER.elements_count;
37         td->specifics      = asn_DEF_INTEGER.specifics;
38 }
39
40 void
41 ClosePDU_free(asn_TYPE_descriptor_t *td,
42                 void *struct_ptr, int contents_only) {
43         ClosePDU_1_inherit_TYPE_descriptor(td);
44         td->free_struct(td, struct_ptr, contents_only);
45 }
46
47 int
48 ClosePDU_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
49                 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
50         ClosePDU_1_inherit_TYPE_descriptor(td);
51         return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
52 }
53
54 asn_dec_rval_t
55 ClosePDU_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
56                 void **structure, const void *bufptr, size_t size, int tag_mode) {
57         ClosePDU_1_inherit_TYPE_descriptor(td);
58         return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
59 }
60
61 asn_enc_rval_t
62 ClosePDU_encode_der(asn_TYPE_descriptor_t *td,
63                 void *structure, int tag_mode, ber_tlv_tag_t tag,
64                 asn_app_consume_bytes_f *cb, void *app_key) {
65         ClosePDU_1_inherit_TYPE_descriptor(td);
66         return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
67 }
68
69 asn_dec_rval_t
70 ClosePDU_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
71                 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
72         ClosePDU_1_inherit_TYPE_descriptor(td);
73         return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
74 }
75
76 asn_enc_rval_t
77 ClosePDU_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
78                 int ilevel, enum xer_encoder_flags_e flags,
79                 asn_app_consume_bytes_f *cb, void *app_key) {
80         ClosePDU_1_inherit_TYPE_descriptor(td);
81         return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
82 }
83
84 static const ber_tlv_tag_t asn_DEF_ClosePDU_tags_1[] = {
85         (ASN_TAG_CLASS_APPLICATION | (1 << 2)),
86         (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
87 };
88 asn_TYPE_descriptor_t asn_DEF_ClosePDU = {
89         "ClosePDU",
90         "ClosePDU",
91         ClosePDU_free,
92         ClosePDU_print,
93         ClosePDU_constraint,
94         ClosePDU_decode_ber,
95         ClosePDU_encode_der,
96         ClosePDU_decode_xer,
97         ClosePDU_encode_xer,
98         0, 0,   /* No PER support, use "-gen-PER" to enable */
99         0,      /* Use generic outmost tag fetcher */
100         asn_DEF_ClosePDU_tags_1,
101         sizeof(asn_DEF_ClosePDU_tags_1)
102                 /sizeof(asn_DEF_ClosePDU_tags_1[0]) - 1, /* 1 */
103         asn_DEF_ClosePDU_tags_1,        /* Same as above */
104         sizeof(asn_DEF_ClosePDU_tags_1)
105                 /sizeof(asn_DEF_ClosePDU_tags_1[0]), /* 2 */
106         0,      /* No PER visible constraints */
107         0, 0,   /* Defined elsewhere */
108         0       /* No specifics */
109 };
110