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