Commit cc93b0f1 authored by Lev Walkin's avatar Lev Walkin

distinction between an optional member and a member encoded with a pointer

parent a7580ed4
...@@ -26,6 +26,7 @@ static int asn1c_lang_C_type_CHOICE_def(arg_t *arg); ...@@ -26,6 +26,7 @@ static int asn1c_lang_C_type_CHOICE_def(arg_t *arg);
static int asn1c_lang_C_type_SEx_OF_def(arg_t *arg, int seq_of); static int asn1c_lang_C_type_SEx_OF_def(arg_t *arg, int seq_of);
static int _print_tag(arg_t *arg, struct asn1p_type_tag_s *tag_p); static int _print_tag(arg_t *arg, struct asn1p_type_tag_s *tag_p);
static int check_if_extensible(asn1p_expr_t *expr); static int check_if_extensible(asn1p_expr_t *expr);
static int expr_better_indirect(arg_t *arg, asn1p_expr_t *expr);
static int expr_elements_count(arg_t *arg, asn1p_expr_t *expr); static int expr_elements_count(arg_t *arg, asn1p_expr_t *expr);
static int emit_member_table(arg_t *arg, asn1p_expr_t *expr); static int emit_member_table(arg_t *arg, asn1p_expr_t *expr);
static int emit_tags_vector(arg_t *arg, asn1p_expr_t *expr, int *tags_impl_skip, int choice_mode); static int emit_tags_vector(arg_t *arg, asn1p_expr_t *expr, int *tags_impl_skip, int choice_mode);
...@@ -149,8 +150,9 @@ asn1c_lang_C_type_SEQUENCE(arg_t *arg) { ...@@ -149,8 +150,9 @@ asn1c_lang_C_type_SEQUENCE(arg_t *arg) {
if(v->expr_type == A1TC_EXTENSIBLE) { if(v->expr_type == A1TC_EXTENSIBLE) {
if(comp_mode < 3) comp_mode++; if(comp_mode < 3) comp_mode++;
} }
if(comp_mode == 1 && !v->marker) if(comp_mode == 1
v->marker = EM_OPTIONAL; || expr_better_indirect(arg, v))
v->marker |= EM_INDIRECT;
EMBED(v); EMBED(v);
} }
...@@ -289,8 +291,9 @@ asn1c_lang_C_type_SET(arg_t *arg) { ...@@ -289,8 +291,9 @@ asn1c_lang_C_type_SET(arg_t *arg) {
if(v->expr_type == A1TC_EXTENSIBLE) { if(v->expr_type == A1TC_EXTENSIBLE) {
if(comp_mode < 3) comp_mode++; if(comp_mode < 3) comp_mode++;
} }
if(comp_mode == 1 && !v->marker) if(comp_mode == 1
v->marker = EM_OPTIONAL; || expr_better_indirect(arg, v))
v->marker |= EM_INDIRECT;
EMBED(v); EMBED(v);
} }
...@@ -345,15 +348,15 @@ asn1c_lang_C_type_SET_def(arg_t *arg) { ...@@ -345,15 +348,15 @@ asn1c_lang_C_type_SET_def(arg_t *arg) {
elements = 0; elements = 0;
INDENTED(TQ_FOR(v, &(expr->members), next) { INDENTED(TQ_FOR(v, &(expr->members), next) {
if(v->expr_type != A1TC_EXTENSIBLE) { if(v->expr_type == A1TC_EXTENSIBLE) {
if(comp_mode == 1)
v->marker = EM_OPTIONAL;
} else {
if(comp_mode < 3) comp_mode++; if(comp_mode < 3) comp_mode++;
continue; } else {
if(comp_mode == 1
|| expr_better_indirect(arg, v))
v->marker |= EM_INDIRECT;
elements++;
emit_member_table(arg, v);
} }
elements++;
emit_member_table(arg, v);
}); });
OUT("};\n"); OUT("};\n");
...@@ -386,7 +389,9 @@ asn1c_lang_C_type_SET_def(arg_t *arg) { ...@@ -386,7 +389,9 @@ asn1c_lang_C_type_SET_def(arg_t *arg) {
} else if(el) { } else if(el) {
OUT(" | "); OUT(" | ");
} }
OUT("(%d << %d)", v->marker?0:1, 7 - (el % 8)); OUT("(%d << %d)",
v->marker?0:1,
7 - (el % 8));
if(el && (el % 8) == 0) if(el && (el % 8) == 0)
delimit = 1; delimit = 1;
el++; el++;
...@@ -573,6 +578,8 @@ asn1c_lang_C_type_CHOICE(arg_t *arg) { ...@@ -573,6 +578,8 @@ asn1c_lang_C_type_CHOICE(arg_t *arg) {
OUT("%s_PR present;\n", id); OUT("%s_PR present;\n", id);
OUT("union {\n", id); OUT("union {\n", id);
TQ_FOR(v, &(expr->members), next) { TQ_FOR(v, &(expr->members), next) {
if(expr_better_indirect(arg, v))
v->marker |= EM_INDIRECT;
EMBED(v); EMBED(v);
} }
if(UNNAMED_UNIONS) OUT("};\n"); if(UNNAMED_UNIONS) OUT("};\n");
...@@ -621,15 +628,15 @@ asn1c_lang_C_type_CHOICE_def(arg_t *arg) { ...@@ -621,15 +628,15 @@ asn1c_lang_C_type_CHOICE_def(arg_t *arg) {
elements = 0; elements = 0;
INDENTED(TQ_FOR(v, &(expr->members), next) { INDENTED(TQ_FOR(v, &(expr->members), next) {
if(v->expr_type != A1TC_EXTENSIBLE) { if(v->expr_type == A1TC_EXTENSIBLE) {
if(comp_mode == 1)
v->marker = EM_OPTIONAL;
} else {
if(comp_mode < 3) comp_mode++; if(comp_mode < 3) comp_mode++;
continue; } else {
if(comp_mode == 1
|| expr_better_indirect(arg, v))
v->marker |= EM_INDIRECT;
elements++;
emit_member_table(arg, v);
} }
elements++;
emit_member_table(arg, v);
}); });
OUT("};\n"); OUT("};\n");
...@@ -731,8 +738,10 @@ asn1c_lang_C_type_SIMPLE_TYPE(arg_t *arg) { ...@@ -731,8 +738,10 @@ asn1c_lang_C_type_SIMPLE_TYPE(arg_t *arg) {
expr->marker?TNF_RSAFE:TNF_CTYPE)); expr->marker?TNF_RSAFE:TNF_CTYPE));
OUT("%s", expr->marker?"*":" "); OUT("%s", expr->marker?"*":" ");
OUT("%s", MKID(expr->Identifier)); OUT("%s", MKID(expr->Identifier));
if(expr->marker) OUT("\t/* %s */", if((expr->marker & EM_DEFAULT) == EM_DEFAULT)
(expr->marker==EM_OPTIONAL)?"OPTIONAL":"DEFAULT"); OUT("\t/* DEFAULT */");
else if((expr->marker & EM_OPTIONAL) == EM_OPTIONAL)
OUT("\t/* OPTIONAL */");
REDIR(OT_TYPE_DECLS); REDIR(OT_TYPE_DECLS);
return 0; return 0;
...@@ -1195,7 +1204,8 @@ emit_member_table(arg_t *arg, asn1p_expr_t *expr) { ...@@ -1195,7 +1204,8 @@ emit_member_table(arg_t *arg, asn1p_expr_t *expr) {
char *p; char *p;
OUT("{ "); OUT("{ ");
if(expr->marker) { OUT("%s, ", expr->marker?"ATF_POINTER":"ATF_NOFLAGS");
if((expr->marker & EM_OPTIONAL) == EM_OPTIONAL) {
asn1p_expr_t *tv; asn1p_expr_t *tv;
int opts = 0; int opts = 0;
for(tv = expr; tv && tv->marker; for(tv = expr; tv && tv->marker;
...@@ -1378,3 +1388,30 @@ emit_type_DEF(arg_t *arg, asn1p_expr_t *expr, int tags_count, int tags_impl_skip ...@@ -1378,3 +1388,30 @@ emit_type_DEF(arg_t *arg, asn1p_expr_t *expr, int tags_count, int tags_impl_skip
return 0; return 0;
} }
/*
* Check if it is better to make this type indirectly accessed via
* a pointer.
* This may be the case for the following recursive definition:
* Type ::= CHOICE { member Type };
*/
static int
expr_better_indirect(arg_t *arg, asn1p_expr_t *expr) {
asn1p_expr_t *top_parent;
asn1p_expr_t *terminal;
if(expr->expr_type != A1TC_REFERENCE)
return 0;
/* Rewind to the topmost parent expression */
if((top_parent = expr->parent_expr)) {
while(top_parent->parent_expr)
top_parent = top_parent->parent_expr;
} else {
return 0;
}
terminal = asn1f_find_terminal_type_ex(arg->asn, arg->mod, expr);
return (terminal == top_parent);
}
...@@ -238,8 +238,8 @@ CHOICE_decode_ber(asn1_TYPE_descriptor_t *td, ...@@ -238,8 +238,8 @@ CHOICE_decode_ber(asn1_TYPE_descriptor_t *td,
* and also a type of containment (it may be contained * and also a type of containment (it may be contained
* as pointer or using inline inclusion). * as pointer or using inline inclusion).
*/ */
if(elm->optional) { if(elm->flags & ATF_POINTER) {
/* Optional member, hereby, a simple pointer */ /* Member is a pointer to another structure */
memb_ptr2 = (void **)((char *)st + elm->memb_offset); memb_ptr2 = (void **)((char *)st + elm->memb_offset);
} else { } else {
/* /*
...@@ -386,10 +386,17 @@ CHOICE_encode_der(asn1_TYPE_descriptor_t *td, ...@@ -386,10 +386,17 @@ CHOICE_encode_der(asn1_TYPE_descriptor_t *td,
* Seek over the present member of the structure. * Seek over the present member of the structure.
*/ */
elm = &td->elements[present-1]; elm = &td->elements[present-1];
if(elm->optional) { if(elm->flags & ATF_POINTER) {
memb_ptr = *(void **)((char *)struct_ptr + elm->memb_offset); memb_ptr = *(void **)((char *)struct_ptr + elm->memb_offset);
if(memb_ptr == 0) { if(memb_ptr == 0) {
erval.encoded = 0; if(elm->optional) {
erval.encoded = 0;
} else {
/* Mandatory element absent */
erval.encoded = -1;
erval.failed_type = td;
erval.structure_ptr = struct_ptr;
}
return erval; return erval;
} }
} else { } else {
...@@ -458,7 +465,7 @@ CHOICE_outmost_tag(asn1_TYPE_descriptor_t *td, const void *ptr, int tag_mode, be ...@@ -458,7 +465,7 @@ CHOICE_outmost_tag(asn1_TYPE_descriptor_t *td, const void *ptr, int tag_mode, be
asn1_TYPE_member_t *elm = &td->elements[present-1]; asn1_TYPE_member_t *elm = &td->elements[present-1];
const void *memb_ptr; const void *memb_ptr;
if(elm->optional) { if(elm->flags & ATF_POINTER) {
memb_ptr = *(const void * const *) memb_ptr = *(const void * const *)
((const char *)ptr + elm->memb_offset); ((const char *)ptr + elm->memb_offset);
} else { } else {
...@@ -494,9 +501,16 @@ CHOICE_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, ...@@ -494,9 +501,16 @@ CHOICE_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn1_TYPE_member_t *elm = &td->elements[present-1]; asn1_TYPE_member_t *elm = &td->elements[present-1];
const void *memb_ptr; const void *memb_ptr;
if(elm->optional) { if(elm->flags & ATF_POINTER) {
memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset);
if(!memb_ptr) return 0; if(!memb_ptr) {
if(elm->optional)
return 0;
_ASN_ERRLOG(app_errlog, app_key,
"%s: mandatory CHOICE element %s absent (%s:%d)",
td->name, elm->name, __FILE__, __LINE__);
return -1;
}
} else { } else {
memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); memb_ptr = (const void *)((const char *)sptr + elm->memb_offset);
} }
...@@ -542,7 +556,7 @@ CHOICE_print(asn1_TYPE_descriptor_t *td, const void *sptr, int ilevel, ...@@ -542,7 +556,7 @@ CHOICE_print(asn1_TYPE_descriptor_t *td, const void *sptr, int ilevel,
asn1_TYPE_member_t *elm = &td->elements[present-1]; asn1_TYPE_member_t *elm = &td->elements[present-1];
const void *memb_ptr; const void *memb_ptr;
if(elm->optional) { if(elm->flags & ATF_POINTER) {
memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset);
if(!memb_ptr) return cb("<absent>", 8, app_key); if(!memb_ptr) return cb("<absent>", 8, app_key);
} else { } else {
...@@ -583,7 +597,7 @@ CHOICE_free(asn1_TYPE_descriptor_t *td, void *ptr, int contents_only) { ...@@ -583,7 +597,7 @@ CHOICE_free(asn1_TYPE_descriptor_t *td, void *ptr, int contents_only) {
asn1_TYPE_member_t *elm = &td->elements[present-1]; asn1_TYPE_member_t *elm = &td->elements[present-1];
void *memb_ptr; void *memb_ptr;
if(elm->optional) { if(elm->flags & ATF_POINTER) {
memb_ptr = *(void **)((char *)ptr + elm->memb_offset); memb_ptr = *(void **)((char *)ptr + elm->memb_offset);
if(memb_ptr) if(memb_ptr)
elm->type->free_struct(elm->type, memb_ptr, 0); elm->type->free_struct(elm->type, memb_ptr, 0);
......
...@@ -197,14 +197,17 @@ SEQUENCE_decode_ber(asn1_TYPE_descriptor_t *td, ...@@ -197,14 +197,17 @@ SEQUENCE_decode_ber(asn1_TYPE_descriptor_t *td,
/* /*
* MICROPHASE 1: Synchronize decoding. * MICROPHASE 1: Synchronize decoding.
*/ */
ASN_DEBUG("In %s SEQUENCE left %d, edx=%d opt=%d ec=%d", ASN_DEBUG("In %s SEQUENCE left %d, edx=%d flags=%d"
td->name, (int)ctx->left, " opt=%d ec=%d",
edx, elements[edx].optional, td->elements_count); td->name, (int)ctx->left, edx,
elements[edx].flags, elements[edx].optional,
td->elements_count);
if(ctx->left == 0 /* No more stuff is expected */ if(ctx->left == 0 /* No more stuff is expected */
&& ( && (
/* Explicit OPTIONAL specification reaches the end */ /* Explicit OPTIONAL specification reaches the end */
(edx + elements[edx].optional == td->elements_count) (edx + elements[edx].optional
== td->elements_count)
|| ||
/* All extensions are optional */ /* All extensions are optional */
(IN_EXTENSION_GROUP(specs, edx) (IN_EXTENSION_GROUP(specs, edx)
...@@ -304,7 +307,8 @@ SEQUENCE_decode_ber(asn1_TYPE_descriptor_t *td, ...@@ -304,7 +307,8 @@ SEQUENCE_decode_ber(asn1_TYPE_descriptor_t *td,
if(!IN_EXTENSION_GROUP(specs, edx)) { if(!IN_EXTENSION_GROUP(specs, edx)) {
if(elements[edx].tag == (ber_tlv_tag_t)-1 if(elements[edx].tag == (ber_tlv_tag_t)-1
&& elements[edx].optional == 0) { /* FIXME: any support */
&& (elements[edx].flags & ATF_POINTER) == 0) {
/* /*
* This must be the ANY type. * This must be the ANY type.
*/ */
...@@ -375,8 +379,8 @@ SEQUENCE_decode_ber(asn1_TYPE_descriptor_t *td, ...@@ -375,8 +379,8 @@ SEQUENCE_decode_ber(asn1_TYPE_descriptor_t *td,
* and also a type of containment (it may be contained * and also a type of containment (it may be contained
* as pointer or using inline inclusion). * as pointer or using inline inclusion).
*/ */
if(elements[edx].optional) { if(elements[edx].flags & ATF_POINTER) {
/* Optional member, hereby, a simple pointer */ /* Member is a pointer to another structure */
memb_ptr2 = (void **)((char *)st + elements[edx].memb_offset); memb_ptr2 = (void **)((char *)st + elements[edx].memb_offset);
} else { } else {
/* /*
...@@ -505,7 +509,7 @@ SEQUENCE_encode_der(asn1_TYPE_descriptor_t *td, ...@@ -505,7 +509,7 @@ SEQUENCE_encode_der(asn1_TYPE_descriptor_t *td,
for(edx = 0; edx < td->elements_count; edx++) { for(edx = 0; edx < td->elements_count; edx++) {
asn1_TYPE_member_t *elm = &td->elements[edx]; asn1_TYPE_member_t *elm = &td->elements[edx];
void *memb_ptr; void *memb_ptr;
if(elm->optional) { if(elm->flags & ATF_POINTER) {
memb_ptr = *(void **)((char *)ptr + elm->memb_offset); memb_ptr = *(void **)((char *)ptr + elm->memb_offset);
if(!memb_ptr) continue; if(!memb_ptr) continue;
} else { } else {
...@@ -544,7 +548,7 @@ SEQUENCE_encode_der(asn1_TYPE_descriptor_t *td, ...@@ -544,7 +548,7 @@ SEQUENCE_encode_der(asn1_TYPE_descriptor_t *td,
der_enc_rval_t tmperval; der_enc_rval_t tmperval;
void *memb_ptr; void *memb_ptr;
if(elm->optional) { if(elm->flags & ATF_POINTER) {
memb_ptr = *(void **)((char *)ptr + elm->memb_offset); memb_ptr = *(void **)((char *)ptr + elm->memb_offset);
if(!memb_ptr) continue; if(!memb_ptr) continue;
} else { } else {
...@@ -589,7 +593,7 @@ SEQUENCE_print(asn1_TYPE_descriptor_t *td, const void *sptr, int ilevel, ...@@ -589,7 +593,7 @@ SEQUENCE_print(asn1_TYPE_descriptor_t *td, const void *sptr, int ilevel,
asn1_TYPE_member_t *elm = &td->elements[edx]; asn1_TYPE_member_t *elm = &td->elements[edx];
const void *memb_ptr; const void *memb_ptr;
if(elm->optional) { if(elm->flags & ATF_POINTER) {
memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset);
if(!memb_ptr) continue; if(!memb_ptr) continue;
} else { } else {
...@@ -632,7 +636,7 @@ SEQUENCE_free(asn1_TYPE_descriptor_t *td, void *sptr, int contents_only) { ...@@ -632,7 +636,7 @@ SEQUENCE_free(asn1_TYPE_descriptor_t *td, void *sptr, int contents_only) {
for(edx = 0; edx < td->elements_count; edx++) { for(edx = 0; edx < td->elements_count; edx++) {
asn1_TYPE_member_t *elm = &td->elements[edx]; asn1_TYPE_member_t *elm = &td->elements[edx];
void *memb_ptr; void *memb_ptr;
if(elm->optional) { if(elm->flags & ATF_POINTER) {
memb_ptr = *(void **)((char *)sptr + elm->memb_offset); memb_ptr = *(void **)((char *)sptr + elm->memb_offset);
if(memb_ptr) if(memb_ptr)
elm->type->free_struct(elm->type, memb_ptr, 0); elm->type->free_struct(elm->type, memb_ptr, 0);
...@@ -666,7 +670,7 @@ SEQUENCE_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, ...@@ -666,7 +670,7 @@ SEQUENCE_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn1_TYPE_member_t *elm = &td->elements[edx]; asn1_TYPE_member_t *elm = &td->elements[edx];
const void *memb_ptr; const void *memb_ptr;
if(elm->optional) { if(elm->flags & ATF_POINTER) {
memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset);
if(!memb_ptr) continue; if(!memb_ptr) continue;
} else { } else {
......
...@@ -294,8 +294,8 @@ SET_decode_ber(asn1_TYPE_descriptor_t *td, ...@@ -294,8 +294,8 @@ SET_decode_ber(asn1_TYPE_descriptor_t *td,
* and also a type of containment (it may be contained * and also a type of containment (it may be contained
* as pointer or using inline inclusion). * as pointer or using inline inclusion).
*/ */
if(elements[edx].optional) { if(elements[edx].flags & ATF_POINTER) {
/* Optional member, hereby, a simple pointer */ /* Member is a pointer to another structure */
memb_ptr2 = (void **)((char *)st + elements[edx].memb_offset); memb_ptr2 = (void **)((char *)st + elements[edx].memb_offset);
} else { } else {
/* /*
...@@ -475,7 +475,7 @@ SET_encode_der(asn1_TYPE_descriptor_t *td, ...@@ -475,7 +475,7 @@ SET_encode_der(asn1_TYPE_descriptor_t *td,
/* /*
* Compute the length of the encoding of this member. * Compute the length of the encoding of this member.
*/ */
if(elm->optional) { if(elm->flags & ATF_POINTER) {
memb_ptr = *(void **)((char *)ptr + elm->memb_offset); memb_ptr = *(void **)((char *)ptr + elm->memb_offset);
if(!memb_ptr) { if(!memb_ptr) {
if(t2m_build_own) { if(t2m_build_own) {
...@@ -551,7 +551,7 @@ SET_encode_der(asn1_TYPE_descriptor_t *td, ...@@ -551,7 +551,7 @@ SET_encode_der(asn1_TYPE_descriptor_t *td,
/* Encode according to the tag order */ /* Encode according to the tag order */
elm = &td->elements[t2m[edx].el_no]; elm = &td->elements[t2m[edx].el_no];
if(elm->optional) { if(elm->flags & ATF_POINTER) {
memb_ptr = *(void **)((char *)ptr + elm->memb_offset); memb_ptr = *(void **)((char *)ptr + elm->memb_offset);
if(!memb_ptr) continue; if(!memb_ptr) continue;
} else { } else {
...@@ -594,7 +594,7 @@ SET_print(asn1_TYPE_descriptor_t *td, const void *sptr, int ilevel, ...@@ -594,7 +594,7 @@ SET_print(asn1_TYPE_descriptor_t *td, const void *sptr, int ilevel,
asn1_TYPE_member_t *elm = &td->elements[edx]; asn1_TYPE_member_t *elm = &td->elements[edx];
const void *memb_ptr; const void *memb_ptr;
if(elm->optional) { if(elm->flags & ATF_POINTER) {
memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset);
if(!memb_ptr) continue; if(!memb_ptr) continue;
} else { } else {
...@@ -636,7 +636,7 @@ SET_free(asn1_TYPE_descriptor_t *td, void *ptr, int contents_only) { ...@@ -636,7 +636,7 @@ SET_free(asn1_TYPE_descriptor_t *td, void *ptr, int contents_only) {
for(edx = 0; edx < td->elements_count; edx++) { for(edx = 0; edx < td->elements_count; edx++) {
asn1_TYPE_member_t *elm = &td->elements[edx]; asn1_TYPE_member_t *elm = &td->elements[edx];
void *memb_ptr; void *memb_ptr;
if(elm->optional) { if(elm->flags & ATF_POINTER) {
memb_ptr = *(void **)((char *)ptr + elm->memb_offset); memb_ptr = *(void **)((char *)ptr + elm->memb_offset);
if(memb_ptr) if(memb_ptr)
elm->type->free_struct(elm->type, memb_ptr, 0); elm->type->free_struct(elm->type, memb_ptr, 0);
...@@ -671,19 +671,15 @@ SET_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, ...@@ -671,19 +671,15 @@ SET_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn1_TYPE_member_t *elm = &td->elements[edx]; asn1_TYPE_member_t *elm = &td->elements[edx];
const void *memb_ptr; const void *memb_ptr;
if(elm->optional) { if(elm->flags & ATF_POINTER) {
memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset);
if(!memb_ptr) { if(!memb_ptr) {
if(ASN_SET_ISPRESENT2( if(elm->optional)
&(specs->_mandatory_elements), edx)) { continue;
_ASN_ERRLOG(app_errlog, app_key, _ASN_ERRLOG(app_errlog, app_key,
"%s: mandatory element " "%s: mandatory element %s absent (%s:%d)",
"%s absent (%s:%d)", td->name, elm->name, __FILE__, __LINE__);
td->name, elm->name, return -1;
__FILE__, __LINE__);
return -1;
}
continue;
} }
} else { } else {
memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); memb_ptr = (const void *)((const char *)sptr + elm->memb_offset);
......
...@@ -94,7 +94,11 @@ typedef struct asn1_TYPE_descriptor_s { ...@@ -94,7 +94,11 @@ typedef struct asn1_TYPE_descriptor_s {
* An element of the constructed type, i.e. SEQUENCE, SET, CHOICE. * An element of the constructed type, i.e. SEQUENCE, SET, CHOICE.
*/ */
typedef struct asn1_TYPE_member_s { typedef struct asn1_TYPE_member_s {
int optional; /* Whether the element is optional */ enum asn1_TYPE_flags_e {
ATF_NOFLAGS,
ATF_POINTER = 0x01, /* Represented by the pointer */
} flags; /* Element's presentation flags */
int optional; /* Following optional members, including current */
int memb_offset; /* Offset of the element */ int memb_offset; /* Offset of the element */
ber_tlv_tag_t tag; /* Outmost (most immediate) tag */ ber_tlv_tag_t tag; /* Outmost (most immediate) tag */
int tag_mode; /* IMPLICIT/no/EXPLICIT tag at current level */ int tag_mode; /* IMPLICIT/no/EXPLICIT tag at current level */
......
...@@ -67,21 +67,21 @@ memb_signature_1_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, ...@@ -67,21 +67,21 @@ memb_signature_1_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
/*** <<< STAT-DEFS [Certificate] >>> ***/ /*** <<< STAT-DEFS [Certificate] >>> ***/
static asn1_TYPE_member_t asn1_MBR_toBeSigned[] = { static asn1_TYPE_member_t asn1_MBR_toBeSigned[] = {
{ 0, offsetof(struct toBeSigned, version), { ATF_NOFLAGS, 0, offsetof(struct toBeSigned, version),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_INTEGER, .type = (void *)&asn1_DEF_INTEGER,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "version" .name = "version"
}, },
{ 0, offsetof(struct toBeSigned, signature), { ATF_NOFLAGS, 0, offsetof(struct toBeSigned, signature),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_OBJECT_IDENTIFIER, .type = (void *)&asn1_DEF_OBJECT_IDENTIFIER,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "signature" .name = "signature"
}, },
{ 0, offsetof(struct toBeSigned, issuer), { ATF_NOFLAGS, 0, offsetof(struct toBeSigned, issuer),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_Name, .type = (void *)&asn1_DEF_Name,
...@@ -125,21 +125,21 @@ asn1_TYPE_descriptor_t asn1_DEF_toBeSigned = { ...@@ -125,21 +125,21 @@ asn1_TYPE_descriptor_t asn1_DEF_toBeSigned = {
}; };
static asn1_TYPE_member_t asn1_MBR_Certificate[] = { static asn1_TYPE_member_t asn1_MBR_Certificate[] = {
{ 0, offsetof(struct Certificate, toBeSigned), { ATF_NOFLAGS, 0, offsetof(struct Certificate, toBeSigned),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_toBeSigned, .type = (void *)&asn1_DEF_toBeSigned,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "toBeSigned" .name = "toBeSigned"
}, },
{ 0, offsetof(struct Certificate, algorithm), { ATF_NOFLAGS, 0, offsetof(struct Certificate, algorithm),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_OBJECT_IDENTIFIER, .type = (void *)&asn1_DEF_OBJECT_IDENTIFIER,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "algorithm" .name = "algorithm"
}, },
{ 0, offsetof(struct Certificate, signature), { ATF_NOFLAGS, 0, offsetof(struct Certificate, signature),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_BIT_STRING, .type = (void *)&asn1_DEF_BIT_STRING,
...@@ -205,7 +205,7 @@ typedef struct Name { ...@@ -205,7 +205,7 @@ typedef struct Name {
/*** <<< STAT-DEFS [Name] >>> ***/ /*** <<< STAT-DEFS [Name] >>> ***/
static asn1_TYPE_member_t asn1_MBR_Name[] = { static asn1_TYPE_member_t asn1_MBR_Name[] = {
{ 0, 0, { ATF_NOFLAGS, 0, 0,
.tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_RelativeDistinguishedName, .type = (void *)&asn1_DEF_RelativeDistinguishedName,
...@@ -317,7 +317,7 @@ memb_IA5String_2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, ...@@ -317,7 +317,7 @@ memb_IA5String_2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
/*** <<< STAT-DEFS [RelativeDistinguishedName] >>> ***/ /*** <<< STAT-DEFS [RelativeDistinguishedName] >>> ***/
static asn1_TYPE_member_t asn1_MBR_RelativeDistinguishedName[] = { static asn1_TYPE_member_t asn1_MBR_RelativeDistinguishedName[] = {
{ 0, 0, { ATF_NOFLAGS, 0, 0,
.tag = (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_IA5String, .type = (void *)&asn1_DEF_IA5String,
......
...@@ -22,7 +22,7 @@ typedef struct Forest { ...@@ -22,7 +22,7 @@ typedef struct Forest {
/*** <<< STAT-DEFS [Forest] >>> ***/ /*** <<< STAT-DEFS [Forest] >>> ***/
static asn1_TYPE_member_t asn1_MBR_Forest[] = { static asn1_TYPE_member_t asn1_MBR_Forest[] = {
{ 0, 0, { ATF_NOFLAGS, 0, 0,
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_Tree, .type = (void *)&asn1_DEF_Tree,
...@@ -79,14 +79,14 @@ typedef struct Tree { ...@@ -79,14 +79,14 @@ typedef struct Tree {
/*** <<< STAT-DEFS [Tree] >>> ***/ /*** <<< STAT-DEFS [Tree] >>> ***/
static asn1_TYPE_member_t asn1_MBR_Tree[] = { static asn1_TYPE_member_t asn1_MBR_Tree[] = {
{ 0, offsetof(struct Tree, height), { ATF_NOFLAGS, 0, offsetof(struct Tree, height),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_INTEGER, .type = (void *)&asn1_DEF_INTEGER,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "height" .name = "height"
}, },
{ 0, offsetof(struct Tree, width), { ATF_NOFLAGS, 0, offsetof(struct Tree, width),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_INTEGER, .type = (void *)&asn1_DEF_INTEGER,
...@@ -186,7 +186,7 @@ typedef struct Stuff { ...@@ -186,7 +186,7 @@ typedef struct Stuff {
/*** <<< STAT-DEFS [Stuff] >>> ***/ /*** <<< STAT-DEFS [Stuff] >>> ***/
static asn1_TYPE_member_t asn1_MBR_trees[] = { static asn1_TYPE_member_t asn1_MBR_trees[] = {
{ 0, 0, { ATF_NOFLAGS, 0, 0,
.tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_Forest, .type = (void *)&asn1_DEF_Forest,
...@@ -221,7 +221,7 @@ asn1_TYPE_descriptor_t asn1_DEF_trees = { ...@@ -221,7 +221,7 @@ asn1_TYPE_descriptor_t asn1_DEF_trees = {
}; };
static asn1_TYPE_member_t asn1_MBR_anything_member[] = { static asn1_TYPE_member_t asn1_MBR_anything_member[] = {
{ 0, offsetof(struct anything_member, cup_of_coffee), { ATF_NOFLAGS, 0, offsetof(struct anything_member, cup_of_coffee),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_BIT_STRING, .type = (void *)&asn1_DEF_BIT_STRING,
...@@ -263,7 +263,7 @@ asn1_TYPE_descriptor_t asn1_DEF_anything_member = { ...@@ -263,7 +263,7 @@ asn1_TYPE_descriptor_t asn1_DEF_anything_member = {
}; };
static asn1_TYPE_member_t asn1_MBR_anything[] = { static asn1_TYPE_member_t asn1_MBR_anything[] = {
{ 0, 0, { ATF_NOFLAGS, 0, 0,
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_anything_member, .type = (void *)&asn1_DEF_anything_member,
...@@ -298,14 +298,14 @@ asn1_TYPE_descriptor_t asn1_DEF_anything = { ...@@ -298,14 +298,14 @@ asn1_TYPE_descriptor_t asn1_DEF_anything = {
}; };
static asn1_TYPE_member_t asn1_MBR_Stuff[] = { static asn1_TYPE_member_t asn1_MBR_Stuff[] = {
{ 2, offsetof(struct Stuff, trees), { ATF_POINTER, 2, offsetof(struct Stuff, trees),
.tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */ .tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn1_DEF_trees, .type = (void *)&asn1_DEF_trees,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "trees" .name = "trees"
}, },
{ 1, offsetof(struct Stuff, anything), { ATF_POINTER, 1, offsetof(struct Stuff, anything),
.tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */ .tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn1_DEF_anything, .type = (void *)&asn1_DEF_anything,
......
...@@ -30,7 +30,7 @@ typedef struct T { ...@@ -30,7 +30,7 @@ typedef struct T {
/*** <<< STAT-DEFS [T] >>> ***/ /*** <<< STAT-DEFS [T] >>> ***/
static asn1_TYPE_member_t asn1_MBR_collection[] = { static asn1_TYPE_member_t asn1_MBR_collection[] = {
{ 0, 0, { ATF_NOFLAGS, 0, 0,
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_T2, .type = (void *)&asn1_DEF_T2,
...@@ -65,14 +65,14 @@ asn1_TYPE_descriptor_t asn1_DEF_collection = { ...@@ -65,14 +65,14 @@ asn1_TYPE_descriptor_t asn1_DEF_collection = {
}; };
static asn1_TYPE_member_t asn1_MBR_T[] = { static asn1_TYPE_member_t asn1_MBR_T[] = {
{ 0, offsetof(struct T, int), { ATF_NOFLAGS, 0, offsetof(struct T, int),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_INTEGER, .type = (void *)&asn1_DEF_INTEGER,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "int" .name = "int"
}, },
{ 0, offsetof(struct T, collection), { ATF_NOFLAGS, 0, offsetof(struct T, collection),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_collection, .type = (void *)&asn1_DEF_collection,
...@@ -138,14 +138,14 @@ typedef struct T2 { ...@@ -138,14 +138,14 @@ typedef struct T2 {
/*** <<< STAT-DEFS [T2] >>> ***/ /*** <<< STAT-DEFS [T2] >>> ***/
static asn1_TYPE_member_t asn1_MBR_T2[] = { static asn1_TYPE_member_t asn1_MBR_T2[] = {
{ 0, offsetof(struct T2, flag), { ATF_NOFLAGS, 0, offsetof(struct T2, flag),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_BOOLEAN, .type = (void *)&asn1_DEF_BOOLEAN,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "flag" .name = "flag"
}, },
{ 0, offsetof(struct T2, str), { ATF_NOFLAGS, 0, offsetof(struct T2, str),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_UTF8String, .type = (void *)&asn1_DEF_UTF8String,
......
...@@ -66,7 +66,7 @@ memb_varsets_1_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, ...@@ -66,7 +66,7 @@ memb_varsets_1_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
/*** <<< STAT-DEFS [LogLine] >>> ***/ /*** <<< STAT-DEFS [LogLine] >>> ***/
static asn1_TYPE_member_t asn1_MBR_varsets[] = { static asn1_TYPE_member_t asn1_MBR_varsets[] = {
{ 0, 0, { ATF_NOFLAGS, 0, 0,
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_VariablePartSet, .type = (void *)&asn1_DEF_VariablePartSet,
...@@ -101,14 +101,14 @@ asn1_TYPE_descriptor_t asn1_DEF_varsets = { ...@@ -101,14 +101,14 @@ asn1_TYPE_descriptor_t asn1_DEF_varsets = {
}; };
static asn1_TYPE_member_t asn1_MBR_LogLine[] = { static asn1_TYPE_member_t asn1_MBR_LogLine[] = {
{ 0, offsetof(struct LogLine, line_digest), { ATF_NOFLAGS, 0, offsetof(struct LogLine, line_digest),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_IA5String, .type = (void *)&asn1_DEF_IA5String,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "line-digest" .name = "line-digest"
}, },
{ 0, offsetof(struct LogLine, varsets), { ATF_NOFLAGS, 0, offsetof(struct LogLine, varsets),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_varsets, .type = (void *)&asn1_DEF_varsets,
...@@ -208,7 +208,7 @@ memb_vparts_2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, ...@@ -208,7 +208,7 @@ memb_vparts_2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
/*** <<< STAT-DEFS [VariablePartSet] >>> ***/ /*** <<< STAT-DEFS [VariablePartSet] >>> ***/
static asn1_TYPE_member_t asn1_MBR_vparts[] = { static asn1_TYPE_member_t asn1_MBR_vparts[] = {
{ 0, 0, { ATF_NOFLAGS, 0, 0,
.tag = -1 /* Ambiguous tag (CHOICE|ANY?) */, .tag = -1 /* Ambiguous tag (CHOICE|ANY?) */,
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_VariablePart, .type = (void *)&asn1_DEF_VariablePart,
...@@ -243,14 +243,14 @@ asn1_TYPE_descriptor_t asn1_DEF_vparts = { ...@@ -243,14 +243,14 @@ asn1_TYPE_descriptor_t asn1_DEF_vparts = {
}; };
static asn1_TYPE_member_t asn1_MBR_VariablePartSet[] = { static asn1_TYPE_member_t asn1_MBR_VariablePartSet[] = {
{ 0, offsetof(struct VariablePartSet, vparts), { ATF_NOFLAGS, 0, offsetof(struct VariablePartSet, vparts),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_vparts, .type = (void *)&asn1_DEF_vparts,
.memb_constraints = memb_vparts_2_constraint, .memb_constraints = memb_vparts_2_constraint,
.name = "vparts" .name = "vparts"
}, },
{ 0, offsetof(struct VariablePartSet, resolution), { ATF_NOFLAGS, 0, offsetof(struct VariablePartSet, resolution),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_ActionItem, .type = (void *)&asn1_DEF_ActionItem,
...@@ -378,7 +378,7 @@ memb_vset_3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, ...@@ -378,7 +378,7 @@ memb_vset_3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
/*** <<< STAT-DEFS [VariablePart] >>> ***/ /*** <<< STAT-DEFS [VariablePart] >>> ***/
static asn1_TYPE_member_t asn1_MBR_vset[] = { static asn1_TYPE_member_t asn1_MBR_vset[] = {
{ 0, 0, { ATF_NOFLAGS, 0, 0,
.tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_VisibleString, .type = (void *)&asn1_DEF_VisibleString,
...@@ -413,14 +413,14 @@ asn1_TYPE_descriptor_t asn1_DEF_vset = { ...@@ -413,14 +413,14 @@ asn1_TYPE_descriptor_t asn1_DEF_vset = {
}; };
static asn1_TYPE_member_t asn1_MBR_vrange[] = { static asn1_TYPE_member_t asn1_MBR_vrange[] = {
{ 0, offsetof(struct vrange, from), { ATF_NOFLAGS, 0, offsetof(struct vrange, from),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_VisibleString, .type = (void *)&asn1_DEF_VisibleString,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "from" .name = "from"
}, },
{ 0, offsetof(struct vrange, to), { ATF_NOFLAGS, 0, offsetof(struct vrange, to),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_VisibleString, .type = (void *)&asn1_DEF_VisibleString,
...@@ -463,14 +463,14 @@ asn1_TYPE_descriptor_t asn1_DEF_vrange = { ...@@ -463,14 +463,14 @@ asn1_TYPE_descriptor_t asn1_DEF_vrange = {
}; };
static asn1_TYPE_member_t asn1_MBR_VariablePart[] = { static asn1_TYPE_member_t asn1_MBR_VariablePart[] = {
{ 0, offsetof(struct VariablePart, choice.vset), { ATF_NOFLAGS, 0, offsetof(struct VariablePart, choice.vset),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_vset, .type = (void *)&asn1_DEF_vset,
.memb_constraints = memb_vset_3_constraint, .memb_constraints = memb_vset_3_constraint,
.name = "vset" .name = "vset"
}, },
{ 0, offsetof(struct VariablePart, choice.vrange), { ATF_NOFLAGS, 0, offsetof(struct VariablePart, choice.vrange),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_vrange, .type = (void *)&asn1_DEF_vrange,
...@@ -563,7 +563,7 @@ typedef struct ActionItem { ...@@ -563,7 +563,7 @@ typedef struct ActionItem {
/*** <<< STAT-DEFS [ActionItem] >>> ***/ /*** <<< STAT-DEFS [ActionItem] >>> ***/
static asn1_TYPE_member_t asn1_MBR_email[] = { static asn1_TYPE_member_t asn1_MBR_email[] = {
{ 0, 0, { ATF_NOFLAGS, 0, 0,
.tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_VisibleString, .type = (void *)&asn1_DEF_VisibleString,
...@@ -598,14 +598,14 @@ asn1_TYPE_descriptor_t asn1_DEF_email = { ...@@ -598,14 +598,14 @@ asn1_TYPE_descriptor_t asn1_DEF_email = {
}; };
static asn1_TYPE_member_t asn1_MBR_notify[] = { static asn1_TYPE_member_t asn1_MBR_notify[] = {
{ 0, offsetof(struct notify, critical), { ATF_NOFLAGS, 0, offsetof(struct notify, critical),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_BOOLEAN, .type = (void *)&asn1_DEF_BOOLEAN,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "critical" .name = "critical"
}, },
{ 0, offsetof(struct notify, email), { ATF_NOFLAGS, 0, offsetof(struct notify, email),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_email, .type = (void *)&asn1_DEF_email,
...@@ -648,14 +648,14 @@ asn1_TYPE_descriptor_t asn1_DEF_notify = { ...@@ -648,14 +648,14 @@ asn1_TYPE_descriptor_t asn1_DEF_notify = {
}; };
static asn1_TYPE_member_t asn1_MBR_ActionItem[] = { static asn1_TYPE_member_t asn1_MBR_ActionItem[] = {
{ 0, offsetof(struct ActionItem, accept_as), { ATF_NOFLAGS, 0, offsetof(struct ActionItem, accept_as),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_ENUMERATED, .type = (void *)&asn1_DEF_ENUMERATED,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "accept-as" .name = "accept-as"
}, },
{ 1, offsetof(struct ActionItem, notify), { ATF_POINTER, 1, offsetof(struct ActionItem, notify),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_notify, .type = (void *)&asn1_DEF_notify,
......
...@@ -39,7 +39,7 @@ typedef struct Test_structure_1 { ...@@ -39,7 +39,7 @@ typedef struct Test_structure_1 {
/*** <<< STAT-DEFS [Test-structure-1] >>> ***/ /*** <<< STAT-DEFS [Test-structure-1] >>> ***/
static asn1_TYPE_member_t asn1_MBR_t_member1[] = { static asn1_TYPE_member_t asn1_MBR_t_member1[] = {
{ 0, 0, { ATF_NOFLAGS, 0, 0,
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_Test_structure_1, .type = (void *)&asn1_DEF_Test_structure_1,
...@@ -74,7 +74,7 @@ asn1_TYPE_descriptor_t asn1_DEF_t_member1 = { ...@@ -74,7 +74,7 @@ asn1_TYPE_descriptor_t asn1_DEF_t_member1 = {
}; };
static asn1_TYPE_member_t asn1_MBR_t_member2[] = { static asn1_TYPE_member_t asn1_MBR_t_member2[] = {
{ 0, 0, { ATF_NOFLAGS, 0, 0,
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_Test_structure_1, .type = (void *)&asn1_DEF_Test_structure_1,
...@@ -109,28 +109,28 @@ asn1_TYPE_descriptor_t asn1_DEF_t_member2 = { ...@@ -109,28 +109,28 @@ asn1_TYPE_descriptor_t asn1_DEF_t_member2 = {
}; };
static asn1_TYPE_member_t asn1_MBR_Test_structure_1[] = { static asn1_TYPE_member_t asn1_MBR_Test_structure_1[] = {
{ 0, offsetof(struct Test_structure_1, t_member1), { ATF_NOFLAGS, 0, offsetof(struct Test_structure_1, t_member1),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_t_member1, .type = (void *)&asn1_DEF_t_member1,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "t-member1" .name = "t-member1"
}, },
{ 0, offsetof(struct Test_structure_1, t_member2), { ATF_NOFLAGS, 0, offsetof(struct Test_structure_1, t_member2),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_t_member2, .type = (void *)&asn1_DEF_t_member2,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "t-member2" .name = "t-member2"
}, },
{ 1, offsetof(struct Test_structure_1, t_member3), { ATF_POINTER, 1, offsetof(struct Test_structure_1, t_member3),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_Test_structure_1, .type = (void *)&asn1_DEF_Test_structure_1,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "t-member3" .name = "t-member3"
}, },
{ 0, offsetof(struct Test_structure_1, t_member4), { ATF_NOFLAGS, 0, offsetof(struct Test_structure_1, t_member4),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_INTEGER, .type = (void *)&asn1_DEF_INTEGER,
...@@ -199,14 +199,14 @@ extern asn1_TYPE_descriptor_t asn1_DEF_Choice_1; ...@@ -199,14 +199,14 @@ extern asn1_TYPE_descriptor_t asn1_DEF_Choice_1;
typedef struct Choice_1 { typedef struct Choice_1 {
Choice_1_PR present; Choice_1_PR present;
union { union {
struct Choice_1 and; struct Choice_1 *and;
struct or { struct or {
A_SET_OF(struct Choice_1) list; A_SET_OF(struct Choice_1) list;
/* Context for parsing across buffer boundaries */ /* Context for parsing across buffer boundaries */
ber_dec_ctx_t _ber_dec_ctx; ber_dec_ctx_t _ber_dec_ctx;
} or; } or;
struct Choice_1 not; struct Choice_1 *not;
INTEGER_t other; INTEGER_t other;
} choice; } choice;
...@@ -217,7 +217,7 @@ typedef struct Choice_1 { ...@@ -217,7 +217,7 @@ typedef struct Choice_1 {
/*** <<< STAT-DEFS [Choice-1] >>> ***/ /*** <<< STAT-DEFS [Choice-1] >>> ***/
static asn1_TYPE_member_t asn1_MBR_or[] = { static asn1_TYPE_member_t asn1_MBR_or[] = {
{ 0, 0, { ATF_NOFLAGS, 0, 0,
.tag = -1 /* Ambiguous tag (CHOICE|ANY?) */, .tag = -1 /* Ambiguous tag (CHOICE|ANY?) */,
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_Choice_1, .type = (void *)&asn1_DEF_Choice_1,
...@@ -252,28 +252,28 @@ asn1_TYPE_descriptor_t asn1_DEF_or = { ...@@ -252,28 +252,28 @@ asn1_TYPE_descriptor_t asn1_DEF_or = {
}; };
static asn1_TYPE_member_t asn1_MBR_Choice_1[] = { static asn1_TYPE_member_t asn1_MBR_Choice_1[] = {
{ 0, offsetof(struct Choice_1, choice.and), { ATF_POINTER, 0, offsetof(struct Choice_1, choice.and),
.tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
.tag_mode = +1, /* EXPLICIT tag at current level */ .tag_mode = +1, /* EXPLICIT tag at current level */
.type = (void *)&asn1_DEF_Choice_1, .type = (void *)&asn1_DEF_Choice_1,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "and" .name = "and"
}, },
{ 0, offsetof(struct Choice_1, choice.or), { ATF_NOFLAGS, 0, offsetof(struct Choice_1, choice.or),
.tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */ .tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn1_DEF_or, .type = (void *)&asn1_DEF_or,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "or" .name = "or"
}, },
{ 0, offsetof(struct Choice_1, choice.not), { ATF_POINTER, 0, offsetof(struct Choice_1, choice.not),
.tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)), .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
.tag_mode = +1, /* EXPLICIT tag at current level */ .tag_mode = +1, /* EXPLICIT tag at current level */
.type = (void *)&asn1_DEF_Choice_1, .type = (void *)&asn1_DEF_Choice_1,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "not" .name = "not"
}, },
{ 0, offsetof(struct Choice_1, choice.other), { ATF_NOFLAGS, 0, offsetof(struct Choice_1, choice.other),
.tag = (ASN_TAG_CLASS_CONTEXT | (4 << 2)), .tag = (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
.tag_mode = +1, /* EXPLICIT tag at current level */ .tag_mode = +1, /* EXPLICIT tag at current level */
.type = (void *)&asn1_DEF_INTEGER, .type = (void *)&asn1_DEF_INTEGER,
......
...@@ -69,14 +69,14 @@ typedef struct T { ...@@ -69,14 +69,14 @@ typedef struct T {
/*** <<< STAT-DEFS [T] >>> ***/ /*** <<< STAT-DEFS [T] >>> ***/
static asn1_TYPE_member_t asn1_MBR_e[] = { static asn1_TYPE_member_t asn1_MBR_e[] = {
{ 0, offsetof(struct e, choice.f), { ATF_NOFLAGS, 0, offsetof(struct e, choice.f),
.tag = (ASN_TAG_CLASS_PRIVATE | (7 << 2)), .tag = (ASN_TAG_CLASS_PRIVATE | (7 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */ .tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn1_DEF_NULL, .type = (void *)&asn1_DEF_NULL,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "f" .name = "f"
}, },
{ 0, offsetof(struct e, choice.g), { ATF_NOFLAGS, 0, offsetof(struct e, choice.g),
.tag = (ASN_TAG_CLASS_PRIVATE | (8 << 2)), .tag = (ASN_TAG_CLASS_PRIVATE | (8 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */ .tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn1_DEF_NULL, .type = (void *)&asn1_DEF_NULL,
...@@ -116,14 +116,14 @@ asn1_TYPE_descriptor_t asn1_DEF_e = { ...@@ -116,14 +116,14 @@ asn1_TYPE_descriptor_t asn1_DEF_e = {
}; };
static asn1_TYPE_member_t asn1_MBR_h[] = { static asn1_TYPE_member_t asn1_MBR_h[] = {
{ 0, offsetof(struct h, choice.i), { ATF_NOFLAGS, 0, offsetof(struct h, choice.i),
.tag = (ASN_TAG_CLASS_PRIVATE | (1 << 2)), .tag = (ASN_TAG_CLASS_PRIVATE | (1 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */ .tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn1_DEF_NULL, .type = (void *)&asn1_DEF_NULL,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "i" .name = "i"
}, },
{ 0, offsetof(struct h, choice.j), { ATF_NOFLAGS, 0, offsetof(struct h, choice.j),
.tag = (ASN_TAG_CLASS_PRIVATE | (2 << 2)), .tag = (ASN_TAG_CLASS_PRIVATE | (2 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */ .tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn1_DEF_NULL, .type = (void *)&asn1_DEF_NULL,
...@@ -163,28 +163,28 @@ asn1_TYPE_descriptor_t asn1_DEF_h = { ...@@ -163,28 +163,28 @@ asn1_TYPE_descriptor_t asn1_DEF_h = {
}; };
static asn1_TYPE_member_t asn1_MBR_b[] = { static asn1_TYPE_member_t asn1_MBR_b[] = {
{ 0, offsetof(struct b, choice.c), { ATF_NOFLAGS, 0, offsetof(struct b, choice.c),
.tag = (ASN_TAG_CLASS_PRIVATE | (5 << 2)), .tag = (ASN_TAG_CLASS_PRIVATE | (5 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */ .tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn1_DEF_NULL, .type = (void *)&asn1_DEF_NULL,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "c" .name = "c"
}, },
{ 0, offsetof(struct b, choice.d), { ATF_NOFLAGS, 0, offsetof(struct b, choice.d),
.tag = (ASN_TAG_CLASS_PRIVATE | (6 << 2)), .tag = (ASN_TAG_CLASS_PRIVATE | (6 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */ .tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn1_DEF_NULL, .type = (void *)&asn1_DEF_NULL,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "d" .name = "d"
}, },
{ 0, offsetof(struct b, choice.e), { ATF_NOFLAGS, 0, offsetof(struct b, choice.e),
.tag = -1 /* Ambiguous tag (CHOICE|ANY?) */, .tag = -1 /* Ambiguous tag (CHOICE|ANY?) */,
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_e, .type = (void *)&asn1_DEF_e,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "e" .name = "e"
}, },
{ 0, offsetof(struct b, choice.h), { ATF_NOFLAGS, 0, offsetof(struct b, choice.h),
.tag = (ASN_TAG_CLASS_PRIVATE | (9 << 2)), .tag = (ASN_TAG_CLASS_PRIVATE | (9 << 2)),
.tag_mode = +1, /* EXPLICIT tag at current level */ .tag_mode = +1, /* EXPLICIT tag at current level */
.type = (void *)&asn1_DEF_h, .type = (void *)&asn1_DEF_h,
...@@ -227,14 +227,14 @@ asn1_TYPE_descriptor_t asn1_DEF_b = { ...@@ -227,14 +227,14 @@ asn1_TYPE_descriptor_t asn1_DEF_b = {
}; };
static asn1_TYPE_member_t asn1_MBR_T[] = { static asn1_TYPE_member_t asn1_MBR_T[] = {
{ 0, offsetof(struct T, a), { ATF_NOFLAGS, 0, offsetof(struct T, a),
.tag = (ASN_TAG_CLASS_PRIVATE | (2 << 2)), .tag = (ASN_TAG_CLASS_PRIVATE | (2 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */ .tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn1_DEF_NULL, .type = (void *)&asn1_DEF_NULL,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "a" .name = "a"
}, },
{ 0, offsetof(struct T, b), { ATF_NOFLAGS, 0, offsetof(struct T, b),
.tag = -1 /* Ambiguous tag (CHOICE|ANY?) */, .tag = -1 /* Ambiguous tag (CHOICE|ANY?) */,
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_b, .type = (void *)&asn1_DEF_b,
......
...@@ -121,7 +121,7 @@ typedef struct ConstructedType { ...@@ -121,7 +121,7 @@ typedef struct ConstructedType {
/*** <<< STAT-DEFS [ConstructedType] >>> ***/ /*** <<< STAT-DEFS [ConstructedType] >>> ***/
static asn1_TYPE_member_t asn1_MBR_ConstructedType[] = { static asn1_TYPE_member_t asn1_MBR_ConstructedType[] = {
{ 0, offsetof(struct ConstructedType, field), { ATF_NOFLAGS, 0, offsetof(struct ConstructedType, field),
.tag = (ASN_TAG_CLASS_CONTEXT | (5 << 2)), .tag = (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */ .tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn1_DEF_PrimitiveType, .type = (void *)&asn1_DEF_PrimitiveType,
......
...@@ -36,7 +36,7 @@ typedef struct T1 { ...@@ -36,7 +36,7 @@ typedef struct T1 {
/*** <<< STAT-DEFS [T1] >>> ***/ /*** <<< STAT-DEFS [T1] >>> ***/
static asn1_TYPE_member_t asn1_MBR_T1[] = { static asn1_TYPE_member_t asn1_MBR_T1[] = {
{ 0, offsetof(struct T1, i), { ATF_NOFLAGS, 0, offsetof(struct T1, i),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_INTEGER, .type = (void *)&asn1_DEF_INTEGER,
...@@ -118,7 +118,7 @@ typedef struct T2 { ...@@ -118,7 +118,7 @@ typedef struct T2 {
/*** <<< STAT-DEFS [T2] >>> ***/ /*** <<< STAT-DEFS [T2] >>> ***/
static asn1_TYPE_member_t asn1_MBR_T2[] = { static asn1_TYPE_member_t asn1_MBR_T2[] = {
{ 0, offsetof(struct T2, i), { ATF_NOFLAGS, 0, offsetof(struct T2, i),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_INTEGER, .type = (void *)&asn1_DEF_INTEGER,
...@@ -197,7 +197,7 @@ typedef struct T3 { ...@@ -197,7 +197,7 @@ typedef struct T3 {
/*** <<< STAT-DEFS [T3] >>> ***/ /*** <<< STAT-DEFS [T3] >>> ***/
static asn1_TYPE_member_t asn1_MBR_T3[] = { static asn1_TYPE_member_t asn1_MBR_T3[] = {
{ 0, offsetof(struct T3, choice.i), { ATF_NOFLAGS, 0, offsetof(struct T3, choice.i),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_INTEGER, .type = (void *)&asn1_DEF_INTEGER,
...@@ -269,7 +269,7 @@ typedef struct T4 { ...@@ -269,7 +269,7 @@ typedef struct T4 {
/*** <<< STAT-DEFS [T4] >>> ***/ /*** <<< STAT-DEFS [T4] >>> ***/
static asn1_TYPE_member_t asn1_MBR_T4[] = { static asn1_TYPE_member_t asn1_MBR_T4[] = {
{ 0, offsetof(struct T4, choice.i), { ATF_NOFLAGS, 0, offsetof(struct T4, choice.i),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_INTEGER, .type = (void *)&asn1_DEF_INTEGER,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment