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