mirror of https://gerrit.osmocom.org/asn1c
Merge branch 'master' of github.com:vlm/asn1c
This commit is contained in:
commit
7765d4171a
|
@ -1416,10 +1416,10 @@ asn1c_lang_C_type_SIMPLE_TYPE(arg_t *arg) {
|
|||
DEBUG("expr constraint checking code for %s", p);
|
||||
if(asn1c_emit_constraint_checking_code(arg) == 1) {
|
||||
OUT("/* Replace with underlying type checker */\n");
|
||||
OUT("td->check_constraints "
|
||||
"= asn_DEF_%s.check_constraints;\n",
|
||||
asn1c_type_name(arg, expr, TNF_SAFE));
|
||||
OUT("return td->check_constraints"
|
||||
// OUT("td->check_constraints "
|
||||
// "= asn_DEF_%s.check_constraints;\n",
|
||||
// asn1c_type_name(arg, expr, TNF_SAFE));
|
||||
OUT("return td->op->check_constraints"
|
||||
"(td, sptr, ctfailcb, app_key);\n");
|
||||
}
|
||||
INDENT(-1);
|
||||
|
@ -2917,7 +2917,7 @@ emit_member_type_selector(arg_t *arg, asn1p_expr_t *expr, asn1c_ioc_table_and_ob
|
|||
OUT(" const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];\n");
|
||||
OUT(" const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];\n");
|
||||
OUT("\n");
|
||||
OUT(" if(constraining_cell->type_descriptor->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {\n");
|
||||
OUT(" if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {\n");
|
||||
OUT(" result.type_descriptor = type_cell->type_descriptor;\n");
|
||||
OUT(" result.presence_index = row + 1;\n");
|
||||
OUT(" break;\n");
|
||||
|
@ -3199,9 +3199,7 @@ do { \
|
|||
OUT("_" #foo ",\n"); \
|
||||
} while(0)
|
||||
|
||||
FUNCREF2(free);
|
||||
FUNCREF2(print);
|
||||
FUNCREF2(compare);
|
||||
OUT("&asn_OP_%s,\n", p2);
|
||||
if (arg->flags & A1C_NO_CONSTRAINTS)
|
||||
OUT("0,\t/* No check because of -fno-constraints */\n");
|
||||
else
|
||||
|
@ -3211,34 +3209,8 @@ do { \
|
|||
else
|
||||
FUNCREF(constraint);
|
||||
}
|
||||
FUNCREF2(decode_ber);
|
||||
FUNCREF2(encode_der);
|
||||
FUNCREF2(decode_xer);
|
||||
FUNCREF2(encode_xer);
|
||||
|
||||
if(arg->flags & A1C_GEN_OER) {
|
||||
FUNCREF2(decode_oer);
|
||||
FUNCREF2(encode_oer);
|
||||
} else {
|
||||
OUT("0, 0,\t/* No OER support, "
|
||||
"use \"-gen-OER\" to enable */\n");
|
||||
}
|
||||
if(arg->flags & A1C_GEN_PER) {
|
||||
FUNCREF2(decode_uper);
|
||||
FUNCREF2(encode_uper);
|
||||
} else {
|
||||
OUT("0, 0,\t/* No PER support, "
|
||||
"use \"-gen-PER\" to enable */\n");
|
||||
}
|
||||
if (p2) free(p2);
|
||||
|
||||
if(!terminal || terminal->expr_type == ASN_CONSTR_CHOICE) {
|
||||
//if(expr->expr_type == ASN_CONSTR_CHOICE) {
|
||||
OUT("CHOICE_outmost_tag,\n");
|
||||
} else {
|
||||
OUT("0,\t/* Use generic outmost tag fetcher */\n");
|
||||
}
|
||||
|
||||
p = MKID(expr);
|
||||
if(tags_count) {
|
||||
OUT("asn_DEF_%s_tags_%d,\n",
|
||||
|
|
|
@ -11,9 +11,7 @@ asn_OCTET_STRING_specifics_t asn_SPC_ANY_specs = {
|
|||
offsetof(ANY_t, _asn_ctx),
|
||||
ASN_OSUBV_ANY
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_ANY = {
|
||||
"ANY",
|
||||
"ANY",
|
||||
asn_TYPE_operation_t asn_OP_ANY = {
|
||||
OCTET_STRING_free,
|
||||
OCTET_STRING_print,
|
||||
OCTET_STRING_compare,
|
||||
|
@ -32,10 +30,16 @@ asn_TYPE_descriptor_t asn_DEF_ANY = {
|
|||
#ifdef ASN_DISABLE_PER_SUPPORT
|
||||
0, 0,
|
||||
#else
|
||||
ANY_decode_uper,
|
||||
ANY_encode_uper,
|
||||
ANY_decode_uper,
|
||||
ANY_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_ANY = {
|
||||
"ANY",
|
||||
"ANY",
|
||||
&asn_OP_ANY,
|
||||
asn_generic_no_constraint,
|
||||
0, 0, 0, 0,
|
||||
0, /* No OER visible constraints */
|
||||
0, /* No PER visible constraints */
|
||||
|
|
|
@ -19,6 +19,7 @@ typedef struct ANY {
|
|||
} ANY_t;
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_ANY;
|
||||
extern asn_TYPE_operation_t asn_OP_ANY;
|
||||
extern asn_OCTET_STRING_specifics_t asn_SPC_ANY_specs;
|
||||
|
||||
asn_struct_free_f ANY_free;
|
||||
|
|
|
@ -17,9 +17,7 @@ asn_OCTET_STRING_specifics_t asn_SPC_BIT_STRING_specs = {
|
|||
offsetof(BIT_STRING_t, _asn_ctx),
|
||||
ASN_OSUBV_BIT
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_BIT_STRING = {
|
||||
"BIT STRING",
|
||||
"BIT_STRING",
|
||||
asn_TYPE_operation_t asn_OP_BIT_STRING = {
|
||||
OCTET_STRING_free, /* Implemented in terms of OCTET STRING */
|
||||
BIT_STRING_print,
|
||||
BIT_STRING_compare,
|
||||
|
@ -42,7 +40,13 @@ asn_TYPE_descriptor_t asn_DEF_BIT_STRING = {
|
|||
OCTET_STRING_decode_uper, /* Unaligned PER decoder */
|
||||
OCTET_STRING_encode_uper, /* Unaligned PER encoder */
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_BIT_STRING = {
|
||||
"BIT STRING",
|
||||
"BIT_STRING",
|
||||
&asn_OP_BIT_STRING,
|
||||
BIT_STRING_constraint,
|
||||
asn_DEF_BIT_STRING_tags,
|
||||
sizeof(asn_DEF_BIT_STRING_tags)
|
||||
/ sizeof(asn_DEF_BIT_STRING_tags[0]),
|
||||
|
|
|
@ -21,6 +21,7 @@ typedef struct BIT_STRING_s {
|
|||
} BIT_STRING_t;
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_BIT_STRING;
|
||||
extern asn_TYPE_operation_t asn_OP_BIT_STRING;
|
||||
extern asn_OCTET_STRING_specifics_t asn_SPC_BIT_STRING_specs;
|
||||
|
||||
asn_struct_print_f BIT_STRING_print; /* Human-readable output */
|
||||
|
|
|
@ -23,9 +23,7 @@ static asn_per_constraints_t asn_DEF_BMPString_per_constraints = {
|
|||
{ APC_SEMI_CONSTRAINED, -1, -1, 0, 0 },
|
||||
0, 0
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_BMPString = {
|
||||
"BMPString",
|
||||
"BMPString",
|
||||
asn_TYPE_operation_t asn_OP_BMPString = {
|
||||
OCTET_STRING_free, /* Implemented in terms of OCTET STRING */
|
||||
BMPString_print,
|
||||
OCTET_STRING_compare,
|
||||
|
@ -48,7 +46,13 @@ asn_TYPE_descriptor_t asn_DEF_BMPString = {
|
|||
OCTET_STRING_decode_uper,
|
||||
OCTET_STRING_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_BMPString = {
|
||||
"BMPString",
|
||||
"BMPString",
|
||||
&asn_OP_BMPString,
|
||||
asn_generic_no_constraint, /* No constraint by default */
|
||||
asn_DEF_BMPString_tags,
|
||||
sizeof(asn_DEF_BMPString_tags)
|
||||
/ sizeof(asn_DEF_BMPString_tags[0]) - 1,
|
||||
|
|
|
@ -14,6 +14,7 @@ extern "C" {
|
|||
typedef OCTET_STRING_t BMPString_t; /* Implemented via OCTET STRING */
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_BMPString;
|
||||
extern asn_TYPE_operation_t asn_OP_BMPString;
|
||||
extern asn_OCTET_STRING_specifics_t asn_SPC_BMPString_specs;
|
||||
|
||||
asn_struct_print_f BMPString_print; /* Human-readable output */
|
||||
|
|
|
@ -12,9 +12,7 @@
|
|||
static const ber_tlv_tag_t asn_DEF_BOOLEAN_tags[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (1 << 2))
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_BOOLEAN = {
|
||||
"BOOLEAN",
|
||||
"BOOLEAN",
|
||||
asn_TYPE_operation_t asn_OP_BOOLEAN = {
|
||||
BOOLEAN_free,
|
||||
BOOLEAN_print,
|
||||
BOOLEAN_compare,
|
||||
|
@ -37,7 +35,13 @@ asn_TYPE_descriptor_t asn_DEF_BOOLEAN = {
|
|||
BOOLEAN_decode_uper, /* Unaligned PER decoder */
|
||||
BOOLEAN_encode_uper, /* Unaligned PER encoder */
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_BOOLEAN = {
|
||||
"BOOLEAN",
|
||||
"BOOLEAN",
|
||||
&asn_OP_BOOLEAN,
|
||||
asn_generic_no_constraint,
|
||||
asn_DEF_BOOLEAN_tags,
|
||||
sizeof(asn_DEF_BOOLEAN_tags) / sizeof(asn_DEF_BOOLEAN_tags[0]),
|
||||
asn_DEF_BOOLEAN_tags, /* Same as above */
|
||||
|
|
|
@ -19,6 +19,7 @@ extern "C" {
|
|||
typedef int BOOLEAN_t;
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_BOOLEAN;
|
||||
extern asn_TYPE_operation_t asn_OP_BOOLEAN;
|
||||
|
||||
asn_struct_free_f BOOLEAN_free;
|
||||
asn_struct_print_f BOOLEAN_print;
|
||||
|
|
|
@ -14,9 +14,7 @@
|
|||
static const ber_tlv_tag_t asn_DEF_ENUMERATED_tags[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_ENUMERATED = {
|
||||
"ENUMERATED",
|
||||
"ENUMERATED",
|
||||
asn_TYPE_operation_t asn_OP_ENUMERATED = {
|
||||
ASN__PRIMITIVE_TYPE_free,
|
||||
INTEGER_print, /* Implemented in terms of INTEGER */
|
||||
INTEGER_compare, /* Implemented in terms of INTEGER */
|
||||
|
@ -39,7 +37,13 @@ asn_TYPE_descriptor_t asn_DEF_ENUMERATED = {
|
|||
ENUMERATED_decode_uper, /* Unaligned PER decoder */
|
||||
ENUMERATED_encode_uper, /* Unaligned PER encoder */
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_ENUMERATED = {
|
||||
"ENUMERATED",
|
||||
"ENUMERATED",
|
||||
&asn_OP_ENUMERATED,
|
||||
asn_generic_no_constraint,
|
||||
asn_DEF_ENUMERATED_tags,
|
||||
sizeof(asn_DEF_ENUMERATED_tags) / sizeof(asn_DEF_ENUMERATED_tags[0]),
|
||||
asn_DEF_ENUMERATED_tags, /* Same as above */
|
||||
|
|
|
@ -14,6 +14,7 @@ extern "C" {
|
|||
typedef INTEGER_t ENUMERATED_t; /* Implemented via INTEGER */
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_ENUMERATED;
|
||||
extern asn_TYPE_operation_t asn_OP_ENUMERATED;
|
||||
|
||||
per_type_decoder_f ENUMERATED_decode_uper;
|
||||
per_type_encoder_f ENUMERATED_encode_uper;
|
||||
|
|
|
@ -12,9 +12,7 @@ static const ber_tlv_tag_t asn_DEF_GeneralString_tags[] = {
|
|||
(ASN_TAG_CLASS_UNIVERSAL | (27 << 2)), /* [UNIVERSAL 27] IMPLICIT ...*/
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_GeneralString = {
|
||||
"GeneralString",
|
||||
"GeneralString",
|
||||
asn_TYPE_operation_t asn_OP_GeneralString = {
|
||||
OCTET_STRING_free,
|
||||
OCTET_STRING_print, /* non-ascii string */
|
||||
OCTET_STRING_compare,
|
||||
|
@ -37,7 +35,13 @@ asn_TYPE_descriptor_t asn_DEF_GeneralString = {
|
|||
OCTET_STRING_decode_uper, /* Implemented in terms of OCTET STRING */
|
||||
OCTET_STRING_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_GeneralString = {
|
||||
"GeneralString",
|
||||
"GeneralString",
|
||||
&asn_OP_GeneralString,
|
||||
asn_generic_unknown_constraint,
|
||||
asn_DEF_GeneralString_tags,
|
||||
sizeof(asn_DEF_GeneralString_tags)
|
||||
/ sizeof(asn_DEF_GeneralString_tags[0]) - 1,
|
||||
|
|
|
@ -14,6 +14,7 @@ extern "C" {
|
|||
typedef OCTET_STRING_t GeneralString_t; /* Implemented via OCTET STRING */
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_GeneralString;
|
||||
extern asn_TYPE_operation_t asn_OP_GeneralString;
|
||||
|
||||
#define GeneralString_free OCTET_STRING_free
|
||||
#define GeneralString_print OCTET_STRING_print
|
||||
|
|
|
@ -171,9 +171,7 @@ static asn_per_constraints_t asn_DEF_GeneralizedTime_constraints = {
|
|||
{ APC_SEMI_CONSTRAINED, -1, -1, 0, 0 }, /* Size */
|
||||
0, 0
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_GeneralizedTime = {
|
||||
"GeneralizedTime",
|
||||
"GeneralizedTime",
|
||||
asn_TYPE_operation_t asn_OP_GeneralizedTime = {
|
||||
OCTET_STRING_free,
|
||||
GeneralizedTime_print,
|
||||
OCTET_STRING_compare, /* Does not normalize time zones! */
|
||||
|
@ -196,7 +194,13 @@ asn_TYPE_descriptor_t asn_DEF_GeneralizedTime = {
|
|||
OCTET_STRING_decode_uper,
|
||||
OCTET_STRING_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_GeneralizedTime = {
|
||||
"GeneralizedTime",
|
||||
"GeneralizedTime",
|
||||
&asn_OP_GeneralizedTime,
|
||||
GeneralizedTime_constraint, /* Check validity of time */
|
||||
asn_DEF_GeneralizedTime_tags,
|
||||
sizeof(asn_DEF_GeneralizedTime_tags)
|
||||
/ sizeof(asn_DEF_GeneralizedTime_tags[0]) - 2,
|
||||
|
|
|
@ -14,6 +14,7 @@ extern "C" {
|
|||
typedef OCTET_STRING_t GeneralizedTime_t; /* Implemented via OCTET STRING */
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_GeneralizedTime;
|
||||
extern asn_TYPE_operation_t asn_OP_GeneralizedTime;
|
||||
|
||||
asn_struct_print_f GeneralizedTime_print;
|
||||
asn_constr_check_f GeneralizedTime_constraint;
|
||||
|
|
|
@ -12,9 +12,7 @@ static const ber_tlv_tag_t asn_DEF_GraphicString_tags[] = {
|
|||
(ASN_TAG_CLASS_UNIVERSAL | (25 << 2)), /* [UNIVERSAL 25] IMPLICIT ...*/
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_GraphicString = {
|
||||
"GraphicString",
|
||||
"GraphicString",
|
||||
asn_TYPE_operation_t asn_OP_GraphicString = {
|
||||
OCTET_STRING_free,
|
||||
OCTET_STRING_print, /* non-ascii string */
|
||||
OCTET_STRING_compare,
|
||||
|
@ -37,7 +35,13 @@ asn_TYPE_descriptor_t asn_DEF_GraphicString = {
|
|||
OCTET_STRING_decode_uper, /* Implemented in terms of OCTET STRING */
|
||||
OCTET_STRING_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_GraphicString = {
|
||||
"GraphicString",
|
||||
"GraphicString",
|
||||
&asn_OP_GraphicString,
|
||||
asn_generic_unknown_constraint,
|
||||
asn_DEF_GraphicString_tags,
|
||||
sizeof(asn_DEF_GraphicString_tags)
|
||||
/ sizeof(asn_DEF_GraphicString_tags[0]) - 1,
|
||||
|
|
|
@ -14,6 +14,7 @@ extern "C" {
|
|||
typedef OCTET_STRING_t GraphicString_t; /* Implemented via OCTET STRING */
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_GraphicString;
|
||||
extern asn_TYPE_operation_t asn_OP_GraphicString;
|
||||
|
||||
#define GraphicString_free OCTET_STRING_free
|
||||
#define GraphicString_print OCTET_STRING_print
|
||||
|
|
|
@ -17,9 +17,7 @@ static asn_per_constraints_t asn_DEF_IA5String_per_constraints = {
|
|||
{ APC_SEMI_CONSTRAINED, -1, -1, 0, 0 }, /* Size */
|
||||
0, 0
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_IA5String = {
|
||||
"IA5String",
|
||||
"IA5String",
|
||||
asn_TYPE_operation_t asn_OP_IA5String = {
|
||||
OCTET_STRING_free,
|
||||
OCTET_STRING_print_utf8, /* ASCII subset */
|
||||
OCTET_STRING_compare,
|
||||
|
@ -42,7 +40,13 @@ asn_TYPE_descriptor_t asn_DEF_IA5String = {
|
|||
OCTET_STRING_decode_uper,
|
||||
OCTET_STRING_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_IA5String = {
|
||||
"IA5String",
|
||||
"IA5String",
|
||||
&asn_OP_IA5String,
|
||||
IA5String_constraint, /* Constraint on the alphabet */
|
||||
asn_DEF_IA5String_tags,
|
||||
sizeof(asn_DEF_IA5String_tags)
|
||||
/ sizeof(asn_DEF_IA5String_tags[0]) - 1,
|
||||
|
|
|
@ -17,6 +17,7 @@ typedef OCTET_STRING_t IA5String_t; /* Implemented via OCTET STRING */
|
|||
* IA5String ASN.1 type definition.
|
||||
*/
|
||||
extern asn_TYPE_descriptor_t asn_DEF_IA5String;
|
||||
extern asn_TYPE_operation_t asn_OP_IA5String;
|
||||
|
||||
asn_constr_check_f IA5String_constraint;
|
||||
|
||||
|
|
|
@ -14,9 +14,7 @@
|
|||
static const ber_tlv_tag_t asn_DEF_INTEGER_tags[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_INTEGER = {
|
||||
"INTEGER",
|
||||
"INTEGER",
|
||||
asn_TYPE_operation_t asn_OP_INTEGER = {
|
||||
INTEGER_free,
|
||||
INTEGER_print,
|
||||
INTEGER_compare,
|
||||
|
@ -39,7 +37,13 @@ asn_TYPE_descriptor_t asn_DEF_INTEGER = {
|
|||
INTEGER_decode_uper, /* Unaligned PER decoder */
|
||||
INTEGER_encode_uper, /* Unaligned PER encoder */
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_INTEGER = {
|
||||
"INTEGER",
|
||||
"INTEGER",
|
||||
&asn_OP_INTEGER,
|
||||
asn_generic_no_constraint,
|
||||
asn_DEF_INTEGER_tags,
|
||||
sizeof(asn_DEF_INTEGER_tags) / sizeof(asn_DEF_INTEGER_tags[0]),
|
||||
asn_DEF_INTEGER_tags, /* Same as above */
|
||||
|
|
|
@ -16,6 +16,7 @@ extern "C" {
|
|||
typedef ASN__PRIMITIVE_TYPE_t INTEGER_t;
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_INTEGER;
|
||||
extern asn_TYPE_operation_t asn_OP_INTEGER;
|
||||
|
||||
/* Map with <tag> to integer value association */
|
||||
typedef struct asn_INTEGER_enum_map_s {
|
||||
|
|
|
@ -17,9 +17,7 @@ static asn_per_constraints_t asn_DEF_ISO646String_per_constraints = {
|
|||
{ APC_SEMI_CONSTRAINED, -1, -1, 0, 0 }, /* Size */
|
||||
0, 0
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_ISO646String = {
|
||||
"ISO646String",
|
||||
"ISO646String",
|
||||
asn_TYPE_operation_t asn_OP_ISO646String = {
|
||||
OCTET_STRING_free,
|
||||
OCTET_STRING_print_utf8, /* ASCII subset */
|
||||
OCTET_STRING_compare,
|
||||
|
@ -42,7 +40,13 @@ asn_TYPE_descriptor_t asn_DEF_ISO646String = {
|
|||
OCTET_STRING_decode_uper,
|
||||
OCTET_STRING_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_ISO646String = {
|
||||
"ISO646String",
|
||||
"ISO646String",
|
||||
&asn_OP_ISO646String,
|
||||
VisibleString_constraint,
|
||||
asn_DEF_ISO646String_tags,
|
||||
sizeof(asn_DEF_ISO646String_tags)
|
||||
/ sizeof(asn_DEF_ISO646String_tags[0]) - 1,
|
||||
|
|
|
@ -15,6 +15,7 @@ extern "C" {
|
|||
typedef VisibleString_t ISO646String_t; /* Implemented using VisibleString */
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_ISO646String;
|
||||
extern asn_TYPE_operation_t asn_OP_ISO646String;
|
||||
|
||||
#define ISO646String_free OCTET_STRING_free
|
||||
#define ISO646String_print OCTET_STRING_print_utf8
|
||||
|
|
|
@ -13,9 +13,7 @@
|
|||
static const ber_tlv_tag_t asn_DEF_NULL_tags[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (5 << 2))
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_NULL = {
|
||||
"NULL",
|
||||
"NULL",
|
||||
asn_TYPE_operation_t asn_OP_NULL = {
|
||||
BOOLEAN_free,
|
||||
NULL_print,
|
||||
NULL_compare,
|
||||
|
@ -38,7 +36,13 @@ asn_TYPE_descriptor_t asn_DEF_NULL = {
|
|||
NULL_decode_uper, /* Unaligned PER decoder */
|
||||
NULL_encode_uper, /* Unaligned PER encoder */
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_NULL = {
|
||||
"NULL",
|
||||
"NULL",
|
||||
&asn_OP_NULL,
|
||||
asn_generic_no_constraint,
|
||||
asn_DEF_NULL_tags,
|
||||
sizeof(asn_DEF_NULL_tags) / sizeof(asn_DEF_NULL_tags[0]),
|
||||
asn_DEF_NULL_tags, /* Same as above */
|
||||
|
|
|
@ -19,6 +19,7 @@ extern "C" {
|
|||
typedef int NULL_t;
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_NULL;
|
||||
extern asn_TYPE_operation_t asn_OP_NULL;
|
||||
|
||||
asn_struct_print_f NULL_print;
|
||||
asn_struct_compare_f NULL_compare;
|
||||
|
@ -28,7 +29,7 @@ xer_type_encoder_f NULL_encode_xer;
|
|||
per_type_decoder_f NULL_decode_uper;
|
||||
per_type_encoder_f NULL_encode_uper;
|
||||
|
||||
#define NULL_free BOOLEAN_free
|
||||
#define NULL_free BOOLEAN_free
|
||||
#define NULL_decode_ber BOOLEAN_decode_ber
|
||||
#define NULL_constraint asn_generic_no_constraint
|
||||
|
||||
|
|
|
@ -18,9 +18,7 @@
|
|||
static const ber_tlv_tag_t asn_DEF_NativeEnumerated_tags[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_NativeEnumerated = {
|
||||
"ENUMERATED", /* The ASN.1 type is still ENUMERATED */
|
||||
"ENUMERATED",
|
||||
asn_TYPE_operation_t asn_OP_NativeEnumerated = {
|
||||
NativeInteger_free,
|
||||
NativeInteger_print,
|
||||
NativeInteger_compare,
|
||||
|
@ -43,7 +41,13 @@ asn_TYPE_descriptor_t asn_DEF_NativeEnumerated = {
|
|||
NativeEnumerated_decode_uper,
|
||||
NativeEnumerated_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_NativeEnumerated = {
|
||||
"ENUMERATED", /* The ASN.1 type is still ENUMERATED */
|
||||
"ENUMERATED",
|
||||
&asn_OP_NativeEnumerated,
|
||||
asn_generic_no_constraint,
|
||||
asn_DEF_NativeEnumerated_tags,
|
||||
sizeof(asn_DEF_NativeEnumerated_tags) / sizeof(asn_DEF_NativeEnumerated_tags[0]),
|
||||
asn_DEF_NativeEnumerated_tags, /* Same as above */
|
||||
|
|
|
@ -20,6 +20,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_NativeEnumerated;
|
||||
extern asn_TYPE_operation_t asn_OP_NativeEnumerated;
|
||||
|
||||
xer_type_encoder_f NativeEnumerated_encode_xer;
|
||||
per_type_decoder_f NativeEnumerated_decode_uper;
|
||||
|
|
|
@ -19,9 +19,7 @@
|
|||
static const ber_tlv_tag_t asn_DEF_NativeInteger_tags[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_NativeInteger = {
|
||||
"INTEGER", /* The ASN.1 type is still INTEGER */
|
||||
"INTEGER",
|
||||
asn_TYPE_operation_t asn_OP_NativeInteger = {
|
||||
NativeInteger_free,
|
||||
NativeInteger_print,
|
||||
NativeInteger_compare,
|
||||
|
@ -44,7 +42,13 @@ asn_TYPE_descriptor_t asn_DEF_NativeInteger = {
|
|||
NativeInteger_decode_uper, /* Unaligned PER decoder */
|
||||
NativeInteger_encode_uper, /* Unaligned PER encoder */
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_NativeInteger = {
|
||||
"INTEGER", /* The ASN.1 type is still INTEGER */
|
||||
"INTEGER",
|
||||
&asn_OP_NativeInteger,
|
||||
asn_generic_no_constraint,
|
||||
asn_DEF_NativeInteger_tags,
|
||||
sizeof(asn_DEF_NativeInteger_tags) / sizeof(asn_DEF_NativeInteger_tags[0]),
|
||||
asn_DEF_NativeInteger_tags, /* Same as above */
|
||||
|
|
|
@ -20,6 +20,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_NativeInteger;
|
||||
extern asn_TYPE_operation_t asn_OP_NativeInteger;
|
||||
|
||||
asn_struct_free_f NativeInteger_free;
|
||||
asn_struct_print_f NativeInteger_print;
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
static const ber_tlv_tag_t asn_DEF_NativeReal_tags[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_NativeReal = {
|
||||
"REAL", /* The ASN.1 type is still REAL */
|
||||
"REAL",
|
||||
asn_TYPE_operation_t asn_OP_NativeReal = {
|
||||
NativeReal_free,
|
||||
NativeReal_print,
|
||||
NativeReal_compare,
|
||||
|
@ -46,7 +44,13 @@ asn_TYPE_descriptor_t asn_DEF_NativeReal = {
|
|||
NativeReal_decode_uper,
|
||||
NativeReal_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_NativeReal = {
|
||||
"REAL", /* The ASN.1 type is still REAL */
|
||||
"REAL",
|
||||
&asn_OP_NativeReal,
|
||||
asn_generic_no_constraint,
|
||||
asn_DEF_NativeReal_tags,
|
||||
sizeof(asn_DEF_NativeReal_tags) / sizeof(asn_DEF_NativeReal_tags[0]),
|
||||
asn_DEF_NativeReal_tags, /* Same as above */
|
||||
|
|
|
@ -18,6 +18,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_NativeReal;
|
||||
extern asn_TYPE_operation_t asn_OP_NativeReal;
|
||||
|
||||
asn_struct_free_f NativeReal_free;
|
||||
asn_struct_print_f NativeReal_print;
|
||||
|
|
|
@ -37,9 +37,7 @@ static asn_per_constraints_t asn_DEF_NumericString_per_constraints = {
|
|||
asn_DEF_NumericString_v2c,
|
||||
asn_DEF_NumericString_c2v
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_NumericString = {
|
||||
"NumericString",
|
||||
"NumericString",
|
||||
asn_TYPE_operation_t asn_OP_NumericString = {
|
||||
OCTET_STRING_free,
|
||||
OCTET_STRING_print_utf8, /* ASCII subset */
|
||||
OCTET_STRING_compare,
|
||||
|
@ -62,7 +60,13 @@ asn_TYPE_descriptor_t asn_DEF_NumericString = {
|
|||
OCTET_STRING_decode_uper,
|
||||
OCTET_STRING_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_NumericString = {
|
||||
"NumericString",
|
||||
"NumericString",
|
||||
&asn_OP_NumericString,
|
||||
NumericString_constraint,
|
||||
asn_DEF_NumericString_tags,
|
||||
sizeof(asn_DEF_NumericString_tags)
|
||||
/ sizeof(asn_DEF_NumericString_tags[0]) - 1,
|
||||
|
|
|
@ -14,6 +14,7 @@ extern "C" {
|
|||
typedef OCTET_STRING_t NumericString_t; /* Implemented via OCTET STRING */
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_NumericString;
|
||||
extern asn_TYPE_operation_t asn_OP_NumericString;
|
||||
|
||||
asn_constr_check_f NumericString_constraint;
|
||||
|
||||
|
|
|
@ -15,9 +15,7 @@
|
|||
static const ber_tlv_tag_t asn_DEF_OBJECT_IDENTIFIER_tags[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (6 << 2))
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_OBJECT_IDENTIFIER = {
|
||||
"OBJECT IDENTIFIER",
|
||||
"OBJECT_IDENTIFIER",
|
||||
asn_TYPE_operation_t asn_OP_OBJECT_IDENTIFIER = {
|
||||
ASN__PRIMITIVE_TYPE_free,
|
||||
OBJECT_IDENTIFIER_print,
|
||||
OCTET_STRING_compare, /* Implemented in terms of a string comparison */
|
||||
|
@ -40,7 +38,13 @@ asn_TYPE_descriptor_t asn_DEF_OBJECT_IDENTIFIER = {
|
|||
OCTET_STRING_decode_uper,
|
||||
OCTET_STRING_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_OBJECT_IDENTIFIER = {
|
||||
"OBJECT IDENTIFIER",
|
||||
"OBJECT_IDENTIFIER",
|
||||
&asn_OP_OBJECT_IDENTIFIER,
|
||||
OBJECT_IDENTIFIER_constraint,
|
||||
asn_DEF_OBJECT_IDENTIFIER_tags,
|
||||
sizeof(asn_DEF_OBJECT_IDENTIFIER_tags)
|
||||
/ sizeof(asn_DEF_OBJECT_IDENTIFIER_tags[0]),
|
||||
|
|
|
@ -17,6 +17,7 @@ extern "C" {
|
|||
typedef ASN__PRIMITIVE_TYPE_t OBJECT_IDENTIFIER_t;
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_OBJECT_IDENTIFIER;
|
||||
extern asn_TYPE_operation_t asn_OP_OBJECT_IDENTIFIER;
|
||||
|
||||
asn_struct_print_f OBJECT_IDENTIFIER_print;
|
||||
asn_constr_check_f OBJECT_IDENTIFIER_constraint;
|
||||
|
|
|
@ -24,9 +24,7 @@ static asn_per_constraints_t asn_DEF_OCTET_STRING_constraints = {
|
|||
{ APC_SEMI_CONSTRAINED, -1, -1, 0, 0 },
|
||||
0, 0
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_OCTET_STRING = {
|
||||
"OCTET STRING", /* Canonical name */
|
||||
"OCTET_STRING", /* XML tag name */
|
||||
asn_TYPE_operation_t asn_OP_OCTET_STRING = {
|
||||
OCTET_STRING_free,
|
||||
OCTET_STRING_print, /* OCTET STRING generally means a non-ascii sequence */
|
||||
OCTET_STRING_compare,
|
||||
|
@ -49,7 +47,13 @@ asn_TYPE_descriptor_t asn_DEF_OCTET_STRING = {
|
|||
OCTET_STRING_decode_uper, /* Unaligned PER decoder */
|
||||
OCTET_STRING_encode_uper, /* Unaligned PER encoder */
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_OCTET_STRING = {
|
||||
"OCTET STRING", /* Canonical name */
|
||||
"OCTET_STRING", /* XML tag name */
|
||||
&asn_OP_OCTET_STRING,
|
||||
asn_generic_no_constraint,
|
||||
asn_DEF_OCTET_STRING_tags,
|
||||
sizeof(asn_DEF_OCTET_STRING_tags)
|
||||
/ sizeof(asn_DEF_OCTET_STRING_tags[0]),
|
||||
|
|
|
@ -19,6 +19,7 @@ typedef struct OCTET_STRING {
|
|||
} OCTET_STRING_t;
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_OCTET_STRING;
|
||||
extern asn_TYPE_operation_t asn_OP_OCTET_STRING;
|
||||
|
||||
asn_struct_free_f OCTET_STRING_free;
|
||||
asn_struct_print_f OCTET_STRING_print;
|
||||
|
|
|
@ -8,6 +8,20 @@
|
|||
#include <per_opentype.h>
|
||||
#include <errno.h>
|
||||
|
||||
asn_TYPE_operation_t asn_OP_OPEN_TYPE = {
|
||||
OPEN_TYPE_free,
|
||||
OPEN_TYPE_print,
|
||||
OPEN_TYPE_compare,
|
||||
OPEN_TYPE_constraint,
|
||||
OPEN_TYPE_decode_ber,
|
||||
OPEN_TYPE_encode_der,
|
||||
OPEN_TYPE_decode_xer,
|
||||
OPEN_TYPE_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
OPEN_TYPE_decode_uper,
|
||||
OPEN_TYPE_encode_uper,
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
};
|
||||
|
||||
asn_dec_rval_t
|
||||
OPEN_TYPE_uper_get(asn_codec_ctx_t *opt_codec_ctx,
|
||||
|
|
|
@ -22,6 +22,7 @@ extern "C" {
|
|||
#define OPEN_TYPE_decode_uper NULL
|
||||
#define OPEN_TYPE_encode_uper CHOICE_encode_uper
|
||||
|
||||
extern asn_TYPE_operation_t asn_OP_OPEN_TYPE;
|
||||
|
||||
/*
|
||||
* Decode an Open Type which is potentially constraiend
|
||||
|
|
|
@ -12,9 +12,7 @@ static const ber_tlv_tag_t asn_DEF_ObjectDescriptor_tags[] = {
|
|||
(ASN_TAG_CLASS_UNIVERSAL | (7 << 2)), /* [UNIVERSAL 7] IMPLICIT ... */
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_ObjectDescriptor = {
|
||||
"ObjectDescriptor",
|
||||
"ObjectDescriptor",
|
||||
asn_TYPE_operation_t asn_OP_ObjectDescriptor = {
|
||||
OCTET_STRING_free,
|
||||
OCTET_STRING_print_utf8, /* Treat as ASCII subset (it's not) */
|
||||
OCTET_STRING_compare,
|
||||
|
@ -37,7 +35,13 @@ asn_TYPE_descriptor_t asn_DEF_ObjectDescriptor = {
|
|||
OCTET_STRING_decode_uper,
|
||||
OCTET_STRING_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_ObjectDescriptor = {
|
||||
"ObjectDescriptor",
|
||||
"ObjectDescriptor",
|
||||
&asn_OP_ObjectDescriptor,
|
||||
asn_generic_unknown_constraint,
|
||||
asn_DEF_ObjectDescriptor_tags,
|
||||
sizeof(asn_DEF_ObjectDescriptor_tags)
|
||||
/ sizeof(asn_DEF_ObjectDescriptor_tags[0]) - 1,
|
||||
|
|
|
@ -14,6 +14,7 @@ extern "C" {
|
|||
typedef GraphicString_t ObjectDescriptor_t; /* Implemented via GraphicString */
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_ObjectDescriptor;
|
||||
extern asn_TYPE_operation_t asn_OP_ObjectDescriptor;
|
||||
|
||||
#define ObjectDescriptor_free OCTET_STRING_free
|
||||
#define ObjectDescriptor_print OCTET_STRING_print_utf8
|
||||
|
|
|
@ -47,9 +47,7 @@ static asn_per_constraints_t asn_DEF_PrintableString_per_constraints = {
|
|||
asn_DEF_PrintableString_v2c,
|
||||
asn_DEF_PrintableString_c2v
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_PrintableString = {
|
||||
"PrintableString",
|
||||
"PrintableString",
|
||||
asn_TYPE_operation_t asn_OP_PrintableString = {
|
||||
OCTET_STRING_free,
|
||||
OCTET_STRING_print_utf8, /* ASCII subset */
|
||||
OCTET_STRING_compare,
|
||||
|
@ -72,7 +70,13 @@ asn_TYPE_descriptor_t asn_DEF_PrintableString = {
|
|||
OCTET_STRING_decode_uper,
|
||||
OCTET_STRING_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_PrintableString = {
|
||||
"PrintableString",
|
||||
"PrintableString",
|
||||
&asn_OP_PrintableString,
|
||||
PrintableString_constraint,
|
||||
asn_DEF_PrintableString_tags,
|
||||
sizeof(asn_DEF_PrintableString_tags)
|
||||
/ sizeof(asn_DEF_PrintableString_tags[0]) - 1,
|
||||
|
|
|
@ -14,6 +14,7 @@ extern "C" {
|
|||
typedef OCTET_STRING_t PrintableString_t; /* Implemented via OCTET STRING */
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_PrintableString;
|
||||
extern asn_TYPE_operation_t asn_OP_PrintableString;
|
||||
|
||||
asn_constr_check_f PrintableString_constraint;
|
||||
|
||||
|
|
|
@ -41,41 +41,45 @@ static volatile double real_zero GCC_NOTUSED = 0.0;
|
|||
static const ber_tlv_tag_t asn_DEF_REAL_tags[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_REAL = {
|
||||
"REAL",
|
||||
"REAL",
|
||||
ASN__PRIMITIVE_TYPE_free,
|
||||
REAL_print,
|
||||
REAL_compare,
|
||||
asn_generic_no_constraint,
|
||||
ber_decode_primitive,
|
||||
der_encode_primitive,
|
||||
REAL_decode_xer,
|
||||
REAL_encode_xer,
|
||||
asn_TYPE_operation_t asn_OP_REAL = {
|
||||
ASN__PRIMITIVE_TYPE_free,
|
||||
REAL_print,
|
||||
REAL_compare,
|
||||
asn_generic_no_constraint,
|
||||
ber_decode_primitive,
|
||||
der_encode_primitive,
|
||||
REAL_decode_xer,
|
||||
REAL_encode_xer,
|
||||
#ifdef ASN_DISABLE_OER_SUPPORT
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
#else
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
#endif /* ASN_DISABLE_OER_SUPPORT */
|
||||
#ifdef ASN_DISABLE_PER_SUPPORT
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
#else
|
||||
REAL_decode_uper,
|
||||
REAL_encode_uper,
|
||||
REAL_decode_uper,
|
||||
REAL_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
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 OER visible constraints */
|
||||
0, /* No PER visible constraints */
|
||||
0,
|
||||
0, /* No members */
|
||||
0 /* No specifics */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_REAL = {
|
||||
"REAL",
|
||||
"REAL",
|
||||
&asn_OP_REAL,
|
||||
asn_generic_no_constraint,
|
||||
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 OER visible constraints */
|
||||
0, /* No PER visible constraints */
|
||||
0,
|
||||
0, /* No members */
|
||||
0 /* No specifics */
|
||||
};
|
||||
|
||||
typedef enum specialRealValue {
|
||||
|
|
|
@ -15,6 +15,7 @@ extern "C" {
|
|||
typedef ASN__PRIMITIVE_TYPE_t REAL_t;
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_REAL;
|
||||
extern asn_TYPE_operation_t asn_OP_REAL;
|
||||
|
||||
asn_struct_print_f REAL_print;
|
||||
asn_struct_compare_f REAL_compare;
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
static const ber_tlv_tag_t asn_DEF_RELATIVE_OID_tags[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (13 << 2))
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_RELATIVE_OID = {
|
||||
"RELATIVE-OID",
|
||||
"RELATIVE_OID",
|
||||
asn_TYPE_operation_t asn_OP_RELATIVE_OID = {
|
||||
ASN__PRIMITIVE_TYPE_free,
|
||||
RELATIVE_OID_print,
|
||||
OCTET_STRING_compare, /* Implemented in terms of opaque comparison */
|
||||
|
@ -41,7 +39,13 @@ asn_TYPE_descriptor_t asn_DEF_RELATIVE_OID = {
|
|||
OCTET_STRING_decode_uper,
|
||||
OCTET_STRING_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_RELATIVE_OID = {
|
||||
"RELATIVE-OID",
|
||||
"RELATIVE_OID",
|
||||
&asn_OP_RELATIVE_OID,
|
||||
asn_generic_no_constraint,
|
||||
asn_DEF_RELATIVE_OID_tags,
|
||||
sizeof(asn_DEF_RELATIVE_OID_tags)
|
||||
/ sizeof(asn_DEF_RELATIVE_OID_tags[0]),
|
||||
|
|
|
@ -15,6 +15,7 @@ extern "C" {
|
|||
typedef OBJECT_IDENTIFIER_t RELATIVE_OID_t;
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_RELATIVE_OID;
|
||||
extern asn_TYPE_operation_t asn_OP_RELATIVE_OID;
|
||||
|
||||
asn_struct_print_f RELATIVE_OID_print;
|
||||
xer_type_decoder_f RELATIVE_OID_decode_xer;
|
||||
|
|
|
@ -12,9 +12,7 @@ static const ber_tlv_tag_t asn_DEF_T61String_tags[] = {
|
|||
(ASN_TAG_CLASS_UNIVERSAL | (20 << 2)), /* [UNIVERSAL 20] IMPLICIT ...*/
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_T61String = {
|
||||
"T61String",
|
||||
"T61String",
|
||||
asn_TYPE_operation_t asn_OP_T61String = {
|
||||
OCTET_STRING_free,
|
||||
OCTET_STRING_print, /* non-ascii string */
|
||||
OCTET_STRING_compare,
|
||||
|
@ -37,7 +35,13 @@ asn_TYPE_descriptor_t asn_DEF_T61String = {
|
|||
OCTET_STRING_decode_uper,
|
||||
OCTET_STRING_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_T61String = {
|
||||
"T61String",
|
||||
"T61String",
|
||||
&asn_OP_T61String,
|
||||
asn_generic_unknown_constraint,
|
||||
asn_DEF_T61String_tags,
|
||||
sizeof(asn_DEF_T61String_tags)
|
||||
/ sizeof(asn_DEF_T61String_tags[0]) - 1,
|
||||
|
|
|
@ -14,6 +14,7 @@ extern "C" {
|
|||
typedef OCTET_STRING_t T61String_t; /* Implemented via OCTET STRING */
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_T61String;
|
||||
extern asn_TYPE_operation_t asn_OP_T61String;
|
||||
|
||||
#define T61String_free OCTET_STRING_free
|
||||
#define T61String_print OCTET_STRING_print
|
||||
|
|
|
@ -12,9 +12,7 @@ static const ber_tlv_tag_t asn_DEF_TeletexString_tags[] = {
|
|||
(ASN_TAG_CLASS_UNIVERSAL | (20 << 2)), /* [UNIVERSAL 20] IMPLICIT ...*/
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), /* ... OCTET STRING */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_TeletexString = {
|
||||
"TeletexString",
|
||||
"TeletexString",
|
||||
asn_TYPE_operation_t asn_OP_TeletexString = {
|
||||
OCTET_STRING_free,
|
||||
OCTET_STRING_print, /* non-ascii string */
|
||||
OCTET_STRING_compare,
|
||||
|
@ -37,7 +35,13 @@ asn_TYPE_descriptor_t asn_DEF_TeletexString = {
|
|||
OCTET_STRING_decode_uper,
|
||||
OCTET_STRING_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_TeletexString = {
|
||||
"TeletexString",
|
||||
"TeletexString",
|
||||
&asn_OP_TeletexString,
|
||||
asn_generic_unknown_constraint,
|
||||
asn_DEF_TeletexString_tags,
|
||||
sizeof(asn_DEF_TeletexString_tags)
|
||||
/ sizeof(asn_DEF_TeletexString_tags[0]) - 1,
|
||||
|
|
|
@ -14,6 +14,7 @@ extern "C" {
|
|||
typedef OCTET_STRING_t TeletexString_t; /* Implemented via OCTET STRING */
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_TeletexString;
|
||||
extern asn_TYPE_operation_t asn_OP_TeletexString;
|
||||
|
||||
#define TeletexString_free OCTET_STRING_free
|
||||
#define TeletexString_print OCTET_STRING_print
|
||||
|
|
|
@ -28,9 +28,7 @@ static asn_per_constraints_t asn_DEF_UTCTime_constraints = {
|
|||
{ APC_SEMI_CONSTRAINED, -1, -1, 0, 0 }, /* Size */
|
||||
0, 0
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_UTCTime = {
|
||||
"UTCTime",
|
||||
"UTCTime",
|
||||
asn_TYPE_operation_t asn_OP_UTCTime = {
|
||||
OCTET_STRING_free,
|
||||
UTCTime_print,
|
||||
OCTET_STRING_compare, /* Does not deal with time zones. */
|
||||
|
@ -53,7 +51,13 @@ asn_TYPE_descriptor_t asn_DEF_UTCTime = {
|
|||
OCTET_STRING_decode_uper,
|
||||
OCTET_STRING_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_UTCTime = {
|
||||
"UTCTime",
|
||||
"UTCTime",
|
||||
&asn_OP_UTCTime,
|
||||
UTCTime_constraint,
|
||||
asn_DEF_UTCTime_tags,
|
||||
sizeof(asn_DEF_UTCTime_tags)
|
||||
/ sizeof(asn_DEF_UTCTime_tags[0]) - 2,
|
||||
|
|
|
@ -14,6 +14,7 @@ extern "C" {
|
|||
typedef OCTET_STRING_t UTCTime_t; /* Implemented via OCTET STRING */
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_UTCTime;
|
||||
extern asn_TYPE_operation_t asn_OP_UTCTime;
|
||||
|
||||
asn_struct_print_f UTCTime_print;
|
||||
asn_constr_check_f UTCTime_constraint;
|
||||
|
|
|
@ -13,9 +13,7 @@ static const ber_tlv_tag_t asn_DEF_UTF8String_tags[] = {
|
|||
(ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), /* [UNIVERSAL 12] IMPLICIT ...*/
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), /* ... OCTET STRING */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_UTF8String = {
|
||||
"UTF8String",
|
||||
"UTF8String",
|
||||
asn_TYPE_operation_t asn_OP_UTF8String = {
|
||||
OCTET_STRING_free,
|
||||
UTF8String_print,
|
||||
OCTET_STRING_compare,
|
||||
|
@ -38,7 +36,13 @@ asn_TYPE_descriptor_t asn_DEF_UTF8String = {
|
|||
OCTET_STRING_decode_uper,
|
||||
OCTET_STRING_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_UTF8String = {
|
||||
"UTF8String",
|
||||
"UTF8String",
|
||||
&asn_OP_UTF8String,
|
||||
UTF8String_constraint, /* Check for invalid codes, etc. */
|
||||
asn_DEF_UTF8String_tags,
|
||||
sizeof(asn_DEF_UTF8String_tags)
|
||||
/ sizeof(asn_DEF_UTF8String_tags[0]) - 1,
|
||||
|
|
|
@ -14,6 +14,7 @@ extern "C" {
|
|||
typedef OCTET_STRING_t UTF8String_t; /* Implemented via OCTET STRING */
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_UTF8String;
|
||||
extern asn_TYPE_operation_t asn_OP_UTF8String;
|
||||
|
||||
asn_struct_print_f UTF8String_print;
|
||||
asn_constr_check_f UTF8String_constraint;
|
||||
|
|
|
@ -23,9 +23,7 @@ static asn_per_constraints_t asn_DEF_UniversalString_per_constraints = {
|
|||
{ APC_SEMI_CONSTRAINED, -1, -1, 0, 0 },
|
||||
0, 0
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_UniversalString = {
|
||||
"UniversalString",
|
||||
"UniversalString",
|
||||
asn_TYPE_operation_t asn_OP_UniversalString = {
|
||||
OCTET_STRING_free,
|
||||
UniversalString_print, /* Convert into UTF8 and print */
|
||||
OCTET_STRING_compare,
|
||||
|
@ -48,7 +46,13 @@ asn_TYPE_descriptor_t asn_DEF_UniversalString = {
|
|||
OCTET_STRING_decode_uper,
|
||||
OCTET_STRING_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_UniversalString = {
|
||||
"UniversalString",
|
||||
"UniversalString",
|
||||
&asn_OP_UniversalString,
|
||||
asn_generic_no_constraint,
|
||||
asn_DEF_UniversalString_tags,
|
||||
sizeof(asn_DEF_UniversalString_tags)
|
||||
/ sizeof(asn_DEF_UniversalString_tags[0]) - 1,
|
||||
|
|
|
@ -14,6 +14,7 @@ extern "C" {
|
|||
typedef OCTET_STRING_t UniversalString_t; /* Implemented via OCTET STRING */
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_UniversalString;
|
||||
extern asn_TYPE_operation_t asn_OP_UniversalString;
|
||||
extern asn_OCTET_STRING_specifics_t asn_SPC_UniversalString_specs;
|
||||
|
||||
asn_struct_print_f UniversalString_print; /* Human-readable output */
|
||||
|
|
|
@ -12,9 +12,7 @@ static const ber_tlv_tag_t asn_DEF_VideotexString_tags[] = {
|
|||
(ASN_TAG_CLASS_UNIVERSAL | (21 << 2)), /* [UNIVERSAL 21] IMPLICIT */
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_VideotexString = {
|
||||
"VideotexString",
|
||||
"VideotexString",
|
||||
asn_TYPE_operation_t asn_OP_VideotexString = {
|
||||
OCTET_STRING_free,
|
||||
OCTET_STRING_print, /* non-ascii string */
|
||||
OCTET_STRING_compare,
|
||||
|
@ -37,7 +35,13 @@ asn_TYPE_descriptor_t asn_DEF_VideotexString = {
|
|||
OCTET_STRING_decode_uper, /* Implemented in terms of OCTET STRING */
|
||||
OCTET_STRING_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_VideotexString = {
|
||||
"VideotexString",
|
||||
"VideotexString",
|
||||
&asn_OP_VideotexString,
|
||||
asn_generic_unknown_constraint,
|
||||
asn_DEF_VideotexString_tags,
|
||||
sizeof(asn_DEF_VideotexString_tags)
|
||||
/ sizeof(asn_DEF_VideotexString_tags[0]) - 1,
|
||||
|
|
|
@ -14,6 +14,7 @@ extern "C" {
|
|||
typedef OCTET_STRING_t VideotexString_t; /* Implemented via OCTET STRING */
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_VideotexString;
|
||||
extern asn_TYPE_operation_t asn_OP_VideotexString;
|
||||
|
||||
#define VideotexString_free OCTET_STRING_free
|
||||
#define VideotexString_print OCTET_STRING_print
|
||||
|
|
|
@ -17,9 +17,7 @@ static asn_per_constraints_t asn_DEF_VisibleString_constraints = {
|
|||
{ APC_SEMI_CONSTRAINED, -1, -1, 0, 0 }, /* Size */
|
||||
0, 0
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_VisibleString = {
|
||||
"VisibleString",
|
||||
"VisibleString",
|
||||
asn_TYPE_operation_t asn_OP_VisibleString = {
|
||||
OCTET_STRING_free,
|
||||
OCTET_STRING_print_utf8, /* ASCII subset */
|
||||
OCTET_STRING_compare,
|
||||
|
@ -42,7 +40,13 @@ asn_TYPE_descriptor_t asn_DEF_VisibleString = {
|
|||
OCTET_STRING_decode_uper,
|
||||
OCTET_STRING_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_VisibleString = {
|
||||
"VisibleString",
|
||||
"VisibleString",
|
||||
&asn_OP_VisibleString,
|
||||
VisibleString_constraint,
|
||||
asn_DEF_VisibleString_tags,
|
||||
sizeof(asn_DEF_VisibleString_tags)
|
||||
/ sizeof(asn_DEF_VisibleString_tags[0]) - 1,
|
||||
|
|
|
@ -14,6 +14,7 @@ extern "C" {
|
|||
typedef OCTET_STRING_t VisibleString_t; /* Implemented via OCTET STRING */
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_VisibleString;
|
||||
extern asn_TYPE_operation_t asn_OP_VisibleString;
|
||||
|
||||
asn_constr_check_f VisibleString_constraint;
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ ber_decode(asn_codec_ctx_t *opt_codec_ctx,
|
|||
/*
|
||||
* Invoke type-specific decoder.
|
||||
*/
|
||||
return type_descriptor->ber_decoder(opt_codec_ctx, type_descriptor,
|
||||
return type_descriptor->op->ber_decoder(opt_codec_ctx, type_descriptor,
|
||||
struct_ptr, /* Pointer to the destination structure */
|
||||
ptr, size, /* Buffer and its size */
|
||||
0 /* Default tag mode is 0 */
|
||||
|
|
|
@ -264,7 +264,7 @@ CHOICE_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
|||
/*
|
||||
* Invoke the member fetch routine according to member's type
|
||||
*/
|
||||
rval = elm->type->ber_decoder(opt_codec_ctx, elm->type,
|
||||
rval = elm->type->op->ber_decoder(opt_codec_ctx, elm->type,
|
||||
memb_ptr2, ptr, LEFT, elm->tag_mode);
|
||||
switch(rval.code) {
|
||||
case RC_OK:
|
||||
|
@ -420,7 +420,7 @@ CHOICE_encode_der(asn_TYPE_descriptor_t *td, void *sptr,
|
|||
ssize_t ret;
|
||||
|
||||
/* Encode member with its tag */
|
||||
erval = elm->type->der_encoder(elm->type, memb_ptr,
|
||||
erval = elm->type->op->der_encoder(elm->type, memb_ptr,
|
||||
elm->tag_mode, elm->tag, 0, 0);
|
||||
if(erval.encoded == -1)
|
||||
return erval;
|
||||
|
@ -436,7 +436,7 @@ CHOICE_encode_der(asn_TYPE_descriptor_t *td, void *sptr,
|
|||
/*
|
||||
* Encode the single underlying member.
|
||||
*/
|
||||
erval = elm->type->der_encoder(elm->type, memb_ptr,
|
||||
erval = elm->type->op->der_encoder(elm->type, memb_ptr,
|
||||
elm->tag_mode, elm->tag, cb, app_key);
|
||||
if(erval.encoded == -1)
|
||||
return erval;
|
||||
|
@ -618,7 +618,7 @@ CHOICE_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
|||
}
|
||||
|
||||
/* Start/Continue decoding the inner member */
|
||||
tmprval = elm->type->xer_decoder(opt_codec_ctx,
|
||||
tmprval = elm->type->op->xer_decoder(opt_codec_ctx,
|
||||
elm->type, memb_ptr2, elm->name,
|
||||
buf_ptr, size);
|
||||
XER_ADVANCE(tmprval.consumed);
|
||||
|
@ -813,7 +813,7 @@ CHOICE_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
|
|||
if(!(flags & XER_F_CANONICAL)) ASN__TEXT_INDENT(1, ilevel);
|
||||
ASN__CALLBACK3("<", 1, mname, mlen, ">", 1);
|
||||
|
||||
tmper = elm->type->xer_encoder(elm->type, memb_ptr,
|
||||
tmper = elm->type->op->xer_encoder(elm->type, memb_ptr,
|
||||
ilevel + 1, flags, cb, app_key);
|
||||
if(tmper.encoded == -1) return tmper;
|
||||
|
||||
|
@ -898,7 +898,7 @@ CHOICE_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
|||
ASN_DEBUG("Discovered CHOICE %s encodes %s", td->name, elm->name);
|
||||
|
||||
if(ct && ct->range_bits >= 0) {
|
||||
rv = elm->type->uper_decoder(opt_codec_ctx, elm->type,
|
||||
rv = elm->type->op->uper_decoder(opt_codec_ctx, elm->type,
|
||||
elm->per_constraints, memb_ptr2, pd);
|
||||
} else {
|
||||
rv = uper_open_type_get(opt_codec_ctx, elm->type,
|
||||
|
@ -915,7 +915,7 @@ asn_enc_rval_t
|
|||
CHOICE_encode_uper(asn_TYPE_descriptor_t *td,
|
||||
const asn_per_constraints_t *constraints, void *sptr,
|
||||
asn_per_outp_t *po) {
|
||||
asn_CHOICE_specifics_t *specs = (asn_CHOICE_specifics_t *)td->specifics;
|
||||
asn_CHOICE_specifics_t *specs = (asn_CHOICE_specifics_t *)td->specifics;
|
||||
asn_TYPE_member_t *elm; /* CHOICE's element */
|
||||
const asn_per_constraint_t *ct;
|
||||
void *memb_ptr;
|
||||
|
@ -930,9 +930,9 @@ CHOICE_encode_uper(asn_TYPE_descriptor_t *td,
|
|||
else if(td->per_constraints) ct = &td->per_constraints->value;
|
||||
else ct = 0;
|
||||
|
||||
present = _fetch_present_idx(sptr, specs->pres_offset, specs->pres_size);
|
||||
present = _fetch_present_idx(sptr, specs->pres_offset, specs->pres_size);
|
||||
|
||||
/*
|
||||
/*
|
||||
* If the structure was not initialized properly, it cannot be encoded:
|
||||
* can't deduce what to encode in the choice type.
|
||||
*/
|
||||
|
@ -978,7 +978,7 @@ CHOICE_encode_uper(asn_TYPE_descriptor_t *td,
|
|||
if(per_put_few_bits(po, present_enc, ct->range_bits))
|
||||
ASN__ENCODE_FAILED;
|
||||
|
||||
return elm->type->uper_encoder(elm->type, elm->per_constraints,
|
||||
return elm->type->op->uper_encoder(elm->type, elm->per_constraints,
|
||||
memb_ptr, po);
|
||||
} else {
|
||||
asn_enc_rval_t rval;
|
||||
|
@ -1029,7 +1029,7 @@ CHOICE_print(asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
|
|||
return -1;
|
||||
}
|
||||
|
||||
return elm->type->print_struct(elm->type, memb_ptr, ilevel,
|
||||
return elm->type->op->print_struct(elm->type, memb_ptr, ilevel,
|
||||
cb, app_key);
|
||||
} else {
|
||||
return (cb("<absent>", 8, app_key) < 0) ? -1 : 0;
|
||||
|
@ -1173,7 +1173,7 @@ CHOICE_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const void *bp
|
|||
if(amember && bmember) {
|
||||
if(apresent == bpresent) {
|
||||
assert(aelm == belm);
|
||||
return aelm->type->compare_struct(aelm->type, amember, bmember);
|
||||
return aelm->type->op->compare_struct(aelm->type, amember, bmember);
|
||||
} else if(apresent < bpresent) {
|
||||
return -1;
|
||||
} else {
|
||||
|
@ -1232,3 +1232,28 @@ CHOICE_variant_set_presence(const asn_TYPE_descriptor_t *td, void *sptr,
|
|||
return 0;
|
||||
}
|
||||
|
||||
asn_TYPE_operation_t asn_OP_CHOICE = {
|
||||
CHOICE_free,
|
||||
CHOICE_print,
|
||||
CHOICE_compare,
|
||||
CHOICE_constraint,
|
||||
CHOICE_decode_ber,
|
||||
CHOICE_encode_der,
|
||||
CHOICE_decode_xer,
|
||||
CHOICE_encode_xer,
|
||||
#ifdef ASN_DISABLE_OER_SUPPORT
|
||||
0,
|
||||
0,
|
||||
#else
|
||||
0,
|
||||
0,
|
||||
#endif /* ASN_DISABLE_OER_SUPPORT */
|
||||
#ifdef ASN_DISABLE_PER_SUPPORT
|
||||
0,
|
||||
0,
|
||||
#else
|
||||
CHOICE_decode_uper,
|
||||
CHOICE_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
CHOICE_outmost_tag
|
||||
};
|
||||
|
|
|
@ -13,27 +13,27 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
typedef const struct asn_CHOICE_specifics_s {
|
||||
/*
|
||||
* Target structure description.
|
||||
*/
|
||||
unsigned struct_size; /* Size of the target structure. */
|
||||
unsigned ctx_offset; /* Offset of the asn_codec_ctx_t member */
|
||||
unsigned pres_offset; /* Identifier of the present member */
|
||||
unsigned pres_size; /* Size of the identifier (enum) */
|
||||
/*
|
||||
* Target structure description.
|
||||
*/
|
||||
unsigned struct_size; /* Size of the target structure. */
|
||||
unsigned ctx_offset; /* Offset of the asn_codec_ctx_t member */
|
||||
unsigned pres_offset; /* Identifier of the present member */
|
||||
unsigned pres_size; /* Size of the identifier (enum) */
|
||||
|
||||
/*
|
||||
* Tags to members mapping table.
|
||||
*/
|
||||
const asn_TYPE_tag2member_t *tag2el;
|
||||
unsigned tag2el_count;
|
||||
/*
|
||||
* Tags to members mapping table.
|
||||
*/
|
||||
const asn_TYPE_tag2member_t *tag2el;
|
||||
unsigned tag2el_count;
|
||||
|
||||
/* Canonical ordering of CHOICE elements, for PER */
|
||||
const unsigned *canonical_order;
|
||||
/* Canonical ordering of CHOICE elements, for PER */
|
||||
const unsigned *canonical_order;
|
||||
|
||||
/*
|
||||
* Extensions-related stuff.
|
||||
*/
|
||||
signed ext_start; /* First member of extensions, or -1 */
|
||||
/*
|
||||
* Extensions-related stuff.
|
||||
*/
|
||||
signed ext_start; /* First member of extensions, or -1 */
|
||||
} asn_CHOICE_specifics_t;
|
||||
|
||||
/*
|
||||
|
@ -50,6 +50,7 @@ xer_type_encoder_f CHOICE_encode_xer;
|
|||
per_type_decoder_f CHOICE_decode_uper;
|
||||
per_type_encoder_f CHOICE_encode_uper;
|
||||
asn_outmost_tag_f CHOICE_outmost_tag;
|
||||
extern asn_TYPE_operation_t asn_OP_CHOICE;
|
||||
|
||||
/*
|
||||
* Return the 1-based choice variant presence index.
|
||||
|
|
|
@ -410,7 +410,7 @@ SEQUENCE_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
|||
/*
|
||||
* Invoke the member fetch routine according to member's type
|
||||
*/
|
||||
rval = elements[edx].type->ber_decoder(opt_codec_ctx,
|
||||
rval = elements[edx].type->op->ber_decoder(opt_codec_ctx,
|
||||
elements[edx].type,
|
||||
memb_ptr2, ptr, LEFT,
|
||||
elements[edx].tag_mode);
|
||||
|
@ -538,7 +538,7 @@ SEQUENCE_encode_der(asn_TYPE_descriptor_t *td,
|
|||
} else {
|
||||
memb_ptr = (void *)((char *)sptr + elm->memb_offset);
|
||||
}
|
||||
erval = elm->type->der_encoder(elm->type, memb_ptr,
|
||||
erval = elm->type->op->der_encoder(elm->type, memb_ptr,
|
||||
elm->tag_mode, elm->tag,
|
||||
0, 0);
|
||||
if(erval.encoded == -1)
|
||||
|
@ -573,7 +573,7 @@ SEQUENCE_encode_der(asn_TYPE_descriptor_t *td,
|
|||
} else {
|
||||
memb_ptr = (void *)((char *)sptr + elm->memb_offset);
|
||||
}
|
||||
tmperval = elm->type->der_encoder(elm->type, memb_ptr,
|
||||
tmperval = elm->type->op->der_encoder(elm->type, memb_ptr,
|
||||
elm->tag_mode, elm->tag,
|
||||
cb, app_key);
|
||||
if(tmperval.encoded == -1)
|
||||
|
@ -673,7 +673,7 @@ SEQUENCE_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
|||
}
|
||||
|
||||
/* Invoke the inner type decoder, m.b. multiple times */
|
||||
tmprval = elm->type->xer_decoder(opt_codec_ctx,
|
||||
tmprval = elm->type->op->xer_decoder(opt_codec_ctx,
|
||||
elm->type, memb_ptr2, elm->name,
|
||||
buf_ptr, size);
|
||||
XER_ADVANCE(tmprval.consumed);
|
||||
|
@ -776,8 +776,8 @@ SEQUENCE_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
|||
/*
|
||||
* Search which member corresponds to this tag.
|
||||
*/
|
||||
size_t n;
|
||||
size_t edx_end = edx + elements[edx].optional + 1;
|
||||
size_t n;
|
||||
size_t edx_end = edx + elements[edx].optional + 1;
|
||||
if(edx_end > td->elements_count)
|
||||
edx_end = td->elements_count;
|
||||
for(n = edx; n < edx_end; n++) {
|
||||
|
@ -885,7 +885,7 @@ SEQUENCE_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
|
|||
ASN__CALLBACK3("<", 1, mname, mlen, ">", 1);
|
||||
|
||||
/* Print the member itself */
|
||||
tmper = elm->type->xer_encoder(elm->type, memb_ptr,
|
||||
tmper = elm->type->op->xer_encoder(elm->type, memb_ptr,
|
||||
ilevel + 1, flags, cb, app_key);
|
||||
if(tmper.encoded == -1) return tmper;
|
||||
|
||||
|
@ -937,7 +937,7 @@ SEQUENCE_print(asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
|
|||
return -1;
|
||||
|
||||
/* Print the member itself */
|
||||
ret = elm->type->print_struct(elm->type, memb_ptr, ilevel + 1,
|
||||
ret = elm->type->op->print_struct(elm->type, memb_ptr, ilevel + 1,
|
||||
cb, app_key);
|
||||
if(ret) return ret;
|
||||
}
|
||||
|
@ -1031,7 +1031,7 @@ asn_dec_rval_t
|
|||
SEQUENCE_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
||||
const asn_per_constraints_t *constraints, void **sptr,
|
||||
asn_per_data_t *pd) {
|
||||
asn_SEQUENCE_specifics_t *specs = (asn_SEQUENCE_specifics_t *)td->specifics;
|
||||
asn_SEQUENCE_specifics_t *specs = (asn_SEQUENCE_specifics_t *)td->specifics;
|
||||
void *st = *sptr; /* Target structure. */
|
||||
int extpresent; /* Extension additions are present */
|
||||
uint8_t *opres; /* Presence of optional root members */
|
||||
|
@ -1082,7 +1082,7 @@ SEQUENCE_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
|||
*/
|
||||
for(edx = 0; edx < td->elements_count; edx++) {
|
||||
asn_TYPE_member_t *elm = &td->elements[edx];
|
||||
void *memb_ptr; /* Pointer to the member */
|
||||
void *memb_ptr; /* Pointer to the member */
|
||||
void **memb_ptr2; /* Pointer to that pointer */
|
||||
|
||||
if(IN_EXTENSION_GROUP(specs, edx))
|
||||
|
@ -1121,13 +1121,13 @@ SEQUENCE_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
|||
/* Fetch the member from the stream */
|
||||
ASN_DEBUG("Decoding member \"%s\" in %s", elm->name, td->name);
|
||||
|
||||
if((elm->flags & ATF_OPEN_TYPE) && elm->type_selector) {
|
||||
rv = OPEN_TYPE_uper_get(opt_codec_ctx, td, st, elm, pd);
|
||||
} else {
|
||||
rv = elm->type->uper_decoder(opt_codec_ctx, elm->type,
|
||||
elm->per_constraints, memb_ptr2, pd);
|
||||
}
|
||||
if(rv.code != RC_OK) {
|
||||
if((elm->flags & ATF_OPEN_TYPE) && elm->type_selector) {
|
||||
rv = OPEN_TYPE_uper_get(opt_codec_ctx, td, st, elm, pd);
|
||||
} else {
|
||||
rv = elm->type->op->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);
|
||||
|
@ -1304,7 +1304,7 @@ asn_enc_rval_t
|
|||
SEQUENCE_encode_uper(asn_TYPE_descriptor_t *td,
|
||||
const asn_per_constraints_t *constraints, void *sptr,
|
||||
asn_per_outp_t *po) {
|
||||
asn_SEQUENCE_specifics_t *specs
|
||||
asn_SEQUENCE_specifics_t *specs
|
||||
= (asn_SEQUENCE_specifics_t *)td->specifics;
|
||||
asn_enc_rval_t er;
|
||||
int n_extensions;
|
||||
|
@ -1327,7 +1327,7 @@ SEQUENCE_encode_uper(asn_TYPE_descriptor_t *td,
|
|||
*/
|
||||
if(specs->ext_before >= 0) {
|
||||
n_extensions = SEQUENCE_handle_extensions(td, sptr, 0, 0);
|
||||
if(n_extensions < 0)
|
||||
if(n_extensions < 0)
|
||||
ASN__ENCODE_FAILED;
|
||||
if(per_put_few_bits(po, n_extensions ? 1 : 0, 1))
|
||||
ASN__ENCODE_FAILED;
|
||||
|
@ -1405,7 +1405,7 @@ SEQUENCE_encode_uper(asn_TYPE_descriptor_t *td,
|
|||
continue;
|
||||
|
||||
ASN_DEBUG("Encoding %s->%s", td->name, elm->name);
|
||||
er = elm->type->uper_encoder(elm->type, elm->per_constraints,
|
||||
er = elm->type->op->uper_encoder(elm->type, elm->per_constraints,
|
||||
*memb_ptr2, po);
|
||||
if(er.encoded == -1)
|
||||
return er;
|
||||
|
@ -1460,10 +1460,36 @@ SEQUENCE_compare(const asn_TYPE_descriptor_t *td, const void *aptr,
|
|||
bmemb = (const void *)((const char *)bptr + elm->memb_offset);
|
||||
}
|
||||
|
||||
ret = elm->type->compare_struct(elm->type, amemb, bmemb);
|
||||
ret = elm->type->op->compare_struct(elm->type, amemb, bmemb);
|
||||
if(ret != 0) return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
asn_TYPE_operation_t asn_OP_SEQUENCE = {
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_compare,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
#ifdef ASN_DISABLE_OER_SUPPORT
|
||||
0,
|
||||
0,
|
||||
#else
|
||||
SEQUENCE_decode_oer,
|
||||
SEQUENCE_encode_oer,
|
||||
#endif /* ASN_DISABLE_OER_SUPPORT */
|
||||
#ifdef ASN_DISABLE_PER_SUPPORT
|
||||
0,
|
||||
0,
|
||||
#else
|
||||
SEQUENCE_decode_uper,
|
||||
SEQUENCE_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
|
||||
|
|
|
@ -22,21 +22,21 @@ typedef const struct asn_SEQUENCE_specifics_s {
|
|||
* Tags to members mapping table (sorted).
|
||||
*/
|
||||
const asn_TYPE_tag2member_t *tag2el;
|
||||
unsigned tag2el_count;
|
||||
unsigned tag2el_count;
|
||||
|
||||
/*
|
||||
/*
|
||||
* Optional members of the extensions root (roms) or additions (aoms).
|
||||
* Meaningful for PER.
|
||||
*/
|
||||
const int *oms; /* Optional MemberS */
|
||||
unsigned roms_count; /* Root optional members count */
|
||||
unsigned aoms_count; /* Additions optional members count */
|
||||
const int *oms; /* Optional MemberS */
|
||||
unsigned roms_count; /* Root optional members count */
|
||||
unsigned aoms_count; /* Additions optional members count */
|
||||
|
||||
/*
|
||||
/*
|
||||
* Description of an extensions group.
|
||||
*/
|
||||
signed ext_after; /* Extensions start after this member */
|
||||
signed ext_before; /* Extensions stop before this member */
|
||||
signed ext_after; /* Extensions start after this member */
|
||||
signed ext_before; /* Extensions stop before this member */
|
||||
} asn_SEQUENCE_specifics_t;
|
||||
|
||||
|
||||
|
@ -55,6 +55,7 @@ oer_type_decoder_f SEQUENCE_decode_oer;
|
|||
oer_type_encoder_f SEQUENCE_encode_oer;
|
||||
per_type_decoder_f SEQUENCE_decode_uper;
|
||||
per_type_encoder_f SEQUENCE_encode_uper;
|
||||
extern asn_TYPE_operation_t asn_OP_SEQUENCE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ SEQUENCE_OF_encode_der(asn_TYPE_descriptor_t *td, void *ptr,
|
|||
for(edx = 0; edx < list->count; edx++) {
|
||||
void *memb_ptr = list->array[edx];
|
||||
if(!memb_ptr) continue;
|
||||
erval = elm->type->der_encoder(elm->type, memb_ptr,
|
||||
erval = elm->type->op->der_encoder(elm->type, memb_ptr,
|
||||
0, elm->tag,
|
||||
0, 0);
|
||||
if(erval.encoded == -1)
|
||||
|
@ -63,7 +63,7 @@ SEQUENCE_OF_encode_der(asn_TYPE_descriptor_t *td, void *ptr,
|
|||
for(edx = 0; edx < list->count; edx++) {
|
||||
void *memb_ptr = list->array[edx];
|
||||
if(!memb_ptr) continue;
|
||||
erval = elm->type->der_encoder(elm->type, memb_ptr,
|
||||
erval = elm->type->op->der_encoder(elm->type, memb_ptr,
|
||||
0, elm->tag,
|
||||
cb, app_key);
|
||||
if(erval.encoded == -1)
|
||||
|
@ -115,7 +115,7 @@ SEQUENCE_OF_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
|
|||
ASN__CALLBACK3("<", 1, mname, mlen, ">", 1);
|
||||
}
|
||||
|
||||
tmper = elm->type->xer_encoder(elm->type, memb_ptr,
|
||||
tmper = elm->type->op->xer_encoder(elm->type, memb_ptr,
|
||||
ilevel + 1, flags, cb, app_key);
|
||||
if(tmper.encoded == -1) return tmper;
|
||||
if(tmper.encoded == 0 && specs->as_XMLValueList) {
|
||||
|
@ -144,7 +144,7 @@ asn_enc_rval_t
|
|||
SEQUENCE_OF_encode_uper(asn_TYPE_descriptor_t *td,
|
||||
const asn_per_constraints_t *constraints, void *sptr,
|
||||
asn_per_outp_t *po) {
|
||||
asn_anonymous_sequence_ *list;
|
||||
asn_anonymous_sequence_ *list;
|
||||
const asn_per_constraint_t *ct;
|
||||
asn_enc_rval_t er;
|
||||
asn_TYPE_member_t *elm = td->elements;
|
||||
|
@ -197,7 +197,7 @@ SEQUENCE_OF_encode_uper(asn_TYPE_descriptor_t *td,
|
|||
while(mayEncode--) {
|
||||
void *memb_ptr = list->array[seq++];
|
||||
if(!memb_ptr) ASN__ENCODE_FAILED;
|
||||
er = elm->type->uper_encoder(elm->type,
|
||||
er = elm->type->op->uper_encoder(elm->type,
|
||||
elm->per_constraints, memb_ptr, po);
|
||||
if(er.encoded == -1)
|
||||
ASN__ENCODE_FAILED;
|
||||
|
@ -207,3 +207,29 @@ SEQUENCE_OF_encode_uper(asn_TYPE_descriptor_t *td,
|
|||
ASN__ENCODED_OK(er);
|
||||
}
|
||||
|
||||
asn_TYPE_operation_t asn_OP_SEQUENCE_OF = {
|
||||
SEQUENCE_OF_free,
|
||||
SEQUENCE_OF_print,
|
||||
SEQUENCE_OF_compare,
|
||||
SEQUENCE_OF_constraint,
|
||||
SEQUENCE_OF_decode_ber,
|
||||
SEQUENCE_OF_encode_der,
|
||||
SEQUENCE_OF_decode_xer,
|
||||
SEQUENCE_OF_encode_xer,
|
||||
#ifdef ASN_DISABLE_OER_SUPPORT
|
||||
0,
|
||||
0,
|
||||
#else
|
||||
0,
|
||||
0,
|
||||
#endif /* ASN_DISABLE_OER_SUPPORT */
|
||||
#ifdef ASN_DISABLE_PER_SUPPORT
|
||||
0,
|
||||
0,
|
||||
#else
|
||||
SEQUENCE_OF_decode_uper,
|
||||
SEQUENCE_OF_encode_uper,
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ extern "C" {
|
|||
*/
|
||||
#define SEQUENCE_OF_free SET_OF_free
|
||||
#define SEQUENCE_OF_print SET_OF_print
|
||||
#define SEQUENCE_OF_compare SET_OF_compare
|
||||
#define SEQUENCE_OF_compare SET_OF_compare
|
||||
#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
|
||||
|
@ -26,6 +26,7 @@ extern "C" {
|
|||
der_type_encoder_f SEQUENCE_OF_encode_der;
|
||||
xer_type_encoder_f SEQUENCE_OF_encode_xer;
|
||||
per_type_encoder_f SEQUENCE_OF_encode_uper;
|
||||
extern asn_TYPE_operation_t asn_OP_SEQUENCE_OF;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -201,7 +201,7 @@ SEQUENCE_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
|||
memb_ptr2 = &memb_tmpptr; /* Ensure remains in scope! */
|
||||
}
|
||||
|
||||
rval = elm->type->oer_decoder(opt_codec_ctx, elm->type,
|
||||
rval = elm->type->op->oer_decoder(opt_codec_ctx, elm->type,
|
||||
elm->oer_constraints, memb_ptr2,
|
||||
ptr, size);
|
||||
}
|
||||
|
@ -458,11 +458,11 @@ SEQUENCE_encode_oer(asn_TYPE_descriptor_t *td,
|
|||
/* Mandatory element is missing */
|
||||
ASN__ENCODE_FAILED;
|
||||
}
|
||||
if(!elm->type->oer_encoder) {
|
||||
if(!elm->type->op->oer_encoder) {
|
||||
ASN_DEBUG("OER encoder is not defined for type %s", elm->type->name);
|
||||
ASN__ENCODE_FAILED;
|
||||
}
|
||||
er = elm->type->oer_encoder(elm->type, elm->oer_constraints, memb_ptr,
|
||||
er = elm->type->op->oer_encoder(elm->type, elm->oer_constraints, memb_ptr,
|
||||
cb, app_key);
|
||||
if(er.encoded == -1) {
|
||||
ASN_DEBUG("... while encoding %s member \"%s\"\n", td->name,
|
||||
|
@ -517,7 +517,7 @@ SEQUENCE_encode_oer(asn_TYPE_descriptor_t *td,
|
|||
void *memb_ptr = element_ptr(sptr, elm);
|
||||
|
||||
if(memb_ptr) {
|
||||
asn_enc_rval_t er = elm->type->oer_encoder(
|
||||
asn_enc_rval_t er = elm->type->op->oer_encoder(
|
||||
elm->type, elm->oer_constraints, memb_ptr, cb, app_key);
|
||||
if(er.encoded == -1) {
|
||||
return er;
|
||||
|
|
|
@ -296,7 +296,7 @@ SET_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
|||
/*
|
||||
* Invoke the member fetch routine according to member's type
|
||||
*/
|
||||
rval = elements[edx].type->ber_decoder(opt_codec_ctx,
|
||||
rval = elements[edx].type->op->ber_decoder(opt_codec_ctx,
|
||||
elements[edx].type,
|
||||
memb_ptr2, ptr, LEFT,
|
||||
elements[edx].tag_mode);
|
||||
|
@ -488,7 +488,7 @@ SET_encode_der(asn_TYPE_descriptor_t *td,
|
|||
} else {
|
||||
memb_ptr = (void *)((char *)sptr + elm->memb_offset);
|
||||
}
|
||||
tmper = elm->type->der_encoder(elm->type, memb_ptr,
|
||||
tmper = elm->type->op->der_encoder(elm->type, memb_ptr,
|
||||
elm->tag_mode, elm->tag,
|
||||
0, 0);
|
||||
if(tmper.encoded == -1)
|
||||
|
@ -555,7 +555,7 @@ SET_encode_der(asn_TYPE_descriptor_t *td,
|
|||
} else {
|
||||
memb_ptr = (void *)((char *)sptr + elm->memb_offset);
|
||||
}
|
||||
tmper = elm->type->der_encoder(elm->type, memb_ptr,
|
||||
tmper = elm->type->op->der_encoder(elm->type, memb_ptr,
|
||||
elm->tag_mode, elm->tag,
|
||||
cb, app_key);
|
||||
if(tmper.encoded == -1)
|
||||
|
@ -658,7 +658,7 @@ SET_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
|||
}
|
||||
|
||||
/* Invoke the inner type decoder, m.b. multiple times */
|
||||
tmprval = elm->type->xer_decoder(opt_codec_ctx,
|
||||
tmprval = elm->type->op->xer_decoder(opt_codec_ctx,
|
||||
elm->type, memb_ptr2, elm->name,
|
||||
buf_ptr, size);
|
||||
XER_ADVANCE(tmprval.consumed);
|
||||
|
@ -846,7 +846,7 @@ SET_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
|
|||
ASN__CALLBACK3("<", 1, mname, mlen, ">", 1);
|
||||
|
||||
/* Print the member itself */
|
||||
tmper = elm->type->xer_encoder(elm->type, memb_ptr,
|
||||
tmper = elm->type->op->xer_encoder(elm->type, memb_ptr,
|
||||
ilevel + 1, flags, cb, app_key);
|
||||
if(tmper.encoded == -1) return tmper;
|
||||
|
||||
|
@ -898,7 +898,7 @@ SET_print(asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
|
|||
return -1;
|
||||
|
||||
/* Print the member itself */
|
||||
ret = elm->type->print_struct(elm->type, memb_ptr, ilevel + 1,
|
||||
ret = elm->type->op->print_struct(elm->type, memb_ptr, ilevel + 1,
|
||||
cb, app_key);
|
||||
if(ret) return ret;
|
||||
}
|
||||
|
@ -911,7 +911,7 @@ SET_print(asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
|
|||
|
||||
void
|
||||
SET_free(const asn_TYPE_descriptor_t *td, void *ptr, int contents_only) {
|
||||
size_t edx;
|
||||
size_t edx;
|
||||
|
||||
if(!td || !ptr)
|
||||
return;
|
||||
|
@ -997,7 +997,7 @@ SET_compare(const asn_TYPE_descriptor_t *td, const void *aptr,
|
|||
asn_TYPE_member_t *elm = &td->elements[edx];
|
||||
const void *amemb;
|
||||
const void *bmemb;
|
||||
int ret;
|
||||
int ret;
|
||||
|
||||
if(elm->flags & ATF_POINTER) {
|
||||
amemb =
|
||||
|
@ -1015,10 +1015,25 @@ SET_compare(const asn_TYPE_descriptor_t *td, const void *aptr,
|
|||
bmemb = (const void *)((const char *)bptr + elm->memb_offset);
|
||||
}
|
||||
|
||||
ret = elm->type->compare_struct(elm->type, amemb, bmemb);
|
||||
ret = elm->type->op->compare_struct(elm->type, amemb, bmemb);
|
||||
if(ret != 0) return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
asn_TYPE_operation_t asn_OP_SET = {
|
||||
SET_free,
|
||||
SET_print,
|
||||
SET_compare,
|
||||
SET_constraint,
|
||||
SET_decode_ber,
|
||||
SET_encode_der,
|
||||
SET_decode_xer,
|
||||
SET_encode_xer,
|
||||
0, /* SET_decode_uper */
|
||||
0, /* SET_encode_uper */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
|
||||
|
|
|
@ -13,33 +13,33 @@ extern "C" {
|
|||
|
||||
|
||||
typedef const struct asn_SET_specifics_s {
|
||||
/*
|
||||
* Target structure description.
|
||||
*/
|
||||
unsigned struct_size; /* Size of the target structure. */
|
||||
unsigned ctx_offset; /* Offset of the asn_struct_ctx_t member */
|
||||
unsigned pres_offset; /* Offset of _presence_map member */
|
||||
/*
|
||||
* Target structure description.
|
||||
*/
|
||||
unsigned struct_size; /* Size of the target structure. */
|
||||
unsigned ctx_offset; /* Offset of the asn_struct_ctx_t member */
|
||||
unsigned pres_offset; /* Offset of _presence_map member */
|
||||
|
||||
/*
|
||||
* Tags to members mapping table (sorted).
|
||||
* Sometimes suitable for DER encoding (untagged CHOICE is present);
|
||||
* if so, tag2el_count will be greater than td->elements_count.
|
||||
*/
|
||||
const asn_TYPE_tag2member_t *tag2el;
|
||||
unsigned tag2el_count;
|
||||
/*
|
||||
* Tags to members mapping table (sorted).
|
||||
* Sometimes suitable for DER encoding (untagged CHOICE is present);
|
||||
* if so, tag2el_count will be greater than td->elements_count.
|
||||
*/
|
||||
const asn_TYPE_tag2member_t *tag2el;
|
||||
unsigned tag2el_count;
|
||||
|
||||
/*
|
||||
* Tags to members mapping table, second edition.
|
||||
* Suitable for CANONICAL-XER encoding.
|
||||
*/
|
||||
const asn_TYPE_tag2member_t *tag2el_cxer;
|
||||
unsigned tag2el_cxer_count;
|
||||
/*
|
||||
* Tags to members mapping table, second edition.
|
||||
* Suitable for CANONICAL-XER encoding.
|
||||
*/
|
||||
const asn_TYPE_tag2member_t *tag2el_cxer;
|
||||
unsigned tag2el_cxer_count;
|
||||
|
||||
/*
|
||||
* Extensions-related stuff.
|
||||
*/
|
||||
int extensible; /* Whether SET is extensible */
|
||||
const unsigned int *_mandatory_elements; /* Bitmask of mandatory ones */
|
||||
/*
|
||||
* Extensions-related stuff.
|
||||
*/
|
||||
int extensible; /* Whether SET is extensible */
|
||||
const unsigned int *_mandatory_elements; /* Bitmask of mandatory ones */
|
||||
} asn_SET_specifics_t;
|
||||
|
||||
/*
|
||||
|
@ -55,6 +55,7 @@ xer_type_decoder_f SET_decode_xer;
|
|||
xer_type_encoder_f SET_encode_xer;
|
||||
per_type_decoder_f SET_decode_uper;
|
||||
per_type_encoder_f SET_encode_uper;
|
||||
extern asn_TYPE_operation_t asn_OP_SET;
|
||||
|
||||
/***********************
|
||||
* Some handy helpers. *
|
||||
|
|
|
@ -205,7 +205,7 @@ SET_OF_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
|||
/*
|
||||
* Invoke the member fetch routine according to member's type
|
||||
*/
|
||||
rval = elm->type->ber_decoder(opt_codec_ctx,
|
||||
rval = elm->type->op->ber_decoder(opt_codec_ctx,
|
||||
elm->type, &ctx->ptr, ptr, LEFT, 0);
|
||||
ASN_DEBUG("In %s SET OF %s code %d consumed %d",
|
||||
td->name, elm->type->name,
|
||||
|
@ -315,7 +315,7 @@ SET_OF_encode_der(asn_TYPE_descriptor_t *td, void *ptr,
|
|||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
asn_TYPE_member_t *elm = td->elements;
|
||||
asn_TYPE_descriptor_t *elm_type = elm->type;
|
||||
der_type_encoder_f *der_encoder = elm_type->der_encoder;
|
||||
der_type_encoder_f *der_encoder = elm_type->op->der_encoder;
|
||||
asn_anonymous_set_ *list = _A_SET_FROM_VOID(ptr);
|
||||
size_t computed_size = 0;
|
||||
ssize_t encoding_size = 0;
|
||||
|
@ -526,7 +526,7 @@ SET_OF_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
|||
|
||||
/* Invoke the inner type decoder, m.b. multiple times */
|
||||
ASN_DEBUG("XER/SET OF element [%s]", elm_tag);
|
||||
tmprval = element->type->xer_decoder(opt_codec_ctx,
|
||||
tmprval = element->type->op->xer_decoder(opt_codec_ctx,
|
||||
element->type, &ctx->ptr, elm_tag,
|
||||
buf_ptr, size);
|
||||
if(tmprval.code == RC_OK) {
|
||||
|
@ -697,7 +697,7 @@ SET_OF_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
|
|||
|
||||
if(!xcan && specs->as_XMLValueList == 1)
|
||||
ASN__TEXT_INDENT(1, ilevel + 1);
|
||||
tmper = elm->type->xer_encoder(elm->type, memb_ptr,
|
||||
tmper = elm->type->op->xer_encoder(elm->type, memb_ptr,
|
||||
ilevel + (specs->as_XMLValueList != 2),
|
||||
flags, cb, app_key);
|
||||
if(tmper.encoded == -1) {
|
||||
|
@ -776,7 +776,7 @@ SET_OF_print(asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
|
|||
|
||||
_i_INDENT(1);
|
||||
|
||||
ret = elm->type->print_struct(elm->type, memb_ptr,
|
||||
ret = elm->type->op->print_struct(elm->type, memb_ptr,
|
||||
ilevel + 1, cb, app_key);
|
||||
if(ret) return ret;
|
||||
}
|
||||
|
@ -868,7 +868,7 @@ asn_dec_rval_t
|
|||
SET_OF_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
||||
const asn_per_constraints_t *constraints, void **sptr,
|
||||
asn_per_data_t *pd) {
|
||||
asn_dec_rval_t rv;
|
||||
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;
|
||||
|
@ -924,7 +924,7 @@ SET_OF_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
|||
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,
|
||||
rv = elm->type->op->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);
|
||||
|
@ -956,9 +956,31 @@ SET_OF_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
|||
int
|
||||
SET_OF_compare(const asn_TYPE_descriptor_t *td, const void *aptr,
|
||||
const void *bptr) {
|
||||
(void)td;
|
||||
(void)aptr;
|
||||
(void)bptr;
|
||||
/* Not implemented yet. */
|
||||
return 0;
|
||||
(void)td;
|
||||
(void)aptr;
|
||||
(void)bptr;
|
||||
/* Not implemented yet. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
asn_TYPE_operation_t asn_OP_SET_OF = {
|
||||
SET_OF_free,
|
||||
SET_OF_print,
|
||||
SET_OF_compare,
|
||||
SET_OF_constraint,
|
||||
SET_OF_decode_ber,
|
||||
SET_OF_encode_der,
|
||||
SET_OF_decode_xer,
|
||||
SET_OF_encode_xer,
|
||||
0,
|
||||
0,
|
||||
#ifdef ASN_DISABLE_PER_SUPPORT
|
||||
0,
|
||||
0,
|
||||
#else
|
||||
SET_OF_decode_uper,
|
||||
0, /* SET_OF_encode_uper */
|
||||
#endif /* ASN_DISABLE_PER_SUPPORT */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
|
|
|
@ -35,6 +35,7 @@ xer_type_decoder_f SET_OF_decode_xer;
|
|||
xer_type_encoder_f SET_OF_encode_xer;
|
||||
per_type_decoder_f SET_OF_decode_uper;
|
||||
per_type_encoder_f SET_OF_encode_uper;
|
||||
extern asn_TYPE_operation_t asn_OP_SET_OF;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ asn_TYPE_outmost_tag(const asn_TYPE_descriptor_t *type_descriptor,
|
|||
if(type_descriptor->tags_count)
|
||||
return type_descriptor->tags[0];
|
||||
|
||||
return type_descriptor->outmost_tag(type_descriptor, struct_ptr, 0, 0);
|
||||
return type_descriptor->op->outmost_tag(type_descriptor, struct_ptr, 0, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -41,7 +41,7 @@ asn_fprint(FILE *stream, asn_TYPE_descriptor_t *td, const void *struct_ptr) {
|
|||
}
|
||||
|
||||
/* Invoke type-specific printer */
|
||||
if(td->print_struct(td, struct_ptr, 1, _print2fp, stream))
|
||||
if(td->op->print_struct(td, struct_ptr, 1, _print2fp, stream))
|
||||
return -1;
|
||||
|
||||
/* Terminate the output */
|
||||
|
|
|
@ -55,9 +55,9 @@ typedef struct asn_struct_ctx_s {
|
|||
typedef void (asn_struct_free_f)(
|
||||
const struct asn_TYPE_descriptor_s *type_descriptor,
|
||||
void *struct_ptr, int free_contents_only);
|
||||
#define ASN_STRUCT_FREE(asn_DEF, ptr) (asn_DEF).free_struct(&(asn_DEF),ptr,0)
|
||||
#define ASN_STRUCT_FREE(asn_DEF, ptr) (asn_DEF).op->free_struct(&(asn_DEF),ptr,0)
|
||||
#define ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF, ptr) \
|
||||
(asn_DEF).free_struct(&(asn_DEF),ptr,1)
|
||||
(asn_DEF).op->free_struct(&(asn_DEF),ptr,1)
|
||||
|
||||
/*
|
||||
* Print the structure according to its specification.
|
||||
|
@ -104,16 +104,10 @@ typedef asn_type_selector_result_t(asn_type_selector_f)(
|
|||
const void *parent_structure_ptr);
|
||||
|
||||
/*
|
||||
* The definitive description of the destination language's structure.
|
||||
* Generalized functions for dealing with the speciic type.
|
||||
* May be directly invoked by applications.
|
||||
*/
|
||||
typedef struct asn_TYPE_descriptor_s {
|
||||
const char *name; /* A name of the ASN.1 type. "" in some cases. */
|
||||
const char *xml_tag; /* Name used in XML tag */
|
||||
|
||||
/*
|
||||
* Generalized functions for dealing with the specific type.
|
||||
* May be directly invoked by applications.
|
||||
*/
|
||||
typedef struct asn_TYPE_operation_s {
|
||||
asn_struct_free_f *free_struct; /* Free the structure */
|
||||
asn_struct_print_f *print_struct; /* Human readable output */
|
||||
asn_struct_compare_f *compare_struct; /* Compare two structures */
|
||||
|
@ -126,6 +120,22 @@ typedef struct asn_TYPE_descriptor_s {
|
|||
oer_type_encoder_f *oer_encoder; /* Canonical OER encoder */
|
||||
per_type_decoder_f *uper_decoder; /* Unaligned PER decoder */
|
||||
per_type_encoder_f *uper_encoder; /* Unaligned PER encoder */
|
||||
asn_outmost_tag_f *outmost_tag; /* <optional, internal> */
|
||||
} asn_TYPE_operation_t;
|
||||
|
||||
/*
|
||||
* The definitive description of the destination language's structure.
|
||||
*/
|
||||
typedef struct asn_TYPE_descriptor_s {
|
||||
const char *name; /* A name of the ASN.1 type. "" in some cases. */
|
||||
const char *xml_tag; /* Name used in XML tag */
|
||||
|
||||
/*
|
||||
* Generalized functions for dealing with the specific type.
|
||||
* May be directly invoked by applications.
|
||||
*/
|
||||
asn_TYPE_operation_t *op;
|
||||
asn_constr_check_f *check_constraints; /* Constraints validator */
|
||||
|
||||
/***********************************************************************
|
||||
* Internally useful members. Not to be used by applications directly. *
|
||||
|
@ -134,7 +144,6 @@ typedef struct asn_TYPE_descriptor_s {
|
|||
/*
|
||||
* Tags that are expected to occur.
|
||||
*/
|
||||
asn_outmost_tag_f *outmost_tag; /* <optional, internal> */
|
||||
const ber_tlv_tag_t *tags; /* Effective tags sequence for this type */
|
||||
unsigned tags_count; /* Number of tags which are expected */
|
||||
const ber_tlv_tag_t *all_tags; /* Every tag for BER/containment */
|
||||
|
|
|
@ -94,9 +94,9 @@ main(int ac, char *av[]) {
|
|||
int ch;
|
||||
|
||||
/* Figure out if specialty decoder needs to be default */
|
||||
if(pduType->oer_decoder)
|
||||
if(pduType->op->oer_decoder)
|
||||
iform = INP_OER;
|
||||
else if(pduType->uper_decoder)
|
||||
else if(pduType->op->uper_decoder)
|
||||
iform = INP_PER;
|
||||
|
||||
/*
|
||||
|
@ -107,18 +107,18 @@ main(int ac, char *av[]) {
|
|||
case 'i':
|
||||
if(optarg[0] == 'b') { iform = INP_BER; break; }
|
||||
if(optarg[0] == 'x') { iform = INP_XER; break; }
|
||||
if(pduType->oer_decoder
|
||||
if(pduType->op->oer_decoder
|
||||
&& optarg[0] == 'o') { iform = INP_OER; break; }
|
||||
if(pduType->uper_decoder
|
||||
if(pduType->op->uper_decoder
|
||||
&& optarg[0] == 'p') { iform = INP_PER; break; }
|
||||
fprintf(stderr, "-i<format>: '%s': improper format selector\n",
|
||||
optarg);
|
||||
exit(EX_UNAVAILABLE);
|
||||
case 'o':
|
||||
if(optarg[0] == 'd') { oform = OUT_DER; break; }
|
||||
if(pduType->oer_encoder
|
||||
if(pduType->op->oer_encoder
|
||||
&& optarg[0] == 'o') { oform = OUT_OER; break; }
|
||||
if(pduType->uper_encoder
|
||||
if(pduType->op->uper_encoder
|
||||
&& optarg[0] == 'p') { oform = OUT_PER; break; }
|
||||
if(optarg[0] == 'x') { oform = OUT_XER; break; }
|
||||
if(optarg[0] == 't') { oform = OUT_TEXT; break; }
|
||||
|
@ -215,11 +215,11 @@ main(int ac, char *av[]) {
|
|||
#endif
|
||||
fprintf(stderr, "Usage: %s [options] <data.ber> ...\n", av[0]);
|
||||
fprintf(stderr, "Where options are:\n");
|
||||
if(pduType->oer_decoder)
|
||||
if(pduType->op->oer_decoder)
|
||||
fprintf(stderr,
|
||||
" -ioer Input is in OER (Octet Encoding Rules)%s\n",
|
||||
iform == INP_OER ? " (DEFAULT)" : "");
|
||||
if(pduType->uper_decoder)
|
||||
if(pduType->op->uper_decoder)
|
||||
fprintf(stderr,
|
||||
" -iper Input is in Unaligned PER (Packed Encoding Rules)%s\n",
|
||||
iform == INP_PER ? " (DEFAULT)" : "");
|
||||
|
@ -228,10 +228,10 @@ main(int ac, char *av[]) {
|
|||
iform == INP_BER ? " (DEFAULT)" : "");
|
||||
fprintf(stderr,
|
||||
" -ixer Input is in XER (XML Encoding Rules)\n");
|
||||
if(pduType->oer_encoder)
|
||||
if(pduType->op->oer_encoder)
|
||||
fprintf(stderr,
|
||||
" -ooer Output in Canonical OER (Octet Encoding Rules)\n");
|
||||
if(pduType->uper_encoder)
|
||||
if(pduType->op->uper_encoder)
|
||||
fprintf(stderr,
|
||||
" -oper Output in Unaligned PER (Packed Encoding Rules)\n");
|
||||
fprintf(stderr,
|
||||
|
@ -239,7 +239,7 @@ main(int ac, char *av[]) {
|
|||
" -oxer Output in XER (XML Encoding Rules) (DEFAULT)\n"
|
||||
" -otext Output in plain semi-structured text (dump)\n"
|
||||
" -onull Verify (decode) input, but do not output\n");
|
||||
if(pduType->uper_decoder)
|
||||
if(pduType->op->uper_decoder)
|
||||
fprintf(stderr,
|
||||
" -per-nopad Assume PER PDUs are not padded (-iper)\n");
|
||||
#ifdef ASN_PDU_COLLECTION
|
||||
|
|
|
@ -21,7 +21,7 @@ der_encode(asn_TYPE_descriptor_t *type_descriptor, void *struct_ptr,
|
|||
/*
|
||||
* Invoke type-specific encoder.
|
||||
*/
|
||||
return type_descriptor->der_encoder(type_descriptor,
|
||||
return type_descriptor->op->der_encoder(type_descriptor,
|
||||
struct_ptr, /* Pointer to the destination structure */
|
||||
0, 0,
|
||||
consume_bytes, app_key);
|
||||
|
@ -59,7 +59,7 @@ der_encode_to_buffer(asn_TYPE_descriptor_t *type_descriptor, void *struct_ptr,
|
|||
arg.buffer = buffer;
|
||||
arg.left = buffer_size;
|
||||
|
||||
ec = type_descriptor->der_encoder(type_descriptor,
|
||||
ec = type_descriptor->op->der_encoder(type_descriptor,
|
||||
struct_ptr, /* Pointer to the destination structure */
|
||||
0, 0, encode_to_buffer_cb, &arg);
|
||||
if(ec.encoded != -1) {
|
||||
|
|
|
@ -32,7 +32,7 @@ oer_decode(asn_codec_ctx_t *opt_codec_ctx,
|
|||
/*
|
||||
* Invoke type-specific decoder.
|
||||
*/
|
||||
return type_descriptor->oer_decoder(opt_codec_ctx, type_descriptor, 0,
|
||||
return type_descriptor->op->oer_decoder(opt_codec_ctx, type_descriptor, 0,
|
||||
struct_ptr, /* Pointer to the destination structure */
|
||||
ptr, size /* Buffer and its size */
|
||||
);
|
||||
|
@ -80,7 +80,7 @@ oer_open_type_get(asn_codec_ctx_t *opt_codec_ctx,
|
|||
return 0;
|
||||
}
|
||||
|
||||
dr = td->oer_decoder(opt_codec_ctx, td, constraints, struct_ptr,
|
||||
dr = td->op->oer_decoder(opt_codec_ctx, td, constraints, struct_ptr,
|
||||
(const uint8_t *)bufptr + len_len, container_len);
|
||||
if(dr.code == RC_OK) {
|
||||
return len_len + container_len;
|
||||
|
|
|
@ -17,7 +17,7 @@ oer_encode(asn_TYPE_descriptor_t *type_descriptor, void *struct_ptr,
|
|||
/*
|
||||
* Invoke type-specific encoder.
|
||||
*/
|
||||
return type_descriptor->oer_encoder(type_descriptor, 0,
|
||||
return type_descriptor->op->oer_encoder(type_descriptor, 0,
|
||||
struct_ptr, /* Pointer to the destination structure */
|
||||
consume_bytes, app_key);
|
||||
}
|
||||
|
@ -58,14 +58,14 @@ oer_encode_to_buffer(struct asn_TYPE_descriptor_s *type_descriptor,
|
|||
arg.buffer = buffer;
|
||||
arg.left = buffer_size;
|
||||
|
||||
if(type_descriptor->oer_encoder == NULL) {
|
||||
if(type_descriptor->op->oer_encoder == NULL) {
|
||||
ec.encoded = -1;
|
||||
ec.failed_type = type_descriptor;
|
||||
ec.structure_ptr = struct_ptr;
|
||||
ASN_DEBUG("OER encoder is not defined for %s",
|
||||
type_descriptor->name);
|
||||
} else {
|
||||
ec = type_descriptor->oer_encoder(
|
||||
ec = type_descriptor->op->oer_encoder(
|
||||
type_descriptor, constraints,
|
||||
struct_ptr, /* Pointer to the destination structure */
|
||||
encode_to_buffer_cb, &arg);
|
||||
|
|
|
@ -74,9 +74,9 @@ uper_decode(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, void **sp
|
|||
/*
|
||||
* Invoke type-specific decoder.
|
||||
*/
|
||||
if(!td->uper_decoder)
|
||||
if(!td->op->uper_decoder)
|
||||
ASN__DECODE_FAILED; /* PER is not compiled in */
|
||||
rval = td->uper_decoder(opt_codec_ctx, td, 0, sptr, &pd);
|
||||
rval = td->op->uper_decoder(opt_codec_ctx, td, 0, sptr, &pd);
|
||||
if(rval.code == RC_OK) {
|
||||
/* Return the number of consumed bits */
|
||||
rval.consumed = ((pd.buffer - (const uint8_t *)buffer) << 3)
|
||||
|
|
|
@ -121,13 +121,13 @@ static asn_enc_rval_t
|
|||
uper_encode_internal(asn_TYPE_descriptor_t *td,
|
||||
const asn_per_constraints_t *constraints, void *sptr,
|
||||
asn_app_consume_bytes_f *cb, void *app_key) {
|
||||
asn_per_outp_t po;
|
||||
asn_per_outp_t po;
|
||||
asn_enc_rval_t er;
|
||||
|
||||
/*
|
||||
* Invoke type-specific encoder.
|
||||
*/
|
||||
if(!td || !td->uper_encoder)
|
||||
if(!td || !td->op->uper_encoder)
|
||||
ASN__ENCODE_FAILED; /* PER is not compiled in */
|
||||
|
||||
po.buffer = po.tmpspace;
|
||||
|
@ -137,7 +137,7 @@ uper_encode_internal(asn_TYPE_descriptor_t *td,
|
|||
po.op_key = app_key;
|
||||
po.flushed_bytes = 0;
|
||||
|
||||
er = td->uper_encoder(td, constraints, sptr, &po);
|
||||
er = td->op->uper_encoder(td, constraints, sptr, &po);
|
||||
if(er.encoded != -1) {
|
||||
size_t bits_to_flush;
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ uper_open_type_get_simple(asn_codec_ctx_t *ctx, asn_TYPE_descriptor_t *td,
|
|||
spd.nbits = bufLen << 3;
|
||||
|
||||
ASN_DEBUG_INDENT_ADD(+4);
|
||||
rv = td->uper_decoder(ctx, td, constraints, sptr, &spd);
|
||||
rv = td->op->uper_decoder(ctx, td, constraints, sptr, &spd);
|
||||
ASN_DEBUG_INDENT_ADD(-4);
|
||||
|
||||
if(rv.code == RC_OK) {
|
||||
|
@ -155,7 +155,7 @@ uper_open_type_get_complex(asn_codec_ctx_t *ctx, asn_TYPE_descriptor_t *td,
|
|||
pd->moved = 0; /* This now counts the open type size in bits */
|
||||
|
||||
ASN_DEBUG_INDENT_ADD(+4);
|
||||
rv = td->uper_decoder(ctx, td, constraints, sptr, pd);
|
||||
rv = td->op->uper_decoder(ctx, td, constraints, sptr, pd);
|
||||
ASN_DEBUG_INDENT_ADD(-4);
|
||||
|
||||
#define UPDRESTOREPD do { \
|
||||
|
@ -257,7 +257,7 @@ uper_open_type_skip(asn_codec_ctx_t *ctx, asn_per_data_t *pd) {
|
|||
asn_dec_rval_t rv;
|
||||
|
||||
s_td.name = "<unknown extension>";
|
||||
s_td.uper_decoder = uper_sot_suck;
|
||||
s_td.op->uper_decoder = uper_sot_suck;
|
||||
|
||||
rv = uper_open_type_get(ctx, &s_td, 0, 0, pd);
|
||||
if(rv.code != RC_OK)
|
||||
|
|
|
@ -166,7 +166,7 @@ check_xer(int tofail, char *xmldata, long orig_value) {
|
|||
|
||||
assert(value == orig_value);
|
||||
|
||||
asn_DEF_INTEGER.free_struct(&asn_DEF_INTEGER, st, 0);
|
||||
ASN_STRUCT_FREE(asn_DEF_INTEGER, st);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -40,7 +40,7 @@ check_decode(int lineno, enum asn_dec_rval_code_e code, intmax_t control, const
|
|||
|
||||
(void)dummy;
|
||||
|
||||
ret = asn_DEF_INTEGER.oer_decoder(0, &asn_DEF_INTEGER, constraints,
|
||||
ret = asn_DEF_INTEGER.op->oer_decoder(0, &asn_DEF_INTEGER, constraints,
|
||||
(void **)&st, buf, size);
|
||||
if(ret.code != RC_OK) {
|
||||
/* Basic OER decode does not work */
|
||||
|
@ -124,7 +124,7 @@ check_roundtrip(int lineno, intmax_t value, intmax_t lower_bound, intmax_t upper
|
|||
|
||||
dump_data(lineno, tmpbuf, tmpbuf_size);
|
||||
|
||||
ret = asn_DEF_INTEGER.oer_decoder(0, &asn_DEF_INTEGER, constraints,
|
||||
ret = asn_DEF_INTEGER.op->oer_decoder(0, &asn_DEF_INTEGER, constraints,
|
||||
(void **)&stIn, tmpbuf, tmpbuf_size);
|
||||
if(ret.code != RC_OK) {
|
||||
/* Basic OER decode does not work */
|
||||
|
|
|
@ -246,7 +246,7 @@ static void check_xer(int expect_arcs, char *xer) {
|
|||
int i;
|
||||
|
||||
printf("[%s] => ", xer); fflush(stdout);
|
||||
rc = asn_DEF_RELATIVE_OID.xer_decoder(0,
|
||||
rc = asn_DEF_RELATIVE_OID.op->xer_decoder(0,
|
||||
&asn_DEF_RELATIVE_OID, (void **)stp, "t",
|
||||
xer, strlen(xer));
|
||||
if(expect_arcs == -1) {
|
||||
|
|
|
@ -74,8 +74,8 @@ check(size_t size) {
|
|||
}
|
||||
|
||||
|
||||
asn_DEF_OCTET_STRING.free_struct(&asn_DEF_OCTET_STRING, os, 0);
|
||||
asn_DEF_OCTET_STRING.free_struct(&asn_DEF_OCTET_STRING, nos, 0);
|
||||
ASN_STRUCT_FREE(asn_DEF_OCTET_STRING, os);
|
||||
ASN_STRUCT_FREE(asn_DEF_OCTET_STRING, nos);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -34,7 +34,7 @@ xer_decode(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
|
|||
/*
|
||||
* Invoke type-specific decoder.
|
||||
*/
|
||||
return td->xer_decoder(opt_codec_ctx, td, struct_ptr, 0, buffer, size);
|
||||
return td->op->xer_decoder(opt_codec_ctx, td, struct_ptr, 0, buffer, size);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ xer_encode(asn_TYPE_descriptor_t *td, void *sptr,
|
|||
|
||||
ASN__CALLBACK3("<", 1, mname, mlen, ">", 1);
|
||||
|
||||
tmper = td->xer_encoder(td, sptr, 1, xer_flags, cb, app_key);
|
||||
tmper = td->op->xer_encoder(td, sptr, 1, xer_flags, cb, app_key);
|
||||
if(tmper.encoded == -1) return tmper;
|
||||
|
||||
ASN__CALLBACK3("</", 2, mname, mlen, ">\n", xcan);
|
||||
|
|
|
@ -68,17 +68,8 @@ static const ber_tlv_tag_t asn_DEF_Enum1_tags_1[] = {
|
|||
asn_TYPE_descriptor_t asn_DEF_Enum1 = {
|
||||
"Enum1",
|
||||
"Enum1",
|
||||
ENUMERATED_free,
|
||||
ENUMERATED_print,
|
||||
ENUMERATED_compare,
|
||||
&asn_OP_ENUMERATED,
|
||||
ENUMERATED_constraint,
|
||||
ENUMERATED_decode_ber,
|
||||
ENUMERATED_encode_der,
|
||||
ENUMERATED_decode_xer,
|
||||
ENUMERATED_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_Enum1_tags_1,
|
||||
sizeof(asn_DEF_Enum1_tags_1)
|
||||
/sizeof(asn_DEF_Enum1_tags_1[0]), /* 1 */
|
||||
|
@ -170,17 +161,8 @@ static const ber_tlv_tag_t asn_DEF_Enum2_tags_1[] = {
|
|||
asn_TYPE_descriptor_t asn_DEF_Enum2 = {
|
||||
"Enum2",
|
||||
"Enum2",
|
||||
ENUMERATED_free,
|
||||
ENUMERATED_print,
|
||||
ENUMERATED_compare,
|
||||
&asn_OP_ENUMERATED,
|
||||
ENUMERATED_constraint,
|
||||
ENUMERATED_decode_ber,
|
||||
ENUMERATED_encode_der,
|
||||
ENUMERATED_decode_xer,
|
||||
ENUMERATED_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_Enum2_tags_1,
|
||||
sizeof(asn_DEF_Enum2_tags_1)
|
||||
/sizeof(asn_DEF_Enum2_tags_1[0]), /* 1 */
|
||||
|
@ -260,17 +242,8 @@ static const ber_tlv_tag_t asn_DEF_Enum3_tags_1[] = {
|
|||
asn_TYPE_descriptor_t asn_DEF_Enum3 = {
|
||||
"Enum3",
|
||||
"Enum3",
|
||||
ENUMERATED_free,
|
||||
ENUMERATED_print,
|
||||
ENUMERATED_compare,
|
||||
&asn_OP_ENUMERATED,
|
||||
ENUMERATED_constraint,
|
||||
ENUMERATED_decode_ber,
|
||||
ENUMERATED_encode_der,
|
||||
ENUMERATED_decode_xer,
|
||||
ENUMERATED_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_Enum3_tags_1,
|
||||
sizeof(asn_DEF_Enum3_tags_1)
|
||||
/sizeof(asn_DEF_Enum3_tags_1[0]), /* 1 */
|
||||
|
@ -353,17 +326,8 @@ static const ber_tlv_tag_t asn_DEF_Enum4_tags_1[] = {
|
|||
asn_TYPE_descriptor_t asn_DEF_Enum4 = {
|
||||
"Enum4",
|
||||
"Enum4",
|
||||
ENUMERATED_free,
|
||||
ENUMERATED_print,
|
||||
ENUMERATED_compare,
|
||||
&asn_OP_ENUMERATED,
|
||||
ENUMERATED_constraint,
|
||||
ENUMERATED_decode_ber,
|
||||
ENUMERATED_encode_der,
|
||||
ENUMERATED_decode_xer,
|
||||
ENUMERATED_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_Enum4_tags_1,
|
||||
sizeof(asn_DEF_Enum4_tags_1)
|
||||
/sizeof(asn_DEF_Enum4_tags_1[0]), /* 1 */
|
||||
|
@ -443,17 +407,8 @@ static const ber_tlv_tag_t asn_DEF_Enum5_tags_1[] = {
|
|||
asn_TYPE_descriptor_t asn_DEF_Enum5 = {
|
||||
"Enum5",
|
||||
"Enum5",
|
||||
ENUMERATED_free,
|
||||
ENUMERATED_print,
|
||||
ENUMERATED_compare,
|
||||
&asn_OP_ENUMERATED,
|
||||
ENUMERATED_constraint,
|
||||
ENUMERATED_decode_ber,
|
||||
ENUMERATED_encode_der,
|
||||
ENUMERATED_decode_xer,
|
||||
ENUMERATED_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_Enum5_tags_1,
|
||||
sizeof(asn_DEF_Enum5_tags_1)
|
||||
/sizeof(asn_DEF_Enum5_tags_1[0]), /* 1 */
|
||||
|
|
|
@ -56,17 +56,8 @@ asn_SET_OF_specifics_t asn_SPC_Collection_16P0_specs_1 = {
|
|||
asn_TYPE_descriptor_t asn_DEF_Collection_16P0 = {
|
||||
"Collection",
|
||||
"Collection",
|
||||
SET_OF_free,
|
||||
SET_OF_print,
|
||||
SET_OF_compare,
|
||||
&asn_OP_SET_OF,
|
||||
SET_OF_constraint,
|
||||
SET_OF_decode_ber,
|
||||
SET_OF_encode_der,
|
||||
SET_OF_decode_xer,
|
||||
SET_OF_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_Collection_16P0_tags_1,
|
||||
sizeof(asn_DEF_Collection_16P0_tags_1)
|
||||
/sizeof(asn_DEF_Collection_16P0_tags_1[0]), /* 1 */
|
||||
|
@ -104,17 +95,8 @@ asn_SET_OF_specifics_t asn_SPC_Collection_16P1_specs_3 = {
|
|||
asn_TYPE_descriptor_t asn_DEF_Collection_16P1 = {
|
||||
"Collection",
|
||||
"Collection",
|
||||
SET_OF_free,
|
||||
SET_OF_print,
|
||||
SET_OF_compare,
|
||||
&asn_OP_SET_OF,
|
||||
SET_OF_constraint,
|
||||
SET_OF_decode_ber,
|
||||
SET_OF_encode_der,
|
||||
SET_OF_decode_xer,
|
||||
SET_OF_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_Collection_16P1_tags_3,
|
||||
sizeof(asn_DEF_Collection_16P1_tags_3)
|
||||
/sizeof(asn_DEF_Collection_16P1_tags_3[0]), /* 1 */
|
||||
|
@ -193,17 +175,8 @@ static asn_SEQUENCE_specifics_t asn_SPC_Bunch_specs_1 = {
|
|||
asn_TYPE_descriptor_t asn_DEF_Bunch = {
|
||||
"Bunch",
|
||||
"Bunch",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_compare,
|
||||
&asn_OP_SEQUENCE,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_Bunch_tags_1,
|
||||
sizeof(asn_DEF_Bunch_tags_1)
|
||||
/sizeof(asn_DEF_Bunch_tags_1[0]), /* 1 */
|
||||
|
|
|
@ -82,17 +82,8 @@ asn_SEQUENCE_specifics_t asn_SPC_SIGNED_16P0_specs_1 = {
|
|||
asn_TYPE_descriptor_t asn_DEF_SIGNED_16P0 = {
|
||||
"SIGNED",
|
||||
"SIGNED",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_compare,
|
||||
&asn_OP_SEQUENCE,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_SIGNED_16P0_tags_1,
|
||||
sizeof(asn_DEF_SIGNED_16P0_tags_1)
|
||||
/sizeof(asn_DEF_SIGNED_16P0_tags_1[0]), /* 1 */
|
||||
|
@ -144,17 +135,8 @@ static /* Use -fall-defs-global to expose */
|
|||
asn_TYPE_descriptor_t asn_DEF_signed_4 = {
|
||||
"signed",
|
||||
"signed",
|
||||
SET_free,
|
||||
SET_print,
|
||||
SET_compare,
|
||||
&asn_OP_SET,
|
||||
SET_constraint,
|
||||
SET_decode_ber,
|
||||
SET_encode_der,
|
||||
SET_decode_xer,
|
||||
SET_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_signed_tags_4,
|
||||
sizeof(asn_DEF_signed_tags_4)
|
||||
/sizeof(asn_DEF_signed_tags_4[0]), /* 1 */
|
||||
|
@ -199,17 +181,8 @@ asn_SEQUENCE_specifics_t asn_SPC_SIGNED_16P1_specs_3 = {
|
|||
asn_TYPE_descriptor_t asn_DEF_SIGNED_16P1 = {
|
||||
"SIGNED",
|
||||
"SIGNED",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_compare,
|
||||
&asn_OP_SEQUENCE,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_SIGNED_16P1_tags_3,
|
||||
sizeof(asn_DEF_SIGNED_16P1_tags_3)
|
||||
/sizeof(asn_DEF_SIGNED_16P1_tags_3[0]), /* 1 */
|
||||
|
@ -258,17 +231,8 @@ static const ber_tlv_tag_t asn_DEF_SignedREAL_tags_1[] = {
|
|||
asn_TYPE_descriptor_t asn_DEF_SignedREAL = {
|
||||
"SignedREAL",
|
||||
"SignedREAL",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_compare,
|
||||
&asn_OP_SEQUENCE,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_SignedREAL_tags_1,
|
||||
sizeof(asn_DEF_SignedREAL_tags_1)
|
||||
/sizeof(asn_DEF_SignedREAL_tags_1[0]), /* 1 */
|
||||
|
@ -317,17 +281,8 @@ static const ber_tlv_tag_t asn_DEF_SignedSET_tags_1[] = {
|
|||
asn_TYPE_descriptor_t asn_DEF_SignedSET = {
|
||||
"SignedSET",
|
||||
"SignedSET",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_compare,
|
||||
&asn_OP_SEQUENCE,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_SignedSET_tags_1,
|
||||
sizeof(asn_DEF_SignedSET_tags_1)
|
||||
/sizeof(asn_DEF_SignedSET_tags_1[0]), /* 1 */
|
||||
|
|
|
@ -174,17 +174,8 @@ asn_SEQUENCE_specifics_t asn_SPC_Narrow_15P0_specs_1 = {
|
|||
asn_TYPE_descriptor_t asn_DEF_Narrow_15P0 = {
|
||||
"Narrow",
|
||||
"Narrow",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_compare,
|
||||
&asn_OP_SEQUENCE,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_Narrow_15P0_tags_1,
|
||||
sizeof(asn_DEF_Narrow_15P0_tags_1)
|
||||
/sizeof(asn_DEF_Narrow_15P0_tags_1[0]), /* 1 */
|
||||
|
@ -233,17 +224,8 @@ static const ber_tlv_tag_t asn_DEF_NarrowInteger_tags_1[] = {
|
|||
asn_TYPE_descriptor_t asn_DEF_NarrowInteger = {
|
||||
"NarrowInteger",
|
||||
"NarrowInteger",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_compare,
|
||||
&asn_OP_SEQUENCE,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_NarrowInteger_tags_1,
|
||||
sizeof(asn_DEF_NarrowInteger_tags_1)
|
||||
/sizeof(asn_DEF_NarrowInteger_tags_1[0]), /* 1 */
|
||||
|
|
|
@ -64,17 +64,8 @@ static const ber_tlv_tag_t asn_DEF_MinMax_16P0_tags_1[] = {
|
|||
asn_TYPE_descriptor_t asn_DEF_MinMax_16P0 = {
|
||||
"MinMax",
|
||||
"MinMax",
|
||||
INTEGER_free,
|
||||
INTEGER_print,
|
||||
INTEGER_compare,
|
||||
&asn_OP_INTEGER,
|
||||
MinMax_16P0_constraint,
|
||||
INTEGER_decode_ber,
|
||||
INTEGER_encode_der,
|
||||
INTEGER_decode_xer,
|
||||
INTEGER_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_MinMax_16P0_tags_1,
|
||||
sizeof(asn_DEF_MinMax_16P0_tags_1)
|
||||
/sizeof(asn_DEF_MinMax_16P0_tags_1[0]), /* 1 */
|
||||
|
@ -153,17 +144,8 @@ static const ber_tlv_tag_t asn_DEF_ThreePlus_tags_1[] = {
|
|||
asn_TYPE_descriptor_t asn_DEF_ThreePlus = {
|
||||
"ThreePlus",
|
||||
"ThreePlus",
|
||||
INTEGER_free,
|
||||
INTEGER_print,
|
||||
INTEGER_compare,
|
||||
&asn_OP_INTEGER,
|
||||
ThreePlus_constraint,
|
||||
INTEGER_decode_ber,
|
||||
INTEGER_encode_der,
|
||||
INTEGER_decode_xer,
|
||||
INTEGER_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_ThreePlus_tags_1,
|
||||
sizeof(asn_DEF_ThreePlus_tags_1)
|
||||
/sizeof(asn_DEF_ThreePlus_tags_1[0]), /* 1 */
|
||||
|
|
|
@ -103,17 +103,8 @@ asn_SEQUENCE_specifics_t asn_SPC_Flag_16P0_specs_1 = {
|
|||
asn_TYPE_descriptor_t asn_DEF_Flag_16P0 = {
|
||||
"Flag",
|
||||
"Flag",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_compare,
|
||||
&asn_OP_SEQUENCE,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_Flag_16P0_tags_1,
|
||||
sizeof(asn_DEF_Flag_16P0_tags_1)
|
||||
/sizeof(asn_DEF_Flag_16P0_tags_1[0]), /* 1 */
|
||||
|
@ -173,17 +164,8 @@ static /* Use -fall-defs-global to expose */
|
|||
asn_TYPE_descriptor_t asn_DEF_field_7 = {
|
||||
"field",
|
||||
"field",
|
||||
ENUMERATED_free,
|
||||
ENUMERATED_print,
|
||||
ENUMERATED_compare,
|
||||
&asn_OP_ENUMERATED,
|
||||
ENUMERATED_constraint,
|
||||
ENUMERATED_decode_ber,
|
||||
ENUMERATED_encode_der,
|
||||
ENUMERATED_decode_xer,
|
||||
ENUMERATED_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_field_tags_7,
|
||||
sizeof(asn_DEF_field_tags_7)
|
||||
/sizeof(asn_DEF_field_tags_7[0]), /* 1 */
|
||||
|
@ -227,17 +209,8 @@ asn_SEQUENCE_specifics_t asn_SPC_Flag_16P1_specs_6 = {
|
|||
asn_TYPE_descriptor_t asn_DEF_Flag_16P1 = {
|
||||
"Flag",
|
||||
"Flag",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_compare,
|
||||
&asn_OP_SEQUENCE,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_Flag_16P1_tags_6,
|
||||
sizeof(asn_DEF_Flag_16P1_tags_6)
|
||||
/sizeof(asn_DEF_Flag_16P1_tags_6[0]), /* 1 */
|
||||
|
@ -286,17 +259,8 @@ static const ber_tlv_tag_t asn_DEF_IntegerColorFlag_tags_1[] = {
|
|||
asn_TYPE_descriptor_t asn_DEF_IntegerColorFlag = {
|
||||
"IntegerColorFlag",
|
||||
"IntegerColorFlag",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_compare,
|
||||
&asn_OP_SEQUENCE,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_IntegerColorFlag_tags_1,
|
||||
sizeof(asn_DEF_IntegerColorFlag_tags_1)
|
||||
/sizeof(asn_DEF_IntegerColorFlag_tags_1[0]), /* 1 */
|
||||
|
@ -345,17 +309,8 @@ static const ber_tlv_tag_t asn_DEF_EnumeratedColorFlag_tags_1[] = {
|
|||
asn_TYPE_descriptor_t asn_DEF_EnumeratedColorFlag = {
|
||||
"EnumeratedColorFlag",
|
||||
"EnumeratedColorFlag",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_compare,
|
||||
&asn_OP_SEQUENCE,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_EnumeratedColorFlag_tags_1,
|
||||
sizeof(asn_DEF_EnumeratedColorFlag_tags_1)
|
||||
/sizeof(asn_DEF_EnumeratedColorFlag_tags_1[0]), /* 1 */
|
||||
|
|
|
@ -1209,18 +1209,8 @@ static /* Use -fall-defs-global to expose */
|
|||
asn_TYPE_descriptor_t asn_DEF_many_2 = {
|
||||
"many",
|
||||
"many",
|
||||
SEQUENCE_OF_free,
|
||||
SEQUENCE_OF_print,
|
||||
SEQUENCE_OF_compare,
|
||||
&asn_OP_SEQUENCE_OF,
|
||||
SEQUENCE_OF_constraint,
|
||||
SEQUENCE_OF_decode_ber,
|
||||
SEQUENCE_OF_encode_der,
|
||||
SEQUENCE_OF_decode_xer,
|
||||
SEQUENCE_OF_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
SEQUENCE_OF_decode_uper,
|
||||
SEQUENCE_OF_encode_uper,
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_many_tags_2,
|
||||
sizeof(asn_DEF_many_tags_2)
|
||||
/sizeof(asn_DEF_many_tags_2[0]) - 1, /* 1 */
|
||||
|
@ -1627,18 +1617,8 @@ asn_SEQUENCE_specifics_t asn_SPC_PDU_specs_1 = {
|
|||
asn_TYPE_descriptor_t asn_DEF_PDU = {
|
||||
"PDU",
|
||||
"PDU",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_compare,
|
||||
&asn_OP_SEQUENCE,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
SEQUENCE_decode_uper,
|
||||
SEQUENCE_encode_uper,
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_PDU_tags_1,
|
||||
sizeof(asn_DEF_PDU_tags_1)
|
||||
/sizeof(asn_DEF_PDU_tags_1[0]), /* 1 */
|
||||
|
|
|
@ -47,8 +47,7 @@ T_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
|
|||
}
|
||||
|
||||
/* Replace with underlying type checker */
|
||||
td->check_constraints = asn_DEF_BIT_STRING.check_constraints;
|
||||
return td->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
return td->op->check_constraints(td, sptr, ctfailcb, app_key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -64,17 +63,8 @@ static const ber_tlv_tag_t asn_DEF_T_tags_1[] = {
|
|||
asn_TYPE_descriptor_t asn_DEF_T = {
|
||||
"T",
|
||||
"T",
|
||||
BIT_STRING_free,
|
||||
BIT_STRING_print,
|
||||
BIT_STRING_compare,
|
||||
&asn_OP_BIT_STRING,
|
||||
T_constraint,
|
||||
BIT_STRING_decode_ber,
|
||||
BIT_STRING_encode_der,
|
||||
BIT_STRING_decode_xer,
|
||||
BIT_STRING_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
0, 0, /* No PER support, use "-gen-PER" to enable */
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_T_tags_1,
|
||||
sizeof(asn_DEF_T_tags_1)
|
||||
/sizeof(asn_DEF_T_tags_1[0]), /* 1 */
|
||||
|
|
|
@ -105,18 +105,8 @@ static asn_SEQUENCE_specifics_t asn_SPC_PDU_specs_1 = {
|
|||
asn_TYPE_descriptor_t asn_DEF_PDU = {
|
||||
"PDU",
|
||||
"PDU",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_compare,
|
||||
&asn_OP_SEQUENCE,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
SEQUENCE_decode_uper,
|
||||
SEQUENCE_encode_uper,
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_PDU_tags_1,
|
||||
sizeof(asn_DEF_PDU_tags_1)
|
||||
/sizeof(asn_DEF_PDU_tags_1[0]), /* 1 */
|
||||
|
@ -212,18 +202,8 @@ asn_SEQUENCE_specifics_t asn_SPC_Singleton_specs_1 = {
|
|||
asn_TYPE_descriptor_t asn_DEF_Singleton = {
|
||||
"Singleton",
|
||||
"Singleton",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_compare,
|
||||
&asn_OP_SEQUENCE,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
SEQUENCE_decode_uper,
|
||||
SEQUENCE_encode_uper,
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_Singleton_tags_1,
|
||||
sizeof(asn_DEF_Singleton_tags_1)
|
||||
/sizeof(asn_DEF_Singleton_tags_1[0]), /* 1 */
|
||||
|
@ -342,18 +322,8 @@ asn_CHOICE_specifics_t asn_SPC_PDU_2_specs_1 = {
|
|||
asn_TYPE_descriptor_t asn_DEF_PDU_2 = {
|
||||
"PDU-2",
|
||||
"PDU-2",
|
||||
CHOICE_free,
|
||||
CHOICE_print,
|
||||
CHOICE_compare,
|
||||
&asn_OP_CHOICE,
|
||||
CHOICE_constraint,
|
||||
CHOICE_decode_ber,
|
||||
CHOICE_encode_der,
|
||||
CHOICE_decode_xer,
|
||||
CHOICE_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
CHOICE_decode_uper,
|
||||
CHOICE_encode_uper,
|
||||
CHOICE_outmost_tag,
|
||||
0, /* No effective tags (pointer) */
|
||||
0, /* No effective tags (count) */
|
||||
0, /* No tags (pointer) */
|
||||
|
|
|
@ -213,18 +213,8 @@ static /* Use -fall-defs-global to expose */
|
|||
asn_TYPE_descriptor_t asn_DEF_unsigned32_4 = {
|
||||
"unsigned32",
|
||||
"unsigned32",
|
||||
NativeInteger_free,
|
||||
NativeInteger_print,
|
||||
NativeInteger_compare,
|
||||
&asn_OP_NativeInteger,
|
||||
unsigned32_4_constraint,
|
||||
NativeInteger_decode_ber,
|
||||
NativeInteger_encode_der,
|
||||
NativeInteger_decode_xer,
|
||||
NativeInteger_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
NativeInteger_decode_uper,
|
||||
NativeInteger_encode_uper,
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_unsigned32_tags_4,
|
||||
sizeof(asn_DEF_unsigned32_tags_4)
|
||||
/sizeof(asn_DEF_unsigned32_tags_4[0]) - 1, /* 1 */
|
||||
|
@ -250,18 +240,8 @@ static /* Use -fall-defs-global to expose */
|
|||
asn_TYPE_descriptor_t asn_DEF_unsplit32_5 = {
|
||||
"unsplit32",
|
||||
"unsplit32",
|
||||
NativeInteger_free,
|
||||
NativeInteger_print,
|
||||
NativeInteger_compare,
|
||||
&asn_OP_NativeInteger,
|
||||
unsplit32_5_constraint,
|
||||
NativeInteger_decode_ber,
|
||||
NativeInteger_encode_der,
|
||||
NativeInteger_decode_xer,
|
||||
NativeInteger_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
NativeInteger_decode_uper,
|
||||
NativeInteger_encode_uper,
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_unsplit32_tags_5,
|
||||
sizeof(asn_DEF_unsplit32_tags_5)
|
||||
/sizeof(asn_DEF_unsplit32_tags_5[0]) - 1, /* 1 */
|
||||
|
@ -341,18 +321,8 @@ static asn_SEQUENCE_specifics_t asn_SPC_T_specs_1 = {
|
|||
asn_TYPE_descriptor_t asn_DEF_T = {
|
||||
"T",
|
||||
"T",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_compare,
|
||||
&asn_OP_SEQUENCE,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
SEQUENCE_decode_uper,
|
||||
SEQUENCE_encode_uper,
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_T_tags_1,
|
||||
sizeof(asn_DEF_T_tags_1)
|
||||
/sizeof(asn_DEF_T_tags_1[0]), /* 1 */
|
||||
|
|
|
@ -32,18 +32,8 @@ static asn_SEQUENCE_specifics_t asn_SPC_T_specs_1 = {
|
|||
asn_TYPE_descriptor_t asn_DEF_T = {
|
||||
"T",
|
||||
"T",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_compare,
|
||||
&asn_OP_SEQUENCE,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
SEQUENCE_decode_uper,
|
||||
SEQUENCE_encode_uper,
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_T_tags_1,
|
||||
sizeof(asn_DEF_T_tags_1)
|
||||
/sizeof(asn_DEF_T_tags_1[0]), /* 1 */
|
||||
|
|
|
@ -239,18 +239,8 @@ static asn_SEQUENCE_specifics_t asn_SPC_T_specs_1 = {
|
|||
asn_TYPE_descriptor_t asn_DEF_T = {
|
||||
"T",
|
||||
"T",
|
||||
SEQUENCE_free,
|
||||
SEQUENCE_print,
|
||||
SEQUENCE_compare,
|
||||
&asn_OP_SEQUENCE,
|
||||
SEQUENCE_constraint,
|
||||
SEQUENCE_decode_ber,
|
||||
SEQUENCE_encode_der,
|
||||
SEQUENCE_decode_xer,
|
||||
SEQUENCE_encode_xer,
|
||||
0, 0, /* No OER support, use "-gen-OER" to enable */
|
||||
SEQUENCE_decode_uper,
|
||||
SEQUENCE_encode_uper,
|
||||
0, /* Use generic outmost tag fetcher */
|
||||
asn_DEF_T_tags_1,
|
||||
sizeof(asn_DEF_T_tags_1)
|
||||
/sizeof(asn_DEF_T_tags_1[0]), /* 1 */
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue