Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [T] >>> ***/ |
| 3 | |
| 4 | #include <NativeInteger.h> |
| 5 | #include <constr_SEQUENCE.h> |
| 6 | |
| 7 | /*** <<< TYPE-DECLS [T] >>> ***/ |
| 8 | |
| 9 | typedef struct T { |
| 10 | long small32range; |
| 11 | long full32range; |
| 12 | unsigned long unsigned32; |
| 13 | unsigned long unsplit32; |
| 14 | |
| 15 | /* Context for parsing across buffer boundaries */ |
| 16 | asn_struct_ctx_t _asn_ctx; |
| 17 | } T_t; |
| 18 | |
| 19 | /*** <<< FUNC-DECLS [T] >>> ***/ |
| 20 | |
| 21 | /* extern asn_TYPE_descriptor_t asn_DEF_unsigned32_4; // (Use -fall-defs-global to expose) */ |
| 22 | /* extern asn_TYPE_descriptor_t asn_DEF_unsplit32_5; // (Use -fall-defs-global to expose) */ |
| 23 | extern asn_TYPE_descriptor_t asn_DEF_T; |
| 24 | |
| 25 | /*** <<< CODE [T] >>> ***/ |
| 26 | |
| 27 | static int |
| 28 | unsigned32_4_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 29 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 30 | |
| 31 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 32 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 33 | "%s: value not given (%s:%d)", |
| 34 | td->name, __FILE__, __LINE__); |
| 35 | return -1; |
| 36 | } |
| 37 | |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 38 | |
| 39 | /* Constraint check succeeded */ |
| 40 | return 0; |
| 41 | } |
| 42 | |
| 43 | /* |
| 44 | * This type is implemented using NativeInteger, |
| 45 | * so here we adjust the DEF accordingly. |
| 46 | */ |
| 47 | static void |
| 48 | unsigned32_4_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 49 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 50 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
Lev Walkin | 6169b8d | 2013-12-07 11:02:44 -0800 | [diff] [blame] | 51 | td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 52 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 53 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 54 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 55 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 56 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 57 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame] | 58 | td->oer_decoder = asn_DEF_NativeInteger.oer_decoder; |
| 59 | td->oer_encoder = asn_DEF_NativeInteger.oer_encoder; |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 60 | if(!td->per_constraints) |
| 61 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 62 | td->elements = asn_DEF_NativeInteger.elements; |
| 63 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 64 | /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */ |
| 65 | } |
| 66 | |
| 67 | static void |
| 68 | unsigned32_4_free(asn_TYPE_descriptor_t *td, |
| 69 | void *struct_ptr, int contents_only) { |
| 70 | unsigned32_4_inherit_TYPE_descriptor(td); |
| 71 | td->free_struct(td, struct_ptr, contents_only); |
| 72 | } |
| 73 | |
| 74 | static int |
| 75 | unsigned32_4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 76 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 77 | unsigned32_4_inherit_TYPE_descriptor(td); |
| 78 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 79 | } |
| 80 | |
| 81 | static asn_dec_rval_t |
| 82 | unsigned32_4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 83 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 84 | unsigned32_4_inherit_TYPE_descriptor(td); |
| 85 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 86 | } |
| 87 | |
| 88 | static asn_enc_rval_t |
| 89 | unsigned32_4_encode_der(asn_TYPE_descriptor_t *td, |
| 90 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 91 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 92 | unsigned32_4_inherit_TYPE_descriptor(td); |
| 93 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 94 | } |
| 95 | |
| 96 | static asn_dec_rval_t |
| 97 | unsigned32_4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 98 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 99 | unsigned32_4_inherit_TYPE_descriptor(td); |
| 100 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 101 | } |
| 102 | |
| 103 | static asn_enc_rval_t |
| 104 | unsigned32_4_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 105 | int ilevel, enum xer_encoder_flags_e flags, |
| 106 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 107 | unsigned32_4_inherit_TYPE_descriptor(td); |
| 108 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 109 | } |
| 110 | |
| 111 | static asn_dec_rval_t |
| 112 | unsigned32_4_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 113 | asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) { |
| 114 | unsigned32_4_inherit_TYPE_descriptor(td); |
| 115 | return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data); |
| 116 | } |
| 117 | |
| 118 | static asn_enc_rval_t |
| 119 | unsigned32_4_encode_uper(asn_TYPE_descriptor_t *td, |
| 120 | asn_per_constraints_t *constraints, |
| 121 | void *structure, asn_per_outp_t *per_out) { |
| 122 | unsigned32_4_inherit_TYPE_descriptor(td); |
| 123 | return td->uper_encoder(td, constraints, structure, per_out); |
| 124 | } |
| 125 | |
| 126 | static int |
| 127 | unsplit32_5_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 128 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 129 | unsigned long value; |
| 130 | |
| 131 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 132 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 133 | "%s: value not given (%s:%d)", |
| 134 | td->name, __FILE__, __LINE__); |
| 135 | return -1; |
| 136 | } |
| 137 | |
| 138 | value = *(const unsigned long *)sptr; |
| 139 | |
| 140 | if(((value >= 5 && value <= 500) || (value >= 600 && value <= 4294967290))) { |
| 141 | /* Constraint check succeeded */ |
| 142 | return 0; |
| 143 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 144 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 145 | "%s: constraint failed (%s:%d)", |
| 146 | td->name, __FILE__, __LINE__); |
| 147 | return -1; |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | /* |
| 152 | * This type is implemented using NativeInteger, |
| 153 | * so here we adjust the DEF accordingly. |
| 154 | */ |
| 155 | static void |
| 156 | unsplit32_5_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 157 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 158 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
Lev Walkin | 6169b8d | 2013-12-07 11:02:44 -0800 | [diff] [blame] | 159 | td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 160 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 161 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 162 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 163 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 164 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 165 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame] | 166 | td->oer_decoder = asn_DEF_NativeInteger.oer_decoder; |
| 167 | td->oer_encoder = asn_DEF_NativeInteger.oer_encoder; |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 168 | if(!td->per_constraints) |
| 169 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 170 | td->elements = asn_DEF_NativeInteger.elements; |
| 171 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 172 | /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */ |
| 173 | } |
| 174 | |
| 175 | static void |
| 176 | unsplit32_5_free(asn_TYPE_descriptor_t *td, |
| 177 | void *struct_ptr, int contents_only) { |
| 178 | unsplit32_5_inherit_TYPE_descriptor(td); |
| 179 | td->free_struct(td, struct_ptr, contents_only); |
| 180 | } |
| 181 | |
| 182 | static int |
| 183 | unsplit32_5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 184 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 185 | unsplit32_5_inherit_TYPE_descriptor(td); |
| 186 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 187 | } |
| 188 | |
| 189 | static asn_dec_rval_t |
| 190 | unsplit32_5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 191 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 192 | unsplit32_5_inherit_TYPE_descriptor(td); |
| 193 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 194 | } |
| 195 | |
| 196 | static asn_enc_rval_t |
| 197 | unsplit32_5_encode_der(asn_TYPE_descriptor_t *td, |
| 198 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 199 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 200 | unsplit32_5_inherit_TYPE_descriptor(td); |
| 201 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 202 | } |
| 203 | |
| 204 | static asn_dec_rval_t |
| 205 | unsplit32_5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 206 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 207 | unsplit32_5_inherit_TYPE_descriptor(td); |
| 208 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 209 | } |
| 210 | |
| 211 | static asn_enc_rval_t |
| 212 | unsplit32_5_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 213 | int ilevel, enum xer_encoder_flags_e flags, |
| 214 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 215 | unsplit32_5_inherit_TYPE_descriptor(td); |
| 216 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 217 | } |
| 218 | |
| 219 | static asn_dec_rval_t |
| 220 | unsplit32_5_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 221 | asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) { |
| 222 | unsplit32_5_inherit_TYPE_descriptor(td); |
| 223 | return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data); |
| 224 | } |
| 225 | |
| 226 | static asn_enc_rval_t |
| 227 | unsplit32_5_encode_uper(asn_TYPE_descriptor_t *td, |
| 228 | asn_per_constraints_t *constraints, |
| 229 | void *structure, asn_per_outp_t *per_out) { |
| 230 | unsplit32_5_inherit_TYPE_descriptor(td); |
| 231 | return td->uper_encoder(td, constraints, structure, per_out); |
| 232 | } |
| 233 | |
| 234 | static int |
| 235 | memb_small32range_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 236 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 237 | long value; |
| 238 | |
| 239 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 240 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 241 | "%s: value not given (%s:%d)", |
| 242 | td->name, __FILE__, __LINE__); |
| 243 | return -1; |
| 244 | } |
| 245 | |
| 246 | value = *(const long *)sptr; |
| 247 | |
| 248 | if((value >= -2000000000 && value <= 2000000000)) { |
| 249 | /* Constraint check succeeded */ |
| 250 | return 0; |
| 251 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 252 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 253 | "%s: constraint failed (%s:%d)", |
| 254 | td->name, __FILE__, __LINE__); |
| 255 | return -1; |
| 256 | } |
| 257 | } |
| 258 | |
| 259 | static int |
| 260 | memb_full32range_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 261 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 262 | long value; |
| 263 | |
| 264 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 265 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 266 | "%s: value not given (%s:%d)", |
| 267 | td->name, __FILE__, __LINE__); |
| 268 | return -1; |
| 269 | } |
| 270 | |
| 271 | value = *(const long *)sptr; |
| 272 | |
| 273 | if((value >= (-2147483647L - 1) && value <= 2147483647)) { |
| 274 | /* Constraint check succeeded */ |
| 275 | return 0; |
| 276 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 277 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 278 | "%s: constraint failed (%s:%d)", |
| 279 | td->name, __FILE__, __LINE__); |
| 280 | return -1; |
| 281 | } |
| 282 | } |
| 283 | |
| 284 | static int |
| 285 | memb_unsigned32_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 286 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 287 | |
| 288 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 289 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 290 | "%s: value not given (%s:%d)", |
| 291 | td->name, __FILE__, __LINE__); |
| 292 | return -1; |
| 293 | } |
| 294 | |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 295 | |
| 296 | /* Constraint check succeeded */ |
| 297 | return 0; |
| 298 | } |
| 299 | |
| 300 | static int |
| 301 | memb_unsplit32_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 302 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 303 | unsigned long value; |
| 304 | |
| 305 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 306 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 307 | "%s: value not given (%s:%d)", |
| 308 | td->name, __FILE__, __LINE__); |
| 309 | return -1; |
| 310 | } |
| 311 | |
| 312 | value = *(const unsigned long *)sptr; |
| 313 | |
| 314 | if(((value >= 5 && value <= 500) || (value >= 600 && value <= 4294967290))) { |
| 315 | /* Constraint check succeeded */ |
| 316 | return 0; |
| 317 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 318 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 319 | "%s: constraint failed (%s:%d)", |
| 320 | td->name, __FILE__, __LINE__); |
| 321 | return -1; |
| 322 | } |
| 323 | } |
| 324 | |
| 325 | |
| 326 | /*** <<< CTDEFS [T] >>> ***/ |
| 327 | |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 328 | static asn_per_constraints_t asn_PER_type_unsigned32_constr_4 GCC_NOTUSED = { |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 329 | { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */, |
| 330 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 331 | 0, 0 /* No PER value map */ |
| 332 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 333 | static asn_per_constraints_t asn_PER_type_unsplit32_constr_5 GCC_NOTUSED = { |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 334 | { APC_CONSTRAINED, 32, -1, 5, 4294967290 } /* (5..4294967290) */, |
| 335 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 336 | 0, 0 /* No PER value map */ |
| 337 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 338 | static asn_per_constraints_t asn_PER_memb_small32range_constr_2 GCC_NOTUSED = { |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 339 | { APC_CONSTRAINED, 32, -1, -2000000000, 2000000000 } /* (-2000000000..2000000000) */, |
| 340 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 341 | 0, 0 /* No PER value map */ |
| 342 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 343 | static asn_per_constraints_t asn_PER_memb_full32range_constr_3 GCC_NOTUSED = { |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 344 | { APC_CONSTRAINED, 32, -1, (-2147483647L - 1), 2147483647 } /* (-2147483648..2147483647) */, |
| 345 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 346 | 0, 0 /* No PER value map */ |
| 347 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 348 | static asn_per_constraints_t asn_PER_memb_unsigned32_constr_4 GCC_NOTUSED = { |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 349 | { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */, |
| 350 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 351 | 0, 0 /* No PER value map */ |
| 352 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 353 | static asn_per_constraints_t asn_PER_memb_unsplit32_constr_5 GCC_NOTUSED = { |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 354 | { APC_CONSTRAINED, 32, -1, 5, 4294967290 } /* (5..4294967290) */, |
| 355 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 356 | 0, 0 /* No PER value map */ |
| 357 | }; |
| 358 | |
| 359 | /*** <<< STAT-DEFS [T] >>> ***/ |
| 360 | |
johvik | e70c407 | 2017-05-09 11:06:12 +0200 | [diff] [blame] | 361 | static asn_INTEGER_specifics_t asn_SPC_unsigned32_specs_4 = { |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 362 | 0, 0, 0, 0, 0, |
| 363 | 0, /* Native long size */ |
| 364 | 1 /* Unsigned representation */ |
| 365 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 366 | static const ber_tlv_tag_t asn_DEF_unsigned32_tags_4[] = { |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 367 | (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 368 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 369 | }; |
| 370 | static /* Use -fall-defs-global to expose */ |
| 371 | asn_TYPE_descriptor_t asn_DEF_unsigned32_4 = { |
| 372 | "unsigned32", |
| 373 | "unsigned32", |
| 374 | unsigned32_4_free, |
| 375 | unsigned32_4_print, |
| 376 | unsigned32_4_constraint, |
| 377 | unsigned32_4_decode_ber, |
| 378 | unsigned32_4_encode_der, |
| 379 | unsigned32_4_decode_xer, |
| 380 | unsigned32_4_encode_xer, |
| 381 | unsigned32_4_decode_uper, |
| 382 | unsigned32_4_encode_uper, |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame] | 383 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 384 | 0, /* Use generic outmost tag fetcher */ |
| 385 | asn_DEF_unsigned32_tags_4, |
| 386 | sizeof(asn_DEF_unsigned32_tags_4) |
| 387 | /sizeof(asn_DEF_unsigned32_tags_4[0]) - 1, /* 1 */ |
| 388 | asn_DEF_unsigned32_tags_4, /* Same as above */ |
| 389 | sizeof(asn_DEF_unsigned32_tags_4) |
| 390 | /sizeof(asn_DEF_unsigned32_tags_4[0]), /* 2 */ |
| 391 | &asn_PER_type_unsigned32_constr_4, |
| 392 | 0, 0, /* No members */ |
| 393 | &asn_SPC_unsigned32_specs_4 /* Additional specs */ |
| 394 | }; |
| 395 | |
johvik | e70c407 | 2017-05-09 11:06:12 +0200 | [diff] [blame] | 396 | static asn_INTEGER_specifics_t asn_SPC_unsplit32_specs_5 = { |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 397 | 0, 0, 0, 0, 0, |
| 398 | 0, /* Native long size */ |
| 399 | 1 /* Unsigned representation */ |
| 400 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 401 | static const ber_tlv_tag_t asn_DEF_unsplit32_tags_5[] = { |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 402 | (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
| 403 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 404 | }; |
| 405 | static /* Use -fall-defs-global to expose */ |
| 406 | asn_TYPE_descriptor_t asn_DEF_unsplit32_5 = { |
| 407 | "unsplit32", |
| 408 | "unsplit32", |
| 409 | unsplit32_5_free, |
| 410 | unsplit32_5_print, |
| 411 | unsplit32_5_constraint, |
| 412 | unsplit32_5_decode_ber, |
| 413 | unsplit32_5_encode_der, |
| 414 | unsplit32_5_decode_xer, |
| 415 | unsplit32_5_encode_xer, |
| 416 | unsplit32_5_decode_uper, |
| 417 | unsplit32_5_encode_uper, |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame] | 418 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 419 | 0, /* Use generic outmost tag fetcher */ |
| 420 | asn_DEF_unsplit32_tags_5, |
| 421 | sizeof(asn_DEF_unsplit32_tags_5) |
| 422 | /sizeof(asn_DEF_unsplit32_tags_5[0]) - 1, /* 1 */ |
| 423 | asn_DEF_unsplit32_tags_5, /* Same as above */ |
| 424 | sizeof(asn_DEF_unsplit32_tags_5) |
| 425 | /sizeof(asn_DEF_unsplit32_tags_5[0]), /* 2 */ |
| 426 | &asn_PER_type_unsplit32_constr_5, |
| 427 | 0, 0, /* No members */ |
| 428 | &asn_SPC_unsplit32_specs_5 /* Additional specs */ |
| 429 | }; |
| 430 | |
| 431 | static asn_TYPE_member_t asn_MBR_T_1[] = { |
| 432 | { ATF_NOFLAGS, 0, offsetof(struct T, small32range), |
| 433 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 434 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 435 | .type = &asn_DEF_NativeInteger, |
| 436 | .memb_constraints = memb_small32range_constraint_1, |
| 437 | .per_constraints = &asn_PER_memb_small32range_constr_2, |
| 438 | .default_value = 0, |
| 439 | .name = "small32range" |
| 440 | }, |
| 441 | { ATF_NOFLAGS, 0, offsetof(struct T, full32range), |
| 442 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 443 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 444 | .type = &asn_DEF_NativeInteger, |
| 445 | .memb_constraints = memb_full32range_constraint_1, |
| 446 | .per_constraints = &asn_PER_memb_full32range_constr_3, |
| 447 | .default_value = 0, |
| 448 | .name = "full32range" |
| 449 | }, |
| 450 | { ATF_NOFLAGS, 0, offsetof(struct T, unsigned32), |
| 451 | .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 452 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 453 | .type = &asn_DEF_unsigned32_4, |
| 454 | .memb_constraints = memb_unsigned32_constraint_1, |
| 455 | .per_constraints = &asn_PER_memb_unsigned32_constr_4, |
| 456 | .default_value = 0, |
| 457 | .name = "unsigned32" |
| 458 | }, |
| 459 | { ATF_NOFLAGS, 0, offsetof(struct T, unsplit32), |
| 460 | .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
| 461 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 462 | .type = &asn_DEF_unsplit32_5, |
| 463 | .memb_constraints = memb_unsplit32_constraint_1, |
| 464 | .per_constraints = &asn_PER_memb_unsplit32_constr_5, |
| 465 | .default_value = 0, |
| 466 | .name = "unsplit32" |
| 467 | }, |
| 468 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 469 | static const ber_tlv_tag_t asn_DEF_T_tags_1[] = { |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 470 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 471 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 472 | static const asn_TYPE_tag2member_t asn_MAP_T_tag2el_1[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 473 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* small32range */ |
| 474 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* full32range */ |
| 475 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* unsigned32 */ |
| 476 | { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* unsplit32 */ |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 477 | }; |
| 478 | static asn_SEQUENCE_specifics_t asn_SPC_T_specs_1 = { |
| 479 | sizeof(struct T), |
| 480 | offsetof(struct T, _asn_ctx), |
| 481 | asn_MAP_T_tag2el_1, |
| 482 | 4, /* Count of tags in the map */ |
| 483 | 0, 0, 0, /* Optional elements (not needed) */ |
| 484 | -1, /* Start extensions */ |
| 485 | -1 /* Stop extensions */ |
| 486 | }; |
| 487 | asn_TYPE_descriptor_t asn_DEF_T = { |
| 488 | "T", |
| 489 | "T", |
| 490 | SEQUENCE_free, |
| 491 | SEQUENCE_print, |
| 492 | SEQUENCE_constraint, |
| 493 | SEQUENCE_decode_ber, |
| 494 | SEQUENCE_encode_der, |
| 495 | SEQUENCE_decode_xer, |
| 496 | SEQUENCE_encode_xer, |
| 497 | SEQUENCE_decode_uper, |
| 498 | SEQUENCE_encode_uper, |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame] | 499 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 500 | 0, /* Use generic outmost tag fetcher */ |
| 501 | asn_DEF_T_tags_1, |
| 502 | sizeof(asn_DEF_T_tags_1) |
| 503 | /sizeof(asn_DEF_T_tags_1[0]), /* 1 */ |
| 504 | asn_DEF_T_tags_1, /* Same as above */ |
| 505 | sizeof(asn_DEF_T_tags_1) |
| 506 | /sizeof(asn_DEF_T_tags_1[0]), /* 1 */ |
| 507 | 0, /* No PER visible constraints */ |
| 508 | asn_MBR_T_1, |
| 509 | 4, /* Elements count */ |
| 510 | &asn_SPC_T_specs_1 /* Additional specs */ |
| 511 | }; |
| 512 | |