Skip to content
Snippets Groups Projects
Commit 154aa18d authored by Lev Walkin's avatar Lev Walkin
Browse files

type aliasing implemented; last_tag_form removed

parent 5e39cc3c
No related branches found
No related tags found
No related merge requests found
......@@ -122,7 +122,6 @@ asn1_TYPE_descriptor_t asn1_DEF_toBeSigned = {
asn1_DEF_toBeSigned_tags, /* Same as above */
sizeof(asn1_DEF_toBeSigned_tags)
/sizeof(asn1_DEF_toBeSigned_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_toBeSigned,
3, /* Elements count */
&asn1_DEF_toBeSigned_specs /* Additional specs */
......@@ -183,7 +182,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Certificate = {
asn1_DEF_Certificate_tags, /* Same as above */
sizeof(asn1_DEF_Certificate_tags)
/sizeof(asn1_DEF_Certificate_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_Certificate,
3, /* Elements count */
&asn1_DEF_Certificate_specs /* Additional specs */
......@@ -245,7 +243,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Name = {
asn1_DEF_Name_tags, /* Same as above */
sizeof(asn1_DEF_Name_tags)
/sizeof(asn1_DEF_Name_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_Name,
1, /* Single element */
&asn1_DEF_Name_specs /* Additional specs */
......@@ -362,7 +359,6 @@ asn1_TYPE_descriptor_t asn1_DEF_RelativeDistinguishedName = {
asn1_DEF_RelativeDistinguishedName_tags, /* Same as above */
sizeof(asn1_DEF_RelativeDistinguishedName_tags)
/sizeof(asn1_DEF_RelativeDistinguishedName_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_RelativeDistinguishedName,
1, /* Single element */
&asn1_DEF_RelativeDistinguishedName_specs /* Additional specs */
......
......@@ -54,7 +54,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Forest = {
asn1_DEF_Forest_tags, /* Same as above */
sizeof(asn1_DEF_Forest_tags)
/sizeof(asn1_DEF_Forest_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_Forest,
1, /* Single element */
&asn1_DEF_Forest_specs /* Additional specs */
......@@ -130,7 +129,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Tree = {
asn1_DEF_Tree_tags, /* Same as above */
sizeof(asn1_DEF_Tree_tags)
/sizeof(asn1_DEF_Tree_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_Tree,
2, /* Elements count */
&asn1_DEF_Tree_specs /* Additional specs */
......@@ -229,7 +227,6 @@ asn1_TYPE_descriptor_t asn1_DEF_trees = {
asn1_DEF_trees_tags, /* Same as above */
sizeof(asn1_DEF_trees_tags)
/sizeof(asn1_DEF_trees_tags[0]), /* 2 */
1, /* Whether CONSTRUCTED */
asn1_MBR_trees,
1, /* Single element */
&asn1_DEF_trees_specs /* Additional specs */
......@@ -275,7 +272,6 @@ asn1_TYPE_descriptor_t asn1_DEF_anything_member = {
asn1_DEF_anything_member_tags, /* Same as above */
sizeof(asn1_DEF_anything_member_tags)
/sizeof(asn1_DEF_anything_member_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_anything_member,
1, /* Elements count */
&asn1_DEF_anything_member_specs /* Additional specs */
......@@ -316,7 +312,6 @@ asn1_TYPE_descriptor_t asn1_DEF_anything = {
asn1_DEF_anything_tags, /* Same as above */
sizeof(asn1_DEF_anything_tags)
/sizeof(asn1_DEF_anything_tags[0]), /* 2 */
1, /* Whether CONSTRUCTED */
asn1_MBR_anything,
1, /* Single element */
&asn1_DEF_anything_specs /* Additional specs */
......@@ -373,7 +368,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Stuff = {
asn1_DEF_Stuff_tags, /* Same as above */
sizeof(asn1_DEF_Stuff_tags)
/sizeof(asn1_DEF_Stuff_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_Stuff,
2, /* Elements count */
&asn1_DEF_Stuff_specs /* Additional specs */
......
......@@ -54,7 +54,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Programming = {
asn1_DEF_Programming_tags, /* Same as above */
sizeof(asn1_DEF_Programming_tags)
/sizeof(asn1_DEF_Programming_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_Programming,
1, /* Single element */
&asn1_DEF_Programming_specs /* Additional specs */
......@@ -116,7 +115,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Fault = {
asn1_DEF_Fault_tags, /* Same as above */
sizeof(asn1_DEF_Fault_tags)
/sizeof(asn1_DEF_Fault_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_Fault,
1, /* Single element */
&asn1_DEF_Fault_specs /* Additional specs */
......@@ -175,7 +173,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Error = {
asn1_DEF_Error_tags, /* Same as above */
sizeof(asn1_DEF_Error_tags)
/sizeof(asn1_DEF_Error_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
0, 0, /* No members */
&asn1_DEF_Error_specs /* Additional specs */
};
......
......@@ -63,7 +63,6 @@ asn1_TYPE_descriptor_t asn1_DEF_collection = {
asn1_DEF_collection_tags, /* Same as above */
sizeof(asn1_DEF_collection_tags)
/sizeof(asn1_DEF_collection_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_collection,
1, /* Single element */
&asn1_DEF_collection_specs /* Additional specs */
......@@ -116,7 +115,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T = {
asn1_DEF_T_tags, /* Same as above */
sizeof(asn1_DEF_T_tags)
/sizeof(asn1_DEF_T_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_T,
2, /* Elements count */
&asn1_DEF_T_specs /* Additional specs */
......@@ -193,7 +191,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T2 = {
asn1_DEF_T2_tags, /* Same as above */
sizeof(asn1_DEF_T2_tags)
/sizeof(asn1_DEF_T2_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_T2,
2, /* Elements count */
&asn1_DEF_T2_specs /* Additional specs */
......
......@@ -99,7 +99,6 @@ asn1_TYPE_descriptor_t asn1_DEF_varsets = {
asn1_DEF_varsets_tags, /* Same as above */
sizeof(asn1_DEF_varsets_tags)
/sizeof(asn1_DEF_varsets_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_varsets,
1, /* Single element */
&asn1_DEF_varsets_specs /* Additional specs */
......@@ -152,7 +151,6 @@ asn1_TYPE_descriptor_t asn1_DEF_LogLine = {
asn1_DEF_LogLine_tags, /* Same as above */
sizeof(asn1_DEF_LogLine_tags)
/sizeof(asn1_DEF_LogLine_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_LogLine,
2, /* Elements count */
&asn1_DEF_LogLine_specs /* Additional specs */
......@@ -209,8 +207,7 @@ memb_vparts_2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
/* Nothing is here. See below */
}
return td->check_constraints
(td, sptr, app_errlog, app_key);
return td->check_constraints(td, sptr, app_errlog, app_key);
}
......@@ -250,7 +247,6 @@ asn1_TYPE_descriptor_t asn1_DEF_vparts = {
asn1_DEF_vparts_tags, /* Same as above */
sizeof(asn1_DEF_vparts_tags)
/sizeof(asn1_DEF_vparts_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_vparts,
1, /* Single element */
&asn1_DEF_vparts_specs /* Additional specs */
......@@ -303,7 +299,6 @@ asn1_TYPE_descriptor_t asn1_DEF_VariablePartSet = {
asn1_DEF_VariablePartSet_tags, /* Same as above */
sizeof(asn1_DEF_VariablePartSet_tags)
/sizeof(asn1_DEF_VariablePartSet_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_VariablePartSet,
2, /* Elements count */
&asn1_DEF_VariablePartSet_specs /* Additional specs */
......@@ -429,7 +424,6 @@ asn1_TYPE_descriptor_t asn1_DEF_vset = {
asn1_DEF_vset_tags, /* Same as above */
sizeof(asn1_DEF_vset_tags)
/sizeof(asn1_DEF_vset_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_vset,
1, /* Single element */
&asn1_DEF_vset_specs /* Additional specs */
......@@ -483,7 +477,6 @@ asn1_TYPE_descriptor_t asn1_DEF_vrange = {
asn1_DEF_vrange_tags, /* Same as above */
sizeof(asn1_DEF_vrange_tags)
/sizeof(asn1_DEF_vrange_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_vrange,
2, /* Elements count */
&asn1_DEF_vrange_specs /* Additional specs */
......@@ -532,7 +525,6 @@ asn1_TYPE_descriptor_t asn1_DEF_VariablePart = {
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
1, /* Whether CONSTRUCTED */
asn1_MBR_VariablePart,
2, /* Elements count */
&asn1_DEF_VariablePart_specs /* Additional specs */
......@@ -626,7 +618,6 @@ asn1_TYPE_descriptor_t asn1_DEF_email = {
asn1_DEF_email_tags, /* Same as above */
sizeof(asn1_DEF_email_tags)
/sizeof(asn1_DEF_email_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_email,
1, /* Single element */
&asn1_DEF_email_specs /* Additional specs */
......@@ -680,7 +671,6 @@ asn1_TYPE_descriptor_t asn1_DEF_notify = {
asn1_DEF_notify_tags, /* Same as above */
sizeof(asn1_DEF_notify_tags)
/sizeof(asn1_DEF_notify_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_notify,
2, /* Elements count */
&asn1_DEF_notify_specs /* Additional specs */
......@@ -733,7 +723,6 @@ asn1_TYPE_descriptor_t asn1_DEF_ActionItem = {
asn1_DEF_ActionItem_tags, /* Same as above */
sizeof(asn1_DEF_ActionItem_tags)
/sizeof(asn1_DEF_ActionItem_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_ActionItem,
2, /* Elements count */
&asn1_DEF_ActionItem_specs /* Additional specs */
......
......@@ -72,7 +72,6 @@ asn1_TYPE_descriptor_t asn1_DEF_t_member1 = {
asn1_DEF_t_member1_tags, /* Same as above */
sizeof(asn1_DEF_t_member1_tags)
/sizeof(asn1_DEF_t_member1_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_t_member1,
1, /* Single element */
&asn1_DEF_t_member1_specs /* Additional specs */
......@@ -112,7 +111,6 @@ asn1_TYPE_descriptor_t asn1_DEF_t_member2 = {
asn1_DEF_t_member2_tags, /* Same as above */
sizeof(asn1_DEF_t_member2_tags)
/sizeof(asn1_DEF_t_member2_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_t_member2,
1, /* Single element */
&asn1_DEF_t_member2_specs /* Additional specs */
......@@ -181,7 +179,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Test_structure_1 = {
asn1_DEF_Test_structure_1_tags, /* Same as above */
sizeof(asn1_DEF_Test_structure_1_tags)
/sizeof(asn1_DEF_Test_structure_1_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_Test_structure_1,
4, /* Elements count */
&asn1_DEF_Test_structure_1_specs /* Additional specs */
......@@ -265,7 +262,6 @@ asn1_TYPE_descriptor_t asn1_DEF_or = {
asn1_DEF_or_tags, /* Same as above */
sizeof(asn1_DEF_or_tags)
/sizeof(asn1_DEF_or_tags[0]), /* 2 */
1, /* Whether CONSTRUCTED */
asn1_MBR_or,
1, /* Single element */
&asn1_DEF_or_specs /* Additional specs */
......@@ -330,7 +326,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Choice_1 = {
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
1, /* Whether CONSTRUCTED */
asn1_MBR_Choice_1,
4, /* Elements count */
&asn1_DEF_Choice_1_specs /* Additional specs */
......
......@@ -112,7 +112,6 @@ asn1_TYPE_descriptor_t asn1_DEF_e = {
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
1, /* Whether CONSTRUCTED */
asn1_MBR_e,
2, /* Elements count */
&asn1_DEF_e_specs /* Additional specs */
......@@ -162,7 +161,6 @@ asn1_TYPE_descriptor_t asn1_DEF_h = {
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
1, /* Whether CONSTRUCTED */
asn1_MBR_h,
2, /* Elements count */
&asn1_DEF_h_specs /* Additional specs */
......@@ -229,7 +227,6 @@ asn1_TYPE_descriptor_t asn1_DEF_b = {
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
1, /* Whether CONSTRUCTED */
asn1_MBR_b,
4, /* Elements count */
&asn1_DEF_b_specs /* Additional specs */
......@@ -287,7 +284,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T = {
asn1_DEF_T_tags, /* Same as above */
sizeof(asn1_DEF_T_tags)
/sizeof(asn1_DEF_T_tags[0]), /* 2 */
1, /* Whether CONSTRUCTED */
asn1_MBR_T,
2, /* Elements count */
&asn1_DEF_T_specs /* Additional specs */
......
......@@ -10,107 +10,12 @@ typedef OCTET_STRING_t PrimitiveType_t;
/*** <<< FUNC-DECLS [PrimitiveType] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_PrimitiveType;
asn_struct_free_f PrimitiveType_free;
asn_struct_print_f PrimitiveType_print;
asn_constr_check_f PrimitiveType_constraint;
ber_type_decoder_f PrimitiveType_decode_ber;
der_type_encoder_f PrimitiveType_encode_der;
xer_type_encoder_f PrimitiveType_encode_xer;
/* This type is equivalent to OCTET_STRING */
#define asn1_DEF_PrimitiveType asn1_DEF_OCTET_STRING
/*** <<< CODE [PrimitiveType] >>> ***/
int
PrimitiveType_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
/* Make the underlying type checker permanent */
td->check_constraints = asn1_DEF_OCTET_STRING.check_constraints;
return td->check_constraints
(td, sptr, app_errlog, app_key);
}
/*
* This type is implemented using OCTET_STRING,
* so here we adjust the DEF accordingly.
*/
static void
PrimitiveType_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) {
td->free_struct = asn1_DEF_OCTET_STRING.free_struct;
td->print_struct = asn1_DEF_OCTET_STRING.print_struct;
td->ber_decoder = asn1_DEF_OCTET_STRING.ber_decoder;
td->der_encoder = asn1_DEF_OCTET_STRING.der_encoder;
td->xer_decoder = asn1_DEF_OCTET_STRING.xer_decoder;
td->xer_encoder = asn1_DEF_OCTET_STRING.xer_encoder;
td->last_tag_form = asn1_DEF_OCTET_STRING.last_tag_form;
td->elements = asn1_DEF_OCTET_STRING.elements;
td->elements_count = asn1_DEF_OCTET_STRING.elements_count;
td->specifics = asn1_DEF_OCTET_STRING.specifics;
}
void
PrimitiveType_free(asn1_TYPE_descriptor_t *td,
void *struct_ptr, int contents_only) {
PrimitiveType_inherit_TYPE_descriptor(td);
td->free_struct(td, struct_ptr, contents_only);
}
int
PrimitiveType_print(asn1_TYPE_descriptor_t *td, const void *struct_ptr,
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
PrimitiveType_inherit_TYPE_descriptor(td);
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
}
ber_dec_rval_t
PrimitiveType_decode_ber(asn1_TYPE_descriptor_t *td,
void **structure, void *bufptr, size_t size, int tag_mode) {
PrimitiveType_inherit_TYPE_descriptor(td);
return td->ber_decoder(td, structure, bufptr, size, tag_mode);
}
asn_enc_rval_t
PrimitiveType_encode_der(asn1_TYPE_descriptor_t *td,
void *structure, int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) {
PrimitiveType_inherit_TYPE_descriptor(td);
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
}
asn_enc_rval_t
PrimitiveType_encode_xer(asn1_TYPE_descriptor_t *td, void *structure,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
PrimitiveType_inherit_TYPE_descriptor(td);
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
}
/*** <<< STAT-DEFS [PrimitiveType] >>> ***/
static ber_tlv_tag_t asn1_DEF_PrimitiveType_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2))
};
asn1_TYPE_descriptor_t asn1_DEF_PrimitiveType = {
"PrimitiveType",
PrimitiveType_free,
PrimitiveType_print,
PrimitiveType_constraint,
PrimitiveType_decode_ber,
PrimitiveType_encode_der,
0, /* Not implemented yet */
PrimitiveType_encode_xer,
0, /* Use generic outmost tag fetcher */
asn1_DEF_PrimitiveType_tags,
sizeof(asn1_DEF_PrimitiveType_tags)
/sizeof(asn1_DEF_PrimitiveType_tags[0]), /* 1 */
asn1_DEF_PrimitiveType_tags, /* Same as above */
sizeof(asn1_DEF_PrimitiveType_tags)
/sizeof(asn1_DEF_PrimitiveType_tags[0]), /* 1 */
-0, /* Unknown yet */
0, 0, /* No members */
0 /* No specifics */
};
/* This type is equivalent to OCTET_STRING */
/*** <<< INCLUDES [ConstructedType] >>> ***/
......@@ -173,7 +78,6 @@ asn1_TYPE_descriptor_t asn1_DEF_ConstructedType = {
asn1_DEF_ConstructedType_tags, /* Same as above */
sizeof(asn1_DEF_ConstructedType_tags)
/sizeof(asn1_DEF_ConstructedType_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_ConstructedType,
1, /* Elements count */
&asn1_DEF_ConstructedType_specs /* Additional specs */
......@@ -204,11 +108,9 @@ xer_type_encoder_f T_encode_xer;
int
T_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
/* Make the underlying type checker permanent */
/* Replace with underlying type checker */
td->check_constraints = asn1_DEF_ConstructedType.check_constraints;
return td->check_constraints
(td, sptr, app_errlog, app_key);
return td->check_constraints(td, sptr, app_errlog, app_key);
}
/*
......@@ -223,7 +125,6 @@ T_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) {
td->der_encoder = asn1_DEF_ConstructedType.der_encoder;
td->xer_decoder = asn1_DEF_ConstructedType.xer_decoder;
td->xer_encoder = asn1_DEF_ConstructedType.xer_encoder;
td->last_tag_form = asn1_DEF_ConstructedType.last_tag_form;
td->elements = asn1_DEF_ConstructedType.elements;
td->elements_count = asn1_DEF_ConstructedType.elements_count;
td->specifics = asn1_DEF_ConstructedType.specifics;
......@@ -289,7 +190,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T = {
asn1_DEF_T_tags, /* Same as above */
sizeof(asn1_DEF_T_tags)
/sizeof(asn1_DEF_T_tags[0]), /* 2 */
-0, /* Unknown yet */
0, 0, /* Defined elsewhere */
0 /* No specifics */
};
......
......@@ -78,7 +78,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T1 = {
asn1_DEF_T1_tags, /* Same as above */
sizeof(asn1_DEF_T1_tags)
/sizeof(asn1_DEF_T1_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_T1,
1, /* Elements count */
&asn1_DEF_T1_specs /* Additional specs */
......@@ -164,7 +163,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T2 = {
asn1_DEF_T2_tags, /* Same as above */
sizeof(asn1_DEF_T2_tags)
/sizeof(asn1_DEF_T2_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_T2,
1, /* Elements count */
&asn1_DEF_T2_specs /* Additional specs */
......@@ -239,7 +237,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T3 = {
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
1, /* Whether CONSTRUCTED */
asn1_MBR_T3,
1, /* Elements count */
&asn1_DEF_T3_specs /* Additional specs */
......@@ -314,7 +311,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T4 = {
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
1, /* Whether CONSTRUCTED */
asn1_MBR_T4,
1, /* Elements count */
&asn1_DEF_T4_specs /* Additional specs */
......
This diff is collapsed.
......@@ -68,7 +68,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T1 = {
asn1_DEF_T1_tags, /* Same as above */
sizeof(asn1_DEF_T1_tags)
/sizeof(asn1_DEF_T1_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_T1,
2, /* Elements count */
&asn1_DEF_T1_specs /* Additional specs */
......@@ -145,7 +144,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T2 = {
asn1_DEF_T2_tags, /* Same as above */
sizeof(asn1_DEF_T2_tags)
/sizeof(asn1_DEF_T2_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_T2,
2, /* Elements count */
&asn1_DEF_T2_specs /* Additional specs */
......
......@@ -23,11 +23,9 @@ xer_type_encoder_f T1_encode_xer;
int
T1_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
/* Make the underlying type checker permanent */
/* Replace with underlying type checker */
td->check_constraints = asn1_DEF_T2.check_constraints;
return td->check_constraints
(td, sptr, app_errlog, app_key);
return td->check_constraints(td, sptr, app_errlog, app_key);
}
/*
......@@ -42,7 +40,6 @@ T1_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) {
td->der_encoder = asn1_DEF_T2.der_encoder;
td->xer_decoder = asn1_DEF_T2.xer_decoder;
td->xer_encoder = asn1_DEF_T2.xer_encoder;
td->last_tag_form = asn1_DEF_T2.last_tag_form;
td->elements = asn1_DEF_T2.elements;
td->elements_count = asn1_DEF_T2.elements_count;
td->specifics = asn1_DEF_T2.specifics;
......@@ -118,7 +115,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T1 = {
asn1_DEF_T1_all_tags,
sizeof(asn1_DEF_T1_all_tags)
/sizeof(asn1_DEF_T1_all_tags[0]), /* 6 */
-0, /* Unknown yet */
0, 0, /* No members */
0 /* No specifics */
};
......@@ -148,11 +144,9 @@ xer_type_encoder_f T2_encode_xer;
int
T2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
/* Make the underlying type checker permanent */
/* Replace with underlying type checker */
td->check_constraints = asn1_DEF_T3.check_constraints;
return td->check_constraints
(td, sptr, app_errlog, app_key);
return td->check_constraints(td, sptr, app_errlog, app_key);
}
/*
......@@ -167,7 +161,6 @@ T2_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) {
td->der_encoder = asn1_DEF_T3.der_encoder;
td->xer_decoder = asn1_DEF_T3.xer_decoder;
td->xer_encoder = asn1_DEF_T3.xer_encoder;
td->last_tag_form = asn1_DEF_T3.last_tag_form;
td->elements = asn1_DEF_T3.elements;
td->elements_count = asn1_DEF_T3.elements_count;
td->specifics = asn1_DEF_T3.specifics;
......@@ -241,7 +234,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T2 = {
asn1_DEF_T2_all_tags,
sizeof(asn1_DEF_T2_all_tags)
/sizeof(asn1_DEF_T2_all_tags[0]), /* 5 */
-0, /* Unknown yet */
0, 0, /* No members */
0 /* No specifics */
};
......@@ -271,11 +263,9 @@ xer_type_encoder_f T3_encode_xer;
int
T3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
/* Make the underlying type checker permanent */
/* Replace with underlying type checker */
td->check_constraints = asn1_DEF_T4.check_constraints;
return td->check_constraints
(td, sptr, app_errlog, app_key);
return td->check_constraints(td, sptr, app_errlog, app_key);
}
/*
......@@ -290,7 +280,6 @@ T3_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) {
td->der_encoder = asn1_DEF_T4.der_encoder;
td->xer_decoder = asn1_DEF_T4.xer_decoder;
td->xer_encoder = asn1_DEF_T4.xer_encoder;
td->last_tag_form = asn1_DEF_T4.last_tag_form;
td->elements = asn1_DEF_T4.elements;
td->elements_count = asn1_DEF_T4.elements_count;
td->specifics = asn1_DEF_T4.specifics;
......@@ -362,7 +351,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T3 = {
asn1_DEF_T3_all_tags,
sizeof(asn1_DEF_T3_all_tags)
/sizeof(asn1_DEF_T3_all_tags[0]), /* 4 */
-0, /* Unknown yet */
0, 0, /* No members */
0 /* No specifics */
};
......@@ -392,11 +380,9 @@ xer_type_encoder_f T4_encode_xer;
int
T4_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
/* Make the underlying type checker permanent */
/* Replace with underlying type checker */
td->check_constraints = asn1_DEF_T5.check_constraints;
return td->check_constraints
(td, sptr, app_errlog, app_key);
return td->check_constraints(td, sptr, app_errlog, app_key);
}
/*
......@@ -411,7 +397,6 @@ T4_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) {
td->der_encoder = asn1_DEF_T5.der_encoder;
td->xer_decoder = asn1_DEF_T5.xer_decoder;
td->xer_encoder = asn1_DEF_T5.xer_encoder;
td->last_tag_form = asn1_DEF_T5.last_tag_form;
td->elements = asn1_DEF_T5.elements;
td->elements_count = asn1_DEF_T5.elements_count;
td->specifics = asn1_DEF_T5.specifics;
......@@ -478,7 +463,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T4 = {
asn1_DEF_T4_tags, /* Same as above */
sizeof(asn1_DEF_T4_tags)
/sizeof(asn1_DEF_T4_tags[0]), /* 3 */
-0, /* Unknown yet */
0, 0, /* No members */
0 /* No specifics */
};
......@@ -508,11 +492,9 @@ xer_type_encoder_f T5_encode_xer;
int
T5_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
/* Make the underlying type checker permanent */
/* Replace with underlying type checker */
td->check_constraints = asn1_DEF_T6.check_constraints;
return td->check_constraints
(td, sptr, app_errlog, app_key);
return td->check_constraints(td, sptr, app_errlog, app_key);
}
/*
......@@ -527,7 +509,6 @@ T5_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) {
td->der_encoder = asn1_DEF_T6.der_encoder;
td->xer_decoder = asn1_DEF_T6.xer_decoder;
td->xer_encoder = asn1_DEF_T6.xer_encoder;
td->last_tag_form = asn1_DEF_T6.last_tag_form;
td->elements = asn1_DEF_T6.elements;
td->elements_count = asn1_DEF_T6.elements_count;
td->specifics = asn1_DEF_T6.specifics;
......@@ -593,7 +574,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T5 = {
asn1_DEF_T5_tags, /* Same as above */
sizeof(asn1_DEF_T5_tags)
/sizeof(asn1_DEF_T5_tags[0]), /* 2 */
-0, /* Unknown yet */
0, 0, /* No members */
0 /* No specifics */
};
......@@ -610,107 +590,12 @@ typedef REAL_t T6_t;
/*** <<< FUNC-DECLS [T6] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_T6;
asn_struct_free_f T6_free;
asn_struct_print_f T6_print;
asn_constr_check_f T6_constraint;
ber_type_decoder_f T6_decode_ber;
der_type_encoder_f T6_encode_der;
xer_type_encoder_f T6_encode_xer;
/* This type is equivalent to REAL */
#define asn1_DEF_T6 asn1_DEF_REAL
/*** <<< CODE [T6] >>> ***/
int
T6_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
/* Make the underlying type checker permanent */
td->check_constraints = asn1_DEF_REAL.check_constraints;
return td->check_constraints
(td, sptr, app_errlog, app_key);
}
/*
* This type is implemented using REAL,
* so here we adjust the DEF accordingly.
*/
static void
T6_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) {
td->free_struct = asn1_DEF_REAL.free_struct;
td->print_struct = asn1_DEF_REAL.print_struct;
td->ber_decoder = asn1_DEF_REAL.ber_decoder;
td->der_encoder = asn1_DEF_REAL.der_encoder;
td->xer_decoder = asn1_DEF_REAL.xer_decoder;
td->xer_encoder = asn1_DEF_REAL.xer_encoder;
td->last_tag_form = asn1_DEF_REAL.last_tag_form;
td->elements = asn1_DEF_REAL.elements;
td->elements_count = asn1_DEF_REAL.elements_count;
td->specifics = asn1_DEF_REAL.specifics;
}
void
T6_free(asn1_TYPE_descriptor_t *td,
void *struct_ptr, int contents_only) {
T6_inherit_TYPE_descriptor(td);
td->free_struct(td, struct_ptr, contents_only);
}
int
T6_print(asn1_TYPE_descriptor_t *td, const void *struct_ptr,
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
T6_inherit_TYPE_descriptor(td);
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
}
ber_dec_rval_t
T6_decode_ber(asn1_TYPE_descriptor_t *td,
void **structure, void *bufptr, size_t size, int tag_mode) {
T6_inherit_TYPE_descriptor(td);
return td->ber_decoder(td, structure, bufptr, size, tag_mode);
}
asn_enc_rval_t
T6_encode_der(asn1_TYPE_descriptor_t *td,
void *structure, int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) {
T6_inherit_TYPE_descriptor(td);
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
}
asn_enc_rval_t
T6_encode_xer(asn1_TYPE_descriptor_t *td, void *structure,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
T6_inherit_TYPE_descriptor(td);
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
}
/*** <<< STAT-DEFS [T6] >>> ***/
static ber_tlv_tag_t asn1_DEF_T6_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
};
asn1_TYPE_descriptor_t asn1_DEF_T6 = {
"T6",
T6_free,
T6_print,
T6_constraint,
T6_decode_ber,
T6_encode_der,
0, /* Not implemented yet */
T6_encode_xer,
0, /* Use generic outmost tag fetcher */
asn1_DEF_T6_tags,
sizeof(asn1_DEF_T6_tags)
/sizeof(asn1_DEF_T6_tags[0]), /* 1 */
asn1_DEF_T6_tags, /* Same as above */
sizeof(asn1_DEF_T6_tags)
/sizeof(asn1_DEF_T6_tags[0]), /* 1 */
-0, /* Unknown yet */
0, 0, /* No members */
0 /* No specifics */
};
/* This type is equivalent to REAL */
/*** <<< INCLUDES [T] >>> ***/
......@@ -737,11 +622,9 @@ xer_type_encoder_f T_encode_xer;
int
T_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
/* Make the underlying type checker permanent */
/* Replace with underlying type checker */
td->check_constraints = asn1_DEF_Ts.check_constraints;
return td->check_constraints
(td, sptr, app_errlog, app_key);
return td->check_constraints(td, sptr, app_errlog, app_key);
}
/*
......@@ -756,7 +639,6 @@ T_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) {
td->der_encoder = asn1_DEF_Ts.der_encoder;
td->xer_decoder = asn1_DEF_Ts.xer_decoder;
td->xer_encoder = asn1_DEF_Ts.xer_encoder;
td->last_tag_form = asn1_DEF_Ts.last_tag_form;
td->elements = asn1_DEF_Ts.elements;
td->elements_count = asn1_DEF_Ts.elements_count;
td->specifics = asn1_DEF_Ts.specifics;
......@@ -823,7 +705,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T = {
asn1_DEF_T_tags, /* Same as above */
sizeof(asn1_DEF_T_tags)
/sizeof(asn1_DEF_T_tags[0]), /* 3 */
-0, /* Unknown yet */
0, 0, /* Defined elsewhere */
0 /* No specifics */
};
......@@ -909,7 +790,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Ts = {
asn1_DEF_Ts_tags, /* Same as above */
sizeof(asn1_DEF_Ts_tags)
/sizeof(asn1_DEF_Ts_tags[0]), /* 2 */
1, /* Whether CONSTRUCTED */
asn1_MBR_Ts,
3, /* Elements count */
&asn1_DEF_Ts_specs /* Additional specs */
......
......@@ -23,11 +23,9 @@ xer_type_encoder_f T1_encode_xer;
int
T1_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
/* Make the underlying type checker permanent */
/* Replace with underlying type checker */
td->check_constraints = asn1_DEF_T2.check_constraints;
return td->check_constraints
(td, sptr, app_errlog, app_key);
return td->check_constraints(td, sptr, app_errlog, app_key);
}
/*
......@@ -42,7 +40,6 @@ T1_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) {
td->der_encoder = asn1_DEF_T2.der_encoder;
td->xer_decoder = asn1_DEF_T2.xer_decoder;
td->xer_encoder = asn1_DEF_T2.xer_encoder;
td->last_tag_form = asn1_DEF_T2.last_tag_form;
td->elements = asn1_DEF_T2.elements;
td->elements_count = asn1_DEF_T2.elements_count;
td->specifics = asn1_DEF_T2.specifics;
......@@ -118,7 +115,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T1 = {
asn1_DEF_T1_all_tags,
sizeof(asn1_DEF_T1_all_tags)
/sizeof(asn1_DEF_T1_all_tags[0]), /* 6 */
-0, /* Unknown yet */
0, 0, /* No members */
0 /* No specifics */
};
......@@ -148,11 +144,9 @@ xer_type_encoder_f T2_encode_xer;
int
T2_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
/* Make the underlying type checker permanent */
/* Replace with underlying type checker */
td->check_constraints = asn1_DEF_T3.check_constraints;
return td->check_constraints
(td, sptr, app_errlog, app_key);
return td->check_constraints(td, sptr, app_errlog, app_key);
}
/*
......@@ -167,7 +161,6 @@ T2_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) {
td->der_encoder = asn1_DEF_T3.der_encoder;
td->xer_decoder = asn1_DEF_T3.xer_decoder;
td->xer_encoder = asn1_DEF_T3.xer_encoder;
td->last_tag_form = asn1_DEF_T3.last_tag_form;
td->elements = asn1_DEF_T3.elements;
td->elements_count = asn1_DEF_T3.elements_count;
td->specifics = asn1_DEF_T3.specifics;
......@@ -241,7 +234,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T2 = {
asn1_DEF_T2_all_tags,
sizeof(asn1_DEF_T2_all_tags)
/sizeof(asn1_DEF_T2_all_tags[0]), /* 5 */
-0, /* Unknown yet */
0, 0, /* No members */
0 /* No specifics */
};
......@@ -271,11 +263,9 @@ xer_type_encoder_f T3_encode_xer;
int
T3_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
/* Make the underlying type checker permanent */
/* Replace with underlying type checker */
td->check_constraints = asn1_DEF_T4.check_constraints;
return td->check_constraints
(td, sptr, app_errlog, app_key);
return td->check_constraints(td, sptr, app_errlog, app_key);
}
/*
......@@ -290,7 +280,6 @@ T3_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) {
td->der_encoder = asn1_DEF_T4.der_encoder;
td->xer_decoder = asn1_DEF_T4.xer_decoder;
td->xer_encoder = asn1_DEF_T4.xer_encoder;
td->last_tag_form = asn1_DEF_T4.last_tag_form;
td->elements = asn1_DEF_T4.elements;
td->elements_count = asn1_DEF_T4.elements_count;
td->specifics = asn1_DEF_T4.specifics;
......@@ -362,7 +351,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T3 = {
asn1_DEF_T3_all_tags,
sizeof(asn1_DEF_T3_all_tags)
/sizeof(asn1_DEF_T3_all_tags[0]), /* 4 */
-0, /* Unknown yet */
0, 0, /* No members */
0 /* No specifics */
};
......@@ -392,11 +380,9 @@ xer_type_encoder_f T4_encode_xer;
int
T4_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
/* Make the underlying type checker permanent */
/* Replace with underlying type checker */
td->check_constraints = asn1_DEF_T5.check_constraints;
return td->check_constraints
(td, sptr, app_errlog, app_key);
return td->check_constraints(td, sptr, app_errlog, app_key);
}
/*
......@@ -411,7 +397,6 @@ T4_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) {
td->der_encoder = asn1_DEF_T5.der_encoder;
td->xer_decoder = asn1_DEF_T5.xer_decoder;
td->xer_encoder = asn1_DEF_T5.xer_encoder;
td->last_tag_form = asn1_DEF_T5.last_tag_form;
td->elements = asn1_DEF_T5.elements;
td->elements_count = asn1_DEF_T5.elements_count;
td->specifics = asn1_DEF_T5.specifics;
......@@ -478,7 +463,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T4 = {
asn1_DEF_T4_tags, /* Same as above */
sizeof(asn1_DEF_T4_tags)
/sizeof(asn1_DEF_T4_tags[0]), /* 3 */
-0, /* Unknown yet */
0, 0, /* No members */
0 /* No specifics */
};
......@@ -508,11 +492,9 @@ xer_type_encoder_f T5_encode_xer;
int
T5_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
/* Make the underlying type checker permanent */
/* Replace with underlying type checker */
td->check_constraints = asn1_DEF_T6.check_constraints;
return td->check_constraints
(td, sptr, app_errlog, app_key);
return td->check_constraints(td, sptr, app_errlog, app_key);
}
/*
......@@ -527,7 +509,6 @@ T5_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) {
td->der_encoder = asn1_DEF_T6.der_encoder;
td->xer_decoder = asn1_DEF_T6.xer_decoder;
td->xer_encoder = asn1_DEF_T6.xer_encoder;
td->last_tag_form = asn1_DEF_T6.last_tag_form;
td->elements = asn1_DEF_T6.elements;
td->elements_count = asn1_DEF_T6.elements_count;
td->specifics = asn1_DEF_T6.specifics;
......@@ -593,7 +574,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T5 = {
asn1_DEF_T5_tags, /* Same as above */
sizeof(asn1_DEF_T5_tags)
/sizeof(asn1_DEF_T5_tags[0]), /* 2 */
-0, /* Unknown yet */
0, 0, /* No members */
0 /* No specifics */
};
......@@ -610,107 +590,12 @@ typedef double T6_t;
/*** <<< FUNC-DECLS [T6] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_T6;
asn_struct_free_f T6_free;
asn_struct_print_f T6_print;
asn_constr_check_f T6_constraint;
ber_type_decoder_f T6_decode_ber;
der_type_encoder_f T6_encode_der;
xer_type_encoder_f T6_encode_xer;
/* This type is equivalent to NativeReal */
#define asn1_DEF_T6 asn1_DEF_NativeReal
/*** <<< CODE [T6] >>> ***/
int
T6_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
/* Make the underlying type checker permanent */
td->check_constraints = asn1_DEF_NativeReal.check_constraints;
return td->check_constraints
(td, sptr, app_errlog, app_key);
}
/*
* This type is implemented using NativeReal,
* so here we adjust the DEF accordingly.
*/
static void
T6_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) {
td->free_struct = asn1_DEF_NativeReal.free_struct;
td->print_struct = asn1_DEF_NativeReal.print_struct;
td->ber_decoder = asn1_DEF_NativeReal.ber_decoder;
td->der_encoder = asn1_DEF_NativeReal.der_encoder;
td->xer_decoder = asn1_DEF_NativeReal.xer_decoder;
td->xer_encoder = asn1_DEF_NativeReal.xer_encoder;
td->last_tag_form = asn1_DEF_NativeReal.last_tag_form;
td->elements = asn1_DEF_NativeReal.elements;
td->elements_count = asn1_DEF_NativeReal.elements_count;
td->specifics = asn1_DEF_NativeReal.specifics;
}
void
T6_free(asn1_TYPE_descriptor_t *td,
void *struct_ptr, int contents_only) {
T6_inherit_TYPE_descriptor(td);
td->free_struct(td, struct_ptr, contents_only);
}
int
T6_print(asn1_TYPE_descriptor_t *td, const void *struct_ptr,
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
T6_inherit_TYPE_descriptor(td);
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
}
ber_dec_rval_t
T6_decode_ber(asn1_TYPE_descriptor_t *td,
void **structure, void *bufptr, size_t size, int tag_mode) {
T6_inherit_TYPE_descriptor(td);
return td->ber_decoder(td, structure, bufptr, size, tag_mode);
}
asn_enc_rval_t
T6_encode_der(asn1_TYPE_descriptor_t *td,
void *structure, int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) {
T6_inherit_TYPE_descriptor(td);
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
}
asn_enc_rval_t
T6_encode_xer(asn1_TYPE_descriptor_t *td, void *structure,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
T6_inherit_TYPE_descriptor(td);
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
}
/*** <<< STAT-DEFS [T6] >>> ***/
static ber_tlv_tag_t asn1_DEF_T6_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
};
asn1_TYPE_descriptor_t asn1_DEF_T6 = {
"T6",
T6_free,
T6_print,
T6_constraint,
T6_decode_ber,
T6_encode_der,
0, /* Not implemented yet */
T6_encode_xer,
0, /* Use generic outmost tag fetcher */
asn1_DEF_T6_tags,
sizeof(asn1_DEF_T6_tags)
/sizeof(asn1_DEF_T6_tags[0]), /* 1 */
asn1_DEF_T6_tags, /* Same as above */
sizeof(asn1_DEF_T6_tags)
/sizeof(asn1_DEF_T6_tags[0]), /* 1 */
-0, /* Unknown yet */
0, 0, /* No members */
0 /* No specifics */
};
/* This type is equivalent to NativeReal */
/*** <<< INCLUDES [T] >>> ***/
......@@ -737,11 +622,9 @@ xer_type_encoder_f T_encode_xer;
int
T_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
/* Make the underlying type checker permanent */
/* Replace with underlying type checker */
td->check_constraints = asn1_DEF_Ts.check_constraints;
return td->check_constraints
(td, sptr, app_errlog, app_key);
return td->check_constraints(td, sptr, app_errlog, app_key);
}
/*
......@@ -756,7 +639,6 @@ T_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) {
td->der_encoder = asn1_DEF_Ts.der_encoder;
td->xer_decoder = asn1_DEF_Ts.xer_decoder;
td->xer_encoder = asn1_DEF_Ts.xer_encoder;
td->last_tag_form = asn1_DEF_Ts.last_tag_form;
td->elements = asn1_DEF_Ts.elements;
td->elements_count = asn1_DEF_Ts.elements_count;
td->specifics = asn1_DEF_Ts.specifics;
......@@ -823,7 +705,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T = {
asn1_DEF_T_tags, /* Same as above */
sizeof(asn1_DEF_T_tags)
/sizeof(asn1_DEF_T_tags[0]), /* 3 */
-0, /* Unknown yet */
0, 0, /* Defined elsewhere */
0 /* No specifics */
};
......@@ -909,7 +790,6 @@ asn1_TYPE_descriptor_t asn1_DEF_Ts = {
asn1_DEF_Ts_tags, /* Same as above */
sizeof(asn1_DEF_Ts_tags)
/sizeof(asn1_DEF_Ts_tags[0]), /* 2 */
1, /* Whether CONSTRUCTED */
asn1_MBR_Ts,
3, /* Elements count */
&asn1_DEF_Ts_specs /* Additional specs */
......
......@@ -54,7 +54,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T = {
asn1_DEF_T_tags, /* Same as above */
sizeof(asn1_DEF_T_tags)
/sizeof(asn1_DEF_T_tags[0]), /* 1 */
1, /* Whether CONSTRUCTED */
asn1_MBR_T,
1, /* Single element */
&asn1_DEF_T_specs /* Additional specs */
......@@ -93,11 +92,9 @@ xer_type_encoder_f SimpleType_encode_xer;
int
SimpleType_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
/* Make the underlying type checker permanent */
/* Replace with underlying type checker */
td->check_constraints = asn1_DEF_ENUMERATED.check_constraints;
return td->check_constraints
(td, sptr, app_errlog, app_key);
return td->check_constraints(td, sptr, app_errlog, app_key);
}
/*
......@@ -112,7 +109,6 @@ SimpleType_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) {
td->der_encoder = asn1_DEF_ENUMERATED.der_encoder;
td->xer_decoder = asn1_DEF_ENUMERATED.xer_decoder;
td->xer_encoder = asn1_DEF_ENUMERATED.xer_encoder;
td->last_tag_form = asn1_DEF_ENUMERATED.last_tag_form;
td->elements = asn1_DEF_ENUMERATED.elements;
td->elements_count = asn1_DEF_ENUMERATED.elements_count;
td->specifics = asn1_DEF_ENUMERATED.specifics;
......@@ -177,7 +173,6 @@ asn1_TYPE_descriptor_t asn1_DEF_SimpleType = {
asn1_DEF_SimpleType_tags, /* Same as above */
sizeof(asn1_DEF_SimpleType_tags)
/sizeof(asn1_DEF_SimpleType_tags[0]), /* 1 */
-0, /* Unknown yet */
0, 0, /* No members */
0 /* No specifics */
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment