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, |
| 1191 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1192 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1193 | .per_constraints = 0, /* No PER visible constraints */ |
| 1194 | .default_value = 0, |
| 1195 | .name = "" |
| 1196 | }, |
| 1197 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 1198 | static const ber_tlv_tag_t asn_DEF_many_tags_2[] = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1199 | (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 1200 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 1201 | }; |
| 1202 | static asn_SET_OF_specifics_t asn_SPC_many_specs_2 = { |
| 1203 | sizeof(struct many), |
| 1204 | offsetof(struct many, _asn_ctx), |
| 1205 | 0, /* XER encoding is XMLDelimitedItemList */ |
| 1206 | }; |
| 1207 | static /* Use -fall-defs-global to expose */ |
| 1208 | asn_TYPE_descriptor_t asn_DEF_many_2 = { |
| 1209 | "many", |
| 1210 | "many", |
| 1211 | SEQUENCE_OF_free, |
| 1212 | SEQUENCE_OF_print, |
| 1213 | SEQUENCE_OF_constraint, |
| 1214 | SEQUENCE_OF_decode_ber, |
| 1215 | SEQUENCE_OF_encode_der, |
| 1216 | SEQUENCE_OF_decode_xer, |
| 1217 | SEQUENCE_OF_encode_xer, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1218 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1219 | SEQUENCE_OF_decode_uper, |
| 1220 | SEQUENCE_OF_encode_uper, |
| 1221 | 0, /* Use generic outmost tag fetcher */ |
| 1222 | asn_DEF_many_tags_2, |
| 1223 | sizeof(asn_DEF_many_tags_2) |
| 1224 | /sizeof(asn_DEF_many_tags_2[0]) - 1, /* 1 */ |
| 1225 | asn_DEF_many_tags_2, /* Same as above */ |
| 1226 | sizeof(asn_DEF_many_tags_2) |
| 1227 | /sizeof(asn_DEF_many_tags_2[0]), /* 2 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1228 | 0, /* No OER visible constraints */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1229 | 0, /* No PER visible constraints */ |
| 1230 | asn_MBR_many_2, |
| 1231 | 1, /* Single element */ |
| 1232 | &asn_SPC_many_specs_2 /* Additional specs */ |
| 1233 | }; |
| 1234 | |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 1235 | asn_TYPE_member_t asn_MBR_PDU_1[] = { |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1236 | { ATF_POINTER, 31, offsetof(struct PDU, many), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1237 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 1238 | .tag_mode = 0, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1239 | .type = &asn_DEF_many_2, |
| 1240 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1241 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1242 | .per_constraints = 0, /* No PER visible constraints */ |
| 1243 | .default_value = 0, |
| 1244 | .name = "many" |
| 1245 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1246 | { ATF_POINTER, 30, offsetof(struct PDU, ia5), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1247 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 1248 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1249 | .type = &asn_DEF_IA5String, |
| 1250 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1251 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1252 | .per_constraints = 0, /* No PER visible constraints */ |
| 1253 | .default_value = 0, |
| 1254 | .name = "ia5" |
| 1255 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1256 | { ATF_POINTER, 29, offsetof(struct PDU, ia5_c), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1257 | .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 1258 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1259 | .type = &asn_DEF_IA5String, |
| 1260 | .memb_constraints = memb_ia5_c_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1261 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1262 | .per_constraints = &asn_PER_memb_ia5_c_constr_5, |
| 1263 | .default_value = 0, |
| 1264 | .name = "ia5-c" |
| 1265 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1266 | { ATF_POINTER, 28, offsetof(struct PDU, ia5_ce), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1267 | .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
| 1268 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1269 | .type = &asn_DEF_IA5String, |
| 1270 | .memb_constraints = memb_ia5_ce_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1271 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1272 | .per_constraints = &asn_PER_memb_ia5_ce_constr_6, |
| 1273 | .default_value = 0, |
| 1274 | .name = "ia5-ce" |
| 1275 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1276 | { ATF_POINTER, 27, offsetof(struct PDU, ia5_ir), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1277 | .tag = (ASN_TAG_CLASS_CONTEXT | (4 << 2)), |
| 1278 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1279 | .type = &asn_DEF_IA5String, |
| 1280 | .memb_constraints = memb_ia5_ir_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1281 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1282 | .per_constraints = &asn_PER_memb_ia5_ir_constr_7, |
| 1283 | .default_value = 0, |
| 1284 | .name = "ia5-ir" |
| 1285 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1286 | { ATF_POINTER, 26, offsetof(struct PDU, vs), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1287 | .tag = (ASN_TAG_CLASS_CONTEXT | (5 << 2)), |
| 1288 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1289 | .type = &asn_DEF_VisibleString, |
| 1290 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1291 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1292 | .per_constraints = 0, /* No PER visible constraints */ |
| 1293 | .default_value = 0, |
| 1294 | .name = "vs" |
| 1295 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1296 | { ATF_POINTER, 25, offsetof(struct PDU, vs_c), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1297 | .tag = (ASN_TAG_CLASS_CONTEXT | (6 << 2)), |
| 1298 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1299 | .type = &asn_DEF_VisibleString, |
| 1300 | .memb_constraints = memb_vs_c_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1301 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1302 | .per_constraints = &asn_PER_memb_vs_c_constr_9, |
| 1303 | .default_value = 0, |
| 1304 | .name = "vs-c" |
| 1305 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1306 | { ATF_POINTER, 24, offsetof(struct PDU, vs_ce), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1307 | .tag = (ASN_TAG_CLASS_CONTEXT | (7 << 2)), |
| 1308 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1309 | .type = &asn_DEF_VisibleString, |
| 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, |
| 1320 | .memb_constraints = memb_vs_ir_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1321 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1322 | .per_constraints = &asn_PER_memb_vs_ir_constr_11, |
| 1323 | .default_value = 0, |
| 1324 | .name = "vs-ir" |
| 1325 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1326 | { ATF_POINTER, 22, offsetof(struct PDU, pr), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1327 | .tag = (ASN_TAG_CLASS_CONTEXT | (9 << 2)), |
| 1328 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1329 | .type = &asn_DEF_PrintableString, |
| 1330 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1331 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1332 | .per_constraints = 0, /* No PER visible constraints */ |
| 1333 | .default_value = 0, |
| 1334 | .name = "pr" |
| 1335 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1336 | { ATF_POINTER, 21, offsetof(struct PDU, pr_c), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1337 | .tag = (ASN_TAG_CLASS_CONTEXT | (10 << 2)), |
| 1338 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1339 | .type = &asn_DEF_PrintableString, |
| 1340 | .memb_constraints = memb_pr_c_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1341 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1342 | .per_constraints = &asn_PER_memb_pr_c_constr_13, |
| 1343 | .default_value = 0, |
| 1344 | .name = "pr-c" |
| 1345 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1346 | { ATF_POINTER, 20, offsetof(struct PDU, pr_ir), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1347 | .tag = (ASN_TAG_CLASS_CONTEXT | (11 << 2)), |
| 1348 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1349 | .type = &asn_DEF_PrintableString, |
| 1350 | .memb_constraints = memb_pr_ir_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1351 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1352 | .per_constraints = &asn_PER_memb_pr_ir_constr_14, |
| 1353 | .default_value = 0, |
| 1354 | .name = "pr-ir" |
| 1355 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1356 | { ATF_POINTER, 19, offsetof(struct PDU, ns), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1357 | .tag = (ASN_TAG_CLASS_CONTEXT | (12 << 2)), |
| 1358 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1359 | .type = &asn_DEF_NumericString, |
| 1360 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1361 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1362 | .per_constraints = 0, /* No PER visible constraints */ |
| 1363 | .default_value = 0, |
| 1364 | .name = "ns" |
| 1365 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1366 | { ATF_POINTER, 18, offsetof(struct PDU, ns_c), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1367 | .tag = (ASN_TAG_CLASS_CONTEXT | (13 << 2)), |
| 1368 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1369 | .type = &asn_DEF_NumericString, |
| 1370 | .memb_constraints = memb_ns_c_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1371 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1372 | .per_constraints = &asn_PER_memb_ns_c_constr_16, |
| 1373 | .default_value = 0, |
| 1374 | .name = "ns-c" |
| 1375 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1376 | { ATF_POINTER, 17, offsetof(struct PDU, ns_ce), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1377 | .tag = (ASN_TAG_CLASS_CONTEXT | (14 << 2)), |
| 1378 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1379 | .type = &asn_DEF_NumericString, |
| 1380 | .memb_constraints = memb_ns_ce_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1381 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1382 | .per_constraints = &asn_PER_memb_ns_ce_constr_17, |
| 1383 | .default_value = 0, |
| 1384 | .name = "ns-ce" |
| 1385 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1386 | { ATF_POINTER, 16, offsetof(struct PDU, ns_ir), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1387 | .tag = (ASN_TAG_CLASS_CONTEXT | (15 << 2)), |
| 1388 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1389 | .type = &asn_DEF_NumericString, |
| 1390 | .memb_constraints = memb_ns_ir_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1391 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1392 | .per_constraints = &asn_PER_memb_ns_ir_constr_18, |
| 1393 | .default_value = 0, |
| 1394 | .name = "ns-ir" |
| 1395 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1396 | { ATF_POINTER, 15, offsetof(struct PDU, ut_c), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1397 | .tag = (ASN_TAG_CLASS_CONTEXT | (16 << 2)), |
| 1398 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1399 | .type = &asn_DEF_UTF8String, |
| 1400 | .memb_constraints = memb_ut_c_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1401 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1402 | .per_constraints = &asn_PER_memb_ut_c_constr_19, |
| 1403 | .default_value = 0, |
| 1404 | .name = "ut-c" |
| 1405 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1406 | { ATF_POINTER, 14, offsetof(struct PDU, ut_ce), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1407 | .tag = (ASN_TAG_CLASS_CONTEXT | (17 << 2)), |
| 1408 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1409 | .type = &asn_DEF_UTF8String, |
| 1410 | .memb_constraints = memb_ut_ce_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1411 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1412 | .per_constraints = &asn_PER_memb_ut_ce_constr_20, |
| 1413 | .default_value = 0, |
| 1414 | .name = "ut-ce" |
| 1415 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1416 | { ATF_POINTER, 13, offsetof(struct PDU, ut_ir), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1417 | .tag = (ASN_TAG_CLASS_CONTEXT | (18 << 2)), |
| 1418 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1419 | .type = &asn_DEF_UTF8String, |
| 1420 | .memb_constraints = memb_ut_ir_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_ir_constr_21, |
| 1423 | .default_value = 0, |
| 1424 | .name = "ut-ir" |
| 1425 | }, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1426 | { ATF_POINTER, 12, offsetof(struct PDU, bm), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1427 | .tag = (ASN_TAG_CLASS_CONTEXT | (19 << 2)), |
| 1428 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1429 | .type = &asn_DEF_BMPString, |
| 1430 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1431 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1432 | .per_constraints = 0, /* No PER visible constraints */ |
| 1433 | .default_value = 0, |
| 1434 | .name = "bm" |
| 1435 | }, |
| 1436 | { ATF_POINTER, 11, offsetof(struct PDU, bm_c), |
| 1437 | .tag = (ASN_TAG_CLASS_CONTEXT | (20 << 2)), |
| 1438 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1439 | .type = &asn_DEF_BMPString, |
| 1440 | .memb_constraints = memb_bm_c_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1441 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1442 | .per_constraints = &asn_PER_memb_bm_c_constr_23, |
| 1443 | .default_value = 0, |
| 1444 | .name = "bm-c" |
| 1445 | }, |
| 1446 | { ATF_POINTER, 10, offsetof(struct PDU, bm_cs), |
| 1447 | .tag = (ASN_TAG_CLASS_CONTEXT | (21 << 2)), |
| 1448 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1449 | .type = &asn_DEF_BMPString, |
| 1450 | .memb_constraints = memb_bm_cs_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1451 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1452 | .per_constraints = &asn_PER_memb_bm_cs_constr_24, |
| 1453 | .default_value = 0, |
| 1454 | .name = "bm-cs" |
| 1455 | }, |
| 1456 | { ATF_POINTER, 9, offsetof(struct PDU, bm_ce), |
| 1457 | .tag = (ASN_TAG_CLASS_CONTEXT | (22 << 2)), |
| 1458 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1459 | .type = &asn_DEF_BMPString, |
| 1460 | .memb_constraints = memb_bm_ce_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1461 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1462 | .per_constraints = &asn_PER_memb_bm_ce_constr_25, |
| 1463 | .default_value = 0, |
| 1464 | .name = "bm-ce" |
| 1465 | }, |
| 1466 | { ATF_POINTER, 8, offsetof(struct PDU, bm_ir), |
| 1467 | .tag = (ASN_TAG_CLASS_CONTEXT | (23 << 2)), |
| 1468 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1469 | .type = &asn_DEF_BMPString, |
| 1470 | .memb_constraints = memb_bm_ir_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1471 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1472 | .per_constraints = &asn_PER_memb_bm_ir_constr_26, |
| 1473 | .default_value = 0, |
| 1474 | .name = "bm-ir" |
| 1475 | }, |
| 1476 | { ATF_POINTER, 7, offsetof(struct PDU, us), |
| 1477 | .tag = (ASN_TAG_CLASS_CONTEXT | (24 << 2)), |
| 1478 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1479 | .type = &asn_DEF_UniversalString, |
| 1480 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1481 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1482 | .per_constraints = 0, /* No PER visible constraints */ |
| 1483 | .default_value = 0, |
| 1484 | .name = "us" |
| 1485 | }, |
| 1486 | { ATF_POINTER, 6, offsetof(struct PDU, us_c), |
| 1487 | .tag = (ASN_TAG_CLASS_CONTEXT | (25 << 2)), |
| 1488 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1489 | .type = &asn_DEF_UniversalString, |
| 1490 | .memb_constraints = memb_us_c_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1491 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1492 | .per_constraints = &asn_PER_memb_us_c_constr_28, |
| 1493 | .default_value = 0, |
| 1494 | .name = "us-c" |
| 1495 | }, |
| 1496 | { ATF_POINTER, 5, offsetof(struct PDU, us_cs), |
| 1497 | .tag = (ASN_TAG_CLASS_CONTEXT | (26 << 2)), |
| 1498 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1499 | .type = &asn_DEF_UniversalString, |
| 1500 | .memb_constraints = memb_us_cs_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1501 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1502 | .per_constraints = &asn_PER_memb_us_cs_constr_29, |
| 1503 | .default_value = 0, |
| 1504 | .name = "us-cs" |
| 1505 | }, |
| 1506 | { ATF_POINTER, 4, offsetof(struct PDU, us_ce), |
| 1507 | .tag = (ASN_TAG_CLASS_CONTEXT | (27 << 2)), |
| 1508 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1509 | .type = &asn_DEF_UniversalString, |
| 1510 | .memb_constraints = memb_us_ce_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1511 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1512 | .per_constraints = &asn_PER_memb_us_ce_constr_30, |
| 1513 | .default_value = 0, |
| 1514 | .name = "us-ce" |
| 1515 | }, |
| 1516 | { ATF_POINTER, 3, offsetof(struct PDU, us_ir), |
| 1517 | .tag = (ASN_TAG_CLASS_CONTEXT | (28 << 2)), |
| 1518 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1519 | .type = &asn_DEF_UniversalString, |
| 1520 | .memb_constraints = memb_us_ir_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1521 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1522 | .per_constraints = &asn_PER_memb_us_ir_constr_31, |
| 1523 | .default_value = 0, |
| 1524 | .name = "us-ir" |
| 1525 | }, |
| 1526 | { ATF_POINTER, 2, offsetof(struct PDU, real), |
| 1527 | .tag = (ASN_TAG_CLASS_CONTEXT | (29 << 2)), |
| 1528 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 1529 | .type = &asn_DEF_NativeReal, |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1530 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
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 | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1532 | .per_constraints = 0, /* No PER visible constraints */ |
| 1533 | .default_value = 0, |
| 1534 | .name = "real" |
| 1535 | }, |
| 1536 | { ATF_POINTER, 1, offsetof(struct PDU, oid), |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1537 | .tag = (ASN_TAG_CLASS_CONTEXT | (30 << 2)), |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1538 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1539 | .type = &asn_DEF_OBJECT_IDENTIFIER, |
| 1540 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1541 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1542 | .per_constraints = 0, /* No PER visible constraints */ |
| 1543 | .default_value = 0, |
| 1544 | .name = "oid" |
| 1545 | }, |
| 1546 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 1547 | 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 }; |
| 1548 | static const ber_tlv_tag_t asn_DEF_PDU_tags_1[] = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1549 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 1550 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 1551 | static const asn_TYPE_tag2member_t asn_MAP_PDU_tag2el_1[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 1552 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* many */ |
| 1553 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ia5 */ |
| 1554 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ia5-c */ |
| 1555 | { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* ia5-ce */ |
| 1556 | { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* ia5-ir */ |
| 1557 | { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* vs */ |
| 1558 | { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* vs-c */ |
| 1559 | { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* vs-ce */ |
| 1560 | { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* vs-ir */ |
| 1561 | { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 }, /* pr */ |
| 1562 | { (ASN_TAG_CLASS_CONTEXT | (10 << 2)), 10, 0, 0 }, /* pr-c */ |
| 1563 | { (ASN_TAG_CLASS_CONTEXT | (11 << 2)), 11, 0, 0 }, /* pr-ir */ |
| 1564 | { (ASN_TAG_CLASS_CONTEXT | (12 << 2)), 12, 0, 0 }, /* ns */ |
| 1565 | { (ASN_TAG_CLASS_CONTEXT | (13 << 2)), 13, 0, 0 }, /* ns-c */ |
| 1566 | { (ASN_TAG_CLASS_CONTEXT | (14 << 2)), 14, 0, 0 }, /* ns-ce */ |
| 1567 | { (ASN_TAG_CLASS_CONTEXT | (15 << 2)), 15, 0, 0 }, /* ns-ir */ |
| 1568 | { (ASN_TAG_CLASS_CONTEXT | (16 << 2)), 16, 0, 0 }, /* ut-c */ |
| 1569 | { (ASN_TAG_CLASS_CONTEXT | (17 << 2)), 17, 0, 0 }, /* ut-ce */ |
| 1570 | { (ASN_TAG_CLASS_CONTEXT | (18 << 2)), 18, 0, 0 }, /* ut-ir */ |
| 1571 | { (ASN_TAG_CLASS_CONTEXT | (19 << 2)), 19, 0, 0 }, /* bm */ |
| 1572 | { (ASN_TAG_CLASS_CONTEXT | (20 << 2)), 20, 0, 0 }, /* bm-c */ |
| 1573 | { (ASN_TAG_CLASS_CONTEXT | (21 << 2)), 21, 0, 0 }, /* bm-cs */ |
| 1574 | { (ASN_TAG_CLASS_CONTEXT | (22 << 2)), 22, 0, 0 }, /* bm-ce */ |
| 1575 | { (ASN_TAG_CLASS_CONTEXT | (23 << 2)), 23, 0, 0 }, /* bm-ir */ |
| 1576 | { (ASN_TAG_CLASS_CONTEXT | (24 << 2)), 24, 0, 0 }, /* us */ |
| 1577 | { (ASN_TAG_CLASS_CONTEXT | (25 << 2)), 25, 0, 0 }, /* us-c */ |
| 1578 | { (ASN_TAG_CLASS_CONTEXT | (26 << 2)), 26, 0, 0 }, /* us-cs */ |
| 1579 | { (ASN_TAG_CLASS_CONTEXT | (27 << 2)), 27, 0, 0 }, /* us-ce */ |
| 1580 | { (ASN_TAG_CLASS_CONTEXT | (28 << 2)), 28, 0, 0 }, /* us-ir */ |
| 1581 | { (ASN_TAG_CLASS_CONTEXT | (29 << 2)), 29, 0, 0 }, /* real */ |
| 1582 | { (ASN_TAG_CLASS_CONTEXT | (30 << 2)), 30, 0, 0 } /* oid */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1583 | }; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 1584 | asn_SEQUENCE_specifics_t asn_SPC_PDU_specs_1 = { |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1585 | sizeof(struct PDU), |
| 1586 | offsetof(struct PDU, _asn_ctx), |
| 1587 | asn_MAP_PDU_tag2el_1, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1588 | 31, /* Count of tags in the map */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1589 | asn_MAP_PDU_oms_1, /* Optional members */ |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1590 | 31, 0, /* Root/Additions */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1591 | -1, /* Start extensions */ |
| 1592 | -1 /* Stop extensions */ |
| 1593 | }; |
| 1594 | asn_TYPE_descriptor_t asn_DEF_PDU = { |
| 1595 | "PDU", |
| 1596 | "PDU", |
| 1597 | SEQUENCE_free, |
| 1598 | SEQUENCE_print, |
| 1599 | SEQUENCE_constraint, |
| 1600 | SEQUENCE_decode_ber, |
| 1601 | SEQUENCE_encode_der, |
| 1602 | SEQUENCE_decode_xer, |
| 1603 | SEQUENCE_encode_xer, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1604 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1605 | SEQUENCE_decode_uper, |
| 1606 | SEQUENCE_encode_uper, |
| 1607 | 0, /* Use generic outmost tag fetcher */ |
| 1608 | asn_DEF_PDU_tags_1, |
| 1609 | sizeof(asn_DEF_PDU_tags_1) |
| 1610 | /sizeof(asn_DEF_PDU_tags_1[0]), /* 1 */ |
| 1611 | asn_DEF_PDU_tags_1, /* Same as above */ |
| 1612 | sizeof(asn_DEF_PDU_tags_1) |
| 1613 | /sizeof(asn_DEF_PDU_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 1614 | 0, /* No OER visible constraints */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1615 | 0, /* No PER visible constraints */ |
| 1616 | asn_MBR_PDU_1, |
Lev Walkin | 3a4689a | 2006-11-24 11:20:27 +0000 | [diff] [blame] | 1617 | 31, /* Elements count */ |
Lev Walkin | 07aaa34 | 2006-10-09 12:52:15 +0000 | [diff] [blame] | 1618 | &asn_SPC_PDU_specs_1 /* Additional specs */ |
| 1619 | }; |
| 1620 | |