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