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