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