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