Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [PDU] >>> ***/ |
| 3 | |
| 4 | #include <IA5String.h> |
| 5 | #include <VisibleString.h> |
| 6 | #include <PrintableString.h> |
| 7 | #include <NumericString.h> |
| 8 | #include <UTF8String.h> |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 9 | #include <BMPString.h> |
| 10 | #include <UniversalString.h> |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 11 | #include <NativeReal.h> |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 12 | #include <OBJECT_IDENTIFIER.h> |
| 13 | #include <asn_SEQUENCE_OF.h> |
| 14 | #include <constr_SEQUENCE_OF.h> |
| 15 | #include <constr_SEQUENCE.h> |
| 16 | |
| 17 | /*** <<< FWD-DECLS [PDU] >>> ***/ |
| 18 | |
| 19 | struct PDU; |
| 20 | |
| 21 | /*** <<< TYPE-DECLS [PDU] >>> ***/ |
| 22 | |
| 23 | typedef struct PDU { |
| 24 | struct many { |
| 25 | A_SEQUENCE_OF(struct PDU) list; |
| 26 | |
| 27 | /* Context for parsing across buffer boundaries */ |
| 28 | asn_struct_ctx_t _asn_ctx; |
| 29 | } *many; |
| 30 | IA5String_t *ia5 /* OPTIONAL */; |
| 31 | IA5String_t *ia5_c /* OPTIONAL */; |
| 32 | IA5String_t *ia5_ce /* OPTIONAL */; |
| 33 | IA5String_t *ia5_ir /* OPTIONAL */; |
| 34 | VisibleString_t *vs /* OPTIONAL */; |
| 35 | VisibleString_t *vs_c /* OPTIONAL */; |
| 36 | VisibleString_t *vs_ce /* OPTIONAL */; |
| 37 | VisibleString_t *vs_ir /* OPTIONAL */; |
| 38 | PrintableString_t *pr /* OPTIONAL */; |
| 39 | PrintableString_t *pr_c /* OPTIONAL */; |
| 40 | PrintableString_t *pr_ir /* OPTIONAL */; |
| 41 | NumericString_t *ns /* OPTIONAL */; |
| 42 | NumericString_t *ns_c /* OPTIONAL */; |
| 43 | NumericString_t *ns_ce /* OPTIONAL */; |
| 44 | NumericString_t *ns_ir /* OPTIONAL */; |
| 45 | UTF8String_t *ut_c /* OPTIONAL */; |
| 46 | UTF8String_t *ut_ce /* OPTIONAL */; |
| 47 | UTF8String_t *ut_ir /* OPTIONAL */; |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 48 | BMPString_t *bm /* OPTIONAL */; |
| 49 | BMPString_t *bm_c /* OPTIONAL */; |
| 50 | BMPString_t *bm_cs /* OPTIONAL */; |
| 51 | BMPString_t *bm_ce /* OPTIONAL */; |
| 52 | BMPString_t *bm_ir /* OPTIONAL */; |
| 53 | UniversalString_t *us /* OPTIONAL */; |
| 54 | UniversalString_t *us_c /* OPTIONAL */; |
| 55 | UniversalString_t *us_cs /* OPTIONAL */; |
| 56 | UniversalString_t *us_ce /* OPTIONAL */; |
| 57 | UniversalString_t *us_ir /* OPTIONAL */; |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 58 | double *real /* OPTIONAL */; |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 59 | OBJECT_IDENTIFIER_t *oid /* OPTIONAL */; |
| 60 | |
| 61 | /* Context for parsing across buffer boundaries */ |
| 62 | asn_struct_ctx_t _asn_ctx; |
| 63 | } PDU_t; |
| 64 | |
| 65 | /*** <<< FUNC-DECLS [PDU] >>> ***/ |
| 66 | |
| 67 | extern asn_TYPE_descriptor_t asn_DEF_PDU; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 68 | extern asn_SEQUENCE_specifics_t asn_SPC_PDU_specs_1; |
| 69 | extern asn_TYPE_member_t asn_MBR_PDU_1[31]; |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 70 | |
| 71 | /*** <<< POST-INCLUDE [PDU] >>> ***/ |
| 72 | |
| 73 | #include "PDU.h" |
| 74 | |
| 75 | /*** <<< CTABLES [PDU] >>> ***/ |
| 76 | |
| 77 | static int check_permitted_alphabet_5(const void *sptr) { |
| 78 | /* The underlying type is IA5String */ |
| 79 | const IA5String_t *st = (const IA5String_t *)sptr; |
| 80 | const uint8_t *ch = st->buf; |
| 81 | const uint8_t *end = ch + st->size; |
| 82 | |
| 83 | for(; ch < end; ch++) { |
| 84 | uint8_t cv = *ch; |
| 85 | if(!(cv >= 65 && cv <= 90)) return -1; |
| 86 | } |
| 87 | return 0; |
| 88 | } |
| 89 | |
| 90 | static int check_permitted_alphabet_6(const void *sptr) { |
| 91 | /* The underlying type is IA5String */ |
| 92 | const IA5String_t *st = (const IA5String_t *)sptr; |
| 93 | const uint8_t *ch = st->buf; |
| 94 | const uint8_t *end = ch + st->size; |
| 95 | |
| 96 | for(; ch < end; ch++) { |
| 97 | uint8_t cv = *ch; |
| 98 | if(!(cv >= 65 && cv <= 90)) return -1; |
| 99 | } |
| 100 | return 0; |
| 101 | } |
| 102 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 103 | static const int permitted_alphabet_table_7[256] = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 104 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 105 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 106 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 107 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 108 | 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* AB */ |
| 109 | 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 5, 0, 0, 0, 0, 0, /* XYZ */ |
| 110 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 111 | static const int permitted_alphabet_code2value_7[5] = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 112 | 65,66,88,89,90,}; |
| 113 | |
| 114 | |
| 115 | static int check_permitted_alphabet_7(const void *sptr) { |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 116 | const int *table = permitted_alphabet_table_7; |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 117 | /* The underlying type is IA5String */ |
| 118 | const IA5String_t *st = (const IA5String_t *)sptr; |
| 119 | const uint8_t *ch = st->buf; |
| 120 | const uint8_t *end = ch + st->size; |
| 121 | |
| 122 | for(; ch < end; ch++) { |
| 123 | uint8_t cv = *ch; |
| 124 | if(!table[cv]) return -1; |
| 125 | } |
| 126 | return 0; |
| 127 | } |
| 128 | |
| 129 | static int check_permitted_alphabet_9(const void *sptr) { |
| 130 | /* The underlying type is VisibleString */ |
| 131 | const VisibleString_t *st = (const VisibleString_t *)sptr; |
| 132 | const uint8_t *ch = st->buf; |
| 133 | const uint8_t *end = ch + st->size; |
| 134 | |
| 135 | for(; ch < end; ch++) { |
| 136 | uint8_t cv = *ch; |
| 137 | if(!(cv >= 65 && cv <= 90)) return -1; |
| 138 | } |
| 139 | return 0; |
| 140 | } |
| 141 | |
| 142 | static int check_permitted_alphabet_10(const void *sptr) { |
| 143 | /* The underlying type is VisibleString */ |
| 144 | const VisibleString_t *st = (const VisibleString_t *)sptr; |
| 145 | const uint8_t *ch = st->buf; |
| 146 | const uint8_t *end = ch + st->size; |
| 147 | |
| 148 | for(; ch < end; ch++) { |
| 149 | uint8_t cv = *ch; |
| 150 | if(!(cv >= 65 && cv <= 90)) return -1; |
| 151 | } |
| 152 | return 0; |
| 153 | } |
| 154 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 155 | static const int permitted_alphabet_table_11[256] = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 156 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 157 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 158 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 159 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 160 | 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* AB */ |
| 161 | 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 5, 0, 0, 0, 0, 0, /* XYZ */ |
| 162 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 163 | static const int permitted_alphabet_code2value_11[5] = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 164 | 65,66,88,89,90,}; |
| 165 | |
| 166 | |
| 167 | static int check_permitted_alphabet_11(const void *sptr) { |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 168 | const int *table = permitted_alphabet_table_11; |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 169 | /* The underlying type is VisibleString */ |
| 170 | const VisibleString_t *st = (const VisibleString_t *)sptr; |
| 171 | const uint8_t *ch = st->buf; |
| 172 | const uint8_t *end = ch + st->size; |
| 173 | |
| 174 | for(; ch < end; ch++) { |
| 175 | uint8_t cv = *ch; |
| 176 | if(!table[cv]) return -1; |
| 177 | } |
| 178 | return 0; |
| 179 | } |
| 180 | |
| 181 | static int check_permitted_alphabet_13(const void *sptr) { |
| 182 | /* The underlying type is PrintableString */ |
| 183 | const PrintableString_t *st = (const PrintableString_t *)sptr; |
| 184 | const uint8_t *ch = st->buf; |
| 185 | const uint8_t *end = ch + st->size; |
| 186 | |
| 187 | for(; ch < end; ch++) { |
| 188 | uint8_t cv = *ch; |
| 189 | if(!(cv >= 65 && cv <= 90)) return -1; |
| 190 | } |
| 191 | return 0; |
| 192 | } |
| 193 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 194 | static const int permitted_alphabet_table_14[256] = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 195 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 196 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 197 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 198 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 199 | 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* AB */ |
| 200 | 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 5, 0, 0, 0, 0, 0, /* XYZ */ |
| 201 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 202 | static const int permitted_alphabet_code2value_14[5] = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 203 | 65,66,88,89,90,}; |
| 204 | |
| 205 | |
| 206 | static int check_permitted_alphabet_14(const void *sptr) { |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 207 | const int *table = permitted_alphabet_table_14; |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 208 | /* The underlying type is PrintableString */ |
| 209 | const PrintableString_t *st = (const PrintableString_t *)sptr; |
| 210 | const uint8_t *ch = st->buf; |
| 211 | const uint8_t *end = ch + st->size; |
| 212 | |
| 213 | for(; ch < end; ch++) { |
| 214 | uint8_t cv = *ch; |
| 215 | if(!table[cv]) return -1; |
| 216 | } |
| 217 | return 0; |
| 218 | } |
| 219 | |
| 220 | static int check_permitted_alphabet_16(const void *sptr) { |
| 221 | /* The underlying type is NumericString */ |
| 222 | const NumericString_t *st = (const NumericString_t *)sptr; |
| 223 | const uint8_t *ch = st->buf; |
| 224 | const uint8_t *end = ch + st->size; |
| 225 | |
| 226 | for(; ch < end; ch++) { |
| 227 | uint8_t cv = *ch; |
| 228 | if(!(cv >= 53 && cv <= 57)) return -1; |
| 229 | } |
| 230 | return 0; |
| 231 | } |
| 232 | |
| 233 | static int check_permitted_alphabet_17(const void *sptr) { |
| 234 | /* The underlying type is NumericString */ |
| 235 | const NumericString_t *st = (const NumericString_t *)sptr; |
| 236 | const uint8_t *ch = st->buf; |
| 237 | const uint8_t *end = ch + st->size; |
| 238 | |
| 239 | for(; ch < end; ch++) { |
| 240 | uint8_t cv = *ch; |
| 241 | if(!(cv >= 53 && cv <= 57)) return -1; |
| 242 | } |
| 243 | return 0; |
| 244 | } |
| 245 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 246 | static const int permitted_alphabet_table_18[256] = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 247 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 248 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 249 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 250 | 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, /* 1 9 */ |
| 251 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 252 | static const int permitted_alphabet_code2value_18[2] = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 253 | 49,57,}; |
| 254 | |
| 255 | |
| 256 | static int check_permitted_alphabet_18(const void *sptr) { |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 257 | const int *table = permitted_alphabet_table_18; |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 258 | /* The underlying type is NumericString */ |
| 259 | const NumericString_t *st = (const NumericString_t *)sptr; |
| 260 | const uint8_t *ch = st->buf; |
| 261 | const uint8_t *end = ch + st->size; |
| 262 | |
| 263 | for(; ch < end; ch++) { |
| 264 | uint8_t cv = *ch; |
| 265 | if(!table[cv]) return -1; |
| 266 | } |
| 267 | return 0; |
| 268 | } |
| 269 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 270 | static const int permitted_alphabet_table_21[128] = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 271 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 272 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 273 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 274 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 275 | 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* A */ |
| 276 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, /* Z */ |
| 277 | }; |
| 278 | |
| 279 | static int check_permitted_alphabet_21(const void *sptr) { |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 280 | const int *table = permitted_alphabet_table_21; |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 281 | /* The underlying type is UTF8String */ |
| 282 | const UTF8String_t *st = (const UTF8String_t *)sptr; |
| 283 | const uint8_t *ch = st->buf; |
| 284 | const uint8_t *end = ch + st->size; |
| 285 | |
| 286 | for(; ch < end; ch++) { |
| 287 | uint8_t cv = *ch; |
| 288 | if(cv >= 0x80) return -1; |
| 289 | if(!table[cv]) return -1; |
| 290 | } |
| 291 | return 0; |
| 292 | } |
| 293 | |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 294 | static int check_permitted_alphabet_23(const void *sptr) { |
| 295 | /* The underlying type is BMPString */ |
| 296 | const BMPString_t *st = (const BMPString_t *)sptr; |
| 297 | const uint8_t *ch = st->buf; |
| 298 | const uint8_t *end = ch + st->size; |
| 299 | |
| 300 | if(st->size % 2) return -1; /* (size%2)! */ |
| 301 | for(; ch < end; ch += 2) { |
| 302 | uint16_t cv = (ch[0] << 8) |
| 303 | | ch[1]; |
| 304 | if(!(cv >= 65 && cv <= 90)) return -1; |
| 305 | } |
| 306 | return 0; |
| 307 | } |
| 308 | |
| 309 | static int check_permitted_alphabet_24(const void *sptr) { |
| 310 | /* The underlying type is BMPString */ |
| 311 | const BMPString_t *st = (const BMPString_t *)sptr; |
| 312 | const uint8_t *ch = st->buf; |
| 313 | const uint8_t *end = ch + st->size; |
| 314 | |
| 315 | if(st->size % 2) return -1; /* (size%2)! */ |
| 316 | for(; ch < end; ch += 2) { |
| 317 | uint16_t cv = (ch[0] << 8) |
| 318 | | ch[1]; |
| 319 | if(!(cv <= 65533)) return -1; |
| 320 | } |
| 321 | return 0; |
| 322 | } |
| 323 | |
| 324 | static int check_permitted_alphabet_25(const void *sptr) { |
| 325 | /* The underlying type is BMPString */ |
| 326 | const BMPString_t *st = (const BMPString_t *)sptr; |
| 327 | const uint8_t *ch = st->buf; |
| 328 | const uint8_t *end = ch + st->size; |
| 329 | |
| 330 | if(st->size % 2) return -1; /* (size%2)! */ |
| 331 | for(; ch < end; ch += 2) { |
| 332 | uint16_t cv = (ch[0] << 8) |
| 333 | | ch[1]; |
| 334 | if(!(cv >= 65 && cv <= 90)) return -1; |
| 335 | } |
| 336 | return 0; |
| 337 | } |
| 338 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 339 | static const int permitted_alphabet_table_26[256] = { |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 340 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 341 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 342 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 343 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 344 | 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* AB */ |
| 345 | 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 5, 0, 0, 0, 0, 0, /* XYZ */ |
| 346 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 347 | static const int permitted_alphabet_code2value_26[5] = { |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 348 | 65,66,88,89,90,}; |
| 349 | |
| 350 | |
| 351 | static int check_permitted_alphabet_26(const void *sptr) { |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 352 | const int *table = permitted_alphabet_table_26; |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 353 | /* The underlying type is BMPString */ |
| 354 | const BMPString_t *st = (const BMPString_t *)sptr; |
| 355 | const uint8_t *ch = st->buf; |
| 356 | const uint8_t *end = ch + st->size; |
| 357 | |
| 358 | if(st->size % 2) return -1; /* (size%2)! */ |
| 359 | for(; ch < end; ch += 2) { |
| 360 | uint16_t cv = (ch[0] << 8) |
| 361 | | ch[1]; |
| 362 | if(cv > 255) return -1; |
| 363 | if(!table[cv]) return -1; |
| 364 | } |
| 365 | return 0; |
| 366 | } |
| 367 | |
| 368 | static int check_permitted_alphabet_28(const void *sptr) { |
| 369 | /* The underlying type is UniversalString */ |
| 370 | const UniversalString_t *st = (const UniversalString_t *)sptr; |
| 371 | const uint8_t *ch = st->buf; |
| 372 | const uint8_t *end = ch + st->size; |
| 373 | |
| 374 | if(st->size % 4) return -1; /* (size%4)! */ |
| 375 | for(; ch < end; ch += 4) { |
| 376 | uint32_t cv = (ch[0] << 24) |
| 377 | | (ch[1] << 16) |
| 378 | | (ch[2] << 8) |
| 379 | | ch[3]; |
| 380 | if(!(cv >= 65 && cv <= 90)) return -1; |
| 381 | } |
| 382 | return 0; |
| 383 | } |
| 384 | |
| 385 | static int check_permitted_alphabet_29(const void *sptr) { |
| 386 | /* The underlying type is UniversalString */ |
| 387 | const UniversalString_t *st = (const UniversalString_t *)sptr; |
| 388 | const uint8_t *ch = st->buf; |
| 389 | const uint8_t *end = ch + st->size; |
| 390 | |
| 391 | if(st->size % 4) return -1; /* (size%4)! */ |
| 392 | for(; ch < end; ch += 4) { |
| 393 | uint32_t cv = (ch[0] << 24) |
| 394 | | (ch[1] << 16) |
| 395 | | (ch[2] << 8) |
| 396 | | ch[3]; |
| 397 | if(!(1 /* Constraint matches natural range of cv */)) return -1; |
| 398 | } |
| 399 | return 0; |
| 400 | } |
| 401 | |
| 402 | static int check_permitted_alphabet_30(const void *sptr) { |
| 403 | /* The underlying type is UniversalString */ |
| 404 | const UniversalString_t *st = (const UniversalString_t *)sptr; |
| 405 | const uint8_t *ch = st->buf; |
| 406 | const uint8_t *end = ch + st->size; |
| 407 | |
| 408 | if(st->size % 4) return -1; /* (size%4)! */ |
| 409 | for(; ch < end; ch += 4) { |
| 410 | uint32_t cv = (ch[0] << 24) |
| 411 | | (ch[1] << 16) |
| 412 | | (ch[2] << 8) |
| 413 | | ch[3]; |
| 414 | if(!(cv >= 65 && cv <= 90)) return -1; |
| 415 | } |
| 416 | return 0; |
| 417 | } |
| 418 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 419 | static const int permitted_alphabet_table_31[256] = { |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 420 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 421 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 422 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 423 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ |
| 424 | 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* AB */ |
| 425 | 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 5, 0, 0, 0, 0, 0, /* XYZ */ |
| 426 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 427 | static const int permitted_alphabet_code2value_31[5] = { |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 428 | 65,66,88,89,90,}; |
| 429 | |
| 430 | |
| 431 | static int check_permitted_alphabet_31(const void *sptr) { |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 432 | const int *table = permitted_alphabet_table_31; |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 433 | /* The underlying type is UniversalString */ |
| 434 | const UniversalString_t *st = (const UniversalString_t *)sptr; |
| 435 | const uint8_t *ch = st->buf; |
| 436 | const uint8_t *end = ch + st->size; |
| 437 | |
| 438 | if(st->size % 4) return -1; /* (size%4)! */ |
| 439 | for(; ch < end; ch += 4) { |
| 440 | uint32_t cv = (ch[0] << 24) |
| 441 | | (ch[1] << 16) |
| 442 | | (ch[2] << 8) |
| 443 | | ch[3]; |
| 444 | if(cv > 255) return -1; |
| 445 | if(!table[cv]) return -1; |
| 446 | } |
| 447 | return 0; |
| 448 | } |
| 449 | |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 450 | |
| 451 | /*** <<< CODE [PDU] >>> ***/ |
| 452 | |
| 453 | static int |
| 454 | memb_ia5_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 455 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 456 | const IA5String_t *st = (const IA5String_t *)sptr; |
| 457 | |
| 458 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 459 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 460 | "%s: value not given (%s:%d)", |
| 461 | td->name, __FILE__, __LINE__); |
| 462 | return -1; |
| 463 | } |
| 464 | |
| 465 | |
| 466 | if(!check_permitted_alphabet_5(st)) { |
| 467 | /* Constraint check succeeded */ |
| 468 | return 0; |
| 469 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 470 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 471 | "%s: constraint failed (%s:%d)", |
| 472 | td->name, __FILE__, __LINE__); |
| 473 | return -1; |
| 474 | } |
| 475 | } |
| 476 | |
| 477 | static int |
| 478 | memb_ia5_ce_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 479 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 480 | const IA5String_t *st = (const IA5String_t *)sptr; |
| 481 | |
| 482 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 483 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 484 | "%s: value not given (%s:%d)", |
| 485 | td->name, __FILE__, __LINE__); |
| 486 | return -1; |
| 487 | } |
| 488 | |
| 489 | |
| 490 | if(!check_permitted_alphabet_6(st)) { |
| 491 | /* Constraint check succeeded */ |
| 492 | return 0; |
| 493 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 494 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 495 | "%s: constraint failed (%s:%d)", |
| 496 | td->name, __FILE__, __LINE__); |
| 497 | return -1; |
| 498 | } |
| 499 | } |
| 500 | |
| 501 | static int |
| 502 | memb_ia5_ir_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 503 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 504 | const IA5String_t *st = (const IA5String_t *)sptr; |
| 505 | |
| 506 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 507 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 508 | "%s: value not given (%s:%d)", |
| 509 | td->name, __FILE__, __LINE__); |
| 510 | return -1; |
| 511 | } |
| 512 | |
| 513 | |
| 514 | if(!check_permitted_alphabet_7(st)) { |
| 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 | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 519 | "%s: constraint failed (%s:%d)", |
| 520 | td->name, __FILE__, __LINE__); |
| 521 | return -1; |
| 522 | } |
| 523 | } |
| 524 | |
| 525 | static int asn_PER_MAP_ia5_ir_7_v2c(unsigned int value) { |
| 526 | if(value >= sizeof(permitted_alphabet_table_7)/sizeof(permitted_alphabet_table_7[0])) |
| 527 | return -1; |
| 528 | return permitted_alphabet_table_7[value] - 1; |
| 529 | } |
| 530 | static int asn_PER_MAP_ia5_ir_7_c2v(unsigned int code) { |
| 531 | if(code >= sizeof(permitted_alphabet_code2value_7)/sizeof(permitted_alphabet_code2value_7[0])) |
| 532 | return -1; |
| 533 | return permitted_alphabet_code2value_7[code]; |
| 534 | } |
| 535 | static int |
| 536 | memb_vs_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 537 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 538 | const VisibleString_t *st = (const VisibleString_t *)sptr; |
| 539 | |
| 540 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 541 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 542 | "%s: value not given (%s:%d)", |
| 543 | td->name, __FILE__, __LINE__); |
| 544 | return -1; |
| 545 | } |
| 546 | |
| 547 | |
| 548 | if(!check_permitted_alphabet_9(st)) { |
| 549 | /* Constraint check succeeded */ |
| 550 | return 0; |
| 551 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 552 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 553 | "%s: constraint failed (%s:%d)", |
| 554 | td->name, __FILE__, __LINE__); |
| 555 | return -1; |
| 556 | } |
| 557 | } |
| 558 | |
| 559 | static int |
| 560 | memb_vs_ce_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 561 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 562 | const VisibleString_t *st = (const VisibleString_t *)sptr; |
| 563 | |
| 564 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 565 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 566 | "%s: value not given (%s:%d)", |
| 567 | td->name, __FILE__, __LINE__); |
| 568 | return -1; |
| 569 | } |
| 570 | |
| 571 | |
| 572 | if(!check_permitted_alphabet_10(st)) { |
| 573 | /* Constraint check succeeded */ |
| 574 | return 0; |
| 575 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 576 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 577 | "%s: constraint failed (%s:%d)", |
| 578 | td->name, __FILE__, __LINE__); |
| 579 | return -1; |
| 580 | } |
| 581 | } |
| 582 | |
| 583 | static int |
| 584 | memb_vs_ir_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 585 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 586 | const VisibleString_t *st = (const VisibleString_t *)sptr; |
| 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 | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 590 | "%s: value not given (%s:%d)", |
| 591 | td->name, __FILE__, __LINE__); |
| 592 | return -1; |
| 593 | } |
| 594 | |
| 595 | |
| 596 | if(!check_permitted_alphabet_11(st)) { |
| 597 | /* Constraint check succeeded */ |
| 598 | return 0; |
| 599 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 600 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 601 | "%s: constraint failed (%s:%d)", |
| 602 | td->name, __FILE__, __LINE__); |
| 603 | return -1; |
| 604 | } |
| 605 | } |
| 606 | |
| 607 | static int asn_PER_MAP_vs_ir_11_v2c(unsigned int value) { |
| 608 | if(value >= sizeof(permitted_alphabet_table_11)/sizeof(permitted_alphabet_table_11[0])) |
| 609 | return -1; |
| 610 | return permitted_alphabet_table_11[value] - 1; |
| 611 | } |
| 612 | static int asn_PER_MAP_vs_ir_11_c2v(unsigned int code) { |
| 613 | if(code >= sizeof(permitted_alphabet_code2value_11)/sizeof(permitted_alphabet_code2value_11[0])) |
| 614 | return -1; |
| 615 | return permitted_alphabet_code2value_11[code]; |
| 616 | } |
| 617 | static int |
| 618 | memb_pr_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 619 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 620 | const PrintableString_t *st = (const PrintableString_t *)sptr; |
| 621 | |
| 622 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 623 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 624 | "%s: value not given (%s:%d)", |
| 625 | td->name, __FILE__, __LINE__); |
| 626 | return -1; |
| 627 | } |
| 628 | |
| 629 | |
| 630 | if(!check_permitted_alphabet_13(st)) { |
| 631 | /* Constraint check succeeded */ |
| 632 | return 0; |
| 633 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 634 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 635 | "%s: constraint failed (%s:%d)", |
| 636 | td->name, __FILE__, __LINE__); |
| 637 | return -1; |
| 638 | } |
| 639 | } |
| 640 | |
| 641 | static int |
| 642 | memb_pr_ir_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 643 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 644 | const PrintableString_t *st = (const PrintableString_t *)sptr; |
| 645 | |
| 646 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 647 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 648 | "%s: value not given (%s:%d)", |
| 649 | td->name, __FILE__, __LINE__); |
| 650 | return -1; |
| 651 | } |
| 652 | |
| 653 | |
| 654 | if(!check_permitted_alphabet_14(st)) { |
| 655 | /* Constraint check succeeded */ |
| 656 | return 0; |
| 657 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 658 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 659 | "%s: constraint failed (%s:%d)", |
| 660 | td->name, __FILE__, __LINE__); |
| 661 | return -1; |
| 662 | } |
| 663 | } |
| 664 | |
| 665 | static int asn_PER_MAP_pr_ir_14_v2c(unsigned int value) { |
| 666 | if(value >= sizeof(permitted_alphabet_table_14)/sizeof(permitted_alphabet_table_14[0])) |
| 667 | return -1; |
| 668 | return permitted_alphabet_table_14[value] - 1; |
| 669 | } |
| 670 | static int asn_PER_MAP_pr_ir_14_c2v(unsigned int code) { |
| 671 | if(code >= sizeof(permitted_alphabet_code2value_14)/sizeof(permitted_alphabet_code2value_14[0])) |
| 672 | return -1; |
| 673 | return permitted_alphabet_code2value_14[code]; |
| 674 | } |
| 675 | static int |
| 676 | memb_ns_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 677 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 678 | const NumericString_t *st = (const NumericString_t *)sptr; |
| 679 | |
| 680 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 681 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 682 | "%s: value not given (%s:%d)", |
| 683 | td->name, __FILE__, __LINE__); |
| 684 | return -1; |
| 685 | } |
| 686 | |
| 687 | |
| 688 | if(!check_permitted_alphabet_16(st)) { |
| 689 | /* Constraint check succeeded */ |
| 690 | return 0; |
| 691 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 692 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 693 | "%s: constraint failed (%s:%d)", |
| 694 | td->name, __FILE__, __LINE__); |
| 695 | return -1; |
| 696 | } |
| 697 | } |
| 698 | |
| 699 | static int |
| 700 | memb_ns_ce_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 701 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 702 | const NumericString_t *st = (const NumericString_t *)sptr; |
| 703 | |
| 704 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 705 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 706 | "%s: value not given (%s:%d)", |
| 707 | td->name, __FILE__, __LINE__); |
| 708 | return -1; |
| 709 | } |
| 710 | |
| 711 | |
| 712 | if(!check_permitted_alphabet_17(st)) { |
| 713 | /* Constraint check succeeded */ |
| 714 | return 0; |
| 715 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 716 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 717 | "%s: constraint failed (%s:%d)", |
| 718 | td->name, __FILE__, __LINE__); |
| 719 | return -1; |
| 720 | } |
| 721 | } |
| 722 | |
| 723 | static int |
| 724 | memb_ns_ir_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 725 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 726 | const NumericString_t *st = (const NumericString_t *)sptr; |
| 727 | |
| 728 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 729 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 730 | "%s: value not given (%s:%d)", |
| 731 | td->name, __FILE__, __LINE__); |
| 732 | return -1; |
| 733 | } |
| 734 | |
| 735 | |
| 736 | if(!check_permitted_alphabet_18(st)) { |
| 737 | /* Constraint check succeeded */ |
| 738 | return 0; |
| 739 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 740 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 741 | "%s: constraint failed (%s:%d)", |
| 742 | td->name, __FILE__, __LINE__); |
| 743 | return -1; |
| 744 | } |
| 745 | } |
| 746 | |
| 747 | static int asn_PER_MAP_ns_ir_18_v2c(unsigned int value) { |
| 748 | if(value >= sizeof(permitted_alphabet_table_18)/sizeof(permitted_alphabet_table_18[0])) |
| 749 | return -1; |
| 750 | return permitted_alphabet_table_18[value] - 1; |
| 751 | } |
| 752 | static int asn_PER_MAP_ns_ir_18_c2v(unsigned int code) { |
| 753 | if(code >= sizeof(permitted_alphabet_code2value_18)/sizeof(permitted_alphabet_code2value_18[0])) |
| 754 | return -1; |
| 755 | return permitted_alphabet_code2value_18[code]; |
| 756 | } |
| 757 | static int |
| 758 | memb_ut_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 759 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 760 | const UTF8String_t *st = (const UTF8String_t *)sptr; |
| 761 | size_t size; |
| 762 | |
| 763 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 764 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 765 | "%s: value not given (%s:%d)", |
| 766 | td->name, __FILE__, __LINE__); |
| 767 | return -1; |
| 768 | } |
| 769 | |
| 770 | size = UTF8String_length(st); |
| 771 | if((ssize_t)size < 0) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 772 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 773 | "%s: UTF-8: broken encoding (%s:%d)", |
| 774 | td->name, __FILE__, __LINE__); |
| 775 | return -1; |
| 776 | } |
| 777 | |
| 778 | if((size == 6)) { |
| 779 | /* Constraint check succeeded */ |
| 780 | return 0; |
| 781 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 782 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 783 | "%s: constraint failed (%s:%d)", |
| 784 | td->name, __FILE__, __LINE__); |
| 785 | return -1; |
| 786 | } |
| 787 | } |
| 788 | |
| 789 | static int |
| 790 | memb_ut_ce_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 791 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 792 | const UTF8String_t *st = (const UTF8String_t *)sptr; |
| 793 | size_t size; |
| 794 | |
| 795 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 796 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 797 | "%s: value not given (%s:%d)", |
| 798 | td->name, __FILE__, __LINE__); |
| 799 | return -1; |
| 800 | } |
| 801 | |
| 802 | size = UTF8String_length(st); |
| 803 | if((ssize_t)size < 0) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 804 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 805 | "%s: UTF-8: broken encoding (%s:%d)", |
| 806 | td->name, __FILE__, __LINE__); |
| 807 | return -1; |
| 808 | } |
| 809 | |
| 810 | if((size == 6)) { |
| 811 | /* Constraint check succeeded */ |
| 812 | return 0; |
| 813 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 814 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 815 | "%s: constraint failed (%s:%d)", |
| 816 | td->name, __FILE__, __LINE__); |
| 817 | return -1; |
| 818 | } |
| 819 | } |
| 820 | |
| 821 | static int |
| 822 | memb_ut_ir_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 823 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 824 | const UTF8String_t *st = (const UTF8String_t *)sptr; |
| 825 | |
| 826 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 827 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 828 | "%s: value not given (%s:%d)", |
| 829 | td->name, __FILE__, __LINE__); |
| 830 | return -1; |
| 831 | } |
| 832 | |
| 833 | |
| 834 | if(!check_permitted_alphabet_21(st)) { |
| 835 | /* Constraint check succeeded */ |
| 836 | return 0; |
| 837 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 838 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 839 | "%s: constraint failed (%s:%d)", |
| 840 | td->name, __FILE__, __LINE__); |
| 841 | return -1; |
| 842 | } |
| 843 | } |
| 844 | |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 845 | static int |
| 846 | memb_bm_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 847 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 848 | const BMPString_t *st = (const BMPString_t *)sptr; |
| 849 | |
| 850 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 851 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 852 | "%s: value not given (%s:%d)", |
| 853 | td->name, __FILE__, __LINE__); |
| 854 | return -1; |
| 855 | } |
| 856 | |
| 857 | |
| 858 | if(!check_permitted_alphabet_23(st)) { |
| 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 | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 863 | "%s: constraint failed (%s:%d)", |
| 864 | td->name, __FILE__, __LINE__); |
| 865 | return -1; |
| 866 | } |
| 867 | } |
| 868 | |
| 869 | static int |
| 870 | memb_bm_cs_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 871 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 872 | const BMPString_t *st = (const BMPString_t *)sptr; |
| 873 | size_t size; |
| 874 | |
| 875 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 876 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 877 | "%s: value not given (%s:%d)", |
| 878 | td->name, __FILE__, __LINE__); |
| 879 | return -1; |
| 880 | } |
| 881 | |
| 882 | size = st->size >> 1; /* 2 byte per character */ |
| 883 | |
| 884 | if((size == 6) |
| 885 | && !check_permitted_alphabet_24(st)) { |
| 886 | /* Constraint check succeeded */ |
| 887 | return 0; |
| 888 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 889 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 890 | "%s: constraint failed (%s:%d)", |
| 891 | td->name, __FILE__, __LINE__); |
| 892 | return -1; |
| 893 | } |
| 894 | } |
| 895 | |
| 896 | static int |
| 897 | memb_bm_ce_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 898 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 899 | const BMPString_t *st = (const BMPString_t *)sptr; |
| 900 | |
| 901 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 902 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 903 | "%s: value not given (%s:%d)", |
| 904 | td->name, __FILE__, __LINE__); |
| 905 | return -1; |
| 906 | } |
| 907 | |
| 908 | |
| 909 | if(!check_permitted_alphabet_25(st)) { |
| 910 | /* Constraint check succeeded */ |
| 911 | return 0; |
| 912 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 913 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 914 | "%s: constraint failed (%s:%d)", |
| 915 | td->name, __FILE__, __LINE__); |
| 916 | return -1; |
| 917 | } |
| 918 | } |
| 919 | |
| 920 | static int |
| 921 | memb_bm_ir_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 922 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 923 | const BMPString_t *st = (const BMPString_t *)sptr; |
| 924 | |
| 925 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 926 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 927 | "%s: value not given (%s:%d)", |
| 928 | td->name, __FILE__, __LINE__); |
| 929 | return -1; |
| 930 | } |
| 931 | |
| 932 | |
| 933 | if(!check_permitted_alphabet_26(st)) { |
| 934 | /* Constraint check succeeded */ |
| 935 | return 0; |
| 936 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 937 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 938 | "%s: constraint failed (%s:%d)", |
| 939 | td->name, __FILE__, __LINE__); |
| 940 | return -1; |
| 941 | } |
| 942 | } |
| 943 | |
| 944 | static int asn_PER_MAP_bm_ir_26_v2c(unsigned int value) { |
| 945 | if(value >= sizeof(permitted_alphabet_table_26)/sizeof(permitted_alphabet_table_26[0])) |
| 946 | return -1; |
| 947 | return permitted_alphabet_table_26[value] - 1; |
| 948 | } |
| 949 | static int asn_PER_MAP_bm_ir_26_c2v(unsigned int code) { |
| 950 | if(code >= sizeof(permitted_alphabet_code2value_26)/sizeof(permitted_alphabet_code2value_26[0])) |
| 951 | return -1; |
| 952 | return permitted_alphabet_code2value_26[code]; |
| 953 | } |
| 954 | static int |
| 955 | memb_us_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 956 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 957 | const UniversalString_t *st = (const UniversalString_t *)sptr; |
| 958 | |
| 959 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 960 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 961 | "%s: value not given (%s:%d)", |
| 962 | td->name, __FILE__, __LINE__); |
| 963 | return -1; |
| 964 | } |
| 965 | |
| 966 | |
| 967 | if(!check_permitted_alphabet_28(st)) { |
| 968 | /* Constraint check succeeded */ |
| 969 | return 0; |
| 970 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 971 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 972 | "%s: constraint failed (%s:%d)", |
| 973 | td->name, __FILE__, __LINE__); |
| 974 | return -1; |
| 975 | } |
| 976 | } |
| 977 | |
| 978 | static int |
| 979 | memb_us_cs_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 980 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 981 | const UniversalString_t *st = (const UniversalString_t *)sptr; |
| 982 | size_t size; |
| 983 | |
| 984 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 985 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 986 | "%s: value not given (%s:%d)", |
| 987 | td->name, __FILE__, __LINE__); |
| 988 | return -1; |
| 989 | } |
| 990 | |
| 991 | size = st->size >> 2; /* 4 byte per character */ |
| 992 | |
| 993 | if((size == 6) |
| 994 | && !check_permitted_alphabet_29(st)) { |
| 995 | /* Constraint check succeeded */ |
| 996 | return 0; |
| 997 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 998 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 999 | "%s: constraint failed (%s:%d)", |
| 1000 | td->name, __FILE__, __LINE__); |
| 1001 | return -1; |
| 1002 | } |
| 1003 | } |
| 1004 | |
| 1005 | static int |
| 1006 | memb_us_ce_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 1007 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 1008 | const UniversalString_t *st = (const UniversalString_t *)sptr; |
| 1009 | |
| 1010 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 1011 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1012 | "%s: value not given (%s:%d)", |
| 1013 | td->name, __FILE__, __LINE__); |
| 1014 | return -1; |
| 1015 | } |
| 1016 | |
| 1017 | |
| 1018 | if(!check_permitted_alphabet_30(st)) { |
| 1019 | /* Constraint check succeeded */ |
| 1020 | return 0; |
| 1021 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 1022 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1023 | "%s: constraint failed (%s:%d)", |
| 1024 | td->name, __FILE__, __LINE__); |
| 1025 | return -1; |
| 1026 | } |
| 1027 | } |
| 1028 | |
| 1029 | static int |
| 1030 | memb_us_ir_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 1031 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 1032 | const UniversalString_t *st = (const UniversalString_t *)sptr; |
| 1033 | |
| 1034 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 1035 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1036 | "%s: value not given (%s:%d)", |
| 1037 | td->name, __FILE__, __LINE__); |
| 1038 | return -1; |
| 1039 | } |
| 1040 | |
| 1041 | |
| 1042 | if(!check_permitted_alphabet_31(st)) { |
| 1043 | /* Constraint check succeeded */ |
| 1044 | return 0; |
| 1045 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 1046 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1047 | "%s: constraint failed (%s:%d)", |
| 1048 | td->name, __FILE__, __LINE__); |
| 1049 | return -1; |
| 1050 | } |
| 1051 | } |
| 1052 | |
| 1053 | static int asn_PER_MAP_us_ir_31_v2c(unsigned int value) { |
| 1054 | if(value >= sizeof(permitted_alphabet_table_31)/sizeof(permitted_alphabet_table_31[0])) |
| 1055 | return -1; |
| 1056 | return permitted_alphabet_table_31[value] - 1; |
| 1057 | } |
| 1058 | static int asn_PER_MAP_us_ir_31_c2v(unsigned int code) { |
| 1059 | if(code >= sizeof(permitted_alphabet_code2value_31)/sizeof(permitted_alphabet_code2value_31[0])) |
| 1060 | return -1; |
| 1061 | return permitted_alphabet_code2value_31[code]; |
| 1062 | } |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1063 | |
| 1064 | /*** <<< CTDEFS [PDU] >>> ***/ |
| 1065 | |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 1066 | static asn_per_constraints_t asn_PER_memb_ia5_c_constr_5 GCC_NOTUSED = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1067 | { APC_CONSTRAINED, 5, 5, 65, 90 } /* (65..90) */, |
| 1068 | { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, |
| 1069 | 0, 0 /* No PER character map necessary */ |
| 1070 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 1071 | static asn_per_constraints_t asn_PER_memb_ia5_ce_constr_6 GCC_NOTUSED = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1072 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 1073 | { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, |
| 1074 | 0, 0 /* No PER character map necessary */ |
| 1075 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 1076 | static asn_per_constraints_t asn_PER_memb_ia5_ir_constr_7 GCC_NOTUSED = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1077 | { APC_CONSTRAINED, 3, 3, 65, 90 } /* (65..90) */, |
| 1078 | { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, |
| 1079 | asn_PER_MAP_ia5_ir_7_v2c, /* Value to PER code map */ |
| 1080 | asn_PER_MAP_ia5_ir_7_c2v /* PER code to value map */ |
| 1081 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 1082 | static asn_per_constraints_t asn_PER_memb_vs_c_constr_9 GCC_NOTUSED = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1083 | { APC_CONSTRAINED, 5, 5, 65, 90 } /* (65..90) */, |
| 1084 | { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, |
| 1085 | 0, 0 /* No PER character map necessary */ |
| 1086 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 1087 | static asn_per_constraints_t asn_PER_memb_vs_ce_constr_10 GCC_NOTUSED = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1088 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 1089 | { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, |
| 1090 | 0, 0 /* No PER character map necessary */ |
| 1091 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 1092 | static asn_per_constraints_t asn_PER_memb_vs_ir_constr_11 GCC_NOTUSED = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1093 | { APC_CONSTRAINED, 3, 3, 65, 90 } /* (65..90) */, |
| 1094 | { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, |
| 1095 | asn_PER_MAP_vs_ir_11_v2c, /* Value to PER code map */ |
| 1096 | asn_PER_MAP_vs_ir_11_c2v /* PER code to value map */ |
| 1097 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 1098 | static asn_per_constraints_t asn_PER_memb_pr_c_constr_13 GCC_NOTUSED = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1099 | { APC_CONSTRAINED, 5, 5, 65, 90 } /* (65..90) */, |
| 1100 | { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, |
| 1101 | 0, 0 /* No PER character map necessary */ |
| 1102 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 1103 | static asn_per_constraints_t asn_PER_memb_pr_ir_constr_14 GCC_NOTUSED = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1104 | { APC_CONSTRAINED, 3, 3, 65, 90 } /* (65..90) */, |
| 1105 | { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, |
| 1106 | asn_PER_MAP_pr_ir_14_v2c, /* Value to PER code map */ |
| 1107 | asn_PER_MAP_pr_ir_14_c2v /* PER code to value map */ |
| 1108 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 1109 | static asn_per_constraints_t asn_PER_memb_ns_c_constr_16 GCC_NOTUSED = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1110 | { APC_CONSTRAINED, 3, 3, 53, 57 } /* (53..57) */, |
| 1111 | { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, |
| 1112 | 0, 0 /* No PER character map necessary */ |
| 1113 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 1114 | static asn_per_constraints_t asn_PER_memb_ns_ce_constr_17 GCC_NOTUSED = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1115 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 1116 | { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, |
| 1117 | 0, 0 /* No PER character map necessary */ |
| 1118 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 1119 | static asn_per_constraints_t asn_PER_memb_ns_ir_constr_18 GCC_NOTUSED = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1120 | { APC_CONSTRAINED, 1, 1, 49, 57 } /* (49..57) */, |
| 1121 | { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, |
| 1122 | asn_PER_MAP_ns_ir_18_v2c, /* Value to PER code map */ |
| 1123 | asn_PER_MAP_ns_ir_18_c2v /* PER code to value map */ |
| 1124 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 1125 | static asn_per_constraints_t asn_PER_memb_ut_c_constr_19 GCC_NOTUSED = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1126 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 1127 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 1128 | 0, 0 /* No PER value map */ |
| 1129 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 1130 | static asn_per_constraints_t asn_PER_memb_ut_ce_constr_20 GCC_NOTUSED = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1131 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 1132 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 1133 | 0, 0 /* No PER value map */ |
| 1134 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 1135 | static asn_per_constraints_t asn_PER_memb_ut_ir_constr_21 GCC_NOTUSED = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1136 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 1137 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 1138 | 0, 0 /* No PER value map */ |
| 1139 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 1140 | static asn_per_constraints_t asn_PER_memb_bm_c_constr_23 GCC_NOTUSED = { |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1141 | { APC_CONSTRAINED, 5, 5, 65, 90 } /* (65..90) */, |
| 1142 | { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, |
| 1143 | 0, 0 /* No PER character map necessary */ |
| 1144 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 1145 | static asn_per_constraints_t asn_PER_memb_bm_cs_constr_24 GCC_NOTUSED = { |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1146 | { APC_CONSTRAINED, 16, 16, 0, 65533 } /* (0..65533) */, |
| 1147 | { APC_CONSTRAINED, 0, 0, 6, 6 } /* (SIZE(6..6)) */, |
| 1148 | 0, 0 /* No PER character map necessary */ |
| 1149 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 1150 | static asn_per_constraints_t asn_PER_memb_bm_ce_constr_25 GCC_NOTUSED = { |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1151 | { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, |
| 1152 | { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, |
| 1153 | 0, 0 /* No PER character map necessary */ |
| 1154 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 1155 | static asn_per_constraints_t asn_PER_memb_bm_ir_constr_26 GCC_NOTUSED = { |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1156 | { APC_CONSTRAINED, 3, 3, 65, 90 } /* (65..90) */, |
| 1157 | { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, |
| 1158 | asn_PER_MAP_bm_ir_26_v2c, /* Value to PER code map */ |
| 1159 | asn_PER_MAP_bm_ir_26_c2v /* PER code to value map */ |
| 1160 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 1161 | static asn_per_constraints_t asn_PER_memb_us_c_constr_28 GCC_NOTUSED = { |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1162 | { APC_CONSTRAINED, 5, 5, 65, 90 } /* (65..90) */, |
| 1163 | { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, |
| 1164 | 0, 0 /* No PER character map necessary */ |
| 1165 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 1166 | static asn_per_constraints_t asn_PER_memb_us_cs_constr_29 GCC_NOTUSED = { |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1167 | { APC_CONSTRAINED, 32, 32, 0, 2147483647 } /* (0..4294967295) */, |
| 1168 | { APC_CONSTRAINED, 0, 0, 6, 6 } /* (SIZE(6..6)) */, |
| 1169 | 0, 0 /* No PER character map necessary */ |
| 1170 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 1171 | static asn_per_constraints_t asn_PER_memb_us_ce_constr_30 GCC_NOTUSED = { |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1172 | { APC_CONSTRAINED, 32, 32, 0, 2147483647 } /* special case 1 */ |
| 1173 | , |
| 1174 | { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, |
| 1175 | 0, 0 /* No PER character map necessary */ |
| 1176 | }; |
Lev Walkin | 2fce55d | 2013-03-28 05:00:39 -0700 | [diff] [blame] | 1177 | static asn_per_constraints_t asn_PER_memb_us_ir_constr_31 GCC_NOTUSED = { |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1178 | { APC_CONSTRAINED, 3, 3, 65, 90 } /* (65..90) */, |
| 1179 | { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, |
| 1180 | asn_PER_MAP_us_ir_31_v2c, /* Value to PER code map */ |
| 1181 | asn_PER_MAP_us_ir_31_c2v /* PER code to value map */ |
| 1182 | }; |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1183 | |
| 1184 | /*** <<< STAT-DEFS [PDU] >>> ***/ |
| 1185 | |
| 1186 | static asn_TYPE_member_t asn_MBR_many_2[] = { |
| 1187 | { ATF_POINTER, 0, 0, |
| 1188 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 1189 | .tag_mode = 0, |
| 1190 | .type = &asn_DEF_PDU, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1191 | .type_selector = 0, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1192 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1193 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1194 | .per_constraints = 0, /* No PER visible constraints */ |
| 1195 | .default_value = 0, |
| 1196 | .name = "" |
| 1197 | }, |
| 1198 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 1199 | static const ber_tlv_tag_t asn_DEF_many_tags_2[] = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1200 | (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 1201 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 1202 | }; |
| 1203 | static asn_SET_OF_specifics_t asn_SPC_many_specs_2 = { |
| 1204 | sizeof(struct many), |
| 1205 | offsetof(struct many, _asn_ctx), |
| 1206 | 0, /* XER encoding is XMLDelimitedItemList */ |
| 1207 | }; |
| 1208 | static /* Use -fall-defs-global to expose */ |
| 1209 | asn_TYPE_descriptor_t asn_DEF_many_2 = { |
| 1210 | "many", |
| 1211 | "many", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame^] | 1212 | &asn_OP_SEQUENCE_OF, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1213 | SEQUENCE_OF_constraint, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1214 | asn_DEF_many_tags_2, |
| 1215 | sizeof(asn_DEF_many_tags_2) |
| 1216 | /sizeof(asn_DEF_many_tags_2[0]) - 1, /* 1 */ |
| 1217 | asn_DEF_many_tags_2, /* Same as above */ |
| 1218 | sizeof(asn_DEF_many_tags_2) |
| 1219 | /sizeof(asn_DEF_many_tags_2[0]), /* 2 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1220 | 0, /* No OER visible constraints */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1221 | 0, /* No PER visible constraints */ |
| 1222 | asn_MBR_many_2, |
| 1223 | 1, /* Single element */ |
| 1224 | &asn_SPC_many_specs_2 /* Additional specs */ |
| 1225 | }; |
| 1226 | |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 1227 | asn_TYPE_member_t asn_MBR_PDU_1[] = { |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1228 | { ATF_POINTER, 31, offsetof(struct PDU, many), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1229 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 1230 | .tag_mode = 0, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1231 | .type = &asn_DEF_many_2, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1232 | .type_selector = 0, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1233 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1234 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1235 | .per_constraints = 0, /* No PER visible constraints */ |
| 1236 | .default_value = 0, |
| 1237 | .name = "many" |
| 1238 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1239 | { ATF_POINTER, 30, offsetof(struct PDU, ia5), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1240 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 1241 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1242 | .type = &asn_DEF_IA5String, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1243 | .type_selector = 0, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1244 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1245 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1246 | .per_constraints = 0, /* No PER visible constraints */ |
| 1247 | .default_value = 0, |
| 1248 | .name = "ia5" |
| 1249 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1250 | { ATF_POINTER, 29, offsetof(struct PDU, ia5_c), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1251 | .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 1252 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1253 | .type = &asn_DEF_IA5String, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1254 | .type_selector = 0, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1255 | .memb_constraints = memb_ia5_c_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1256 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1257 | .per_constraints = &asn_PER_memb_ia5_c_constr_5, |
| 1258 | .default_value = 0, |
| 1259 | .name = "ia5-c" |
| 1260 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1261 | { ATF_POINTER, 28, offsetof(struct PDU, ia5_ce), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1262 | .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
| 1263 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1264 | .type = &asn_DEF_IA5String, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1265 | .type_selector = 0, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1266 | .memb_constraints = memb_ia5_ce_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1267 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1268 | .per_constraints = &asn_PER_memb_ia5_ce_constr_6, |
| 1269 | .default_value = 0, |
| 1270 | .name = "ia5-ce" |
| 1271 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1272 | { ATF_POINTER, 27, offsetof(struct PDU, ia5_ir), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1273 | .tag = (ASN_TAG_CLASS_CONTEXT | (4 << 2)), |
| 1274 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1275 | .type = &asn_DEF_IA5String, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1276 | .type_selector = 0, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1277 | .memb_constraints = memb_ia5_ir_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1278 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1279 | .per_constraints = &asn_PER_memb_ia5_ir_constr_7, |
| 1280 | .default_value = 0, |
| 1281 | .name = "ia5-ir" |
| 1282 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1283 | { ATF_POINTER, 26, offsetof(struct PDU, vs), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1284 | .tag = (ASN_TAG_CLASS_CONTEXT | (5 << 2)), |
| 1285 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1286 | .type = &asn_DEF_VisibleString, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1287 | .type_selector = 0, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1288 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1289 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1290 | .per_constraints = 0, /* No PER visible constraints */ |
| 1291 | .default_value = 0, |
| 1292 | .name = "vs" |
| 1293 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1294 | { ATF_POINTER, 25, offsetof(struct PDU, vs_c), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1295 | .tag = (ASN_TAG_CLASS_CONTEXT | (6 << 2)), |
| 1296 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1297 | .type = &asn_DEF_VisibleString, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1298 | .type_selector = 0, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1299 | .memb_constraints = memb_vs_c_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1300 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1301 | .per_constraints = &asn_PER_memb_vs_c_constr_9, |
| 1302 | .default_value = 0, |
| 1303 | .name = "vs-c" |
| 1304 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1305 | { ATF_POINTER, 24, offsetof(struct PDU, vs_ce), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1306 | .tag = (ASN_TAG_CLASS_CONTEXT | (7 << 2)), |
| 1307 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1308 | .type = &asn_DEF_VisibleString, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1309 | .type_selector = 0, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1310 | .memb_constraints = memb_vs_ce_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1311 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1312 | .per_constraints = &asn_PER_memb_vs_ce_constr_10, |
| 1313 | .default_value = 0, |
| 1314 | .name = "vs-ce" |
| 1315 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1316 | { ATF_POINTER, 23, offsetof(struct PDU, vs_ir), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1317 | .tag = (ASN_TAG_CLASS_CONTEXT | (8 << 2)), |
| 1318 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1319 | .type = &asn_DEF_VisibleString, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1320 | .type_selector = 0, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1321 | .memb_constraints = memb_vs_ir_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1322 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1323 | .per_constraints = &asn_PER_memb_vs_ir_constr_11, |
| 1324 | .default_value = 0, |
| 1325 | .name = "vs-ir" |
| 1326 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1327 | { ATF_POINTER, 22, offsetof(struct PDU, pr), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1328 | .tag = (ASN_TAG_CLASS_CONTEXT | (9 << 2)), |
| 1329 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1330 | .type = &asn_DEF_PrintableString, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1331 | .type_selector = 0, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1332 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1333 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1334 | .per_constraints = 0, /* No PER visible constraints */ |
| 1335 | .default_value = 0, |
| 1336 | .name = "pr" |
| 1337 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1338 | { ATF_POINTER, 21, offsetof(struct PDU, pr_c), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1339 | .tag = (ASN_TAG_CLASS_CONTEXT | (10 << 2)), |
| 1340 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1341 | .type = &asn_DEF_PrintableString, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1342 | .type_selector = 0, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1343 | .memb_constraints = memb_pr_c_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1344 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1345 | .per_constraints = &asn_PER_memb_pr_c_constr_13, |
| 1346 | .default_value = 0, |
| 1347 | .name = "pr-c" |
| 1348 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1349 | { ATF_POINTER, 20, offsetof(struct PDU, pr_ir), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1350 | .tag = (ASN_TAG_CLASS_CONTEXT | (11 << 2)), |
| 1351 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1352 | .type = &asn_DEF_PrintableString, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1353 | .type_selector = 0, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1354 | .memb_constraints = memb_pr_ir_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1355 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1356 | .per_constraints = &asn_PER_memb_pr_ir_constr_14, |
| 1357 | .default_value = 0, |
| 1358 | .name = "pr-ir" |
| 1359 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1360 | { ATF_POINTER, 19, offsetof(struct PDU, ns), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1361 | .tag = (ASN_TAG_CLASS_CONTEXT | (12 << 2)), |
| 1362 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1363 | .type = &asn_DEF_NumericString, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1364 | .type_selector = 0, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1365 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1366 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1367 | .per_constraints = 0, /* No PER visible constraints */ |
| 1368 | .default_value = 0, |
| 1369 | .name = "ns" |
| 1370 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1371 | { ATF_POINTER, 18, offsetof(struct PDU, ns_c), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1372 | .tag = (ASN_TAG_CLASS_CONTEXT | (13 << 2)), |
| 1373 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1374 | .type = &asn_DEF_NumericString, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1375 | .type_selector = 0, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1376 | .memb_constraints = memb_ns_c_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1377 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1378 | .per_constraints = &asn_PER_memb_ns_c_constr_16, |
| 1379 | .default_value = 0, |
| 1380 | .name = "ns-c" |
| 1381 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1382 | { ATF_POINTER, 17, offsetof(struct PDU, ns_ce), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1383 | .tag = (ASN_TAG_CLASS_CONTEXT | (14 << 2)), |
| 1384 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1385 | .type = &asn_DEF_NumericString, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1386 | .type_selector = 0, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1387 | .memb_constraints = memb_ns_ce_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1388 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1389 | .per_constraints = &asn_PER_memb_ns_ce_constr_17, |
| 1390 | .default_value = 0, |
| 1391 | .name = "ns-ce" |
| 1392 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1393 | { ATF_POINTER, 16, offsetof(struct PDU, ns_ir), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1394 | .tag = (ASN_TAG_CLASS_CONTEXT | (15 << 2)), |
| 1395 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1396 | .type = &asn_DEF_NumericString, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1397 | .type_selector = 0, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1398 | .memb_constraints = memb_ns_ir_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1399 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1400 | .per_constraints = &asn_PER_memb_ns_ir_constr_18, |
| 1401 | .default_value = 0, |
| 1402 | .name = "ns-ir" |
| 1403 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1404 | { ATF_POINTER, 15, offsetof(struct PDU, ut_c), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1405 | .tag = (ASN_TAG_CLASS_CONTEXT | (16 << 2)), |
| 1406 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1407 | .type = &asn_DEF_UTF8String, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1408 | .type_selector = 0, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1409 | .memb_constraints = memb_ut_c_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1410 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1411 | .per_constraints = &asn_PER_memb_ut_c_constr_19, |
| 1412 | .default_value = 0, |
| 1413 | .name = "ut-c" |
| 1414 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1415 | { ATF_POINTER, 14, offsetof(struct PDU, ut_ce), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1416 | .tag = (ASN_TAG_CLASS_CONTEXT | (17 << 2)), |
| 1417 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1418 | .type = &asn_DEF_UTF8String, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1419 | .type_selector = 0, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1420 | .memb_constraints = memb_ut_ce_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1421 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1422 | .per_constraints = &asn_PER_memb_ut_ce_constr_20, |
| 1423 | .default_value = 0, |
| 1424 | .name = "ut-ce" |
| 1425 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1426 | { ATF_POINTER, 13, offsetof(struct PDU, ut_ir), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1427 | .tag = (ASN_TAG_CLASS_CONTEXT | (18 << 2)), |
| 1428 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1429 | .type = &asn_DEF_UTF8String, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1430 | .type_selector = 0, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1431 | .memb_constraints = memb_ut_ir_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1432 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1433 | .per_constraints = &asn_PER_memb_ut_ir_constr_21, |
| 1434 | .default_value = 0, |
| 1435 | .name = "ut-ir" |
| 1436 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1437 | { ATF_POINTER, 12, offsetof(struct PDU, bm), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1438 | .tag = (ASN_TAG_CLASS_CONTEXT | (19 << 2)), |
| 1439 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1440 | .type = &asn_DEF_BMPString, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1441 | .type_selector = 0, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1442 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1443 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1444 | .per_constraints = 0, /* No PER visible constraints */ |
| 1445 | .default_value = 0, |
| 1446 | .name = "bm" |
| 1447 | }, |
| 1448 | { ATF_POINTER, 11, offsetof(struct PDU, bm_c), |
| 1449 | .tag = (ASN_TAG_CLASS_CONTEXT | (20 << 2)), |
| 1450 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1451 | .type = &asn_DEF_BMPString, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1452 | .type_selector = 0, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1453 | .memb_constraints = memb_bm_c_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1454 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1455 | .per_constraints = &asn_PER_memb_bm_c_constr_23, |
| 1456 | .default_value = 0, |
| 1457 | .name = "bm-c" |
| 1458 | }, |
| 1459 | { ATF_POINTER, 10, offsetof(struct PDU, bm_cs), |
| 1460 | .tag = (ASN_TAG_CLASS_CONTEXT | (21 << 2)), |
| 1461 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1462 | .type = &asn_DEF_BMPString, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1463 | .type_selector = 0, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1464 | .memb_constraints = memb_bm_cs_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1465 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1466 | .per_constraints = &asn_PER_memb_bm_cs_constr_24, |
| 1467 | .default_value = 0, |
| 1468 | .name = "bm-cs" |
| 1469 | }, |
| 1470 | { ATF_POINTER, 9, offsetof(struct PDU, bm_ce), |
| 1471 | .tag = (ASN_TAG_CLASS_CONTEXT | (22 << 2)), |
| 1472 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1473 | .type = &asn_DEF_BMPString, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1474 | .type_selector = 0, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1475 | .memb_constraints = memb_bm_ce_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1476 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1477 | .per_constraints = &asn_PER_memb_bm_ce_constr_25, |
| 1478 | .default_value = 0, |
| 1479 | .name = "bm-ce" |
| 1480 | }, |
| 1481 | { ATF_POINTER, 8, offsetof(struct PDU, bm_ir), |
| 1482 | .tag = (ASN_TAG_CLASS_CONTEXT | (23 << 2)), |
| 1483 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1484 | .type = &asn_DEF_BMPString, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1485 | .type_selector = 0, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1486 | .memb_constraints = memb_bm_ir_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1487 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1488 | .per_constraints = &asn_PER_memb_bm_ir_constr_26, |
| 1489 | .default_value = 0, |
| 1490 | .name = "bm-ir" |
| 1491 | }, |
| 1492 | { ATF_POINTER, 7, offsetof(struct PDU, us), |
| 1493 | .tag = (ASN_TAG_CLASS_CONTEXT | (24 << 2)), |
| 1494 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1495 | .type = &asn_DEF_UniversalString, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1496 | .type_selector = 0, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1497 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1498 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1499 | .per_constraints = 0, /* No PER visible constraints */ |
| 1500 | .default_value = 0, |
| 1501 | .name = "us" |
| 1502 | }, |
| 1503 | { ATF_POINTER, 6, offsetof(struct PDU, us_c), |
| 1504 | .tag = (ASN_TAG_CLASS_CONTEXT | (25 << 2)), |
| 1505 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1506 | .type = &asn_DEF_UniversalString, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1507 | .type_selector = 0, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1508 | .memb_constraints = memb_us_c_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1509 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1510 | .per_constraints = &asn_PER_memb_us_c_constr_28, |
| 1511 | .default_value = 0, |
| 1512 | .name = "us-c" |
| 1513 | }, |
| 1514 | { ATF_POINTER, 5, offsetof(struct PDU, us_cs), |
| 1515 | .tag = (ASN_TAG_CLASS_CONTEXT | (26 << 2)), |
| 1516 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1517 | .type = &asn_DEF_UniversalString, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1518 | .type_selector = 0, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1519 | .memb_constraints = memb_us_cs_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1520 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1521 | .per_constraints = &asn_PER_memb_us_cs_constr_29, |
| 1522 | .default_value = 0, |
| 1523 | .name = "us-cs" |
| 1524 | }, |
| 1525 | { ATF_POINTER, 4, offsetof(struct PDU, us_ce), |
| 1526 | .tag = (ASN_TAG_CLASS_CONTEXT | (27 << 2)), |
| 1527 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1528 | .type = &asn_DEF_UniversalString, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1529 | .type_selector = 0, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1530 | .memb_constraints = memb_us_ce_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1531 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1532 | .per_constraints = &asn_PER_memb_us_ce_constr_30, |
| 1533 | .default_value = 0, |
| 1534 | .name = "us-ce" |
| 1535 | }, |
| 1536 | { ATF_POINTER, 3, offsetof(struct PDU, us_ir), |
| 1537 | .tag = (ASN_TAG_CLASS_CONTEXT | (28 << 2)), |
| 1538 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1539 | .type = &asn_DEF_UniversalString, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1540 | .type_selector = 0, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1541 | .memb_constraints = memb_us_ir_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1542 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1543 | .per_constraints = &asn_PER_memb_us_ir_constr_31, |
| 1544 | .default_value = 0, |
| 1545 | .name = "us-ir" |
| 1546 | }, |
| 1547 | { ATF_POINTER, 2, offsetof(struct PDU, real), |
| 1548 | .tag = (ASN_TAG_CLASS_CONTEXT | (29 << 2)), |
| 1549 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 1550 | .type = &asn_DEF_NativeReal, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1551 | .type_selector = 0, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1552 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1553 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1554 | .per_constraints = 0, /* No PER visible constraints */ |
| 1555 | .default_value = 0, |
| 1556 | .name = "real" |
| 1557 | }, |
| 1558 | { ATF_POINTER, 1, offsetof(struct PDU, oid), |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1559 | .tag = (ASN_TAG_CLASS_CONTEXT | (30 << 2)), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1560 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1561 | .type = &asn_DEF_OBJECT_IDENTIFIER, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 1562 | .type_selector = 0, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1563 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1564 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1565 | .per_constraints = 0, /* No PER visible constraints */ |
| 1566 | .default_value = 0, |
| 1567 | .name = "oid" |
| 1568 | }, |
| 1569 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 1570 | static const int asn_MAP_PDU_oms_1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 }; |
| 1571 | static const ber_tlv_tag_t asn_DEF_PDU_tags_1[] = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1572 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 1573 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 1574 | static const asn_TYPE_tag2member_t asn_MAP_PDU_tag2el_1[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 1575 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* many */ |
| 1576 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ia5 */ |
| 1577 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ia5-c */ |
| 1578 | { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* ia5-ce */ |
| 1579 | { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* ia5-ir */ |
| 1580 | { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* vs */ |
| 1581 | { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* vs-c */ |
| 1582 | { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* vs-ce */ |
| 1583 | { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* vs-ir */ |
| 1584 | { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 }, /* pr */ |
| 1585 | { (ASN_TAG_CLASS_CONTEXT | (10 << 2)), 10, 0, 0 }, /* pr-c */ |
| 1586 | { (ASN_TAG_CLASS_CONTEXT | (11 << 2)), 11, 0, 0 }, /* pr-ir */ |
| 1587 | { (ASN_TAG_CLASS_CONTEXT | (12 << 2)), 12, 0, 0 }, /* ns */ |
| 1588 | { (ASN_TAG_CLASS_CONTEXT | (13 << 2)), 13, 0, 0 }, /* ns-c */ |
| 1589 | { (ASN_TAG_CLASS_CONTEXT | (14 << 2)), 14, 0, 0 }, /* ns-ce */ |
| 1590 | { (ASN_TAG_CLASS_CONTEXT | (15 << 2)), 15, 0, 0 }, /* ns-ir */ |
| 1591 | { (ASN_TAG_CLASS_CONTEXT | (16 << 2)), 16, 0, 0 }, /* ut-c */ |
| 1592 | { (ASN_TAG_CLASS_CONTEXT | (17 << 2)), 17, 0, 0 }, /* ut-ce */ |
| 1593 | { (ASN_TAG_CLASS_CONTEXT | (18 << 2)), 18, 0, 0 }, /* ut-ir */ |
| 1594 | { (ASN_TAG_CLASS_CONTEXT | (19 << 2)), 19, 0, 0 }, /* bm */ |
| 1595 | { (ASN_TAG_CLASS_CONTEXT | (20 << 2)), 20, 0, 0 }, /* bm-c */ |
| 1596 | { (ASN_TAG_CLASS_CONTEXT | (21 << 2)), 21, 0, 0 }, /* bm-cs */ |
| 1597 | { (ASN_TAG_CLASS_CONTEXT | (22 << 2)), 22, 0, 0 }, /* bm-ce */ |
| 1598 | { (ASN_TAG_CLASS_CONTEXT | (23 << 2)), 23, 0, 0 }, /* bm-ir */ |
| 1599 | { (ASN_TAG_CLASS_CONTEXT | (24 << 2)), 24, 0, 0 }, /* us */ |
| 1600 | { (ASN_TAG_CLASS_CONTEXT | (25 << 2)), 25, 0, 0 }, /* us-c */ |
| 1601 | { (ASN_TAG_CLASS_CONTEXT | (26 << 2)), 26, 0, 0 }, /* us-cs */ |
| 1602 | { (ASN_TAG_CLASS_CONTEXT | (27 << 2)), 27, 0, 0 }, /* us-ce */ |
| 1603 | { (ASN_TAG_CLASS_CONTEXT | (28 << 2)), 28, 0, 0 }, /* us-ir */ |
| 1604 | { (ASN_TAG_CLASS_CONTEXT | (29 << 2)), 29, 0, 0 }, /* real */ |
| 1605 | { (ASN_TAG_CLASS_CONTEXT | (30 << 2)), 30, 0, 0 } /* oid */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1606 | }; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 1607 | asn_SEQUENCE_specifics_t asn_SPC_PDU_specs_1 = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1608 | sizeof(struct PDU), |
| 1609 | offsetof(struct PDU, _asn_ctx), |
Lev Walkin | e391708 | 2017-08-23 10:29:38 -0700 | [diff] [blame] | 1610 | .tag2el = asn_MAP_PDU_tag2el_1, |
| 1611 | .tag2el_count = 31, /* Count of tags in the map */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1612 | asn_MAP_PDU_oms_1, /* Optional members */ |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1613 | 31, 0, /* Root/Additions */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1614 | -1, /* Start extensions */ |
| 1615 | -1 /* Stop extensions */ |
| 1616 | }; |
| 1617 | asn_TYPE_descriptor_t asn_DEF_PDU = { |
| 1618 | "PDU", |
| 1619 | "PDU", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame^] | 1620 | &asn_OP_SEQUENCE, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1621 | SEQUENCE_constraint, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1622 | asn_DEF_PDU_tags_1, |
| 1623 | sizeof(asn_DEF_PDU_tags_1) |
| 1624 | /sizeof(asn_DEF_PDU_tags_1[0]), /* 1 */ |
| 1625 | asn_DEF_PDU_tags_1, /* Same as above */ |
| 1626 | sizeof(asn_DEF_PDU_tags_1) |
| 1627 | /sizeof(asn_DEF_PDU_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1628 | 0, /* No OER visible constraints */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1629 | 0, /* No PER visible constraints */ |
| 1630 | asn_MBR_PDU_1, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1631 | 31, /* Elements count */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1632 | &asn_SPC_PDU_specs_1 /* Additional specs */ |
| 1633 | }; |
| 1634 | |