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