Lev Walkin | fb953d1 | 2007-06-23 20:06:04 +0000 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [PDU] >>> ***/ |
| 3 | |
| 4 | #include <IA5String.h> |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 5 | #include "Singleton.h" |
Lev Walkin | fb953d1 | 2007-06-23 20:06:04 +0000 | [diff] [blame] | 6 | #include <constr_SEQUENCE.h> |
| 7 | |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 8 | /*** <<< FWD-DECLS [PDU] >>> ***/ |
| 9 | |
| 10 | struct PDU_2; |
| 11 | struct Singleton; |
| 12 | |
Lev Walkin | fb953d1 | 2007-06-23 20:06:04 +0000 | [diff] [blame] | 13 | /*** <<< TYPE-DECLS [PDU] >>> ***/ |
| 14 | |
| 15 | typedef struct PDU { |
| 16 | /* |
| 17 | * This type is extensible, |
| 18 | * possible extensions are below. |
| 19 | */ |
| 20 | IA5String_t *str_o /* OPTIONAL */; |
| 21 | IA5String_t *str_m; |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 22 | struct Singleton *singl; |
| 23 | struct PDU_2 *pdu_2 /* OPTIONAL */; |
Lev Walkin | fb953d1 | 2007-06-23 20:06:04 +0000 | [diff] [blame] | 24 | |
| 25 | /* Context for parsing across buffer boundaries */ |
| 26 | asn_struct_ctx_t _asn_ctx; |
| 27 | } PDU_t; |
| 28 | |
| 29 | /*** <<< FUNC-DECLS [PDU] >>> ***/ |
| 30 | |
| 31 | extern asn_TYPE_descriptor_t asn_DEF_PDU; |
| 32 | |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 33 | /*** <<< POST-INCLUDE [PDU] >>> ***/ |
| 34 | |
| 35 | #include "PDU-2.h" |
| 36 | |
Lev Walkin | fb953d1 | 2007-06-23 20:06:04 +0000 | [diff] [blame] | 37 | /*** <<< STAT-DEFS [PDU] >>> ***/ |
| 38 | |
| 39 | static asn_TYPE_member_t asn_MBR_PDU_1[] = { |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 40 | { ATF_POINTER, 4, offsetof(struct PDU, str_o), |
Lev Walkin | fb953d1 | 2007-06-23 20:06:04 +0000 | [diff] [blame] | 41 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 42 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 43 | .type = &asn_DEF_IA5String, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 44 | .type_selector = 0, |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 45 | { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 }, |
Lev Walkin | 20696a4 | 2017-10-17 21:27:33 -0700 | [diff] [blame] | 46 | 0, 0, /* No default value */ |
Lev Walkin | fb953d1 | 2007-06-23 20:06:04 +0000 | [diff] [blame] | 47 | .name = "str-o" |
| 48 | }, |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 49 | { ATF_POINTER, 3, offsetof(struct PDU, str_m), |
Lev Walkin | fb953d1 | 2007-06-23 20:06:04 +0000 | [diff] [blame] | 50 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 51 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 52 | .type = &asn_DEF_IA5String, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 53 | .type_selector = 0, |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 54 | { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 }, |
Lev Walkin | 20696a4 | 2017-10-17 21:27:33 -0700 | [diff] [blame] | 55 | 0, 0, /* No default value */ |
Lev Walkin | fb953d1 | 2007-06-23 20:06:04 +0000 | [diff] [blame] | 56 | .name = "str-m" |
| 57 | }, |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 58 | { ATF_POINTER, 2, offsetof(struct PDU, singl), |
| 59 | .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 60 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 61 | .type = &asn_DEF_Singleton, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 62 | .type_selector = 0, |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 63 | { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 }, |
Lev Walkin | 20696a4 | 2017-10-17 21:27:33 -0700 | [diff] [blame] | 64 | 0, 0, /* No default value */ |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 65 | .name = "singl" |
| 66 | }, |
| 67 | { ATF_POINTER, 1, offsetof(struct PDU, pdu_2), |
| 68 | .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
| 69 | .tag_mode = +1, /* EXPLICIT tag at current level */ |
| 70 | .type = &asn_DEF_PDU_2, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 71 | .type_selector = 0, |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 72 | { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 }, |
Lev Walkin | 20696a4 | 2017-10-17 21:27:33 -0700 | [diff] [blame] | 73 | 0, 0, /* No default value */ |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 74 | .name = "pdu-2" |
| 75 | }, |
Lev Walkin | fb953d1 | 2007-06-23 20:06:04 +0000 | [diff] [blame] | 76 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 77 | static const int asn_MAP_PDU_oms_1[] = { 0, 1, 2, 3 }; |
| 78 | static const ber_tlv_tag_t asn_DEF_PDU_tags_1[] = { |
Lev Walkin | fb953d1 | 2007-06-23 20:06:04 +0000 | [diff] [blame] | 79 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 80 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 81 | static const asn_TYPE_tag2member_t asn_MAP_PDU_tag2el_1[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 82 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* str-o */ |
| 83 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* str-m */ |
| 84 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* singl */ |
| 85 | { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* pdu-2 */ |
Lev Walkin | fb953d1 | 2007-06-23 20:06:04 +0000 | [diff] [blame] | 86 | }; |
| 87 | static asn_SEQUENCE_specifics_t asn_SPC_PDU_specs_1 = { |
| 88 | sizeof(struct PDU), |
| 89 | offsetof(struct PDU, _asn_ctx), |
Lev Walkin | e391708 | 2017-08-23 10:29:38 -0700 | [diff] [blame] | 90 | .tag2el = asn_MAP_PDU_tag2el_1, |
| 91 | .tag2el_count = 4, /* Count of tags in the map */ |
Lev Walkin | fb953d1 | 2007-06-23 20:06:04 +0000 | [diff] [blame] | 92 | asn_MAP_PDU_oms_1, /* Optional members */ |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 93 | 0, 4, /* Root/Additions */ |
Lev Walkin | fb953d1 | 2007-06-23 20:06:04 +0000 | [diff] [blame] | 94 | -1, /* Start extensions */ |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 95 | 5 /* Stop extensions */ |
Lev Walkin | fb953d1 | 2007-06-23 20:06:04 +0000 | [diff] [blame] | 96 | }; |
| 97 | asn_TYPE_descriptor_t asn_DEF_PDU = { |
| 98 | "PDU", |
| 99 | "PDU", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 100 | &asn_OP_SEQUENCE, |
Lev Walkin | fb953d1 | 2007-06-23 20:06:04 +0000 | [diff] [blame] | 101 | asn_DEF_PDU_tags_1, |
| 102 | sizeof(asn_DEF_PDU_tags_1) |
| 103 | /sizeof(asn_DEF_PDU_tags_1[0]), /* 1 */ |
| 104 | asn_DEF_PDU_tags_1, /* Same as above */ |
| 105 | sizeof(asn_DEF_PDU_tags_1) |
| 106 | /sizeof(asn_DEF_PDU_tags_1[0]), /* 1 */ |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 107 | { 0, 0, SEQUENCE_constraint }, |
Lev Walkin | fb953d1 | 2007-06-23 20:06:04 +0000 | [diff] [blame] | 108 | asn_MBR_PDU_1, |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 109 | 4, /* Elements count */ |
Lev Walkin | fb953d1 | 2007-06-23 20:06:04 +0000 | [diff] [blame] | 110 | &asn_SPC_PDU_specs_1 /* Additional specs */ |
| 111 | }; |
| 112 | |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 113 | |
| 114 | /*** <<< INCLUDES [Singleton] >>> ***/ |
| 115 | |
| 116 | #include <IA5String.h> |
| 117 | #include <constr_SEQUENCE.h> |
| 118 | |
| 119 | /*** <<< TYPE-DECLS [Singleton] >>> ***/ |
| 120 | |
| 121 | typedef struct Singleton { |
| 122 | IA5String_t *opt_z /* DEFAULT z */; |
| 123 | |
| 124 | /* Context for parsing across buffer boundaries */ |
| 125 | asn_struct_ctx_t _asn_ctx; |
| 126 | } Singleton_t; |
| 127 | |
| 128 | /*** <<< FUNC-DECLS [Singleton] >>> ***/ |
| 129 | |
| 130 | extern asn_TYPE_descriptor_t asn_DEF_Singleton; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 131 | extern asn_SEQUENCE_specifics_t asn_SPC_Singleton_specs_1; |
| 132 | extern asn_TYPE_member_t asn_MBR_Singleton_1[1]; |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 133 | |
| 134 | /*** <<< STAT-DEFS [Singleton] >>> ***/ |
| 135 | |
Lev Walkin | 20696a4 | 2017-10-17 21:27:33 -0700 | [diff] [blame] | 136 | static int asn_DFL_2_cmp(const void *sptr) { |
Lev Walkin | b37ee63 | 2017-10-18 16:52:18 -0700 | [diff] [blame] | 137 | static const uint8_t defv[] = "z"; |
Lev Walkin | 20696a4 | 2017-10-17 21:27:33 -0700 | [diff] [blame] | 138 | const IA5String_t *st = sptr; |
Lev Walkin | 8032f7a | 2007-06-27 01:54:57 +0000 | [diff] [blame] | 139 | |
| 140 | if(!st) { |
Lev Walkin | 20696a4 | 2017-10-17 21:27:33 -0700 | [diff] [blame] | 141 | return -1; /* No value is not a default value */ |
Lev Walkin | 8032f7a | 2007-06-27 01:54:57 +0000 | [diff] [blame] | 142 | } |
| 143 | |
Lev Walkin | 20696a4 | 2017-10-17 21:27:33 -0700 | [diff] [blame] | 144 | if(st->size == (sizeof(defv) - 1) |
| 145 | && memcmp(st->buf, &defv, sizeof(defv) - 1) == 0) |
Lev Walkin | 8032f7a | 2007-06-27 01:54:57 +0000 | [diff] [blame] | 146 | return 0; |
Lev Walkin | 20696a4 | 2017-10-17 21:27:33 -0700 | [diff] [blame] | 147 | return 1; |
| 148 | } |
| 149 | static int asn_DFL_2_set(void **sptr) { |
Lev Walkin | b37ee63 | 2017-10-18 16:52:18 -0700 | [diff] [blame] | 150 | static const uint8_t defv[] = "z"; |
Lev Walkin | 20696a4 | 2017-10-17 21:27:33 -0700 | [diff] [blame] | 151 | IA5String_t *st = *sptr; |
| 152 | uint8_t *nstr = MALLOC(sizeof(defv)); |
Lev Walkin | 8032f7a | 2007-06-27 01:54:57 +0000 | [diff] [blame] | 153 | |
Lev Walkin | 20696a4 | 2017-10-17 21:27:33 -0700 | [diff] [blame] | 154 | if(!nstr) return -1; |
| 155 | memcpy(nstr, defv, sizeof(defv)); |
| 156 | |
Lev Walkin | b37ee63 | 2017-10-18 16:52:18 -0700 | [diff] [blame] | 157 | if(st) { |
Lev Walkin | 20696a4 | 2017-10-17 21:27:33 -0700 | [diff] [blame] | 158 | FREEMEM(st->buf); |
| 159 | } else { |
| 160 | st = (*sptr = CALLOC(1, sizeof(*st))); |
Lev Walkin | b37ee63 | 2017-10-18 16:52:18 -0700 | [diff] [blame] | 161 | if(!st) { FREEMEM(nstr); return -1; } |
Lev Walkin | 20696a4 | 2017-10-17 21:27:33 -0700 | [diff] [blame] | 162 | } |
| 163 | st->buf = nstr; |
| 164 | st->size = sizeof(defv) - 1; |
| 165 | |
| 166 | return 0; |
Lev Walkin | 8032f7a | 2007-06-27 01:54:57 +0000 | [diff] [blame] | 167 | } |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 168 | asn_TYPE_member_t asn_MBR_Singleton_1[] = { |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 169 | { ATF_POINTER, 1, offsetof(struct Singleton, opt_z), |
| 170 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 171 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 172 | .type = &asn_DEF_IA5String, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 173 | .type_selector = 0, |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 174 | { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 }, |
Lev Walkin | b37ee63 | 2017-10-18 16:52:18 -0700 | [diff] [blame] | 175 | .default_value_cmp = &asn_DFL_2_cmp, /* Compare DEFAULT "z" */ |
| 176 | .default_value_set = &asn_DFL_2_set, /* Set DEFAULT "z" */ |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 177 | .name = "opt-z" |
| 178 | }, |
| 179 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 180 | static const int asn_MAP_Singleton_oms_1[] = { 0 }; |
| 181 | static const ber_tlv_tag_t asn_DEF_Singleton_tags_1[] = { |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 182 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 183 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 184 | static const asn_TYPE_tag2member_t asn_MAP_Singleton_tag2el_1[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 185 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* opt-z */ |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 186 | }; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 187 | asn_SEQUENCE_specifics_t asn_SPC_Singleton_specs_1 = { |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 188 | sizeof(struct Singleton), |
| 189 | offsetof(struct Singleton, _asn_ctx), |
Lev Walkin | e391708 | 2017-08-23 10:29:38 -0700 | [diff] [blame] | 190 | .tag2el = asn_MAP_Singleton_tag2el_1, |
| 191 | .tag2el_count = 1, /* Count of tags in the map */ |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 192 | asn_MAP_Singleton_oms_1, /* Optional members */ |
| 193 | 1, 0, /* Root/Additions */ |
| 194 | -1, /* Start extensions */ |
| 195 | -1 /* Stop extensions */ |
| 196 | }; |
| 197 | asn_TYPE_descriptor_t asn_DEF_Singleton = { |
| 198 | "Singleton", |
| 199 | "Singleton", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 200 | &asn_OP_SEQUENCE, |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 201 | asn_DEF_Singleton_tags_1, |
| 202 | sizeof(asn_DEF_Singleton_tags_1) |
| 203 | /sizeof(asn_DEF_Singleton_tags_1[0]), /* 1 */ |
| 204 | asn_DEF_Singleton_tags_1, /* Same as above */ |
| 205 | sizeof(asn_DEF_Singleton_tags_1) |
| 206 | /sizeof(asn_DEF_Singleton_tags_1[0]), /* 1 */ |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 207 | { 0, 0, SEQUENCE_constraint }, |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 208 | asn_MBR_Singleton_1, |
| 209 | 1, /* Elements count */ |
| 210 | &asn_SPC_Singleton_specs_1 /* Additional specs */ |
| 211 | }; |
| 212 | |
| 213 | |
| 214 | /*** <<< INCLUDES [PDU-2] >>> ***/ |
| 215 | |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 216 | #include <NativeInteger.h> |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 217 | #include <constr_CHOICE.h> |
| 218 | |
| 219 | /*** <<< DEPS [PDU-2] >>> ***/ |
| 220 | |
| 221 | typedef enum PDU_2_PR { |
| 222 | PDU_2_PR_NOTHING, /* No components present */ |
Lev Walkin | d7a6811 | 2007-06-29 01:42:04 +0000 | [diff] [blame] | 223 | PDU_2_PR_main, |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 224 | /* Extensions may appear below */ |
Lev Walkin | d7a6811 | 2007-06-29 01:42:04 +0000 | [diff] [blame] | 225 | PDU_2_PR_ext1, |
| 226 | PDU_2_PR_ext0 |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 227 | } PDU_2_PR; |
| 228 | |
| 229 | /*** <<< TYPE-DECLS [PDU-2] >>> ***/ |
| 230 | |
| 231 | typedef struct PDU_2 { |
| 232 | PDU_2_PR present; |
| 233 | union PDU_2_u { |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 234 | long main; |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 235 | /* |
| 236 | * This type is extensible, |
| 237 | * possible extensions are below. |
| 238 | */ |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 239 | long ext1; |
| 240 | long ext0; |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 241 | } choice; |
| 242 | |
| 243 | /* Context for parsing across buffer boundaries */ |
| 244 | asn_struct_ctx_t _asn_ctx; |
| 245 | } PDU_2_t; |
| 246 | |
| 247 | /*** <<< FUNC-DECLS [PDU-2] >>> ***/ |
| 248 | |
| 249 | extern asn_TYPE_descriptor_t asn_DEF_PDU_2; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 250 | extern asn_CHOICE_specifics_t asn_SPC_PDU_2_specs_1; |
| 251 | extern asn_TYPE_member_t asn_MBR_PDU_2_1[3]; |
| 252 | extern asn_per_constraints_t asn_PER_type_PDU_2_constr_1; |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 253 | |
| 254 | /*** <<< CTDEFS [PDU-2] >>> ***/ |
| 255 | |
Lev Walkin | 0479e04 | 2017-09-26 18:39:58 -0700 | [diff] [blame] | 256 | asn_per_constraints_t asn_PER_type_PDU_2_constr_1 CC_NOTUSED = { |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 257 | { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, |
| 258 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 259 | 0, 0 /* No PER value map */ |
| 260 | }; |
| 261 | |
| 262 | /*** <<< STAT-DEFS [PDU-2] >>> ***/ |
| 263 | |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 264 | asn_TYPE_member_t asn_MBR_PDU_2_1[] = { |
Lev Walkin | d7a6811 | 2007-06-29 01:42:04 +0000 | [diff] [blame] | 265 | { ATF_NOFLAGS, 0, offsetof(struct PDU_2, choice.main), |
| 266 | .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 267 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 268 | .type = &asn_DEF_NativeInteger, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 269 | .type_selector = 0, |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 270 | { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 }, |
Lev Walkin | 20696a4 | 2017-10-17 21:27:33 -0700 | [diff] [blame] | 271 | 0, 0, /* No default value */ |
Lev Walkin | d7a6811 | 2007-06-29 01:42:04 +0000 | [diff] [blame] | 272 | .name = "main" |
| 273 | }, |
| 274 | { ATF_NOFLAGS, 0, offsetof(struct PDU_2, choice.ext1), |
| 275 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 276 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 277 | .type = &asn_DEF_NativeInteger, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 278 | .type_selector = 0, |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 279 | { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 }, |
Lev Walkin | 20696a4 | 2017-10-17 21:27:33 -0700 | [diff] [blame] | 280 | 0, 0, /* No default value */ |
Lev Walkin | d7a6811 | 2007-06-29 01:42:04 +0000 | [diff] [blame] | 281 | .name = "ext1" |
| 282 | }, |
| 283 | { ATF_NOFLAGS, 0, offsetof(struct PDU_2, choice.ext0), |
| 284 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 285 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 286 | .type = &asn_DEF_NativeInteger, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 287 | .type_selector = 0, |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 288 | { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 }, |
Lev Walkin | 20696a4 | 2017-10-17 21:27:33 -0700 | [diff] [blame] | 289 | 0, 0, /* No default value */ |
Lev Walkin | d7a6811 | 2007-06-29 01:42:04 +0000 | [diff] [blame] | 290 | .name = "ext0" |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 291 | }, |
| 292 | }; |
Lev Walkin | 20696a4 | 2017-10-17 21:27:33 -0700 | [diff] [blame] | 293 | static const unsigned asn_MAP_PDU_2_to_canonical_1[] = { 0, 2, 1 }; |
| 294 | static const unsigned asn_MAP_PDU_2_from_canonical_1[] = { 0, 2, 1 }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 295 | static const asn_TYPE_tag2member_t asn_MAP_PDU_2_tag2el_1[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 296 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* ext0 */ |
| 297 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ext1 */ |
| 298 | { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 0, 0, 0 } /* main */ |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 299 | }; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 300 | asn_CHOICE_specifics_t asn_SPC_PDU_2_specs_1 = { |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 301 | sizeof(struct PDU_2), |
| 302 | offsetof(struct PDU_2, _asn_ctx), |
| 303 | offsetof(struct PDU_2, present), |
| 304 | sizeof(((struct PDU_2 *)0)->present), |
Lev Walkin | e391708 | 2017-08-23 10:29:38 -0700 | [diff] [blame] | 305 | .tag2el = asn_MAP_PDU_2_tag2el_1, |
| 306 | .tag2el_count = 3, /* Count of tags in the map */ |
Lev Walkin | 20696a4 | 2017-10-17 21:27:33 -0700 | [diff] [blame] | 307 | .to_canonical_order = asn_MAP_PDU_2_to_canonical_1, |
| 308 | .from_canonical_order = asn_MAP_PDU_2_from_canonical_1, |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 309 | .ext_start = 1 /* Extensions start */ |
| 310 | }; |
| 311 | asn_TYPE_descriptor_t asn_DEF_PDU_2 = { |
| 312 | "PDU-2", |
| 313 | "PDU-2", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 314 | &asn_OP_CHOICE, |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 315 | 0, /* No effective tags (pointer) */ |
| 316 | 0, /* No effective tags (count) */ |
| 317 | 0, /* No tags (pointer) */ |
| 318 | 0, /* No tags (count) */ |
Lev Walkin | 0bfea56 | 2017-09-29 23:16:48 -0700 | [diff] [blame] | 319 | { 0, &asn_PER_type_PDU_2_constr_1, CHOICE_constraint }, |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 320 | asn_MBR_PDU_2_1, |
Lev Walkin | d7a6811 | 2007-06-29 01:42:04 +0000 | [diff] [blame] | 321 | 3, /* Elements count */ |
Lev Walkin | 34ff900 | 2007-06-26 23:58:16 +0000 | [diff] [blame] | 322 | &asn_SPC_PDU_2_specs_1 /* Additional specs */ |
| 323 | }; |
| 324 | |