| 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> |
| 9 |
#include <BMPString.h> |
| 10 |
#include <UniversalString.h> |
| 11 |
#include <NativeReal.h> |
| 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 */; |
| 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 */; |
| 58 |
double *real /* OPTIONAL */; |
| 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 |
|
| 101 |
static const int permitted_alphabet_table_7[256] = { |
| 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 |
}; |
| 109 |
static const int permitted_alphabet_code2value_7[5] = { |
| 110 |
65,66,88,89,90,}; |
| 111 |
|
| 112 |
|
| 113 |
static int check_permitted_alphabet_7(const void *sptr) { |
| 114 |
const int *table = permitted_alphabet_table_7; |
| 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 |
|
| 153 |
static const int permitted_alphabet_table_11[256] = { |
| 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 |
}; |
| 161 |
static const int permitted_alphabet_code2value_11[5] = { |
| 162 |
65,66,88,89,90,}; |
| 163 |
|
| 164 |
|
| 165 |
static int check_permitted_alphabet_11(const void *sptr) { |
| 166 |
const int *table = permitted_alphabet_table_11; |
| 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 |
|
| 192 |
static const int permitted_alphabet_table_14[256] = { |
| 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 |
}; |
| 200 |
static const int permitted_alphabet_code2value_14[5] = { |
| 201 |
65,66,88,89,90,}; |
| 202 |
|
| 203 |
|
| 204 |
static int check_permitted_alphabet_14(const void *sptr) { |
| 205 |
const int *table = permitted_alphabet_table_14; |
| 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 |
|
| 244 |
static const int permitted_alphabet_table_18[256] = { |
| 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 |
}; |
| 250 |
static const int permitted_alphabet_code2value_18[2] = { |
| 251 |
49,57,}; |
| 252 |
|
| 253 |
|
| 254 |
static int check_permitted_alphabet_18(const void *sptr) { |
| 255 |
const int *table = permitted_alphabet_table_18; |
| 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 |
|
| 268 |
static const int permitted_alphabet_table_21[128] = { |
| 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) { |
| 278 |
const int *table = permitted_alphabet_table_21; |
| 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 |
|
| 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 |
|
| 337 |
static const int permitted_alphabet_table_26[256] = { |
| 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 |
}; |
| 345 |
static const int permitted_alphabet_code2value_26[5] = { |
| 346 |
65,66,88,89,90,}; |
| 347 |
|
| 348 |
|
| 349 |
static int check_permitted_alphabet_26(const void *sptr) { |
| 350 |
const int *table = permitted_alphabet_table_26; |
| 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 |
|
| 417 |
static const int permitted_alphabet_table_31[256] = { |
| 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 |
}; |
| 425 |
static const int permitted_alphabet_code2value_31[5] = { |
| 426 |
65,66,88,89,90,}; |
| 427 |
|
| 428 |
|
| 429 |
static int check_permitted_alphabet_31(const void *sptr) { |
| 430 |
const int *table = permitted_alphabet_table_31; |
| 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 |
|
| 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) { |
| 457 |
ASN__CTFAIL(app_key, td, sptr, |
| 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 { |
| 468 |
ASN__CTFAIL(app_key, td, sptr, |
| 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) { |
| 481 |
ASN__CTFAIL(app_key, td, sptr, |
| 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 { |
| 492 |
ASN__CTFAIL(app_key, td, sptr, |
| 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) { |
| 505 |
ASN__CTFAIL(app_key, td, sptr, |
| 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 { |
| 516 |
ASN__CTFAIL(app_key, td, sptr, |
| 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) { |
| 539 |
ASN__CTFAIL(app_key, td, sptr, |
| 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 { |
| 550 |
ASN__CTFAIL(app_key, td, sptr, |
| 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) { |
| 563 |
ASN__CTFAIL(app_key, td, sptr, |
| 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 { |
| 574 |
ASN__CTFAIL(app_key, td, sptr, |
| 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) { |
| 587 |
ASN__CTFAIL(app_key, td, sptr, |
| 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 { |
| 598 |
ASN__CTFAIL(app_key, td, sptr, |
| 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) { |
| 621 |
ASN__CTFAIL(app_key, td, sptr, |
| 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 { |
| 632 |
ASN__CTFAIL(app_key, td, sptr, |
| 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) { |
| 645 |
ASN__CTFAIL(app_key, td, sptr, |
| 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 { |
| 656 |
ASN__CTFAIL(app_key, td, sptr, |
| 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) { |
| 679 |
ASN__CTFAIL(app_key, td, sptr, |
| 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 { |
| 690 |
ASN__CTFAIL(app_key, td, sptr, |
| 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) { |
| 703 |
ASN__CTFAIL(app_key, td, sptr, |
| 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 { |
| 714 |
ASN__CTFAIL(app_key, td, sptr, |
| 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) { |
| 727 |
ASN__CTFAIL(app_key, td, sptr, |
| 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 { |
| 738 |
ASN__CTFAIL(app_key, td, sptr, |
| 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) { |
| 762 |
ASN__CTFAIL(app_key, td, sptr, |
| 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) { |
| 770 |
ASN__CTFAIL(app_key, td, sptr, |
| 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 { |
| 780 |
ASN__CTFAIL(app_key, td, sptr, |
| 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) { |
| 794 |
ASN__CTFAIL(app_key, td, sptr, |
| 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) { |
| 802 |
ASN__CTFAIL(app_key, td, sptr, |
| 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 { |
| 812 |
ASN__CTFAIL(app_key, td, sptr, |
| 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) { |
| 825 |
ASN__CTFAIL(app_key, td, sptr, |
| 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 { |
| 836 |
ASN__CTFAIL(app_key, td, sptr, |
| 837 |
"%s: constraint failed (%s:%d)", |
| 838 |
td->name, __FILE__, __LINE__); |
| 839 |
return -1; |
| 840 |
} |
| 841 |
} |
| 842 |
|
| 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) { |
| 849 |
ASN__CTFAIL(app_key, td, sptr, |
| 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 { |
| 860 |
ASN__CTFAIL(app_key, td, sptr, |
| 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) { |
| 874 |
ASN__CTFAIL(app_key, td, sptr, |
| 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 { |
| 887 |
ASN__CTFAIL(app_key, td, sptr, |
| 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) { |
| 900 |
ASN__CTFAIL(app_key, td, sptr, |
| 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 { |
| 911 |
ASN__CTFAIL(app_key, td, sptr, |
| 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) { |
| 924 |
ASN__CTFAIL(app_key, td, sptr, |
| 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 { |
| 935 |
ASN__CTFAIL(app_key, td, sptr, |
| 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) { |
| 958 |
ASN__CTFAIL(app_key, td, sptr, |
| 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 { |
| 969 |
ASN__CTFAIL(app_key, td, sptr, |
| 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) { |
| 983 |
ASN__CTFAIL(app_key, td, sptr, |
| 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 { |
| 996 |
ASN__CTFAIL(app_key, td, sptr, |
| 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) { |
| 1009 |
ASN__CTFAIL(app_key, td, sptr, |
| 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 { |
| 1020 |
ASN__CTFAIL(app_key, td, sptr, |
| 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) { |
| 1033 |
ASN__CTFAIL(app_key, td, sptr, |
| 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 { |
| 1044 |
ASN__CTFAIL(app_key, td, sptr, |
| 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 |
} |
| 1061 |
|
| 1062 |
/*** <<< CTDEFS [PDU] >>> ***/ |
| 1063 |
|
| 1064 |
static asn_per_constraints_t asn_PER_memb_ia5_c_constr_5 GCC_NOTUSED = { |
| 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 |
}; |
| 1069 |
static asn_per_constraints_t asn_PER_memb_ia5_ce_constr_6 GCC_NOTUSED = { |
| 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 |
}; |
| 1074 |
static asn_per_constraints_t asn_PER_memb_ia5_ir_constr_7 GCC_NOTUSED = { |
| 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 |
}; |
| 1080 |
static asn_per_constraints_t asn_PER_memb_vs_c_constr_9 GCC_NOTUSED = { |
| 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 |
}; |
| 1085 |
static asn_per_constraints_t asn_PER_memb_vs_ce_constr_10 GCC_NOTUSED = { |
| 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 |
}; |
| 1090 |
static asn_per_constraints_t asn_PER_memb_vs_ir_constr_11 GCC_NOTUSED = { |
| 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 |
}; |
| 1096 |
static asn_per_constraints_t asn_PER_memb_pr_c_constr_13 GCC_NOTUSED = { |
| 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 |
}; |
| 1101 |
static asn_per_constraints_t asn_PER_memb_pr_ir_constr_14 GCC_NOTUSED = { |
| 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 |
}; |
| 1107 |
static asn_per_constraints_t asn_PER_memb_ns_c_constr_16 GCC_NOTUSED = { |
| 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 |
}; |
| 1112 |
static asn_per_constraints_t asn_PER_memb_ns_ce_constr_17 GCC_NOTUSED = { |
| 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 |
}; |
| 1117 |
static asn_per_constraints_t asn_PER_memb_ns_ir_constr_18 GCC_NOTUSED = { |
| 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 |
}; |
| 1123 |
static asn_per_constraints_t asn_PER_memb_ut_c_constr_19 GCC_NOTUSED = { |
| 1124 |
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 1125 |
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 1126 |
0, 0 /* No PER value map */ |
| 1127 |
}; |
| 1128 |
static asn_per_constraints_t asn_PER_memb_ut_ce_constr_20 GCC_NOTUSED = { |
| 1129 |
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 1130 |
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 1131 |
0, 0 /* No PER value map */ |
| 1132 |
}; |
| 1133 |
static asn_per_constraints_t asn_PER_memb_ut_ir_constr_21 GCC_NOTUSED = { |
| 1134 |
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 1135 |
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 1136 |
0, 0 /* No PER value map */ |
| 1137 |
}; |
| 1138 |
static asn_per_constraints_t asn_PER_memb_bm_c_constr_23 GCC_NOTUSED = { |
| 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 |
}; |
| 1143 |
static asn_per_constraints_t asn_PER_memb_bm_cs_constr_24 GCC_NOTUSED = { |
| 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 |
}; |
| 1148 |
static asn_per_constraints_t asn_PER_memb_bm_ce_constr_25 GCC_NOTUSED = { |
| 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 |
}; |
| 1153 |
static asn_per_constraints_t asn_PER_memb_bm_ir_constr_26 GCC_NOTUSED = { |
| 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 |
}; |
| 1159 |
static asn_per_constraints_t asn_PER_memb_us_c_constr_28 GCC_NOTUSED = { |
| 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 |
}; |
| 1164 |
static asn_per_constraints_t asn_PER_memb_us_cs_constr_29 GCC_NOTUSED = { |
| 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 |
}; |
| 1169 |
static asn_per_constraints_t asn_PER_memb_us_ce_constr_30 GCC_NOTUSED = { |
| 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 |
}; |
| 1175 |
static asn_per_constraints_t asn_PER_memb_us_ir_constr_31 GCC_NOTUSED = { |
| 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 |
}; |
| 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 */ |
| 1190 |
.per_constraints = 0, /* No PER visible constraints */ |
| 1191 |
.default_value = 0, |
| 1192 |
.name = "" |
| 1193 |
}, |
| 1194 |
}; |
| 1195 |
static const ber_tlv_tag_t asn_DEF_many_tags_2[] = { |
| 1196 |
(ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 1197 |
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 1198 |
}; |
| 1199 |
static asn_SET_OF_specifics_t asn_SPC_many_specs_2 = { |
| 1200 |
sizeof(struct many), |
| 1201 |
offsetof(struct many, _asn_ctx), |
| 1202 |
0, /* XER encoding is XMLDelimitedItemList */ |
| 1203 |
}; |
| 1204 |
static /* Use -fall-defs-global to expose */ |
| 1205 |
asn_TYPE_descriptor_t asn_DEF_many_2 = { |
| 1206 |
"many", |
| 1207 |
"many", |
| 1208 |
SEQUENCE_OF_free, |
| 1209 |
SEQUENCE_OF_print, |
| 1210 |
SEQUENCE_OF_constraint, |
| 1211 |
SEQUENCE_OF_decode_ber, |
| 1212 |
SEQUENCE_OF_encode_der, |
| 1213 |
SEQUENCE_OF_decode_xer, |
| 1214 |
SEQUENCE_OF_encode_xer, |
| 1215 |
SEQUENCE_OF_decode_uper, |
| 1216 |
SEQUENCE_OF_encode_uper, |
| 1217 |
0, /* Use generic outmost tag fetcher */ |
| 1218 |
asn_DEF_many_tags_2, |
| 1219 |
sizeof(asn_DEF_many_tags_2) |
| 1220 |
/sizeof(asn_DEF_many_tags_2[0]) - 1, /* 1 */ |
| 1221 |
asn_DEF_many_tags_2, /* Same as above */ |
| 1222 |
sizeof(asn_DEF_many_tags_2) |
| 1223 |
/sizeof(asn_DEF_many_tags_2[0]), /* 2 */ |
| 1224 |
0, /* No PER visible constraints */ |
| 1225 |
asn_MBR_many_2, |
| 1226 |
1, /* Single element */ |
| 1227 |
&asn_SPC_many_specs_2 /* Additional specs */ |
| 1228 |
}; |
| 1229 |
|
| 1230 |
static asn_TYPE_member_t asn_MBR_PDU_1[] = { |
| 1231 |
{ ATF_POINTER, 31, offsetof(struct PDU, many), |
| 1232 |
.tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 1233 |
.tag_mode = 0, |
| 1234 |
.type = &asn_DEF_many_2, |
| 1235 |
.memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 1236 |
.per_constraints = 0, /* No PER visible constraints */ |
| 1237 |
.default_value = 0, |
| 1238 |
.name = "many" |
| 1239 |
}, |
| 1240 |
{ ATF_POINTER, 30, offsetof(struct PDU, ia5), |
| 1241 |
.tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 1242 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1243 |
.type = &asn_DEF_IA5String, |
| 1244 |
.memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 1245 |
.per_constraints = 0, /* No PER visible constraints */ |
| 1246 |
.default_value = 0, |
| 1247 |
.name = "ia5" |
| 1248 |
}, |
| 1249 |
{ ATF_POINTER, 29, offsetof(struct PDU, ia5_c), |
| 1250 |
.tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 1251 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1252 |
.type = &asn_DEF_IA5String, |
| 1253 |
.memb_constraints = memb_ia5_c_constraint_1, |
| 1254 |
.per_constraints = &asn_PER_memb_ia5_c_constr_5, |
| 1255 |
.default_value = 0, |
| 1256 |
.name = "ia5-c" |
| 1257 |
}, |
| 1258 |
{ ATF_POINTER, 28, offsetof(struct PDU, ia5_ce), |
| 1259 |
.tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
| 1260 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1261 |
.type = &asn_DEF_IA5String, |
| 1262 |
.memb_constraints = memb_ia5_ce_constraint_1, |
| 1263 |
.per_constraints = &asn_PER_memb_ia5_ce_constr_6, |
| 1264 |
.default_value = 0, |
| 1265 |
.name = "ia5-ce" |
| 1266 |
}, |
| 1267 |
{ ATF_POINTER, 27, offsetof(struct PDU, ia5_ir), |
| 1268 |
.tag = (ASN_TAG_CLASS_CONTEXT | (4 << 2)), |
| 1269 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1270 |
.type = &asn_DEF_IA5String, |
| 1271 |
.memb_constraints = memb_ia5_ir_constraint_1, |
| 1272 |
.per_constraints = &asn_PER_memb_ia5_ir_constr_7, |
| 1273 |
.default_value = 0, |
| 1274 |
.name = "ia5-ir" |
| 1275 |
}, |
| 1276 |
{ ATF_POINTER, 26, offsetof(struct PDU, vs), |
| 1277 |
.tag = (ASN_TAG_CLASS_CONTEXT | (5 << 2)), |
| 1278 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1279 |
.type = &asn_DEF_VisibleString, |
| 1280 |
.memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 1281 |
.per_constraints = 0, /* No PER visible constraints */ |
| 1282 |
.default_value = 0, |
| 1283 |
.name = "vs" |
| 1284 |
}, |
| 1285 |
{ ATF_POINTER, 25, offsetof(struct PDU, vs_c), |
| 1286 |
.tag = (ASN_TAG_CLASS_CONTEXT | (6 << 2)), |
| 1287 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1288 |
.type = &asn_DEF_VisibleString, |
| 1289 |
.memb_constraints = memb_vs_c_constraint_1, |
| 1290 |
.per_constraints = &asn_PER_memb_vs_c_constr_9, |
| 1291 |
.default_value = 0, |
| 1292 |
.name = "vs-c" |
| 1293 |
}, |
| 1294 |
{ ATF_POINTER, 24, offsetof(struct PDU, vs_ce), |
| 1295 |
.tag = (ASN_TAG_CLASS_CONTEXT | (7 << 2)), |
| 1296 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1297 |
.type = &asn_DEF_VisibleString, |
| 1298 |
.memb_constraints = memb_vs_ce_constraint_1, |
| 1299 |
.per_constraints = &asn_PER_memb_vs_ce_constr_10, |
| 1300 |
.default_value = 0, |
| 1301 |
.name = "vs-ce" |
| 1302 |
}, |
| 1303 |
{ ATF_POINTER, 23, offsetof(struct PDU, vs_ir), |
| 1304 |
.tag = (ASN_TAG_CLASS_CONTEXT | (8 << 2)), |
| 1305 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1306 |
.type = &asn_DEF_VisibleString, |
| 1307 |
.memb_constraints = memb_vs_ir_constraint_1, |
| 1308 |
.per_constraints = &asn_PER_memb_vs_ir_constr_11, |
| 1309 |
.default_value = 0, |
| 1310 |
.name = "vs-ir" |
| 1311 |
}, |
| 1312 |
{ ATF_POINTER, 22, offsetof(struct PDU, pr), |
| 1313 |
.tag = (ASN_TAG_CLASS_CONTEXT | (9 << 2)), |
| 1314 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1315 |
.type = &asn_DEF_PrintableString, |
| 1316 |
.memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 1317 |
.per_constraints = 0, /* No PER visible constraints */ |
| 1318 |
.default_value = 0, |
| 1319 |
.name = "pr" |
| 1320 |
}, |
| 1321 |
{ ATF_POINTER, 21, offsetof(struct PDU, pr_c), |
| 1322 |
.tag = (ASN_TAG_CLASS_CONTEXT | (10 << 2)), |
| 1323 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1324 |
.type = &asn_DEF_PrintableString, |
| 1325 |
.memb_constraints = memb_pr_c_constraint_1, |
| 1326 |
.per_constraints = &asn_PER_memb_pr_c_constr_13, |
| 1327 |
.default_value = 0, |
| 1328 |
.name = "pr-c" |
| 1329 |
}, |
| 1330 |
{ ATF_POINTER, 20, offsetof(struct PDU, pr_ir), |
| 1331 |
.tag = (ASN_TAG_CLASS_CONTEXT | (11 << 2)), |
| 1332 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1333 |
.type = &asn_DEF_PrintableString, |
| 1334 |
.memb_constraints = memb_pr_ir_constraint_1, |
| 1335 |
.per_constraints = &asn_PER_memb_pr_ir_constr_14, |
| 1336 |
.default_value = 0, |
| 1337 |
.name = "pr-ir" |
| 1338 |
}, |
| 1339 |
{ ATF_POINTER, 19, offsetof(struct PDU, ns), |
| 1340 |
.tag = (ASN_TAG_CLASS_CONTEXT | (12 << 2)), |
| 1341 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1342 |
.type = &asn_DEF_NumericString, |
| 1343 |
.memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 1344 |
.per_constraints = 0, /* No PER visible constraints */ |
| 1345 |
.default_value = 0, |
| 1346 |
.name = "ns" |
| 1347 |
}, |
| 1348 |
{ ATF_POINTER, 18, offsetof(struct PDU, ns_c), |
| 1349 |
.tag = (ASN_TAG_CLASS_CONTEXT | (13 << 2)), |
| 1350 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1351 |
.type = &asn_DEF_NumericString, |
| 1352 |
.memb_constraints = memb_ns_c_constraint_1, |
| 1353 |
.per_constraints = &asn_PER_memb_ns_c_constr_16, |
| 1354 |
.default_value = 0, |
| 1355 |
.name = "ns-c" |
| 1356 |
}, |
| 1357 |
{ ATF_POINTER, 17, offsetof(struct PDU, ns_ce), |
| 1358 |
.tag = (ASN_TAG_CLASS_CONTEXT | (14 << 2)), |
| 1359 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1360 |
.type = &asn_DEF_NumericString, |
| 1361 |
.memb_constraints = memb_ns_ce_constraint_1, |
| 1362 |
.per_constraints = &asn_PER_memb_ns_ce_constr_17, |
| 1363 |
.default_value = 0, |
| 1364 |
.name = "ns-ce" |
| 1365 |
}, |
| 1366 |
{ ATF_POINTER, 16, offsetof(struct PDU, ns_ir), |
| 1367 |
.tag = (ASN_TAG_CLASS_CONTEXT | (15 << 2)), |
| 1368 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1369 |
.type = &asn_DEF_NumericString, |
| 1370 |
.memb_constraints = memb_ns_ir_constraint_1, |
| 1371 |
.per_constraints = &asn_PER_memb_ns_ir_constr_18, |
| 1372 |
.default_value = 0, |
| 1373 |
.name = "ns-ir" |
| 1374 |
}, |
| 1375 |
{ ATF_POINTER, 15, offsetof(struct PDU, ut_c), |
| 1376 |
.tag = (ASN_TAG_CLASS_CONTEXT | (16 << 2)), |
| 1377 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1378 |
.type = &asn_DEF_UTF8String, |
| 1379 |
.memb_constraints = memb_ut_c_constraint_1, |
| 1380 |
.per_constraints = &asn_PER_memb_ut_c_constr_19, |
| 1381 |
.default_value = 0, |
| 1382 |
.name = "ut-c" |
| 1383 |
}, |
| 1384 |
{ ATF_POINTER, 14, offsetof(struct PDU, ut_ce), |
| 1385 |
.tag = (ASN_TAG_CLASS_CONTEXT | (17 << 2)), |
| 1386 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1387 |
.type = &asn_DEF_UTF8String, |
| 1388 |
.memb_constraints = memb_ut_ce_constraint_1, |
| 1389 |
.per_constraints = &asn_PER_memb_ut_ce_constr_20, |
| 1390 |
.default_value = 0, |
| 1391 |
.name = "ut-ce" |
| 1392 |
}, |
| 1393 |
{ ATF_POINTER, 13, offsetof(struct PDU, ut_ir), |
| 1394 |
.tag = (ASN_TAG_CLASS_CONTEXT | (18 << 2)), |
| 1395 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1396 |
.type = &asn_DEF_UTF8String, |
| 1397 |
.memb_constraints = memb_ut_ir_constraint_1, |
| 1398 |
.per_constraints = &asn_PER_memb_ut_ir_constr_21, |
| 1399 |
.default_value = 0, |
| 1400 |
.name = "ut-ir" |
| 1401 |
}, |
| 1402 |
{ ATF_POINTER, 12, offsetof(struct PDU, bm), |
| 1403 |
.tag = (ASN_TAG_CLASS_CONTEXT | (19 << 2)), |
| 1404 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1405 |
.type = &asn_DEF_BMPString, |
| 1406 |
.memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 1407 |
.per_constraints = 0, /* No PER visible constraints */ |
| 1408 |
.default_value = 0, |
| 1409 |
.name = "bm" |
| 1410 |
}, |
| 1411 |
{ ATF_POINTER, 11, offsetof(struct PDU, bm_c), |
| 1412 |
.tag = (ASN_TAG_CLASS_CONTEXT | (20 << 2)), |
| 1413 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1414 |
.type = &asn_DEF_BMPString, |
| 1415 |
.memb_constraints = memb_bm_c_constraint_1, |
| 1416 |
.per_constraints = &asn_PER_memb_bm_c_constr_23, |
| 1417 |
.default_value = 0, |
| 1418 |
.name = "bm-c" |
| 1419 |
}, |
| 1420 |
{ ATF_POINTER, 10, offsetof(struct PDU, bm_cs), |
| 1421 |
.tag = (ASN_TAG_CLASS_CONTEXT | (21 << 2)), |
| 1422 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1423 |
.type = &asn_DEF_BMPString, |
| 1424 |
.memb_constraints = memb_bm_cs_constraint_1, |
| 1425 |
.per_constraints = &asn_PER_memb_bm_cs_constr_24, |
| 1426 |
.default_value = 0, |
| 1427 |
.name = "bm-cs" |
| 1428 |
}, |
| 1429 |
{ ATF_POINTER, 9, offsetof(struct PDU, bm_ce), |
| 1430 |
.tag = (ASN_TAG_CLASS_CONTEXT | (22 << 2)), |
| 1431 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1432 |
.type = &asn_DEF_BMPString, |
| 1433 |
.memb_constraints = memb_bm_ce_constraint_1, |
| 1434 |
.per_constraints = &asn_PER_memb_bm_ce_constr_25, |
| 1435 |
.default_value = 0, |
| 1436 |
.name = "bm-ce" |
| 1437 |
}, |
| 1438 |
{ ATF_POINTER, 8, offsetof(struct PDU, bm_ir), |
| 1439 |
.tag = (ASN_TAG_CLASS_CONTEXT | (23 << 2)), |
| 1440 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1441 |
.type = &asn_DEF_BMPString, |
| 1442 |
.memb_constraints = memb_bm_ir_constraint_1, |
| 1443 |
.per_constraints = &asn_PER_memb_bm_ir_constr_26, |
| 1444 |
.default_value = 0, |
| 1445 |
.name = "bm-ir" |
| 1446 |
}, |
| 1447 |
{ ATF_POINTER, 7, offsetof(struct PDU, us), |
| 1448 |
.tag = (ASN_TAG_CLASS_CONTEXT | (24 << 2)), |
| 1449 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1450 |
.type = &asn_DEF_UniversalString, |
| 1451 |
.memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 1452 |
.per_constraints = 0, /* No PER visible constraints */ |
| 1453 |
.default_value = 0, |
| 1454 |
.name = "us" |
| 1455 |
}, |
| 1456 |
{ ATF_POINTER, 6, offsetof(struct PDU, us_c), |
| 1457 |
.tag = (ASN_TAG_CLASS_CONTEXT | (25 << 2)), |
| 1458 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1459 |
.type = &asn_DEF_UniversalString, |
| 1460 |
.memb_constraints = memb_us_c_constraint_1, |
| 1461 |
.per_constraints = &asn_PER_memb_us_c_constr_28, |
| 1462 |
.default_value = 0, |
| 1463 |
.name = "us-c" |
| 1464 |
}, |
| 1465 |
{ ATF_POINTER, 5, offsetof(struct PDU, us_cs), |
| 1466 |
.tag = (ASN_TAG_CLASS_CONTEXT | (26 << 2)), |
| 1467 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1468 |
.type = &asn_DEF_UniversalString, |
| 1469 |
.memb_constraints = memb_us_cs_constraint_1, |
| 1470 |
.per_constraints = &asn_PER_memb_us_cs_constr_29, |
| 1471 |
.default_value = 0, |
| 1472 |
.name = "us-cs" |
| 1473 |
}, |
| 1474 |
{ ATF_POINTER, 4, offsetof(struct PDU, us_ce), |
| 1475 |
.tag = (ASN_TAG_CLASS_CONTEXT | (27 << 2)), |
| 1476 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1477 |
.type = &asn_DEF_UniversalString, |
| 1478 |
.memb_constraints = memb_us_ce_constraint_1, |
| 1479 |
.per_constraints = &asn_PER_memb_us_ce_constr_30, |
| 1480 |
.default_value = 0, |
| 1481 |
.name = "us-ce" |
| 1482 |
}, |
| 1483 |
{ ATF_POINTER, 3, offsetof(struct PDU, us_ir), |
| 1484 |
.tag = (ASN_TAG_CLASS_CONTEXT | (28 << 2)), |
| 1485 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1486 |
.type = &asn_DEF_UniversalString, |
| 1487 |
.memb_constraints = memb_us_ir_constraint_1, |
| 1488 |
.per_constraints = &asn_PER_memb_us_ir_constr_31, |
| 1489 |
.default_value = 0, |
| 1490 |
.name = "us-ir" |
| 1491 |
}, |
| 1492 |
{ ATF_POINTER, 2, offsetof(struct PDU, real), |
| 1493 |
.tag = (ASN_TAG_CLASS_CONTEXT | (29 << 2)), |
| 1494 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1495 |
.type = &asn_DEF_NativeReal, |
| 1496 |
.memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 1497 |
.per_constraints = 0, /* No PER visible constraints */ |
| 1498 |
.default_value = 0, |
| 1499 |
.name = "real" |
| 1500 |
}, |
| 1501 |
{ ATF_POINTER, 1, offsetof(struct PDU, oid), |
| 1502 |
.tag = (ASN_TAG_CLASS_CONTEXT | (30 << 2)), |
| 1503 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1504 |
.type = &asn_DEF_OBJECT_IDENTIFIER, |
| 1505 |
.memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 1506 |
.per_constraints = 0, /* No PER visible constraints */ |
| 1507 |
.default_value = 0, |
| 1508 |
.name = "oid" |
| 1509 |
}, |
| 1510 |
}; |
| 1511 |
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 }; |
| 1512 |
static const ber_tlv_tag_t asn_DEF_PDU_tags_1[] = { |
| 1513 |
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 1514 |
}; |
| 1515 |
static const asn_TYPE_tag2member_t asn_MAP_PDU_tag2el_1[] = { |
| 1516 |
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* many */ |
| 1517 |
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ia5 */ |
| 1518 |
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ia5-c */ |
| 1519 |
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* ia5-ce */ |
| 1520 |
{ (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* ia5-ir */ |
| 1521 |
{ (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* vs */ |
| 1522 |
{ (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* vs-c */ |
| 1523 |
{ (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* vs-ce */ |
| 1524 |
{ (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* vs-ir */ |
| 1525 |
{ (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 }, /* pr */ |
| 1526 |
{ (ASN_TAG_CLASS_CONTEXT | (10 << 2)), 10, 0, 0 }, /* pr-c */ |
| 1527 |
{ (ASN_TAG_CLASS_CONTEXT | (11 << 2)), 11, 0, 0 }, /* pr-ir */ |
| 1528 |
{ (ASN_TAG_CLASS_CONTEXT | (12 << 2)), 12, 0, 0 }, /* ns */ |
| 1529 |
{ (ASN_TAG_CLASS_CONTEXT | (13 << 2)), 13, 0, 0 }, /* ns-c */ |
| 1530 |
{ (ASN_TAG_CLASS_CONTEXT | (14 << 2)), 14, 0, 0 }, /* ns-ce */ |
| 1531 |
{ (ASN_TAG_CLASS_CONTEXT | (15 << 2)), 15, 0, 0 }, /* ns-ir */ |
| 1532 |
{ (ASN_TAG_CLASS_CONTEXT | (16 << 2)), 16, 0, 0 }, /* ut-c */ |
| 1533 |
{ (ASN_TAG_CLASS_CONTEXT | (17 << 2)), 17, 0, 0 }, /* ut-ce */ |
| 1534 |
{ (ASN_TAG_CLASS_CONTEXT | (18 << 2)), 18, 0, 0 }, /* ut-ir */ |
| 1535 |
{ (ASN_TAG_CLASS_CONTEXT | (19 << 2)), 19, 0, 0 }, /* bm */ |
| 1536 |
{ (ASN_TAG_CLASS_CONTEXT | (20 << 2)), 20, 0, 0 }, /* bm-c */ |
| 1537 |
{ (ASN_TAG_CLASS_CONTEXT | (21 << 2)), 21, 0, 0 }, /* bm-cs */ |
| 1538 |
{ (ASN_TAG_CLASS_CONTEXT | (22 << 2)), 22, 0, 0 }, /* bm-ce */ |
| 1539 |
{ (ASN_TAG_CLASS_CONTEXT | (23 << 2)), 23, 0, 0 }, /* bm-ir */ |
| 1540 |
{ (ASN_TAG_CLASS_CONTEXT | (24 << 2)), 24, 0, 0 }, /* us */ |
| 1541 |
{ (ASN_TAG_CLASS_CONTEXT | (25 << 2)), 25, 0, 0 }, /* us-c */ |
| 1542 |
{ (ASN_TAG_CLASS_CONTEXT | (26 << 2)), 26, 0, 0 }, /* us-cs */ |
| 1543 |
{ (ASN_TAG_CLASS_CONTEXT | (27 << 2)), 27, 0, 0 }, /* us-ce */ |
| 1544 |
{ (ASN_TAG_CLASS_CONTEXT | (28 << 2)), 28, 0, 0 }, /* us-ir */ |
| 1545 |
{ (ASN_TAG_CLASS_CONTEXT | (29 << 2)), 29, 0, 0 }, /* real */ |
| 1546 |
{ (ASN_TAG_CLASS_CONTEXT | (30 << 2)), 30, 0, 0 } /* oid */ |
| 1547 |
}; |
| 1548 |
static asn_SEQUENCE_specifics_t asn_SPC_PDU_specs_1 = { |
| 1549 |
sizeof(struct PDU), |
| 1550 |
offsetof(struct PDU, _asn_ctx), |
| 1551 |
asn_MAP_PDU_tag2el_1, |
| 1552 |
31, /* Count of tags in the map */ |
| 1553 |
asn_MAP_PDU_oms_1, /* Optional members */ |
| 1554 |
31, 0, /* Root/Additions */ |
| 1555 |
-1, /* Start extensions */ |
| 1556 |
-1 /* Stop extensions */ |
| 1557 |
}; |
| 1558 |
asn_TYPE_descriptor_t asn_DEF_PDU = { |
| 1559 |
"PDU", |
| 1560 |
"PDU", |
| 1561 |
SEQUENCE_free, |
| 1562 |
SEQUENCE_print, |
| 1563 |
SEQUENCE_constraint, |
| 1564 |
SEQUENCE_decode_ber, |
| 1565 |
SEQUENCE_encode_der, |
| 1566 |
SEQUENCE_decode_xer, |
| 1567 |
SEQUENCE_encode_xer, |
| 1568 |
SEQUENCE_decode_uper, |
| 1569 |
SEQUENCE_encode_uper, |
| 1570 |
0, /* Use generic outmost tag fetcher */ |
| 1571 |
asn_DEF_PDU_tags_1, |
| 1572 |
sizeof(asn_DEF_PDU_tags_1) |
| 1573 |
/sizeof(asn_DEF_PDU_tags_1[0]), /* 1 */ |
| 1574 |
asn_DEF_PDU_tags_1, /* Same as above */ |
| 1575 |
sizeof(asn_DEF_PDU_tags_1) |
| 1576 |
/sizeof(asn_DEF_PDU_tags_1[0]), /* 1 */ |
| 1577 |
0, /* No PER visible constraints */ |
| 1578 |
asn_MBR_PDU_1, |
| 1579 |
31, /* Elements count */ |
| 1580 |
&asn_SPC_PDU_specs_1 /* Additional specs */ |
| 1581 |
}; |
| 1582 |
|