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