vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 1 | |
vlm | 6e1b13e | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 2 | /*** <<< INCLUDES [PrimitiveType] >>> ***/ |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 3 | |
| 4 | #include <OCTET_STRING.h> |
| 5 | |
| 6 | /*** <<< TYPE-DECLS [PrimitiveType] >>> ***/ |
| 7 | |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 8 | typedef OCTET_STRING_t PrimitiveType_t; |
| 9 | |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 10 | /*** <<< FUNC-DECLS [PrimitiveType] >>> ***/ |
| 11 | |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 12 | extern asn_TYPE_descriptor_t asn_DEF_PrimitiveType; |
| 13 | asn_struct_free_f PrimitiveType_free; |
| 14 | asn_struct_print_f PrimitiveType_print; |
| 15 | asn_constr_check_f PrimitiveType_constraint; |
| 16 | ber_type_decoder_f PrimitiveType_decode_ber; |
| 17 | der_type_encoder_f PrimitiveType_encode_der; |
| 18 | xer_type_decoder_f PrimitiveType_decode_xer; |
| 19 | xer_type_encoder_f PrimitiveType_encode_xer; |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 20 | |
vlm | 21e4600 | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 21 | /*** <<< CODE [PrimitiveType] >>> ***/ |
| 22 | |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 23 | int |
| 24 | PrimitiveType_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 25 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 26 | /* Replace with underlying type checker */ |
| 27 | td->check_constraints = asn_DEF_OCTET_STRING.check_constraints; |
| 28 | return td->check_constraints(td, sptr, app_errlog, app_key); |
| 29 | } |
| 30 | |
| 31 | /* |
| 32 | * This type is implemented using OCTET_STRING, |
| 33 | * so here we adjust the DEF accordingly. |
| 34 | */ |
| 35 | static void |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 36 | PrimitiveType_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 37 | td->free_struct = asn_DEF_OCTET_STRING.free_struct; |
| 38 | td->print_struct = asn_DEF_OCTET_STRING.print_struct; |
| 39 | td->ber_decoder = asn_DEF_OCTET_STRING.ber_decoder; |
| 40 | td->der_encoder = asn_DEF_OCTET_STRING.der_encoder; |
| 41 | td->xer_decoder = asn_DEF_OCTET_STRING.xer_decoder; |
| 42 | td->xer_encoder = asn_DEF_OCTET_STRING.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 43 | td->uper_decoder = asn_DEF_OCTET_STRING.uper_decoder; |
| 44 | if(!td->per_constraints) |
| 45 | td->per_constraints = asn_DEF_OCTET_STRING.per_constraints; |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 46 | td->elements = asn_DEF_OCTET_STRING.elements; |
| 47 | td->elements_count = asn_DEF_OCTET_STRING.elements_count; |
| 48 | td->specifics = asn_DEF_OCTET_STRING.specifics; |
| 49 | } |
| 50 | |
| 51 | void |
| 52 | PrimitiveType_free(asn_TYPE_descriptor_t *td, |
| 53 | void *struct_ptr, int contents_only) { |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 54 | PrimitiveType_1_inherit_TYPE_descriptor(td); |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 55 | td->free_struct(td, struct_ptr, contents_only); |
| 56 | } |
| 57 | |
| 58 | int |
| 59 | PrimitiveType_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 60 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 61 | PrimitiveType_1_inherit_TYPE_descriptor(td); |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 62 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 63 | } |
| 64 | |
| 65 | asn_dec_rval_t |
| 66 | PrimitiveType_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
vlm | c04faea | 2005-03-17 21:57:19 +0000 | [diff] [blame] | 67 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 68 | PrimitiveType_1_inherit_TYPE_descriptor(td); |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 69 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 70 | } |
| 71 | |
| 72 | asn_enc_rval_t |
| 73 | PrimitiveType_encode_der(asn_TYPE_descriptor_t *td, |
| 74 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 75 | asn_app_consume_bytes_f *cb, void *app_key) { |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 76 | PrimitiveType_1_inherit_TYPE_descriptor(td); |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 77 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 78 | } |
| 79 | |
| 80 | asn_dec_rval_t |
| 81 | PrimitiveType_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
vlm | c04faea | 2005-03-17 21:57:19 +0000 | [diff] [blame] | 82 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 83 | PrimitiveType_1_inherit_TYPE_descriptor(td); |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 84 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 85 | } |
| 86 | |
| 87 | asn_enc_rval_t |
| 88 | PrimitiveType_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 89 | int ilevel, enum xer_encoder_flags_e flags, |
| 90 | asn_app_consume_bytes_f *cb, void *app_key) { |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 91 | PrimitiveType_1_inherit_TYPE_descriptor(td); |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 92 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 93 | } |
| 94 | |
| 95 | |
| 96 | /*** <<< STAT-DEFS [PrimitiveType] >>> ***/ |
| 97 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 98 | static ber_tlv_tag_t asn_DEF_PrimitiveType_tags_1[] = { |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 99 | (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) |
| 100 | }; |
| 101 | asn_TYPE_descriptor_t asn_DEF_PrimitiveType = { |
| 102 | "PrimitiveType", |
| 103 | "PrimitiveType", |
| 104 | PrimitiveType_free, |
| 105 | PrimitiveType_print, |
| 106 | PrimitiveType_constraint, |
| 107 | PrimitiveType_decode_ber, |
| 108 | PrimitiveType_encode_der, |
| 109 | PrimitiveType_decode_xer, |
| 110 | PrimitiveType_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 111 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 112 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 113 | asn_DEF_PrimitiveType_tags_1, |
| 114 | sizeof(asn_DEF_PrimitiveType_tags_1) |
| 115 | /sizeof(asn_DEF_PrimitiveType_tags_1[0]), /* 1 */ |
| 116 | asn_DEF_PrimitiveType_tags_1, /* Same as above */ |
| 117 | sizeof(asn_DEF_PrimitiveType_tags_1) |
| 118 | /sizeof(asn_DEF_PrimitiveType_tags_1[0]), /* 1 */ |
| 119 | 0, /* No PER visible constraints */ |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 120 | 0, 0, /* No members */ |
| 121 | 0 /* No specifics */ |
| 122 | }; |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 123 | |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 124 | |
vlm | 6e1b13e | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 125 | /*** <<< INCLUDES [ConstructedType] >>> ***/ |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 126 | |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 127 | #include <PrimitiveType.h> |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 128 | #include <constr_SEQUENCE.h> |
| 129 | |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 130 | /*** <<< TYPE-DECLS [ConstructedType] >>> ***/ |
| 131 | |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 132 | typedef struct ConstructedType { |
| 133 | PrimitiveType_t field; |
| 134 | |
| 135 | /* Context for parsing across buffer boundaries */ |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 136 | asn_struct_ctx_t _asn_ctx; |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 137 | } ConstructedType_t; |
| 138 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 139 | /*** <<< FUNC-DECLS [ConstructedType] >>> ***/ |
| 140 | |
| 141 | extern asn_TYPE_descriptor_t asn_DEF_ConstructedType; |
| 142 | |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 143 | /*** <<< STAT-DEFS [ConstructedType] >>> ***/ |
| 144 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 145 | static asn_TYPE_member_t asn_MBR_ConstructedType_1[] = { |
vlm | ddd5a7d | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 146 | { ATF_NOFLAGS, 0, offsetof(struct ConstructedType, field), |
vlm | 21e4600 | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 147 | .tag = (ASN_TAG_CLASS_CONTEXT | (5 << 2)), |
| 148 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 149 | .type = &asn_DEF_PrimitiveType, |
vlm | 0a9af51 | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 150 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 151 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 152 | .default_value = 0, |
vlm | 21e4600 | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 153 | .name = "field" |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 154 | }, |
| 155 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 156 | static ber_tlv_tag_t asn_DEF_ConstructedType_tags_1[] = { |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 157 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 158 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 159 | static asn_TYPE_tag2member_t asn_MAP_ConstructedType_tag2el_1[] = { |
vlm | 3b0d1e5 | 2005-02-25 08:24:19 +0000 | [diff] [blame] | 160 | { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 0, 0, 0 } /* field at 18 */ |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 161 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 162 | static asn_SEQUENCE_specifics_t asn_SPC_ConstructedType_specs_1 = { |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 163 | sizeof(struct ConstructedType), |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 164 | offsetof(struct ConstructedType, _asn_ctx), |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 165 | asn_MAP_ConstructedType_tag2el_1, |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 166 | 1, /* Count of tags in the map */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 167 | 0, 0, 0, /* Optional elements (not needed) */ |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 168 | -1, /* Start extensions */ |
| 169 | -1 /* Stop extensions */ |
| 170 | }; |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 171 | asn_TYPE_descriptor_t asn_DEF_ConstructedType = { |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 172 | "ConstructedType", |
vlm | 9de248e | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 173 | "ConstructedType", |
vlm | 39ba4c4 | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 174 | SEQUENCE_free, |
| 175 | SEQUENCE_print, |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 176 | SEQUENCE_constraint, |
| 177 | SEQUENCE_decode_ber, |
| 178 | SEQUENCE_encode_der, |
vlm | 2dbab7c | 2004-10-23 15:07:45 +0000 | [diff] [blame] | 179 | SEQUENCE_decode_xer, |
vlm | 39ba4c4 | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 180 | SEQUENCE_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 181 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 182 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 183 | asn_DEF_ConstructedType_tags_1, |
| 184 | sizeof(asn_DEF_ConstructedType_tags_1) |
| 185 | /sizeof(asn_DEF_ConstructedType_tags_1[0]), /* 1 */ |
| 186 | asn_DEF_ConstructedType_tags_1, /* Same as above */ |
| 187 | sizeof(asn_DEF_ConstructedType_tags_1) |
| 188 | /sizeof(asn_DEF_ConstructedType_tags_1[0]), /* 1 */ |
| 189 | 0, /* No PER visible constraints */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 190 | asn_MBR_ConstructedType_1, |
vlm | 21e4600 | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 191 | 1, /* Elements count */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 192 | &asn_SPC_ConstructedType_specs_1 /* Additional specs */ |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 193 | }; |
| 194 | |
| 195 | |
vlm | 6e1b13e | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 196 | /*** <<< INCLUDES [T] >>> ***/ |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 197 | |
| 198 | #include <ConstructedType.h> |
| 199 | |
| 200 | /*** <<< TYPE-DECLS [T] >>> ***/ |
| 201 | |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 202 | typedef ConstructedType_t T_t; |
| 203 | |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 204 | /*** <<< FUNC-DECLS [T] >>> ***/ |
| 205 | |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 206 | extern asn_TYPE_descriptor_t asn_DEF_T; |
vlm | 39ba4c4 | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 207 | asn_struct_free_f T_free; |
| 208 | asn_struct_print_f T_print; |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 209 | asn_constr_check_f T_constraint; |
| 210 | ber_type_decoder_f T_decode_ber; |
| 211 | der_type_encoder_f T_encode_der; |
vlm | a6af74c | 2004-10-23 13:26:56 +0000 | [diff] [blame] | 212 | xer_type_decoder_f T_decode_xer; |
vlm | 39ba4c4 | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 213 | xer_type_encoder_f T_encode_xer; |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 214 | |
vlm | 21e4600 | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 215 | /*** <<< CODE [T] >>> ***/ |
| 216 | |
| 217 | int |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 218 | T_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | 21e4600 | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 219 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
vlm | aafc941 | 2004-09-26 13:12:56 +0000 | [diff] [blame] | 220 | /* Replace with underlying type checker */ |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 221 | td->check_constraints = asn_DEF_ConstructedType.check_constraints; |
vlm | aafc941 | 2004-09-26 13:12:56 +0000 | [diff] [blame] | 222 | return td->check_constraints(td, sptr, app_errlog, app_key); |
vlm | 21e4600 | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 223 | } |
| 224 | |
| 225 | /* |
| 226 | * This type is implemented using ConstructedType, |
vlm | cb0b7fc | 2004-09-23 22:14:58 +0000 | [diff] [blame] | 227 | * so here we adjust the DEF accordingly. |
vlm | 21e4600 | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 228 | */ |
| 229 | static void |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 230 | T_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 231 | td->free_struct = asn_DEF_ConstructedType.free_struct; |
| 232 | td->print_struct = asn_DEF_ConstructedType.print_struct; |
| 233 | td->ber_decoder = asn_DEF_ConstructedType.ber_decoder; |
| 234 | td->der_encoder = asn_DEF_ConstructedType.der_encoder; |
| 235 | td->xer_decoder = asn_DEF_ConstructedType.xer_decoder; |
| 236 | td->xer_encoder = asn_DEF_ConstructedType.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 237 | td->uper_decoder = asn_DEF_ConstructedType.uper_decoder; |
| 238 | if(!td->per_constraints) |
| 239 | td->per_constraints = asn_DEF_ConstructedType.per_constraints; |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 240 | td->elements = asn_DEF_ConstructedType.elements; |
| 241 | td->elements_count = asn_DEF_ConstructedType.elements_count; |
| 242 | td->specifics = asn_DEF_ConstructedType.specifics; |
vlm | 21e4600 | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 243 | } |
| 244 | |
vlm | 39ba4c4 | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 245 | void |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 246 | T_free(asn_TYPE_descriptor_t *td, |
vlm | 39ba4c4 | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 247 | void *struct_ptr, int contents_only) { |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 248 | T_1_inherit_TYPE_descriptor(td); |
vlm | 39ba4c4 | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 249 | td->free_struct(td, struct_ptr, contents_only); |
vlm | 21e4600 | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 250 | } |
| 251 | |
| 252 | int |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 253 | T_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
vlm | 21e4600 | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 254 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 255 | T_1_inherit_TYPE_descriptor(td); |
vlm | 21e4600 | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 256 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 257 | } |
| 258 | |
vlm | 9de248e | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 259 | asn_dec_rval_t |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 260 | T_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
vlm | c04faea | 2005-03-17 21:57:19 +0000 | [diff] [blame] | 261 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 262 | T_1_inherit_TYPE_descriptor(td); |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 263 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
vlm | 39ba4c4 | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 264 | } |
| 265 | |
| 266 | asn_enc_rval_t |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 267 | T_encode_der(asn_TYPE_descriptor_t *td, |
vlm | 39ba4c4 | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 268 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 269 | asn_app_consume_bytes_f *cb, void *app_key) { |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 270 | T_1_inherit_TYPE_descriptor(td); |
vlm | 39ba4c4 | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 271 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 272 | } |
| 273 | |
vlm | a6af74c | 2004-10-23 13:26:56 +0000 | [diff] [blame] | 274 | asn_dec_rval_t |
| 275 | T_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
vlm | c04faea | 2005-03-17 21:57:19 +0000 | [diff] [blame] | 276 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 277 | T_1_inherit_TYPE_descriptor(td); |
vlm | a6af74c | 2004-10-23 13:26:56 +0000 | [diff] [blame] | 278 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 279 | } |
| 280 | |
vlm | 39ba4c4 | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 281 | asn_enc_rval_t |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 282 | T_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
vlm | 39ba4c4 | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 283 | int ilevel, enum xer_encoder_flags_e flags, |
| 284 | asn_app_consume_bytes_f *cb, void *app_key) { |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 285 | T_1_inherit_TYPE_descriptor(td); |
vlm | 39ba4c4 | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 286 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
vlm | 21e4600 | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 287 | } |
| 288 | |
| 289 | |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 290 | /*** <<< STAT-DEFS [T] >>> ***/ |
| 291 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 292 | static ber_tlv_tag_t asn_DEF_T_tags_1[] = { |
vlm | 72425de | 2004-09-13 08:31:01 +0000 | [diff] [blame] | 293 | (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
| 294 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 295 | }; |
vlm | 0229643 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 296 | asn_TYPE_descriptor_t asn_DEF_T = { |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 297 | "T", |
vlm | 9de248e | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 298 | "T", |
vlm | 39ba4c4 | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 299 | T_free, |
| 300 | T_print, |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 301 | T_constraint, |
| 302 | T_decode_ber, |
| 303 | T_encode_der, |
vlm | a6af74c | 2004-10-23 13:26:56 +0000 | [diff] [blame] | 304 | T_decode_xer, |
vlm | 39ba4c4 | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 305 | T_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 306 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 307 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 308 | asn_DEF_T_tags_1, |
| 309 | sizeof(asn_DEF_T_tags_1) |
| 310 | /sizeof(asn_DEF_T_tags_1[0]) - 1, /* 1 */ |
| 311 | asn_DEF_T_tags_1, /* Same as above */ |
| 312 | sizeof(asn_DEF_T_tags_1) |
| 313 | /sizeof(asn_DEF_T_tags_1[0]), /* 2 */ |
| 314 | 0, /* No PER visible constraints */ |
vlm | 21e4600 | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 315 | 0, 0, /* Defined elsewhere */ |
vlm | 3df7966 | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 316 | 0 /* No specifics */ |
| 317 | }; |
| 318 | |