2 * Generated by asn1c-0.9.23 (http://lionet.info/asn1c)
3 * From ASN.1 module "MAP-OM-DataTypes"
4 * found in "../asn1src/MAP-OM-DataTypes.asn"
5 * `asn1c -gen-PER -fskeletons-copy -fnative-types`
8 #include "SGW-InterfaceList.h"
11 SGW_InterfaceList_constraint(asn_TYPE_descriptor_t
*td
, const void *sptr
,
12 asn_app_constraint_failed_f
*ctfailcb
, void *app_key
) {
13 const BIT_STRING_t
*st
= (const BIT_STRING_t
*)sptr
;
17 _ASN_CTFAIL(app_key
, td
, sptr
,
18 "%s: value not given (%s:%d)",
19 td
->name
, __FILE__
, __LINE__
);
25 size
= 8 * st
->size
- (st
->bits_unused
& 0x07);
30 if((size
>= 5 && size
<= 8)) {
31 /* Constraint check succeeded */
34 _ASN_CTFAIL(app_key
, td
, sptr
,
35 "%s: constraint failed (%s:%d)",
36 td
->name
, __FILE__
, __LINE__
);
42 * This type is implemented using BIT_STRING,
43 * so here we adjust the DEF accordingly.
46 SGW_InterfaceList_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t
*td
) {
47 td
->free_struct
= asn_DEF_BIT_STRING
.free_struct
;
48 td
->print_struct
= asn_DEF_BIT_STRING
.print_struct
;
49 td
->ber_decoder
= asn_DEF_BIT_STRING
.ber_decoder
;
50 td
->der_encoder
= asn_DEF_BIT_STRING
.der_encoder
;
51 td
->xer_decoder
= asn_DEF_BIT_STRING
.xer_decoder
;
52 td
->xer_encoder
= asn_DEF_BIT_STRING
.xer_encoder
;
53 td
->uper_decoder
= asn_DEF_BIT_STRING
.uper_decoder
;
54 td
->uper_encoder
= asn_DEF_BIT_STRING
.uper_encoder
;
55 if(!td
->per_constraints
)
56 td
->per_constraints
= asn_DEF_BIT_STRING
.per_constraints
;
57 td
->elements
= asn_DEF_BIT_STRING
.elements
;
58 td
->elements_count
= asn_DEF_BIT_STRING
.elements_count
;
59 td
->specifics
= asn_DEF_BIT_STRING
.specifics
;
63 SGW_InterfaceList_free(asn_TYPE_descriptor_t
*td
,
64 void *struct_ptr
, int contents_only
) {
65 SGW_InterfaceList_1_inherit_TYPE_descriptor(td
);
66 td
->free_struct(td
, struct_ptr
, contents_only
);
70 SGW_InterfaceList_print(asn_TYPE_descriptor_t
*td
, const void *struct_ptr
,
71 int ilevel
, asn_app_consume_bytes_f
*cb
, void *app_key
) {
72 SGW_InterfaceList_1_inherit_TYPE_descriptor(td
);
73 return td
->print_struct(td
, struct_ptr
, ilevel
, cb
, app_key
);
77 SGW_InterfaceList_decode_ber(asn_codec_ctx_t
*opt_codec_ctx
, asn_TYPE_descriptor_t
*td
,
78 void **structure
, const void *bufptr
, size_t size
, int tag_mode
) {
79 SGW_InterfaceList_1_inherit_TYPE_descriptor(td
);
80 return td
->ber_decoder(opt_codec_ctx
, td
, structure
, bufptr
, size
, tag_mode
);
84 SGW_InterfaceList_encode_der(asn_TYPE_descriptor_t
*td
,
85 void *structure
, int tag_mode
, ber_tlv_tag_t tag
,
86 asn_app_consume_bytes_f
*cb
, void *app_key
) {
87 SGW_InterfaceList_1_inherit_TYPE_descriptor(td
);
88 return td
->der_encoder(td
, structure
, tag_mode
, tag
, cb
, app_key
);
92 SGW_InterfaceList_decode_xer(asn_codec_ctx_t
*opt_codec_ctx
, asn_TYPE_descriptor_t
*td
,
93 void **structure
, const char *opt_mname
, const void *bufptr
, size_t size
) {
94 SGW_InterfaceList_1_inherit_TYPE_descriptor(td
);
95 return td
->xer_decoder(opt_codec_ctx
, td
, structure
, opt_mname
, bufptr
, size
);
99 SGW_InterfaceList_encode_xer(asn_TYPE_descriptor_t
*td
, void *structure
,
100 int ilevel
, enum xer_encoder_flags_e flags
,
101 asn_app_consume_bytes_f
*cb
, void *app_key
) {
102 SGW_InterfaceList_1_inherit_TYPE_descriptor(td
);
103 return td
->xer_encoder(td
, structure
, ilevel
, flags
, cb
, app_key
);
107 SGW_InterfaceList_decode_uper(asn_codec_ctx_t
*opt_codec_ctx
, asn_TYPE_descriptor_t
*td
,
108 asn_per_constraints_t
*constraints
, void **structure
, asn_per_data_t
*per_data
) {
109 SGW_InterfaceList_1_inherit_TYPE_descriptor(td
);
110 return td
->uper_decoder(opt_codec_ctx
, td
, constraints
, structure
, per_data
);
114 SGW_InterfaceList_encode_uper(asn_TYPE_descriptor_t
*td
,
115 asn_per_constraints_t
*constraints
,
116 void *structure
, asn_per_outp_t
*per_out
) {
117 SGW_InterfaceList_1_inherit_TYPE_descriptor(td
);
118 return td
->uper_encoder(td
, constraints
, structure
, per_out
);
121 static asn_per_constraints_t asn_PER_type_SGW_InterfaceList_constr_1
= {
122 { APC_UNCONSTRAINED
, -1, -1, 0, 0 },
123 { APC_CONSTRAINED
, 2, 2, 5, 8 } /* (SIZE(5..8)) */,
124 0, 0 /* No PER value map */
126 static ber_tlv_tag_t asn_DEF_SGW_InterfaceList_tags_1
[] = {
127 (ASN_TAG_CLASS_UNIVERSAL
| (3 << 2))
129 asn_TYPE_descriptor_t asn_DEF_SGW_InterfaceList
= {
132 SGW_InterfaceList_free
,
133 SGW_InterfaceList_print
,
134 SGW_InterfaceList_constraint
,
135 SGW_InterfaceList_decode_ber
,
136 SGW_InterfaceList_encode_der
,
137 SGW_InterfaceList_decode_xer
,
138 SGW_InterfaceList_encode_xer
,
139 SGW_InterfaceList_decode_uper
,
140 SGW_InterfaceList_encode_uper
,
141 0, /* Use generic outmost tag fetcher */
142 asn_DEF_SGW_InterfaceList_tags_1
,
143 sizeof(asn_DEF_SGW_InterfaceList_tags_1
)
144 /sizeof(asn_DEF_SGW_InterfaceList_tags_1
[0]), /* 1 */
145 asn_DEF_SGW_InterfaceList_tags_1
, /* Same as above */
146 sizeof(asn_DEF_SGW_InterfaceList_tags_1
)
147 /sizeof(asn_DEF_SGW_InterfaceList_tags_1
[0]), /* 1 */
148 &asn_PER_type_SGW_InterfaceList_constr_1
,
149 0, 0, /* Defined elsewhere */