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