Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [CN-IntegerUnlimited] >>> ***/ |
| 3 | |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 4 | #include <INTEGER.h> |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 5 | |
| 6 | /*** <<< TYPE-DECLS [CN-IntegerUnlimited] >>> ***/ |
| 7 | |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 8 | typedef INTEGER_t CN_IntegerUnlimited_t; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 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 | |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 23 | /* |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 24 | * This type is implemented using INTEGER, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 25 | * so here we adjust the DEF accordingly. |
| 26 | */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 27 | |
| 28 | /*** <<< STAT-DEFS [CN-IntegerUnlimited] >>> ***/ |
| 29 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 30 | static const ber_tlv_tag_t asn_DEF_CN_IntegerUnlimited_tags_1[] = { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 31 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 32 | }; |
| 33 | asn_TYPE_descriptor_t asn_DEF_CN_IntegerUnlimited = { |
| 34 | "CN-IntegerUnlimited", |
| 35 | "CN-IntegerUnlimited", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 36 | &asn_OP_INTEGER, |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 37 | INTEGER_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 38 | asn_DEF_CN_IntegerUnlimited_tags_1, |
| 39 | sizeof(asn_DEF_CN_IntegerUnlimited_tags_1) |
| 40 | /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */ |
| 41 | asn_DEF_CN_IntegerUnlimited_tags_1, /* Same as above */ |
| 42 | sizeof(asn_DEF_CN_IntegerUnlimited_tags_1) |
| 43 | /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 44 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 45 | 0, /* No PER visible constraints */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 46 | 0, 0, /* No members */ |
| 47 | 0 /* No specifics */ |
| 48 | }; |
| 49 | |
| 50 | |
| 51 | /*** <<< INCLUDES [CN-IntegerMinMax] >>> ***/ |
| 52 | |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 53 | #include <INTEGER.h> |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 54 | |
| 55 | /*** <<< TYPE-DECLS [CN-IntegerMinMax] >>> ***/ |
| 56 | |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 57 | typedef INTEGER_t CN_IntegerMinMax_t; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 58 | |
| 59 | /*** <<< FUNC-DECLS [CN-IntegerMinMax] >>> ***/ |
| 60 | |
| 61 | extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax; |
| 62 | asn_struct_free_f CN_IntegerMinMax_free; |
| 63 | asn_struct_print_f CN_IntegerMinMax_print; |
| 64 | asn_constr_check_f CN_IntegerMinMax_constraint; |
| 65 | ber_type_decoder_f CN_IntegerMinMax_decode_ber; |
| 66 | der_type_encoder_f CN_IntegerMinMax_encode_der; |
| 67 | xer_type_decoder_f CN_IntegerMinMax_decode_xer; |
| 68 | xer_type_encoder_f CN_IntegerMinMax_encode_xer; |
| 69 | |
| 70 | /*** <<< CODE [CN-IntegerMinMax] >>> ***/ |
| 71 | |
| 72 | int |
| 73 | CN_IntegerMinMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 74 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 75 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 76 | |
| 77 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 78 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 79 | "%s: value not given (%s:%d)", |
| 80 | td->name, __FILE__, __LINE__); |
| 81 | return -1; |
| 82 | } |
| 83 | |
| 84 | |
| 85 | if(1 /* No applicable constraints whatsoever */) { |
johvik | bd3dea9 | 2017-05-09 10:20:51 +0200 | [diff] [blame] | 86 | (void)st; /* Unused variable */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 87 | /* Nothing is here. See below */ |
| 88 | } |
| 89 | |
| 90 | /* Replace with underlying type checker */ |
Lev Walkin | 154519a | 2017-09-06 23:34:40 -0700 | [diff] [blame] | 91 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 92 | } |
| 93 | |
| 94 | /* |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 95 | * This type is implemented using INTEGER, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 96 | * so here we adjust the DEF accordingly. |
| 97 | */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 98 | |
| 99 | /*** <<< STAT-DEFS [CN-IntegerMinMax] >>> ***/ |
| 100 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 101 | static const ber_tlv_tag_t asn_DEF_CN_IntegerMinMax_tags_1[] = { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 102 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 103 | }; |
| 104 | asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax = { |
| 105 | "CN-IntegerMinMax", |
| 106 | "CN-IntegerMinMax", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 107 | &asn_OP_INTEGER, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 108 | CN_IntegerMinMax_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 109 | asn_DEF_CN_IntegerMinMax_tags_1, |
| 110 | sizeof(asn_DEF_CN_IntegerMinMax_tags_1) |
| 111 | /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */ |
| 112 | asn_DEF_CN_IntegerMinMax_tags_1, /* Same as above */ |
| 113 | sizeof(asn_DEF_CN_IntegerMinMax_tags_1) |
| 114 | /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 115 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 116 | 0, /* No PER visible constraints */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 117 | 0, 0, /* No members */ |
| 118 | 0 /* No specifics */ |
| 119 | }; |
| 120 | |
| 121 | |
| 122 | /*** <<< INCLUDES [CN-IntegerMinLow] >>> ***/ |
| 123 | |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 124 | #include <INTEGER.h> |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 125 | |
| 126 | /*** <<< TYPE-DECLS [CN-IntegerMinLow] >>> ***/ |
| 127 | |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 128 | typedef INTEGER_t CN_IntegerMinLow_t; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 129 | |
| 130 | /*** <<< FUNC-DECLS [CN-IntegerMinLow] >>> ***/ |
| 131 | |
| 132 | extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow; |
| 133 | asn_struct_free_f CN_IntegerMinLow_free; |
| 134 | asn_struct_print_f CN_IntegerMinLow_print; |
| 135 | asn_constr_check_f CN_IntegerMinLow_constraint; |
| 136 | ber_type_decoder_f CN_IntegerMinLow_decode_ber; |
| 137 | der_type_encoder_f CN_IntegerMinLow_encode_der; |
| 138 | xer_type_decoder_f CN_IntegerMinLow_decode_xer; |
| 139 | xer_type_encoder_f CN_IntegerMinLow_encode_xer; |
| 140 | |
| 141 | /*** <<< CODE [CN-IntegerMinLow] >>> ***/ |
| 142 | |
| 143 | int |
| 144 | CN_IntegerMinLow_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 145 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 146 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 147 | long value; |
| 148 | |
| 149 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 150 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 151 | "%s: value not given (%s:%d)", |
| 152 | td->name, __FILE__, __LINE__); |
| 153 | return -1; |
| 154 | } |
| 155 | |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 156 | if(asn_INTEGER2long(st, &value)) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 157 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 158 | "%s: value too large (%s:%d)", |
| 159 | td->name, __FILE__, __LINE__); |
| 160 | return -1; |
| 161 | } |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 162 | |
| 163 | if((value <= 1)) { |
| 164 | /* Constraint check succeeded */ |
| 165 | return 0; |
| 166 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 167 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 168 | "%s: constraint failed (%s:%d)", |
| 169 | td->name, __FILE__, __LINE__); |
| 170 | return -1; |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | /* |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 175 | * This type is implemented using INTEGER, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 176 | * so here we adjust the DEF accordingly. |
| 177 | */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 178 | |
| 179 | /*** <<< STAT-DEFS [CN-IntegerMinLow] >>> ***/ |
| 180 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 181 | static const ber_tlv_tag_t asn_DEF_CN_IntegerMinLow_tags_1[] = { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 182 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 183 | }; |
| 184 | asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow = { |
| 185 | "CN-IntegerMinLow", |
| 186 | "CN-IntegerMinLow", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 187 | &asn_OP_INTEGER, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 188 | CN_IntegerMinLow_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 189 | asn_DEF_CN_IntegerMinLow_tags_1, |
| 190 | sizeof(asn_DEF_CN_IntegerMinLow_tags_1) |
| 191 | /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */ |
| 192 | asn_DEF_CN_IntegerMinLow_tags_1, /* Same as above */ |
| 193 | sizeof(asn_DEF_CN_IntegerMinLow_tags_1) |
| 194 | /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 195 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 196 | 0, /* No PER visible constraints */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 197 | 0, 0, /* No members */ |
| 198 | 0 /* No specifics */ |
| 199 | }; |
| 200 | |
| 201 | |
| 202 | /*** <<< INCLUDES [NO-IntegerMinHigh] >>> ***/ |
| 203 | |
| 204 | #include <INTEGER.h> |
| 205 | |
| 206 | /*** <<< TYPE-DECLS [NO-IntegerMinHigh] >>> ***/ |
| 207 | |
| 208 | typedef INTEGER_t NO_IntegerMinHigh_t; |
| 209 | |
| 210 | /*** <<< FUNC-DECLS [NO-IntegerMinHigh] >>> ***/ |
| 211 | |
| 212 | extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh; |
| 213 | asn_struct_free_f NO_IntegerMinHigh_free; |
| 214 | asn_struct_print_f NO_IntegerMinHigh_print; |
| 215 | asn_constr_check_f NO_IntegerMinHigh_constraint; |
| 216 | ber_type_decoder_f NO_IntegerMinHigh_decode_ber; |
| 217 | der_type_encoder_f NO_IntegerMinHigh_encode_der; |
| 218 | xer_type_decoder_f NO_IntegerMinHigh_decode_xer; |
| 219 | xer_type_encoder_f NO_IntegerMinHigh_encode_xer; |
| 220 | |
| 221 | /*** <<< CODE [NO-IntegerMinHigh] >>> ***/ |
| 222 | |
| 223 | int |
| 224 | NO_IntegerMinHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 225 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 226 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
| 227 | long value; |
| 228 | |
| 229 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 230 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 231 | "%s: value not given (%s:%d)", |
| 232 | td->name, __FILE__, __LINE__); |
| 233 | return -1; |
| 234 | } |
| 235 | |
| 236 | if(asn_INTEGER2long(st, &value)) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 237 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 238 | "%s: value too large (%s:%d)", |
| 239 | td->name, __FILE__, __LINE__); |
| 240 | return -1; |
| 241 | } |
| 242 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 243 | if((value <= 3000000000)) { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 244 | /* Constraint check succeeded */ |
| 245 | return 0; |
| 246 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 247 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 248 | "%s: constraint failed (%s:%d)", |
| 249 | td->name, __FILE__, __LINE__); |
| 250 | return -1; |
| 251 | } |
| 252 | } |
| 253 | |
| 254 | /* |
| 255 | * This type is implemented using INTEGER, |
| 256 | * so here we adjust the DEF accordingly. |
| 257 | */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 258 | |
| 259 | /*** <<< STAT-DEFS [NO-IntegerMinHigh] >>> ***/ |
| 260 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 261 | static const ber_tlv_tag_t asn_DEF_NO_IntegerMinHigh_tags_1[] = { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 262 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 263 | }; |
| 264 | asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh = { |
| 265 | "NO-IntegerMinHigh", |
| 266 | "NO-IntegerMinHigh", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 267 | &asn_OP_INTEGER, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 268 | NO_IntegerMinHigh_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 269 | asn_DEF_NO_IntegerMinHigh_tags_1, |
| 270 | sizeof(asn_DEF_NO_IntegerMinHigh_tags_1) |
| 271 | /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */ |
| 272 | asn_DEF_NO_IntegerMinHigh_tags_1, /* Same as above */ |
| 273 | sizeof(asn_DEF_NO_IntegerMinHigh_tags_1) |
| 274 | /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 275 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 276 | 0, /* No PER visible constraints */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 277 | 0, 0, /* No members */ |
| 278 | 0 /* No specifics */ |
| 279 | }; |
| 280 | |
| 281 | |
| 282 | /*** <<< INCLUDES [NO-IntegerLowHigh] >>> ***/ |
| 283 | |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 284 | #include <NativeInteger.h> |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 285 | |
| 286 | /*** <<< TYPE-DECLS [NO-IntegerLowHigh] >>> ***/ |
| 287 | |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 288 | typedef unsigned long NO_IntegerLowHigh_t; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 289 | |
| 290 | /*** <<< FUNC-DECLS [NO-IntegerLowHigh] >>> ***/ |
| 291 | |
| 292 | extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh; |
| 293 | asn_struct_free_f NO_IntegerLowHigh_free; |
| 294 | asn_struct_print_f NO_IntegerLowHigh_print; |
| 295 | asn_constr_check_f NO_IntegerLowHigh_constraint; |
| 296 | ber_type_decoder_f NO_IntegerLowHigh_decode_ber; |
| 297 | der_type_encoder_f NO_IntegerLowHigh_encode_der; |
| 298 | xer_type_decoder_f NO_IntegerLowHigh_decode_xer; |
| 299 | xer_type_encoder_f NO_IntegerLowHigh_encode_xer; |
| 300 | |
| 301 | /*** <<< CODE [NO-IntegerLowHigh] >>> ***/ |
| 302 | |
| 303 | int |
| 304 | NO_IntegerLowHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 305 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 306 | unsigned long value; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 307 | |
| 308 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 309 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 310 | "%s: value not given (%s:%d)", |
| 311 | td->name, __FILE__, __LINE__); |
| 312 | return -1; |
| 313 | } |
| 314 | |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 315 | value = *(const unsigned long *)sptr; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 316 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 317 | if((value >= 1 && value <= 3000000000)) { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 318 | /* Constraint check succeeded */ |
| 319 | return 0; |
| 320 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 321 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 322 | "%s: constraint failed (%s:%d)", |
| 323 | td->name, __FILE__, __LINE__); |
| 324 | return -1; |
| 325 | } |
| 326 | } |
| 327 | |
| 328 | /* |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 329 | * This type is implemented using NativeInteger, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 330 | * so here we adjust the DEF accordingly. |
| 331 | */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 332 | |
| 333 | /*** <<< STAT-DEFS [NO-IntegerLowHigh] >>> ***/ |
| 334 | |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 335 | static const asn_INTEGER_specifics_t asn_SPC_NO_IntegerLowHigh_specs_1 = { |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 336 | 0, 0, 0, 0, 0, |
| 337 | 0, /* Native long size */ |
| 338 | 1 /* Unsigned representation */ |
| 339 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 340 | static const ber_tlv_tag_t asn_DEF_NO_IntegerLowHigh_tags_1[] = { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 341 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 342 | }; |
| 343 | asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh = { |
| 344 | "NO-IntegerLowHigh", |
| 345 | "NO-IntegerLowHigh", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 346 | &asn_OP_NativeInteger, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 347 | NO_IntegerLowHigh_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 348 | asn_DEF_NO_IntegerLowHigh_tags_1, |
| 349 | sizeof(asn_DEF_NO_IntegerLowHigh_tags_1) |
| 350 | /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */ |
| 351 | asn_DEF_NO_IntegerLowHigh_tags_1, /* Same as above */ |
| 352 | sizeof(asn_DEF_NO_IntegerLowHigh_tags_1) |
| 353 | /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 354 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 355 | 0, /* No PER visible constraints */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 356 | 0, 0, /* No members */ |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 357 | &asn_SPC_NO_IntegerLowHigh_specs_1 /* Additional specs */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 358 | }; |
| 359 | |
| 360 | |
| 361 | /*** <<< INCLUDES [CN-IntegerLowMax] >>> ***/ |
| 362 | |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 363 | #include <INTEGER.h> |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 364 | |
| 365 | /*** <<< TYPE-DECLS [CN-IntegerLowMax] >>> ***/ |
| 366 | |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 367 | typedef INTEGER_t CN_IntegerLowMax_t; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 368 | |
| 369 | /*** <<< FUNC-DECLS [CN-IntegerLowMax] >>> ***/ |
| 370 | |
| 371 | extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax; |
| 372 | asn_struct_free_f CN_IntegerLowMax_free; |
| 373 | asn_struct_print_f CN_IntegerLowMax_print; |
| 374 | asn_constr_check_f CN_IntegerLowMax_constraint; |
| 375 | ber_type_decoder_f CN_IntegerLowMax_decode_ber; |
| 376 | der_type_encoder_f CN_IntegerLowMax_encode_der; |
| 377 | xer_type_decoder_f CN_IntegerLowMax_decode_xer; |
| 378 | xer_type_encoder_f CN_IntegerLowMax_encode_xer; |
| 379 | |
| 380 | /*** <<< CODE [CN-IntegerLowMax] >>> ***/ |
| 381 | |
| 382 | int |
| 383 | CN_IntegerLowMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 384 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 385 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 386 | long value; |
| 387 | |
| 388 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 389 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 390 | "%s: value not given (%s:%d)", |
| 391 | td->name, __FILE__, __LINE__); |
| 392 | return -1; |
| 393 | } |
| 394 | |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 395 | if(asn_INTEGER2long(st, &value)) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 396 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 397 | "%s: value too large (%s:%d)", |
| 398 | td->name, __FILE__, __LINE__); |
| 399 | return -1; |
| 400 | } |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 401 | |
| 402 | if((value >= 1)) { |
| 403 | /* Constraint check succeeded */ |
| 404 | return 0; |
| 405 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 406 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 407 | "%s: constraint failed (%s:%d)", |
| 408 | td->name, __FILE__, __LINE__); |
| 409 | return -1; |
| 410 | } |
| 411 | } |
| 412 | |
| 413 | /* |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 414 | * This type is implemented using INTEGER, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 415 | * so here we adjust the DEF accordingly. |
| 416 | */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 417 | |
| 418 | /*** <<< STAT-DEFS [CN-IntegerLowMax] >>> ***/ |
| 419 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 420 | static const ber_tlv_tag_t asn_DEF_CN_IntegerLowMax_tags_1[] = { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 421 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 422 | }; |
| 423 | asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax = { |
| 424 | "CN-IntegerLowMax", |
| 425 | "CN-IntegerLowMax", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 426 | &asn_OP_INTEGER, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 427 | CN_IntegerLowMax_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 428 | asn_DEF_CN_IntegerLowMax_tags_1, |
| 429 | sizeof(asn_DEF_CN_IntegerLowMax_tags_1) |
| 430 | /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */ |
| 431 | asn_DEF_CN_IntegerLowMax_tags_1, /* Same as above */ |
| 432 | sizeof(asn_DEF_CN_IntegerLowMax_tags_1) |
| 433 | /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 434 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 435 | 0, /* No PER visible constraints */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 436 | 0, 0, /* No members */ |
| 437 | 0 /* No specifics */ |
| 438 | }; |
| 439 | |
| 440 | |
| 441 | /*** <<< INCLUDES [NO-IntegerHighMax] >>> ***/ |
| 442 | |
| 443 | #include <INTEGER.h> |
| 444 | |
| 445 | /*** <<< TYPE-DECLS [NO-IntegerHighMax] >>> ***/ |
| 446 | |
| 447 | typedef INTEGER_t NO_IntegerHighMax_t; |
| 448 | |
| 449 | /*** <<< FUNC-DECLS [NO-IntegerHighMax] >>> ***/ |
| 450 | |
| 451 | extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax; |
| 452 | asn_struct_free_f NO_IntegerHighMax_free; |
| 453 | asn_struct_print_f NO_IntegerHighMax_print; |
| 454 | asn_constr_check_f NO_IntegerHighMax_constraint; |
| 455 | ber_type_decoder_f NO_IntegerHighMax_decode_ber; |
| 456 | der_type_encoder_f NO_IntegerHighMax_encode_der; |
| 457 | xer_type_decoder_f NO_IntegerHighMax_decode_xer; |
| 458 | xer_type_encoder_f NO_IntegerHighMax_encode_xer; |
| 459 | |
| 460 | /*** <<< CODE [NO-IntegerHighMax] >>> ***/ |
| 461 | |
| 462 | int |
| 463 | NO_IntegerHighMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 464 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 465 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
| 466 | long value; |
| 467 | |
| 468 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 469 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 470 | "%s: value not given (%s:%d)", |
| 471 | td->name, __FILE__, __LINE__); |
| 472 | return -1; |
| 473 | } |
| 474 | |
| 475 | if(asn_INTEGER2long(st, &value)) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 476 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 477 | "%s: value too large (%s:%d)", |
| 478 | td->name, __FILE__, __LINE__); |
| 479 | return -1; |
| 480 | } |
| 481 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 482 | if((value >= 3000000000)) { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 483 | /* Constraint check succeeded */ |
| 484 | return 0; |
| 485 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 486 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 487 | "%s: constraint failed (%s:%d)", |
| 488 | td->name, __FILE__, __LINE__); |
| 489 | return -1; |
| 490 | } |
| 491 | } |
| 492 | |
| 493 | /* |
| 494 | * This type is implemented using INTEGER, |
| 495 | * so here we adjust the DEF accordingly. |
| 496 | */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 497 | |
| 498 | /*** <<< STAT-DEFS [NO-IntegerHighMax] >>> ***/ |
| 499 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 500 | static const ber_tlv_tag_t asn_DEF_NO_IntegerHighMax_tags_1[] = { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 501 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 502 | }; |
| 503 | asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax = { |
| 504 | "NO-IntegerHighMax", |
| 505 | "NO-IntegerHighMax", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 506 | &asn_OP_INTEGER, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 507 | NO_IntegerHighMax_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 508 | asn_DEF_NO_IntegerHighMax_tags_1, |
| 509 | sizeof(asn_DEF_NO_IntegerHighMax_tags_1) |
| 510 | /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */ |
| 511 | asn_DEF_NO_IntegerHighMax_tags_1, /* Same as above */ |
| 512 | sizeof(asn_DEF_NO_IntegerHighMax_tags_1) |
| 513 | /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 514 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 515 | 0, /* No PER visible constraints */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 516 | 0, 0, /* No members */ |
| 517 | 0 /* No specifics */ |
| 518 | }; |
| 519 | |
| 520 | |
| 521 | /*** <<< INCLUDES [NO-IntegerLowestMax] >>> ***/ |
| 522 | |
| 523 | #include <INTEGER.h> |
| 524 | |
| 525 | /*** <<< TYPE-DECLS [NO-IntegerLowestMax] >>> ***/ |
| 526 | |
| 527 | typedef INTEGER_t NO_IntegerLowestMax_t; |
| 528 | |
| 529 | /*** <<< FUNC-DECLS [NO-IntegerLowestMax] >>> ***/ |
| 530 | |
| 531 | extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax; |
| 532 | asn_struct_free_f NO_IntegerLowestMax_free; |
| 533 | asn_struct_print_f NO_IntegerLowestMax_print; |
| 534 | asn_constr_check_f NO_IntegerLowestMax_constraint; |
| 535 | ber_type_decoder_f NO_IntegerLowestMax_decode_ber; |
| 536 | der_type_encoder_f NO_IntegerLowestMax_encode_der; |
| 537 | xer_type_decoder_f NO_IntegerLowestMax_decode_xer; |
| 538 | xer_type_encoder_f NO_IntegerLowestMax_encode_xer; |
| 539 | |
| 540 | /*** <<< CODE [NO-IntegerLowestMax] >>> ***/ |
| 541 | |
| 542 | int |
| 543 | NO_IntegerLowestMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 544 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 545 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
| 546 | long value; |
| 547 | |
| 548 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 549 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 550 | "%s: value not given (%s:%d)", |
| 551 | td->name, __FILE__, __LINE__); |
| 552 | return -1; |
| 553 | } |
| 554 | |
| 555 | if(asn_INTEGER2long(st, &value)) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 556 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 557 | "%s: value too large (%s:%d)", |
| 558 | td->name, __FILE__, __LINE__); |
| 559 | return -1; |
| 560 | } |
| 561 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 562 | if((value >= -3000000000)) { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 563 | /* Constraint check succeeded */ |
| 564 | return 0; |
| 565 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 566 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 567 | "%s: constraint failed (%s:%d)", |
| 568 | td->name, __FILE__, __LINE__); |
| 569 | return -1; |
| 570 | } |
| 571 | } |
| 572 | |
| 573 | /* |
| 574 | * This type is implemented using INTEGER, |
| 575 | * so here we adjust the DEF accordingly. |
| 576 | */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 577 | |
| 578 | /*** <<< STAT-DEFS [NO-IntegerLowestMax] >>> ***/ |
| 579 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 580 | static const ber_tlv_tag_t asn_DEF_NO_IntegerLowestMax_tags_1[] = { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 581 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 582 | }; |
| 583 | asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax = { |
| 584 | "NO-IntegerLowestMax", |
| 585 | "NO-IntegerLowestMax", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 586 | &asn_OP_INTEGER, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 587 | NO_IntegerLowestMax_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 588 | asn_DEF_NO_IntegerLowestMax_tags_1, |
| 589 | sizeof(asn_DEF_NO_IntegerLowestMax_tags_1) |
| 590 | /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */ |
| 591 | asn_DEF_NO_IntegerLowestMax_tags_1, /* Same as above */ |
| 592 | sizeof(asn_DEF_NO_IntegerLowestMax_tags_1) |
| 593 | /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 594 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 595 | 0, /* No PER visible constraints */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 596 | 0, 0, /* No members */ |
| 597 | 0 /* No specifics */ |
| 598 | }; |
| 599 | |
| 600 | |
| 601 | /*** <<< INCLUDES [NO-IntegerOutRange] >>> ***/ |
| 602 | |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 603 | #include <NativeInteger.h> |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 604 | |
| 605 | /*** <<< TYPE-DECLS [NO-IntegerOutRange] >>> ***/ |
| 606 | |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 607 | typedef unsigned long NO_IntegerOutRange_t; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 608 | |
| 609 | /*** <<< FUNC-DECLS [NO-IntegerOutRange] >>> ***/ |
| 610 | |
| 611 | extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange; |
| 612 | asn_struct_free_f NO_IntegerOutRange_free; |
| 613 | asn_struct_print_f NO_IntegerOutRange_print; |
| 614 | asn_constr_check_f NO_IntegerOutRange_constraint; |
| 615 | ber_type_decoder_f NO_IntegerOutRange_decode_ber; |
| 616 | der_type_encoder_f NO_IntegerOutRange_encode_der; |
| 617 | xer_type_decoder_f NO_IntegerOutRange_decode_xer; |
| 618 | xer_type_encoder_f NO_IntegerOutRange_encode_xer; |
| 619 | |
| 620 | /*** <<< CODE [NO-IntegerOutRange] >>> ***/ |
| 621 | |
| 622 | int |
| 623 | NO_IntegerOutRange_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 624 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 625 | unsigned long value; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 626 | |
| 627 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 628 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 629 | "%s: value not given (%s:%d)", |
| 630 | td->name, __FILE__, __LINE__); |
| 631 | return -1; |
| 632 | } |
| 633 | |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 634 | value = *(const unsigned long *)sptr; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 635 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 636 | if((value >= 3000000000 && value <= 3000000001)) { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 637 | /* Constraint check succeeded */ |
| 638 | return 0; |
| 639 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 640 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 641 | "%s: constraint failed (%s:%d)", |
| 642 | td->name, __FILE__, __LINE__); |
| 643 | return -1; |
| 644 | } |
| 645 | } |
| 646 | |
| 647 | /* |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 648 | * This type is implemented using NativeInteger, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 649 | * so here we adjust the DEF accordingly. |
| 650 | */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 651 | |
| 652 | /*** <<< STAT-DEFS [NO-IntegerOutRange] >>> ***/ |
| 653 | |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 654 | static const asn_INTEGER_specifics_t asn_SPC_NO_IntegerOutRange_specs_1 = { |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 655 | 0, 0, 0, 0, 0, |
| 656 | 0, /* Native long size */ |
| 657 | 1 /* Unsigned representation */ |
| 658 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 659 | static const ber_tlv_tag_t asn_DEF_NO_IntegerOutRange_tags_1[] = { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 660 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 661 | }; |
| 662 | asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange = { |
| 663 | "NO-IntegerOutRange", |
| 664 | "NO-IntegerOutRange", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 665 | &asn_OP_NativeInteger, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 666 | NO_IntegerOutRange_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 667 | asn_DEF_NO_IntegerOutRange_tags_1, |
| 668 | sizeof(asn_DEF_NO_IntegerOutRange_tags_1) |
| 669 | /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */ |
| 670 | asn_DEF_NO_IntegerOutRange_tags_1, /* Same as above */ |
| 671 | sizeof(asn_DEF_NO_IntegerOutRange_tags_1) |
| 672 | /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 673 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 674 | 0, /* No PER visible constraints */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 675 | 0, 0, /* No members */ |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 676 | &asn_SPC_NO_IntegerOutRange_specs_1 /* Additional specs */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 677 | }; |
| 678 | |
| 679 | |
| 680 | /*** <<< INCLUDES [NO-IntegerOutValue] >>> ***/ |
| 681 | |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 682 | #include <NativeInteger.h> |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 683 | |
| 684 | /*** <<< TYPE-DECLS [NO-IntegerOutValue] >>> ***/ |
| 685 | |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 686 | typedef unsigned long NO_IntegerOutValue_t; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 687 | |
| 688 | /*** <<< FUNC-DECLS [NO-IntegerOutValue] >>> ***/ |
| 689 | |
| 690 | extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue; |
| 691 | asn_struct_free_f NO_IntegerOutValue_free; |
| 692 | asn_struct_print_f NO_IntegerOutValue_print; |
| 693 | asn_constr_check_f NO_IntegerOutValue_constraint; |
| 694 | ber_type_decoder_f NO_IntegerOutValue_decode_ber; |
| 695 | der_type_encoder_f NO_IntegerOutValue_encode_der; |
| 696 | xer_type_decoder_f NO_IntegerOutValue_decode_xer; |
| 697 | xer_type_encoder_f NO_IntegerOutValue_encode_xer; |
| 698 | |
| 699 | /*** <<< CODE [NO-IntegerOutValue] >>> ***/ |
| 700 | |
| 701 | int |
| 702 | NO_IntegerOutValue_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 703 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 704 | unsigned long value; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 705 | |
| 706 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 707 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 708 | "%s: value not given (%s:%d)", |
| 709 | td->name, __FILE__, __LINE__); |
| 710 | return -1; |
| 711 | } |
| 712 | |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 713 | value = *(const unsigned long *)sptr; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 714 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 715 | if((value == 3000000000)) { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 716 | /* Constraint check succeeded */ |
| 717 | return 0; |
| 718 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 719 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 720 | "%s: constraint failed (%s:%d)", |
| 721 | td->name, __FILE__, __LINE__); |
| 722 | return -1; |
| 723 | } |
| 724 | } |
| 725 | |
| 726 | /* |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 727 | * This type is implemented using NativeInteger, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 728 | * so here we adjust the DEF accordingly. |
| 729 | */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 730 | |
| 731 | /*** <<< STAT-DEFS [NO-IntegerOutValue] >>> ***/ |
| 732 | |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 733 | static const asn_INTEGER_specifics_t asn_SPC_NO_IntegerOutValue_specs_1 = { |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 734 | 0, 0, 0, 0, 0, |
| 735 | 0, /* Native long size */ |
| 736 | 1 /* Unsigned representation */ |
| 737 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 738 | static const ber_tlv_tag_t asn_DEF_NO_IntegerOutValue_tags_1[] = { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 739 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 740 | }; |
| 741 | asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue = { |
| 742 | "NO-IntegerOutValue", |
| 743 | "NO-IntegerOutValue", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 744 | &asn_OP_NativeInteger, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 745 | NO_IntegerOutValue_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 746 | asn_DEF_NO_IntegerOutValue_tags_1, |
| 747 | sizeof(asn_DEF_NO_IntegerOutValue_tags_1) |
| 748 | /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */ |
| 749 | asn_DEF_NO_IntegerOutValue_tags_1, /* Same as above */ |
| 750 | sizeof(asn_DEF_NO_IntegerOutValue_tags_1) |
| 751 | /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 752 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 753 | 0, /* No PER visible constraints */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 754 | 0, 0, /* No members */ |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 755 | &asn_SPC_NO_IntegerOutValue_specs_1 /* Additional specs */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 756 | }; |
| 757 | |
| 758 | |
| 759 | /*** <<< INCLUDES [OK-IntegerInRange1] >>> ***/ |
| 760 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 761 | #include <NativeInteger.h> |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 762 | |
| 763 | /*** <<< TYPE-DECLS [OK-IntegerInRange1] >>> ***/ |
| 764 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 765 | typedef long OK_IntegerInRange1_t; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 766 | |
| 767 | /*** <<< FUNC-DECLS [OK-IntegerInRange1] >>> ***/ |
| 768 | |
| 769 | extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1; |
| 770 | asn_struct_free_f OK_IntegerInRange1_free; |
| 771 | asn_struct_print_f OK_IntegerInRange1_print; |
| 772 | asn_constr_check_f OK_IntegerInRange1_constraint; |
| 773 | ber_type_decoder_f OK_IntegerInRange1_decode_ber; |
| 774 | der_type_encoder_f OK_IntegerInRange1_encode_der; |
| 775 | xer_type_decoder_f OK_IntegerInRange1_decode_xer; |
| 776 | xer_type_encoder_f OK_IntegerInRange1_encode_xer; |
| 777 | |
| 778 | /*** <<< CODE [OK-IntegerInRange1] >>> ***/ |
| 779 | |
| 780 | int |
| 781 | OK_IntegerInRange1_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 782 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 783 | long value; |
| 784 | |
| 785 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 786 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 787 | "%s: value not given (%s:%d)", |
| 788 | td->name, __FILE__, __LINE__); |
| 789 | return -1; |
| 790 | } |
| 791 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 792 | value = *(const long *)sptr; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 793 | |
| 794 | if((value >= -100 && value <= 100)) { |
| 795 | /* Constraint check succeeded */ |
| 796 | return 0; |
| 797 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 798 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 799 | "%s: constraint failed (%s:%d)", |
| 800 | td->name, __FILE__, __LINE__); |
| 801 | return -1; |
| 802 | } |
| 803 | } |
| 804 | |
| 805 | /* |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 806 | * This type is implemented using NativeInteger, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 807 | * so here we adjust the DEF accordingly. |
| 808 | */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 809 | |
| 810 | /*** <<< STAT-DEFS [OK-IntegerInRange1] >>> ***/ |
| 811 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 812 | static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange1_tags_1[] = { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 813 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 814 | }; |
| 815 | asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1 = { |
| 816 | "OK-IntegerInRange1", |
| 817 | "OK-IntegerInRange1", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 818 | &asn_OP_NativeInteger, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 819 | OK_IntegerInRange1_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 820 | asn_DEF_OK_IntegerInRange1_tags_1, |
| 821 | sizeof(asn_DEF_OK_IntegerInRange1_tags_1) |
| 822 | /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */ |
| 823 | asn_DEF_OK_IntegerInRange1_tags_1, /* Same as above */ |
| 824 | sizeof(asn_DEF_OK_IntegerInRange1_tags_1) |
| 825 | /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 826 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 827 | 0, /* No PER visible constraints */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 828 | 0, 0, /* No members */ |
| 829 | 0 /* No specifics */ |
| 830 | }; |
| 831 | |
| 832 | |
| 833 | /*** <<< INCLUDES [OK-IntegerInRange2] >>> ***/ |
| 834 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 835 | #include <NativeInteger.h> |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 836 | |
| 837 | /*** <<< TYPE-DECLS [OK-IntegerInRange2] >>> ***/ |
| 838 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 839 | typedef long OK_IntegerInRange2_t; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 840 | |
| 841 | /*** <<< FUNC-DECLS [OK-IntegerInRange2] >>> ***/ |
| 842 | |
| 843 | extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2; |
| 844 | asn_struct_free_f OK_IntegerInRange2_free; |
| 845 | asn_struct_print_f OK_IntegerInRange2_print; |
| 846 | asn_constr_check_f OK_IntegerInRange2_constraint; |
| 847 | ber_type_decoder_f OK_IntegerInRange2_decode_ber; |
| 848 | der_type_encoder_f OK_IntegerInRange2_encode_der; |
| 849 | xer_type_decoder_f OK_IntegerInRange2_decode_xer; |
| 850 | xer_type_encoder_f OK_IntegerInRange2_encode_xer; |
| 851 | |
| 852 | /*** <<< CODE [OK-IntegerInRange2] >>> ***/ |
| 853 | |
| 854 | int |
| 855 | OK_IntegerInRange2_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 856 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 857 | long value; |
| 858 | |
| 859 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 860 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 861 | "%s: value not given (%s:%d)", |
| 862 | td->name, __FILE__, __LINE__); |
| 863 | return -1; |
| 864 | } |
| 865 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 866 | value = *(const long *)sptr; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 867 | |
| 868 | if(((value == -100) || (value == 100))) { |
| 869 | /* Constraint check succeeded */ |
| 870 | return 0; |
| 871 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 872 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 873 | "%s: constraint failed (%s:%d)", |
| 874 | td->name, __FILE__, __LINE__); |
| 875 | return -1; |
| 876 | } |
| 877 | } |
| 878 | |
| 879 | /* |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 880 | * This type is implemented using NativeInteger, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 881 | * so here we adjust the DEF accordingly. |
| 882 | */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 883 | |
| 884 | /*** <<< STAT-DEFS [OK-IntegerInRange2] >>> ***/ |
| 885 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 886 | static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange2_tags_1[] = { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 887 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 888 | }; |
| 889 | asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2 = { |
| 890 | "OK-IntegerInRange2", |
| 891 | "OK-IntegerInRange2", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 892 | &asn_OP_NativeInteger, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 893 | OK_IntegerInRange2_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 894 | asn_DEF_OK_IntegerInRange2_tags_1, |
| 895 | sizeof(asn_DEF_OK_IntegerInRange2_tags_1) |
| 896 | /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */ |
| 897 | asn_DEF_OK_IntegerInRange2_tags_1, /* Same as above */ |
| 898 | sizeof(asn_DEF_OK_IntegerInRange2_tags_1) |
| 899 | /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 900 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 901 | 0, /* No PER visible constraints */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 902 | 0, 0, /* No members */ |
| 903 | 0 /* No specifics */ |
| 904 | }; |
| 905 | |
| 906 | |
| 907 | /*** <<< INCLUDES [OK-IntegerInRange3] >>> ***/ |
| 908 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 909 | #include <NativeInteger.h> |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 910 | |
| 911 | /*** <<< TYPE-DECLS [OK-IntegerInRange3] >>> ***/ |
| 912 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 913 | typedef long OK_IntegerInRange3_t; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 914 | |
| 915 | /*** <<< FUNC-DECLS [OK-IntegerInRange3] >>> ***/ |
| 916 | |
| 917 | extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3; |
| 918 | asn_struct_free_f OK_IntegerInRange3_free; |
| 919 | asn_struct_print_f OK_IntegerInRange3_print; |
| 920 | asn_constr_check_f OK_IntegerInRange3_constraint; |
| 921 | ber_type_decoder_f OK_IntegerInRange3_decode_ber; |
| 922 | der_type_encoder_f OK_IntegerInRange3_encode_der; |
| 923 | xer_type_decoder_f OK_IntegerInRange3_decode_xer; |
| 924 | xer_type_encoder_f OK_IntegerInRange3_encode_xer; |
| 925 | |
| 926 | /*** <<< CODE [OK-IntegerInRange3] >>> ***/ |
| 927 | |
| 928 | int |
| 929 | OK_IntegerInRange3_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 930 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 931 | long value; |
| 932 | |
| 933 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 934 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 935 | "%s: value not given (%s:%d)", |
| 936 | td->name, __FILE__, __LINE__); |
| 937 | return -1; |
| 938 | } |
| 939 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 940 | value = *(const long *)sptr; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 941 | |
Lev Walkin | 63b4126 | 2007-11-06 01:48:46 +0000 | [diff] [blame] | 942 | if((value >= (-2147483647L - 1) && value <= 2147483647)) { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 943 | /* Constraint check succeeded */ |
| 944 | return 0; |
| 945 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 946 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 947 | "%s: constraint failed (%s:%d)", |
| 948 | td->name, __FILE__, __LINE__); |
| 949 | return -1; |
| 950 | } |
| 951 | } |
| 952 | |
| 953 | /* |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 954 | * This type is implemented using NativeInteger, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 955 | * so here we adjust the DEF accordingly. |
| 956 | */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 957 | |
| 958 | /*** <<< STAT-DEFS [OK-IntegerInRange3] >>> ***/ |
| 959 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 960 | static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange3_tags_1[] = { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 961 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 962 | }; |
| 963 | asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3 = { |
| 964 | "OK-IntegerInRange3", |
| 965 | "OK-IntegerInRange3", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 966 | &asn_OP_NativeInteger, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 967 | OK_IntegerInRange3_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 968 | asn_DEF_OK_IntegerInRange3_tags_1, |
| 969 | sizeof(asn_DEF_OK_IntegerInRange3_tags_1) |
| 970 | /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */ |
| 971 | asn_DEF_OK_IntegerInRange3_tags_1, /* Same as above */ |
| 972 | sizeof(asn_DEF_OK_IntegerInRange3_tags_1) |
| 973 | /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 974 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 975 | 0, /* No PER visible constraints */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 976 | 0, 0, /* No members */ |
| 977 | 0 /* No specifics */ |
| 978 | }; |
| 979 | |
| 980 | |
| 981 | /*** <<< INCLUDES [OK-IntegerInRange4] >>> ***/ |
| 982 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 983 | #include <NativeInteger.h> |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 984 | |
| 985 | /*** <<< TYPE-DECLS [OK-IntegerInRange4] >>> ***/ |
| 986 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 987 | typedef long OK_IntegerInRange4_t; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 988 | |
| 989 | /*** <<< FUNC-DECLS [OK-IntegerInRange4] >>> ***/ |
| 990 | |
| 991 | extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4; |
| 992 | asn_struct_free_f OK_IntegerInRange4_free; |
| 993 | asn_struct_print_f OK_IntegerInRange4_print; |
| 994 | asn_constr_check_f OK_IntegerInRange4_constraint; |
| 995 | ber_type_decoder_f OK_IntegerInRange4_decode_ber; |
| 996 | der_type_encoder_f OK_IntegerInRange4_encode_der; |
| 997 | xer_type_decoder_f OK_IntegerInRange4_decode_xer; |
| 998 | xer_type_encoder_f OK_IntegerInRange4_encode_xer; |
| 999 | |
| 1000 | /*** <<< CODE [OK-IntegerInRange4] >>> ***/ |
| 1001 | |
| 1002 | int |
| 1003 | OK_IntegerInRange4_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 1004 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1005 | long value; |
| 1006 | |
| 1007 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 1008 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1009 | "%s: value not given (%s:%d)", |
| 1010 | td->name, __FILE__, __LINE__); |
| 1011 | return -1; |
| 1012 | } |
| 1013 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1014 | value = *(const long *)sptr; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1015 | |
Lev Walkin | 63b4126 | 2007-11-06 01:48:46 +0000 | [diff] [blame] | 1016 | if(((value == (-2147483647L - 1)) || (value == 2147483647))) { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1017 | /* Constraint check succeeded */ |
| 1018 | return 0; |
| 1019 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 1020 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1021 | "%s: constraint failed (%s:%d)", |
| 1022 | td->name, __FILE__, __LINE__); |
| 1023 | return -1; |
| 1024 | } |
| 1025 | } |
| 1026 | |
| 1027 | /* |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1028 | * This type is implemented using NativeInteger, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1029 | * so here we adjust the DEF accordingly. |
| 1030 | */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1031 | |
| 1032 | /*** <<< STAT-DEFS [OK-IntegerInRange4] >>> ***/ |
| 1033 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 1034 | static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange4_tags_1[] = { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1035 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1036 | }; |
| 1037 | asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4 = { |
| 1038 | "OK-IntegerInRange4", |
| 1039 | "OK-IntegerInRange4", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 1040 | &asn_OP_NativeInteger, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1041 | OK_IntegerInRange4_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1042 | asn_DEF_OK_IntegerInRange4_tags_1, |
| 1043 | sizeof(asn_DEF_OK_IntegerInRange4_tags_1) |
| 1044 | /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */ |
| 1045 | asn_DEF_OK_IntegerInRange4_tags_1, /* Same as above */ |
| 1046 | sizeof(asn_DEF_OK_IntegerInRange4_tags_1) |
| 1047 | /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1048 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1049 | 0, /* No PER visible constraints */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1050 | 0, 0, /* No members */ |
| 1051 | 0 /* No specifics */ |
| 1052 | }; |
| 1053 | |
| 1054 | |
| 1055 | /*** <<< INCLUDES [OK-IntegerInRange5] >>> ***/ |
| 1056 | |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 1057 | #include <INTEGER.h> |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1058 | |
| 1059 | /*** <<< TYPE-DECLS [OK-IntegerInRange5] >>> ***/ |
| 1060 | |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 1061 | typedef INTEGER_t OK_IntegerInRange5_t; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1062 | |
| 1063 | /*** <<< FUNC-DECLS [OK-IntegerInRange5] >>> ***/ |
| 1064 | |
| 1065 | extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5; |
| 1066 | asn_struct_free_f OK_IntegerInRange5_free; |
| 1067 | asn_struct_print_f OK_IntegerInRange5_print; |
| 1068 | asn_constr_check_f OK_IntegerInRange5_constraint; |
| 1069 | ber_type_decoder_f OK_IntegerInRange5_decode_ber; |
| 1070 | der_type_encoder_f OK_IntegerInRange5_encode_der; |
| 1071 | xer_type_decoder_f OK_IntegerInRange5_decode_xer; |
| 1072 | xer_type_encoder_f OK_IntegerInRange5_encode_xer; |
| 1073 | |
| 1074 | /*** <<< CODE [OK-IntegerInRange5] >>> ***/ |
| 1075 | |
| 1076 | int |
| 1077 | OK_IntegerInRange5_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 1078 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 1079 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1080 | long value; |
| 1081 | |
| 1082 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 1083 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1084 | "%s: value not given (%s:%d)", |
| 1085 | td->name, __FILE__, __LINE__); |
| 1086 | return -1; |
| 1087 | } |
| 1088 | |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 1089 | if(asn_INTEGER2long(st, &value)) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 1090 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 1091 | "%s: value too large (%s:%d)", |
| 1092 | td->name, __FILE__, __LINE__); |
| 1093 | return -1; |
| 1094 | } |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1095 | |
Lev Walkin | 63b4126 | 2007-11-06 01:48:46 +0000 | [diff] [blame] | 1096 | if(((value == (-2147483647L - 1)) || (value == 2147483647))) { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1097 | /* Constraint check succeeded */ |
| 1098 | return 0; |
| 1099 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 1100 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1101 | "%s: constraint failed (%s:%d)", |
| 1102 | td->name, __FILE__, __LINE__); |
| 1103 | return -1; |
| 1104 | } |
| 1105 | } |
| 1106 | |
| 1107 | /* |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 1108 | * This type is implemented using INTEGER, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1109 | * so here we adjust the DEF accordingly. |
| 1110 | */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1111 | |
| 1112 | /*** <<< STAT-DEFS [OK-IntegerInRange5] >>> ***/ |
| 1113 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 1114 | static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange5_tags_1[] = { |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1115 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1116 | }; |
| 1117 | asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5 = { |
| 1118 | "OK-IntegerInRange5", |
| 1119 | "OK-IntegerInRange5", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 1120 | &asn_OP_INTEGER, |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1121 | OK_IntegerInRange5_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1122 | asn_DEF_OK_IntegerInRange5_tags_1, |
| 1123 | sizeof(asn_DEF_OK_IntegerInRange5_tags_1) |
| 1124 | /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */ |
| 1125 | asn_DEF_OK_IntegerInRange5_tags_1, /* Same as above */ |
| 1126 | sizeof(asn_DEF_OK_IntegerInRange5_tags_1) |
| 1127 | /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1128 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1129 | 0, /* No PER visible constraints */ |
Lev Walkin | 082cadc | 2005-08-14 02:18:27 +0000 | [diff] [blame] | 1130 | 0, 0, /* No members */ |
| 1131 | 0 /* No specifics */ |
| 1132 | }; |
| 1133 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1134 | |
Lev Walkin | fee6f71 | 2005-08-27 03:13:51 +0000 | [diff] [blame] | 1135 | /*** <<< INCLUDES [NO-IntegerInRange6] >>> ***/ |
| 1136 | |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1137 | #include <NativeInteger.h> |
Lev Walkin | fee6f71 | 2005-08-27 03:13:51 +0000 | [diff] [blame] | 1138 | |
| 1139 | /*** <<< TYPE-DECLS [NO-IntegerInRange6] >>> ***/ |
| 1140 | |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1141 | typedef unsigned long NO_IntegerInRange6_t; |
Lev Walkin | fee6f71 | 2005-08-27 03:13:51 +0000 | [diff] [blame] | 1142 | |
| 1143 | /*** <<< FUNC-DECLS [NO-IntegerInRange6] >>> ***/ |
| 1144 | |
| 1145 | extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6; |
| 1146 | asn_struct_free_f NO_IntegerInRange6_free; |
| 1147 | asn_struct_print_f NO_IntegerInRange6_print; |
| 1148 | asn_constr_check_f NO_IntegerInRange6_constraint; |
| 1149 | ber_type_decoder_f NO_IntegerInRange6_decode_ber; |
| 1150 | der_type_encoder_f NO_IntegerInRange6_encode_der; |
| 1151 | xer_type_decoder_f NO_IntegerInRange6_decode_xer; |
| 1152 | xer_type_encoder_f NO_IntegerInRange6_encode_xer; |
| 1153 | |
| 1154 | /*** <<< CODE [NO-IntegerInRange6] >>> ***/ |
| 1155 | |
| 1156 | int |
| 1157 | NO_IntegerInRange6_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 1158 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | fee6f71 | 2005-08-27 03:13:51 +0000 | [diff] [blame] | 1159 | |
| 1160 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 1161 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | fee6f71 | 2005-08-27 03:13:51 +0000 | [diff] [blame] | 1162 | "%s: value not given (%s:%d)", |
| 1163 | td->name, __FILE__, __LINE__); |
| 1164 | return -1; |
| 1165 | } |
| 1166 | |
Lev Walkin | fee6f71 | 2005-08-27 03:13:51 +0000 | [diff] [blame] | 1167 | |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1168 | /* Constraint check succeeded */ |
| 1169 | return 0; |
Lev Walkin | fee6f71 | 2005-08-27 03:13:51 +0000 | [diff] [blame] | 1170 | } |
| 1171 | |
| 1172 | /* |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1173 | * This type is implemented using NativeInteger, |
Lev Walkin | fee6f71 | 2005-08-27 03:13:51 +0000 | [diff] [blame] | 1174 | * so here we adjust the DEF accordingly. |
| 1175 | */ |
Lev Walkin | fee6f71 | 2005-08-27 03:13:51 +0000 | [diff] [blame] | 1176 | |
| 1177 | /*** <<< STAT-DEFS [NO-IntegerInRange6] >>> ***/ |
| 1178 | |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 1179 | static const asn_INTEGER_specifics_t asn_SPC_NO_IntegerInRange6_specs_1 = { |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1180 | 0, 0, 0, 0, 0, |
| 1181 | 0, /* Native long size */ |
| 1182 | 1 /* Unsigned representation */ |
| 1183 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 1184 | static const ber_tlv_tag_t asn_DEF_NO_IntegerInRange6_tags_1[] = { |
Lev Walkin | fee6f71 | 2005-08-27 03:13:51 +0000 | [diff] [blame] | 1185 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1186 | }; |
| 1187 | asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6 = { |
| 1188 | "NO-IntegerInRange6", |
| 1189 | "NO-IntegerInRange6", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 1190 | &asn_OP_NativeInteger, |
Lev Walkin | fee6f71 | 2005-08-27 03:13:51 +0000 | [diff] [blame] | 1191 | NO_IntegerInRange6_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1192 | asn_DEF_NO_IntegerInRange6_tags_1, |
| 1193 | sizeof(asn_DEF_NO_IntegerInRange6_tags_1) |
| 1194 | /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */ |
| 1195 | asn_DEF_NO_IntegerInRange6_tags_1, /* Same as above */ |
| 1196 | sizeof(asn_DEF_NO_IntegerInRange6_tags_1) |
| 1197 | /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1198 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1199 | 0, /* No PER visible constraints */ |
Lev Walkin | fee6f71 | 2005-08-27 03:13:51 +0000 | [diff] [blame] | 1200 | 0, 0, /* No members */ |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1201 | &asn_SPC_NO_IntegerInRange6_specs_1 /* Additional specs */ |
Lev Walkin | fee6f71 | 2005-08-27 03:13:51 +0000 | [diff] [blame] | 1202 | }; |
| 1203 | |
| 1204 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1205 | /*** <<< INCLUDES [CN-IntegerEnumerated1] >>> ***/ |
| 1206 | |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 1207 | #include <INTEGER.h> |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1208 | |
| 1209 | /*** <<< DEPS [CN-IntegerEnumerated1] >>> ***/ |
| 1210 | |
| 1211 | typedef enum CN_IntegerEnumerated1 { |
| 1212 | CN_IntegerEnumerated1_a = 1, |
| 1213 | CN_IntegerEnumerated1_b = 2 |
Lev Walkin | 171487e | 2006-03-21 07:25:18 +0000 | [diff] [blame] | 1214 | } e_CN_IntegerEnumerated1; |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1215 | |
| 1216 | /*** <<< TYPE-DECLS [CN-IntegerEnumerated1] >>> ***/ |
| 1217 | |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 1218 | typedef INTEGER_t CN_IntegerEnumerated1_t; |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1219 | |
| 1220 | /*** <<< FUNC-DECLS [CN-IntegerEnumerated1] >>> ***/ |
| 1221 | |
| 1222 | extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1; |
| 1223 | asn_struct_free_f CN_IntegerEnumerated1_free; |
| 1224 | asn_struct_print_f CN_IntegerEnumerated1_print; |
| 1225 | asn_constr_check_f CN_IntegerEnumerated1_constraint; |
| 1226 | ber_type_decoder_f CN_IntegerEnumerated1_decode_ber; |
| 1227 | der_type_encoder_f CN_IntegerEnumerated1_encode_der; |
| 1228 | xer_type_decoder_f CN_IntegerEnumerated1_decode_xer; |
| 1229 | xer_type_encoder_f CN_IntegerEnumerated1_encode_xer; |
| 1230 | |
| 1231 | /*** <<< CODE [CN-IntegerEnumerated1] >>> ***/ |
| 1232 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1233 | /* |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 1234 | * This type is implemented using INTEGER, |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1235 | * so here we adjust the DEF accordingly. |
| 1236 | */ |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1237 | |
| 1238 | /*** <<< STAT-DEFS [CN-IntegerEnumerated1] >>> ***/ |
| 1239 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 1240 | static const ber_tlv_tag_t asn_DEF_CN_IntegerEnumerated1_tags_1[] = { |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1241 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1242 | }; |
| 1243 | asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1 = { |
| 1244 | "CN-IntegerEnumerated1", |
| 1245 | "CN-IntegerEnumerated1", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 1246 | &asn_OP_INTEGER, |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 1247 | INTEGER_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1248 | asn_DEF_CN_IntegerEnumerated1_tags_1, |
| 1249 | sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1) |
| 1250 | /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */ |
| 1251 | asn_DEF_CN_IntegerEnumerated1_tags_1, /* Same as above */ |
| 1252 | sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1) |
| 1253 | /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1254 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1255 | 0, /* No PER visible constraints */ |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1256 | 0, 0, /* Defined elsewhere */ |
| 1257 | 0 /* No specifics */ |
| 1258 | }; |
| 1259 | |
| 1260 | |
| 1261 | /*** <<< INCLUDES [NO-IntegerEnumerated2] >>> ***/ |
| 1262 | |
| 1263 | #include <INTEGER.h> |
| 1264 | |
| 1265 | /*** <<< DEPS [NO-IntegerEnumerated2] >>> ***/ |
| 1266 | |
| 1267 | typedef enum NO_IntegerEnumerated2 { |
| 1268 | NO_IntegerEnumerated2_a = 1, |
| 1269 | NO_IntegerEnumerated2_b = 3000000000 |
Lev Walkin | 171487e | 2006-03-21 07:25:18 +0000 | [diff] [blame] | 1270 | } e_NO_IntegerEnumerated2; |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1271 | |
| 1272 | /*** <<< TYPE-DECLS [NO-IntegerEnumerated2] >>> ***/ |
| 1273 | |
| 1274 | typedef INTEGER_t NO_IntegerEnumerated2_t; |
| 1275 | |
| 1276 | /*** <<< FUNC-DECLS [NO-IntegerEnumerated2] >>> ***/ |
| 1277 | |
| 1278 | extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2; |
| 1279 | asn_struct_free_f NO_IntegerEnumerated2_free; |
| 1280 | asn_struct_print_f NO_IntegerEnumerated2_print; |
| 1281 | asn_constr_check_f NO_IntegerEnumerated2_constraint; |
| 1282 | ber_type_decoder_f NO_IntegerEnumerated2_decode_ber; |
| 1283 | der_type_encoder_f NO_IntegerEnumerated2_encode_der; |
| 1284 | xer_type_decoder_f NO_IntegerEnumerated2_decode_xer; |
| 1285 | xer_type_encoder_f NO_IntegerEnumerated2_encode_xer; |
| 1286 | |
| 1287 | /*** <<< CODE [NO-IntegerEnumerated2] >>> ***/ |
| 1288 | |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1289 | /* |
| 1290 | * This type is implemented using INTEGER, |
| 1291 | * so here we adjust the DEF accordingly. |
| 1292 | */ |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1293 | |
| 1294 | /*** <<< STAT-DEFS [NO-IntegerEnumerated2] >>> ***/ |
| 1295 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 1296 | static const ber_tlv_tag_t asn_DEF_NO_IntegerEnumerated2_tags_1[] = { |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1297 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1298 | }; |
| 1299 | asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2 = { |
| 1300 | "NO-IntegerEnumerated2", |
| 1301 | "NO-IntegerEnumerated2", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 1302 | &asn_OP_INTEGER, |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 1303 | INTEGER_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1304 | asn_DEF_NO_IntegerEnumerated2_tags_1, |
| 1305 | sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1) |
| 1306 | /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */ |
| 1307 | asn_DEF_NO_IntegerEnumerated2_tags_1, /* Same as above */ |
| 1308 | sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1) |
| 1309 | /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1310 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1311 | 0, /* No PER visible constraints */ |
Lev Walkin | c3f0b89 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 1312 | 0, 0, /* Defined elsewhere */ |
| 1313 | 0 /* No specifics */ |
| 1314 | }; |
| 1315 | |