Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 1 | |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 2 | /*** <<< INCLUDES [PrimitiveType] >>> ***/ |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 3 | |
| 4 | #include <OCTET_STRING.h> |
| 5 | |
| 6 | /*** <<< TYPE-DECLS [PrimitiveType] >>> ***/ |
| 7 | |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 8 | typedef OCTET_STRING_t PrimitiveType_t; |
| 9 | |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 10 | /*** <<< FUNC-DECLS [PrimitiveType] >>> ***/ |
| 11 | |
Lev Walkin | caf0d5a | 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; |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 20 | |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 21 | /*** <<< CODE [PrimitiveType] >>> ***/ |
| 22 | |
Lev Walkin | caf0d5a | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 23 | /* |
| 24 | * This type is implemented using OCTET_STRING, |
| 25 | * so here we adjust the DEF accordingly. |
| 26 | */ |
Lev Walkin | caf0d5a | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 27 | |
| 28 | /*** <<< STAT-DEFS [PrimitiveType] >>> ***/ |
| 29 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 30 | static const ber_tlv_tag_t asn_DEF_PrimitiveType_tags_1[] = { |
Lev Walkin | caf0d5a | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 31 | (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) |
| 32 | }; |
| 33 | asn_TYPE_descriptor_t asn_DEF_PrimitiveType = { |
| 34 | "PrimitiveType", |
| 35 | "PrimitiveType", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 36 | &asn_OP_OCTET_STRING, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 37 | asn_DEF_PrimitiveType_tags_1, |
| 38 | sizeof(asn_DEF_PrimitiveType_tags_1) |
| 39 | /sizeof(asn_DEF_PrimitiveType_tags_1[0]), /* 1 */ |
| 40 | asn_DEF_PrimitiveType_tags_1, /* Same as above */ |
| 41 | sizeof(asn_DEF_PrimitiveType_tags_1) |
| 42 | /sizeof(asn_DEF_PrimitiveType_tags_1[0]), /* 1 */ |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 43 | { 0, 0, OCTET_STRING_constraint }, |
Lev Walkin | caf0d5a | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 44 | 0, 0, /* No members */ |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 45 | &asn_SPC_OCTET_STRING_specs /* Additional specs */ |
Lev Walkin | caf0d5a | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 46 | }; |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 47 | |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 48 | |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 49 | /*** <<< INCLUDES [ConstructedType] >>> ***/ |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 50 | |
Lev Walkin | 22b5ed4 | 2006-09-13 02:51:20 +0000 | [diff] [blame] | 51 | #include "PrimitiveType.h" |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 52 | #include <constr_SEQUENCE.h> |
| 53 | |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 54 | /*** <<< TYPE-DECLS [ConstructedType] >>> ***/ |
| 55 | |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 56 | typedef struct ConstructedType { |
| 57 | PrimitiveType_t field; |
| 58 | |
| 59 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 60 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 61 | } ConstructedType_t; |
| 62 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 63 | /*** <<< FUNC-DECLS [ConstructedType] >>> ***/ |
| 64 | |
| 65 | extern asn_TYPE_descriptor_t asn_DEF_ConstructedType; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 66 | extern asn_SEQUENCE_specifics_t asn_SPC_ConstructedType_specs_1; |
| 67 | extern asn_TYPE_member_t asn_MBR_ConstructedType_1[1]; |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 68 | |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 69 | /*** <<< STAT-DEFS [ConstructedType] >>> ***/ |
| 70 | |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 71 | asn_TYPE_member_t asn_MBR_ConstructedType_1[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 72 | { ATF_NOFLAGS, 0, offsetof(struct ConstructedType, field), |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 73 | .tag = (ASN_TAG_CLASS_CONTEXT | (5 << 2)), |
| 74 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 75 | .type = &asn_DEF_PrimitiveType, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 76 | .type_selector = 0, |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 77 | { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 }, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 78 | .default_value = 0, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 79 | .name = "field" |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 80 | }, |
| 81 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 82 | static const ber_tlv_tag_t asn_DEF_ConstructedType_tags_1[] = { |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 83 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 84 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 85 | static const asn_TYPE_tag2member_t asn_MAP_ConstructedType_tag2el_1[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 86 | { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 0, 0, 0 } /* field */ |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 87 | }; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 88 | asn_SEQUENCE_specifics_t asn_SPC_ConstructedType_specs_1 = { |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 89 | sizeof(struct ConstructedType), |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 90 | offsetof(struct ConstructedType, _asn_ctx), |
Lev Walkin | e391708 | 2017-08-23 10:29:38 -0700 | [diff] [blame] | 91 | .tag2el = asn_MAP_ConstructedType_tag2el_1, |
| 92 | .tag2el_count = 1, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 93 | 0, 0, 0, /* Optional elements (not needed) */ |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 94 | -1, /* Start extensions */ |
| 95 | -1 /* Stop extensions */ |
| 96 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 97 | asn_TYPE_descriptor_t asn_DEF_ConstructedType = { |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 98 | "ConstructedType", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 99 | "ConstructedType", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 100 | &asn_OP_SEQUENCE, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 101 | asn_DEF_ConstructedType_tags_1, |
| 102 | sizeof(asn_DEF_ConstructedType_tags_1) |
| 103 | /sizeof(asn_DEF_ConstructedType_tags_1[0]), /* 1 */ |
| 104 | asn_DEF_ConstructedType_tags_1, /* Same as above */ |
| 105 | sizeof(asn_DEF_ConstructedType_tags_1) |
| 106 | /sizeof(asn_DEF_ConstructedType_tags_1[0]), /* 1 */ |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 107 | { 0, 0, SEQUENCE_constraint }, |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 108 | asn_MBR_ConstructedType_1, |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 109 | 1, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 110 | &asn_SPC_ConstructedType_specs_1 /* Additional specs */ |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 111 | }; |
| 112 | |
| 113 | |
Lev Walkin | b47ddce | 2004-08-11 05:25:47 +0000 | [diff] [blame] | 114 | /*** <<< INCLUDES [T] >>> ***/ |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 115 | |
Lev Walkin | 22b5ed4 | 2006-09-13 02:51:20 +0000 | [diff] [blame] | 116 | #include "ConstructedType.h" |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 117 | |
| 118 | /*** <<< TYPE-DECLS [T] >>> ***/ |
| 119 | |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 120 | typedef ConstructedType_t T_t; |
| 121 | |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 122 | /*** <<< FUNC-DECLS [T] >>> ***/ |
| 123 | |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 124 | extern asn_TYPE_descriptor_t asn_DEF_T; |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 125 | asn_struct_free_f T_free; |
| 126 | asn_struct_print_f T_print; |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 127 | asn_constr_check_f T_constraint; |
| 128 | ber_type_decoder_f T_decode_ber; |
| 129 | der_type_encoder_f T_encode_der; |
Lev Walkin | 0ebe8b3 | 2004-10-23 13:26:56 +0000 | [diff] [blame] | 130 | xer_type_decoder_f T_decode_xer; |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 131 | xer_type_encoder_f T_encode_xer; |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 132 | |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 133 | /*** <<< CODE [T] >>> ***/ |
| 134 | |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 135 | /* |
| 136 | * This type is implemented using ConstructedType, |
Lev Walkin | c3808c1 | 2004-09-23 22:14:58 +0000 | [diff] [blame] | 137 | * so here we adjust the DEF accordingly. |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 138 | */ |
Lev Walkin | 2e3055d | 2004-08-20 13:36:32 +0000 | [diff] [blame] | 139 | |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 140 | /*** <<< STAT-DEFS [T] >>> ***/ |
| 141 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 142 | static const ber_tlv_tag_t asn_DEF_T_tags_1[] = { |
Lev Walkin | 188ed2c | 2004-09-13 08:31:01 +0000 | [diff] [blame] | 143 | (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
| 144 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 145 | }; |
Lev Walkin | dfae975 | 2004-09-29 13:19:37 +0000 | [diff] [blame] | 146 | asn_TYPE_descriptor_t asn_DEF_T = { |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 147 | "T", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 148 | "T", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 149 | &asn_OP_SEQUENCE, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 150 | asn_DEF_T_tags_1, |
| 151 | sizeof(asn_DEF_T_tags_1) |
| 152 | /sizeof(asn_DEF_T_tags_1[0]) - 1, /* 1 */ |
| 153 | asn_DEF_T_tags_1, /* Same as above */ |
| 154 | sizeof(asn_DEF_T_tags_1) |
| 155 | /sizeof(asn_DEF_T_tags_1[0]), /* 2 */ |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 156 | { 0, 0, SEQUENCE_constraint }, |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 157 | asn_MBR_ConstructedType_1, |
| 158 | 1, /* Elements count */ |
| 159 | &asn_SPC_ConstructedType_specs_1 /* Additional specs */ |
Lev Walkin | 5bbff1e | 2004-06-28 21:13:22 +0000 | [diff] [blame] | 160 | }; |
| 161 | |