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