vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [CN-IntegerUnlimited] >>> ***/ |
| 3 | |
| 4 | #include <INTEGER.h> |
| 5 | |
| 6 | /*** <<< TYPE-DECLS [CN-IntegerUnlimited] >>> ***/ |
| 7 | |
| 8 | typedef INTEGER_t CN_IntegerUnlimited_t; |
| 9 | |
| 10 | /*** <<< FUNC-DECLS [CN-IntegerUnlimited] >>> ***/ |
| 11 | |
| 12 | extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerUnlimited; |
| 13 | asn_struct_free_f CN_IntegerUnlimited_free; |
| 14 | asn_struct_print_f CN_IntegerUnlimited_print; |
| 15 | asn_constr_check_f CN_IntegerUnlimited_constraint; |
| 16 | ber_type_decoder_f CN_IntegerUnlimited_decode_ber; |
| 17 | der_type_encoder_f CN_IntegerUnlimited_encode_der; |
| 18 | xer_type_decoder_f CN_IntegerUnlimited_decode_xer; |
| 19 | xer_type_encoder_f CN_IntegerUnlimited_encode_xer; |
| 20 | |
| 21 | /*** <<< CODE [CN-IntegerUnlimited] >>> ***/ |
| 22 | |
| 23 | int |
| 24 | CN_IntegerUnlimited_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 25 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 26 | /* Replace with underlying type checker */ |
| 27 | td->check_constraints = asn_DEF_INTEGER.check_constraints; |
| 28 | return td->check_constraints(td, sptr, app_errlog, app_key); |
| 29 | } |
| 30 | |
| 31 | /* |
| 32 | * This type is implemented using INTEGER, |
| 33 | * so here we adjust the DEF accordingly. |
| 34 | */ |
| 35 | static void |
| 36 | CN_IntegerUnlimited_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 37 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 38 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 39 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 40 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 41 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 42 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 43 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
| 44 | if(!td->per_constraints) |
| 45 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 46 | td->elements = asn_DEF_INTEGER.elements; |
| 47 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 48 | td->specifics = asn_DEF_INTEGER.specifics; |
| 49 | } |
| 50 | |
| 51 | void |
| 52 | CN_IntegerUnlimited_free(asn_TYPE_descriptor_t *td, |
| 53 | void *struct_ptr, int contents_only) { |
| 54 | CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td); |
| 55 | td->free_struct(td, struct_ptr, contents_only); |
| 56 | } |
| 57 | |
| 58 | int |
| 59 | CN_IntegerUnlimited_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 60 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 61 | CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td); |
| 62 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 63 | } |
| 64 | |
| 65 | asn_dec_rval_t |
| 66 | CN_IntegerUnlimited_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 67 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 68 | CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td); |
| 69 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 70 | } |
| 71 | |
| 72 | asn_enc_rval_t |
| 73 | CN_IntegerUnlimited_encode_der(asn_TYPE_descriptor_t *td, |
| 74 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 75 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 76 | CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td); |
| 77 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 78 | } |
| 79 | |
| 80 | asn_dec_rval_t |
| 81 | CN_IntegerUnlimited_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 82 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 83 | CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td); |
| 84 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 85 | } |
| 86 | |
| 87 | asn_enc_rval_t |
| 88 | CN_IntegerUnlimited_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 89 | int ilevel, enum xer_encoder_flags_e flags, |
| 90 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 91 | CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td); |
| 92 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 93 | } |
| 94 | |
| 95 | |
| 96 | /*** <<< STAT-DEFS [CN-IntegerUnlimited] >>> ***/ |
| 97 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 98 | static ber_tlv_tag_t asn_DEF_CN_IntegerUnlimited_tags_1[] = { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 99 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 100 | }; |
| 101 | asn_TYPE_descriptor_t asn_DEF_CN_IntegerUnlimited = { |
| 102 | "CN-IntegerUnlimited", |
| 103 | "CN-IntegerUnlimited", |
| 104 | CN_IntegerUnlimited_free, |
| 105 | CN_IntegerUnlimited_print, |
| 106 | CN_IntegerUnlimited_constraint, |
| 107 | CN_IntegerUnlimited_decode_ber, |
| 108 | CN_IntegerUnlimited_encode_der, |
| 109 | CN_IntegerUnlimited_decode_xer, |
| 110 | CN_IntegerUnlimited_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 111 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 112 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 113 | asn_DEF_CN_IntegerUnlimited_tags_1, |
| 114 | sizeof(asn_DEF_CN_IntegerUnlimited_tags_1) |
| 115 | /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */ |
| 116 | asn_DEF_CN_IntegerUnlimited_tags_1, /* Same as above */ |
| 117 | sizeof(asn_DEF_CN_IntegerUnlimited_tags_1) |
| 118 | /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */ |
| 119 | 0, /* No PER visible constraints */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 120 | 0, 0, /* No members */ |
| 121 | 0 /* No specifics */ |
| 122 | }; |
| 123 | |
| 124 | |
| 125 | /*** <<< INCLUDES [CN-IntegerMinMax] >>> ***/ |
| 126 | |
| 127 | #include <INTEGER.h> |
| 128 | |
| 129 | /*** <<< TYPE-DECLS [CN-IntegerMinMax] >>> ***/ |
| 130 | |
| 131 | typedef INTEGER_t CN_IntegerMinMax_t; |
| 132 | |
| 133 | /*** <<< FUNC-DECLS [CN-IntegerMinMax] >>> ***/ |
| 134 | |
| 135 | extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax; |
| 136 | asn_struct_free_f CN_IntegerMinMax_free; |
| 137 | asn_struct_print_f CN_IntegerMinMax_print; |
| 138 | asn_constr_check_f CN_IntegerMinMax_constraint; |
| 139 | ber_type_decoder_f CN_IntegerMinMax_decode_ber; |
| 140 | der_type_encoder_f CN_IntegerMinMax_encode_der; |
| 141 | xer_type_decoder_f CN_IntegerMinMax_decode_xer; |
| 142 | xer_type_encoder_f CN_IntegerMinMax_encode_xer; |
| 143 | |
| 144 | /*** <<< CODE [CN-IntegerMinMax] >>> ***/ |
| 145 | |
| 146 | int |
| 147 | CN_IntegerMinMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 148 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 149 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
| 150 | |
| 151 | if(!sptr) { |
| 152 | _ASN_ERRLOG(app_errlog, app_key, |
| 153 | "%s: value not given (%s:%d)", |
| 154 | td->name, __FILE__, __LINE__); |
| 155 | return -1; |
| 156 | } |
| 157 | |
| 158 | |
| 159 | if(1 /* No applicable constraints whatsoever */) { |
| 160 | /* Nothing is here. See below */ |
| 161 | } |
| 162 | |
| 163 | /* Replace with underlying type checker */ |
| 164 | td->check_constraints = asn_DEF_INTEGER.check_constraints; |
| 165 | return td->check_constraints(td, sptr, app_errlog, app_key); |
| 166 | } |
| 167 | |
| 168 | /* |
| 169 | * This type is implemented using INTEGER, |
| 170 | * so here we adjust the DEF accordingly. |
| 171 | */ |
| 172 | static void |
| 173 | CN_IntegerMinMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 174 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 175 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 176 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 177 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 178 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 179 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 180 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
| 181 | if(!td->per_constraints) |
| 182 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 183 | td->elements = asn_DEF_INTEGER.elements; |
| 184 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 185 | td->specifics = asn_DEF_INTEGER.specifics; |
| 186 | } |
| 187 | |
| 188 | void |
| 189 | CN_IntegerMinMax_free(asn_TYPE_descriptor_t *td, |
| 190 | void *struct_ptr, int contents_only) { |
| 191 | CN_IntegerMinMax_1_inherit_TYPE_descriptor(td); |
| 192 | td->free_struct(td, struct_ptr, contents_only); |
| 193 | } |
| 194 | |
| 195 | int |
| 196 | CN_IntegerMinMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 197 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 198 | CN_IntegerMinMax_1_inherit_TYPE_descriptor(td); |
| 199 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 200 | } |
| 201 | |
| 202 | asn_dec_rval_t |
| 203 | CN_IntegerMinMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 204 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 205 | CN_IntegerMinMax_1_inherit_TYPE_descriptor(td); |
| 206 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 207 | } |
| 208 | |
| 209 | asn_enc_rval_t |
| 210 | CN_IntegerMinMax_encode_der(asn_TYPE_descriptor_t *td, |
| 211 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 212 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 213 | CN_IntegerMinMax_1_inherit_TYPE_descriptor(td); |
| 214 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 215 | } |
| 216 | |
| 217 | asn_dec_rval_t |
| 218 | CN_IntegerMinMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 219 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 220 | CN_IntegerMinMax_1_inherit_TYPE_descriptor(td); |
| 221 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 222 | } |
| 223 | |
| 224 | asn_enc_rval_t |
| 225 | CN_IntegerMinMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 226 | int ilevel, enum xer_encoder_flags_e flags, |
| 227 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 228 | CN_IntegerMinMax_1_inherit_TYPE_descriptor(td); |
| 229 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 230 | } |
| 231 | |
| 232 | |
| 233 | /*** <<< STAT-DEFS [CN-IntegerMinMax] >>> ***/ |
| 234 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 235 | static ber_tlv_tag_t asn_DEF_CN_IntegerMinMax_tags_1[] = { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 236 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 237 | }; |
| 238 | asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax = { |
| 239 | "CN-IntegerMinMax", |
| 240 | "CN-IntegerMinMax", |
| 241 | CN_IntegerMinMax_free, |
| 242 | CN_IntegerMinMax_print, |
| 243 | CN_IntegerMinMax_constraint, |
| 244 | CN_IntegerMinMax_decode_ber, |
| 245 | CN_IntegerMinMax_encode_der, |
| 246 | CN_IntegerMinMax_decode_xer, |
| 247 | CN_IntegerMinMax_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 248 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 249 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 250 | asn_DEF_CN_IntegerMinMax_tags_1, |
| 251 | sizeof(asn_DEF_CN_IntegerMinMax_tags_1) |
| 252 | /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */ |
| 253 | asn_DEF_CN_IntegerMinMax_tags_1, /* Same as above */ |
| 254 | sizeof(asn_DEF_CN_IntegerMinMax_tags_1) |
| 255 | /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */ |
| 256 | 0, /* No PER visible constraints */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 257 | 0, 0, /* No members */ |
| 258 | 0 /* No specifics */ |
| 259 | }; |
| 260 | |
| 261 | |
| 262 | /*** <<< INCLUDES [CN-IntegerMinLow] >>> ***/ |
| 263 | |
| 264 | #include <INTEGER.h> |
| 265 | |
| 266 | /*** <<< TYPE-DECLS [CN-IntegerMinLow] >>> ***/ |
| 267 | |
| 268 | typedef INTEGER_t CN_IntegerMinLow_t; |
| 269 | |
| 270 | /*** <<< FUNC-DECLS [CN-IntegerMinLow] >>> ***/ |
| 271 | |
| 272 | extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow; |
| 273 | asn_struct_free_f CN_IntegerMinLow_free; |
| 274 | asn_struct_print_f CN_IntegerMinLow_print; |
| 275 | asn_constr_check_f CN_IntegerMinLow_constraint; |
| 276 | ber_type_decoder_f CN_IntegerMinLow_decode_ber; |
| 277 | der_type_encoder_f CN_IntegerMinLow_encode_der; |
| 278 | xer_type_decoder_f CN_IntegerMinLow_decode_xer; |
| 279 | xer_type_encoder_f CN_IntegerMinLow_encode_xer; |
| 280 | |
| 281 | /*** <<< CODE [CN-IntegerMinLow] >>> ***/ |
| 282 | |
| 283 | int |
| 284 | CN_IntegerMinLow_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 285 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 286 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
| 287 | long value; |
| 288 | |
| 289 | if(!sptr) { |
| 290 | _ASN_ERRLOG(app_errlog, app_key, |
| 291 | "%s: value not given (%s:%d)", |
| 292 | td->name, __FILE__, __LINE__); |
| 293 | return -1; |
| 294 | } |
| 295 | |
| 296 | if(asn_INTEGER2long(st, &value)) { |
| 297 | _ASN_ERRLOG(app_errlog, app_key, |
| 298 | "%s: value too large (%s:%d)", |
| 299 | td->name, __FILE__, __LINE__); |
| 300 | return -1; |
| 301 | } |
| 302 | |
| 303 | if((value <= 1)) { |
| 304 | /* Constraint check succeeded */ |
| 305 | return 0; |
| 306 | } else { |
| 307 | _ASN_ERRLOG(app_errlog, app_key, |
| 308 | "%s: constraint failed (%s:%d)", |
| 309 | td->name, __FILE__, __LINE__); |
| 310 | return -1; |
| 311 | } |
| 312 | } |
| 313 | |
| 314 | /* |
| 315 | * This type is implemented using INTEGER, |
| 316 | * so here we adjust the DEF accordingly. |
| 317 | */ |
| 318 | static void |
| 319 | CN_IntegerMinLow_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 320 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 321 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 322 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 323 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 324 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 325 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 326 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
| 327 | if(!td->per_constraints) |
| 328 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 329 | td->elements = asn_DEF_INTEGER.elements; |
| 330 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 331 | td->specifics = asn_DEF_INTEGER.specifics; |
| 332 | } |
| 333 | |
| 334 | void |
| 335 | CN_IntegerMinLow_free(asn_TYPE_descriptor_t *td, |
| 336 | void *struct_ptr, int contents_only) { |
| 337 | CN_IntegerMinLow_1_inherit_TYPE_descriptor(td); |
| 338 | td->free_struct(td, struct_ptr, contents_only); |
| 339 | } |
| 340 | |
| 341 | int |
| 342 | CN_IntegerMinLow_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 343 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 344 | CN_IntegerMinLow_1_inherit_TYPE_descriptor(td); |
| 345 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 346 | } |
| 347 | |
| 348 | asn_dec_rval_t |
| 349 | CN_IntegerMinLow_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 350 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 351 | CN_IntegerMinLow_1_inherit_TYPE_descriptor(td); |
| 352 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 353 | } |
| 354 | |
| 355 | asn_enc_rval_t |
| 356 | CN_IntegerMinLow_encode_der(asn_TYPE_descriptor_t *td, |
| 357 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 358 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 359 | CN_IntegerMinLow_1_inherit_TYPE_descriptor(td); |
| 360 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 361 | } |
| 362 | |
| 363 | asn_dec_rval_t |
| 364 | CN_IntegerMinLow_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 365 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 366 | CN_IntegerMinLow_1_inherit_TYPE_descriptor(td); |
| 367 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 368 | } |
| 369 | |
| 370 | asn_enc_rval_t |
| 371 | CN_IntegerMinLow_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 372 | int ilevel, enum xer_encoder_flags_e flags, |
| 373 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 374 | CN_IntegerMinLow_1_inherit_TYPE_descriptor(td); |
| 375 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 376 | } |
| 377 | |
| 378 | |
| 379 | /*** <<< STAT-DEFS [CN-IntegerMinLow] >>> ***/ |
| 380 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 381 | static ber_tlv_tag_t asn_DEF_CN_IntegerMinLow_tags_1[] = { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 382 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 383 | }; |
| 384 | asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow = { |
| 385 | "CN-IntegerMinLow", |
| 386 | "CN-IntegerMinLow", |
| 387 | CN_IntegerMinLow_free, |
| 388 | CN_IntegerMinLow_print, |
| 389 | CN_IntegerMinLow_constraint, |
| 390 | CN_IntegerMinLow_decode_ber, |
| 391 | CN_IntegerMinLow_encode_der, |
| 392 | CN_IntegerMinLow_decode_xer, |
| 393 | CN_IntegerMinLow_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 394 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 395 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 396 | asn_DEF_CN_IntegerMinLow_tags_1, |
| 397 | sizeof(asn_DEF_CN_IntegerMinLow_tags_1) |
| 398 | /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */ |
| 399 | asn_DEF_CN_IntegerMinLow_tags_1, /* Same as above */ |
| 400 | sizeof(asn_DEF_CN_IntegerMinLow_tags_1) |
| 401 | /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */ |
| 402 | 0, /* No PER visible constraints */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 403 | 0, 0, /* No members */ |
| 404 | 0 /* No specifics */ |
| 405 | }; |
| 406 | |
| 407 | |
| 408 | /*** <<< INCLUDES [NO-IntegerMinHigh] >>> ***/ |
| 409 | |
| 410 | #include <INTEGER.h> |
| 411 | |
| 412 | /*** <<< TYPE-DECLS [NO-IntegerMinHigh] >>> ***/ |
| 413 | |
| 414 | typedef INTEGER_t NO_IntegerMinHigh_t; |
| 415 | |
| 416 | /*** <<< FUNC-DECLS [NO-IntegerMinHigh] >>> ***/ |
| 417 | |
| 418 | extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh; |
| 419 | asn_struct_free_f NO_IntegerMinHigh_free; |
| 420 | asn_struct_print_f NO_IntegerMinHigh_print; |
| 421 | asn_constr_check_f NO_IntegerMinHigh_constraint; |
| 422 | ber_type_decoder_f NO_IntegerMinHigh_decode_ber; |
| 423 | der_type_encoder_f NO_IntegerMinHigh_encode_der; |
| 424 | xer_type_decoder_f NO_IntegerMinHigh_decode_xer; |
| 425 | xer_type_encoder_f NO_IntegerMinHigh_encode_xer; |
| 426 | |
| 427 | /*** <<< CODE [NO-IntegerMinHigh] >>> ***/ |
| 428 | |
| 429 | int |
| 430 | NO_IntegerMinHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 431 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 432 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
| 433 | long value; |
| 434 | |
| 435 | if(!sptr) { |
| 436 | _ASN_ERRLOG(app_errlog, app_key, |
| 437 | "%s: value not given (%s:%d)", |
| 438 | td->name, __FILE__, __LINE__); |
| 439 | return -1; |
| 440 | } |
| 441 | |
| 442 | if(asn_INTEGER2long(st, &value)) { |
| 443 | _ASN_ERRLOG(app_errlog, app_key, |
| 444 | "%s: value too large (%s:%d)", |
| 445 | td->name, __FILE__, __LINE__); |
| 446 | return -1; |
| 447 | } |
| 448 | |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 449 | if((value <= 3000000000)) { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 450 | /* Constraint check succeeded */ |
| 451 | return 0; |
| 452 | } else { |
| 453 | _ASN_ERRLOG(app_errlog, app_key, |
| 454 | "%s: constraint failed (%s:%d)", |
| 455 | td->name, __FILE__, __LINE__); |
| 456 | return -1; |
| 457 | } |
| 458 | } |
| 459 | |
| 460 | /* |
| 461 | * This type is implemented using INTEGER, |
| 462 | * so here we adjust the DEF accordingly. |
| 463 | */ |
| 464 | static void |
| 465 | NO_IntegerMinHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 466 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 467 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 468 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 469 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 470 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 471 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 472 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
| 473 | if(!td->per_constraints) |
| 474 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 475 | td->elements = asn_DEF_INTEGER.elements; |
| 476 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 477 | td->specifics = asn_DEF_INTEGER.specifics; |
| 478 | } |
| 479 | |
| 480 | void |
| 481 | NO_IntegerMinHigh_free(asn_TYPE_descriptor_t *td, |
| 482 | void *struct_ptr, int contents_only) { |
| 483 | NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td); |
| 484 | td->free_struct(td, struct_ptr, contents_only); |
| 485 | } |
| 486 | |
| 487 | int |
| 488 | NO_IntegerMinHigh_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 489 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 490 | NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td); |
| 491 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 492 | } |
| 493 | |
| 494 | asn_dec_rval_t |
| 495 | NO_IntegerMinHigh_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 496 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 497 | NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td); |
| 498 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 499 | } |
| 500 | |
| 501 | asn_enc_rval_t |
| 502 | NO_IntegerMinHigh_encode_der(asn_TYPE_descriptor_t *td, |
| 503 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 504 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 505 | NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td); |
| 506 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 507 | } |
| 508 | |
| 509 | asn_dec_rval_t |
| 510 | NO_IntegerMinHigh_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 511 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 512 | NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td); |
| 513 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 514 | } |
| 515 | |
| 516 | asn_enc_rval_t |
| 517 | NO_IntegerMinHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 518 | int ilevel, enum xer_encoder_flags_e flags, |
| 519 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 520 | NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td); |
| 521 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 522 | } |
| 523 | |
| 524 | |
| 525 | /*** <<< STAT-DEFS [NO-IntegerMinHigh] >>> ***/ |
| 526 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 527 | static ber_tlv_tag_t asn_DEF_NO_IntegerMinHigh_tags_1[] = { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 528 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 529 | }; |
| 530 | asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh = { |
| 531 | "NO-IntegerMinHigh", |
| 532 | "NO-IntegerMinHigh", |
| 533 | NO_IntegerMinHigh_free, |
| 534 | NO_IntegerMinHigh_print, |
| 535 | NO_IntegerMinHigh_constraint, |
| 536 | NO_IntegerMinHigh_decode_ber, |
| 537 | NO_IntegerMinHigh_encode_der, |
| 538 | NO_IntegerMinHigh_decode_xer, |
| 539 | NO_IntegerMinHigh_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 540 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 541 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 542 | asn_DEF_NO_IntegerMinHigh_tags_1, |
| 543 | sizeof(asn_DEF_NO_IntegerMinHigh_tags_1) |
| 544 | /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */ |
| 545 | asn_DEF_NO_IntegerMinHigh_tags_1, /* Same as above */ |
| 546 | sizeof(asn_DEF_NO_IntegerMinHigh_tags_1) |
| 547 | /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */ |
| 548 | 0, /* No PER visible constraints */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 549 | 0, 0, /* No members */ |
| 550 | 0 /* No specifics */ |
| 551 | }; |
| 552 | |
| 553 | |
| 554 | /*** <<< INCLUDES [NO-IntegerLowHigh] >>> ***/ |
| 555 | |
| 556 | #include <INTEGER.h> |
| 557 | |
| 558 | /*** <<< TYPE-DECLS [NO-IntegerLowHigh] >>> ***/ |
| 559 | |
| 560 | typedef INTEGER_t NO_IntegerLowHigh_t; |
| 561 | |
| 562 | /*** <<< FUNC-DECLS [NO-IntegerLowHigh] >>> ***/ |
| 563 | |
| 564 | extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh; |
| 565 | asn_struct_free_f NO_IntegerLowHigh_free; |
| 566 | asn_struct_print_f NO_IntegerLowHigh_print; |
| 567 | asn_constr_check_f NO_IntegerLowHigh_constraint; |
| 568 | ber_type_decoder_f NO_IntegerLowHigh_decode_ber; |
| 569 | der_type_encoder_f NO_IntegerLowHigh_encode_der; |
| 570 | xer_type_decoder_f NO_IntegerLowHigh_decode_xer; |
| 571 | xer_type_encoder_f NO_IntegerLowHigh_encode_xer; |
| 572 | |
| 573 | /*** <<< CODE [NO-IntegerLowHigh] >>> ***/ |
| 574 | |
| 575 | int |
| 576 | NO_IntegerLowHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 577 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 578 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
| 579 | long value; |
| 580 | |
| 581 | if(!sptr) { |
| 582 | _ASN_ERRLOG(app_errlog, app_key, |
| 583 | "%s: value not given (%s:%d)", |
| 584 | td->name, __FILE__, __LINE__); |
| 585 | return -1; |
| 586 | } |
| 587 | |
| 588 | if(asn_INTEGER2long(st, &value)) { |
| 589 | _ASN_ERRLOG(app_errlog, app_key, |
| 590 | "%s: value too large (%s:%d)", |
| 591 | td->name, __FILE__, __LINE__); |
| 592 | return -1; |
| 593 | } |
| 594 | |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 595 | if((value >= 1 && value <= 3000000000)) { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 596 | /* Constraint check succeeded */ |
| 597 | return 0; |
| 598 | } else { |
| 599 | _ASN_ERRLOG(app_errlog, app_key, |
| 600 | "%s: constraint failed (%s:%d)", |
| 601 | td->name, __FILE__, __LINE__); |
| 602 | return -1; |
| 603 | } |
| 604 | } |
| 605 | |
| 606 | /* |
| 607 | * This type is implemented using INTEGER, |
| 608 | * so here we adjust the DEF accordingly. |
| 609 | */ |
| 610 | static void |
| 611 | NO_IntegerLowHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 612 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 613 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 614 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 615 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 616 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 617 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 618 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
| 619 | if(!td->per_constraints) |
| 620 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 621 | td->elements = asn_DEF_INTEGER.elements; |
| 622 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 623 | td->specifics = asn_DEF_INTEGER.specifics; |
| 624 | } |
| 625 | |
| 626 | void |
| 627 | NO_IntegerLowHigh_free(asn_TYPE_descriptor_t *td, |
| 628 | void *struct_ptr, int contents_only) { |
| 629 | NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td); |
| 630 | td->free_struct(td, struct_ptr, contents_only); |
| 631 | } |
| 632 | |
| 633 | int |
| 634 | NO_IntegerLowHigh_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 635 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 636 | NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td); |
| 637 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 638 | } |
| 639 | |
| 640 | asn_dec_rval_t |
| 641 | NO_IntegerLowHigh_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 642 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 643 | NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td); |
| 644 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 645 | } |
| 646 | |
| 647 | asn_enc_rval_t |
| 648 | NO_IntegerLowHigh_encode_der(asn_TYPE_descriptor_t *td, |
| 649 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 650 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 651 | NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td); |
| 652 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 653 | } |
| 654 | |
| 655 | asn_dec_rval_t |
| 656 | NO_IntegerLowHigh_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 657 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 658 | NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td); |
| 659 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 660 | } |
| 661 | |
| 662 | asn_enc_rval_t |
| 663 | NO_IntegerLowHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 664 | int ilevel, enum xer_encoder_flags_e flags, |
| 665 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 666 | NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td); |
| 667 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 668 | } |
| 669 | |
| 670 | |
| 671 | /*** <<< STAT-DEFS [NO-IntegerLowHigh] >>> ***/ |
| 672 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 673 | static ber_tlv_tag_t asn_DEF_NO_IntegerLowHigh_tags_1[] = { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 674 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 675 | }; |
| 676 | asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh = { |
| 677 | "NO-IntegerLowHigh", |
| 678 | "NO-IntegerLowHigh", |
| 679 | NO_IntegerLowHigh_free, |
| 680 | NO_IntegerLowHigh_print, |
| 681 | NO_IntegerLowHigh_constraint, |
| 682 | NO_IntegerLowHigh_decode_ber, |
| 683 | NO_IntegerLowHigh_encode_der, |
| 684 | NO_IntegerLowHigh_decode_xer, |
| 685 | NO_IntegerLowHigh_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 686 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 687 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 688 | asn_DEF_NO_IntegerLowHigh_tags_1, |
| 689 | sizeof(asn_DEF_NO_IntegerLowHigh_tags_1) |
| 690 | /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */ |
| 691 | asn_DEF_NO_IntegerLowHigh_tags_1, /* Same as above */ |
| 692 | sizeof(asn_DEF_NO_IntegerLowHigh_tags_1) |
| 693 | /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */ |
| 694 | 0, /* No PER visible constraints */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 695 | 0, 0, /* No members */ |
| 696 | 0 /* No specifics */ |
| 697 | }; |
| 698 | |
| 699 | |
| 700 | /*** <<< INCLUDES [CN-IntegerLowMax] >>> ***/ |
| 701 | |
| 702 | #include <INTEGER.h> |
| 703 | |
| 704 | /*** <<< TYPE-DECLS [CN-IntegerLowMax] >>> ***/ |
| 705 | |
| 706 | typedef INTEGER_t CN_IntegerLowMax_t; |
| 707 | |
| 708 | /*** <<< FUNC-DECLS [CN-IntegerLowMax] >>> ***/ |
| 709 | |
| 710 | extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax; |
| 711 | asn_struct_free_f CN_IntegerLowMax_free; |
| 712 | asn_struct_print_f CN_IntegerLowMax_print; |
| 713 | asn_constr_check_f CN_IntegerLowMax_constraint; |
| 714 | ber_type_decoder_f CN_IntegerLowMax_decode_ber; |
| 715 | der_type_encoder_f CN_IntegerLowMax_encode_der; |
| 716 | xer_type_decoder_f CN_IntegerLowMax_decode_xer; |
| 717 | xer_type_encoder_f CN_IntegerLowMax_encode_xer; |
| 718 | |
| 719 | /*** <<< CODE [CN-IntegerLowMax] >>> ***/ |
| 720 | |
| 721 | int |
| 722 | CN_IntegerLowMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 723 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 724 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
| 725 | long value; |
| 726 | |
| 727 | if(!sptr) { |
| 728 | _ASN_ERRLOG(app_errlog, app_key, |
| 729 | "%s: value not given (%s:%d)", |
| 730 | td->name, __FILE__, __LINE__); |
| 731 | return -1; |
| 732 | } |
| 733 | |
| 734 | if(asn_INTEGER2long(st, &value)) { |
| 735 | _ASN_ERRLOG(app_errlog, app_key, |
| 736 | "%s: value too large (%s:%d)", |
| 737 | td->name, __FILE__, __LINE__); |
| 738 | return -1; |
| 739 | } |
| 740 | |
| 741 | if((value >= 1)) { |
| 742 | /* Constraint check succeeded */ |
| 743 | return 0; |
| 744 | } else { |
| 745 | _ASN_ERRLOG(app_errlog, app_key, |
| 746 | "%s: constraint failed (%s:%d)", |
| 747 | td->name, __FILE__, __LINE__); |
| 748 | return -1; |
| 749 | } |
| 750 | } |
| 751 | |
| 752 | /* |
| 753 | * This type is implemented using INTEGER, |
| 754 | * so here we adjust the DEF accordingly. |
| 755 | */ |
| 756 | static void |
| 757 | CN_IntegerLowMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 758 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 759 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 760 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 761 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 762 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 763 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 764 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
| 765 | if(!td->per_constraints) |
| 766 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 767 | td->elements = asn_DEF_INTEGER.elements; |
| 768 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 769 | td->specifics = asn_DEF_INTEGER.specifics; |
| 770 | } |
| 771 | |
| 772 | void |
| 773 | CN_IntegerLowMax_free(asn_TYPE_descriptor_t *td, |
| 774 | void *struct_ptr, int contents_only) { |
| 775 | CN_IntegerLowMax_1_inherit_TYPE_descriptor(td); |
| 776 | td->free_struct(td, struct_ptr, contents_only); |
| 777 | } |
| 778 | |
| 779 | int |
| 780 | CN_IntegerLowMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 781 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 782 | CN_IntegerLowMax_1_inherit_TYPE_descriptor(td); |
| 783 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 784 | } |
| 785 | |
| 786 | asn_dec_rval_t |
| 787 | CN_IntegerLowMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 788 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 789 | CN_IntegerLowMax_1_inherit_TYPE_descriptor(td); |
| 790 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 791 | } |
| 792 | |
| 793 | asn_enc_rval_t |
| 794 | CN_IntegerLowMax_encode_der(asn_TYPE_descriptor_t *td, |
| 795 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 796 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 797 | CN_IntegerLowMax_1_inherit_TYPE_descriptor(td); |
| 798 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 799 | } |
| 800 | |
| 801 | asn_dec_rval_t |
| 802 | CN_IntegerLowMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 803 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 804 | CN_IntegerLowMax_1_inherit_TYPE_descriptor(td); |
| 805 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 806 | } |
| 807 | |
| 808 | asn_enc_rval_t |
| 809 | CN_IntegerLowMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 810 | int ilevel, enum xer_encoder_flags_e flags, |
| 811 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 812 | CN_IntegerLowMax_1_inherit_TYPE_descriptor(td); |
| 813 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 814 | } |
| 815 | |
| 816 | |
| 817 | /*** <<< STAT-DEFS [CN-IntegerLowMax] >>> ***/ |
| 818 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 819 | static ber_tlv_tag_t asn_DEF_CN_IntegerLowMax_tags_1[] = { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 820 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 821 | }; |
| 822 | asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax = { |
| 823 | "CN-IntegerLowMax", |
| 824 | "CN-IntegerLowMax", |
| 825 | CN_IntegerLowMax_free, |
| 826 | CN_IntegerLowMax_print, |
| 827 | CN_IntegerLowMax_constraint, |
| 828 | CN_IntegerLowMax_decode_ber, |
| 829 | CN_IntegerLowMax_encode_der, |
| 830 | CN_IntegerLowMax_decode_xer, |
| 831 | CN_IntegerLowMax_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 832 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 833 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 834 | asn_DEF_CN_IntegerLowMax_tags_1, |
| 835 | sizeof(asn_DEF_CN_IntegerLowMax_tags_1) |
| 836 | /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */ |
| 837 | asn_DEF_CN_IntegerLowMax_tags_1, /* Same as above */ |
| 838 | sizeof(asn_DEF_CN_IntegerLowMax_tags_1) |
| 839 | /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */ |
| 840 | 0, /* No PER visible constraints */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 841 | 0, 0, /* No members */ |
| 842 | 0 /* No specifics */ |
| 843 | }; |
| 844 | |
| 845 | |
| 846 | /*** <<< INCLUDES [NO-IntegerHighMax] >>> ***/ |
| 847 | |
| 848 | #include <INTEGER.h> |
| 849 | |
| 850 | /*** <<< TYPE-DECLS [NO-IntegerHighMax] >>> ***/ |
| 851 | |
| 852 | typedef INTEGER_t NO_IntegerHighMax_t; |
| 853 | |
| 854 | /*** <<< FUNC-DECLS [NO-IntegerHighMax] >>> ***/ |
| 855 | |
| 856 | extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax; |
| 857 | asn_struct_free_f NO_IntegerHighMax_free; |
| 858 | asn_struct_print_f NO_IntegerHighMax_print; |
| 859 | asn_constr_check_f NO_IntegerHighMax_constraint; |
| 860 | ber_type_decoder_f NO_IntegerHighMax_decode_ber; |
| 861 | der_type_encoder_f NO_IntegerHighMax_encode_der; |
| 862 | xer_type_decoder_f NO_IntegerHighMax_decode_xer; |
| 863 | xer_type_encoder_f NO_IntegerHighMax_encode_xer; |
| 864 | |
| 865 | /*** <<< CODE [NO-IntegerHighMax] >>> ***/ |
| 866 | |
| 867 | int |
| 868 | NO_IntegerHighMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 869 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 870 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
| 871 | long value; |
| 872 | |
| 873 | if(!sptr) { |
| 874 | _ASN_ERRLOG(app_errlog, app_key, |
| 875 | "%s: value not given (%s:%d)", |
| 876 | td->name, __FILE__, __LINE__); |
| 877 | return -1; |
| 878 | } |
| 879 | |
| 880 | if(asn_INTEGER2long(st, &value)) { |
| 881 | _ASN_ERRLOG(app_errlog, app_key, |
| 882 | "%s: value too large (%s:%d)", |
| 883 | td->name, __FILE__, __LINE__); |
| 884 | return -1; |
| 885 | } |
| 886 | |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 887 | if((value >= 3000000000)) { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 888 | /* Constraint check succeeded */ |
| 889 | return 0; |
| 890 | } else { |
| 891 | _ASN_ERRLOG(app_errlog, app_key, |
| 892 | "%s: constraint failed (%s:%d)", |
| 893 | td->name, __FILE__, __LINE__); |
| 894 | return -1; |
| 895 | } |
| 896 | } |
| 897 | |
| 898 | /* |
| 899 | * This type is implemented using INTEGER, |
| 900 | * so here we adjust the DEF accordingly. |
| 901 | */ |
| 902 | static void |
| 903 | NO_IntegerHighMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 904 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 905 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 906 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 907 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 908 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 909 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 910 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
| 911 | if(!td->per_constraints) |
| 912 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 913 | td->elements = asn_DEF_INTEGER.elements; |
| 914 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 915 | td->specifics = asn_DEF_INTEGER.specifics; |
| 916 | } |
| 917 | |
| 918 | void |
| 919 | NO_IntegerHighMax_free(asn_TYPE_descriptor_t *td, |
| 920 | void *struct_ptr, int contents_only) { |
| 921 | NO_IntegerHighMax_1_inherit_TYPE_descriptor(td); |
| 922 | td->free_struct(td, struct_ptr, contents_only); |
| 923 | } |
| 924 | |
| 925 | int |
| 926 | NO_IntegerHighMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 927 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 928 | NO_IntegerHighMax_1_inherit_TYPE_descriptor(td); |
| 929 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 930 | } |
| 931 | |
| 932 | asn_dec_rval_t |
| 933 | NO_IntegerHighMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 934 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 935 | NO_IntegerHighMax_1_inherit_TYPE_descriptor(td); |
| 936 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 937 | } |
| 938 | |
| 939 | asn_enc_rval_t |
| 940 | NO_IntegerHighMax_encode_der(asn_TYPE_descriptor_t *td, |
| 941 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 942 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 943 | NO_IntegerHighMax_1_inherit_TYPE_descriptor(td); |
| 944 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 945 | } |
| 946 | |
| 947 | asn_dec_rval_t |
| 948 | NO_IntegerHighMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 949 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 950 | NO_IntegerHighMax_1_inherit_TYPE_descriptor(td); |
| 951 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 952 | } |
| 953 | |
| 954 | asn_enc_rval_t |
| 955 | NO_IntegerHighMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 956 | int ilevel, enum xer_encoder_flags_e flags, |
| 957 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 958 | NO_IntegerHighMax_1_inherit_TYPE_descriptor(td); |
| 959 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 960 | } |
| 961 | |
| 962 | |
| 963 | /*** <<< STAT-DEFS [NO-IntegerHighMax] >>> ***/ |
| 964 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 965 | static ber_tlv_tag_t asn_DEF_NO_IntegerHighMax_tags_1[] = { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 966 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 967 | }; |
| 968 | asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax = { |
| 969 | "NO-IntegerHighMax", |
| 970 | "NO-IntegerHighMax", |
| 971 | NO_IntegerHighMax_free, |
| 972 | NO_IntegerHighMax_print, |
| 973 | NO_IntegerHighMax_constraint, |
| 974 | NO_IntegerHighMax_decode_ber, |
| 975 | NO_IntegerHighMax_encode_der, |
| 976 | NO_IntegerHighMax_decode_xer, |
| 977 | NO_IntegerHighMax_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 978 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 979 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 980 | asn_DEF_NO_IntegerHighMax_tags_1, |
| 981 | sizeof(asn_DEF_NO_IntegerHighMax_tags_1) |
| 982 | /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */ |
| 983 | asn_DEF_NO_IntegerHighMax_tags_1, /* Same as above */ |
| 984 | sizeof(asn_DEF_NO_IntegerHighMax_tags_1) |
| 985 | /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */ |
| 986 | 0, /* No PER visible constraints */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 987 | 0, 0, /* No members */ |
| 988 | 0 /* No specifics */ |
| 989 | }; |
| 990 | |
| 991 | |
| 992 | /*** <<< INCLUDES [NO-IntegerLowestMax] >>> ***/ |
| 993 | |
| 994 | #include <INTEGER.h> |
| 995 | |
| 996 | /*** <<< TYPE-DECLS [NO-IntegerLowestMax] >>> ***/ |
| 997 | |
| 998 | typedef INTEGER_t NO_IntegerLowestMax_t; |
| 999 | |
| 1000 | /*** <<< FUNC-DECLS [NO-IntegerLowestMax] >>> ***/ |
| 1001 | |
| 1002 | extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax; |
| 1003 | asn_struct_free_f NO_IntegerLowestMax_free; |
| 1004 | asn_struct_print_f NO_IntegerLowestMax_print; |
| 1005 | asn_constr_check_f NO_IntegerLowestMax_constraint; |
| 1006 | ber_type_decoder_f NO_IntegerLowestMax_decode_ber; |
| 1007 | der_type_encoder_f NO_IntegerLowestMax_encode_der; |
| 1008 | xer_type_decoder_f NO_IntegerLowestMax_decode_xer; |
| 1009 | xer_type_encoder_f NO_IntegerLowestMax_encode_xer; |
| 1010 | |
| 1011 | /*** <<< CODE [NO-IntegerLowestMax] >>> ***/ |
| 1012 | |
| 1013 | int |
| 1014 | NO_IntegerLowestMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 1015 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 1016 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
| 1017 | long value; |
| 1018 | |
| 1019 | if(!sptr) { |
| 1020 | _ASN_ERRLOG(app_errlog, app_key, |
| 1021 | "%s: value not given (%s:%d)", |
| 1022 | td->name, __FILE__, __LINE__); |
| 1023 | return -1; |
| 1024 | } |
| 1025 | |
| 1026 | if(asn_INTEGER2long(st, &value)) { |
| 1027 | _ASN_ERRLOG(app_errlog, app_key, |
| 1028 | "%s: value too large (%s:%d)", |
| 1029 | td->name, __FILE__, __LINE__); |
| 1030 | return -1; |
| 1031 | } |
| 1032 | |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1033 | if((value >= -3000000000)) { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1034 | /* Constraint check succeeded */ |
| 1035 | return 0; |
| 1036 | } else { |
| 1037 | _ASN_ERRLOG(app_errlog, app_key, |
| 1038 | "%s: constraint failed (%s:%d)", |
| 1039 | td->name, __FILE__, __LINE__); |
| 1040 | return -1; |
| 1041 | } |
| 1042 | } |
| 1043 | |
| 1044 | /* |
| 1045 | * This type is implemented using INTEGER, |
| 1046 | * so here we adjust the DEF accordingly. |
| 1047 | */ |
| 1048 | static void |
| 1049 | NO_IntegerLowestMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 1050 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 1051 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 1052 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 1053 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 1054 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 1055 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1056 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
| 1057 | if(!td->per_constraints) |
| 1058 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1059 | td->elements = asn_DEF_INTEGER.elements; |
| 1060 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 1061 | td->specifics = asn_DEF_INTEGER.specifics; |
| 1062 | } |
| 1063 | |
| 1064 | void |
| 1065 | NO_IntegerLowestMax_free(asn_TYPE_descriptor_t *td, |
| 1066 | void *struct_ptr, int contents_only) { |
| 1067 | NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td); |
| 1068 | td->free_struct(td, struct_ptr, contents_only); |
| 1069 | } |
| 1070 | |
| 1071 | int |
| 1072 | NO_IntegerLowestMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 1073 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 1074 | NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td); |
| 1075 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 1076 | } |
| 1077 | |
| 1078 | asn_dec_rval_t |
| 1079 | NO_IntegerLowestMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1080 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 1081 | NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td); |
| 1082 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 1083 | } |
| 1084 | |
| 1085 | asn_enc_rval_t |
| 1086 | NO_IntegerLowestMax_encode_der(asn_TYPE_descriptor_t *td, |
| 1087 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 1088 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1089 | NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td); |
| 1090 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 1091 | } |
| 1092 | |
| 1093 | asn_dec_rval_t |
| 1094 | NO_IntegerLowestMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1095 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 1096 | NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td); |
| 1097 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 1098 | } |
| 1099 | |
| 1100 | asn_enc_rval_t |
| 1101 | NO_IntegerLowestMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 1102 | int ilevel, enum xer_encoder_flags_e flags, |
| 1103 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1104 | NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td); |
| 1105 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 1106 | } |
| 1107 | |
| 1108 | |
| 1109 | /*** <<< STAT-DEFS [NO-IntegerLowestMax] >>> ***/ |
| 1110 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1111 | static ber_tlv_tag_t asn_DEF_NO_IntegerLowestMax_tags_1[] = { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1112 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1113 | }; |
| 1114 | asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax = { |
| 1115 | "NO-IntegerLowestMax", |
| 1116 | "NO-IntegerLowestMax", |
| 1117 | NO_IntegerLowestMax_free, |
| 1118 | NO_IntegerLowestMax_print, |
| 1119 | NO_IntegerLowestMax_constraint, |
| 1120 | NO_IntegerLowestMax_decode_ber, |
| 1121 | NO_IntegerLowestMax_encode_der, |
| 1122 | NO_IntegerLowestMax_decode_xer, |
| 1123 | NO_IntegerLowestMax_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1124 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1125 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1126 | asn_DEF_NO_IntegerLowestMax_tags_1, |
| 1127 | sizeof(asn_DEF_NO_IntegerLowestMax_tags_1) |
| 1128 | /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */ |
| 1129 | asn_DEF_NO_IntegerLowestMax_tags_1, /* Same as above */ |
| 1130 | sizeof(asn_DEF_NO_IntegerLowestMax_tags_1) |
| 1131 | /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */ |
| 1132 | 0, /* No PER visible constraints */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1133 | 0, 0, /* No members */ |
| 1134 | 0 /* No specifics */ |
| 1135 | }; |
| 1136 | |
| 1137 | |
| 1138 | /*** <<< INCLUDES [NO-IntegerOutRange] >>> ***/ |
| 1139 | |
| 1140 | #include <INTEGER.h> |
| 1141 | |
| 1142 | /*** <<< TYPE-DECLS [NO-IntegerOutRange] >>> ***/ |
| 1143 | |
| 1144 | typedef INTEGER_t NO_IntegerOutRange_t; |
| 1145 | |
| 1146 | /*** <<< FUNC-DECLS [NO-IntegerOutRange] >>> ***/ |
| 1147 | |
| 1148 | extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange; |
| 1149 | asn_struct_free_f NO_IntegerOutRange_free; |
| 1150 | asn_struct_print_f NO_IntegerOutRange_print; |
| 1151 | asn_constr_check_f NO_IntegerOutRange_constraint; |
| 1152 | ber_type_decoder_f NO_IntegerOutRange_decode_ber; |
| 1153 | der_type_encoder_f NO_IntegerOutRange_encode_der; |
| 1154 | xer_type_decoder_f NO_IntegerOutRange_decode_xer; |
| 1155 | xer_type_encoder_f NO_IntegerOutRange_encode_xer; |
| 1156 | |
| 1157 | /*** <<< CODE [NO-IntegerOutRange] >>> ***/ |
| 1158 | |
| 1159 | int |
| 1160 | NO_IntegerOutRange_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 1161 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 1162 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
| 1163 | long value; |
| 1164 | |
| 1165 | if(!sptr) { |
| 1166 | _ASN_ERRLOG(app_errlog, app_key, |
| 1167 | "%s: value not given (%s:%d)", |
| 1168 | td->name, __FILE__, __LINE__); |
| 1169 | return -1; |
| 1170 | } |
| 1171 | |
| 1172 | if(asn_INTEGER2long(st, &value)) { |
| 1173 | _ASN_ERRLOG(app_errlog, app_key, |
| 1174 | "%s: value too large (%s:%d)", |
| 1175 | td->name, __FILE__, __LINE__); |
| 1176 | return -1; |
| 1177 | } |
| 1178 | |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1179 | if((value >= 3000000000 && value <= 3000000001)) { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1180 | /* Constraint check succeeded */ |
| 1181 | return 0; |
| 1182 | } else { |
| 1183 | _ASN_ERRLOG(app_errlog, app_key, |
| 1184 | "%s: constraint failed (%s:%d)", |
| 1185 | td->name, __FILE__, __LINE__); |
| 1186 | return -1; |
| 1187 | } |
| 1188 | } |
| 1189 | |
| 1190 | /* |
| 1191 | * This type is implemented using INTEGER, |
| 1192 | * so here we adjust the DEF accordingly. |
| 1193 | */ |
| 1194 | static void |
| 1195 | NO_IntegerOutRange_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 1196 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 1197 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 1198 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 1199 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 1200 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 1201 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1202 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
| 1203 | if(!td->per_constraints) |
| 1204 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1205 | td->elements = asn_DEF_INTEGER.elements; |
| 1206 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 1207 | td->specifics = asn_DEF_INTEGER.specifics; |
| 1208 | } |
| 1209 | |
| 1210 | void |
| 1211 | NO_IntegerOutRange_free(asn_TYPE_descriptor_t *td, |
| 1212 | void *struct_ptr, int contents_only) { |
| 1213 | NO_IntegerOutRange_1_inherit_TYPE_descriptor(td); |
| 1214 | td->free_struct(td, struct_ptr, contents_only); |
| 1215 | } |
| 1216 | |
| 1217 | int |
| 1218 | NO_IntegerOutRange_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 1219 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 1220 | NO_IntegerOutRange_1_inherit_TYPE_descriptor(td); |
| 1221 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 1222 | } |
| 1223 | |
| 1224 | asn_dec_rval_t |
| 1225 | NO_IntegerOutRange_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1226 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 1227 | NO_IntegerOutRange_1_inherit_TYPE_descriptor(td); |
| 1228 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 1229 | } |
| 1230 | |
| 1231 | asn_enc_rval_t |
| 1232 | NO_IntegerOutRange_encode_der(asn_TYPE_descriptor_t *td, |
| 1233 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 1234 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1235 | NO_IntegerOutRange_1_inherit_TYPE_descriptor(td); |
| 1236 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 1237 | } |
| 1238 | |
| 1239 | asn_dec_rval_t |
| 1240 | NO_IntegerOutRange_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1241 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 1242 | NO_IntegerOutRange_1_inherit_TYPE_descriptor(td); |
| 1243 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 1244 | } |
| 1245 | |
| 1246 | asn_enc_rval_t |
| 1247 | NO_IntegerOutRange_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 1248 | int ilevel, enum xer_encoder_flags_e flags, |
| 1249 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1250 | NO_IntegerOutRange_1_inherit_TYPE_descriptor(td); |
| 1251 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 1252 | } |
| 1253 | |
| 1254 | |
| 1255 | /*** <<< STAT-DEFS [NO-IntegerOutRange] >>> ***/ |
| 1256 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1257 | static ber_tlv_tag_t asn_DEF_NO_IntegerOutRange_tags_1[] = { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1258 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1259 | }; |
| 1260 | asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange = { |
| 1261 | "NO-IntegerOutRange", |
| 1262 | "NO-IntegerOutRange", |
| 1263 | NO_IntegerOutRange_free, |
| 1264 | NO_IntegerOutRange_print, |
| 1265 | NO_IntegerOutRange_constraint, |
| 1266 | NO_IntegerOutRange_decode_ber, |
| 1267 | NO_IntegerOutRange_encode_der, |
| 1268 | NO_IntegerOutRange_decode_xer, |
| 1269 | NO_IntegerOutRange_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1270 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1271 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1272 | asn_DEF_NO_IntegerOutRange_tags_1, |
| 1273 | sizeof(asn_DEF_NO_IntegerOutRange_tags_1) |
| 1274 | /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */ |
| 1275 | asn_DEF_NO_IntegerOutRange_tags_1, /* Same as above */ |
| 1276 | sizeof(asn_DEF_NO_IntegerOutRange_tags_1) |
| 1277 | /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */ |
| 1278 | 0, /* No PER visible constraints */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1279 | 0, 0, /* No members */ |
| 1280 | 0 /* No specifics */ |
| 1281 | }; |
| 1282 | |
| 1283 | |
| 1284 | /*** <<< INCLUDES [NO-IntegerOutValue] >>> ***/ |
| 1285 | |
| 1286 | #include <INTEGER.h> |
| 1287 | |
| 1288 | /*** <<< TYPE-DECLS [NO-IntegerOutValue] >>> ***/ |
| 1289 | |
| 1290 | typedef INTEGER_t NO_IntegerOutValue_t; |
| 1291 | |
| 1292 | /*** <<< FUNC-DECLS [NO-IntegerOutValue] >>> ***/ |
| 1293 | |
| 1294 | extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue; |
| 1295 | asn_struct_free_f NO_IntegerOutValue_free; |
| 1296 | asn_struct_print_f NO_IntegerOutValue_print; |
| 1297 | asn_constr_check_f NO_IntegerOutValue_constraint; |
| 1298 | ber_type_decoder_f NO_IntegerOutValue_decode_ber; |
| 1299 | der_type_encoder_f NO_IntegerOutValue_encode_der; |
| 1300 | xer_type_decoder_f NO_IntegerOutValue_decode_xer; |
| 1301 | xer_type_encoder_f NO_IntegerOutValue_encode_xer; |
| 1302 | |
| 1303 | /*** <<< CODE [NO-IntegerOutValue] >>> ***/ |
| 1304 | |
| 1305 | int |
| 1306 | NO_IntegerOutValue_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 1307 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 1308 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
| 1309 | long value; |
| 1310 | |
| 1311 | if(!sptr) { |
| 1312 | _ASN_ERRLOG(app_errlog, app_key, |
| 1313 | "%s: value not given (%s:%d)", |
| 1314 | td->name, __FILE__, __LINE__); |
| 1315 | return -1; |
| 1316 | } |
| 1317 | |
| 1318 | if(asn_INTEGER2long(st, &value)) { |
| 1319 | _ASN_ERRLOG(app_errlog, app_key, |
| 1320 | "%s: value too large (%s:%d)", |
| 1321 | td->name, __FILE__, __LINE__); |
| 1322 | return -1; |
| 1323 | } |
| 1324 | |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1325 | if((value == 3000000000)) { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1326 | /* Constraint check succeeded */ |
| 1327 | return 0; |
| 1328 | } else { |
| 1329 | _ASN_ERRLOG(app_errlog, app_key, |
| 1330 | "%s: constraint failed (%s:%d)", |
| 1331 | td->name, __FILE__, __LINE__); |
| 1332 | return -1; |
| 1333 | } |
| 1334 | } |
| 1335 | |
| 1336 | /* |
| 1337 | * This type is implemented using INTEGER, |
| 1338 | * so here we adjust the DEF accordingly. |
| 1339 | */ |
| 1340 | static void |
| 1341 | NO_IntegerOutValue_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 1342 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 1343 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 1344 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 1345 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 1346 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 1347 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1348 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
| 1349 | if(!td->per_constraints) |
| 1350 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1351 | td->elements = asn_DEF_INTEGER.elements; |
| 1352 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 1353 | td->specifics = asn_DEF_INTEGER.specifics; |
| 1354 | } |
| 1355 | |
| 1356 | void |
| 1357 | NO_IntegerOutValue_free(asn_TYPE_descriptor_t *td, |
| 1358 | void *struct_ptr, int contents_only) { |
| 1359 | NO_IntegerOutValue_1_inherit_TYPE_descriptor(td); |
| 1360 | td->free_struct(td, struct_ptr, contents_only); |
| 1361 | } |
| 1362 | |
| 1363 | int |
| 1364 | NO_IntegerOutValue_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 1365 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 1366 | NO_IntegerOutValue_1_inherit_TYPE_descriptor(td); |
| 1367 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 1368 | } |
| 1369 | |
| 1370 | asn_dec_rval_t |
| 1371 | NO_IntegerOutValue_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1372 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 1373 | NO_IntegerOutValue_1_inherit_TYPE_descriptor(td); |
| 1374 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 1375 | } |
| 1376 | |
| 1377 | asn_enc_rval_t |
| 1378 | NO_IntegerOutValue_encode_der(asn_TYPE_descriptor_t *td, |
| 1379 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 1380 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1381 | NO_IntegerOutValue_1_inherit_TYPE_descriptor(td); |
| 1382 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 1383 | } |
| 1384 | |
| 1385 | asn_dec_rval_t |
| 1386 | NO_IntegerOutValue_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1387 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 1388 | NO_IntegerOutValue_1_inherit_TYPE_descriptor(td); |
| 1389 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 1390 | } |
| 1391 | |
| 1392 | asn_enc_rval_t |
| 1393 | NO_IntegerOutValue_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 1394 | int ilevel, enum xer_encoder_flags_e flags, |
| 1395 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1396 | NO_IntegerOutValue_1_inherit_TYPE_descriptor(td); |
| 1397 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 1398 | } |
| 1399 | |
| 1400 | |
| 1401 | /*** <<< STAT-DEFS [NO-IntegerOutValue] >>> ***/ |
| 1402 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1403 | static ber_tlv_tag_t asn_DEF_NO_IntegerOutValue_tags_1[] = { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1404 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1405 | }; |
| 1406 | asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue = { |
| 1407 | "NO-IntegerOutValue", |
| 1408 | "NO-IntegerOutValue", |
| 1409 | NO_IntegerOutValue_free, |
| 1410 | NO_IntegerOutValue_print, |
| 1411 | NO_IntegerOutValue_constraint, |
| 1412 | NO_IntegerOutValue_decode_ber, |
| 1413 | NO_IntegerOutValue_encode_der, |
| 1414 | NO_IntegerOutValue_decode_xer, |
| 1415 | NO_IntegerOutValue_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1416 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1417 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1418 | asn_DEF_NO_IntegerOutValue_tags_1, |
| 1419 | sizeof(asn_DEF_NO_IntegerOutValue_tags_1) |
| 1420 | /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */ |
| 1421 | asn_DEF_NO_IntegerOutValue_tags_1, /* Same as above */ |
| 1422 | sizeof(asn_DEF_NO_IntegerOutValue_tags_1) |
| 1423 | /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */ |
| 1424 | 0, /* No PER visible constraints */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1425 | 0, 0, /* No members */ |
| 1426 | 0 /* No specifics */ |
| 1427 | }; |
| 1428 | |
| 1429 | |
| 1430 | /*** <<< INCLUDES [OK-IntegerInRange1] >>> ***/ |
| 1431 | |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1432 | #include <NativeInteger.h> |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1433 | |
| 1434 | /*** <<< TYPE-DECLS [OK-IntegerInRange1] >>> ***/ |
| 1435 | |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1436 | typedef long OK_IntegerInRange1_t; |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1437 | |
| 1438 | /*** <<< FUNC-DECLS [OK-IntegerInRange1] >>> ***/ |
| 1439 | |
| 1440 | extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1; |
| 1441 | asn_struct_free_f OK_IntegerInRange1_free; |
| 1442 | asn_struct_print_f OK_IntegerInRange1_print; |
| 1443 | asn_constr_check_f OK_IntegerInRange1_constraint; |
| 1444 | ber_type_decoder_f OK_IntegerInRange1_decode_ber; |
| 1445 | der_type_encoder_f OK_IntegerInRange1_encode_der; |
| 1446 | xer_type_decoder_f OK_IntegerInRange1_decode_xer; |
| 1447 | xer_type_encoder_f OK_IntegerInRange1_encode_xer; |
| 1448 | |
| 1449 | /*** <<< CODE [OK-IntegerInRange1] >>> ***/ |
| 1450 | |
| 1451 | int |
| 1452 | OK_IntegerInRange1_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 1453 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1454 | long value; |
| 1455 | |
| 1456 | if(!sptr) { |
| 1457 | _ASN_ERRLOG(app_errlog, app_key, |
| 1458 | "%s: value not given (%s:%d)", |
| 1459 | td->name, __FILE__, __LINE__); |
| 1460 | return -1; |
| 1461 | } |
| 1462 | |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1463 | value = *(const long *)sptr; |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1464 | |
| 1465 | if((value >= -100 && value <= 100)) { |
| 1466 | /* Constraint check succeeded */ |
| 1467 | return 0; |
| 1468 | } else { |
| 1469 | _ASN_ERRLOG(app_errlog, app_key, |
| 1470 | "%s: constraint failed (%s:%d)", |
| 1471 | td->name, __FILE__, __LINE__); |
| 1472 | return -1; |
| 1473 | } |
| 1474 | } |
| 1475 | |
| 1476 | /* |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1477 | * This type is implemented using NativeInteger, |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1478 | * so here we adjust the DEF accordingly. |
| 1479 | */ |
| 1480 | static void |
| 1481 | OK_IntegerInRange1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1482 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 1483 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 1484 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 1485 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 1486 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 1487 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1488 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 1489 | if(!td->per_constraints) |
| 1490 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1491 | td->elements = asn_DEF_NativeInteger.elements; |
| 1492 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 1493 | td->specifics = asn_DEF_NativeInteger.specifics; |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1494 | } |
| 1495 | |
| 1496 | void |
| 1497 | OK_IntegerInRange1_free(asn_TYPE_descriptor_t *td, |
| 1498 | void *struct_ptr, int contents_only) { |
| 1499 | OK_IntegerInRange1_1_inherit_TYPE_descriptor(td); |
| 1500 | td->free_struct(td, struct_ptr, contents_only); |
| 1501 | } |
| 1502 | |
| 1503 | int |
| 1504 | OK_IntegerInRange1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 1505 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 1506 | OK_IntegerInRange1_1_inherit_TYPE_descriptor(td); |
| 1507 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 1508 | } |
| 1509 | |
| 1510 | asn_dec_rval_t |
| 1511 | OK_IntegerInRange1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1512 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 1513 | OK_IntegerInRange1_1_inherit_TYPE_descriptor(td); |
| 1514 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 1515 | } |
| 1516 | |
| 1517 | asn_enc_rval_t |
| 1518 | OK_IntegerInRange1_encode_der(asn_TYPE_descriptor_t *td, |
| 1519 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 1520 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1521 | OK_IntegerInRange1_1_inherit_TYPE_descriptor(td); |
| 1522 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 1523 | } |
| 1524 | |
| 1525 | asn_dec_rval_t |
| 1526 | OK_IntegerInRange1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1527 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 1528 | OK_IntegerInRange1_1_inherit_TYPE_descriptor(td); |
| 1529 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 1530 | } |
| 1531 | |
| 1532 | asn_enc_rval_t |
| 1533 | OK_IntegerInRange1_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 1534 | int ilevel, enum xer_encoder_flags_e flags, |
| 1535 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1536 | OK_IntegerInRange1_1_inherit_TYPE_descriptor(td); |
| 1537 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 1538 | } |
| 1539 | |
| 1540 | |
| 1541 | /*** <<< STAT-DEFS [OK-IntegerInRange1] >>> ***/ |
| 1542 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1543 | static ber_tlv_tag_t asn_DEF_OK_IntegerInRange1_tags_1[] = { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1544 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1545 | }; |
| 1546 | asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1 = { |
| 1547 | "OK-IntegerInRange1", |
| 1548 | "OK-IntegerInRange1", |
| 1549 | OK_IntegerInRange1_free, |
| 1550 | OK_IntegerInRange1_print, |
| 1551 | OK_IntegerInRange1_constraint, |
| 1552 | OK_IntegerInRange1_decode_ber, |
| 1553 | OK_IntegerInRange1_encode_der, |
| 1554 | OK_IntegerInRange1_decode_xer, |
| 1555 | OK_IntegerInRange1_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1556 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1557 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1558 | asn_DEF_OK_IntegerInRange1_tags_1, |
| 1559 | sizeof(asn_DEF_OK_IntegerInRange1_tags_1) |
| 1560 | /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */ |
| 1561 | asn_DEF_OK_IntegerInRange1_tags_1, /* Same as above */ |
| 1562 | sizeof(asn_DEF_OK_IntegerInRange1_tags_1) |
| 1563 | /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */ |
| 1564 | 0, /* No PER visible constraints */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1565 | 0, 0, /* No members */ |
| 1566 | 0 /* No specifics */ |
| 1567 | }; |
| 1568 | |
| 1569 | |
| 1570 | /*** <<< INCLUDES [OK-IntegerInRange2] >>> ***/ |
| 1571 | |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1572 | #include <NativeInteger.h> |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1573 | |
| 1574 | /*** <<< TYPE-DECLS [OK-IntegerInRange2] >>> ***/ |
| 1575 | |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1576 | typedef long OK_IntegerInRange2_t; |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1577 | |
| 1578 | /*** <<< FUNC-DECLS [OK-IntegerInRange2] >>> ***/ |
| 1579 | |
| 1580 | extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2; |
| 1581 | asn_struct_free_f OK_IntegerInRange2_free; |
| 1582 | asn_struct_print_f OK_IntegerInRange2_print; |
| 1583 | asn_constr_check_f OK_IntegerInRange2_constraint; |
| 1584 | ber_type_decoder_f OK_IntegerInRange2_decode_ber; |
| 1585 | der_type_encoder_f OK_IntegerInRange2_encode_der; |
| 1586 | xer_type_decoder_f OK_IntegerInRange2_decode_xer; |
| 1587 | xer_type_encoder_f OK_IntegerInRange2_encode_xer; |
| 1588 | |
| 1589 | /*** <<< CODE [OK-IntegerInRange2] >>> ***/ |
| 1590 | |
| 1591 | int |
| 1592 | OK_IntegerInRange2_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 1593 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1594 | long value; |
| 1595 | |
| 1596 | if(!sptr) { |
| 1597 | _ASN_ERRLOG(app_errlog, app_key, |
| 1598 | "%s: value not given (%s:%d)", |
| 1599 | td->name, __FILE__, __LINE__); |
| 1600 | return -1; |
| 1601 | } |
| 1602 | |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1603 | value = *(const long *)sptr; |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1604 | |
| 1605 | if(((value == -100) || (value == 100))) { |
| 1606 | /* Constraint check succeeded */ |
| 1607 | return 0; |
| 1608 | } else { |
| 1609 | _ASN_ERRLOG(app_errlog, app_key, |
| 1610 | "%s: constraint failed (%s:%d)", |
| 1611 | td->name, __FILE__, __LINE__); |
| 1612 | return -1; |
| 1613 | } |
| 1614 | } |
| 1615 | |
| 1616 | /* |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1617 | * This type is implemented using NativeInteger, |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1618 | * so here we adjust the DEF accordingly. |
| 1619 | */ |
| 1620 | static void |
| 1621 | OK_IntegerInRange2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1622 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 1623 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 1624 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 1625 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 1626 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 1627 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1628 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 1629 | if(!td->per_constraints) |
| 1630 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1631 | td->elements = asn_DEF_NativeInteger.elements; |
| 1632 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 1633 | td->specifics = asn_DEF_NativeInteger.specifics; |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1634 | } |
| 1635 | |
| 1636 | void |
| 1637 | OK_IntegerInRange2_free(asn_TYPE_descriptor_t *td, |
| 1638 | void *struct_ptr, int contents_only) { |
| 1639 | OK_IntegerInRange2_1_inherit_TYPE_descriptor(td); |
| 1640 | td->free_struct(td, struct_ptr, contents_only); |
| 1641 | } |
| 1642 | |
| 1643 | int |
| 1644 | OK_IntegerInRange2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 1645 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 1646 | OK_IntegerInRange2_1_inherit_TYPE_descriptor(td); |
| 1647 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 1648 | } |
| 1649 | |
| 1650 | asn_dec_rval_t |
| 1651 | OK_IntegerInRange2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1652 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 1653 | OK_IntegerInRange2_1_inherit_TYPE_descriptor(td); |
| 1654 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 1655 | } |
| 1656 | |
| 1657 | asn_enc_rval_t |
| 1658 | OK_IntegerInRange2_encode_der(asn_TYPE_descriptor_t *td, |
| 1659 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 1660 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1661 | OK_IntegerInRange2_1_inherit_TYPE_descriptor(td); |
| 1662 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 1663 | } |
| 1664 | |
| 1665 | asn_dec_rval_t |
| 1666 | OK_IntegerInRange2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1667 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 1668 | OK_IntegerInRange2_1_inherit_TYPE_descriptor(td); |
| 1669 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 1670 | } |
| 1671 | |
| 1672 | asn_enc_rval_t |
| 1673 | OK_IntegerInRange2_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 1674 | int ilevel, enum xer_encoder_flags_e flags, |
| 1675 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1676 | OK_IntegerInRange2_1_inherit_TYPE_descriptor(td); |
| 1677 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 1678 | } |
| 1679 | |
| 1680 | |
| 1681 | /*** <<< STAT-DEFS [OK-IntegerInRange2] >>> ***/ |
| 1682 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1683 | static ber_tlv_tag_t asn_DEF_OK_IntegerInRange2_tags_1[] = { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1684 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1685 | }; |
| 1686 | asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2 = { |
| 1687 | "OK-IntegerInRange2", |
| 1688 | "OK-IntegerInRange2", |
| 1689 | OK_IntegerInRange2_free, |
| 1690 | OK_IntegerInRange2_print, |
| 1691 | OK_IntegerInRange2_constraint, |
| 1692 | OK_IntegerInRange2_decode_ber, |
| 1693 | OK_IntegerInRange2_encode_der, |
| 1694 | OK_IntegerInRange2_decode_xer, |
| 1695 | OK_IntegerInRange2_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1696 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1697 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1698 | asn_DEF_OK_IntegerInRange2_tags_1, |
| 1699 | sizeof(asn_DEF_OK_IntegerInRange2_tags_1) |
| 1700 | /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */ |
| 1701 | asn_DEF_OK_IntegerInRange2_tags_1, /* Same as above */ |
| 1702 | sizeof(asn_DEF_OK_IntegerInRange2_tags_1) |
| 1703 | /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */ |
| 1704 | 0, /* No PER visible constraints */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1705 | 0, 0, /* No members */ |
| 1706 | 0 /* No specifics */ |
| 1707 | }; |
| 1708 | |
| 1709 | |
| 1710 | /*** <<< INCLUDES [OK-IntegerInRange3] >>> ***/ |
| 1711 | |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1712 | #include <NativeInteger.h> |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1713 | |
| 1714 | /*** <<< TYPE-DECLS [OK-IntegerInRange3] >>> ***/ |
| 1715 | |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1716 | typedef long OK_IntegerInRange3_t; |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1717 | |
| 1718 | /*** <<< FUNC-DECLS [OK-IntegerInRange3] >>> ***/ |
| 1719 | |
| 1720 | extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3; |
| 1721 | asn_struct_free_f OK_IntegerInRange3_free; |
| 1722 | asn_struct_print_f OK_IntegerInRange3_print; |
| 1723 | asn_constr_check_f OK_IntegerInRange3_constraint; |
| 1724 | ber_type_decoder_f OK_IntegerInRange3_decode_ber; |
| 1725 | der_type_encoder_f OK_IntegerInRange3_encode_der; |
| 1726 | xer_type_decoder_f OK_IntegerInRange3_decode_xer; |
| 1727 | xer_type_encoder_f OK_IntegerInRange3_encode_xer; |
| 1728 | |
| 1729 | /*** <<< CODE [OK-IntegerInRange3] >>> ***/ |
| 1730 | |
| 1731 | int |
| 1732 | OK_IntegerInRange3_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 1733 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1734 | long value; |
| 1735 | |
| 1736 | if(!sptr) { |
| 1737 | _ASN_ERRLOG(app_errlog, app_key, |
| 1738 | "%s: value not given (%s:%d)", |
| 1739 | td->name, __FILE__, __LINE__); |
| 1740 | return -1; |
| 1741 | } |
| 1742 | |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1743 | value = *(const long *)sptr; |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1744 | |
| 1745 | if((value >= -2147483648 && value <= 2147483647)) { |
| 1746 | /* Constraint check succeeded */ |
| 1747 | return 0; |
| 1748 | } else { |
| 1749 | _ASN_ERRLOG(app_errlog, app_key, |
| 1750 | "%s: constraint failed (%s:%d)", |
| 1751 | td->name, __FILE__, __LINE__); |
| 1752 | return -1; |
| 1753 | } |
| 1754 | } |
| 1755 | |
| 1756 | /* |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1757 | * This type is implemented using NativeInteger, |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1758 | * so here we adjust the DEF accordingly. |
| 1759 | */ |
| 1760 | static void |
| 1761 | OK_IntegerInRange3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1762 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 1763 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 1764 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 1765 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 1766 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 1767 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1768 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 1769 | if(!td->per_constraints) |
| 1770 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1771 | td->elements = asn_DEF_NativeInteger.elements; |
| 1772 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 1773 | td->specifics = asn_DEF_NativeInteger.specifics; |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1774 | } |
| 1775 | |
| 1776 | void |
| 1777 | OK_IntegerInRange3_free(asn_TYPE_descriptor_t *td, |
| 1778 | void *struct_ptr, int contents_only) { |
| 1779 | OK_IntegerInRange3_1_inherit_TYPE_descriptor(td); |
| 1780 | td->free_struct(td, struct_ptr, contents_only); |
| 1781 | } |
| 1782 | |
| 1783 | int |
| 1784 | OK_IntegerInRange3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 1785 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 1786 | OK_IntegerInRange3_1_inherit_TYPE_descriptor(td); |
| 1787 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 1788 | } |
| 1789 | |
| 1790 | asn_dec_rval_t |
| 1791 | OK_IntegerInRange3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1792 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 1793 | OK_IntegerInRange3_1_inherit_TYPE_descriptor(td); |
| 1794 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 1795 | } |
| 1796 | |
| 1797 | asn_enc_rval_t |
| 1798 | OK_IntegerInRange3_encode_der(asn_TYPE_descriptor_t *td, |
| 1799 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 1800 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1801 | OK_IntegerInRange3_1_inherit_TYPE_descriptor(td); |
| 1802 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 1803 | } |
| 1804 | |
| 1805 | asn_dec_rval_t |
| 1806 | OK_IntegerInRange3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1807 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 1808 | OK_IntegerInRange3_1_inherit_TYPE_descriptor(td); |
| 1809 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 1810 | } |
| 1811 | |
| 1812 | asn_enc_rval_t |
| 1813 | OK_IntegerInRange3_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 1814 | int ilevel, enum xer_encoder_flags_e flags, |
| 1815 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1816 | OK_IntegerInRange3_1_inherit_TYPE_descriptor(td); |
| 1817 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 1818 | } |
| 1819 | |
| 1820 | |
| 1821 | /*** <<< STAT-DEFS [OK-IntegerInRange3] >>> ***/ |
| 1822 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1823 | static ber_tlv_tag_t asn_DEF_OK_IntegerInRange3_tags_1[] = { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1824 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1825 | }; |
| 1826 | asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3 = { |
| 1827 | "OK-IntegerInRange3", |
| 1828 | "OK-IntegerInRange3", |
| 1829 | OK_IntegerInRange3_free, |
| 1830 | OK_IntegerInRange3_print, |
| 1831 | OK_IntegerInRange3_constraint, |
| 1832 | OK_IntegerInRange3_decode_ber, |
| 1833 | OK_IntegerInRange3_encode_der, |
| 1834 | OK_IntegerInRange3_decode_xer, |
| 1835 | OK_IntegerInRange3_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1836 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1837 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1838 | asn_DEF_OK_IntegerInRange3_tags_1, |
| 1839 | sizeof(asn_DEF_OK_IntegerInRange3_tags_1) |
| 1840 | /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */ |
| 1841 | asn_DEF_OK_IntegerInRange3_tags_1, /* Same as above */ |
| 1842 | sizeof(asn_DEF_OK_IntegerInRange3_tags_1) |
| 1843 | /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */ |
| 1844 | 0, /* No PER visible constraints */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1845 | 0, 0, /* No members */ |
| 1846 | 0 /* No specifics */ |
| 1847 | }; |
| 1848 | |
| 1849 | |
| 1850 | /*** <<< INCLUDES [OK-IntegerInRange4] >>> ***/ |
| 1851 | |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1852 | #include <NativeInteger.h> |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1853 | |
| 1854 | /*** <<< TYPE-DECLS [OK-IntegerInRange4] >>> ***/ |
| 1855 | |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1856 | typedef long OK_IntegerInRange4_t; |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1857 | |
| 1858 | /*** <<< FUNC-DECLS [OK-IntegerInRange4] >>> ***/ |
| 1859 | |
| 1860 | extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4; |
| 1861 | asn_struct_free_f OK_IntegerInRange4_free; |
| 1862 | asn_struct_print_f OK_IntegerInRange4_print; |
| 1863 | asn_constr_check_f OK_IntegerInRange4_constraint; |
| 1864 | ber_type_decoder_f OK_IntegerInRange4_decode_ber; |
| 1865 | der_type_encoder_f OK_IntegerInRange4_encode_der; |
| 1866 | xer_type_decoder_f OK_IntegerInRange4_decode_xer; |
| 1867 | xer_type_encoder_f OK_IntegerInRange4_encode_xer; |
| 1868 | |
| 1869 | /*** <<< CODE [OK-IntegerInRange4] >>> ***/ |
| 1870 | |
| 1871 | int |
| 1872 | OK_IntegerInRange4_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 1873 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1874 | long value; |
| 1875 | |
| 1876 | if(!sptr) { |
| 1877 | _ASN_ERRLOG(app_errlog, app_key, |
| 1878 | "%s: value not given (%s:%d)", |
| 1879 | td->name, __FILE__, __LINE__); |
| 1880 | return -1; |
| 1881 | } |
| 1882 | |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1883 | value = *(const long *)sptr; |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1884 | |
| 1885 | if(((value == -2147483648) || (value == 2147483647))) { |
| 1886 | /* Constraint check succeeded */ |
| 1887 | return 0; |
| 1888 | } else { |
| 1889 | _ASN_ERRLOG(app_errlog, app_key, |
| 1890 | "%s: constraint failed (%s:%d)", |
| 1891 | td->name, __FILE__, __LINE__); |
| 1892 | return -1; |
| 1893 | } |
| 1894 | } |
| 1895 | |
| 1896 | /* |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1897 | * This type is implemented using NativeInteger, |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1898 | * so here we adjust the DEF accordingly. |
| 1899 | */ |
| 1900 | static void |
| 1901 | OK_IntegerInRange4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1902 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 1903 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 1904 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 1905 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 1906 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 1907 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1908 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 1909 | if(!td->per_constraints) |
| 1910 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1911 | td->elements = asn_DEF_NativeInteger.elements; |
| 1912 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 1913 | td->specifics = asn_DEF_NativeInteger.specifics; |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1914 | } |
| 1915 | |
| 1916 | void |
| 1917 | OK_IntegerInRange4_free(asn_TYPE_descriptor_t *td, |
| 1918 | void *struct_ptr, int contents_only) { |
| 1919 | OK_IntegerInRange4_1_inherit_TYPE_descriptor(td); |
| 1920 | td->free_struct(td, struct_ptr, contents_only); |
| 1921 | } |
| 1922 | |
| 1923 | int |
| 1924 | OK_IntegerInRange4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 1925 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 1926 | OK_IntegerInRange4_1_inherit_TYPE_descriptor(td); |
| 1927 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 1928 | } |
| 1929 | |
| 1930 | asn_dec_rval_t |
| 1931 | OK_IntegerInRange4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1932 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 1933 | OK_IntegerInRange4_1_inherit_TYPE_descriptor(td); |
| 1934 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 1935 | } |
| 1936 | |
| 1937 | asn_enc_rval_t |
| 1938 | OK_IntegerInRange4_encode_der(asn_TYPE_descriptor_t *td, |
| 1939 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 1940 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1941 | OK_IntegerInRange4_1_inherit_TYPE_descriptor(td); |
| 1942 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 1943 | } |
| 1944 | |
| 1945 | asn_dec_rval_t |
| 1946 | OK_IntegerInRange4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1947 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 1948 | OK_IntegerInRange4_1_inherit_TYPE_descriptor(td); |
| 1949 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 1950 | } |
| 1951 | |
| 1952 | asn_enc_rval_t |
| 1953 | OK_IntegerInRange4_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 1954 | int ilevel, enum xer_encoder_flags_e flags, |
| 1955 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1956 | OK_IntegerInRange4_1_inherit_TYPE_descriptor(td); |
| 1957 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 1958 | } |
| 1959 | |
| 1960 | |
| 1961 | /*** <<< STAT-DEFS [OK-IntegerInRange4] >>> ***/ |
| 1962 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1963 | static ber_tlv_tag_t asn_DEF_OK_IntegerInRange4_tags_1[] = { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1964 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1965 | }; |
| 1966 | asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4 = { |
| 1967 | "OK-IntegerInRange4", |
| 1968 | "OK-IntegerInRange4", |
| 1969 | OK_IntegerInRange4_free, |
| 1970 | OK_IntegerInRange4_print, |
| 1971 | OK_IntegerInRange4_constraint, |
| 1972 | OK_IntegerInRange4_decode_ber, |
| 1973 | OK_IntegerInRange4_encode_der, |
| 1974 | OK_IntegerInRange4_decode_xer, |
| 1975 | OK_IntegerInRange4_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1976 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1977 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1978 | asn_DEF_OK_IntegerInRange4_tags_1, |
| 1979 | sizeof(asn_DEF_OK_IntegerInRange4_tags_1) |
| 1980 | /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */ |
| 1981 | asn_DEF_OK_IntegerInRange4_tags_1, /* Same as above */ |
| 1982 | sizeof(asn_DEF_OK_IntegerInRange4_tags_1) |
| 1983 | /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */ |
| 1984 | 0, /* No PER visible constraints */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1985 | 0, 0, /* No members */ |
| 1986 | 0 /* No specifics */ |
| 1987 | }; |
| 1988 | |
| 1989 | |
| 1990 | /*** <<< INCLUDES [OK-IntegerInRange5] >>> ***/ |
| 1991 | |
| 1992 | #include <INTEGER.h> |
| 1993 | |
| 1994 | /*** <<< TYPE-DECLS [OK-IntegerInRange5] >>> ***/ |
| 1995 | |
| 1996 | typedef INTEGER_t OK_IntegerInRange5_t; |
| 1997 | |
| 1998 | /*** <<< FUNC-DECLS [OK-IntegerInRange5] >>> ***/ |
| 1999 | |
| 2000 | extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5; |
| 2001 | asn_struct_free_f OK_IntegerInRange5_free; |
| 2002 | asn_struct_print_f OK_IntegerInRange5_print; |
| 2003 | asn_constr_check_f OK_IntegerInRange5_constraint; |
| 2004 | ber_type_decoder_f OK_IntegerInRange5_decode_ber; |
| 2005 | der_type_encoder_f OK_IntegerInRange5_encode_der; |
| 2006 | xer_type_decoder_f OK_IntegerInRange5_decode_xer; |
| 2007 | xer_type_encoder_f OK_IntegerInRange5_encode_xer; |
| 2008 | |
| 2009 | /*** <<< CODE [OK-IntegerInRange5] >>> ***/ |
| 2010 | |
| 2011 | int |
| 2012 | OK_IntegerInRange5_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 2013 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 2014 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
| 2015 | long value; |
| 2016 | |
| 2017 | if(!sptr) { |
| 2018 | _ASN_ERRLOG(app_errlog, app_key, |
| 2019 | "%s: value not given (%s:%d)", |
| 2020 | td->name, __FILE__, __LINE__); |
| 2021 | return -1; |
| 2022 | } |
| 2023 | |
| 2024 | if(asn_INTEGER2long(st, &value)) { |
| 2025 | _ASN_ERRLOG(app_errlog, app_key, |
| 2026 | "%s: value too large (%s:%d)", |
| 2027 | td->name, __FILE__, __LINE__); |
| 2028 | return -1; |
| 2029 | } |
| 2030 | |
| 2031 | if(((value == -2147483648) || (value == 2147483647))) { |
| 2032 | /* Constraint check succeeded */ |
| 2033 | return 0; |
| 2034 | } else { |
| 2035 | _ASN_ERRLOG(app_errlog, app_key, |
| 2036 | "%s: constraint failed (%s:%d)", |
| 2037 | td->name, __FILE__, __LINE__); |
| 2038 | return -1; |
| 2039 | } |
| 2040 | } |
| 2041 | |
| 2042 | /* |
| 2043 | * This type is implemented using INTEGER, |
| 2044 | * so here we adjust the DEF accordingly. |
| 2045 | */ |
| 2046 | static void |
| 2047 | OK_IntegerInRange5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 2048 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 2049 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 2050 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 2051 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 2052 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 2053 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2054 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
| 2055 | if(!td->per_constraints) |
| 2056 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 2057 | td->elements = asn_DEF_INTEGER.elements; |
| 2058 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 2059 | td->specifics = asn_DEF_INTEGER.specifics; |
| 2060 | } |
| 2061 | |
| 2062 | void |
| 2063 | OK_IntegerInRange5_free(asn_TYPE_descriptor_t *td, |
| 2064 | void *struct_ptr, int contents_only) { |
| 2065 | OK_IntegerInRange5_1_inherit_TYPE_descriptor(td); |
| 2066 | td->free_struct(td, struct_ptr, contents_only); |
| 2067 | } |
| 2068 | |
| 2069 | int |
| 2070 | OK_IntegerInRange5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 2071 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 2072 | OK_IntegerInRange5_1_inherit_TYPE_descriptor(td); |
| 2073 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 2074 | } |
| 2075 | |
| 2076 | asn_dec_rval_t |
| 2077 | OK_IntegerInRange5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2078 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 2079 | OK_IntegerInRange5_1_inherit_TYPE_descriptor(td); |
| 2080 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 2081 | } |
| 2082 | |
| 2083 | asn_enc_rval_t |
| 2084 | OK_IntegerInRange5_encode_der(asn_TYPE_descriptor_t *td, |
| 2085 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 2086 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2087 | OK_IntegerInRange5_1_inherit_TYPE_descriptor(td); |
| 2088 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 2089 | } |
| 2090 | |
| 2091 | asn_dec_rval_t |
| 2092 | OK_IntegerInRange5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2093 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 2094 | OK_IntegerInRange5_1_inherit_TYPE_descriptor(td); |
| 2095 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 2096 | } |
| 2097 | |
| 2098 | asn_enc_rval_t |
| 2099 | OK_IntegerInRange5_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 2100 | int ilevel, enum xer_encoder_flags_e flags, |
| 2101 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2102 | OK_IntegerInRange5_1_inherit_TYPE_descriptor(td); |
| 2103 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 2104 | } |
| 2105 | |
| 2106 | |
| 2107 | /*** <<< STAT-DEFS [OK-IntegerInRange5] >>> ***/ |
| 2108 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2109 | static ber_tlv_tag_t asn_DEF_OK_IntegerInRange5_tags_1[] = { |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 2110 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 2111 | }; |
| 2112 | asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5 = { |
| 2113 | "OK-IntegerInRange5", |
| 2114 | "OK-IntegerInRange5", |
| 2115 | OK_IntegerInRange5_free, |
| 2116 | OK_IntegerInRange5_print, |
| 2117 | OK_IntegerInRange5_constraint, |
| 2118 | OK_IntegerInRange5_decode_ber, |
| 2119 | OK_IntegerInRange5_encode_der, |
| 2120 | OK_IntegerInRange5_decode_xer, |
| 2121 | OK_IntegerInRange5_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2122 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 2123 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2124 | asn_DEF_OK_IntegerInRange5_tags_1, |
| 2125 | sizeof(asn_DEF_OK_IntegerInRange5_tags_1) |
| 2126 | /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */ |
| 2127 | asn_DEF_OK_IntegerInRange5_tags_1, /* Same as above */ |
| 2128 | sizeof(asn_DEF_OK_IntegerInRange5_tags_1) |
| 2129 | /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */ |
| 2130 | 0, /* No PER visible constraints */ |
vlm | 75b3a53 | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 2131 | 0, 0, /* No members */ |
| 2132 | 0 /* No specifics */ |
| 2133 | }; |
| 2134 | |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 2135 | |
vlm | 9302384 | 2005-08-27 03:13:51 +0000 | [diff] [blame] | 2136 | /*** <<< INCLUDES [NO-IntegerInRange6] >>> ***/ |
| 2137 | |
| 2138 | #include <INTEGER.h> |
| 2139 | |
| 2140 | /*** <<< TYPE-DECLS [NO-IntegerInRange6] >>> ***/ |
| 2141 | |
| 2142 | typedef INTEGER_t NO_IntegerInRange6_t; |
| 2143 | |
| 2144 | /*** <<< FUNC-DECLS [NO-IntegerInRange6] >>> ***/ |
| 2145 | |
| 2146 | extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6; |
| 2147 | asn_struct_free_f NO_IntegerInRange6_free; |
| 2148 | asn_struct_print_f NO_IntegerInRange6_print; |
| 2149 | asn_constr_check_f NO_IntegerInRange6_constraint; |
| 2150 | ber_type_decoder_f NO_IntegerInRange6_decode_ber; |
| 2151 | der_type_encoder_f NO_IntegerInRange6_encode_der; |
| 2152 | xer_type_decoder_f NO_IntegerInRange6_decode_xer; |
| 2153 | xer_type_encoder_f NO_IntegerInRange6_encode_xer; |
| 2154 | |
| 2155 | /*** <<< CODE [NO-IntegerInRange6] >>> ***/ |
| 2156 | |
| 2157 | int |
| 2158 | NO_IntegerInRange6_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 2159 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 2160 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
| 2161 | long value; |
| 2162 | |
| 2163 | if(!sptr) { |
| 2164 | _ASN_ERRLOG(app_errlog, app_key, |
| 2165 | "%s: value not given (%s:%d)", |
| 2166 | td->name, __FILE__, __LINE__); |
| 2167 | return -1; |
| 2168 | } |
| 2169 | |
| 2170 | if(asn_INTEGER2long(st, &value)) { |
| 2171 | _ASN_ERRLOG(app_errlog, app_key, |
| 2172 | "%s: value too large (%s:%d)", |
| 2173 | td->name, __FILE__, __LINE__); |
| 2174 | return -1; |
| 2175 | } |
| 2176 | |
| 2177 | if((value >= 0 && value <= 4294967295)) { |
| 2178 | /* Constraint check succeeded */ |
| 2179 | return 0; |
| 2180 | } else { |
| 2181 | _ASN_ERRLOG(app_errlog, app_key, |
| 2182 | "%s: constraint failed (%s:%d)", |
| 2183 | td->name, __FILE__, __LINE__); |
| 2184 | return -1; |
| 2185 | } |
| 2186 | } |
| 2187 | |
| 2188 | /* |
| 2189 | * This type is implemented using INTEGER, |
| 2190 | * so here we adjust the DEF accordingly. |
| 2191 | */ |
| 2192 | static void |
| 2193 | NO_IntegerInRange6_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 2194 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 2195 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 2196 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 2197 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 2198 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 2199 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2200 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
| 2201 | if(!td->per_constraints) |
| 2202 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
vlm | 9302384 | 2005-08-27 03:13:51 +0000 | [diff] [blame] | 2203 | td->elements = asn_DEF_INTEGER.elements; |
| 2204 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 2205 | td->specifics = asn_DEF_INTEGER.specifics; |
| 2206 | } |
| 2207 | |
| 2208 | void |
| 2209 | NO_IntegerInRange6_free(asn_TYPE_descriptor_t *td, |
| 2210 | void *struct_ptr, int contents_only) { |
| 2211 | NO_IntegerInRange6_1_inherit_TYPE_descriptor(td); |
| 2212 | td->free_struct(td, struct_ptr, contents_only); |
| 2213 | } |
| 2214 | |
| 2215 | int |
| 2216 | NO_IntegerInRange6_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 2217 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 2218 | NO_IntegerInRange6_1_inherit_TYPE_descriptor(td); |
| 2219 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 2220 | } |
| 2221 | |
| 2222 | asn_dec_rval_t |
| 2223 | NO_IntegerInRange6_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2224 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 2225 | NO_IntegerInRange6_1_inherit_TYPE_descriptor(td); |
| 2226 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 2227 | } |
| 2228 | |
| 2229 | asn_enc_rval_t |
| 2230 | NO_IntegerInRange6_encode_der(asn_TYPE_descriptor_t *td, |
| 2231 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 2232 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2233 | NO_IntegerInRange6_1_inherit_TYPE_descriptor(td); |
| 2234 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 2235 | } |
| 2236 | |
| 2237 | asn_dec_rval_t |
| 2238 | NO_IntegerInRange6_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2239 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 2240 | NO_IntegerInRange6_1_inherit_TYPE_descriptor(td); |
| 2241 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 2242 | } |
| 2243 | |
| 2244 | asn_enc_rval_t |
| 2245 | NO_IntegerInRange6_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 2246 | int ilevel, enum xer_encoder_flags_e flags, |
| 2247 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2248 | NO_IntegerInRange6_1_inherit_TYPE_descriptor(td); |
| 2249 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 2250 | } |
| 2251 | |
| 2252 | |
| 2253 | /*** <<< STAT-DEFS [NO-IntegerInRange6] >>> ***/ |
| 2254 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2255 | static ber_tlv_tag_t asn_DEF_NO_IntegerInRange6_tags_1[] = { |
vlm | 9302384 | 2005-08-27 03:13:51 +0000 | [diff] [blame] | 2256 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 2257 | }; |
| 2258 | asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6 = { |
| 2259 | "NO-IntegerInRange6", |
| 2260 | "NO-IntegerInRange6", |
| 2261 | NO_IntegerInRange6_free, |
| 2262 | NO_IntegerInRange6_print, |
| 2263 | NO_IntegerInRange6_constraint, |
| 2264 | NO_IntegerInRange6_decode_ber, |
| 2265 | NO_IntegerInRange6_encode_der, |
| 2266 | NO_IntegerInRange6_decode_xer, |
| 2267 | NO_IntegerInRange6_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2268 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 9302384 | 2005-08-27 03:13:51 +0000 | [diff] [blame] | 2269 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2270 | asn_DEF_NO_IntegerInRange6_tags_1, |
| 2271 | sizeof(asn_DEF_NO_IntegerInRange6_tags_1) |
| 2272 | /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */ |
| 2273 | asn_DEF_NO_IntegerInRange6_tags_1, /* Same as above */ |
| 2274 | sizeof(asn_DEF_NO_IntegerInRange6_tags_1) |
| 2275 | /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */ |
| 2276 | 0, /* No PER visible constraints */ |
vlm | 9302384 | 2005-08-27 03:13:51 +0000 | [diff] [blame] | 2277 | 0, 0, /* No members */ |
| 2278 | 0 /* No specifics */ |
| 2279 | }; |
| 2280 | |
| 2281 | |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 2282 | /*** <<< INCLUDES [CN-IntegerEnumerated1] >>> ***/ |
| 2283 | |
| 2284 | #include <INTEGER.h> |
| 2285 | |
| 2286 | /*** <<< DEPS [CN-IntegerEnumerated1] >>> ***/ |
| 2287 | |
| 2288 | typedef enum CN_IntegerEnumerated1 { |
| 2289 | CN_IntegerEnumerated1_a = 1, |
| 2290 | CN_IntegerEnumerated1_b = 2 |
vlm | 7c8aa5e | 2006-03-21 07:25:18 +0000 | [diff] [blame] | 2291 | } e_CN_IntegerEnumerated1; |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 2292 | |
| 2293 | /*** <<< TYPE-DECLS [CN-IntegerEnumerated1] >>> ***/ |
| 2294 | |
| 2295 | typedef INTEGER_t CN_IntegerEnumerated1_t; |
| 2296 | |
| 2297 | /*** <<< FUNC-DECLS [CN-IntegerEnumerated1] >>> ***/ |
| 2298 | |
| 2299 | extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1; |
| 2300 | asn_struct_free_f CN_IntegerEnumerated1_free; |
| 2301 | asn_struct_print_f CN_IntegerEnumerated1_print; |
| 2302 | asn_constr_check_f CN_IntegerEnumerated1_constraint; |
| 2303 | ber_type_decoder_f CN_IntegerEnumerated1_decode_ber; |
| 2304 | der_type_encoder_f CN_IntegerEnumerated1_encode_der; |
| 2305 | xer_type_decoder_f CN_IntegerEnumerated1_decode_xer; |
| 2306 | xer_type_encoder_f CN_IntegerEnumerated1_encode_xer; |
| 2307 | |
| 2308 | /*** <<< CODE [CN-IntegerEnumerated1] >>> ***/ |
| 2309 | |
| 2310 | int |
| 2311 | CN_IntegerEnumerated1_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 2312 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 2313 | /* Replace with underlying type checker */ |
| 2314 | td->check_constraints = asn_DEF_INTEGER.check_constraints; |
| 2315 | return td->check_constraints(td, sptr, app_errlog, app_key); |
| 2316 | } |
| 2317 | |
| 2318 | /* |
| 2319 | * This type is implemented using INTEGER, |
| 2320 | * so here we adjust the DEF accordingly. |
| 2321 | */ |
| 2322 | static void |
| 2323 | CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 2324 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 2325 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 2326 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 2327 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 2328 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 2329 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2330 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
| 2331 | if(!td->per_constraints) |
| 2332 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 2333 | td->elements = asn_DEF_INTEGER.elements; |
| 2334 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 2335 | td->specifics = asn_DEF_INTEGER.specifics; |
| 2336 | } |
| 2337 | |
| 2338 | void |
| 2339 | CN_IntegerEnumerated1_free(asn_TYPE_descriptor_t *td, |
| 2340 | void *struct_ptr, int contents_only) { |
| 2341 | CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td); |
| 2342 | td->free_struct(td, struct_ptr, contents_only); |
| 2343 | } |
| 2344 | |
| 2345 | int |
| 2346 | CN_IntegerEnumerated1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 2347 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 2348 | CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td); |
| 2349 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 2350 | } |
| 2351 | |
| 2352 | asn_dec_rval_t |
| 2353 | CN_IntegerEnumerated1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2354 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 2355 | CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td); |
| 2356 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 2357 | } |
| 2358 | |
| 2359 | asn_enc_rval_t |
| 2360 | CN_IntegerEnumerated1_encode_der(asn_TYPE_descriptor_t *td, |
| 2361 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 2362 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2363 | CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td); |
| 2364 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 2365 | } |
| 2366 | |
| 2367 | asn_dec_rval_t |
| 2368 | CN_IntegerEnumerated1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2369 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 2370 | CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td); |
| 2371 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 2372 | } |
| 2373 | |
| 2374 | asn_enc_rval_t |
| 2375 | CN_IntegerEnumerated1_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 2376 | int ilevel, enum xer_encoder_flags_e flags, |
| 2377 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2378 | CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td); |
| 2379 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 2380 | } |
| 2381 | |
| 2382 | |
| 2383 | /*** <<< STAT-DEFS [CN-IntegerEnumerated1] >>> ***/ |
| 2384 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2385 | static ber_tlv_tag_t asn_DEF_CN_IntegerEnumerated1_tags_1[] = { |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 2386 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 2387 | }; |
| 2388 | asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1 = { |
| 2389 | "CN-IntegerEnumerated1", |
| 2390 | "CN-IntegerEnumerated1", |
| 2391 | CN_IntegerEnumerated1_free, |
| 2392 | CN_IntegerEnumerated1_print, |
| 2393 | CN_IntegerEnumerated1_constraint, |
| 2394 | CN_IntegerEnumerated1_decode_ber, |
| 2395 | CN_IntegerEnumerated1_encode_der, |
| 2396 | CN_IntegerEnumerated1_decode_xer, |
| 2397 | CN_IntegerEnumerated1_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2398 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 2399 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2400 | asn_DEF_CN_IntegerEnumerated1_tags_1, |
| 2401 | sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1) |
| 2402 | /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */ |
| 2403 | asn_DEF_CN_IntegerEnumerated1_tags_1, /* Same as above */ |
| 2404 | sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1) |
| 2405 | /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */ |
| 2406 | 0, /* No PER visible constraints */ |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 2407 | 0, 0, /* Defined elsewhere */ |
| 2408 | 0 /* No specifics */ |
| 2409 | }; |
| 2410 | |
| 2411 | |
| 2412 | /*** <<< INCLUDES [NO-IntegerEnumerated2] >>> ***/ |
| 2413 | |
| 2414 | #include <INTEGER.h> |
| 2415 | |
| 2416 | /*** <<< DEPS [NO-IntegerEnumerated2] >>> ***/ |
| 2417 | |
| 2418 | typedef enum NO_IntegerEnumerated2 { |
| 2419 | NO_IntegerEnumerated2_a = 1, |
| 2420 | NO_IntegerEnumerated2_b = 3000000000 |
vlm | 7c8aa5e | 2006-03-21 07:25:18 +0000 | [diff] [blame] | 2421 | } e_NO_IntegerEnumerated2; |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 2422 | |
| 2423 | /*** <<< TYPE-DECLS [NO-IntegerEnumerated2] >>> ***/ |
| 2424 | |
| 2425 | typedef INTEGER_t NO_IntegerEnumerated2_t; |
| 2426 | |
| 2427 | /*** <<< FUNC-DECLS [NO-IntegerEnumerated2] >>> ***/ |
| 2428 | |
| 2429 | extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2; |
| 2430 | asn_struct_free_f NO_IntegerEnumerated2_free; |
| 2431 | asn_struct_print_f NO_IntegerEnumerated2_print; |
| 2432 | asn_constr_check_f NO_IntegerEnumerated2_constraint; |
| 2433 | ber_type_decoder_f NO_IntegerEnumerated2_decode_ber; |
| 2434 | der_type_encoder_f NO_IntegerEnumerated2_encode_der; |
| 2435 | xer_type_decoder_f NO_IntegerEnumerated2_decode_xer; |
| 2436 | xer_type_encoder_f NO_IntegerEnumerated2_encode_xer; |
| 2437 | |
| 2438 | /*** <<< CODE [NO-IntegerEnumerated2] >>> ***/ |
| 2439 | |
| 2440 | int |
| 2441 | NO_IntegerEnumerated2_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 2442 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 2443 | /* Replace with underlying type checker */ |
| 2444 | td->check_constraints = asn_DEF_INTEGER.check_constraints; |
| 2445 | return td->check_constraints(td, sptr, app_errlog, app_key); |
| 2446 | } |
| 2447 | |
| 2448 | /* |
| 2449 | * This type is implemented using INTEGER, |
| 2450 | * so here we adjust the DEF accordingly. |
| 2451 | */ |
| 2452 | static void |
| 2453 | NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 2454 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 2455 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 2456 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 2457 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 2458 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 2459 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2460 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
| 2461 | if(!td->per_constraints) |
| 2462 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 2463 | td->elements = asn_DEF_INTEGER.elements; |
| 2464 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 2465 | td->specifics = asn_DEF_INTEGER.specifics; |
| 2466 | } |
| 2467 | |
| 2468 | void |
| 2469 | NO_IntegerEnumerated2_free(asn_TYPE_descriptor_t *td, |
| 2470 | void *struct_ptr, int contents_only) { |
| 2471 | NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td); |
| 2472 | td->free_struct(td, struct_ptr, contents_only); |
| 2473 | } |
| 2474 | |
| 2475 | int |
| 2476 | NO_IntegerEnumerated2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 2477 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 2478 | NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td); |
| 2479 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 2480 | } |
| 2481 | |
| 2482 | asn_dec_rval_t |
| 2483 | NO_IntegerEnumerated2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2484 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 2485 | NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td); |
| 2486 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 2487 | } |
| 2488 | |
| 2489 | asn_enc_rval_t |
| 2490 | NO_IntegerEnumerated2_encode_der(asn_TYPE_descriptor_t *td, |
| 2491 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 2492 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2493 | NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td); |
| 2494 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 2495 | } |
| 2496 | |
| 2497 | asn_dec_rval_t |
| 2498 | NO_IntegerEnumerated2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2499 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 2500 | NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td); |
| 2501 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 2502 | } |
| 2503 | |
| 2504 | asn_enc_rval_t |
| 2505 | NO_IntegerEnumerated2_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 2506 | int ilevel, enum xer_encoder_flags_e flags, |
| 2507 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2508 | NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td); |
| 2509 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 2510 | } |
| 2511 | |
| 2512 | |
| 2513 | /*** <<< STAT-DEFS [NO-IntegerEnumerated2] >>> ***/ |
| 2514 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2515 | static ber_tlv_tag_t asn_DEF_NO_IntegerEnumerated2_tags_1[] = { |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 2516 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 2517 | }; |
| 2518 | asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2 = { |
| 2519 | "NO-IntegerEnumerated2", |
| 2520 | "NO-IntegerEnumerated2", |
| 2521 | NO_IntegerEnumerated2_free, |
| 2522 | NO_IntegerEnumerated2_print, |
| 2523 | NO_IntegerEnumerated2_constraint, |
| 2524 | NO_IntegerEnumerated2_decode_ber, |
| 2525 | NO_IntegerEnumerated2_encode_der, |
| 2526 | NO_IntegerEnumerated2_decode_xer, |
| 2527 | NO_IntegerEnumerated2_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2528 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 2529 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2530 | asn_DEF_NO_IntegerEnumerated2_tags_1, |
| 2531 | sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1) |
| 2532 | /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */ |
| 2533 | asn_DEF_NO_IntegerEnumerated2_tags_1, /* Same as above */ |
| 2534 | sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1) |
| 2535 | /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */ |
| 2536 | 0, /* No PER visible constraints */ |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 2537 | 0, 0, /* Defined elsewhere */ |
| 2538 | 0 /* No specifics */ |
| 2539 | }; |
| 2540 | |