upgrade: PER related changes

git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@1011 59561ff5-6e30-0410-9f3c-9617f08c8826
This commit is contained in:
vlm 2005-11-26 11:25:14 +00:00
parent 1ac75e752a
commit 337167ed3c
119 changed files with 14519 additions and 2306 deletions

View File

@ -1,9 +1,11 @@
0.9.20: 2005-Nov-07
0.9.20: 2005-Nov-13
* SET OF CHOICE, SEQUENCE OF CHOICE and a certain named S/O types
are represented differently in XER. THIS IS AN ICOMPATIBLE CHANGE.
(Test case 70) (Severity: low; Security impact: low)
* PER implementation has started
* asn1c: Removed -ftypes88 command line option.
0.9.19: 2005-Oct-06

7
TODO
View File

@ -1,7 +1,6 @@
1. MAJOR:
1.1 Support for PER encoding. Requires advanced subtype constraints support,
which is already completed.
1.1 Support for PER encoding. PER decoding is already supported.
1.2 Support for Information Object Classes.
Status: Support for parsing IOCs is mostly present.
@ -12,7 +11,3 @@ which is already completed.
2.1 Support for EXTERNAL, EMBEDDED-PDV and CHARACTER STRING types.
Requires something from 1.2 (Information Object Classes).
3. MINOR:
3.1 Support for DEFAULT encoding and decoding, at least in INTEGER/ENUMERATED types.

View File

@ -4,7 +4,7 @@ asn1c \- ASN.1 Compiler
.SH SYNOPSIS
asn1c [\fB\-E\fR [\fB-F\fR] | \fB\-P\fR | \fB\-R\fR]
[\fB\-S\fR\fIdir\fR] [\fB-X\fR]
[\fB\-W\fR\fIdebug-\fR...] [\fB\-f\fR\fIoption\fR...] [\fB\-p\fR\fIrint-\fR...]
[\fB\-W\fR\fIdebug-\fR...] [\fB\-f\fR\fIoption\fR] [\fB\-gen-\fR\fIoption\fR] [\fB\-print-\fR\fIoption\fR]
\fIinfile\fR...
.SH DESCRIPTION
asn1c compiles the ASN.1 specifications into the set of
@ -25,7 +25,11 @@ and other encoding standards.
.br
\fB\-fall-defs-global \-fbless-SIZE \-fcompound-names \-findirect-choice
.BI "\-fknown-extern-type="<name>
\fB\-fnative-types \-fno-constraints \-fno-include-deps \-funnamed-unions \-fskeletons-copy \-ftypes88\fR
\fB\-fnative-types \-fno-constraints \-fno-include-deps \-funnamed-unions \-fskeletons-copy
.TP
\fICodecs Generation Options\fR
.br
.B \-gen-PER
.TP
\fIOutput Options\fR
.br
@ -117,11 +121,10 @@ Enable unnamed unions in the definitions of target language's structures.
.TP
.B \-fskeletons-copy
Copy support files (skeletons) rather than symlink them.
.SH CODECS GENERATION OPTIONS
.TP
.B \-ftypes88
Pretend to support only ASN.1:1988 embedded types. Certain reserved words,
such as UniversalString and BMPString, become ordinary type references
and may be redefined by the specification.
.B \-gen-PER
Generate Packed Encoding Rules (PER) support code.
.SH OUTPUT OPTIONS
.TP
.B \-print-constraints

View File

@ -62,7 +62,7 @@ main(int ac, char **av) {
/*
* Process command-line options.
*/
while((ch = getopt(ac, av, "EFf:hLPp:RS:vW:X")) != -1)
while((ch = getopt(ac, av, "EFf:g:hLPp:RS:vW:X")) != -1)
switch(ch) {
case 'E':
print_arg__print_out = 1;
@ -95,13 +95,19 @@ main(int ac, char **av) {
asn1_compiler_flags |= A1C_UNNAMED_UNIONS;
} else if(strcmp(optarg, "skeletons-copy") == 0) {
asn1_compiler_flags |= A1C_SKELETONS_COPY;
} else if(strcmp(optarg, "types88") == 0) {
asn1_parser_flags |= A1P_TYPES_RESTRICT_TO_1988;
} else {
fprintf(stderr, "-f%s: Invalid argument\n", optarg);
exit(EX_USAGE);
}
break;
case 'g':
if(strcmp(optarg, "en-PER") == 0) {
asn1_compiler_flags |= A1C_GEN_PER;
} else {
fprintf(stderr, "-g%s: Invalid argument\n", optarg);
exit(EX_USAGE);
}
break;
case 'h':
usage(av[0]);
case 'P':
@ -109,7 +115,15 @@ main(int ac, char **av) {
asn1_compiler_flags &= ~A1C_NO_C99;
break;
case 'p':
if(strcmp(optarg, "rint-constraints") == 0) {
if(strncmp(optarg, "du=", 3) == 0) {
char *pduname = optarg + 3;
if(strcmp(pduname, "auto")) {
fprintf(stderr, "-pdu=%s: expected -pdu=auto\n",
pduname);
exit(EX_USAGE);
}
asn1_compiler_flags |= A1C_PDU_AUTO;
} else if(strcmp(optarg, "rint-constraints") == 0) {
asn1_printer_flags |= APF_DEBUG_CONSTRAINTS;
} else if(strcmp(optarg, "rint-lines") == 0) {
asn1_printer_flags |= APF_LINE_COMMENTS;
@ -250,7 +264,8 @@ main(int ac, char **av) {
/*
* Make sure the skeleton directory is out there.
*/
if(skeletons_dir == NULL) {
if((asn1_compiler_flags & A1C_OMIT_SUPPORT_CODE) == 0
&& skeletons_dir == NULL) {
struct stat sb;
skeletons_dir = DATADIR;
if((av[-optind][0] == '.' || av[-optind][1] == '/')
@ -326,7 +341,10 @@ usage(const char *av0) {
" -fno-include-deps Do not generate courtesy #includes for dependencies\n"
" -funnamed-unions Enable unnamed unions in structures\n"
" -fskeletons-copy Force copying the support files\n"
" -ftypes88 Pretend to support only ASN.1:1988 embedded types\n"
"\n"
" -gen-PER Generate PER support code\n"
" -pdu=auto Generate PDU table (discover PDUs automatically)\n"
"\n"
" -print-constraints Explain subtype constraints (debug)\n"

View File

@ -102,8 +102,8 @@ check(int is_ok, uint8_t *buf, int size, size_t consumed) {
assert(rval.code == RC_OK);
assert(rval.consumed == consumed);
assert(strcmp(t.e->buf, "xyz") == 0);
assert(strcmp(t.f->buf, "love_it") == 0);
assert(strcmp((char *)t.e->buf, "xyz") == 0);
assert(strcmp((char *)t.f->buf, "love_it") == 0);
assert(t.g->size == 2);
assert(t.g->bits_unused == 2);

View File

@ -36,8 +36,12 @@ _buf_writer(const void *buffer, size_t size, void *app_key) {
b = buf + buf_offset;
bend = b + size;
fprintf(stderr, "=> [");
for(; b < bend; b++)
fprintf(stderr, "%c", *b);
for(; b < bend; b++) {
if(*b >= 32 && *b < 127 && *b != '%')
fprintf(stderr, "%c", *b);
else
fprintf(stderr, "%%02x", *b);
}
fprintf(stderr, "]:%ld\n", (long)size);
buf_offset += size;
return 0;

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
#include "asn1c_out.h"
#include <asn1fix_crange.h> /* constraint groker from libasn1fix */
#include <asn1fix_export.h> /* other exportable stuff from libasn1fix */
#include <asn1fix_export.h> /* other exportables from libasn1fix */
static int asn1c_emit_constraint_tables(arg_t *arg, int got_size);
static int emit_alphabet_check_loop(arg_t *arg, asn1cnst_range_t *range);

View File

@ -66,7 +66,12 @@ asn1c_read_file_dependencies(arg_t *arg, const char *datadir) {
asn1c_fdeps_t *cur;
char buf[4096];
FILE *f;
int hit_COMMON_FILES = 0;
enum {
SS_DYNAMIC, /* Dynamic list of dependencies */
SS_CODEC_PER, /* Use contents only if -gen-PER */
SS_COMMON_FILES, /* Section for dependencies */
SS_IGNORE /* Ignore contents of this section */
} special_section = SS_DYNAMIC;
(void)arg;
@ -91,17 +96,27 @@ asn1c_read_file_dependencies(arg_t *arg, const char *datadir) {
for(p = strtok(buf, " \t\r\n"); p;
p = strtok(NULL, " \t\r\n")) {
asn1c_fdeps_t *d;
/*
* If hit "COMMON-FILES:", treat everything else
* as a huge dependency.
* Special "prefix" section.
*/
if(strcmp(p, "COMMON-FILES:") == 0) {
hit_COMMON_FILES = 1;
if(strchr(p, ':')) {
special_section = SS_IGNORE;
if(strcmp(p, "COMMON-FILES:") == 0) {
special_section = SS_COMMON_FILES;
} else if((arg->flags & A1C_GEN_PER)
&& strcmp(p, "CODEC-PER:") == 0) {
special_section = SS_CODEC_PER;
}
break;
}
if(special_section == SS_IGNORE)
continue;
d = asn1c_new_dep(p);
assert(d);
d->used_somewhere = hit_COMMON_FILES;
d->used_somewhere = special_section;
if(asn1c_dep_add(cur, d) == 1)
cur = d;

View File

@ -11,6 +11,7 @@ static int asn1c_print_streams(arg_t *arg);
static int asn1c_save_streams(arg_t *arg, asn1c_fdeps_t *);
static int asn1c_copy_over(arg_t *arg, char *path);
static int identical_files(const char *fname1, const char *fname2);
static int generate_pdu_collection_file(arg_t *arg);
int
asn1c_save_compiled_output(arg_t *arg, const char *datadir,
@ -18,7 +19,7 @@ asn1c_save_compiled_output(arg_t *arg, const char *datadir,
asn1c_fdeps_t *deps = 0;
asn1c_fdeps_t *dlist;
asn1p_module_t *mod;
FILE *mkf;
FILE *mkf; /* Makefile.am.sample */
int i;
deps = asn1c_read_file_dependencies(arg, datadir);
@ -108,6 +109,12 @@ asn1c_save_compiled_output(arg_t *arg, const char *datadir,
}
}
if(arg->flags & A1C_PDU_AUTO) {
fprintf(mkf, "ASN_MODULE_SOURCES+=pdu_collection.c\n");
if(generate_pdu_collection_file(arg))
return -1;
}
fprintf(mkf, "\n\n"
"lib_LTLIBRARIES=libsomething.la\n"
"libsomething_la_SOURCES="
@ -438,3 +445,62 @@ asn1c_copy_over(arg_t *arg, char *path) {
return 1;
}
static int
generate_pdu_collection_file(arg_t *arg) {
asn1p_module_t *mod;
FILE *fp;
fp = asn1c_open_file("pdu_collection", ".c", 0);
if(fp == NULL) {
perror("pdu_collection.c");
return -1;
}
fprintf(fp,
"/*\n"
" * Generated by asn1c-" VERSION " (http://lionet.info/asn1c)\n"
" */\n\n");
fprintf(fp, "struct asn_TYPE_descriptor_s;\t"
"/* Forward declaration */\n\n");
TQ_FOR(mod, &(arg->asn->modules), mod_next) {
TQ_FOR(arg->expr, &(mod->members), next) {
if(arg->expr->_type_referenced
|| !asn1_lang_map[arg->expr->meta_type]
[arg->expr->expr_type].type_cb)
continue;
fprintf(fp, "extern struct asn_TYPE_descriptor_s "
"asn_DEF_%s;\n",
asn1c_make_identifier(0, arg->expr->Identifier,
NULL));
}
}
fprintf(fp, "\n\n");
fprintf(fp, "struct asn_TYPE_descriptor_s *asn_pdu_collection[] = {\n");
TQ_FOR(mod, &(arg->asn->modules), mod_next) {
int mod_printed = 0;
TQ_FOR(arg->expr, &(mod->members), next) {
if(arg->expr->_type_referenced
|| !asn1_lang_map[arg->expr->meta_type]
[arg->expr->expr_type].type_cb)
continue;
if(!mod_printed++)
fprintf(fp, "\t/* From module %s in %s */\n",
arg->expr->module->ModuleName,
arg->expr->module->source_file_name);
fprintf(fp, "\t&asn_DEF_%s,\t\n",
asn1c_make_identifier(0, arg->expr->Identifier,
NULL));
}
}
fprintf(fp, "\t0\n};\n\n");
fclose(fp);
fprintf(stderr, "Generated pdu_collection.c\n");
return 0;
}

View File

@ -56,6 +56,16 @@ enum asn1c_flags {
* Copy support files rather than symlink them.
*/
A1C_SKELETONS_COPY = 0x0800,
/*
* -gen-PER
* Generate PER support code
*/
A1C_GEN_PER = 0x1000,
/*
* -pdu=auto
* Generate PDU table
*/
A1C_PDU_AUTO = 0x2000
};
/*

View File

@ -1,7 +1,5 @@
#include "asn1fix_internal.h"
#define AFT_MAGIC_ANY 1 /* _fetch_tag() flag */
static int _asn1f_check_if_tag_must_be_explicit(arg_t *arg, asn1p_expr_t *v);
static int _asn1f_compare_tags(arg_t *arg, asn1p_expr_t *a, asn1p_expr_t *b);
static int _asn1f_fix_type_tag(arg_t *arg, asn1p_expr_t *expr);
@ -337,6 +335,7 @@ asn1f_check_constr_tags_distinct(arg_t *arg) {
case ASN_CONSTR_SEQUENCE:
case ASN_CONSTR_SET:
case ASN_CONSTR_CHOICE:
DEBUG("Checking tags of members of constructed types");
break;
default:
return 0;
@ -353,6 +352,8 @@ asn1f_check_constr_tags_distinct(arg_t *arg) {
if(expr->expr_type != ASN_CONSTR_SEQUENCE || v->marker.flags) {
asn1p_expr_t *nv;
for(nv = v; (nv = TQ_NEXT(nv, next));) {
DEBUG("S/C comparing tags %s s. %s",
v->Identifier, nv->Identifier);
if(_asn1f_compare_tags(arg, v, nv))
r_value = -1;
if(expr->expr_type == ASN_CONSTR_SEQUENCE
@ -404,12 +405,15 @@ _asn1f_compare_tags(arg_t *arg, asn1p_expr_t *a, asn1p_expr_t *b) {
int ra, rb;
int ret;
ra = asn1f_fetch_outmost_tag(arg->asn, arg->mod, a, &ta, AFT_MAGIC_ANY);
rb = asn1f_fetch_outmost_tag(arg->asn, arg->mod, b, &tb, AFT_MAGIC_ANY);
ra = asn1f_fetch_outmost_tag(arg->asn, arg->mod, a,
&ta, AFT_IMAGINARY_ANY);
rb = asn1f_fetch_outmost_tag(arg->asn, arg->mod, b,
&tb, AFT_IMAGINARY_ANY);
/*
* If both tags are explicitly or implicitly given, use them.
*/
DEBUG("Fetching outmost tags: %d, %d", ra, rb);
if(ra == 0 && rb == 0) {
/*
* Simple case: fetched both tags.

View File

@ -370,6 +370,7 @@ asn1f_find_terminal_thing(arg_t *arg, asn1p_expr_t *expr, enum ftt_what what) {
return NULL;
}
tc->_type_referenced = 1;
tc->_mark |= TM_RECURSION;
WITH_MODULE(tc->module,
expr = asn1f_find_terminal_thing(arg, tc, what));

View File

@ -18,6 +18,9 @@
if((flags & AFT_FETCH_OUTMOST)) return count; \
} while(0)
/* X.691, #22.2 */
static int asn1f_fetch_minimal_choice_root_tag(arg_t *arg, struct asn1p_type_tag_s *tag, enum asn1f_aft_flags_e flags);
static int
asn1f_fetch_tags_impl(arg_t *arg, struct asn1p_type_tag_s **tags, int count, int skip, enum asn1f_aft_flags_e flags) {
asn1p_expr_t *expr = arg->expr;
@ -44,9 +47,13 @@ asn1f_fetch_tags_impl(arg_t *arg, struct asn1p_type_tag_s **tags, int count, int
if(expr->expr_type == ASN_TYPE_ANY
&& (flags & AFT_IMAGINARY_ANY))
tt.tag_value = -1;
else if(expr->expr_type == ASN_CONSTR_CHOICE)
return count ? count : -1;
else
else if(expr->expr_type != ASN_CONSTR_CHOICE)
return -1;
else if(count) return count;
else if((flags & AFT_CANON_CHOICE) == 0)
return -1;
else if(asn1f_fetch_minimal_choice_root_tag(arg,
&tt, flags))
return -1;
}
ADD_TAG(skip, tt);
@ -55,6 +62,7 @@ asn1f_fetch_tags_impl(arg_t *arg, struct asn1p_type_tag_s **tags, int count, int
if(expr->meta_type == AMT_TYPEREF) {
asn1p_expr_t *nexpr;
DEBUG("Following the reference %s", expr->Identifier);
nexpr = asn1f_lookup_symbol(arg, expr->module, expr->reference);
if(nexpr == NULL) {
if(errno != EEXIST) /* -fknown-extern-type */
@ -87,18 +95,52 @@ asn1f_fetch_tags_impl(arg_t *arg, struct asn1p_type_tag_s **tags, int count, int
return count;
}
DEBUG("No tags discovered for type %d", expr->expr_type);
return -1;
}
static int
asn1f_fetch_minimal_choice_root_tag(arg_t *arg, struct asn1p_type_tag_s *tag, enum asn1f_aft_flags_e flags) {
struct asn1p_type_tag_s min_tag;
asn1p_expr_t *v;
memset(&min_tag, 0, sizeof(min_tag));
min_tag.tag_class = TC_PRIVATE + 1;
TQ_FOR(v, &(arg->expr->members), next) {
arg_t tmparg = *arg;
struct asn1p_type_tag_s *tags = 0;
int count;
if(v->expr_type == A1TC_EXTENSIBLE)
break; /* Search only within extension root */
tmparg.expr = v;
count = asn1f_fetch_tags_impl(&tmparg, &tags, 0, 0, flags);
if(count <= 0) continue;
if(tags[0].tag_class < min_tag.tag_class)
min_tag = tags[0];
else if(tags[0].tag_class == min_tag.tag_class
&& tags[0].tag_value < min_tag.tag_value)
min_tag = tags[0];
free(tags);
}
if(min_tag.tag_class == TC_PRIVATE + 1)
return -1;
else
*tag = min_tag;
return 0;
}
int
asn1f_fetch_outmost_tag(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *expr, struct asn1p_type_tag_s *tag, int _aft_imaginary_any) {
asn1f_fetch_outmost_tag(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *expr, struct asn1p_type_tag_s *tag, enum asn1f_aft_flags_e flags) {
struct asn1p_type_tag_s *tags;
enum asn1f_aft_flags_e flags;
int count;
flags = AFT_FETCH_OUTMOST;
flags |= AFT_IMAGINARY_ANY * _aft_imaginary_any;
flags |= AFT_FETCH_OUTMOST;
count = asn1f_fetch_tags(asn, mod, expr, &tags, flags);
if(count <= 0) return count;

View File

@ -5,6 +5,7 @@ enum asn1f_aft_flags_e {
AFT_IMAGINARY_ANY = 0x01, /* Treat ANY tag as [IMAGINARY ANY] */
AFT_FETCH_OUTMOST = 0x02, /* Fetch only outmost tag */
AFT_FULL_COLLECT = 0x04, /* Collect all tags */
AFT_CANON_CHOICE = 0x08, /* Fetch the minimal CHOICE root tag */
};
/*
@ -24,6 +25,6 @@ int asn1f_fetch_tags(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *expr,
* Type3 ::= SEQUENCE { ... }
* Will yield [2] for Type1.
*/
int asn1f_fetch_outmost_tag(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *expr, struct asn1p_type_tag_s *tag, int _aft_imaginary_any);
int asn1f_fetch_outmost_tag(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *expr, struct asn1p_type_tag_s *tag, enum asn1f_aft_flags_e);
#endif /* _ASN1FIX_TAGS_H_ */

View File

@ -21,8 +21,10 @@ asn_TYPE_descriptor_t asn_DEF_ANY = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_hex,
ANY_encode_xer,
0,
0, /* Use generic outmost tag fetcher */
0, 0, 0, 0,
0, /* No PER visible constraints */
0, 0, /* No members */
&asn_DEF_ANY_specs,
};

View File

@ -27,6 +27,7 @@ asn_TYPE_descriptor_t asn_DEF_BIT_STRING = {
OCTET_STRING_encode_der, /* Implemented in terms of OCTET STRING */
OCTET_STRING_decode_xer_binary,
BIT_STRING_encode_xer,
OCTET_STRING_decode_uper, /* Unaligned PER decoder */
0, /* Use generic outmost tag fetcher */
asn_DEF_BIT_STRING_tags,
sizeof(asn_DEF_BIT_STRING_tags)
@ -34,6 +35,7 @@ asn_TYPE_descriptor_t asn_DEF_BIT_STRING = {
asn_DEF_BIT_STRING_tags, /* Same as above */
sizeof(asn_DEF_BIT_STRING_tags)
/ sizeof(asn_DEF_BIT_STRING_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
&asn_DEF_BIT_STRING_specs
};
@ -124,9 +126,7 @@ BIT_STRING_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
if(!xcan) _i_ASN_TEXT_INDENT(1, ilevel - 1);
er.structure_ptr = 0;
er.failed_type = 0;
return er;
_ASN_ENCODED_OK(er);
cb_failed:
_ASN_ENCODE_FAILED;
}

View File

@ -23,6 +23,7 @@ asn_TYPE_descriptor_t asn_DEF_BMPString = {
OCTET_STRING_encode_der,
BMPString_decode_xer, /* Convert from UTF-8 */
BMPString_encode_xer, /* Convert to UTF-8 */
0,
0, /* Use generic outmost tag fetcher */
asn_DEF_BMPString_tags,
sizeof(asn_DEF_BMPString_tags)
@ -30,6 +31,7 @@ asn_TYPE_descriptor_t asn_DEF_BMPString = {
asn_DEF_BMPString_tags,
sizeof(asn_DEF_BMPString_tags)
/ sizeof(asn_DEF_BMPString_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@ -156,7 +158,7 @@ BMPString_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
er.encoded = BMPString__dump(st, cb, app_key);
if(er.encoded < 0) _ASN_ENCODE_FAILED;
return er;
_ASN_ENCODED_OK(er);
}
int

View File

@ -1,5 +1,5 @@
/*-
* Copyright (c) 2003 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Copyright (c) 2003, 2005 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#include <asn_internal.h>
@ -22,11 +22,13 @@ asn_TYPE_descriptor_t asn_DEF_BOOLEAN = {
BOOLEAN_encode_der,
BOOLEAN_decode_xer,
BOOLEAN_encode_xer,
BOOLEAN_decode_uper, /* Unaligned PER decoder */
0, /* Use generic outmost tag fetcher */
asn_DEF_BOOLEAN_tags,
sizeof(asn_DEF_BOOLEAN_tags) / sizeof(asn_DEF_BOOLEAN_tags[0]),
asn_DEF_BOOLEAN_tags, /* Same as above */
sizeof(asn_DEF_BOOLEAN_tags) / sizeof(asn_DEF_BOOLEAN_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@ -126,7 +128,7 @@ BOOLEAN_encode_der(asn_TYPE_descriptor_t *td, void *sptr,
erval.encoded += 1;
return erval;
_ASN_ENCODED_OK(erval);
}
@ -196,7 +198,7 @@ BOOLEAN_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
er.encoded = 8;
}
return er;
_ASN_ENCODED_OK(er);
cb_failed:
_ASN_ENCODE_FAILED;
}
@ -234,3 +236,33 @@ BOOLEAN_free(asn_TYPE_descriptor_t *td, void *ptr, int contents_only) {
}
}
asn_dec_rval_t
BOOLEAN_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
asn_dec_rval_t rv;
BOOLEAN_t *st = (BOOLEAN_t *)*sptr;
(void)opt_codec_ctx;
(void)constraints;
if(!st) {
st = (BOOLEAN_t *)(*sptr = MALLOC(sizeof(*st)));
if(!st) _ASN_DECODE_FAILED;
}
/*
* Extract a single bit
*/
switch(per_get_few_bits(pd, 1)) {
case 1: *st = 1; break;
case 0: *st = 0; break;
case -1: default: _ASN_DECODE_FAILED;
}
ASN_DEBUG("%s decoded as %s", td->name, *st ? "TRUE" : "FALSE");
rv.code = RC_OK;
rv.consumed = 1;
return rv;
}

View File

@ -26,6 +26,7 @@ ber_type_decoder_f BOOLEAN_decode_ber;
der_type_encoder_f BOOLEAN_encode_der;
xer_type_decoder_f BOOLEAN_decode_xer;
xer_type_encoder_f BOOLEAN_encode_xer;
per_type_decoder_f BOOLEAN_decode_uper;
#ifdef __cplusplus
}

View File

@ -1,9 +1,10 @@
/*-
* Copyright (c) 2003 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Copyright (c) 2003, 2005 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#include <asn_internal.h>
#include <ENUMERATED.h>
#include <NativeEnumerated.h>
#include <asn_codecs_prim.h> /* Encoder and decoder of a primitive type */
/*
@ -22,12 +23,33 @@ asn_TYPE_descriptor_t asn_DEF_ENUMERATED = {
INTEGER_encode_der, /* Implemented in terms of INTEGER */
INTEGER_decode_xer, /* This is temporary! */
INTEGER_encode_xer,
ENUMERATED_decode_uper, /* Unaligned PER decoder */
0, /* Use generic outmost tag fetcher */
asn_DEF_ENUMERATED_tags,
sizeof(asn_DEF_ENUMERATED_tags) / sizeof(asn_DEF_ENUMERATED_tags[0]),
asn_DEF_ENUMERATED_tags, /* Same as above */
sizeof(asn_DEF_ENUMERATED_tags) / sizeof(asn_DEF_ENUMERATED_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
asn_dec_rval_t
ENUMERATED_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
asn_dec_rval_t rval;
ENUMERATED_t *st = (ENUMERATED_t *)*sptr;
long value, *vptr = &value;
if(!st) {
st = (ENUMERATED_t *)(*sptr = CALLOC(1, sizeof(*st)));
if(!st) _ASN_DECODE_FAILED;
}
rval = NativeEnumerated_decode_uper(opt_codec_ctx, td, constraints,
(void **)&vptr, pd);
if(rval.code == RC_OK)
if(asn_long2INTEGER(st, value))
rval.code = RC_FAIL;
return rval;
}

View File

@ -1,5 +1,5 @@
/*-
* Copyright (c) 2003 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Copyright (c) 2003, 2005 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#ifndef _ENUMERATED_H_
@ -15,6 +15,8 @@ typedef INTEGER_t ENUMERATED_t; /* Implemented via INTEGER */
extern asn_TYPE_descriptor_t asn_DEF_ENUMERATED;
per_type_decoder_f ENUMERATED_decode_uper;
#ifdef __cplusplus
}
#endif

View File

@ -22,6 +22,7 @@ asn_TYPE_descriptor_t asn_DEF_GeneralString = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_hex,
OCTET_STRING_encode_xer,
0,
0, /* Use generic outmost tag fetcher */
asn_DEF_GeneralString_tags,
sizeof(asn_DEF_GeneralString_tags)
@ -29,6 +30,7 @@ asn_TYPE_descriptor_t asn_DEF_GeneralString = {
asn_DEF_GeneralString_tags,
sizeof(asn_DEF_GeneralString_tags)
/ sizeof(asn_DEF_GeneralString_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};

View File

@ -128,6 +128,7 @@ asn_TYPE_descriptor_t asn_DEF_GeneralizedTime = {
GeneralizedTime_encode_der,
OCTET_STRING_decode_xer_utf8,
GeneralizedTime_encode_xer,
0,
0, /* Use generic outmost tag fetcher */
asn_DEF_GeneralizedTime_tags,
sizeof(asn_DEF_GeneralizedTime_tags)
@ -135,6 +136,7 @@ asn_TYPE_descriptor_t asn_DEF_GeneralizedTime = {
asn_DEF_GeneralizedTime_tags,
sizeof(asn_DEF_GeneralizedTime_tags)
/ sizeof(asn_DEF_GeneralizedTime_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};

View File

@ -22,6 +22,7 @@ asn_TYPE_descriptor_t asn_DEF_GraphicString = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_hex,
OCTET_STRING_encode_xer, /* Can't expect it to be ASCII/UTF8 */
0,
0, /* Use generic outmost tag fetcher */
asn_DEF_GraphicString_tags,
sizeof(asn_DEF_GraphicString_tags)
@ -29,6 +30,7 @@ asn_TYPE_descriptor_t asn_DEF_GraphicString = {
asn_DEF_GraphicString_tags,
sizeof(asn_DEF_GraphicString_tags)
/ sizeof(asn_DEF_GraphicString_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};

View File

@ -22,6 +22,7 @@ asn_TYPE_descriptor_t asn_DEF_IA5String = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_utf8,
OCTET_STRING_encode_xer_utf8,
0,
0, /* Use generic outmost tag fetcher */
asn_DEF_IA5String_tags,
sizeof(asn_DEF_IA5String_tags)
@ -29,6 +30,7 @@ asn_TYPE_descriptor_t asn_DEF_IA5String = {
asn_DEF_IA5String_tags,
sizeof(asn_DEF_IA5String_tags)
/ sizeof(asn_DEF_IA5String_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};

View File

@ -24,11 +24,13 @@ asn_TYPE_descriptor_t asn_DEF_INTEGER = {
INTEGER_encode_der,
INTEGER_decode_xer,
INTEGER_encode_xer,
INTEGER_decode_uper, /* Unaligned PER decoder */
0, /* Use generic outmost tag fetcher */
asn_DEF_INTEGER_tags,
sizeof(asn_DEF_INTEGER_tags) / sizeof(asn_DEF_INTEGER_tags[0]),
asn_DEF_INTEGER_tags, /* Same as above */
sizeof(asn_DEF_INTEGER_tags) / sizeof(asn_DEF_INTEGER_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@ -430,9 +432,102 @@ INTEGER_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
er.encoded = INTEGER__dump(td, st, cb, app_key, 1);
if(er.encoded < 0) _ASN_ENCODE_FAILED;
er.structure_ptr = 0;
er.failed_type = 0;
return er;
_ASN_ENCODED_OK(er);
}
asn_dec_rval_t
INTEGER_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
asn_dec_rval_t rval = { RC_OK, 0 };
INTEGER_t *st = (INTEGER_t *)*sptr;
asn_per_constraint_t *ct;
int repeat;
(void)opt_codec_ctx;
if(!st) {
st = (INTEGER_t *)(*sptr = CALLOC(1, sizeof(*st)));
if(!st) _ASN_DECODE_FAILED;
}
if(!constraints) constraints = td->per_constraints;
ct = constraints ? &constraints->value : 0;
if(ct && ct->flags & APC_EXTENSIBLE) {
int inext = per_get_few_bits(pd, 1);
if(inext < 0) _ASN_DECODE_FAILED;
if(inext) ct = 0;
}
FREEMEM(st->buf);
if(ct) {
if(ct->flags & APC_SEMI_CONSTRAINED) {
st->buf = (uint8_t *)CALLOC(1, 2);
if(!st->buf) _ASN_DECODE_FAILED;
st->size = 1;
} else if(ct->flags & APC_CONSTRAINED && ct->range_bits >= 0) {
size_t size = (ct->range_bits + 7) >> 3;
st->buf = (uint8_t *)MALLOC(1 + size + 1);
if(!st->buf) _ASN_DECODE_FAILED;
st->size = size;
} else {
st->size = 0;
}
} else {
st->size = 0;
}
/* X.691, #12.2.2 */
if(ct && ct->flags != APC_UNCONSTRAINED) {
/* #10.5.6 */
ASN_DEBUG("Integer with range %d bits", ct->range_bits);
if(ct->range_bits >= 0) {
long value = per_get_few_bits(pd, ct->range_bits);
if(value < 0) _ASN_DECODE_FAILED;
ASN_DEBUG("Got value %ld + low %ld",
value, ct->lower_bound);
value += ct->lower_bound;
if(asn_long2INTEGER(st, value))
_ASN_DECODE_FAILED;
return rval;
}
} else {
ASN_DEBUG("Decoding unconstrained integer %s", td->name);
}
/* X.691, #12.2.3, #12.2.4 */
do {
ssize_t len;
void *p;
int ret;
/* Get the PER length */
len = uper_get_length(pd, -1, &repeat);
if(len < 0) _ASN_DECODE_FAILED;
p = REALLOC(st->buf, st->size + len + 1);
if(!p) _ASN_DECODE_FAILED;
st->buf = (uint8_t *)p;
ret = per_get_many_bits(pd, &st->buf[st->size], 0, 8 * len);
if(ret < 0) _ASN_DECODE_FAILED;
st->size += len;
} while(repeat);
st->buf[st->size] = 0; /* JIC */
/* #12.2.3 */
if(ct && ct->lower_bound) {
/*
* TODO: replace by in-place arithmetics.
*/
long value;
if(asn_INTEGER2long(st, &value))
_ASN_DECODE_FAILED;
if(asn_long2INTEGER(st, value + ct->lower_bound))
_ASN_DECODE_FAILED;
}
return rval;
}
int

View File

@ -28,7 +28,7 @@ typedef struct asn_INTEGER_specifics_s {
asn_INTEGER_enum_map_t *value2enum; /* N -> "tag"; sorted by N */
unsigned int *enum2value; /* "tag" => N; sorted by tag */
int map_count; /* Elements in either map */
int extensible; /* This map is extensible */
int extension; /* This map is extensible */
int strict_enumeration; /* Enumeration set is fixed */
} asn_INTEGER_specifics_t;
@ -37,6 +37,7 @@ ber_type_decoder_f INTEGER_decode_ber;
der_type_encoder_f INTEGER_encode_der;
xer_type_decoder_f INTEGER_decode_xer;
xer_type_encoder_f INTEGER_encode_xer;
per_type_decoder_f INTEGER_decode_uper;
/***********************************
* Some handy conversion routines. *

View File

@ -22,6 +22,7 @@ asn_TYPE_descriptor_t asn_DEF_ISO646String = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_utf8,
OCTET_STRING_encode_xer_utf8,
0,
0, /* Use generic outmost tag fetcher */
asn_DEF_ISO646String_tags,
sizeof(asn_DEF_ISO646String_tags)
@ -29,6 +30,7 @@ asn_TYPE_descriptor_t asn_DEF_ISO646String = {
asn_DEF_ISO646String_tags,
sizeof(asn_DEF_ISO646String_tags)
/ sizeof(asn_DEF_ISO646String_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};

View File

@ -1,5 +1,5 @@
/*-
* Copyright (c) 2003 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Copyright (c) 2003, 2005 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#include <asn_internal.h>
@ -23,11 +23,13 @@ asn_TYPE_descriptor_t asn_DEF_NULL = {
NULL_encode_der, /* Special handling of DER encoding */
NULL_decode_xer,
NULL_encode_xer,
NULL_decode_uper, /* Unaligned PER decoder */
0, /* Use generic outmost tag fetcher */
asn_DEF_NULL_tags,
sizeof(asn_DEF_NULL_tags) / sizeof(asn_DEF_NULL_tags[0]),
asn_DEF_NULL_tags, /* Same as above */
sizeof(asn_DEF_NULL_tags) / sizeof(asn_DEF_NULL_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@ -44,7 +46,7 @@ NULL_encode_der(asn_TYPE_descriptor_t *td, void *ptr,
erval.structure_ptr = ptr;
}
return erval;
_ASN_ENCODED_OK(erval);
}
asn_enc_rval_t
@ -62,8 +64,7 @@ NULL_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
/* XMLNullValue is empty */
er.encoded = 0;
return er;
_ASN_ENCODED_OK(er);
}
@ -101,3 +102,31 @@ NULL_print(asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
return (cb("<absent>", 8, app_key) < 0) ? -1 : 0;
}
}
asn_dec_rval_t
NULL_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
asn_dec_rval_t rv;
(void)opt_codec_ctx;
(void)td;
(void)constraints;
(void)pd;
if(!*sptr) {
*sptr = MALLOC(sizeof(NULL_t));
if(*sptr) {
*(NULL_t *)*sptr = 0;
} else {
_ASN_DECODE_FAILED;
}
}
/*
* NULL type does not have content octets.
*/
rv.code = RC_OK;
rv.consumed = 0;
return rv;
}

View File

@ -23,6 +23,7 @@ asn_struct_print_f NULL_print;
der_type_encoder_f NULL_encode_der;
xer_type_decoder_f NULL_decode_xer;
xer_type_encoder_f NULL_encode_xer;
per_type_decoder_f NULL_decode_uper;
#ifdef __cplusplus
}

View File

@ -28,11 +28,13 @@ asn_TYPE_descriptor_t asn_DEF_NativeEnumerated = {
NativeInteger_encode_der,
NativeInteger_decode_xer,
NativeEnumerated_encode_xer,
NativeEnumerated_decode_uper,
0, /* Use generic outmost tag fetcher */
asn_DEF_NativeEnumerated_tags,
sizeof(asn_DEF_NativeEnumerated_tags) / sizeof(asn_DEF_NativeEnumerated_tags[0]),
asn_DEF_NativeEnumerated_tags, /* Same as above */
sizeof(asn_DEF_NativeEnumerated_tags) / sizeof(asn_DEF_NativeEnumerated_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@ -59,13 +61,65 @@ NativeEnumerated_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
er.encoded = snprintf(src, srcsize, "<%s/>", el->enum_name);
assert(er.encoded > 0 && (size_t)er.encoded < srcsize);
if(cb(src, er.encoded, app_key) < 0) _ASN_ENCODE_FAILED;
return er;
_ASN_ENCODED_OK(er);
} else {
ASN_DEBUG("ASN.1 forbids dealing with "
"unknown value of ENUMERATED type");
_ASN_ENCODE_FAILED;
}
return er;
}
asn_dec_rval_t
NativeEnumerated_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
asn_INTEGER_specifics_t *specs = (asn_INTEGER_specifics_t *)td->specifics;
asn_dec_rval_t rval = { RC_OK, 0 };
long *native = (long *)*sptr;
asn_per_constraint_t *ct;
long value;
(void)opt_codec_ctx;
if(constraints) ct = &constraints->value;
else if(td->per_constraints) ct = &td->per_constraints->value;
else _ASN_DECODE_FAILED; /* Mandatory! */
if(!specs) _ASN_DECODE_FAILED;
if(!native) {
native = (long *)(*sptr = CALLOC(1, sizeof(*native)));
if(!native) _ASN_DECODE_FAILED;
}
ASN_DEBUG("Decoding %s as NativeEnumerated", td->name);
if(ct->flags & APC_EXTENSIBLE) {
int inext = per_get_few_bits(pd, 1);
if(inext < 0) _ASN_DECODE_FAILED;
if(inext) ct = 0;
}
if(ct && ct->range_bits >= 0) {
value = per_get_few_bits(pd, ct->range_bits);
if(value < 0) _ASN_DECODE_FAILED;
if(value >= (specs->extension
? specs->extension - 1 : specs->map_count))
_ASN_DECODE_FAILED;
} else {
if(!specs->extension)
_ASN_DECODE_FAILED;
/*
* X.691, #10.6: normally small non-negative whole number;
*/
value = uper_get_nsnnwn(pd);
if(value < 0) _ASN_DECODE_FAILED;
value += specs->extension - 1;
if(value >= specs->map_count)
_ASN_DECODE_FAILED;
}
*native = specs->value2enum[value].nat_value;
ASN_DEBUG("Decoded %s = %ld", td->name, *native);
return rval;
}

View File

@ -21,6 +21,7 @@ extern "C" {
extern asn_TYPE_descriptor_t asn_DEF_NativeEnumerated;
xer_type_encoder_f NativeEnumerated_encode_xer;
per_type_decoder_f NativeEnumerated_decode_uper;
#ifdef __cplusplus
}

View File

@ -28,11 +28,13 @@ asn_TYPE_descriptor_t asn_DEF_NativeInteger = {
NativeInteger_encode_der,
NativeInteger_decode_xer,
NativeInteger_encode_xer,
NativeInteger_decode_uper, /* Unaligned PER decoder */
0, /* Use generic outmost tag fetcher */
asn_DEF_NativeInteger_tags,
sizeof(asn_DEF_NativeInteger_tags) / sizeof(asn_DEF_NativeInteger_tags[0]),
asn_DEF_NativeInteger_tags, /* Same as above */
sizeof(asn_DEF_NativeInteger_tags) / sizeof(asn_DEF_NativeInteger_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@ -108,18 +110,6 @@ NativeInteger_decode_ber(asn_codec_ctx_t *opt_codec_ctx,
}
*native = l;
/*
* Note that native integer size might be other than long.
* This expression hopefully will be optimized away
* by compiler.
*/
if(sizeof(*native) != sizeof(long) && ((long)*native != l)) {
*native = 0; /* Safe value */
rval.code = RC_FAIL;
rval.consumed = 0;
return rval;
}
}
rval.code = RC_OK;
@ -176,38 +166,25 @@ NativeInteger_decode_xer(asn_codec_ctx_t *opt_codec_ctx,
asn_TYPE_descriptor_t *td, void **sptr, const char *opt_mname,
const void *buf_ptr, size_t size) {
asn_dec_rval_t rval;
INTEGER_t *st = 0;
INTEGER_t st;
void *st_ptr = (void *)&st;
long *native = (long *)*sptr;
if(!native) {
*sptr = CALLOC(1, sizeof(int));
native = (long *)*sptr;
if(!native) {
rval.code = RC_FAIL;
rval.consumed = 0;
return rval;
}
native = (long *)(*sptr = CALLOC(1, sizeof(*native)));
if(!native) _ASN_DECODE_FAILED;
}
rval = INTEGER_decode_xer(opt_codec_ctx, td, (void **)st_ptr,
memset(&st, 0, sizeof(st));
rval = INTEGER_decode_xer(opt_codec_ctx, td, &st_ptr,
opt_mname, buf_ptr, size);
if(rval.code == RC_OK) {
long l;
if(asn_INTEGER2long(st, &l)) {
if(asn_INTEGER2long(&st, &l)) {
rval.code = RC_FAIL;
rval.consumed = 0;
} else {
*native = l;
/* Native type might be shorter than long */
if(sizeof(*native) != sizeof(long)
&& ((long)*native != l)) {
*native = 0; /* Safe value */
rval.code = RC_FAIL;
rval.consumed = 0;
return rval;
}
}
} else {
/*
@ -217,7 +194,7 @@ NativeInteger_decode_xer(asn_codec_ctx_t *opt_codec_ctx,
*/
rval.consumed = 0;
}
asn_DEF_INTEGER.free_struct(&asn_DEF_INTEGER, st, 0);
asn_DEF_INTEGER.free_struct(&asn_DEF_INTEGER, &st, 1);
return rval;
}
@ -240,7 +217,39 @@ NativeInteger_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
|| cb(scratch, er.encoded, app_key) < 0)
_ASN_ENCODE_FAILED;
return er;
_ASN_ENCODED_OK(er);
}
asn_dec_rval_t
NativeInteger_decode_uper(asn_codec_ctx_t *opt_codec_ctx,
asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
asn_dec_rval_t rval;
long *native = (long *)*sptr;
INTEGER_t tmpint;
void *tmpintptr = &tmpint;
(void)opt_codec_ctx;
ASN_DEBUG("Decoding NativeInteger %s (UPER)", td->name);
if(!native) {
native = (long *)(*sptr = CALLOC(1, sizeof(*native)));
if(!native) _ASN_DECODE_FAILED;
}
memset(&tmpint, 0, sizeof tmpint);
rval = INTEGER_decode_uper(opt_codec_ctx, td, constraints,
&tmpintptr, pd);
if(rval.code == RC_OK)
if(asn_INTEGER2long(&tmpint, native))
rval.code = RC_FAIL;
else
ASN_DEBUG("NativeInteger %s got value %ld",
td->name, *native);
asn_DEF_INTEGER.free_struct(&asn_DEF_INTEGER, &tmpint, 1);
return rval;
}
/*

View File

@ -27,6 +27,7 @@ ber_type_decoder_f NativeInteger_decode_ber;
der_type_encoder_f NativeInteger_encode_der;
xer_type_decoder_f NativeInteger_decode_xer;
xer_type_encoder_f NativeInteger_encode_xer;
per_type_decoder_f NativeInteger_decode_uper;
#ifdef __cplusplus
}

View File

@ -29,11 +29,13 @@ asn_TYPE_descriptor_t asn_DEF_NativeReal = {
NativeReal_encode_der,
NativeReal_decode_xer,
NativeReal_encode_xer,
0,
0, /* Use generic outmost tag fetcher */
asn_DEF_NativeReal_tags,
sizeof(asn_DEF_NativeReal_tags) / sizeof(asn_DEF_NativeReal_tags[0]),
asn_DEF_NativeReal_tags, /* Same as above */
sizeof(asn_DEF_NativeReal_tags) / sizeof(asn_DEF_NativeReal_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@ -206,7 +208,7 @@ NativeReal_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
er.encoded = REAL__dump(*Dbl, flags & XER_F_CANONICAL, cb, app_key);
if(er.encoded < 0) _ASN_ENCODE_FAILED;
return er;
_ASN_ENCODED_OK(er);
}
/*

View File

@ -22,6 +22,7 @@ asn_TYPE_descriptor_t asn_DEF_NumericString = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_utf8,
OCTET_STRING_encode_xer_utf8,
0,
0, /* Use generic outmost tag fetcher */
asn_DEF_NumericString_tags,
sizeof(asn_DEF_NumericString_tags)
@ -29,6 +30,7 @@ asn_TYPE_descriptor_t asn_DEF_NumericString = {
asn_DEF_NumericString_tags,
sizeof(asn_DEF_NumericString_tags)
/ sizeof(asn_DEF_NumericString_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};

View File

@ -23,6 +23,7 @@ asn_TYPE_descriptor_t asn_DEF_OBJECT_IDENTIFIER = {
der_encode_primitive,
OBJECT_IDENTIFIER_decode_xer,
OBJECT_IDENTIFIER_encode_xer,
0,
0, /* Use generic outmost tag fetcher */
asn_DEF_OBJECT_IDENTIFIER_tags,
sizeof(asn_DEF_OBJECT_IDENTIFIER_tags)
@ -30,6 +31,7 @@ asn_TYPE_descriptor_t asn_DEF_OBJECT_IDENTIFIER = {
asn_DEF_OBJECT_IDENTIFIER_tags, /* Same as above */
sizeof(asn_DEF_OBJECT_IDENTIFIER_tags)
/ sizeof(asn_DEF_OBJECT_IDENTIFIER_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@ -332,9 +334,7 @@ OBJECT_IDENTIFIER_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
er.encoded = OBJECT_IDENTIFIER__dump_body(st, cb, app_key);
if(er.encoded < 0) _ASN_ENCODE_FAILED;
er.structure_ptr = 0;
er.failed_type = 0;
return er;
_ASN_ENCODED_OK(er);
}
int

View File

@ -19,6 +19,9 @@ static asn_OCTET_STRING_specifics_t asn_DEF_OCTET_STRING_specs = {
offsetof(OCTET_STRING_t, _asn_ctx),
0
};
static asn_per_constraint_t asn_DEF_OCTET_STRING_constraint = {
APC_SEMI_CONSTRAINED, -1, 0, 0, 0
};
asn_TYPE_descriptor_t asn_DEF_OCTET_STRING = {
"OCTET STRING", /* Canonical name */
"OCTET_STRING", /* XML tag name */
@ -29,6 +32,7 @@ asn_TYPE_descriptor_t asn_DEF_OCTET_STRING = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_hex,
OCTET_STRING_encode_xer,
OCTET_STRING_decode_uper, /* Unaligned PER decoder */
0, /* Use generic outmost tag fetcher */
asn_DEF_OCTET_STRING_tags,
sizeof(asn_DEF_OCTET_STRING_tags)
@ -36,6 +40,7 @@ asn_TYPE_descriptor_t asn_DEF_OCTET_STRING = {
asn_DEF_OCTET_STRING_tags, /* Same as above */
sizeof(asn_DEF_OCTET_STRING_tags)
/ sizeof(asn_DEF_OCTET_STRING_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
&asn_DEF_OCTET_STRING_specs
};
@ -61,9 +66,10 @@ asn_TYPE_descriptor_t asn_DEF_OCTET_STRING = {
#undef RETURN
#define RETURN(_code) do { \
rval.code = _code; \
rval.consumed = consumed_myself; \
return rval; \
asn_dec_rval_t tmprval; \
tmprval.code = _code; \
tmprval.consumed = consumed_myself; \
return tmprval; \
} while(0)
#undef APPEND
@ -167,11 +173,11 @@ _new_stack() {
asn_dec_rval_t
OCTET_STRING_decode_ber(asn_codec_ctx_t *opt_codec_ctx,
asn_TYPE_descriptor_t *td,
void **os_structure, const void *buf_ptr, size_t size, int tag_mode) {
void **sptr, const void *buf_ptr, size_t size, int tag_mode) {
asn_OCTET_STRING_specifics_t *specs = td->specifics
? (asn_OCTET_STRING_specifics_t *)td->specifics
: &asn_DEF_OCTET_STRING_specs;
BIT_STRING_t *st = (BIT_STRING_t *)*os_structure;
BIT_STRING_t *st = (BIT_STRING_t *)*sptr;
asn_dec_rval_t rval;
asn_struct_ctx_t *ctx;
ssize_t consumed_myself = 0;
@ -190,10 +196,8 @@ OCTET_STRING_decode_ber(asn_codec_ctx_t *opt_codec_ctx,
* Create the string if does not exist.
*/
if(st == NULL) {
*os_structure = CALLOC(1, specs->struct_size);
st = (BIT_STRING_t *)*os_structure;
if(st == NULL)
RETURN(RC_FAIL);
st = (BIT_STRING_t *)(*sptr = CALLOC(1, specs->struct_size));
if(st == NULL) RETURN(RC_FAIL);
}
/* Restore parsing context */
@ -549,9 +553,7 @@ OCTET_STRING_encode_der(asn_TYPE_descriptor_t *td, void *sptr,
if(!cb) {
er.encoded += (type_variant == _TT_BIT_STRING) + st->size;
er.structure_ptr = 0;
er.failed_type = 0;
return er;
_ASN_ENCODED_OK(er);
}
/*
@ -574,9 +576,7 @@ OCTET_STRING_encode_der(asn_TYPE_descriptor_t *td, void *sptr,
}
er.encoded += st->size;
er.structure_ptr = 0;
er.failed_type = 0;
return er;
_ASN_ENCODED_OK(er);
cb_failed:
_ASN_ENCODE_FAILED;
}
@ -639,9 +639,7 @@ OCTET_STRING_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
}
}
er.structure_ptr = 0;
er.failed_type = 0;
return er;
_ASN_ENCODED_OK(er);
cb_failed:
_ASN_ENCODE_FAILED;
}
@ -781,9 +779,7 @@ OCTET_STRING_encode_xer_utf8(asn_TYPE_descriptor_t *td, void *sptr,
_ASN_ENCODE_FAILED;
er.encoded = encoded_len;
er.structure_ptr = 0;
er.failed_type = 0;
return er;
_ASN_ENCODED_OK(er);
}
/*
@ -1200,6 +1196,99 @@ OCTET_STRING_decode_xer_utf8(asn_codec_ctx_t *opt_codec_ctx,
OCTET_STRING__convert_entrefs);
}
asn_dec_rval_t
OCTET_STRING_decode_uper(asn_codec_ctx_t *opt_codec_ctx,
asn_TYPE_descriptor_t *td, asn_per_constraints_t *constraints,
void **sptr, asn_per_data_t *pd) {
asn_OCTET_STRING_specifics_t *specs = td->specifics
? (asn_OCTET_STRING_specifics_t *)td->specifics
: &asn_DEF_OCTET_STRING_specs;
asn_per_constraint_t *ct = constraints ? &constraints->size
: (td->per_constraints
? &td->per_constraints->size
: &asn_DEF_OCTET_STRING_constraint);
asn_dec_rval_t rval = { RC_OK, 0 };
BIT_STRING_t *st = (BIT_STRING_t *)*sptr;
ssize_t consumed_myself = 0;
int repeat;
int unit_bits = (specs->subvariant != 1) * 7 + 1;
(void)opt_codec_ctx;
/*
* Allocate the string.
*/
if(!st) {
st = (BIT_STRING_t *)(*sptr = CALLOC(1, specs->struct_size));
if(!st) RETURN(RC_FAIL);
}
if(ct->flags & APC_EXTENSIBLE) {
int inext = per_get_few_bits(pd, 1);
if(inext < 0) RETURN(RC_FAIL);
if(inext) ct = &asn_DEF_OCTET_STRING_constraint;
consumed_myself = 0;
}
if(ct->effective_bits >= 0
&& (!st->buf || st->size < ct->upper_bound)) {
FREEMEM(st->buf);
if(unit_bits == 1) {
st->size = (ct->upper_bound + 7) >> 3;
} else {
st->size = ct->upper_bound;
}
st->buf = (uint8_t *)MALLOC(st->size + 1);
if(!st->buf) { st->size = 0; RETURN(RC_FAIL); }
}
/* X.691, #16.5: zero-length encoding */
/* X.691, #16.6: short fixed length encoding (up to 2 octets) */
/* X.691, #16.7: long fixed length encoding (up to 64K octets) */
if(ct->effective_bits == 0) {
int ret = per_get_many_bits(pd, st->buf, 0,
unit_bits * ct->upper_bound);
if(ret < 0) RETURN(RC_FAIL);
consumed_myself += unit_bits * ct->upper_bound;
st->buf[st->size] = 0;
if(unit_bits == 1 && (ct->upper_bound & 0x7))
st->bits_unused = 8 - (ct->upper_bound & 0x7);
RETURN(RC_OK);
}
st->size = 0;
do {
ssize_t len_bytes;
ssize_t len_bits;
void *p;
int ret;
/* Get the PER length */
len_bits = uper_get_length(pd, ct->effective_bits, &repeat);
if(len_bits < 0) RETURN(RC_FAIL);
if(unit_bits == 1) {
len_bytes = (len_bits + 7) >> 3;
if(len_bits & 0x7)
st->bits_unused = 8 - (len_bits & 0x7);
/* len_bits be multiple of 16K if repeat is set */
} else {
len_bytes = len_bits;
len_bits = len_bytes << 3;
}
p = REALLOC(st->buf, st->size + len_bytes + 1);
if(!p) RETURN(RC_FAIL);
st->buf = (uint8_t *)p;
ret = per_get_many_bits(pd, &st->buf[st->size], 0, len_bits);
if(ret < 0) RETURN(RC_FAIL);
st->size += len_bytes;
} while(repeat);
st->buf[st->size] = 0; /* nul-terminate */
return rval;
}
int
OCTET_STRING_print(asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,

View File

@ -30,6 +30,7 @@ xer_type_decoder_f OCTET_STRING_decode_xer_binary; /* 01010111010 */
xer_type_decoder_f OCTET_STRING_decode_xer_utf8; /* ASCII/UTF-8 */
xer_type_encoder_f OCTET_STRING_encode_xer;
xer_type_encoder_f OCTET_STRING_encode_xer_utf8;
per_type_decoder_f OCTET_STRING_decode_uper;
/******************************
* Handy conversion routines. *

View File

@ -22,6 +22,7 @@ asn_TYPE_descriptor_t asn_DEF_ObjectDescriptor = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_utf8,
OCTET_STRING_encode_xer_utf8,
0,
0, /* Use generic outmost tag fetcher */
asn_DEF_ObjectDescriptor_tags,
sizeof(asn_DEF_ObjectDescriptor_tags)
@ -29,6 +30,7 @@ asn_TYPE_descriptor_t asn_DEF_ObjectDescriptor = {
asn_DEF_ObjectDescriptor_tags,
sizeof(asn_DEF_ObjectDescriptor_tags)
/ sizeof(asn_DEF_ObjectDescriptor_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};

View File

@ -22,6 +22,7 @@ asn_TYPE_descriptor_t asn_DEF_PrintableString = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_utf8,
OCTET_STRING_encode_xer_utf8,
0,
0, /* Use generic outmost tag fetcher */
asn_DEF_PrintableString_tags,
sizeof(asn_DEF_PrintableString_tags)
@ -29,6 +30,7 @@ asn_TYPE_descriptor_t asn_DEF_PrintableString = {
asn_DEF_PrintableString_tags,
sizeof(asn_DEF_PrintableString_tags)
/ sizeof(asn_DEF_PrintableString_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};

View File

@ -1,6 +1,4 @@
Here are the canonical encoder/decoder algorithms that work with the tables
constructed by the compiler. The compiler itself does not generate code,
it just creates those tables and then copies (links) over these files
which contain generic algorithms.
This directory contains encoder/decoder code for various encoding rules
(PER, DER, BER, XER) that work with the tables constructed by the compiler.
The compiler itself does not generate much code. It creates parsing tables
and then copies (links) over these files which contain generic codecs.

View File

@ -42,11 +42,13 @@ asn_TYPE_descriptor_t asn_DEF_REAL = {
der_encode_primitive,
REAL_decode_xer,
REAL_encode_xer,
0,
0, /* Use generic outmost tag fetcher */
asn_DEF_REAL_tags,
sizeof(asn_DEF_REAL_tags) / sizeof(asn_DEF_REAL_tags[0]),
asn_DEF_REAL_tags, /* Same as above */
sizeof(asn_DEF_REAL_tags) / sizeof(asn_DEF_REAL_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@ -257,9 +259,7 @@ REAL_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
er.encoded = REAL__dump(d, flags & XER_F_CANONICAL, cb, app_key);
if(er.encoded < 0) _ASN_ENCODE_FAILED;
er.structure_ptr = 0;
er.failed_type = 0;
return er;
_ASN_ENCODED_OK(er);
}

View File

@ -25,6 +25,7 @@ asn_TYPE_descriptor_t asn_DEF_RELATIVE_OID = {
der_encode_primitive,
RELATIVE_OID_decode_xer,
RELATIVE_OID_encode_xer,
0,
0, /* Use generic outmost tag fetcher */
asn_DEF_RELATIVE_OID_tags,
sizeof(asn_DEF_RELATIVE_OID_tags)
@ -32,6 +33,7 @@ asn_TYPE_descriptor_t asn_DEF_RELATIVE_OID = {
asn_DEF_RELATIVE_OID_tags, /* Same as above */
sizeof(asn_DEF_RELATIVE_OID_tags)
/ sizeof(asn_DEF_RELATIVE_OID_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@ -156,9 +158,7 @@ RELATIVE_OID_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
er.encoded = RELATIVE_OID__dump_body(st, cb, app_key);
if(er.encoded < 0) _ASN_ENCODE_FAILED;
er.structure_ptr = 0;
er.failed_type = 0;
return er;
_ASN_ENCODED_OK(er);
}
int

View File

@ -22,6 +22,7 @@ asn_TYPE_descriptor_t asn_DEF_T61String = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_hex,
OCTET_STRING_encode_xer,
0,
0, /* Use generic outmost tag fetcher */
asn_DEF_T61String_tags,
sizeof(asn_DEF_T61String_tags)
@ -29,6 +30,7 @@ asn_TYPE_descriptor_t asn_DEF_T61String = {
asn_DEF_T61String_tags,
sizeof(asn_DEF_T61String_tags)
/ sizeof(asn_DEF_T61String_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};

View File

@ -22,6 +22,7 @@ asn_TYPE_descriptor_t asn_DEF_TeletexString = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_hex,
OCTET_STRING_encode_xer,
0,
0, /* Use generic outmost tag fetcher */
asn_DEF_TeletexString_tags,
sizeof(asn_DEF_TeletexString_tags)
@ -29,6 +30,7 @@ asn_TYPE_descriptor_t asn_DEF_TeletexString = {
asn_DEF_TeletexString_tags,
sizeof(asn_DEF_TeletexString_tags)
/ sizeof(asn_DEF_TeletexString_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};

View File

@ -28,6 +28,7 @@ asn_TYPE_descriptor_t asn_DEF_UTCTime = {
OCTET_STRING_encode_der, /* Implemented in terms of OCTET STRING */
OCTET_STRING_decode_xer_utf8,
UTCTime_encode_xer,
0,
0, /* Use generic outmost tag fetcher */
asn_DEF_UTCTime_tags,
sizeof(asn_DEF_UTCTime_tags)
@ -35,6 +36,7 @@ asn_TYPE_descriptor_t asn_DEF_UTCTime = {
asn_DEF_UTCTime_tags,
sizeof(asn_DEF_UTCTime_tags)
/ sizeof(asn_DEF_UTCTime_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};

View File

@ -22,6 +22,7 @@ asn_TYPE_descriptor_t asn_DEF_UTF8String = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_utf8,
OCTET_STRING_encode_xer_utf8,
0,
0, /* Use generic outmost tag fetcher */
asn_DEF_UTF8String_tags,
sizeof(asn_DEF_UTF8String_tags)
@ -29,6 +30,7 @@ asn_TYPE_descriptor_t asn_DEF_UTF8String = {
asn_DEF_UTF8String_tags,
sizeof(asn_DEF_UTF8String_tags)
/ sizeof(asn_DEF_UTF8String_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};

View File

@ -23,6 +23,7 @@ asn_TYPE_descriptor_t asn_DEF_UniversalString = {
OCTET_STRING_encode_der,
UniversalString_decode_xer, /* Convert from UTF-8 */
UniversalString_encode_xer, /* Convert into UTF-8 */
0,
0, /* Use generic outmost tag fetcher */
asn_DEF_UniversalString_tags,
sizeof(asn_DEF_UniversalString_tags)
@ -30,6 +31,7 @@ asn_TYPE_descriptor_t asn_DEF_UniversalString = {
asn_DEF_UniversalString_tags,
sizeof(asn_DEF_UniversalString_tags)
/ sizeof(asn_DEF_UniversalString_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@ -167,7 +169,7 @@ UniversalString_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
er.encoded = UniversalString__dump(st, cb, app_key);
if(er.encoded < 0) _ASN_ENCODE_FAILED;
return er;
_ASN_ENCODED_OK(er);
}
int

View File

@ -22,6 +22,7 @@ asn_TYPE_descriptor_t asn_DEF_VideotexString = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_hex,
OCTET_STRING_encode_xer,
0,
0, /* Use generic outmost tag fetcher */
asn_DEF_VideotexString_tags,
sizeof(asn_DEF_VideotexString_tags)
@ -29,6 +30,7 @@ asn_TYPE_descriptor_t asn_DEF_VideotexString = {
asn_DEF_VideotexString_tags,
sizeof(asn_DEF_VideotexString_tags)
/ sizeof(asn_DEF_VideotexString_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};

View File

@ -22,6 +22,7 @@ asn_TYPE_descriptor_t asn_DEF_VisibleString = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_utf8,
OCTET_STRING_encode_xer_utf8,
0,
0, /* Use generic outmost tag fetcher */
asn_DEF_VisibleString_tags,
sizeof(asn_DEF_VisibleString_tags)
@ -29,6 +30,7 @@ asn_TYPE_descriptor_t asn_DEF_VisibleString = {
asn_DEF_VisibleString_tags,
sizeof(asn_DEF_VisibleString_tags)
/ sizeof(asn_DEF_VisibleString_tags[0]),
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};

View File

@ -21,7 +21,9 @@
#include <asn_application.h>
extern asn_TYPE_descriptor_t asn_DEF; /* ASN.1 type to be decoded */
static asn_TYPE_descriptor_t *pduType = &asn_DEF;
#ifdef ASN_PDU_COLLECTION /* Generated by asn1c: -pdu=... */
extern asn_TYPE_descriptor_t *asn_pdu_collection[];
#endif
/*
* Open file and parse its contens.
@ -37,7 +39,8 @@ static int opt_stack; /* -s */
/* Input data format selector */
static enum input_format {
INP_BER, /* -iber: BER input */
INP_XER /* -ixer: XER input */
INP_XER, /* -ixer: XER input */
INP_PER /* -iper: Unaligned PER input */
} iform; /* -i<format> */
/* Output data format selector */
@ -56,19 +59,26 @@ static enum output_format {
int
main(int ac, char **av) {
static asn_TYPE_descriptor_t *pduType = &asn_DEF;
ssize_t suggested_bufsize = 8192; /* close or equal to stdio buffer */
int number_of_iterations = 1;
int num;
int ch;
/* Figure out if Unaligned PER needs to be default */
if(pduType->uper_decoder)
iform = INP_PER;
/*
* Pocess the command-line argments.
*/
while((ch = getopt(ac, av, "i:o:b:cdn:hs:")) != -1)
while((ch = getopt(ac, av, "i:o:b:cdn:p:hs:")) != -1)
switch(ch) {
case 'i':
if(optarg[0] == 'b') { iform = INP_BER; break; }
if(optarg[0] == 'x') { iform = INP_XER; break; }
if(pduType->uper_decoder
&& optarg[0] == 'p') { iform = INP_PER; break; }
fprintf(stderr, "-i<format>: '%s': improper format selector",
optarg);
exit(EX_UNAVAILABLE);
@ -80,6 +90,21 @@ main(int ac, char **av) {
fprintf(stderr, "-o<format>: '%s': improper format selector",
optarg);
exit(EX_UNAVAILABLE);
case 'p':
#ifdef ASN_PDU_COLLECTION
{
asn_TYPE_descriptor_t **pdu = asn_pdu_collection;
if(optarg[0] < 'A' || optarg[0] > 'Z') {
fprintf(stderr, "Available PDU types:\n");
for(; *pdu; pdu++) printf("%s\n", (*pdu)->name);
exit(0);
}
while(*pdu && strcmp((*pdu)->name, optarg)) pdu++;
if(*pdu) { pduType = *pdu; break; }
}
#endif /* ASN_PDU_COLLECTION */
fprintf(stderr, "-p %s: Unrecognized PDU\n", optarg);
exit(EX_UNAVAILABLE);
case 'b':
suggested_bufsize = atoi(optarg);
if(suggested_bufsize < 1
@ -115,21 +140,32 @@ main(int ac, char **av) {
break;
case 'h':
default:
fprintf(stderr, "Usage: %s [options] <data.ber> ...\n", av[0]);
fprintf(stderr, "Where options are:\n");
if(pduType->uper_decoder)
fprintf(stderr,
" -iper (I) Input is in Unaligned PER (Packed Encoding Rules)\n");
fprintf(stderr,
" -iber %s Input is in BER (Basic Encoding Rules)\n",
iform == INP_PER ? " " : "(I)");
fprintf(stderr,
"Usage: %s [options] <data.ber> ...\n"
"Where options are:\n"
" -iber (I) Input is in BER (Basic Encoding Rules)\n"
" -ixer Input is in XER (XML Encoding Rules)\n"
" -oder Output in DER (Distinguished Encoding Rules)\n"
" -oxer (O) Output in XER (XML Encoding Rules)\n"
" -otext Output in plain semi-structured text (dump)\n"
" -onull Verify (decode) input, but do not output\n"
" -onull Verify (decode) input, but do not output\n");
#ifdef ASN_PDU_COLLECTION
fprintf(stderr,
" -p <PDU> Specify PDU type to decode\n"
" -p list List available PDUs\n");
#endif /* ASN_PDU_COLLECTION */
fprintf(stderr,
" -b <size> Set the i/o buffer size (default is %ld)\n"
" -c Check ASN.1 constraints after decoding\n"
" -d Enable debugging (-dd is even better)\n"
" -n <num> Process files <num> times\n"
" -s <size> Set the stack usage limit\n"
, av[0], (long)suggested_bufsize);
, (long)suggested_bufsize);
exit(EX_USAGE);
}
@ -210,7 +246,8 @@ main(int ac, char **av) {
/* Dump the buffer */
static int write_out(const void *buffer, size_t size, void *key) {
return (fwrite(buffer, 1, size, key) == size) ? 0 : -1;
FILE *fp = (FILE *)key;
return (fwrite(buffer, 1, size, fp) == size) ? 0 : -1;
}
static char *buffer;
@ -302,6 +339,7 @@ static void *data_decode_from_file(asn_TYPE_descriptor_t *pduType, const char *f
rval.consumed = 0;
while((rd = fread(fbuf, 1, fbuf_size, fp)) || !feof(fp)) {
asn_per_data_t pd;
char *i_bptr;
size_t i_size;
@ -330,6 +368,13 @@ static void *data_decode_from_file(asn_TYPE_descriptor_t *pduType, const char *f
rval = xer_decode(opt_codec_ctx, pduType,
(void **)&structure, i_bptr, i_size);
break;
case INP_PER:
pd.buffer = (uint8_t *)i_bptr;
pd.nboff = 0;
pd.nbits = i_size * 8;
rval = pduType->uper_decoder(opt_codec_ctx, pduType, 0,
(void **)&structure, &pd);
break;
}
DEBUG("decode(%ld) consumed %ld, code %d",
(long)buf_len, (long)rval.consumed, rval.code);

View File

@ -1,5 +1,6 @@
/*-
* Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Copyright (c) 2003, 2004, 2005 Lev Walkin <vlm@lionet.info>.
* All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#ifndef _ASN_CODECS_H_
@ -61,6 +62,11 @@ typedef struct asn_enc_rval_s {
tmp_error.structure_ptr = sptr; \
return tmp_error; \
} while(0)
#define _ASN_ENCODED_OK(rval) do { \
rval.structure_ptr = 0; \
rval.failed_type = 0; \
return rval; \
} while(0)
/*
* Type of the return value of the decoding functions (ber_decode, xer_decode)
@ -79,6 +85,12 @@ typedef struct asn_dec_rval_s {
enum asn_dec_rval_code_e code; /* Result code */
size_t consumed; /* Number of bytes consumed */
} asn_dec_rval_t;
#define _ASN_DECODE_FAILED do { \
asn_dec_rval_t tmp_error; \
tmp_error.code = RC_FAIL; \
tmp_error.consumed = 0; \
return tmp_error; \
} while(0)
#ifdef __cplusplus
}

View File

@ -119,9 +119,7 @@ der_encode_primitive(asn_TYPE_descriptor_t *td, void *sptr,
}
erval.encoded += st->size;
erval.structure_ptr = 0;
erval.failed_type = 0;
return erval;
_ASN_ENCODED_OK(erval);
}
void

View File

@ -118,7 +118,7 @@ CHOICE_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
ssize_t consumed_myself = 0; /* Consumed bytes from ptr */
ASN_DEBUG("Decoding %s as CHOICE", td->name);
/*
* Create the target structure if it is not present already.
*/
@ -196,7 +196,7 @@ CHOICE_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
NEXT_PHASE(ctx);
ctx->step = t2m->el_no;
break;
} else if(specs->extensible == 0) {
} else if(specs->ext_start == -1) {
ASN_DEBUG("Unexpected tag %s "
"in non-extensible CHOICE %s",
ber_tlv_tag_string(tlv_tag), td->name);
@ -252,16 +252,16 @@ CHOICE_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
memb_ptr = (char *)st + elm->memb_offset;
memb_ptr2 = &memb_ptr;
}
/* Set presence to be able to free it properly at any time */
_set_present_idx(st, specs->pres_offset,
specs->pres_size, ctx->step + 1);
/*
* Invoke the member fetch routine according to member's type
*/
rval = elm->type->ber_decoder(opt_codec_ctx, elm->type,
memb_ptr2, ptr, LEFT,
elm->tag_mode);
memb_ptr2, ptr, LEFT, elm->tag_mode);
switch(rval.code) {
case RC_OK:
_set_present_idx(st, specs->pres_offset,
specs->pres_size, ctx->step + 1);
break;
case RC_WMORE: /* More data expected */
if(!SIZE_VIOLATION) {
@ -377,7 +377,7 @@ CHOICE_encode_der(asn_TYPE_descriptor_t *td, void *sptr,
if(present == 0 && td->elements_count == 0) {
/* The CHOICE is empty?! */
erval.encoded = 0;
return erval;
_ASN_ENCODED_OK(erval);
}
_ASN_ENCODE_FAILED;
}
@ -391,7 +391,7 @@ CHOICE_encode_der(asn_TYPE_descriptor_t *td, void *sptr,
if(memb_ptr == 0) {
if(elm->optional) {
erval.encoded = 0;
return erval;
_ASN_ENCODED_OK(erval);
}
/* Mandatory element absent */
_ASN_ENCODE_FAILED;
@ -729,7 +729,7 @@ CHOICE_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
continue;
/* It is expected extension */
if(specs->extensible) {
if(specs->ext_start != -1) {
ASN_DEBUG("Got anticipated extension");
/*
* Check for (XCT_BOTH or XCT_UNKNOWN_BO)
@ -810,11 +810,86 @@ CHOICE_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
if(!(flags & XER_F_CANONICAL)) _i_ASN_TEXT_INDENT(1, ilevel - 1);
return er;
_ASN_ENCODED_OK(er);
cb_failed:
_ASN_ENCODE_FAILED;
}
asn_dec_rval_t
CHOICE_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
asn_CHOICE_specifics_t *specs = (asn_CHOICE_specifics_t *)td->specifics;
asn_dec_rval_t rv;
asn_per_constraint_t *ct;
asn_TYPE_member_t *elm; /* CHOICE's element */
void *memb_ptr;
void **memb_ptr2;
void *st = *sptr;
int value;
/*
* Create the target structure if it is not present already.
*/
if(!st) {
st = *sptr = CALLOC(1, specs->struct_size);
if(!st) _ASN_DECODE_FAILED;
}
if(constraints) ct = &constraints->value;
else if(td->per_constraints) ct = &td->per_constraints->value;
else ct = 0;
if(ct && ct->flags & APC_EXTENSIBLE) {
value = per_get_few_bits(pd, 1);
if(value < 0) _ASN_DECODE_FAILED;
if(value) ct = 0; /* Not restricted */
}
if(ct && ct->range_bits >= 0) {
value = per_get_few_bits(pd, ct->range_bits);
if(value < 0) _ASN_DECODE_FAILED;
if(value > ct->upper_bound)
_ASN_DECODE_FAILED;
ASN_DEBUG("CHOICE %s got index %d in range %d",
td->name, value, ct->range_bits);
} else {
if(specs->ext_start == -1)
_ASN_DECODE_FAILED;
value = uper_get_nsnnwn(pd);
if(value < 0) _ASN_DECODE_FAILED;
value += specs->ext_start;
if(value >= td->elements_count)
_ASN_DECODE_FAILED;
ASN_DEBUG("NOT IMPLEMENTED YET");
_ASN_DECODE_FAILED;
}
/* Adjust if canonical order is different from natural order */
if(specs->canonical_order)
value = specs->canonical_order[value];
/* Set presence to be able to free it later */
_set_present_idx(st, specs->pres_offset, specs->pres_size, value + 1);
elm = &td->elements[value];
if(elm->flags & ATF_POINTER) {
/* Member is a pointer to another structure */
memb_ptr2 = (void **)((char *)st + elm->memb_offset);
} else {
memb_ptr = (char *)st + elm->memb_offset;
memb_ptr2 = &memb_ptr;
}
ASN_DEBUG("Discovered CHOICE %s encodes %s", td->name, elm->name);
rv = elm->type->uper_decoder(opt_codec_ctx, elm->type,
elm->per_constraints, memb_ptr2, pd);
if(rv.code != RC_OK)
ASN_DEBUG("Failed to decode %s in %s (CHOICE)",
elm->name, td->name);
return rv;
}
int
CHOICE_print(asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
asn_app_consume_bytes_f *cb, void *app_key) {

View File

@ -1,5 +1,6 @@
/*-
* Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Copyright (c) 2003, 2004, 2005 Lev Walkin <vlm@lionet.info>.
* All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#ifndef _CONSTR_CHOICE_H_
@ -26,10 +27,13 @@ typedef struct asn_CHOICE_specifics_s {
asn_TYPE_tag2member_t *tag2el;
int tag2el_count;
/* Canonical ordering of CHOICE elements, for PER */
int *canonical_order;
/*
* Extensions-related stuff.
*/
int extensible; /* Whether CHOICE is extensible */
int ext_start; /* First member of extensions, or -1 */
} asn_CHOICE_specifics_t;
/*
@ -42,6 +46,7 @@ ber_type_decoder_f CHOICE_decode_ber;
der_type_encoder_f CHOICE_encode_der;
xer_type_decoder_f CHOICE_decode_xer;
xer_type_encoder_f CHOICE_encode_xer;
per_type_decoder_f CHOICE_decode_uper;
asn_outmost_tag_f CHOICE_outmost_tag;
#ifdef __cplusplus

View File

@ -551,7 +551,7 @@ SEQUENCE_encode_der(asn_TYPE_descriptor_t *td,
_ASN_ENCODE_FAILED;
erval.encoded = computed_size + ret;
if(!cb) return erval;
if(!cb) _ASN_ENCODED_OK(erval);
/*
* Encode all members.
@ -583,7 +583,7 @@ SEQUENCE_encode_der(asn_TYPE_descriptor_t *td,
*/
_ASN_ENCODE_FAILED;
return erval;
_ASN_ENCODED_OK(erval);
}
@ -883,7 +883,7 @@ SEQUENCE_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
if(!xcan) _i_ASN_TEXT_INDENT(1, ilevel - 1);
return er;
_ASN_ENCODED_OK(er);
cb_failed:
_ASN_ENCODE_FAILED;
}
@ -1014,3 +1014,135 @@ SEQUENCE_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
return 0;
}
asn_dec_rval_t
SEQUENCE_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
asn_SEQUENCE_specifics_t *specs = (asn_SEQUENCE_specifics_t *)td->specifics;
void *st = *sptr; /* Target structure. */
int extpresent = 0; /* Extension additions are present */
uint8_t *opres; /* Presence of optional root members */
asn_per_data_t opmd;
asn_dec_rval_t rv;
int edx;
(void)constraints;
if(!st) {
st = *sptr = CALLOC(1, specs->struct_size);
if(!st) _ASN_DECODE_FAILED;
}
ASN_DEBUG("Decoding %s as SEQUENCE (UPER)", td->name);
/* Handle extensions */
if(specs->ext_before >= 0) {
extpresent = per_get_few_bits(pd, 1);
if(extpresent < 0) _ASN_DECODE_FAILED;
}
/* Prepare a place and read-in the presence bitmap */
if(specs->roms_count) {
opres = (uint8_t *)MALLOC(((specs->roms_count + 7) >> 3) + 1);
if(!opres) _ASN_DECODE_FAILED;
/* Get the presence map */
if(per_get_many_bits(pd, opres, 0, specs->roms_count)) {
FREEMEM(opres);
_ASN_DECODE_FAILED;
}
opmd.buffer = opres;
opmd.nboff = 0;
opmd.nbits = specs->roms_count;
ASN_DEBUG("Read in presence bitmap for %s of %d bits (%x..)",
td->name, specs->roms_count, *opres);
} else {
opres = 0;
memset(&opmd, 0, sizeof opmd);
}
/*
* Get the sequence ROOT elements.
*/
for(edx = 0; edx < ((specs->ext_before < 0)
? td->elements_count : specs->ext_before + 1); edx++) {
asn_TYPE_member_t *elm = &td->elements[edx];
void *memb_ptr; /* Pointer to the member */
void **memb_ptr2; /* Pointer to that pointer */
/* Fetch the pointer to this member */
if(elm->flags & ATF_POINTER) {
memb_ptr2 = (void **)((char *)st + elm->memb_offset);
} else {
memb_ptr = (char *)st + elm->memb_offset;
memb_ptr2 = &memb_ptr;
}
/* Deal with optionality */
if(elm->optional) {
int present = per_get_few_bits(&opmd, 1);
ASN_DEBUG("Member %s->%s is optional, p=%d (%d->%d)",
td->name, elm->name, present,
(int)opmd.nboff, (int)opmd.nbits);
if(present == 0) {
/* This element is not present */
if(elm->default_value) {
/* Fill-in DEFAULT */
if(elm->default_value(memb_ptr2)) {
FREEMEM(opres);
_ASN_DECODE_FAILED;
}
}
/* The member is just not present */
continue;
}
/* Fall through */
}
/* Fetch the member from the stream */
ASN_DEBUG("Decoding member %s in %s", elm->name, td->name);
rv = elm->type->uper_decoder(opt_codec_ctx, elm->type,
elm->per_constraints, memb_ptr2, pd);
if(rv.code != RC_OK) {
ASN_DEBUG("Failed decode %s in %s",
elm->name, td->name);
FREEMEM(opres);
return rv;
}
}
/*
* Deal with extensions.
*/
if(extpresent) {
ASN_DEBUG("Extensibility for %s: NOT IMPLEMENTED", td->name);
_ASN_DECODE_FAILED;
} else {
for(edx = specs->roms_count; edx < specs->roms_count
+ specs->aoms_count; edx++) {
asn_TYPE_member_t *elm = &td->elements[edx];
void *memb_ptr; /* Pointer to the member */
void **memb_ptr2; /* Pointer to that pointer */
if(!elm->default_value) continue;
/* Fetch the pointer to this member */
if(elm->flags & ATF_POINTER) {
memb_ptr2 = (void **)((char *)st + elm->memb_offset);
} else {
memb_ptr = (char *)st + elm->memb_offset;
memb_ptr2 = &memb_ptr;
}
/* Set default value */
if(elm->default_value(memb_ptr2)) {
FREEMEM(opres);
_ASN_DECODE_FAILED;
}
}
}
rv.consumed = 0;
rv.code = RC_OK;
return rv;
}

View File

@ -24,11 +24,19 @@ typedef struct asn_SEQUENCE_specifics_s {
asn_TYPE_tag2member_t *tag2el;
int tag2el_count;
/*
* Optional members of the extensions root (roms) or additions (aoms).
* Meaningful for PER.
*/
int *oms; /* Optional MemberS */
int roms_count; /* Root optional members count */
int aoms_count; /* Additions optional members count */
/*
* Description of an extensions group.
*/
int ext_after; /* Extensions start after this member */
int ext_before; /* Extensions stop before this member */
int ext_after; /* Extensions start after this member */
int ext_before; /* Extensions stop before this member */
} asn_SEQUENCE_specifics_t;
@ -42,6 +50,7 @@ ber_type_decoder_f SEQUENCE_decode_ber;
der_type_encoder_f SEQUENCE_encode_der;
xer_type_decoder_f SEQUENCE_decode_xer;
xer_type_encoder_f SEQUENCE_encode_xer;
per_type_decoder_f SEQUENCE_decode_uper;
#ifdef __cplusplus
}

View File

@ -51,9 +51,7 @@ SEQUENCE_OF_encode_der(asn_TYPE_descriptor_t *td, void *ptr,
computed_size += encoding_size;
if(!cb) {
erval.encoded = computed_size;
erval.structure_ptr = 0;
erval.failed_type = 0;
return erval;
_ASN_ENCODED_OK(erval);
}
ASN_DEBUG("Encoding members of SEQUENCE OF %s", td->name);
@ -136,7 +134,7 @@ SEQUENCE_OF_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
if(!xcan) _i_ASN_TEXT_INDENT(1, ilevel - 1);
return er;
_ASN_ENCODED_OK(er);
cb_failed:
_ASN_ENCODE_FAILED;
}

View File

@ -21,6 +21,7 @@ extern "C" {
#define SEQUENCE_OF_constraint SET_OF_constraint
#define SEQUENCE_OF_decode_ber SET_OF_decode_ber
#define SEQUENCE_OF_decode_xer SET_OF_decode_xer
#define SEQUENCE_OF_decode_uper SET_OF_decode_uper
der_type_encoder_f SEQUENCE_OF_encode_der;
xer_type_encoder_f SEQUENCE_OF_encode_xer;

View File

@ -536,7 +536,7 @@ SET_encode_der(asn_TYPE_descriptor_t *td,
if(ret == -1) _ASN_ENCODE_FAILED;
er.encoded = computed_size + ret;
if(!cb) return er;
if(!cb) _ASN_ENCODED_OK(er);
/*
* Encode all members.
@ -570,7 +570,7 @@ SET_encode_der(asn_TYPE_descriptor_t *td,
_ASN_ENCODE_FAILED;
}
return er;
_ASN_ENCODED_OK(er);
}
#undef XER_ADVANCE
@ -857,7 +857,7 @@ SET_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
if(!xcan) _i_ASN_TEXT_INDENT(1, ilevel - 1);
return er;
_ASN_ENCODED_OK(er);
cb_failed:
_ASN_ENCODE_FAILED;
}

View File

@ -1,5 +1,6 @@
/*-
* Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Copyright (c) 2003, 2004, 2005 Lev Walkin <vlm@lionet.info>.
* All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#include <asn_internal.h>
@ -356,7 +357,7 @@ SET_OF_encode_der(asn_TYPE_descriptor_t *td, void *ptr,
if(!cb) {
erval.encoded = computed_size;
return erval;
_ASN_ENCODED_OK(erval);
}
/*
@ -448,7 +449,7 @@ SET_OF_encode_der(asn_TYPE_descriptor_t *td, void *ptr,
erval.encoded = computed_size;
}
return erval;
_ASN_ENCODED_OK(erval);
}
#undef XER_ADVANCE
@ -748,7 +749,7 @@ cleanup:
}
free(encs);
}
return er;
_ASN_ENCODED_OK(er);
}
int
@ -850,3 +851,88 @@ SET_OF_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
return 0;
}
asn_dec_rval_t
SET_OF_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
asn_dec_rval_t rv;
asn_SET_OF_specifics_t *specs = (asn_SET_OF_specifics_t *)td->specifics;
asn_TYPE_member_t *elm = td->elements; /* Single one */
void *st = *sptr;
asn_anonymous_set_ *list;
asn_per_constraint_t *ct;
int repeat = 0;
ssize_t nelems;
/*
* Create the target structure if it is not present already.
*/
if(!st) {
st = *sptr = CALLOC(1, specs->struct_size);
if(!st) _ASN_DECODE_FAILED;
}
list = _A_SET_FROM_VOID(st);
/* Figure out which constraints to use */
if(constraints) ct = &constraints->size;
else if(td->per_constraints) ct = &td->per_constraints->size;
else ct = 0;
if(ct && ct->flags & APC_EXTENSIBLE) {
int value = per_get_few_bits(pd, 1);
if(value < 0) _ASN_DECODE_FAILED;
if(value) ct = 0; /* Not restricted! */
}
if(ct && ct->effective_bits >= 0) {
/* X.691, #19.5: No length determinant */
nelems = per_get_few_bits(pd, ct->effective_bits);
ASN_DEBUG("Preparing to fetch %ld+%ld elements from %s",
(long)nelems, ct->lower_bound, td->name);
if(nelems < 0) _ASN_DECODE_FAILED;
nelems += ct->lower_bound;
} else {
nelems = -1;
}
do {
int i;
if(nelems < 0) {
nelems = uper_get_length(pd,
ct ? ct->effective_bits : -1, &repeat);
ASN_DEBUG("Got to decode %d elements (eff %d)",
nelems, ct ? ct->effective_bits : -1);
if(nelems < 0) _ASN_DECODE_FAILED;
}
for(i = 0; i < nelems; i++) {
void *ptr = 0;
ASN_DEBUG("SET OF %s decoding", elm->type->name);
rv = elm->type->uper_decoder(opt_codec_ctx, elm->type,
elm->per_constraints, &ptr, pd);
ASN_DEBUG("%s SET OF %s decoded %d, %p",
td->name, elm->type->name, rv.code, ptr);
if(rv.code == RC_OK) {
if(ASN_SET_ADD(list, ptr) == 0)
continue;
ASN_DEBUG("Failed to add element into %s",
td->name);
/* Fall through */
} else {
ASN_DEBUG("Failed decoding %s of %s (SET OF)",
elm->type->name, td->name);
}
if(ptr) elm->type->free_struct(elm->type, ptr, 0);
_ASN_DECODE_FAILED;
}
nelems = -1; /* Allow uper_get_length() */
} while(repeat);
ASN_DEBUG("Decoded %s as SET OF", td->name);
rv.code = RC_OK;
rv.consumed = 0;
return rv;
}

View File

@ -32,6 +32,7 @@ ber_type_decoder_f SET_OF_decode_ber;
der_type_encoder_f SET_OF_encode_der;
xer_type_decoder_f SET_OF_decode_xer;
xer_type_encoder_f SET_OF_encode_xer;
per_type_decoder_f SET_OF_decode_uper;
#ifdef __cplusplus
}

View File

@ -1,5 +1,6 @@
/*-
* Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Copyright (c) 2003, 2004, 2005 Lev Walkin <vlm@lionet.info>.
* All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
/*
@ -38,6 +39,7 @@ typedef struct asn_struct_ctx_s {
#include <der_encoder.h> /* Distinguished Encoding Rules encoder */
#include <xer_decoder.h> /* Decoder of XER (XML, text) */
#include <xer_encoder.h> /* Encoder into XER (XML, text) */
#include <per_decoder.h> /* Packet Encoding Rules decoder */
#include <constraints.h> /* Subtype constraints support */
/*
@ -91,6 +93,7 @@ typedef struct asn_TYPE_descriptor_s {
der_type_encoder_f *der_encoder; /* Canonical DER encoder */
xer_type_decoder_f *xer_decoder; /* Generic XER decoder */
xer_type_encoder_f *xer_encoder; /* [Canonical] XER encoder */
per_type_decoder_f *uper_decoder; /* Unaligned PER decoder */
/***********************************************************************
* Internally useful members. Not to be used by applications directly. *
@ -105,6 +108,8 @@ typedef struct asn_TYPE_descriptor_s {
ber_tlv_tag_t *all_tags;/* Every tag for BER/containment */
int all_tags_count; /* Number of tags */
asn_per_constraints_t *per_constraints; /* PER compiled constraints */
/*
* An ASN.1 production type members (members of SEQUENCE, SET, CHOICE).
*/
@ -135,6 +140,8 @@ typedef struct asn_TYPE_member_s {
int tag_mode; /* IMPLICIT/no/EXPLICIT tag at current level */
asn_TYPE_descriptor_t *type; /* Member type descriptor */
asn_constr_check_f *memb_constraints; /* Constraints validator */
asn_per_constraints_t *per_constraints; /* PER compiled constraints */
int (*default_value)(void **sptr); /* DEFAULT <value> */
char *name; /* ASN.1 identifier of the element */
} asn_TYPE_member_t;

View File

@ -9,7 +9,7 @@
ANY.h ANY.c
BMPString.h BMPString.c UTF8String.h
BOOLEAN.h BOOLEAN.c
ENUMERATED.h ENUMERATED.c INTEGER.h
ENUMERATED.h ENUMERATED.c INTEGER.h NativeEnumerated.h
GeneralString.h GeneralString.c
GeneralizedTime.h GeneralizedTime.c
GraphicString.h GraphicString.c
@ -58,4 +58,10 @@ constraints.h constraints.c # Subtype constraints support
xer_support.h xer_support.c # XML parsing
xer_decoder.h xer_decoder.c # XER decoding support
xer_encoder.h xer_encoder.c # XER encoding support
per_decoder.h per_support.h # PER declarations, just in case
#asn-decoder-template.c # Template for quick decoder creation
CODEC-PER: # THIS IS A SPECIAL SECTION
per_support.h per_support.c # PER parsing
per_decoder.h per_decoder.c # PER decoding support

2
skeletons/per_decoder.c Normal file
View File

@ -0,0 +1,2 @@
#include <asn_application.h>
#include <per_decoder.h>

55
skeletons/per_decoder.h Normal file
View File

@ -0,0 +1,55 @@
/*-
* Copyright (c) 2005 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#ifndef _PER_DECODER_H_
#define _PER_DECODER_H_
#include <asn_application.h>
#include <per_support.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Pre-computed PER constraints.
*/
enum asn_per_constraint_flags {
APC_UNCONSTRAINED = 0x0, /* No PER visible constraints */
APC_SEMI_CONSTRAINED = 0x1, /* Constrained at "lb" */
APC_CONSTRAINED = 0x2, /* Fully constrained */
APC_EXTENSIBLE = 0x4 /* May have extension */
};
typedef struct asn_per_constraint_s {
enum asn_per_constraint_flags flags;
int range_bits; /* Full number of bits in the range */
int effective_bits; /* Effective bits */
long lower_bound; /* "lb" value */
long upper_bound; /* "ub" value */
} asn_per_constraint_t;
typedef struct asn_per_constraints_s {
asn_per_constraint_t value;
asn_per_constraint_t size;
} asn_per_constraints_t;
struct asn_TYPE_descriptor_s; /* Forward declaration */
/*
* Type of the type-specific PER decoder function.
*/
typedef asn_dec_rval_t (per_type_decoder_f)(asn_codec_ctx_t *opt_codec_ctx,
struct asn_TYPE_descriptor_s *type_descriptor,
asn_per_constraints_t *constraints,
void **struct_ptr,
asn_per_data_t *per_data
);
#ifdef __cplusplus
}
#endif
#endif /* _PER_DECODER_H_ */

148
skeletons/per_support.c Normal file
View File

@ -0,0 +1,148 @@
/*
* Copyright (c) 2005 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#include <asn_system.h>
#include <per_support.h>
/*
* Extract a small number of bits (<= 24) from the specified PER data pointer.
*/
int32_t
per_get_few_bits(asn_per_data_t *pd, int nbits) {
size_t off; /* Next after last bit offset */
uint32_t accum;
uint8_t *buf;
if(nbits < 0 || pd->nboff + nbits > pd->nbits)
return -1;
if(nbits == 0)
return 0;
/*
* Normalize position indicator.
*/
if(pd->nboff >= 8) {
pd->buffer += (pd->nboff >> 3);
pd->nbits -= (pd->nboff & ~0x07);
pd->nboff &= 0x07;
}
off = (pd->nboff += nbits);
buf = pd->buffer;
/*
* Extract specified number of bits.
*/
if(off <= 8)
accum = (buf[0]) >> (8 - off);
else if(off <= 16)
accum = ((buf[0] << 8) + buf[1]) >> (16 - off);
else if(off <= 24)
accum = ((buf[0] << 16) + (buf[1] << 8) + buf[2]) >> (24 - off);
else if(off <= 31)
accum = ((buf[0] << 24) + (buf[1] << 16)
+ (buf[2] << 8) + (buf[3])) >> (32 - off);
else {
pd->nboff -= nbits; /* Oops, revert back */
return -1;
}
return (accum & ((1 << nbits) - 1));
}
/*
* Extract a large number of bits from the specified PER data pointer.
*/
int
per_get_many_bits(asn_per_data_t *pd, uint8_t *dst, int alright, int nbits) {
int32_t value;
if(alright && (nbits & 7)) {
/* Perform right alignment of a first few bits */
value = per_get_few_bits(pd, nbits & 0x07);
if(value < 0) return -1;
*dst++ = value; /* value is already right-aligned */
nbits &= ~7;
}
while(nbits) {
if(nbits >= 24) {
value = per_get_few_bits(pd, 24);
if(value < 0) return -1;
*(dst++) = value >> 16;
*(dst++) = value >> 8;
*(dst++) = value;
nbits -= 24;
} else {
value = per_get_few_bits(pd, nbits);
if(value < 0) return -1;
if(nbits & 7) { /* implies alright */
value <<= 8 - (nbits & 7),
nbits += 8 - (nbits & 7);
if(nbits > 24)
*dst++ = value >> 24;
}
if(nbits > 16)
*dst++ = value >> 16;
if(nbits > 8)
*dst++ = value >> 8;
*dst++ = value;
break;
}
}
return 0;
}
/*
* Get the length "n" from the stream.
*/
ssize_t
uper_get_length(asn_per_data_t *pd, int ebits, int *repeat) {
ssize_t value;
*repeat = 0;
if(ebits >= 0) return per_get_few_bits(pd, ebits);
value = per_get_few_bits(pd, 8);
if(value < 0) return -1;
if((value & 128) == 0) /* #10.9.3.6 */
return (value & 0x7F);
if((value & 64) == 0) { /* #10.9.3.7 */
value = ((value & 63) << 8) | per_get_few_bits(pd, 8);
if(value < 0) return -1;
return value;
}
value &= 63; /* this is "m" from X.691, #10.9.3.8 */
if(value < 1 || value > 4)
return -1;
*repeat = 1;
return (16384 * value);
}
/*
* Get the normally small non-negative whole number.
* X.691, #10.6
*/
ssize_t
uper_get_nsnnwn(asn_per_data_t *pd) {
ssize_t value;
value = per_get_few_bits(pd, 7);
if(value & 64) { /* implicit (value < 0) */
value &= 63;
value <<= 2;
value |= per_get_few_bits(pd, 2);
if(value & 128) /* implicit (value < 0) */
return -1;
if(value == 0)
return 0;
if(value >= 3)
return -1;
value = per_get_few_bits(pd, 8 * value);
return value;
}
return value;
}

54
skeletons/per_support.h Normal file
View File

@ -0,0 +1,54 @@
/*
* Copyright (c) 2005 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#ifndef _PER_SUPPORT_H_
#define _PER_SUPPORT_H_
#include <asn_system.h> /* Platform-specific types */
#ifdef __cplusplus
extern "C" {
#endif
/*
* This structure describes a position inside a PER bit stream.
*/
typedef struct asn_per_data_s {
uint8_t *buffer; /* Pointer to the octet stream */
size_t nboff; /* Bit offset to the meaningful bit */
size_t nbits; /* Number of bits in the stream */
} asn_per_data_t;
/*
* Extract a small number of bits (<= 24) from the specified PER data pointer.
* This function returns -1 if the specified number of bits could not be
* extracted due to EOD or other conditions.
*/
int32_t per_get_few_bits(asn_per_data_t *per_data, int get_nbits);
/*
* Extract a large number of bits from the specified PER data pointer.
* This function returns -1 if the specified number of bits could not be
* extracted due to EOD or other conditions.
*/
int per_get_many_bits(asn_per_data_t *pd, uint8_t *dst, int right_align,
int get_nbits);
/*
* Get the length "n" from the Unaligned PER stream.
*/
ssize_t uper_get_length(asn_per_data_t *pd,
int effective_bound_bits,
int *repeat);
/*
* Get the normally small non-negative whole number.
*/
ssize_t uper_get_nsnnwn(asn_per_data_t *pd);
#ifdef __cplusplus
}
#endif
#endif /* _PER_SUPPORT_H_ */

View File

@ -10,7 +10,8 @@ check_PROGRAMS = \
check-UTCTime \
check-INTEGER \
check-REAL \
check-XER
check-XER \
check-PER
LDADD = -lm

View File

@ -13,7 +13,7 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
SOURCES = check-GeneralizedTime.c check-INTEGER.c check-OCTET_STRING.c check-OIDs.c check-REAL.c check-UTCTime.c check-UTF8String.c check-XER.c check-ber_tlv_tag.c check-length.c
SOURCES = check-GeneralizedTime.c check-INTEGER.c check-OCTET_STRING.c check-OIDs.c check-PER.c check-REAL.c check-UTCTime.c check-UTF8String.c check-XER.c check-ber_tlv_tag.c check-length.c
srcdir = @srcdir@
top_srcdir = @top_srcdir@
@ -40,7 +40,7 @@ check_PROGRAMS = check-ber_tlv_tag$(EXEEXT) check-length$(EXEEXT) \
check-OIDs$(EXEEXT) check-GeneralizedTime$(EXEEXT) \
check-OCTET_STRING$(EXEEXT) check-UTF8String$(EXEEXT) \
check-UTCTime$(EXEEXT) check-INTEGER$(EXEEXT) \
check-REAL$(EXEEXT) check-XER$(EXEEXT)
check-REAL$(EXEEXT) check-XER$(EXEEXT) check-PER$(EXEEXT)
subdir = skeletons/tests
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@ -66,6 +66,10 @@ check_OIDs_SOURCES = check-OIDs.c
check_OIDs_OBJECTS = check-OIDs.$(OBJEXT)
check_OIDs_LDADD = $(LDADD)
check_OIDs_DEPENDENCIES =
check_PER_SOURCES = check-PER.c
check_PER_OBJECTS = check-PER.$(OBJEXT)
check_PER_LDADD = $(LDADD)
check_PER_DEPENDENCIES =
check_REAL_SOURCES = check-REAL.c
check_REAL_OBJECTS = check-REAL.$(OBJEXT)
check_REAL_LDADD = $(LDADD)
@ -96,7 +100,7 @@ am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/check-GeneralizedTime.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/check-INTEGER.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/check-OCTET_STRING.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/check-OIDs.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/check-OIDs.Po ./$(DEPDIR)/check-PER.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/check-REAL.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/check-UTCTime.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/check-UTF8String.Po \
@ -112,12 +116,13 @@ CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = check-GeneralizedTime.c check-INTEGER.c check-OCTET_STRING.c \
check-OIDs.c check-REAL.c check-UTCTime.c check-UTF8String.c \
check-XER.c check-ber_tlv_tag.c check-length.c
DIST_SOURCES = check-GeneralizedTime.c check-INTEGER.c \
check-OCTET_STRING.c check-OIDs.c check-REAL.c check-UTCTime.c \
check-OIDs.c check-PER.c check-REAL.c check-UTCTime.c \
check-UTF8String.c check-XER.c check-ber_tlv_tag.c \
check-length.c
DIST_SOURCES = check-GeneralizedTime.c check-INTEGER.c \
check-OCTET_STRING.c check-OIDs.c check-PER.c check-REAL.c \
check-UTCTime.c check-UTF8String.c check-XER.c \
check-ber_tlv_tag.c check-length.c
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@ -285,6 +290,9 @@ check-OCTET_STRING$(EXEEXT): $(check_OCTET_STRING_OBJECTS) $(check_OCTET_STRING_
check-OIDs$(EXEEXT): $(check_OIDs_OBJECTS) $(check_OIDs_DEPENDENCIES)
@rm -f check-OIDs$(EXEEXT)
$(LINK) $(check_OIDs_LDFLAGS) $(check_OIDs_OBJECTS) $(check_OIDs_LDADD) $(LIBS)
check-PER$(EXEEXT): $(check_PER_OBJECTS) $(check_PER_DEPENDENCIES)
@rm -f check-PER$(EXEEXT)
$(LINK) $(check_PER_LDFLAGS) $(check_PER_OBJECTS) $(check_PER_LDADD) $(LIBS)
check-REAL$(EXEEXT): $(check_REAL_OBJECTS) $(check_REAL_DEPENDENCIES)
@rm -f check-REAL$(EXEEXT)
$(LINK) $(check_REAL_LDFLAGS) $(check_REAL_OBJECTS) $(check_REAL_LDADD) $(LIBS)
@ -314,6 +322,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check-INTEGER.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check-OCTET_STRING.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check-OIDs.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check-PER.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check-REAL.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check-UTCTime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check-UTF8String.Po@am__quote@

View File

@ -6,6 +6,7 @@
#include <der_encoder.c>
#include <xer_decoder.c>
#include <xer_support.c>
#include <per_support.c>
#include <constraints.c>
static char *shared_scratch_start;

View File

@ -3,6 +3,7 @@
#include <BIT_STRING.c>
#include <xer_decoder.c>
#include <xer_support.c>
#include <per_support.c>
#include <ber_decoder.c>
#include <ber_tlv_length.c>
#include <ber_tlv_tag.c>

105
skeletons/tests/check-PER.c Normal file
View File

@ -0,0 +1,105 @@
#include <per_support.c>
#include <assert.h>
int
main() {
uint8_t buf[] = { 0xB7, 0x19, 0x2F, 0xEE, 0xAD };
uint8_t tmpbuf[10];
int32_t z;
asn_per_data_t pos;
pos.buffer = buf;
pos.nboff = 0;
pos.nbits = sizeof(buf) * 8;
z = per_get_few_bits(&pos, 32);
assert(z == -1);
z = per_get_few_bits(&pos, 0);
assert(z == 0);
assert(pos.nboff == 0);
z = per_get_few_bits(&pos, 1);
assert(z == 1);
assert(pos.nboff == 1);
z = per_get_few_bits(&pos, 2);
assert(z == 1);
assert(pos.nboff == 3);
z = per_get_few_bits(&pos, 2);
assert(z == 2);
assert(pos.nboff == 5);
z = per_get_few_bits(&pos, 3);
assert(z == 7);
assert(pos.nboff == 8);
assert(pos.nbits == sizeof(buf) * 8);
z = per_get_few_bits(&pos, 8);
assert(z == 0x19);
assert(pos.nboff == 8);
assert(pos.nbits == (sizeof(buf) - 1) * 8);
z = per_get_few_bits(&pos, 1);
assert(z == 0);
assert(pos.nboff == 1);
assert(pos.nbits == (sizeof(buf) - 2) * 8);
z = per_get_few_bits(&pos, 3);
assert(z == 2);
assert(pos.nboff == 4);
assert(pos.nbits == (sizeof(buf) - 2) * 8);
z = per_get_few_bits(&pos, 8);
assert(z == 254);
assert(pos.nboff == 12);
pos.buffer = buf;
pos.nboff = 2;
pos.nbits = sizeof(buf) * 8;
z = per_get_few_bits(&pos, 24);
assert(z == 14443711);
pos.buffer = buf;
pos.nboff = 0;
pos.nbits = sizeof(buf) * 8;
z = per_get_many_bits(&pos, tmpbuf, 0, sizeof(buf) * 8);
assert(z == 0);
assert(buf[0] == tmpbuf[0]);
assert(buf[1] == tmpbuf[1]);
assert(buf[2] == tmpbuf[2]);
assert(buf[3] == tmpbuf[3]);
assert(buf[4] == tmpbuf[4]);
pos.buffer = buf;
pos.nboff = 1;
pos.nbits = sizeof(buf) * 8;
z = per_get_many_bits(&pos, tmpbuf, 0, sizeof(buf) * 8);
assert(z == -1);
pos.buffer = buf;
pos.nboff = 1;
pos.nbits = sizeof(buf) * 8;
z = per_get_many_bits(&pos, tmpbuf, 0, sizeof(buf) * 8 - 1);
assert(z == 0);
assert(tmpbuf[0] == 110);
assert(tmpbuf[1] == 50);
assert(tmpbuf[2] == 95);
assert(tmpbuf[3] == 221);
assert(tmpbuf[4] == 90);
pos.buffer = buf;
pos.nboff = 1;
pos.nbits = sizeof(buf) * 8;
z = per_get_many_bits(&pos, tmpbuf, 1, sizeof(buf) * 8 - 1);
assert(z == 0);
assert(tmpbuf[0] == 55);
assert(tmpbuf[0] != buf[0]);
assert(tmpbuf[1] == buf[1]);
assert(tmpbuf[2] == buf[2]);
assert(tmpbuf[3] == buf[3]);
assert(tmpbuf[4] == buf[4]);
return 0;
}

View File

@ -6,6 +6,7 @@
#include <der_encoder.c>
#include <xer_decoder.c>
#include <xer_support.c>
#include <per_support.c>
#include <constraints.c>
#include <sys/time.h>

View File

@ -4,6 +4,7 @@
#include <der_encoder.c>
#include <xer_decoder.c>
#include <xer_support.c>
#include <per_support.c>
#include <constraints.c>
#undef ADVANCE
#undef RETURN

View File

@ -32,9 +32,7 @@ xer_encode(asn_TYPE_descriptor_t *td, void *sptr,
er.encoded = 4 + xcan + (2 * mlen) + tmper.encoded;
er.structure_ptr = 0;
er.failed_type = 0;
return er;
_ASN_ENCODED_OK(er);
cb_failed:
_ASN_ENCODE_FAILED;
}

View File

@ -4,11 +4,7 @@
* All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <asn_system.h>
#include <xer_support.h>
/* Parser states */

View File

@ -32,7 +32,7 @@ extern asn_TYPE_descriptor_t asn_DEF_Certificate;
/*** <<< CODE [Certificate] >>> ***/
static int
memb_signature_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
memb_signature_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
size_t size;
@ -71,6 +71,8 @@ static asn_TYPE_member_t asn_MBR_toBeSigned_2[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "version"
},
{ ATF_NOFLAGS, 0, offsetof(struct toBeSigned, signature),
@ -78,6 +80,8 @@ static asn_TYPE_member_t asn_MBR_toBeSigned_2[] = {
.tag_mode = 0,
.type = &asn_DEF_OBJECT_IDENTIFIER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "signature"
},
{ ATF_NOFLAGS, 0, offsetof(struct toBeSigned, issuer),
@ -85,22 +89,25 @@ static asn_TYPE_member_t asn_MBR_toBeSigned_2[] = {
.tag_mode = 0,
.type = &asn_DEF_Name,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "issuer"
},
};
static ber_tlv_tag_t asn_DEF_toBeSigned_2_tags[] = {
static ber_tlv_tag_t asn_DEF_toBeSigned_tags_2[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_toBeSigned_2_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_toBeSigned_tag2el_2[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* version at 21 */
{ (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 1, 0, 0 }, /* signature at 22 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 } /* issuer at 24 */
};
static asn_SEQUENCE_specifics_t asn_SPC_toBeSigned_2_specs = {
static asn_SEQUENCE_specifics_t asn_SPC_toBeSigned_specs_2 = {
sizeof(struct toBeSigned),
offsetof(struct toBeSigned, _asn_ctx),
asn_MAP_toBeSigned_2_tag2el,
asn_MAP_toBeSigned_tag2el_2,
3, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@ -115,16 +122,18 @@ asn_TYPE_descriptor_t asn_DEF_toBeSigned_2 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_toBeSigned_2_tags,
sizeof(asn_DEF_toBeSigned_2_tags)
/sizeof(asn_DEF_toBeSigned_2_tags[0]), /* 1 */
asn_DEF_toBeSigned_2_tags, /* Same as above */
sizeof(asn_DEF_toBeSigned_2_tags)
/sizeof(asn_DEF_toBeSigned_2_tags[0]), /* 1 */
asn_DEF_toBeSigned_tags_2,
sizeof(asn_DEF_toBeSigned_tags_2)
/sizeof(asn_DEF_toBeSigned_tags_2[0]), /* 1 */
asn_DEF_toBeSigned_tags_2, /* Same as above */
sizeof(asn_DEF_toBeSigned_tags_2)
/sizeof(asn_DEF_toBeSigned_tags_2[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_toBeSigned_2,
3, /* Elements count */
&asn_SPC_toBeSigned_2_specs /* Additional specs */
&asn_SPC_toBeSigned_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Certificate_1[] = {
@ -133,6 +142,8 @@ static asn_TYPE_member_t asn_MBR_Certificate_1[] = {
.tag_mode = 0,
.type = &asn_DEF_toBeSigned_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "toBeSigned"
},
{ ATF_NOFLAGS, 0, offsetof(struct Certificate, algorithm),
@ -140,29 +151,34 @@ static asn_TYPE_member_t asn_MBR_Certificate_1[] = {
.tag_mode = 0,
.type = &asn_DEF_OBJECT_IDENTIFIER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "algorithm"
},
{ ATF_NOFLAGS, 0, offsetof(struct Certificate, signature),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
.tag_mode = 0,
.type = &asn_DEF_BIT_STRING,
.memb_constraints = memb_signature_1_constraint,
.memb_constraints = memb_signature_constraint_1,
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "signature"
},
};
static ber_tlv_tag_t asn_DEF_Certificate_1_tags[] = {
static ber_tlv_tag_t asn_DEF_Certificate_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_Certificate_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_Certificate_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 2, 0, 0 }, /* signature at 17 */
{ (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 1, 0, 0 }, /* algorithm at 16 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* toBeSigned at 21 */
};
static asn_SEQUENCE_specifics_t asn_SPC_Certificate_1_specs = {
static asn_SEQUENCE_specifics_t asn_SPC_Certificate_specs_1 = {
sizeof(struct Certificate),
offsetof(struct Certificate, _asn_ctx),
asn_MAP_Certificate_1_tag2el,
asn_MAP_Certificate_tag2el_1,
3, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@ -176,16 +192,18 @@ asn_TYPE_descriptor_t asn_DEF_Certificate = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_Certificate_1_tags,
sizeof(asn_DEF_Certificate_1_tags)
/sizeof(asn_DEF_Certificate_1_tags[0]), /* 1 */
asn_DEF_Certificate_1_tags, /* Same as above */
sizeof(asn_DEF_Certificate_1_tags)
/sizeof(asn_DEF_Certificate_1_tags[0]), /* 1 */
asn_DEF_Certificate_tags_1,
sizeof(asn_DEF_Certificate_tags_1)
/sizeof(asn_DEF_Certificate_tags_1[0]), /* 1 */
asn_DEF_Certificate_tags_1, /* Same as above */
sizeof(asn_DEF_Certificate_tags_1)
/sizeof(asn_DEF_Certificate_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_Certificate_1,
3, /* Elements count */
&asn_SPC_Certificate_1_specs /* Additional specs */
&asn_SPC_Certificate_specs_1 /* Additional specs */
};
@ -223,13 +241,15 @@ static asn_TYPE_member_t asn_MBR_Name_1[] = {
.tag_mode = 0,
.type = &asn_DEF_RelativeDistinguishedName,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = ""
},
};
static ber_tlv_tag_t asn_DEF_Name_1_tags[] = {
static ber_tlv_tag_t asn_DEF_Name_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_Name_1_specs = {
static asn_SET_OF_specifics_t asn_SPC_Name_specs_1 = {
sizeof(struct Name),
offsetof(struct Name, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@ -244,16 +264,18 @@ asn_TYPE_descriptor_t asn_DEF_Name = {
SEQUENCE_OF_encode_der,
SEQUENCE_OF_decode_xer,
SEQUENCE_OF_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_Name_1_tags,
sizeof(asn_DEF_Name_1_tags)
/sizeof(asn_DEF_Name_1_tags[0]), /* 1 */
asn_DEF_Name_1_tags, /* Same as above */
sizeof(asn_DEF_Name_1_tags)
/sizeof(asn_DEF_Name_1_tags[0]), /* 1 */
asn_DEF_Name_tags_1,
sizeof(asn_DEF_Name_tags_1)
/sizeof(asn_DEF_Name_tags_1[0]), /* 1 */
asn_DEF_Name_tags_1, /* Same as above */
sizeof(asn_DEF_Name_tags_1)
/sizeof(asn_DEF_Name_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_Name_1,
1, /* Single element */
&asn_SPC_Name_1_specs /* Additional specs */
&asn_SPC_Name_specs_1 /* Additional specs */
};
@ -307,7 +329,7 @@ static int check_permitted_alphabet_2(const void *sptr) {
/*** <<< CODE [RelativeDistinguishedName] >>> ***/
static int
memb_IA5String_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
memb_IA5String_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const IA5String_t *st = (const IA5String_t *)sptr;
@ -338,14 +360,16 @@ static asn_TYPE_member_t asn_MBR_RelativeDistinguishedName_1[] = {
.tag = (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)),
.tag_mode = 0,
.type = &asn_DEF_IA5String,
.memb_constraints = memb_IA5String_1_constraint,
.memb_constraints = memb_IA5String_constraint_1,
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = ""
},
};
static ber_tlv_tag_t asn_DEF_RelativeDistinguishedName_1_tags[] = {
static ber_tlv_tag_t asn_DEF_RelativeDistinguishedName_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_RelativeDistinguishedName_1_specs = {
static asn_SET_OF_specifics_t asn_SPC_RelativeDistinguishedName_specs_1 = {
sizeof(struct RelativeDistinguishedName),
offsetof(struct RelativeDistinguishedName, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@ -360,15 +384,17 @@ asn_TYPE_descriptor_t asn_DEF_RelativeDistinguishedName = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_RelativeDistinguishedName_1_tags,
sizeof(asn_DEF_RelativeDistinguishedName_1_tags)
/sizeof(asn_DEF_RelativeDistinguishedName_1_tags[0]), /* 1 */
asn_DEF_RelativeDistinguishedName_1_tags, /* Same as above */
sizeof(asn_DEF_RelativeDistinguishedName_1_tags)
/sizeof(asn_DEF_RelativeDistinguishedName_1_tags[0]), /* 1 */
asn_DEF_RelativeDistinguishedName_tags_1,
sizeof(asn_DEF_RelativeDistinguishedName_tags_1)
/sizeof(asn_DEF_RelativeDistinguishedName_tags_1[0]), /* 1 */
asn_DEF_RelativeDistinguishedName_tags_1, /* Same as above */
sizeof(asn_DEF_RelativeDistinguishedName_tags_1)
/sizeof(asn_DEF_RelativeDistinguishedName_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_RelativeDistinguishedName_1,
1, /* Single element */
&asn_SPC_RelativeDistinguishedName_1_specs /* Additional specs */
&asn_SPC_RelativeDistinguishedName_specs_1 /* Additional specs */
};

View File

@ -49,6 +49,8 @@ static asn_TYPE_member_t asn_MBR_T_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "i"
},
{ ATF_NOFLAGS, 0, offsetof(struct T, s),
@ -56,6 +58,8 @@ static asn_TYPE_member_t asn_MBR_T_1[] = {
.tag_mode = 0,
.type = &asn_DEF_IA5String,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "s"
},
{ ATF_POINTER, 1, offsetof(struct T, b),
@ -63,30 +67,32 @@ static asn_TYPE_member_t asn_MBR_T_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_BOOLEAN,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "b"
},
};
static ber_tlv_tag_t asn_DEF_T_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_T_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_T_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), 1, 0, 0 }, /* s at 16 */
{ (ASN_TAG_CLASS_APPLICATION | (3 << 2)), 0, 0, 0 }, /* i at 15 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* b at 18 */
};
static uint8_t asn_MAP_T_1_mmap[(3 + (8 * sizeof(unsigned int)) - 1) / 8] = {
static uint8_t asn_MAP_T_mmap_1[(3 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(1 << 7) | (1 << 6) | (0 << 5)
};
static asn_SET_specifics_t asn_SPC_T_1_specs = {
static asn_SET_specifics_t asn_SPC_T_specs_1 = {
sizeof(struct T),
offsetof(struct T, _asn_ctx),
offsetof(struct T, _presence_map),
asn_MAP_T_1_tag2el,
asn_MAP_T_tag2el_1,
3, /* Count of tags in the map */
asn_MAP_T_1_tag2el, /* Same as above */
asn_MAP_T_tag2el_1, /* Same as above */
3, /* Count of tags in the CXER map */
1, /* Whether extensible */
(unsigned int *)asn_MAP_T_1_mmap /* Mandatory elements map */
(unsigned int *)asn_MAP_T_mmap_1 /* Mandatory elements map */
};
asn_TYPE_descriptor_t asn_DEF_T = {
"T",
@ -98,15 +104,17 @@ asn_TYPE_descriptor_t asn_DEF_T = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T_1_tags,
sizeof(asn_DEF_T_1_tags)
/sizeof(asn_DEF_T_1_tags[0]), /* 1 */
asn_DEF_T_1_tags, /* Same as above */
sizeof(asn_DEF_T_1_tags)
/sizeof(asn_DEF_T_1_tags[0]), /* 1 */
asn_DEF_T_tags_1,
sizeof(asn_DEF_T_tags_1)
/sizeof(asn_DEF_T_tags_1[0]), /* 1 */
asn_DEF_T_tags_1, /* Same as above */
sizeof(asn_DEF_T_tags_1)
/sizeof(asn_DEF_T_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_T_1,
3, /* Elements count */
&asn_SPC_T_1_specs /* Additional specs */
&asn_SPC_T_specs_1 /* Additional specs */
};

View File

@ -37,4 +37,6 @@ BEGIN
-- not to the SET OF's embedded SEQUENCE!
}
SSS ::= SEQUENCE OF SET OF SEQUENCE OF BIT STRING
END

View File

@ -23,4 +23,6 @@ Stuff ::= SET {
}
}
SSS ::= SEQUENCE OF SET OF SEQUENCE OF BIT STRING
END

View File

@ -33,13 +33,15 @@ static asn_TYPE_member_t asn_MBR_Forest_1[] = {
.tag_mode = 0,
.type = &asn_DEF_Tree,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = ""
},
};
static ber_tlv_tag_t asn_DEF_Forest_1_tags[] = {
static ber_tlv_tag_t asn_DEF_Forest_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_Forest_1_specs = {
static asn_SET_OF_specifics_t asn_SPC_Forest_specs_1 = {
sizeof(struct Forest),
offsetof(struct Forest, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@ -54,16 +56,18 @@ asn_TYPE_descriptor_t asn_DEF_Forest = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_Forest_1_tags,
sizeof(asn_DEF_Forest_1_tags)
/sizeof(asn_DEF_Forest_1_tags[0]), /* 1 */
asn_DEF_Forest_1_tags, /* Same as above */
sizeof(asn_DEF_Forest_1_tags)
/sizeof(asn_DEF_Forest_1_tags[0]), /* 1 */
asn_DEF_Forest_tags_1,
sizeof(asn_DEF_Forest_tags_1)
/sizeof(asn_DEF_Forest_tags_1[0]), /* 1 */
asn_DEF_Forest_tags_1, /* Same as above */
sizeof(asn_DEF_Forest_tags_1)
/sizeof(asn_DEF_Forest_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_Forest_1,
1, /* Single element */
&asn_SPC_Forest_1_specs /* Additional specs */
&asn_SPC_Forest_specs_1 /* Additional specs */
};
@ -94,6 +98,8 @@ static asn_TYPE_member_t asn_MBR_Tree_1[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "height"
},
{ ATF_NOFLAGS, 0, offsetof(struct Tree, width),
@ -101,21 +107,24 @@ static asn_TYPE_member_t asn_MBR_Tree_1[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "width"
},
};
static ber_tlv_tag_t asn_DEF_Tree_1_tags[] = {
static ber_tlv_tag_t asn_DEF_Tree_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_Tree_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_Tree_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* height at 17 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* width at 19 */
};
static asn_SEQUENCE_specifics_t asn_SPC_Tree_1_specs = {
static asn_SEQUENCE_specifics_t asn_SPC_Tree_specs_1 = {
sizeof(struct Tree),
offsetof(struct Tree, _asn_ctx),
asn_MAP_Tree_1_tag2el,
asn_MAP_Tree_tag2el_1,
2, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@ -129,16 +138,18 @@ asn_TYPE_descriptor_t asn_DEF_Tree = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_Tree_1_tags,
sizeof(asn_DEF_Tree_1_tags)
/sizeof(asn_DEF_Tree_1_tags[0]), /* 1 */
asn_DEF_Tree_1_tags, /* Same as above */
sizeof(asn_DEF_Tree_1_tags)
/sizeof(asn_DEF_Tree_1_tags[0]), /* 1 */
asn_DEF_Tree_tags_1,
sizeof(asn_DEF_Tree_tags_1)
/sizeof(asn_DEF_Tree_tags_1[0]), /* 1 */
asn_DEF_Tree_tags_1, /* Same as above */
sizeof(asn_DEF_Tree_tags_1)
/sizeof(asn_DEF_Tree_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_Tree_1,
2, /* Elements count */
&asn_SPC_Tree_1_specs /* Additional specs */
&asn_SPC_Tree_specs_1 /* Additional specs */
};
@ -236,14 +247,16 @@ static asn_TYPE_member_t asn_MBR_trees_2[] = {
.tag_mode = 0,
.type = &asn_DEF_Forest,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = ""
},
};
static ber_tlv_tag_t asn_DEF_trees_2_tags[] = {
static ber_tlv_tag_t asn_DEF_trees_tags_2[] = {
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_trees_2_specs = {
static asn_SET_OF_specifics_t asn_SPC_trees_specs_2 = {
sizeof(struct trees),
offsetof(struct trees, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@ -259,16 +272,18 @@ asn_TYPE_descriptor_t asn_DEF_trees_2 = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_trees_2_tags,
sizeof(asn_DEF_trees_2_tags)
/sizeof(asn_DEF_trees_2_tags[0]) - 1, /* 1 */
asn_DEF_trees_2_tags, /* Same as above */
sizeof(asn_DEF_trees_2_tags)
/sizeof(asn_DEF_trees_2_tags[0]), /* 2 */
asn_DEF_trees_tags_2,
sizeof(asn_DEF_trees_tags_2)
/sizeof(asn_DEF_trees_tags_2[0]) - 1, /* 1 */
asn_DEF_trees_tags_2, /* Same as above */
sizeof(asn_DEF_trees_tags_2)
/sizeof(asn_DEF_trees_tags_2[0]), /* 2 */
0, /* No PER visible constraints */
asn_MBR_trees_2,
1, /* Single element */
&asn_SPC_trees_2_specs /* Additional specs */
&asn_SPC_trees_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Member_5[] = {
@ -277,27 +292,30 @@ static asn_TYPE_member_t asn_MBR_Member_5[] = {
.tag_mode = 0,
.type = &asn_DEF_BIT_STRING,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "cup-of-coffee"
},
};
static ber_tlv_tag_t asn_DEF_Member_5_tags[] = {
static ber_tlv_tag_t asn_DEF_Member_tags_5[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_Member_5_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_Member_tag2el_5[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 0 } /* cup-of-coffee at 32 */
};
static asn_SEQUENCE_specifics_t asn_SPC_Member_5_specs = {
static asn_SEQUENCE_specifics_t asn_SPC_Member_specs_5 = {
sizeof(struct Member),
offsetof(struct Member, _asn_ctx),
asn_MAP_Member_5_tag2el,
asn_MAP_Member_tag2el_5,
1, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
0, /* Start extensions */
2 /* Stop extensions */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_Member_5 = {
"",
"",
"SEQUENCE",
"SEQUENCE",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
@ -305,16 +323,18 @@ asn_TYPE_descriptor_t asn_DEF_Member_5 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_Member_5_tags,
sizeof(asn_DEF_Member_5_tags)
/sizeof(asn_DEF_Member_5_tags[0]), /* 1 */
asn_DEF_Member_5_tags, /* Same as above */
sizeof(asn_DEF_Member_5_tags)
/sizeof(asn_DEF_Member_5_tags[0]), /* 1 */
asn_DEF_Member_tags_5,
sizeof(asn_DEF_Member_tags_5)
/sizeof(asn_DEF_Member_tags_5[0]), /* 1 */
asn_DEF_Member_tags_5, /* Same as above */
sizeof(asn_DEF_Member_tags_5)
/sizeof(asn_DEF_Member_tags_5[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_Member_5,
1, /* Elements count */
&asn_SPC_Member_5_specs /* Additional specs */
&asn_SPC_Member_specs_5 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_anything_4[] = {
@ -323,14 +343,16 @@ static asn_TYPE_member_t asn_MBR_anything_4[] = {
.tag_mode = 0,
.type = &asn_DEF_Member_5,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = ""
},
};
static ber_tlv_tag_t asn_DEF_anything_4_tags[] = {
static ber_tlv_tag_t asn_DEF_anything_tags_4[] = {
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_anything_4_specs = {
static asn_SET_OF_specifics_t asn_SPC_anything_specs_4 = {
sizeof(struct anything),
offsetof(struct anything, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@ -346,16 +368,18 @@ asn_TYPE_descriptor_t asn_DEF_anything_4 = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_anything_4_tags,
sizeof(asn_DEF_anything_4_tags)
/sizeof(asn_DEF_anything_4_tags[0]) - 1, /* 1 */
asn_DEF_anything_4_tags, /* Same as above */
sizeof(asn_DEF_anything_4_tags)
/sizeof(asn_DEF_anything_4_tags[0]), /* 2 */
asn_DEF_anything_tags_4,
sizeof(asn_DEF_anything_tags_4)
/sizeof(asn_DEF_anything_tags_4[0]) - 1, /* 1 */
asn_DEF_anything_tags_4, /* Same as above */
sizeof(asn_DEF_anything_tags_4)
/sizeof(asn_DEF_anything_tags_4[0]), /* 2 */
0, /* No PER visible constraints */
asn_MBR_anything_4,
1, /* Single element */
&asn_SPC_anything_4_specs /* Additional specs */
&asn_SPC_anything_specs_4 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_other_9[] = {
@ -364,6 +388,8 @@ static asn_TYPE_member_t asn_MBR_other_9[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "a"
},
{ ATF_NOFLAGS, 0, offsetof(struct other, choice.b),
@ -371,21 +397,24 @@ static asn_TYPE_member_t asn_MBR_other_9[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "b"
},
};
static asn_TYPE_tag2member_t asn_MAP_other_9_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_other_tag2el_9[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* a at 26 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 } /* b at 28 */
};
static asn_CHOICE_specifics_t asn_SPC_other_9_specs = {
static asn_CHOICE_specifics_t asn_SPC_other_specs_9 = {
sizeof(struct other),
offsetof(struct other, _asn_ctx),
offsetof(struct other, present),
sizeof(((struct other *)0)->present),
asn_MAP_other_9_tag2el,
asn_MAP_other_tag2el_9,
2, /* Count of tags in the map */
0 /* Whether extensible */
.canonical_order = 0,
.ext_start = -1 /* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_other_9 = {
@ -398,14 +427,16 @@ asn_TYPE_descriptor_t asn_DEF_other_9 = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
0, /* No PER visible constraints */
asn_MBR_other_9,
2, /* Elements count */
&asn_SPC_other_9_specs /* Additional specs */
&asn_SPC_other_specs_9 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Stuff_1[] = {
@ -414,6 +445,8 @@ static asn_TYPE_member_t asn_MBR_Stuff_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_trees_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "trees"
},
{ ATF_POINTER, 2, offsetof(struct Stuff, anything),
@ -421,6 +454,8 @@ static asn_TYPE_member_t asn_MBR_Stuff_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_anything_4,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "anything"
},
{ ATF_POINTER, 1, offsetof(struct Stuff, other),
@ -428,36 +463,38 @@ static asn_TYPE_member_t asn_MBR_Stuff_1[] = {
.tag_mode = 0,
.type = &asn_DEF_other_9,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "other"
},
};
static ber_tlv_tag_t asn_DEF_Stuff_1_tags[] = {
static ber_tlv_tag_t asn_DEF_Stuff_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_Stuff_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_Stuff_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* a at 26 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* trees at 23 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* anything at 34 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 } /* b at 28 */
};
static asn_TYPE_tag2member_t asn_MAP_Stuff_1_tag2el_cxer[] = {
static asn_TYPE_tag2member_t asn_MAP_Stuff_tag2el_cxer_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* trees at 23 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* anything at 34 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 } /* a at 26 */
};
static uint8_t asn_MAP_Stuff_1_mmap[(3 + (8 * sizeof(unsigned int)) - 1) / 8] = {
static uint8_t asn_MAP_Stuff_mmap_1[(3 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(0 << 7) | (0 << 6) | (0 << 5)
};
static asn_SET_specifics_t asn_SPC_Stuff_1_specs = {
static asn_SET_specifics_t asn_SPC_Stuff_specs_1 = {
sizeof(struct Stuff),
offsetof(struct Stuff, _asn_ctx),
offsetof(struct Stuff, _presence_map),
asn_MAP_Stuff_1_tag2el,
asn_MAP_Stuff_tag2el_1,
4, /* Count of tags in the map */
asn_MAP_Stuff_1_tag2el_cxer,
asn_MAP_Stuff_tag2el_cxer_1,
3, /* Count of tags in the CXER map */
1, /* Whether extensible */
(unsigned int *)asn_MAP_Stuff_1_mmap /* Mandatory elements map */
(unsigned int *)asn_MAP_Stuff_mmap_1 /* Mandatory elements map */
};
asn_TYPE_descriptor_t asn_DEF_Stuff = {
"Stuff",
@ -469,15 +506,182 @@ asn_TYPE_descriptor_t asn_DEF_Stuff = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_Stuff_1_tags,
sizeof(asn_DEF_Stuff_1_tags)
/sizeof(asn_DEF_Stuff_1_tags[0]), /* 1 */
asn_DEF_Stuff_1_tags, /* Same as above */
sizeof(asn_DEF_Stuff_1_tags)
/sizeof(asn_DEF_Stuff_1_tags[0]), /* 1 */
asn_DEF_Stuff_tags_1,
sizeof(asn_DEF_Stuff_tags_1)
/sizeof(asn_DEF_Stuff_tags_1[0]), /* 1 */
asn_DEF_Stuff_tags_1, /* Same as above */
sizeof(asn_DEF_Stuff_tags_1)
/sizeof(asn_DEF_Stuff_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_Stuff_1,
3, /* Elements count */
&asn_SPC_Stuff_1_specs /* Additional specs */
&asn_SPC_Stuff_specs_1 /* Additional specs */
};
/*** <<< INCLUDES [SSS] >>> ***/
#include <asn_SEQUENCE_OF.h>
#include <asn_SET_OF.h>
#include <BIT_STRING.h>
#include <constr_SEQUENCE_OF.h>
#include <constr_SET_OF.h>
/*** <<< TYPE-DECLS [SSS] >>> ***/
typedef struct SSS {
A_SEQUENCE_OF(struct Member {
A_SET_OF(struct Member {
A_SEQUENCE_OF(BIT_STRING_t) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} SSS_t;
/*** <<< FUNC-DECLS [SSS] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_SSS;
/*** <<< STAT-DEFS [SSS] >>> ***/
static asn_TYPE_member_t asn_MBR_Member_3[] = {
{ ATF_POINTER, 0, 0,
.tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
.tag_mode = 0,
.type = &asn_DEF_BIT_STRING,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = ""
},
};
static ber_tlv_tag_t asn_DEF_Member_tags_3[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_Member_specs_3 = {
sizeof(struct Member),
offsetof(struct Member, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_Member_3 = {
"SEQUENCE OF",
"SEQUENCE_OF",
SEQUENCE_OF_free,
SEQUENCE_OF_print,
SEQUENCE_OF_constraint,
SEQUENCE_OF_decode_ber,
SEQUENCE_OF_encode_der,
SEQUENCE_OF_decode_xer,
SEQUENCE_OF_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_Member_tags_3,
sizeof(asn_DEF_Member_tags_3)
/sizeof(asn_DEF_Member_tags_3[0]), /* 1 */
asn_DEF_Member_tags_3, /* Same as above */
sizeof(asn_DEF_Member_tags_3)
/sizeof(asn_DEF_Member_tags_3[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_Member_3,
1, /* Single element */
&asn_SPC_Member_specs_3 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Member_2[] = {
{ ATF_POINTER, 0, 0,
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0,
.type = &asn_DEF_Member_3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = ""
},
};
static ber_tlv_tag_t asn_DEF_Member_tags_2[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_Member_specs_2 = {
sizeof(struct Member),
offsetof(struct Member, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_Member_2 = {
"SET OF",
"SET_OF",
SET_OF_free,
SET_OF_print,
SET_OF_constraint,
SET_OF_decode_ber,
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_Member_tags_2,
sizeof(asn_DEF_Member_tags_2)
/sizeof(asn_DEF_Member_tags_2[0]), /* 1 */
asn_DEF_Member_tags_2, /* Same as above */
sizeof(asn_DEF_Member_tags_2)
/sizeof(asn_DEF_Member_tags_2[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_Member_2,
1, /* Single element */
&asn_SPC_Member_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_SSS_1[] = {
{ ATF_POINTER, 0, 0,
.tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
.tag_mode = 0,
.type = &asn_DEF_Member_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = ""
},
};
static ber_tlv_tag_t asn_DEF_SSS_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_SSS_specs_1 = {
sizeof(struct SSS),
offsetof(struct SSS, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
};
asn_TYPE_descriptor_t asn_DEF_SSS = {
"SSS",
"SSS",
SEQUENCE_OF_free,
SEQUENCE_OF_print,
SEQUENCE_OF_constraint,
SEQUENCE_OF_decode_ber,
SEQUENCE_OF_encode_der,
SEQUENCE_OF_decode_xer,
SEQUENCE_OF_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_SSS_tags_1,
sizeof(asn_DEF_SSS_tags_1)
/sizeof(asn_DEF_SSS_tags_1[0]), /* 1 */
asn_DEF_SSS_tags_1, /* Same as above */
sizeof(asn_DEF_SSS_tags_1)
/sizeof(asn_DEF_SSS_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_SSS_1,
1, /* Single element */
&asn_SPC_SSS_specs_1 /* Additional specs */
};

View File

@ -33,13 +33,15 @@ static asn_TYPE_member_t asn_MBR_Programming_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Fault,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = ""
},
};
static ber_tlv_tag_t asn_DEF_Programming_1_tags[] = {
static ber_tlv_tag_t asn_DEF_Programming_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_Programming_1_specs = {
static asn_SET_OF_specifics_t asn_SPC_Programming_specs_1 = {
sizeof(struct Programming),
offsetof(struct Programming, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@ -54,16 +56,18 @@ asn_TYPE_descriptor_t asn_DEF_Programming = {
SEQUENCE_OF_encode_der,
SEQUENCE_OF_decode_xer,
SEQUENCE_OF_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_Programming_1_tags,
sizeof(asn_DEF_Programming_1_tags)
/sizeof(asn_DEF_Programming_1_tags[0]), /* 1 */
asn_DEF_Programming_1_tags, /* Same as above */
sizeof(asn_DEF_Programming_1_tags)
/sizeof(asn_DEF_Programming_1_tags[0]), /* 1 */
asn_DEF_Programming_tags_1,
sizeof(asn_DEF_Programming_tags_1)
/sizeof(asn_DEF_Programming_tags_1[0]), /* 1 */
asn_DEF_Programming_tags_1, /* Same as above */
sizeof(asn_DEF_Programming_tags_1)
/sizeof(asn_DEF_Programming_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_Programming_1,
1, /* Single element */
&asn_SPC_Programming_1_specs /* Additional specs */
&asn_SPC_Programming_specs_1 /* Additional specs */
};
@ -101,13 +105,15 @@ static asn_TYPE_member_t asn_MBR_Fault_1[] = {
.tag_mode = 0,
.type = &asn_DEF_Error,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = ""
},
};
static ber_tlv_tag_t asn_DEF_Fault_1_tags[] = {
static ber_tlv_tag_t asn_DEF_Fault_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_Fault_1_specs = {
static asn_SET_OF_specifics_t asn_SPC_Fault_specs_1 = {
sizeof(struct Fault),
offsetof(struct Fault, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@ -122,16 +128,18 @@ asn_TYPE_descriptor_t asn_DEF_Fault = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_Fault_1_tags,
sizeof(asn_DEF_Fault_1_tags)
/sizeof(asn_DEF_Fault_1_tags[0]), /* 1 */
asn_DEF_Fault_1_tags, /* Same as above */
sizeof(asn_DEF_Fault_1_tags)
/sizeof(asn_DEF_Fault_1_tags[0]), /* 1 */
asn_DEF_Fault_tags_1,
sizeof(asn_DEF_Fault_tags_1)
/sizeof(asn_DEF_Fault_tags_1[0]), /* 1 */
asn_DEF_Fault_tags_1, /* Same as above */
sizeof(asn_DEF_Fault_tags_1)
/sizeof(asn_DEF_Fault_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_Fault_1,
1, /* Single element */
&asn_SPC_Fault_1_specs /* Additional specs */
&asn_SPC_Fault_specs_1 /* Additional specs */
};
@ -157,14 +165,15 @@ extern asn_TYPE_descriptor_t asn_DEF_Error;
/*** <<< STAT-DEFS [Error] >>> ***/
static ber_tlv_tag_t asn_DEF_Error_1_tags[] = {
static ber_tlv_tag_t asn_DEF_Error_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_SEQUENCE_specifics_t asn_SPC_Error_1_specs = {
static asn_SEQUENCE_specifics_t asn_SPC_Error_specs_1 = {
sizeof(struct Error),
offsetof(struct Error, _asn_ctx),
0, /* No top level tags */
0, /* No tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@ -178,14 +187,16 @@ asn_TYPE_descriptor_t asn_DEF_Error = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_Error_1_tags,
sizeof(asn_DEF_Error_1_tags)
/sizeof(asn_DEF_Error_1_tags[0]), /* 1 */
asn_DEF_Error_1_tags, /* Same as above */
sizeof(asn_DEF_Error_1_tags)
/sizeof(asn_DEF_Error_1_tags[0]), /* 1 */
asn_DEF_Error_tags_1,
sizeof(asn_DEF_Error_tags_1)
/sizeof(asn_DEF_Error_tags_1[0]), /* 1 */
asn_DEF_Error_tags_1, /* Same as above */
sizeof(asn_DEF_Error_tags_1)
/sizeof(asn_DEF_Error_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
0, 0, /* No members */
&asn_SPC_Error_1_specs /* Additional specs */
&asn_SPC_Error_specs_1 /* Additional specs */
};

View File

@ -41,13 +41,15 @@ static asn_TYPE_member_t asn_MBR_collection_3[] = {
.tag_mode = 0,
.type = &asn_DEF_T2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = ""
},
};
static ber_tlv_tag_t asn_DEF_collection_3_tags[] = {
static ber_tlv_tag_t asn_DEF_collection_tags_3[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_collection_3_specs = {
static asn_SET_OF_specifics_t asn_SPC_collection_specs_3 = {
sizeof(struct collection),
offsetof(struct collection, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@ -63,16 +65,18 @@ asn_TYPE_descriptor_t asn_DEF_collection_3 = {
SEQUENCE_OF_encode_der,
SEQUENCE_OF_decode_xer,
SEQUENCE_OF_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_collection_3_tags,
sizeof(asn_DEF_collection_3_tags)
/sizeof(asn_DEF_collection_3_tags[0]), /* 1 */
asn_DEF_collection_3_tags, /* Same as above */
sizeof(asn_DEF_collection_3_tags)
/sizeof(asn_DEF_collection_3_tags[0]), /* 1 */
asn_DEF_collection_tags_3,
sizeof(asn_DEF_collection_tags_3)
/sizeof(asn_DEF_collection_tags_3[0]), /* 1 */
asn_DEF_collection_tags_3, /* Same as above */
sizeof(asn_DEF_collection_tags_3)
/sizeof(asn_DEF_collection_tags_3[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_collection_3,
1, /* Single element */
&asn_SPC_collection_3_specs /* Additional specs */
&asn_SPC_collection_specs_3 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_T_1[] = {
@ -81,6 +85,8 @@ static asn_TYPE_member_t asn_MBR_T_1[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "int"
},
{ ATF_NOFLAGS, 0, offsetof(struct T, collection),
@ -88,21 +94,24 @@ static asn_TYPE_member_t asn_MBR_T_1[] = {
.tag_mode = 0,
.type = &asn_DEF_collection_3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "collection"
},
};
static ber_tlv_tag_t asn_DEF_T_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_T_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_T_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* int at 15 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* collection at 17 */
};
static asn_SEQUENCE_specifics_t asn_SPC_T_1_specs = {
static asn_SEQUENCE_specifics_t asn_SPC_T_specs_1 = {
sizeof(struct T),
offsetof(struct T, _asn_ctx),
asn_MAP_T_1_tag2el,
asn_MAP_T_tag2el_1,
2, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@ -116,16 +125,18 @@ asn_TYPE_descriptor_t asn_DEF_T = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T_1_tags,
sizeof(asn_DEF_T_1_tags)
/sizeof(asn_DEF_T_1_tags[0]), /* 1 */
asn_DEF_T_1_tags, /* Same as above */
sizeof(asn_DEF_T_1_tags)
/sizeof(asn_DEF_T_1_tags[0]), /* 1 */
asn_DEF_T_tags_1,
sizeof(asn_DEF_T_tags_1)
/sizeof(asn_DEF_T_tags_1[0]), /* 1 */
asn_DEF_T_tags_1, /* Same as above */
sizeof(asn_DEF_T_tags_1)
/sizeof(asn_DEF_T_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_T_1,
2, /* Elements count */
&asn_SPC_T_1_specs /* Additional specs */
&asn_SPC_T_specs_1 /* Additional specs */
};
@ -157,6 +168,8 @@ static asn_TYPE_member_t asn_MBR_T2_1[] = {
.tag_mode = 0,
.type = &asn_DEF_BOOLEAN,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "flag"
},
{ ATF_NOFLAGS, 0, offsetof(struct T2, str),
@ -164,21 +177,24 @@ static asn_TYPE_member_t asn_MBR_T2_1[] = {
.tag_mode = 0,
.type = &asn_DEF_UTF8String,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "str"
},
};
static ber_tlv_tag_t asn_DEF_T2_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T2_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_T2_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_T2_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* flag at 20 */
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 1, 0, 0 } /* str at 21 */
};
static asn_SEQUENCE_specifics_t asn_SPC_T2_1_specs = {
static asn_SEQUENCE_specifics_t asn_SPC_T2_specs_1 = {
sizeof(struct T2),
offsetof(struct T2, _asn_ctx),
asn_MAP_T2_1_tag2el,
asn_MAP_T2_tag2el_1,
2, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@ -192,15 +208,17 @@ asn_TYPE_descriptor_t asn_DEF_T2 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T2_1_tags,
sizeof(asn_DEF_T2_1_tags)
/sizeof(asn_DEF_T2_1_tags[0]), /* 1 */
asn_DEF_T2_1_tags, /* Same as above */
sizeof(asn_DEF_T2_1_tags)
/sizeof(asn_DEF_T2_1_tags[0]), /* 1 */
asn_DEF_T2_tags_1,
sizeof(asn_DEF_T2_tags_1)
/sizeof(asn_DEF_T2_tags_1[0]), /* 1 */
asn_DEF_T2_tags_1, /* Same as above */
sizeof(asn_DEF_T2_tags_1)
/sizeof(asn_DEF_T2_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_T2_1,
2, /* Elements count */
&asn_SPC_T2_1_specs /* Additional specs */
&asn_SPC_T2_specs_1 /* Additional specs */
};

View File

@ -40,7 +40,7 @@ extern asn_TYPE_descriptor_t asn_DEF_LogLine;
/*** <<< CODE [LogLine] >>> ***/
static int
memb_varsets_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
memb_varsets_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
size_t size;
@ -74,13 +74,15 @@ static asn_TYPE_member_t asn_MBR_varsets_3[] = {
.tag_mode = 0,
.type = &asn_DEF_VariablePartSet,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = ""
},
};
static ber_tlv_tag_t asn_DEF_varsets_3_tags[] = {
static ber_tlv_tag_t asn_DEF_varsets_tags_3[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_varsets_3_specs = {
static asn_SET_OF_specifics_t asn_SPC_varsets_specs_3 = {
sizeof(struct varsets),
offsetof(struct varsets, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@ -96,16 +98,18 @@ asn_TYPE_descriptor_t asn_DEF_varsets_3 = {
SEQUENCE_OF_encode_der,
SEQUENCE_OF_decode_xer,
SEQUENCE_OF_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_varsets_3_tags,
sizeof(asn_DEF_varsets_3_tags)
/sizeof(asn_DEF_varsets_3_tags[0]), /* 1 */
asn_DEF_varsets_3_tags, /* Same as above */
sizeof(asn_DEF_varsets_3_tags)
/sizeof(asn_DEF_varsets_3_tags[0]), /* 1 */
asn_DEF_varsets_tags_3,
sizeof(asn_DEF_varsets_tags_3)
/sizeof(asn_DEF_varsets_tags_3[0]), /* 1 */
asn_DEF_varsets_tags_3, /* Same as above */
sizeof(asn_DEF_varsets_tags_3)
/sizeof(asn_DEF_varsets_tags_3[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_varsets_3,
1, /* Single element */
&asn_SPC_varsets_3_specs /* Additional specs */
&asn_SPC_varsets_specs_3 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_LogLine_1[] = {
@ -114,28 +118,33 @@ static asn_TYPE_member_t asn_MBR_LogLine_1[] = {
.tag_mode = 0,
.type = &asn_DEF_IA5String,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "line-digest"
},
{ ATF_NOFLAGS, 0, offsetof(struct LogLine, varsets),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0,
.type = &asn_DEF_varsets_3,
.memb_constraints = memb_varsets_1_constraint,
.memb_constraints = memb_varsets_constraint_1,
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "varsets"
},
};
static ber_tlv_tag_t asn_DEF_LogLine_1_tags[] = {
static ber_tlv_tag_t asn_DEF_LogLine_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_LogLine_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_LogLine_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* varsets at 25 */
{ (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), 0, 0, 0 } /* line-digest at 23 */
};
static asn_SEQUENCE_specifics_t asn_SPC_LogLine_1_specs = {
static asn_SEQUENCE_specifics_t asn_SPC_LogLine_specs_1 = {
sizeof(struct LogLine),
offsetof(struct LogLine, _asn_ctx),
asn_MAP_LogLine_1_tag2el,
asn_MAP_LogLine_tag2el_1,
2, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
1, /* Start extensions */
3 /* Stop extensions */
};
@ -149,16 +158,18 @@ asn_TYPE_descriptor_t asn_DEF_LogLine = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_LogLine_1_tags,
sizeof(asn_DEF_LogLine_1_tags)
/sizeof(asn_DEF_LogLine_1_tags[0]), /* 1 */
asn_DEF_LogLine_1_tags, /* Same as above */
sizeof(asn_DEF_LogLine_1_tags)
/sizeof(asn_DEF_LogLine_1_tags[0]), /* 1 */
asn_DEF_LogLine_tags_1,
sizeof(asn_DEF_LogLine_tags_1)
/sizeof(asn_DEF_LogLine_tags_1[0]), /* 1 */
asn_DEF_LogLine_tags_1, /* Same as above */
sizeof(asn_DEF_LogLine_tags_1)
/sizeof(asn_DEF_LogLine_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_LogLine_1,
2, /* Elements count */
&asn_SPC_LogLine_1_specs /* Additional specs */
&asn_SPC_LogLine_specs_1 /* Additional specs */
};
@ -203,7 +214,7 @@ extern asn_TYPE_descriptor_t asn_DEF_VariablePartSet;
/*** <<< CODE [VariablePartSet] >>> ***/
static int
memb_vparts_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
memb_vparts_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
if(!sptr) {
@ -230,13 +241,15 @@ static asn_TYPE_member_t asn_MBR_vparts_2[] = {
.tag_mode = 0,
.type = &asn_DEF_VariablePart,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = ""
},
};
static ber_tlv_tag_t asn_DEF_vparts_2_tags[] = {
static ber_tlv_tag_t asn_DEF_vparts_tags_2[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_vparts_2_specs = {
static asn_SET_OF_specifics_t asn_SPC_vparts_specs_2 = {
sizeof(struct vparts),
offsetof(struct vparts, _asn_ctx),
2, /* XER encoding is XMLValueList */
@ -252,16 +265,18 @@ asn_TYPE_descriptor_t asn_DEF_vparts_2 = {
SEQUENCE_OF_encode_der,
SEQUENCE_OF_decode_xer,
SEQUENCE_OF_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_vparts_2_tags,
sizeof(asn_DEF_vparts_2_tags)
/sizeof(asn_DEF_vparts_2_tags[0]), /* 1 */
asn_DEF_vparts_2_tags, /* Same as above */
sizeof(asn_DEF_vparts_2_tags)
/sizeof(asn_DEF_vparts_2_tags[0]), /* 1 */
asn_DEF_vparts_tags_2,
sizeof(asn_DEF_vparts_tags_2)
/sizeof(asn_DEF_vparts_tags_2[0]), /* 1 */
asn_DEF_vparts_tags_2, /* Same as above */
sizeof(asn_DEF_vparts_tags_2)
/sizeof(asn_DEF_vparts_tags_2[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_vparts_2,
1, /* Single element */
&asn_SPC_vparts_2_specs /* Additional specs */
&asn_SPC_vparts_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_VariablePartSet_1[] = {
@ -269,7 +284,9 @@ static asn_TYPE_member_t asn_MBR_VariablePartSet_1[] = {
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0,
.type = &asn_DEF_vparts_2,
.memb_constraints = memb_vparts_1_constraint,
.memb_constraints = memb_vparts_constraint_1,
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "vparts"
},
{ ATF_NOFLAGS, 0, offsetof(struct VariablePartSet, resolution),
@ -277,21 +294,24 @@ static asn_TYPE_member_t asn_MBR_VariablePartSet_1[] = {
.tag_mode = 0,
.type = &asn_DEF_ActionItem,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "resolution"
},
};
static ber_tlv_tag_t asn_DEF_VariablePartSet_1_tags[] = {
static ber_tlv_tag_t asn_DEF_VariablePartSet_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_VariablePartSet_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_VariablePartSet_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* vparts at 33 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 } /* resolution at 35 */
};
static asn_SEQUENCE_specifics_t asn_SPC_VariablePartSet_1_specs = {
static asn_SEQUENCE_specifics_t asn_SPC_VariablePartSet_specs_1 = {
sizeof(struct VariablePartSet),
offsetof(struct VariablePartSet, _asn_ctx),
asn_MAP_VariablePartSet_1_tag2el,
asn_MAP_VariablePartSet_tag2el_1,
2, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
1, /* Start extensions */
3 /* Stop extensions */
};
@ -305,16 +325,18 @@ asn_TYPE_descriptor_t asn_DEF_VariablePartSet = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_VariablePartSet_1_tags,
sizeof(asn_DEF_VariablePartSet_1_tags)
/sizeof(asn_DEF_VariablePartSet_1_tags[0]), /* 1 */
asn_DEF_VariablePartSet_1_tags, /* Same as above */
sizeof(asn_DEF_VariablePartSet_1_tags)
/sizeof(asn_DEF_VariablePartSet_1_tags[0]), /* 1 */
asn_DEF_VariablePartSet_tags_1,
sizeof(asn_DEF_VariablePartSet_tags_1)
/sizeof(asn_DEF_VariablePartSet_tags_1[0]), /* 1 */
asn_DEF_VariablePartSet_tags_1, /* Same as above */
sizeof(asn_DEF_VariablePartSet_tags_1)
/sizeof(asn_DEF_VariablePartSet_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_VariablePartSet_1,
2, /* Elements count */
&asn_SPC_VariablePartSet_1_specs /* Additional specs */
&asn_SPC_VariablePartSet_specs_1 /* Additional specs */
};
@ -374,7 +396,7 @@ extern asn_TYPE_descriptor_t asn_DEF_VariablePart;
/*** <<< CODE [VariablePart] >>> ***/
static int
memb_vset_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
memb_vset_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
size_t size;
@ -408,13 +430,15 @@ static asn_TYPE_member_t asn_MBR_vset_2[] = {
.tag_mode = 0,
.type = &asn_DEF_VisibleString,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = ""
},
};
static ber_tlv_tag_t asn_DEF_vset_2_tags[] = {
static ber_tlv_tag_t asn_DEF_vset_tags_2[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_vset_2_specs = {
static asn_SET_OF_specifics_t asn_SPC_vset_specs_2 = {
sizeof(struct vset),
offsetof(struct vset, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@ -430,16 +454,18 @@ asn_TYPE_descriptor_t asn_DEF_vset_2 = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_vset_2_tags,
sizeof(asn_DEF_vset_2_tags)
/sizeof(asn_DEF_vset_2_tags[0]), /* 1 */
asn_DEF_vset_2_tags, /* Same as above */
sizeof(asn_DEF_vset_2_tags)
/sizeof(asn_DEF_vset_2_tags[0]), /* 1 */
asn_DEF_vset_tags_2,
sizeof(asn_DEF_vset_tags_2)
/sizeof(asn_DEF_vset_tags_2[0]), /* 1 */
asn_DEF_vset_tags_2, /* Same as above */
sizeof(asn_DEF_vset_tags_2)
/sizeof(asn_DEF_vset_tags_2[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_vset_2,
1, /* Single element */
&asn_SPC_vset_2_specs /* Additional specs */
&asn_SPC_vset_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_vrange_4[] = {
@ -448,6 +474,8 @@ static asn_TYPE_member_t asn_MBR_vrange_4[] = {
.tag_mode = 0,
.type = &asn_DEF_VisibleString,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "from"
},
{ ATF_NOFLAGS, 0, offsetof(struct vrange, to),
@ -455,21 +483,24 @@ static asn_TYPE_member_t asn_MBR_vrange_4[] = {
.tag_mode = 0,
.type = &asn_DEF_VisibleString,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "to"
},
};
static ber_tlv_tag_t asn_DEF_vrange_4_tags[] = {
static ber_tlv_tag_t asn_DEF_vrange_tags_4[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_vrange_4_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_vrange_tag2el_4[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 0, 0, 1 }, /* from at 45 */
{ (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 1, -1, 0 } /* to at 46 */
};
static asn_SEQUENCE_specifics_t asn_SPC_vrange_4_specs = {
static asn_SEQUENCE_specifics_t asn_SPC_vrange_specs_4 = {
sizeof(struct vrange),
offsetof(struct vrange, _asn_ctx),
asn_MAP_vrange_4_tag2el,
asn_MAP_vrange_tag2el_4,
2, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
1, /* Start extensions */
3 /* Stop extensions */
};
@ -484,16 +515,18 @@ asn_TYPE_descriptor_t asn_DEF_vrange_4 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_vrange_4_tags,
sizeof(asn_DEF_vrange_4_tags)
/sizeof(asn_DEF_vrange_4_tags[0]), /* 1 */
asn_DEF_vrange_4_tags, /* Same as above */
sizeof(asn_DEF_vrange_4_tags)
/sizeof(asn_DEF_vrange_4_tags[0]), /* 1 */
asn_DEF_vrange_tags_4,
sizeof(asn_DEF_vrange_tags_4)
/sizeof(asn_DEF_vrange_tags_4[0]), /* 1 */
asn_DEF_vrange_tags_4, /* Same as above */
sizeof(asn_DEF_vrange_tags_4)
/sizeof(asn_DEF_vrange_tags_4[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_vrange_4,
2, /* Elements count */
&asn_SPC_vrange_4_specs /* Additional specs */
&asn_SPC_vrange_specs_4 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_VariablePart_1[] = {
@ -501,7 +534,9 @@ static asn_TYPE_member_t asn_MBR_VariablePart_1[] = {
.tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
.tag_mode = 0,
.type = &asn_DEF_vset_2,
.memb_constraints = memb_vset_1_constraint,
.memb_constraints = memb_vset_constraint_1,
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "vset"
},
{ ATF_NOFLAGS, 0, offsetof(struct VariablePart, choice.vrange),
@ -509,21 +544,24 @@ static asn_TYPE_member_t asn_MBR_VariablePart_1[] = {
.tag_mode = 0,
.type = &asn_DEF_vrange_4,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "vrange"
},
};
static asn_TYPE_tag2member_t asn_MAP_VariablePart_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_VariablePart_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* vrange at 45 */
{ (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* vset at 42 */
};
static asn_CHOICE_specifics_t asn_SPC_VariablePart_1_specs = {
static asn_CHOICE_specifics_t asn_SPC_VariablePart_specs_1 = {
sizeof(struct VariablePart),
offsetof(struct VariablePart, _asn_ctx),
offsetof(struct VariablePart, present),
sizeof(((struct VariablePart *)0)->present),
asn_MAP_VariablePart_1_tag2el,
asn_MAP_VariablePart_tag2el_1,
2, /* Count of tags in the map */
1 /* Whether extensible */
.canonical_order = 0,
.ext_start = 2 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_VariablePart = {
"VariablePart",
@ -535,14 +573,16 @@ asn_TYPE_descriptor_t asn_DEF_VariablePart = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
0, /* No PER visible constraints */
asn_MBR_VariablePart_1,
2, /* Elements count */
&asn_SPC_VariablePart_1_specs /* Additional specs */
&asn_SPC_VariablePart_specs_1 /* Additional specs */
};
@ -622,6 +662,9 @@ accept_as_2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_ENUMERATED.der_encoder;
td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder;
td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder;
td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder;
if(!td->per_constraints)
td->per_constraints = asn_DEF_ENUMERATED.per_constraints;
td->elements = asn_DEF_ENUMERATED.elements;
td->elements_count = asn_DEF_ENUMERATED.elements_count;
/* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */
@ -674,26 +717,26 @@ accept_as_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [ActionItem] >>> ***/
static asn_INTEGER_enum_map_t asn_MAP_accept_as_2_value2enum[] = {
static asn_INTEGER_enum_map_t asn_MAP_accept_as_value2enum_2[] = {
{ 0, 7, "unknown" },
{ 1, 4, "safe" },
{ 2, 6, "unsafe" }
/* This list is extensible */
};
static unsigned int asn_MAP_accept_as_2_enum2value[] = {
static unsigned int asn_MAP_accept_as_enum2value_2[] = {
1, /* safe(1) */
0, /* unknown(0) */
2 /* unsafe(2) */
/* This list is extensible */
};
static asn_INTEGER_specifics_t asn_SPC_accept_as_2_specs = {
asn_MAP_accept_as_2_value2enum, /* "tag" => N; sorted by tag */
asn_MAP_accept_as_2_enum2value, /* N => "tag"; sorted by N */
static asn_INTEGER_specifics_t asn_SPC_accept_as_specs_2 = {
asn_MAP_accept_as_value2enum_2, /* "tag" => N; sorted by tag */
asn_MAP_accept_as_enum2value_2, /* N => "tag"; sorted by N */
3, /* Number of elements in the maps */
1, /* Enumeration is extensible */
4, /* Extensions before this member */
1 /* Strict enumeration */
};
static ber_tlv_tag_t asn_DEF_accept_as_2_tags[] = {
static ber_tlv_tag_t asn_DEF_accept_as_tags_2[] = {
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
static /* Use -fall-defs-global to expose */
@ -707,15 +750,17 @@ asn_TYPE_descriptor_t asn_DEF_accept_as_2 = {
accept_as_2_encode_der,
accept_as_2_decode_xer,
accept_as_2_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_accept_as_2_tags,
sizeof(asn_DEF_accept_as_2_tags)
/sizeof(asn_DEF_accept_as_2_tags[0]), /* 1 */
asn_DEF_accept_as_2_tags, /* Same as above */
sizeof(asn_DEF_accept_as_2_tags)
/sizeof(asn_DEF_accept_as_2_tags[0]), /* 1 */
asn_DEF_accept_as_tags_2,
sizeof(asn_DEF_accept_as_tags_2)
/sizeof(asn_DEF_accept_as_tags_2[0]), /* 1 */
asn_DEF_accept_as_tags_2, /* Same as above */
sizeof(asn_DEF_accept_as_tags_2)
/sizeof(asn_DEF_accept_as_tags_2[0]), /* 1 */
0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
&asn_SPC_accept_as_2_specs /* Additional specs */
&asn_SPC_accept_as_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_email_9[] = {
@ -724,13 +769,15 @@ static asn_TYPE_member_t asn_MBR_email_9[] = {
.tag_mode = 0,
.type = &asn_DEF_VisibleString,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = ""
},
};
static ber_tlv_tag_t asn_DEF_email_9_tags[] = {
static ber_tlv_tag_t asn_DEF_email_tags_9[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_email_9_specs = {
static asn_SET_OF_specifics_t asn_SPC_email_specs_9 = {
sizeof(struct email),
offsetof(struct email, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@ -746,16 +793,18 @@ asn_TYPE_descriptor_t asn_DEF_email_9 = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_email_9_tags,
sizeof(asn_DEF_email_9_tags)
/sizeof(asn_DEF_email_9_tags[0]), /* 1 */
asn_DEF_email_9_tags, /* Same as above */
sizeof(asn_DEF_email_9_tags)
/sizeof(asn_DEF_email_9_tags[0]), /* 1 */
asn_DEF_email_tags_9,
sizeof(asn_DEF_email_tags_9)
/sizeof(asn_DEF_email_tags_9[0]), /* 1 */
asn_DEF_email_tags_9, /* Same as above */
sizeof(asn_DEF_email_tags_9)
/sizeof(asn_DEF_email_tags_9[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_email_9,
1, /* Single element */
&asn_SPC_email_9_specs /* Additional specs */
&asn_SPC_email_specs_9 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_notify_7[] = {
@ -764,6 +813,8 @@ static asn_TYPE_member_t asn_MBR_notify_7[] = {
.tag_mode = 0,
.type = &asn_DEF_BOOLEAN,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "critical"
},
{ ATF_NOFLAGS, 0, offsetof(struct notify, email),
@ -771,21 +822,24 @@ static asn_TYPE_member_t asn_MBR_notify_7[] = {
.tag_mode = 0,
.type = &asn_DEF_email_9,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "email"
},
};
static ber_tlv_tag_t asn_DEF_notify_7_tags[] = {
static ber_tlv_tag_t asn_DEF_notify_tags_7[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_notify_7_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_notify_tag2el_7[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* critical at 61 */
{ (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 1, 0, 0 } /* email at 62 */
};
static asn_SEQUENCE_specifics_t asn_SPC_notify_7_specs = {
static asn_SEQUENCE_specifics_t asn_SPC_notify_specs_7 = {
sizeof(struct notify),
offsetof(struct notify, _asn_ctx),
asn_MAP_notify_7_tag2el,
asn_MAP_notify_tag2el_7,
2, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
1, /* Start extensions */
3 /* Stop extensions */
};
@ -800,16 +854,18 @@ asn_TYPE_descriptor_t asn_DEF_notify_7 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_notify_7_tags,
sizeof(asn_DEF_notify_7_tags)
/sizeof(asn_DEF_notify_7_tags[0]), /* 1 */
asn_DEF_notify_7_tags, /* Same as above */
sizeof(asn_DEF_notify_7_tags)
/sizeof(asn_DEF_notify_7_tags[0]), /* 1 */
asn_DEF_notify_tags_7,
sizeof(asn_DEF_notify_tags_7)
/sizeof(asn_DEF_notify_tags_7[0]), /* 1 */
asn_DEF_notify_tags_7, /* Same as above */
sizeof(asn_DEF_notify_tags_7)
/sizeof(asn_DEF_notify_tags_7[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_notify_7,
2, /* Elements count */
&asn_SPC_notify_7_specs /* Additional specs */
&asn_SPC_notify_specs_7 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_ActionItem_1[] = {
@ -818,6 +874,8 @@ static asn_TYPE_member_t asn_MBR_ActionItem_1[] = {
.tag_mode = 0,
.type = &asn_DEF_accept_as_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "accept-as"
},
{ ATF_POINTER, 1, offsetof(struct ActionItem, notify),
@ -825,21 +883,24 @@ static asn_TYPE_member_t asn_MBR_ActionItem_1[] = {
.tag_mode = 0,
.type = &asn_DEF_notify_7,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "notify"
},
};
static ber_tlv_tag_t asn_DEF_ActionItem_1_tags[] = {
static ber_tlv_tag_t asn_DEF_ActionItem_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_ActionItem_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_ActionItem_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 }, /* accept-as at 55 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* notify at 61 */
};
static asn_SEQUENCE_specifics_t asn_SPC_ActionItem_1_specs = {
static asn_SEQUENCE_specifics_t asn_SPC_ActionItem_specs_1 = {
sizeof(struct ActionItem),
offsetof(struct ActionItem, _asn_ctx),
asn_MAP_ActionItem_1_tag2el,
asn_MAP_ActionItem_tag2el_1,
2, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
1, /* Start extensions */
3 /* Stop extensions */
};
@ -853,15 +914,17 @@ asn_TYPE_descriptor_t asn_DEF_ActionItem = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_ActionItem_1_tags,
sizeof(asn_DEF_ActionItem_1_tags)
/sizeof(asn_DEF_ActionItem_1_tags[0]), /* 1 */
asn_DEF_ActionItem_1_tags, /* Same as above */
sizeof(asn_DEF_ActionItem_1_tags)
/sizeof(asn_DEF_ActionItem_1_tags[0]), /* 1 */
asn_DEF_ActionItem_tags_1,
sizeof(asn_DEF_ActionItem_tags_1)
/sizeof(asn_DEF_ActionItem_tags_1[0]), /* 1 */
asn_DEF_ActionItem_tags_1, /* Same as above */
sizeof(asn_DEF_ActionItem_tags_1)
/sizeof(asn_DEF_ActionItem_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_ActionItem_1,
2, /* Elements count */
&asn_SPC_ActionItem_1_specs /* Additional specs */
&asn_SPC_ActionItem_specs_1 /* Additional specs */
};

View File

@ -50,13 +50,15 @@ static asn_TYPE_member_t asn_MBR_t_member1_2[] = {
.tag_mode = 0,
.type = &asn_DEF_Test_structure_1,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = ""
},
};
static ber_tlv_tag_t asn_DEF_t_member1_2_tags[] = {
static ber_tlv_tag_t asn_DEF_t_member1_tags_2[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_t_member1_2_specs = {
static asn_SET_OF_specifics_t asn_SPC_t_member1_specs_2 = {
sizeof(struct t_member1),
offsetof(struct t_member1, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@ -72,16 +74,18 @@ asn_TYPE_descriptor_t asn_DEF_t_member1_2 = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_t_member1_2_tags,
sizeof(asn_DEF_t_member1_2_tags)
/sizeof(asn_DEF_t_member1_2_tags[0]), /* 1 */
asn_DEF_t_member1_2_tags, /* Same as above */
sizeof(asn_DEF_t_member1_2_tags)
/sizeof(asn_DEF_t_member1_2_tags[0]), /* 1 */
asn_DEF_t_member1_tags_2,
sizeof(asn_DEF_t_member1_tags_2)
/sizeof(asn_DEF_t_member1_tags_2[0]), /* 1 */
asn_DEF_t_member1_tags_2, /* Same as above */
sizeof(asn_DEF_t_member1_tags_2)
/sizeof(asn_DEF_t_member1_tags_2[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_t_member1_2,
1, /* Single element */
&asn_SPC_t_member1_2_specs /* Additional specs */
&asn_SPC_t_member1_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_t_member2_4[] = {
@ -90,13 +94,15 @@ static asn_TYPE_member_t asn_MBR_t_member2_4[] = {
.tag_mode = 0,
.type = &asn_DEF_Test_structure_1,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = ""
},
};
static ber_tlv_tag_t asn_DEF_t_member2_4_tags[] = {
static ber_tlv_tag_t asn_DEF_t_member2_tags_4[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_t_member2_4_specs = {
static asn_SET_OF_specifics_t asn_SPC_t_member2_specs_4 = {
sizeof(struct t_member2),
offsetof(struct t_member2, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@ -112,16 +118,18 @@ asn_TYPE_descriptor_t asn_DEF_t_member2_4 = {
SEQUENCE_OF_encode_der,
SEQUENCE_OF_decode_xer,
SEQUENCE_OF_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_t_member2_4_tags,
sizeof(asn_DEF_t_member2_4_tags)
/sizeof(asn_DEF_t_member2_4_tags[0]), /* 1 */
asn_DEF_t_member2_4_tags, /* Same as above */
sizeof(asn_DEF_t_member2_4_tags)
/sizeof(asn_DEF_t_member2_4_tags[0]), /* 1 */
asn_DEF_t_member2_tags_4,
sizeof(asn_DEF_t_member2_tags_4)
/sizeof(asn_DEF_t_member2_tags_4[0]), /* 1 */
asn_DEF_t_member2_tags_4, /* Same as above */
sizeof(asn_DEF_t_member2_tags_4)
/sizeof(asn_DEF_t_member2_tags_4[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_t_member2_4,
1, /* Single element */
&asn_SPC_t_member2_4_specs /* Additional specs */
&asn_SPC_t_member2_specs_4 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Test_structure_1_1[] = {
@ -130,6 +138,8 @@ static asn_TYPE_member_t asn_MBR_Test_structure_1_1[] = {
.tag_mode = 0,
.type = &asn_DEF_t_member1_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "t-member1"
},
{ ATF_NOFLAGS, 0, offsetof(struct Test_structure_1, t_member2),
@ -137,6 +147,8 @@ static asn_TYPE_member_t asn_MBR_Test_structure_1_1[] = {
.tag_mode = 0,
.type = &asn_DEF_t_member2_4,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "t-member2"
},
{ ATF_POINTER, 1, offsetof(struct Test_structure_1, t_member3),
@ -144,6 +156,8 @@ static asn_TYPE_member_t asn_MBR_Test_structure_1_1[] = {
.tag_mode = 0,
.type = &asn_DEF_Test_structure_1,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "t-member3"
},
{ ATF_NOFLAGS, 0, offsetof(struct Test_structure_1, t_member4),
@ -151,23 +165,26 @@ static asn_TYPE_member_t asn_MBR_Test_structure_1_1[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "t-member4"
},
};
static ber_tlv_tag_t asn_DEF_Test_structure_1_1_tags[] = {
static ber_tlv_tag_t asn_DEF_Test_structure_1_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_Test_structure_1_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_Test_structure_1_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, 0, 0 }, /* t-member4 at 19 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 1 }, /* t-member2 at 16 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 0 }, /* t-member3 at 17 */
{ (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* t-member1 at 15 */
};
static asn_SEQUENCE_specifics_t asn_SPC_Test_structure_1_1_specs = {
static asn_SEQUENCE_specifics_t asn_SPC_Test_structure_1_specs_1 = {
sizeof(struct Test_structure_1),
offsetof(struct Test_structure_1, _asn_ctx),
asn_MAP_Test_structure_1_1_tag2el,
asn_MAP_Test_structure_1_tag2el_1,
4, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@ -181,16 +198,18 @@ asn_TYPE_descriptor_t asn_DEF_Test_structure_1 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_Test_structure_1_1_tags,
sizeof(asn_DEF_Test_structure_1_1_tags)
/sizeof(asn_DEF_Test_structure_1_1_tags[0]), /* 1 */
asn_DEF_Test_structure_1_1_tags, /* Same as above */
sizeof(asn_DEF_Test_structure_1_1_tags)
/sizeof(asn_DEF_Test_structure_1_1_tags[0]), /* 1 */
asn_DEF_Test_structure_1_tags_1,
sizeof(asn_DEF_Test_structure_1_tags_1)
/sizeof(asn_DEF_Test_structure_1_tags_1[0]), /* 1 */
asn_DEF_Test_structure_1_tags_1, /* Same as above */
sizeof(asn_DEF_Test_structure_1_tags_1)
/sizeof(asn_DEF_Test_structure_1_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_Test_structure_1_1,
4, /* Elements count */
&asn_SPC_Test_structure_1_1_specs /* Additional specs */
&asn_SPC_Test_structure_1_specs_1 /* Additional specs */
};
@ -251,14 +270,16 @@ static asn_TYPE_member_t asn_MBR_or_3[] = {
.tag_mode = 0,
.type = &asn_DEF_Choice_1,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = ""
},
};
static ber_tlv_tag_t asn_DEF_or_3_tags[] = {
static ber_tlv_tag_t asn_DEF_or_tags_3[] = {
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_or_3_specs = {
static asn_SET_OF_specifics_t asn_SPC_or_specs_3 = {
sizeof(struct or),
offsetof(struct or, _asn_ctx),
2, /* XER encoding is XMLValueList */
@ -274,16 +295,18 @@ asn_TYPE_descriptor_t asn_DEF_or_3 = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_or_3_tags,
sizeof(asn_DEF_or_3_tags)
/sizeof(asn_DEF_or_3_tags[0]) - 1, /* 1 */
asn_DEF_or_3_tags, /* Same as above */
sizeof(asn_DEF_or_3_tags)
/sizeof(asn_DEF_or_3_tags[0]), /* 2 */
asn_DEF_or_tags_3,
sizeof(asn_DEF_or_tags_3)
/sizeof(asn_DEF_or_tags_3[0]) - 1, /* 1 */
asn_DEF_or_tags_3, /* Same as above */
sizeof(asn_DEF_or_tags_3)
/sizeof(asn_DEF_or_tags_3[0]), /* 2 */
0, /* No PER visible constraints */
asn_MBR_or_3,
1, /* Single element */
&asn_SPC_or_3_specs /* Additional specs */
&asn_SPC_or_specs_3 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Choice_1_1[] = {
@ -292,6 +315,8 @@ static asn_TYPE_member_t asn_MBR_Choice_1_1[] = {
.tag_mode = +1, /* EXPLICIT tag at current level */
.type = &asn_DEF_Choice_1,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "and"
},
{ ATF_NOFLAGS, 0, offsetof(struct Choice_1, choice.or),
@ -299,6 +324,8 @@ static asn_TYPE_member_t asn_MBR_Choice_1_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_or_3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "or"
},
{ ATF_POINTER, 0, offsetof(struct Choice_1, choice.not),
@ -306,6 +333,8 @@ static asn_TYPE_member_t asn_MBR_Choice_1_1[] = {
.tag_mode = +1, /* EXPLICIT tag at current level */
.type = &asn_DEF_Choice_1,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "not"
},
{ ATF_NOFLAGS, 0, offsetof(struct Choice_1, choice.other),
@ -313,23 +342,26 @@ static asn_TYPE_member_t asn_MBR_Choice_1_1[] = {
.tag_mode = +1, /* EXPLICIT tag at current level */
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "other"
},
};
static asn_TYPE_tag2member_t asn_MAP_Choice_1_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_Choice_1_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* and at 22 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* or at 23 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* not at 24 */
{ (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 3, 0, 0 } /* other at 26 */
};
static asn_CHOICE_specifics_t asn_SPC_Choice_1_1_specs = {
static asn_CHOICE_specifics_t asn_SPC_Choice_1_specs_1 = {
sizeof(struct Choice_1),
offsetof(struct Choice_1, _asn_ctx),
offsetof(struct Choice_1, present),
sizeof(((struct Choice_1 *)0)->present),
asn_MAP_Choice_1_1_tag2el,
asn_MAP_Choice_1_tag2el_1,
4, /* Count of tags in the map */
0 /* Whether extensible */
.canonical_order = 0,
.ext_start = -1 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_Choice_1 = {
"Choice-1",
@ -341,14 +373,16 @@ asn_TYPE_descriptor_t asn_DEF_Choice_1 = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
0, /* No PER visible constraints */
asn_MBR_Choice_1_1,
4, /* Elements count */
&asn_SPC_Choice_1_1_specs /* Additional specs */
&asn_SPC_Choice_1_specs_1 /* Additional specs */
};
@ -399,28 +433,30 @@ static asn_TYPE_member_t asn_MBR_Test_structure_2_1[] = {
.tag_mode = 0,
.type = &asn_DEF_Test_structure_3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "m1"
},
};
static ber_tlv_tag_t asn_DEF_Test_structure_2_1_tags[] = {
static ber_tlv_tag_t asn_DEF_Test_structure_2_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_Test_structure_2_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_Test_structure_2_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* m1 at 28 */
};
static uint8_t asn_MAP_Test_structure_2_1_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
static uint8_t asn_MAP_Test_structure_2_mmap_1[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(0 << 7)
};
static asn_SET_specifics_t asn_SPC_Test_structure_2_1_specs = {
static asn_SET_specifics_t asn_SPC_Test_structure_2_specs_1 = {
sizeof(struct Test_structure_2),
offsetof(struct Test_structure_2, _asn_ctx),
offsetof(struct Test_structure_2, _presence_map),
asn_MAP_Test_structure_2_1_tag2el,
asn_MAP_Test_structure_2_tag2el_1,
1, /* Count of tags in the map */
asn_MAP_Test_structure_2_1_tag2el, /* Same as above */
asn_MAP_Test_structure_2_tag2el_1, /* Same as above */
1, /* Count of tags in the CXER map */
0, /* Whether extensible */
(unsigned int *)asn_MAP_Test_structure_2_1_mmap /* Mandatory elements map */
(unsigned int *)asn_MAP_Test_structure_2_mmap_1 /* Mandatory elements map */
};
asn_TYPE_descriptor_t asn_DEF_Test_structure_2 = {
"Test-structure-2",
@ -432,16 +468,18 @@ asn_TYPE_descriptor_t asn_DEF_Test_structure_2 = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_Test_structure_2_1_tags,
sizeof(asn_DEF_Test_structure_2_1_tags)
/sizeof(asn_DEF_Test_structure_2_1_tags[0]), /* 1 */
asn_DEF_Test_structure_2_1_tags, /* Same as above */
sizeof(asn_DEF_Test_structure_2_1_tags)
/sizeof(asn_DEF_Test_structure_2_1_tags[0]), /* 1 */
asn_DEF_Test_structure_2_tags_1,
sizeof(asn_DEF_Test_structure_2_tags_1)
/sizeof(asn_DEF_Test_structure_2_tags_1[0]), /* 1 */
asn_DEF_Test_structure_2_tags_1, /* Same as above */
sizeof(asn_DEF_Test_structure_2_tags_1)
/sizeof(asn_DEF_Test_structure_2_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_Test_structure_2_1,
1, /* Elements count */
&asn_SPC_Test_structure_2_1_specs /* Additional specs */
&asn_SPC_Test_structure_2_specs_1 /* Additional specs */
};
@ -492,28 +530,30 @@ static asn_TYPE_member_t asn_MBR_Test_structure_3_1[] = {
.tag_mode = 0,
.type = &asn_DEF_Test_structure_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "m1"
},
};
static ber_tlv_tag_t asn_DEF_Test_structure_3_1_tags[] = {
static ber_tlv_tag_t asn_DEF_Test_structure_3_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_Test_structure_3_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_Test_structure_3_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* m1 at 29 */
};
static uint8_t asn_MAP_Test_structure_3_1_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
static uint8_t asn_MAP_Test_structure_3_mmap_1[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(0 << 7)
};
static asn_SET_specifics_t asn_SPC_Test_structure_3_1_specs = {
static asn_SET_specifics_t asn_SPC_Test_structure_3_specs_1 = {
sizeof(struct Test_structure_3),
offsetof(struct Test_structure_3, _asn_ctx),
offsetof(struct Test_structure_3, _presence_map),
asn_MAP_Test_structure_3_1_tag2el,
asn_MAP_Test_structure_3_tag2el_1,
1, /* Count of tags in the map */
asn_MAP_Test_structure_3_1_tag2el, /* Same as above */
asn_MAP_Test_structure_3_tag2el_1, /* Same as above */
1, /* Count of tags in the CXER map */
0, /* Whether extensible */
(unsigned int *)asn_MAP_Test_structure_3_1_mmap /* Mandatory elements map */
(unsigned int *)asn_MAP_Test_structure_3_mmap_1 /* Mandatory elements map */
};
asn_TYPE_descriptor_t asn_DEF_Test_structure_3 = {
"Test-structure-3",
@ -525,15 +565,17 @@ asn_TYPE_descriptor_t asn_DEF_Test_structure_3 = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_Test_structure_3_1_tags,
sizeof(asn_DEF_Test_structure_3_1_tags)
/sizeof(asn_DEF_Test_structure_3_1_tags[0]), /* 1 */
asn_DEF_Test_structure_3_1_tags, /* Same as above */
sizeof(asn_DEF_Test_structure_3_1_tags)
/sizeof(asn_DEF_Test_structure_3_1_tags[0]), /* 1 */
asn_DEF_Test_structure_3_tags_1,
sizeof(asn_DEF_Test_structure_3_tags_1)
/sizeof(asn_DEF_Test_structure_3_tags_1[0]), /* 1 */
asn_DEF_Test_structure_3_tags_1, /* Same as above */
sizeof(asn_DEF_Test_structure_3_tags_1)
/sizeof(asn_DEF_Test_structure_3_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_Test_structure_3_1,
1, /* Elements count */
&asn_SPC_Test_structure_3_1_specs /* Additional specs */
&asn_SPC_Test_structure_3_specs_1 /* Additional specs */
};

View File

@ -76,6 +76,8 @@ static asn_TYPE_member_t asn_MBR_e_6[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_NULL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "f"
},
{ ATF_NOFLAGS, 0, offsetof(struct e, choice.g),
@ -83,21 +85,24 @@ static asn_TYPE_member_t asn_MBR_e_6[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_NULL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "g"
},
};
static asn_TYPE_tag2member_t asn_MAP_e_6_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_e_tag2el_6[] = {
{ (ASN_TAG_CLASS_PRIVATE | (7 << 2)), 0, 0, 0 }, /* f at 20 */
{ (ASN_TAG_CLASS_PRIVATE | (8 << 2)), 1, 0, 0 } /* g at 21 */
};
static asn_CHOICE_specifics_t asn_SPC_e_6_specs = {
static asn_CHOICE_specifics_t asn_SPC_e_specs_6 = {
sizeof(struct e),
offsetof(struct e, _asn_ctx),
offsetof(struct e, present),
sizeof(((struct e *)0)->present),
asn_MAP_e_6_tag2el,
asn_MAP_e_tag2el_6,
2, /* Count of tags in the map */
0 /* Whether extensible */
.canonical_order = 0,
.ext_start = -1 /* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_e_6 = {
@ -110,14 +115,16 @@ asn_TYPE_descriptor_t asn_DEF_e_6 = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
0, /* No PER visible constraints */
asn_MBR_e_6,
2, /* Elements count */
&asn_SPC_e_6_specs /* Additional specs */
&asn_SPC_e_specs_6 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_h_9[] = {
@ -126,6 +133,8 @@ static asn_TYPE_member_t asn_MBR_h_9[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_NULL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "i"
},
{ ATF_NOFLAGS, 0, offsetof(struct h, choice.j),
@ -133,21 +142,24 @@ static asn_TYPE_member_t asn_MBR_h_9[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_NULL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "j"
},
};
static asn_TYPE_tag2member_t asn_MAP_h_9_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_h_tag2el_9[] = {
{ (ASN_TAG_CLASS_PRIVATE | (1 << 2)), 0, 0, 0 }, /* i at 24 */
{ (ASN_TAG_CLASS_PRIVATE | (2 << 2)), 1, 0, 0 } /* j at 25 */
};
static asn_CHOICE_specifics_t asn_SPC_h_9_specs = {
static asn_CHOICE_specifics_t asn_SPC_h_specs_9 = {
sizeof(struct h),
offsetof(struct h, _asn_ctx),
offsetof(struct h, present),
sizeof(((struct h *)0)->present),
asn_MAP_h_9_tag2el,
asn_MAP_h_tag2el_9,
2, /* Count of tags in the map */
0 /* Whether extensible */
.canonical_order = 0,
.ext_start = -1 /* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_h_9 = {
@ -160,14 +172,16 @@ asn_TYPE_descriptor_t asn_DEF_h_9 = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
0, /* No PER visible constraints */
asn_MBR_h_9,
2, /* Elements count */
&asn_SPC_h_9_specs /* Additional specs */
&asn_SPC_h_specs_9 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_b_3[] = {
@ -176,6 +190,8 @@ static asn_TYPE_member_t asn_MBR_b_3[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_NULL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "c"
},
{ ATF_NOFLAGS, 0, offsetof(struct b, choice.d),
@ -183,6 +199,8 @@ static asn_TYPE_member_t asn_MBR_b_3[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_NULL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "d"
},
{ ATF_NOFLAGS, 0, offsetof(struct b, choice.e),
@ -190,6 +208,8 @@ static asn_TYPE_member_t asn_MBR_b_3[] = {
.tag_mode = 0,
.type = &asn_DEF_e_6,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "e"
},
{ ATF_NOFLAGS, 0, offsetof(struct b, choice.h),
@ -197,24 +217,27 @@ static asn_TYPE_member_t asn_MBR_b_3[] = {
.tag_mode = +1, /* EXPLICIT tag at current level */
.type = &asn_DEF_h_9,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "h"
},
};
static asn_TYPE_tag2member_t asn_MAP_b_3_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_b_tag2el_3[] = {
{ (ASN_TAG_CLASS_PRIVATE | (5 << 2)), 0, 0, 0 }, /* c at 17 */
{ (ASN_TAG_CLASS_PRIVATE | (6 << 2)), 1, 0, 0 }, /* d at 18 */
{ (ASN_TAG_CLASS_PRIVATE | (7 << 2)), 2, 0, 0 }, /* f at 20 */
{ (ASN_TAG_CLASS_PRIVATE | (8 << 2)), 2, 0, 0 }, /* g at 21 */
{ (ASN_TAG_CLASS_PRIVATE | (9 << 2)), 3, 0, 0 } /* h at 24 */
};
static asn_CHOICE_specifics_t asn_SPC_b_3_specs = {
static asn_CHOICE_specifics_t asn_SPC_b_specs_3 = {
sizeof(struct b),
offsetof(struct b, _asn_ctx),
offsetof(struct b, present),
sizeof(((struct b *)0)->present),
asn_MAP_b_3_tag2el,
asn_MAP_b_tag2el_3,
5, /* Count of tags in the map */
0 /* Whether extensible */
.canonical_order = 0,
.ext_start = -1 /* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_b_3 = {
@ -227,14 +250,16 @@ asn_TYPE_descriptor_t asn_DEF_b_3 = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
0, /* No PER visible constraints */
asn_MBR_b_3,
4, /* Elements count */
&asn_SPC_b_3_specs /* Additional specs */
&asn_SPC_b_specs_3 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_T_1[] = {
@ -243,6 +268,8 @@ static asn_TYPE_member_t asn_MBR_T_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_NULL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "a"
},
{ ATF_NOFLAGS, 0, offsetof(struct T, b),
@ -250,14 +277,16 @@ static asn_TYPE_member_t asn_MBR_T_1[] = {
.tag_mode = 0,
.type = &asn_DEF_b_3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "b"
},
};
static ber_tlv_tag_t asn_DEF_T_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T_tags_1[] = {
(ASN_TAG_CLASS_PRIVATE | (1 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_T_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_T_tag2el_1[] = {
{ (ASN_TAG_CLASS_PRIVATE | (2 << 2)), 0, 0, 0 }, /* a at 15 */
{ (ASN_TAG_CLASS_PRIVATE | (5 << 2)), 1, 0, 0 }, /* c at 17 */
{ (ASN_TAG_CLASS_PRIVATE | (6 << 2)), 1, 0, 0 }, /* d at 18 */
@ -265,11 +294,12 @@ static asn_TYPE_tag2member_t asn_MAP_T_1_tag2el[] = {
{ (ASN_TAG_CLASS_PRIVATE | (8 << 2)), 1, 0, 0 }, /* g at 21 */
{ (ASN_TAG_CLASS_PRIVATE | (9 << 2)), 1, 0, 0 } /* h at 24 */
};
static asn_SEQUENCE_specifics_t asn_SPC_T_1_specs = {
static asn_SEQUENCE_specifics_t asn_SPC_T_specs_1 = {
sizeof(struct T),
offsetof(struct T, _asn_ctx),
asn_MAP_T_1_tag2el,
asn_MAP_T_tag2el_1,
6, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@ -283,15 +313,17 @@ asn_TYPE_descriptor_t asn_DEF_T = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T_1_tags,
sizeof(asn_DEF_T_1_tags)
/sizeof(asn_DEF_T_1_tags[0]) - 1, /* 1 */
asn_DEF_T_1_tags, /* Same as above */
sizeof(asn_DEF_T_1_tags)
/sizeof(asn_DEF_T_1_tags[0]), /* 2 */
asn_DEF_T_tags_1,
sizeof(asn_DEF_T_tags_1)
/sizeof(asn_DEF_T_tags_1[0]) - 1, /* 1 */
asn_DEF_T_tags_1, /* Same as above */
sizeof(asn_DEF_T_tags_1)
/sizeof(asn_DEF_T_tags_1[0]), /* 2 */
0, /* No PER visible constraints */
asn_MBR_T_1,
2, /* Elements count */
&asn_SPC_T_1_specs /* Additional specs */
&asn_SPC_T_specs_1 /* Additional specs */
};

View File

@ -40,6 +40,9 @@ PrimitiveType_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_OCTET_STRING.der_encoder;
td->xer_decoder = asn_DEF_OCTET_STRING.xer_decoder;
td->xer_encoder = asn_DEF_OCTET_STRING.xer_encoder;
td->uper_decoder = asn_DEF_OCTET_STRING.uper_decoder;
if(!td->per_constraints)
td->per_constraints = asn_DEF_OCTET_STRING.per_constraints;
td->elements = asn_DEF_OCTET_STRING.elements;
td->elements_count = asn_DEF_OCTET_STRING.elements_count;
td->specifics = asn_DEF_OCTET_STRING.specifics;
@ -92,7 +95,7 @@ PrimitiveType_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [PrimitiveType] >>> ***/
static ber_tlv_tag_t asn_DEF_PrimitiveType_1_tags[] = {
static ber_tlv_tag_t asn_DEF_PrimitiveType_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2))
};
asn_TYPE_descriptor_t asn_DEF_PrimitiveType = {
@ -105,13 +108,15 @@ asn_TYPE_descriptor_t asn_DEF_PrimitiveType = {
PrimitiveType_encode_der,
PrimitiveType_decode_xer,
PrimitiveType_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_PrimitiveType_1_tags,
sizeof(asn_DEF_PrimitiveType_1_tags)
/sizeof(asn_DEF_PrimitiveType_1_tags[0]), /* 1 */
asn_DEF_PrimitiveType_1_tags, /* Same as above */
sizeof(asn_DEF_PrimitiveType_1_tags)
/sizeof(asn_DEF_PrimitiveType_1_tags[0]), /* 1 */
asn_DEF_PrimitiveType_tags_1,
sizeof(asn_DEF_PrimitiveType_tags_1)
/sizeof(asn_DEF_PrimitiveType_tags_1[0]), /* 1 */
asn_DEF_PrimitiveType_tags_1, /* Same as above */
sizeof(asn_DEF_PrimitiveType_tags_1)
/sizeof(asn_DEF_PrimitiveType_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@ -143,20 +148,23 @@ static asn_TYPE_member_t asn_MBR_ConstructedType_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_PrimitiveType,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "field"
},
};
static ber_tlv_tag_t asn_DEF_ConstructedType_1_tags[] = {
static ber_tlv_tag_t asn_DEF_ConstructedType_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_ConstructedType_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_ConstructedType_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 0, 0, 0 } /* field at 18 */
};
static asn_SEQUENCE_specifics_t asn_SPC_ConstructedType_1_specs = {
static asn_SEQUENCE_specifics_t asn_SPC_ConstructedType_specs_1 = {
sizeof(struct ConstructedType),
offsetof(struct ConstructedType, _asn_ctx),
asn_MAP_ConstructedType_1_tag2el,
asn_MAP_ConstructedType_tag2el_1,
1, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@ -170,16 +178,18 @@ asn_TYPE_descriptor_t asn_DEF_ConstructedType = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_ConstructedType_1_tags,
sizeof(asn_DEF_ConstructedType_1_tags)
/sizeof(asn_DEF_ConstructedType_1_tags[0]), /* 1 */
asn_DEF_ConstructedType_1_tags, /* Same as above */
sizeof(asn_DEF_ConstructedType_1_tags)
/sizeof(asn_DEF_ConstructedType_1_tags[0]), /* 1 */
asn_DEF_ConstructedType_tags_1,
sizeof(asn_DEF_ConstructedType_tags_1)
/sizeof(asn_DEF_ConstructedType_tags_1[0]), /* 1 */
asn_DEF_ConstructedType_tags_1, /* Same as above */
sizeof(asn_DEF_ConstructedType_tags_1)
/sizeof(asn_DEF_ConstructedType_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_ConstructedType_1,
1, /* Elements count */
&asn_SPC_ConstructedType_1_specs /* Additional specs */
&asn_SPC_ConstructedType_specs_1 /* Additional specs */
};
@ -224,6 +234,9 @@ T_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_ConstructedType.der_encoder;
td->xer_decoder = asn_DEF_ConstructedType.xer_decoder;
td->xer_encoder = asn_DEF_ConstructedType.xer_encoder;
td->uper_decoder = asn_DEF_ConstructedType.uper_decoder;
if(!td->per_constraints)
td->per_constraints = asn_DEF_ConstructedType.per_constraints;
td->elements = asn_DEF_ConstructedType.elements;
td->elements_count = asn_DEF_ConstructedType.elements_count;
td->specifics = asn_DEF_ConstructedType.specifics;
@ -276,7 +289,7 @@ T_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T] >>> ***/
static ber_tlv_tag_t asn_DEF_T_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
@ -290,13 +303,15 @@ asn_TYPE_descriptor_t asn_DEF_T = {
T_encode_der,
T_decode_xer,
T_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T_1_tags,
sizeof(asn_DEF_T_1_tags)
/sizeof(asn_DEF_T_1_tags[0]) - 1, /* 1 */
asn_DEF_T_1_tags, /* Same as above */
sizeof(asn_DEF_T_1_tags)
/sizeof(asn_DEF_T_1_tags[0]), /* 2 */
asn_DEF_T_tags_1,
sizeof(asn_DEF_T_tags_1)
/sizeof(asn_DEF_T_tags_1[0]) - 1, /* 1 */
asn_DEF_T_tags_1, /* Same as above */
sizeof(asn_DEF_T_tags_1)
/sizeof(asn_DEF_T_tags_1[0]), /* 2 */
0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
0 /* No specifics */
};

View File

@ -43,28 +43,30 @@ static asn_TYPE_member_t asn_MBR_T1_1[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "i"
},
};
static ber_tlv_tag_t asn_DEF_T1_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T1_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_T1_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_T1_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* i at 14 */
};
static uint8_t asn_MAP_T1_1_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
static uint8_t asn_MAP_T1_mmap_1[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(1 << 7)
};
static asn_SET_specifics_t asn_SPC_T1_1_specs = {
static asn_SET_specifics_t asn_SPC_T1_specs_1 = {
sizeof(struct T1),
offsetof(struct T1, _asn_ctx),
offsetof(struct T1, _presence_map),
asn_MAP_T1_1_tag2el,
asn_MAP_T1_tag2el_1,
1, /* Count of tags in the map */
asn_MAP_T1_1_tag2el, /* Same as above */
asn_MAP_T1_tag2el_1, /* Same as above */
1, /* Count of tags in the CXER map */
1, /* Whether extensible */
(unsigned int *)asn_MAP_T1_1_mmap /* Mandatory elements map */
(unsigned int *)asn_MAP_T1_mmap_1 /* Mandatory elements map */
};
asn_TYPE_descriptor_t asn_DEF_T1 = {
"T1",
@ -76,16 +78,18 @@ asn_TYPE_descriptor_t asn_DEF_T1 = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T1_1_tags,
sizeof(asn_DEF_T1_1_tags)
/sizeof(asn_DEF_T1_1_tags[0]), /* 1 */
asn_DEF_T1_1_tags, /* Same as above */
sizeof(asn_DEF_T1_1_tags)
/sizeof(asn_DEF_T1_1_tags[0]), /* 1 */
asn_DEF_T1_tags_1,
sizeof(asn_DEF_T1_tags_1)
/sizeof(asn_DEF_T1_tags_1[0]), /* 1 */
asn_DEF_T1_tags_1, /* Same as above */
sizeof(asn_DEF_T1_tags_1)
/sizeof(asn_DEF_T1_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_T1_1,
1, /* Elements count */
&asn_SPC_T1_1_specs /* Additional specs */
&asn_SPC_T1_specs_1 /* Additional specs */
};
@ -133,28 +137,30 @@ static asn_TYPE_member_t asn_MBR_T2_1[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "i"
},
};
static ber_tlv_tag_t asn_DEF_T2_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T2_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_T2_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_T2_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* i at 15 */
};
static uint8_t asn_MAP_T2_1_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
static uint8_t asn_MAP_T2_mmap_1[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(1 << 7)
};
static asn_SET_specifics_t asn_SPC_T2_1_specs = {
static asn_SET_specifics_t asn_SPC_T2_specs_1 = {
sizeof(struct T2),
offsetof(struct T2, _asn_ctx),
offsetof(struct T2, _presence_map),
asn_MAP_T2_1_tag2el,
asn_MAP_T2_tag2el_1,
1, /* Count of tags in the map */
asn_MAP_T2_1_tag2el, /* Same as above */
asn_MAP_T2_tag2el_1, /* Same as above */
1, /* Count of tags in the CXER map */
1, /* Whether extensible */
(unsigned int *)asn_MAP_T2_1_mmap /* Mandatory elements map */
(unsigned int *)asn_MAP_T2_mmap_1 /* Mandatory elements map */
};
asn_TYPE_descriptor_t asn_DEF_T2 = {
"T2",
@ -166,16 +172,18 @@ asn_TYPE_descriptor_t asn_DEF_T2 = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T2_1_tags,
sizeof(asn_DEF_T2_1_tags)
/sizeof(asn_DEF_T2_1_tags[0]), /* 1 */
asn_DEF_T2_1_tags, /* Same as above */
sizeof(asn_DEF_T2_1_tags)
/sizeof(asn_DEF_T2_1_tags[0]), /* 1 */
asn_DEF_T2_tags_1,
sizeof(asn_DEF_T2_tags_1)
/sizeof(asn_DEF_T2_tags_1[0]), /* 1 */
asn_DEF_T2_tags_1, /* Same as above */
sizeof(asn_DEF_T2_tags_1)
/sizeof(asn_DEF_T2_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_T2_1,
1, /* Elements count */
&asn_SPC_T2_1_specs /* Additional specs */
&asn_SPC_T2_specs_1 /* Additional specs */
};
@ -220,20 +228,23 @@ static asn_TYPE_member_t asn_MBR_T3_1[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "i"
},
};
static asn_TYPE_tag2member_t asn_MAP_T3_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_T3_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* i at 16 */
};
static asn_CHOICE_specifics_t asn_SPC_T3_1_specs = {
static asn_CHOICE_specifics_t asn_SPC_T3_specs_1 = {
sizeof(struct T3),
offsetof(struct T3, _asn_ctx),
offsetof(struct T3, present),
sizeof(((struct T3 *)0)->present),
asn_MAP_T3_1_tag2el,
asn_MAP_T3_tag2el_1,
1, /* Count of tags in the map */
1 /* Whether extensible */
.canonical_order = 0,
.ext_start = 1 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_T3 = {
"T3",
@ -245,14 +256,16 @@ asn_TYPE_descriptor_t asn_DEF_T3 = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
0, /* No PER visible constraints */
asn_MBR_T3_1,
1, /* Elements count */
&asn_SPC_T3_1_specs /* Additional specs */
&asn_SPC_T3_specs_1 /* Additional specs */
};
@ -297,20 +310,23 @@ static asn_TYPE_member_t asn_MBR_T4_1[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "i"
},
};
static asn_TYPE_tag2member_t asn_MAP_T4_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_T4_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* i at 17 */
};
static asn_CHOICE_specifics_t asn_SPC_T4_1_specs = {
static asn_CHOICE_specifics_t asn_SPC_T4_specs_1 = {
sizeof(struct T4),
offsetof(struct T4, _asn_ctx),
offsetof(struct T4, present),
sizeof(((struct T4 *)0)->present),
asn_MAP_T4_1_tag2el,
asn_MAP_T4_tag2el_1,
1, /* Count of tags in the map */
1 /* Whether extensible */
.canonical_order = 0,
.ext_start = 1 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_T4 = {
"T4",
@ -322,13 +338,15 @@ asn_TYPE_descriptor_t asn_DEF_T4 = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
0, /* No PER visible constraints */
asn_MBR_T4_1,
1, /* Elements count */
&asn_SPC_T4_1_specs /* Additional specs */
&asn_SPC_T4_specs_1 /* Additional specs */
};

View File

@ -16,7 +16,7 @@ BEGIN
Int1 ::= INTEGER
Int2 ::= Int1 (0..MAX) -- X.680-0207::41.4.4
Int3 ::= Int2 (MIN..ten) -- Means (0..10)
Int4 ::= Int3 (5..MAX,...,1..4) -- Means (5..10,...,1..4)
Int4 ::= Int3 (5..MAX,...,1..4) -- Means (1..10,...)
Int5 ::= Int4 (MIN..5) -- Means (5)
-- Int6 ::= INTEGER (Int5) -- -- Not yet supported
@ -52,6 +52,23 @@ BEGIN
VisibleIdentifier ::= Identifier
Sequence ::= SEQUENCE {
int1-c Int1 (-2..MAX) DEFAULT 3,
int4 [2] Int4,
int4-c Int4 (MIN..7),
bool BOOLEAN DEFAULT 1,
enum-c ENUMERATED { one(1), two(2), ..., three(3) },
...,
int5-c Int5 (5) OPTIONAL,
...,
null NULL OPTIONAL
}
SequenceOf ::= SEQUENCE (SIZE(1..2)) OF Sequence
Enum0 ::= ENUMERATED { one, two }
Enum1 ::= ENUMERATED { one, two } (one)
END

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -52,6 +52,8 @@ static asn_TYPE_member_t asn_MBR_Choice_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "a"
},
{ ATF_NOFLAGS, 0, offsetof(struct Choice, choice.b),
@ -59,6 +61,8 @@ static asn_TYPE_member_t asn_MBR_Choice_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "b"
},
{ ATF_POINTER, 0, offsetof(struct Choice, choice.c),
@ -66,25 +70,28 @@ static asn_TYPE_member_t asn_MBR_Choice_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Choice,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "c"
},
};
static ber_tlv_tag_t asn_DEF_Choice_1_tags[] = {
static ber_tlv_tag_t asn_DEF_Choice_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (123 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_Choice_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* a at 15 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* b at 17 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* c at 19 */
};
static asn_CHOICE_specifics_t asn_SPC_Choice_1_specs = {
static asn_CHOICE_specifics_t asn_SPC_Choice_specs_1 = {
sizeof(struct Choice),
offsetof(struct Choice, _asn_ctx),
offsetof(struct Choice, present),
sizeof(((struct Choice *)0)->present),
asn_MAP_Choice_1_tag2el,
asn_MAP_Choice_tag2el_1,
3, /* Count of tags in the map */
1 /* Whether extensible */
.canonical_order = 0,
.ext_start = 1 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_Choice = {
"Choice",
@ -96,15 +103,17 @@ asn_TYPE_descriptor_t asn_DEF_Choice = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
asn_DEF_Choice_1_tags,
sizeof(asn_DEF_Choice_1_tags)
/sizeof(asn_DEF_Choice_1_tags[0]), /* 1 */
asn_DEF_Choice_1_tags, /* Same as above */
sizeof(asn_DEF_Choice_1_tags)
/sizeof(asn_DEF_Choice_1_tags[0]), /* 1 */
asn_DEF_Choice_tags_1,
sizeof(asn_DEF_Choice_tags_1)
/sizeof(asn_DEF_Choice_tags_1[0]), /* 1 */
asn_DEF_Choice_tags_1, /* Same as above */
sizeof(asn_DEF_Choice_tags_1)
/sizeof(asn_DEF_Choice_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_Choice_1,
3, /* Elements count */
&asn_SPC_Choice_1_specs /* Additional specs */
&asn_SPC_Choice_specs_1 /* Additional specs */
};

View File

@ -27,6 +27,8 @@ static asn_TYPE_member_t asn_MBR_T1_1[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "i"
},
{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct T1, any),
@ -34,20 +36,23 @@ static asn_TYPE_member_t asn_MBR_T1_1[] = {
.tag_mode = 0,
.type = &asn_DEF_ANY,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "any"
},
};
static ber_tlv_tag_t asn_DEF_T1_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T1_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_T1_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_T1_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* i at 15 */
};
static asn_SEQUENCE_specifics_t asn_SPC_T1_1_specs = {
static asn_SEQUENCE_specifics_t asn_SPC_T1_specs_1 = {
sizeof(struct T1),
offsetof(struct T1, _asn_ctx),
asn_MAP_T1_1_tag2el,
asn_MAP_T1_tag2el_1,
1, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@ -61,16 +66,18 @@ asn_TYPE_descriptor_t asn_DEF_T1 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T1_1_tags,
sizeof(asn_DEF_T1_1_tags)
/sizeof(asn_DEF_T1_1_tags[0]), /* 1 */
asn_DEF_T1_1_tags, /* Same as above */
sizeof(asn_DEF_T1_1_tags)
/sizeof(asn_DEF_T1_1_tags[0]), /* 1 */
asn_DEF_T1_tags_1,
sizeof(asn_DEF_T1_tags_1)
/sizeof(asn_DEF_T1_tags_1[0]), /* 1 */
asn_DEF_T1_tags_1, /* Same as above */
sizeof(asn_DEF_T1_tags_1)
/sizeof(asn_DEF_T1_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_T1_1,
2, /* Elements count */
&asn_SPC_T1_1_specs /* Additional specs */
&asn_SPC_T1_specs_1 /* Additional specs */
};
@ -102,6 +109,8 @@ static asn_TYPE_member_t asn_MBR_T2_1[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "i"
},
{ ATF_POINTER, 1, offsetof(struct T2, any),
@ -109,21 +118,24 @@ static asn_TYPE_member_t asn_MBR_T2_1[] = {
.tag_mode = +1, /* EXPLICIT tag at current level */
.type = &asn_DEF_ANY,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "any"
},
};
static ber_tlv_tag_t asn_DEF_T2_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T2_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_T2_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_T2_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 20 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 } /* any at 21 */
};
static asn_SEQUENCE_specifics_t asn_SPC_T2_1_specs = {
static asn_SEQUENCE_specifics_t asn_SPC_T2_specs_1 = {
sizeof(struct T2),
offsetof(struct T2, _asn_ctx),
asn_MAP_T2_1_tag2el,
asn_MAP_T2_tag2el_1,
2, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@ -137,16 +149,18 @@ asn_TYPE_descriptor_t asn_DEF_T2 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T2_1_tags,
sizeof(asn_DEF_T2_1_tags)
/sizeof(asn_DEF_T2_1_tags[0]), /* 1 */
asn_DEF_T2_1_tags, /* Same as above */
sizeof(asn_DEF_T2_1_tags)
/sizeof(asn_DEF_T2_1_tags[0]), /* 1 */
asn_DEF_T2_tags_1,
sizeof(asn_DEF_T2_tags_1)
/sizeof(asn_DEF_T2_tags_1[0]), /* 1 */
asn_DEF_T2_tags_1, /* Same as above */
sizeof(asn_DEF_T2_tags_1)
/sizeof(asn_DEF_T2_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_T2_1,
2, /* Elements count */
&asn_SPC_T2_1_specs /* Additional specs */
&asn_SPC_T2_specs_1 /* Additional specs */
};
@ -177,6 +191,8 @@ static asn_TYPE_member_t asn_MBR_T3_1[] = {
.tag_mode = 0,
.type = &asn_DEF_ANY,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "any1"
},
{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct T3, any2),
@ -184,17 +200,20 @@ static asn_TYPE_member_t asn_MBR_T3_1[] = {
.tag_mode = 0,
.type = &asn_DEF_ANY,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "any2"
},
};
static ber_tlv_tag_t asn_DEF_T3_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T3_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_SEQUENCE_specifics_t asn_SPC_T3_1_specs = {
static asn_SEQUENCE_specifics_t asn_SPC_T3_specs_1 = {
sizeof(struct T3),
offsetof(struct T3, _asn_ctx),
0, /* No top level tags */
0, /* No tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@ -208,15 +227,17 @@ asn_TYPE_descriptor_t asn_DEF_T3 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T3_1_tags,
sizeof(asn_DEF_T3_1_tags)
/sizeof(asn_DEF_T3_1_tags[0]), /* 1 */
asn_DEF_T3_1_tags, /* Same as above */
sizeof(asn_DEF_T3_1_tags)
/sizeof(asn_DEF_T3_1_tags[0]), /* 1 */
asn_DEF_T3_tags_1,
sizeof(asn_DEF_T3_tags_1)
/sizeof(asn_DEF_T3_tags_1[0]), /* 1 */
asn_DEF_T3_tags_1, /* Same as above */
sizeof(asn_DEF_T3_tags_1)
/sizeof(asn_DEF_T3_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_T3_1,
2, /* Elements count */
&asn_SPC_T3_1_specs /* Additional specs */
&asn_SPC_T3_specs_1 /* Additional specs */
};

View File

@ -40,6 +40,9 @@ T1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_T2.der_encoder;
td->xer_decoder = asn_DEF_T2.xer_decoder;
td->xer_encoder = asn_DEF_T2.xer_encoder;
td->uper_decoder = asn_DEF_T2.uper_decoder;
if(!td->per_constraints)
td->per_constraints = asn_DEF_T2.per_constraints;
td->elements = asn_DEF_T2.elements;
td->elements_count = asn_DEF_T2.elements_count;
td->specifics = asn_DEF_T2.specifics;
@ -92,13 +95,13 @@ T1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T1] >>> ***/
static ber_tlv_tag_t asn_DEF_T1_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T1_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2))
};
static ber_tlv_tag_t asn_DEF_T1_1_all_tags[] = {
static ber_tlv_tag_t asn_DEF_T1_all_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
@ -116,13 +119,15 @@ asn_TYPE_descriptor_t asn_DEF_T1 = {
T1_encode_der,
T1_decode_xer,
T1_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T1_1_tags,
sizeof(asn_DEF_T1_1_tags)
/sizeof(asn_DEF_T1_1_tags[0]), /* 4 */
asn_DEF_T1_1_all_tags,
sizeof(asn_DEF_T1_1_all_tags)
/sizeof(asn_DEF_T1_1_all_tags[0]), /* 6 */
asn_DEF_T1_tags_1,
sizeof(asn_DEF_T1_tags_1)
/sizeof(asn_DEF_T1_tags_1[0]), /* 4 */
asn_DEF_T1_all_tags_1,
sizeof(asn_DEF_T1_all_tags_1)
/sizeof(asn_DEF_T1_all_tags_1[0]), /* 6 */
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@ -169,6 +174,9 @@ T2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_T3.der_encoder;
td->xer_decoder = asn_DEF_T3.xer_decoder;
td->xer_encoder = asn_DEF_T3.xer_encoder;
td->uper_decoder = asn_DEF_T3.uper_decoder;
if(!td->per_constraints)
td->per_constraints = asn_DEF_T3.per_constraints;
td->elements = asn_DEF_T3.elements;
td->elements_count = asn_DEF_T3.elements_count;
td->specifics = asn_DEF_T3.specifics;
@ -221,12 +229,12 @@ T2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T2] >>> ***/
static ber_tlv_tag_t asn_DEF_T2_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T2_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2))
};
static ber_tlv_tag_t asn_DEF_T2_1_all_tags[] = {
static ber_tlv_tag_t asn_DEF_T2_all_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
@ -243,13 +251,15 @@ asn_TYPE_descriptor_t asn_DEF_T2 = {
T2_encode_der,
T2_decode_xer,
T2_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T2_1_tags,
sizeof(asn_DEF_T2_1_tags)
/sizeof(asn_DEF_T2_1_tags[0]), /* 3 */
asn_DEF_T2_1_all_tags,
sizeof(asn_DEF_T2_1_all_tags)
/sizeof(asn_DEF_T2_1_all_tags[0]), /* 5 */
asn_DEF_T2_tags_1,
sizeof(asn_DEF_T2_tags_1)
/sizeof(asn_DEF_T2_tags_1[0]), /* 3 */
asn_DEF_T2_all_tags_1,
sizeof(asn_DEF_T2_all_tags_1)
/sizeof(asn_DEF_T2_all_tags_1[0]), /* 5 */
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@ -296,6 +306,9 @@ T3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_T4.der_encoder;
td->xer_decoder = asn_DEF_T4.xer_decoder;
td->xer_encoder = asn_DEF_T4.xer_encoder;
td->uper_decoder = asn_DEF_T4.uper_decoder;
if(!td->per_constraints)
td->per_constraints = asn_DEF_T4.per_constraints;
td->elements = asn_DEF_T4.elements;
td->elements_count = asn_DEF_T4.elements_count;
td->specifics = asn_DEF_T4.specifics;
@ -348,11 +361,11 @@ T3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T3] >>> ***/
static ber_tlv_tag_t asn_DEF_T3_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T3_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2))
};
static ber_tlv_tag_t asn_DEF_T3_1_all_tags[] = {
static ber_tlv_tag_t asn_DEF_T3_all_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
@ -368,13 +381,15 @@ asn_TYPE_descriptor_t asn_DEF_T3 = {
T3_encode_der,
T3_decode_xer,
T3_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T3_1_tags,
sizeof(asn_DEF_T3_1_tags)
/sizeof(asn_DEF_T3_1_tags[0]), /* 2 */
asn_DEF_T3_1_all_tags,
sizeof(asn_DEF_T3_1_all_tags)
/sizeof(asn_DEF_T3_1_all_tags[0]), /* 4 */
asn_DEF_T3_tags_1,
sizeof(asn_DEF_T3_tags_1)
/sizeof(asn_DEF_T3_tags_1[0]), /* 2 */
asn_DEF_T3_all_tags_1,
sizeof(asn_DEF_T3_all_tags_1)
/sizeof(asn_DEF_T3_all_tags_1[0]), /* 4 */
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@ -421,6 +436,9 @@ T4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_T5.der_encoder;
td->xer_decoder = asn_DEF_T5.xer_decoder;
td->xer_encoder = asn_DEF_T5.xer_encoder;
td->uper_decoder = asn_DEF_T5.uper_decoder;
if(!td->per_constraints)
td->per_constraints = asn_DEF_T5.per_constraints;
td->elements = asn_DEF_T5.elements;
td->elements_count = asn_DEF_T5.elements_count;
td->specifics = asn_DEF_T5.specifics;
@ -473,7 +491,7 @@ T4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T4] >>> ***/
static ber_tlv_tag_t asn_DEF_T4_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T4_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
@ -488,13 +506,15 @@ asn_TYPE_descriptor_t asn_DEF_T4 = {
T4_encode_der,
T4_decode_xer,
T4_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T4_1_tags,
sizeof(asn_DEF_T4_1_tags)
/sizeof(asn_DEF_T4_1_tags[0]) - 1, /* 2 */
asn_DEF_T4_1_tags, /* Same as above */
sizeof(asn_DEF_T4_1_tags)
/sizeof(asn_DEF_T4_1_tags[0]), /* 3 */
asn_DEF_T4_tags_1,
sizeof(asn_DEF_T4_tags_1)
/sizeof(asn_DEF_T4_tags_1[0]) - 1, /* 2 */
asn_DEF_T4_tags_1, /* Same as above */
sizeof(asn_DEF_T4_tags_1)
/sizeof(asn_DEF_T4_tags_1[0]), /* 3 */
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@ -541,6 +561,9 @@ T5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_T6.der_encoder;
td->xer_decoder = asn_DEF_T6.xer_decoder;
td->xer_encoder = asn_DEF_T6.xer_encoder;
td->uper_decoder = asn_DEF_T6.uper_decoder;
if(!td->per_constraints)
td->per_constraints = asn_DEF_T6.per_constraints;
td->elements = asn_DEF_T6.elements;
td->elements_count = asn_DEF_T6.elements_count;
td->specifics = asn_DEF_T6.specifics;
@ -593,7 +616,7 @@ T5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T5] >>> ***/
static ber_tlv_tag_t asn_DEF_T5_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T5_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
};
@ -607,13 +630,15 @@ asn_TYPE_descriptor_t asn_DEF_T5 = {
T5_encode_der,
T5_decode_xer,
T5_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T5_1_tags,
sizeof(asn_DEF_T5_1_tags)
/sizeof(asn_DEF_T5_1_tags[0]) - 1, /* 1 */
asn_DEF_T5_1_tags, /* Same as above */
sizeof(asn_DEF_T5_1_tags)
/sizeof(asn_DEF_T5_1_tags[0]), /* 2 */
asn_DEF_T5_tags_1,
sizeof(asn_DEF_T5_tags_1)
/sizeof(asn_DEF_T5_tags_1[0]) - 1, /* 1 */
asn_DEF_T5_tags_1, /* Same as above */
sizeof(asn_DEF_T5_tags_1)
/sizeof(asn_DEF_T5_tags_1[0]), /* 2 */
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@ -660,6 +685,9 @@ T6_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_REAL.der_encoder;
td->xer_decoder = asn_DEF_REAL.xer_decoder;
td->xer_encoder = asn_DEF_REAL.xer_encoder;
td->uper_decoder = asn_DEF_REAL.uper_decoder;
if(!td->per_constraints)
td->per_constraints = asn_DEF_REAL.per_constraints;
td->elements = asn_DEF_REAL.elements;
td->elements_count = asn_DEF_REAL.elements_count;
td->specifics = asn_DEF_REAL.specifics;
@ -712,7 +740,7 @@ T6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T6] >>> ***/
static ber_tlv_tag_t asn_DEF_T6_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T6_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
};
asn_TYPE_descriptor_t asn_DEF_T6 = {
@ -725,13 +753,15 @@ asn_TYPE_descriptor_t asn_DEF_T6 = {
T6_encode_der,
T6_decode_xer,
T6_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T6_1_tags,
sizeof(asn_DEF_T6_1_tags)
/sizeof(asn_DEF_T6_1_tags[0]), /* 1 */
asn_DEF_T6_1_tags, /* Same as above */
sizeof(asn_DEF_T6_1_tags)
/sizeof(asn_DEF_T6_1_tags[0]), /* 1 */
asn_DEF_T6_tags_1,
sizeof(asn_DEF_T6_tags_1)
/sizeof(asn_DEF_T6_tags_1[0]), /* 1 */
asn_DEF_T6_tags_1, /* Same as above */
sizeof(asn_DEF_T6_tags_1)
/sizeof(asn_DEF_T6_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@ -778,6 +808,9 @@ T_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_Ts.der_encoder;
td->xer_decoder = asn_DEF_Ts.xer_decoder;
td->xer_encoder = asn_DEF_Ts.xer_encoder;
td->uper_decoder = asn_DEF_Ts.uper_decoder;
if(!td->per_constraints)
td->per_constraints = asn_DEF_Ts.per_constraints;
td->elements = asn_DEF_Ts.elements;
td->elements_count = asn_DEF_Ts.elements_count;
td->specifics = asn_DEF_Ts.specifics;
@ -830,7 +863,7 @@ T_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T] >>> ***/
static ber_tlv_tag_t asn_DEF_T_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
(ASN_TAG_CLASS_CONTEXT | (123 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
@ -845,13 +878,15 @@ asn_TYPE_descriptor_t asn_DEF_T = {
T_encode_der,
T_decode_xer,
T_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T_1_tags,
sizeof(asn_DEF_T_1_tags)
/sizeof(asn_DEF_T_1_tags[0]) - 2, /* 1 */
asn_DEF_T_1_tags, /* Same as above */
sizeof(asn_DEF_T_1_tags)
/sizeof(asn_DEF_T_1_tags[0]), /* 3 */
asn_DEF_T_tags_1,
sizeof(asn_DEF_T_tags_1)
/sizeof(asn_DEF_T_tags_1[0]) - 2, /* 1 */
asn_DEF_T_tags_1, /* Same as above */
sizeof(asn_DEF_T_tags_1)
/sizeof(asn_DEF_T_tags_1[0]), /* 3 */
0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
0 /* No specifics */
};
@ -886,6 +921,8 @@ static asn_TYPE_member_t asn_MBR_Ts_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_T2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "m1"
},
{ ATF_POINTER, 1, offsetof(struct Ts, m2),
@ -893,6 +930,8 @@ static asn_TYPE_member_t asn_MBR_Ts_1[] = {
.tag_mode = +1, /* EXPLICIT tag at current level */
.type = &asn_DEF_T3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "m2"
},
{ ATF_NOFLAGS, 0, offsetof(struct Ts, m3),
@ -900,23 +939,26 @@ static asn_TYPE_member_t asn_MBR_Ts_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_T3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "m3"
},
};
static ber_tlv_tag_t asn_DEF_Ts_1_tags[] = {
static ber_tlv_tag_t asn_DEF_Ts_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (123 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_Ts_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_Ts_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* m1 at 24 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* m2 at 25 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 } /* m3 at 27 */
};
static asn_SEQUENCE_specifics_t asn_SPC_Ts_1_specs = {
static asn_SEQUENCE_specifics_t asn_SPC_Ts_specs_1 = {
sizeof(struct Ts),
offsetof(struct Ts, _asn_ctx),
asn_MAP_Ts_1_tag2el,
asn_MAP_Ts_tag2el_1,
3, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@ -930,15 +972,17 @@ asn_TYPE_descriptor_t asn_DEF_Ts = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_Ts_1_tags,
sizeof(asn_DEF_Ts_1_tags)
/sizeof(asn_DEF_Ts_1_tags[0]) - 1, /* 1 */
asn_DEF_Ts_1_tags, /* Same as above */
sizeof(asn_DEF_Ts_1_tags)
/sizeof(asn_DEF_Ts_1_tags[0]), /* 2 */
asn_DEF_Ts_tags_1,
sizeof(asn_DEF_Ts_tags_1)
/sizeof(asn_DEF_Ts_tags_1[0]) - 1, /* 1 */
asn_DEF_Ts_tags_1, /* Same as above */
sizeof(asn_DEF_Ts_tags_1)
/sizeof(asn_DEF_Ts_tags_1[0]), /* 2 */
0, /* No PER visible constraints */
asn_MBR_Ts_1,
3, /* Elements count */
&asn_SPC_Ts_1_specs /* Additional specs */
&asn_SPC_Ts_specs_1 /* Additional specs */
};

View File

@ -40,6 +40,9 @@ T1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_T2.der_encoder;
td->xer_decoder = asn_DEF_T2.xer_decoder;
td->xer_encoder = asn_DEF_T2.xer_encoder;
td->uper_decoder = asn_DEF_T2.uper_decoder;
if(!td->per_constraints)
td->per_constraints = asn_DEF_T2.per_constraints;
td->elements = asn_DEF_T2.elements;
td->elements_count = asn_DEF_T2.elements_count;
td->specifics = asn_DEF_T2.specifics;
@ -92,13 +95,13 @@ T1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T1] >>> ***/
static ber_tlv_tag_t asn_DEF_T1_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T1_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2))
};
static ber_tlv_tag_t asn_DEF_T1_1_all_tags[] = {
static ber_tlv_tag_t asn_DEF_T1_all_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
@ -116,13 +119,15 @@ asn_TYPE_descriptor_t asn_DEF_T1 = {
T1_encode_der,
T1_decode_xer,
T1_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T1_1_tags,
sizeof(asn_DEF_T1_1_tags)
/sizeof(asn_DEF_T1_1_tags[0]), /* 4 */
asn_DEF_T1_1_all_tags,
sizeof(asn_DEF_T1_1_all_tags)
/sizeof(asn_DEF_T1_1_all_tags[0]), /* 6 */
asn_DEF_T1_tags_1,
sizeof(asn_DEF_T1_tags_1)
/sizeof(asn_DEF_T1_tags_1[0]), /* 4 */
asn_DEF_T1_all_tags_1,
sizeof(asn_DEF_T1_all_tags_1)
/sizeof(asn_DEF_T1_all_tags_1[0]), /* 6 */
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@ -169,6 +174,9 @@ T2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_T3.der_encoder;
td->xer_decoder = asn_DEF_T3.xer_decoder;
td->xer_encoder = asn_DEF_T3.xer_encoder;
td->uper_decoder = asn_DEF_T3.uper_decoder;
if(!td->per_constraints)
td->per_constraints = asn_DEF_T3.per_constraints;
td->elements = asn_DEF_T3.elements;
td->elements_count = asn_DEF_T3.elements_count;
td->specifics = asn_DEF_T3.specifics;
@ -221,12 +229,12 @@ T2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T2] >>> ***/
static ber_tlv_tag_t asn_DEF_T2_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T2_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2))
};
static ber_tlv_tag_t asn_DEF_T2_1_all_tags[] = {
static ber_tlv_tag_t asn_DEF_T2_all_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
@ -243,13 +251,15 @@ asn_TYPE_descriptor_t asn_DEF_T2 = {
T2_encode_der,
T2_decode_xer,
T2_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T2_1_tags,
sizeof(asn_DEF_T2_1_tags)
/sizeof(asn_DEF_T2_1_tags[0]), /* 3 */
asn_DEF_T2_1_all_tags,
sizeof(asn_DEF_T2_1_all_tags)
/sizeof(asn_DEF_T2_1_all_tags[0]), /* 5 */
asn_DEF_T2_tags_1,
sizeof(asn_DEF_T2_tags_1)
/sizeof(asn_DEF_T2_tags_1[0]), /* 3 */
asn_DEF_T2_all_tags_1,
sizeof(asn_DEF_T2_all_tags_1)
/sizeof(asn_DEF_T2_all_tags_1[0]), /* 5 */
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@ -296,6 +306,9 @@ T3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_T4.der_encoder;
td->xer_decoder = asn_DEF_T4.xer_decoder;
td->xer_encoder = asn_DEF_T4.xer_encoder;
td->uper_decoder = asn_DEF_T4.uper_decoder;
if(!td->per_constraints)
td->per_constraints = asn_DEF_T4.per_constraints;
td->elements = asn_DEF_T4.elements;
td->elements_count = asn_DEF_T4.elements_count;
td->specifics = asn_DEF_T4.specifics;
@ -348,11 +361,11 @@ T3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T3] >>> ***/
static ber_tlv_tag_t asn_DEF_T3_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T3_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2))
};
static ber_tlv_tag_t asn_DEF_T3_1_all_tags[] = {
static ber_tlv_tag_t asn_DEF_T3_all_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
@ -368,13 +381,15 @@ asn_TYPE_descriptor_t asn_DEF_T3 = {
T3_encode_der,
T3_decode_xer,
T3_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T3_1_tags,
sizeof(asn_DEF_T3_1_tags)
/sizeof(asn_DEF_T3_1_tags[0]), /* 2 */
asn_DEF_T3_1_all_tags,
sizeof(asn_DEF_T3_1_all_tags)
/sizeof(asn_DEF_T3_1_all_tags[0]), /* 4 */
asn_DEF_T3_tags_1,
sizeof(asn_DEF_T3_tags_1)
/sizeof(asn_DEF_T3_tags_1[0]), /* 2 */
asn_DEF_T3_all_tags_1,
sizeof(asn_DEF_T3_all_tags_1)
/sizeof(asn_DEF_T3_all_tags_1[0]), /* 4 */
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@ -421,6 +436,9 @@ T4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_T5.der_encoder;
td->xer_decoder = asn_DEF_T5.xer_decoder;
td->xer_encoder = asn_DEF_T5.xer_encoder;
td->uper_decoder = asn_DEF_T5.uper_decoder;
if(!td->per_constraints)
td->per_constraints = asn_DEF_T5.per_constraints;
td->elements = asn_DEF_T5.elements;
td->elements_count = asn_DEF_T5.elements_count;
td->specifics = asn_DEF_T5.specifics;
@ -473,7 +491,7 @@ T4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T4] >>> ***/
static ber_tlv_tag_t asn_DEF_T4_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T4_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
@ -488,13 +506,15 @@ asn_TYPE_descriptor_t asn_DEF_T4 = {
T4_encode_der,
T4_decode_xer,
T4_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T4_1_tags,
sizeof(asn_DEF_T4_1_tags)
/sizeof(asn_DEF_T4_1_tags[0]) - 1, /* 2 */
asn_DEF_T4_1_tags, /* Same as above */
sizeof(asn_DEF_T4_1_tags)
/sizeof(asn_DEF_T4_1_tags[0]), /* 3 */
asn_DEF_T4_tags_1,
sizeof(asn_DEF_T4_tags_1)
/sizeof(asn_DEF_T4_tags_1[0]) - 1, /* 2 */
asn_DEF_T4_tags_1, /* Same as above */
sizeof(asn_DEF_T4_tags_1)
/sizeof(asn_DEF_T4_tags_1[0]), /* 3 */
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@ -541,6 +561,9 @@ T5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_T6.der_encoder;
td->xer_decoder = asn_DEF_T6.xer_decoder;
td->xer_encoder = asn_DEF_T6.xer_encoder;
td->uper_decoder = asn_DEF_T6.uper_decoder;
if(!td->per_constraints)
td->per_constraints = asn_DEF_T6.per_constraints;
td->elements = asn_DEF_T6.elements;
td->elements_count = asn_DEF_T6.elements_count;
td->specifics = asn_DEF_T6.specifics;
@ -593,7 +616,7 @@ T5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T5] >>> ***/
static ber_tlv_tag_t asn_DEF_T5_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T5_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
};
@ -607,13 +630,15 @@ asn_TYPE_descriptor_t asn_DEF_T5 = {
T5_encode_der,
T5_decode_xer,
T5_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T5_1_tags,
sizeof(asn_DEF_T5_1_tags)
/sizeof(asn_DEF_T5_1_tags[0]) - 1, /* 1 */
asn_DEF_T5_1_tags, /* Same as above */
sizeof(asn_DEF_T5_1_tags)
/sizeof(asn_DEF_T5_1_tags[0]), /* 2 */
asn_DEF_T5_tags_1,
sizeof(asn_DEF_T5_tags_1)
/sizeof(asn_DEF_T5_tags_1[0]) - 1, /* 1 */
asn_DEF_T5_tags_1, /* Same as above */
sizeof(asn_DEF_T5_tags_1)
/sizeof(asn_DEF_T5_tags_1[0]), /* 2 */
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@ -660,6 +685,9 @@ T6_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_NativeReal.der_encoder;
td->xer_decoder = asn_DEF_NativeReal.xer_decoder;
td->xer_encoder = asn_DEF_NativeReal.xer_encoder;
td->uper_decoder = asn_DEF_NativeReal.uper_decoder;
if(!td->per_constraints)
td->per_constraints = asn_DEF_NativeReal.per_constraints;
td->elements = asn_DEF_NativeReal.elements;
td->elements_count = asn_DEF_NativeReal.elements_count;
td->specifics = asn_DEF_NativeReal.specifics;
@ -712,7 +740,7 @@ T6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T6] >>> ***/
static ber_tlv_tag_t asn_DEF_T6_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T6_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
};
asn_TYPE_descriptor_t asn_DEF_T6 = {
@ -725,13 +753,15 @@ asn_TYPE_descriptor_t asn_DEF_T6 = {
T6_encode_der,
T6_decode_xer,
T6_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T6_1_tags,
sizeof(asn_DEF_T6_1_tags)
/sizeof(asn_DEF_T6_1_tags[0]), /* 1 */
asn_DEF_T6_1_tags, /* Same as above */
sizeof(asn_DEF_T6_1_tags)
/sizeof(asn_DEF_T6_1_tags[0]), /* 1 */
asn_DEF_T6_tags_1,
sizeof(asn_DEF_T6_tags_1)
/sizeof(asn_DEF_T6_tags_1[0]), /* 1 */
asn_DEF_T6_tags_1, /* Same as above */
sizeof(asn_DEF_T6_tags_1)
/sizeof(asn_DEF_T6_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@ -778,6 +808,9 @@ T_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_Ts.der_encoder;
td->xer_decoder = asn_DEF_Ts.xer_decoder;
td->xer_encoder = asn_DEF_Ts.xer_encoder;
td->uper_decoder = asn_DEF_Ts.uper_decoder;
if(!td->per_constraints)
td->per_constraints = asn_DEF_Ts.per_constraints;
td->elements = asn_DEF_Ts.elements;
td->elements_count = asn_DEF_Ts.elements_count;
td->specifics = asn_DEF_Ts.specifics;
@ -830,7 +863,7 @@ T_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T] >>> ***/
static ber_tlv_tag_t asn_DEF_T_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
(ASN_TAG_CLASS_CONTEXT | (123 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
@ -845,13 +878,15 @@ asn_TYPE_descriptor_t asn_DEF_T = {
T_encode_der,
T_decode_xer,
T_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T_1_tags,
sizeof(asn_DEF_T_1_tags)
/sizeof(asn_DEF_T_1_tags[0]) - 2, /* 1 */
asn_DEF_T_1_tags, /* Same as above */
sizeof(asn_DEF_T_1_tags)
/sizeof(asn_DEF_T_1_tags[0]), /* 3 */
asn_DEF_T_tags_1,
sizeof(asn_DEF_T_tags_1)
/sizeof(asn_DEF_T_tags_1[0]) - 2, /* 1 */
asn_DEF_T_tags_1, /* Same as above */
sizeof(asn_DEF_T_tags_1)
/sizeof(asn_DEF_T_tags_1[0]), /* 3 */
0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
0 /* No specifics */
};
@ -886,6 +921,8 @@ static asn_TYPE_member_t asn_MBR_Ts_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_T2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "m1"
},
{ ATF_POINTER, 1, offsetof(struct Ts, m2),
@ -893,6 +930,8 @@ static asn_TYPE_member_t asn_MBR_Ts_1[] = {
.tag_mode = +1, /* EXPLICIT tag at current level */
.type = &asn_DEF_T3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "m2"
},
{ ATF_NOFLAGS, 0, offsetof(struct Ts, m3),
@ -900,23 +939,26 @@ static asn_TYPE_member_t asn_MBR_Ts_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_T3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "m3"
},
};
static ber_tlv_tag_t asn_DEF_Ts_1_tags[] = {
static ber_tlv_tag_t asn_DEF_Ts_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (123 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_Ts_1_tag2el[] = {
static asn_TYPE_tag2member_t asn_MAP_Ts_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* m1 at 24 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* m2 at 25 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 } /* m3 at 27 */
};
static asn_SEQUENCE_specifics_t asn_SPC_Ts_1_specs = {
static asn_SEQUENCE_specifics_t asn_SPC_Ts_specs_1 = {
sizeof(struct Ts),
offsetof(struct Ts, _asn_ctx),
asn_MAP_Ts_1_tag2el,
asn_MAP_Ts_tag2el_1,
3, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@ -930,15 +972,17 @@ asn_TYPE_descriptor_t asn_DEF_Ts = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_Ts_1_tags,
sizeof(asn_DEF_Ts_1_tags)
/sizeof(asn_DEF_Ts_1_tags[0]) - 1, /* 1 */
asn_DEF_Ts_1_tags, /* Same as above */
sizeof(asn_DEF_Ts_1_tags)
/sizeof(asn_DEF_Ts_1_tags[0]), /* 2 */
asn_DEF_Ts_tags_1,
sizeof(asn_DEF_Ts_tags_1)
/sizeof(asn_DEF_Ts_tags_1[0]) - 1, /* 1 */
asn_DEF_Ts_tags_1, /* Same as above */
sizeof(asn_DEF_Ts_tags_1)
/sizeof(asn_DEF_Ts_tags_1[0]), /* 2 */
0, /* No PER visible constraints */
asn_MBR_Ts_1,
3, /* Elements count */
&asn_SPC_Ts_1_specs /* Additional specs */
&asn_SPC_Ts_specs_1 /* Additional specs */
};

View File

@ -26,13 +26,15 @@ static asn_TYPE_member_t asn_MBR_T_1[] = {
.tag_mode = 0,
.type = &asn_DEF_SimpleType,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "named"
},
};
static ber_tlv_tag_t asn_DEF_T_1_tags[] = {
static ber_tlv_tag_t asn_DEF_T_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_T_1_specs = {
static asn_SET_OF_specifics_t asn_SPC_T_specs_1 = {
sizeof(struct T),
offsetof(struct T, _asn_ctx),
1, /* XER encoding is XMLValueList */
@ -47,16 +49,18 @@ asn_TYPE_descriptor_t asn_DEF_T = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T_1_tags,
sizeof(asn_DEF_T_1_tags)
/sizeof(asn_DEF_T_1_tags[0]), /* 1 */
asn_DEF_T_1_tags, /* Same as above */
sizeof(asn_DEF_T_1_tags)
/sizeof(asn_DEF_T_1_tags[0]), /* 1 */
asn_DEF_T_tags_1,
sizeof(asn_DEF_T_tags_1)
/sizeof(asn_DEF_T_tags_1[0]), /* 1 */
asn_DEF_T_tags_1, /* Same as above */
sizeof(asn_DEF_T_tags_1)
/sizeof(asn_DEF_T_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_T_1,
1, /* Single element */
&asn_SPC_T_1_specs /* Additional specs */
&asn_SPC_T_specs_1 /* Additional specs */
};
@ -109,6 +113,9 @@ SimpleType_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_ENUMERATED.der_encoder;
td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder;
td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder;
td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder;
if(!td->per_constraints)
td->per_constraints = asn_DEF_ENUMERATED.per_constraints;
td->elements = asn_DEF_ENUMERATED.elements;
td->elements_count = asn_DEF_ENUMERATED.elements_count;
/* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */
@ -161,24 +168,24 @@ SimpleType_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [SimpleType] >>> ***/
static asn_INTEGER_enum_map_t asn_MAP_SimpleType_1_value2enum[] = {
static asn_INTEGER_enum_map_t asn_MAP_SimpleType_value2enum_1[] = {
{ 0, 3, "one" },
{ 1, 3, "two" },
{ 2, 5, "three" }
};
static unsigned int asn_MAP_SimpleType_1_enum2value[] = {
static unsigned int asn_MAP_SimpleType_enum2value_1[] = {
0, /* one(0) */
2, /* three(2) */
1 /* two(1) */
};
static asn_INTEGER_specifics_t asn_SPC_SimpleType_1_specs = {
asn_MAP_SimpleType_1_value2enum, /* "tag" => N; sorted by tag */
asn_MAP_SimpleType_1_enum2value, /* N => "tag"; sorted by N */
static asn_INTEGER_specifics_t asn_SPC_SimpleType_specs_1 = {
asn_MAP_SimpleType_value2enum_1, /* "tag" => N; sorted by tag */
asn_MAP_SimpleType_enum2value_1, /* N => "tag"; sorted by N */
3, /* Number of elements in the maps */
0, /* Enumeration is not extensible */
1 /* Strict enumeration */
};
static ber_tlv_tag_t asn_DEF_SimpleType_1_tags[] = {
static ber_tlv_tag_t asn_DEF_SimpleType_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
asn_TYPE_descriptor_t asn_DEF_SimpleType = {
@ -191,14 +198,16 @@ asn_TYPE_descriptor_t asn_DEF_SimpleType = {
SimpleType_encode_der,
SimpleType_decode_xer,
SimpleType_encode_xer,
0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_SimpleType_1_tags,
sizeof(asn_DEF_SimpleType_1_tags)
/sizeof(asn_DEF_SimpleType_1_tags[0]), /* 1 */
asn_DEF_SimpleType_1_tags, /* Same as above */
sizeof(asn_DEF_SimpleType_1_tags)
/sizeof(asn_DEF_SimpleType_1_tags[0]), /* 1 */
asn_DEF_SimpleType_tags_1,
sizeof(asn_DEF_SimpleType_tags_1)
/sizeof(asn_DEF_SimpleType_tags_1[0]), /* 1 */
asn_DEF_SimpleType_tags_1, /* Same as above */
sizeof(asn_DEF_SimpleType_tags_1)
/sizeof(asn_DEF_SimpleType_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
&asn_SPC_SimpleType_1_specs /* Additional specs */
&asn_SPC_SimpleType_specs_1 /* Additional specs */
};

Some files were not shown because too many files have changed in this diff Show More