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