Commit 1fa31c9e authored by Bi-Ruei, Chiu's avatar Bi-Ruei, Chiu Committed by Lev Walkin

Simplify the logic of accessing codec function for specific TYPE

parent 6bc7a11d
#!/usr/bin/env perl
#
# Convert check-parsing.sh's log to diff format.
#
if(-t STDIN && $#ARGV == -1) {
print STDERR "Usage: check-parsing-log2diff.pl < check-parsing.sh.log > diff.patch\n";
exit(1);
}
$state = 0;
while(<>) {
if ($state == 0) {
if (/^Checking\s*(.+?)\s*against\s*(.+?)$/) {
$source = $1;
$target = $2;
} elsif (/^\-\-\-\s(.+?)\s.*/) {
print "--- a/dev/null " . "\n";
} elsif (/^\+\+\+\s(.+?)\s.*/) {
print "+++ b" . $target . "\n";
$state = 1;
}
} else {
if (/^Checking\s*(.+?)\s*against\s*(.+?)$/) {
$source = $1;
$target = $2;
$state = 0;
} else {
print $_;
}
}
}
This diff is collapsed.
......@@ -104,11 +104,21 @@ int asn1c_compiled_output(arg_t *arg, const char *fmt, ...);
} while(0)
/* Generate ASN.1 type declaration */
#define GEN_DECLARE(expr) do { \
#define GEN_DECLARE(type_name, expr) do { \
int saved_target = arg->target->target; \
REDIR(OT_FUNC_DECLS); \
OUT_NOINDENT("extern asn_TYPE_descriptor_t " \
"asn_DEF_%s;\n", MKID(expr)); \
if (expr->_type_referenced) { \
OUT_NOINDENT("extern asn_%s_specifics_t " \
"asn_SPC_%s_specs_%d;\n", type_name, \
MKID(expr), expr->_type_unique_index); \
if(expr_elements_count(arg, expr)) \
OUT_NOINDENT("extern asn_TYPE_member_t " \
"asn_MBR_%s_%d[%d];\n", \
MKID(expr), expr->_type_unique_index, \
expr_elements_count(arg, expr)); \
} \
REDIR(saved_target); \
} while(0)
......
......@@ -57,6 +57,21 @@ asn1f_find_terminal_type_ex(asn1p_t *asn, asn1p_expr_t *expr) {
return asn1f_find_terminal_type(&arg, expr);
}
asn1p_expr_t *
asn1f_find_ancestor_type_with_PER_constraint_ex(asn1p_t *asn, asn1p_expr_t *expr) {
arg_t arg;
memset(&arg, 0, sizeof(arg));
arg.asn = asn;
arg.mod = expr->module;
arg.expr = expr;
arg.eh = a1f_replace_me_with_proper_interface_arg.eh;
arg.debug = a1f_replace_me_with_proper_interface_arg.debug;
return asn1f_find_ancestor_type_with_PER_constraint(&arg, expr);
}
int
asn1f_fix_dereference_values_ex(asn1p_t *asn, asn1p_module_t *mod,
asn1p_expr_t *expr) {
......
......@@ -38,4 +38,10 @@ asn1p_expr_t *asn1f_find_terminal_type_ex(asn1p_t *asn, asn1p_expr_t *tc);
int asn1f_fix_dereference_values_ex(asn1p_t *asn, asn1p_module_t *mod,
asn1p_expr_t *expr);
/*
* Exportable version of asn1f_find_ancestor_type_with_PER_constraint().
*/
asn1p_expr_t *asn1f_find_ancestor_type_with_PER_constraint_ex(asn1p_t *asn,
asn1p_expr_t *expr);
#endif /* ASN1FIX_EXPORT_H */
......@@ -3,6 +3,7 @@
enum ftt_what {
FTT_TYPE, /* Find the type of the given expression */
FTT_VALUE, /* Find the value of the given expression */
FTT_CONSTR_TYPE /* Find the type of the given expression having constraint */
};
static asn1p_expr_t *asn1f_find_terminal_thing(arg_t *arg, asn1p_expr_t *expr, enum ftt_what);
......@@ -382,6 +383,11 @@ asn1f_find_terminal_value(arg_t *arg, asn1p_expr_t *expr) {
return asn1f_find_terminal_thing(arg, expr, FTT_VALUE);
}
asn1p_expr_t *
asn1f_find_ancestor_type_with_PER_constraint(arg_t *arg, asn1p_expr_t *expr) {
return asn1f_find_terminal_thing(arg, expr, FTT_CONSTR_TYPE);
}
static asn1p_expr_t *
asn1f_find_terminal_thing(arg_t *arg, asn1p_expr_t *expr, enum ftt_what what) {
asn1p_ref_t *ref = 0;
......@@ -389,6 +395,7 @@ asn1f_find_terminal_thing(arg_t *arg, asn1p_expr_t *expr, enum ftt_what what) {
switch(what) {
case FTT_TYPE:
case FTT_CONSTR_TYPE:
/* Expression may be a terminal type itself */
if(expr->expr_type != A1TC_REFERENCE)
return expr;
......@@ -455,6 +462,10 @@ asn1f_find_terminal_thing(arg_t *arg, asn1p_expr_t *expr, enum ftt_what what) {
}
tc->_type_referenced = 1;
if((what == FTT_CONSTR_TYPE) && (tc->constraints))
return tc;
tc->_mark |= TM_RECURSION;
WITH_MODULE(tc->module,
expr = asn1f_find_terminal_thing(arg, tc, what));
......@@ -463,6 +474,7 @@ asn1f_find_terminal_thing(arg_t *arg, asn1p_expr_t *expr, enum ftt_what what) {
return expr;
}
/*
* Make sure that the specified name is present or otherwise does
* not contradict with the EXPORTS clause of the specified module.
......
......@@ -68,4 +68,11 @@ asn1p_expr_t *asn1f_find_terminal_type(arg_t *arg, asn1p_expr_t *tc);
*/
asn1p_expr_t *asn1f_find_terminal_value(arg_t *arg, asn1p_expr_t *tc);
/*
* Recursively find the original type with constraint for the given
* expression.
*/
asn1p_expr_t *asn1f_find_ancestor_type_with_PER_constraint(arg_t *arg, asn1p_expr_t *tc);
#endif /* ASN1FIX_RETRIEVE_H */
......@@ -6,7 +6,7 @@
#include <ANY.h>
#include <errno.h>
static asn_OCTET_STRING_specifics_t asn_SPC_ANY_specs = {
asn_OCTET_STRING_specifics_t asn_SPC_ANY_specs = {
sizeof(ANY_t),
offsetof(ANY_t, _asn_ctx),
ASN_OSUBV_ANY
......
......@@ -19,6 +19,7 @@ typedef struct ANY {
} ANY_t;
extern asn_TYPE_descriptor_t asn_DEF_ANY;
extern asn_OCTET_STRING_specifics_t asn_SPC_ANY_specs;
asn_struct_free_f ANY_free;
asn_struct_print_f ANY_print;
......@@ -26,6 +27,13 @@ ber_type_decoder_f ANY_decode_ber;
der_type_encoder_f ANY_encode_der;
xer_type_encoder_f ANY_encode_xer;
#define ANY_free OCTET_STRING_free
#define ANY_print OCTET_STRING_print
#define ANY_constraint asn_generic_no_constraint
#define ANY_decode_ber OCTET_STRING_decode_ber
#define ANY_encode_der OCTET_STRING_encode_der
#define ANY_decode_xer OCTET_STRING_decode_xer_hex
/******************************
* Handy conversion routines. *
******************************/
......
......@@ -12,7 +12,7 @@
static const ber_tlv_tag_t asn_DEF_BIT_STRING_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (3 << 2))
};
static asn_OCTET_STRING_specifics_t asn_SPC_BIT_STRING_specs = {
asn_OCTET_STRING_specifics_t asn_SPC_BIT_STRING_specs = {
sizeof(BIT_STRING_t),
offsetof(BIT_STRING_t, _asn_ctx),
ASN_OSUBV_BIT
......
......@@ -21,11 +21,19 @@ typedef struct BIT_STRING_s {
} BIT_STRING_t;
extern asn_TYPE_descriptor_t asn_DEF_BIT_STRING;
extern asn_OCTET_STRING_specifics_t asn_SPC_BIT_STRING_specs;
asn_struct_print_f BIT_STRING_print; /* Human-readable output */
asn_constr_check_f BIT_STRING_constraint;
xer_type_encoder_f BIT_STRING_encode_xer;
#define BIT_STRING_free OCTET_STRING_free
#define BIT_STRING_decode_ber OCTET_STRING_decode_ber
#define BIT_STRING_encode_der OCTET_STRING_encode_der
#define BIT_STRING_decode_xer OCTET_STRING_decode_xer_binary
#define BIT_STRING_decode_uper OCTET_STRING_decode_uper
#define BIT_STRING_encode_uper OCTET_STRING_encode_uper
#ifdef __cplusplus
}
#endif
......
......@@ -13,7 +13,7 @@ static const ber_tlv_tag_t asn_DEF_BMPString_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (30 << 2)), /* [UNIVERSAL 30] IMPLICIT ...*/
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */
};
static asn_OCTET_STRING_specifics_t asn_SPC_BMPString_specs = {
asn_OCTET_STRING_specifics_t asn_SPC_BMPString_specs = {
sizeof(BMPString_t),
offsetof(BMPString_t, _asn_ctx),
ASN_OSUBV_U16 /* 16-bits character */
......
......@@ -14,11 +14,20 @@ extern "C" {
typedef OCTET_STRING_t BMPString_t; /* Implemented via OCTET STRING */
extern asn_TYPE_descriptor_t asn_DEF_BMPString;
extern asn_OCTET_STRING_specifics_t asn_SPC_BMPString_specs;
asn_struct_print_f BMPString_print; /* Human-readable output */
xer_type_decoder_f BMPString_decode_xer;
xer_type_encoder_f BMPString_encode_xer;
#define BMPString_free OCTET_STRING_free
#define BMPString_print BMPString_print
#define BMPString_constraint asn_generic_no_constraint
#define BMPString_decode_ber OCTET_STRING_decode_ber
#define BMPString_encode_der OCTET_STRING_encode_der
#define BMPString_decode_uper OCTET_STRING_decode_uper
#define BMPString_encode_uper OCTET_STRING_encode_uper
#ifdef __cplusplus
}
#endif
......
......@@ -29,6 +29,8 @@ xer_type_encoder_f BOOLEAN_encode_xer;
per_type_decoder_f BOOLEAN_decode_uper;
per_type_encoder_f BOOLEAN_encode_uper;
#define BOOLEAN_constraint asn_generic_no_constraint
#ifdef __cplusplus
}
#endif
......
......@@ -18,6 +18,14 @@ extern asn_TYPE_descriptor_t asn_DEF_ENUMERATED;
per_type_decoder_f ENUMERATED_decode_uper;
per_type_encoder_f ENUMERATED_encode_uper;
#define ENUMERATED_free ASN__PRIMITIVE_TYPE_free
#define ENUMERATED_print INTEGER_print
#define ENUMERATED_constraint asn_generic_no_constraint
#define ENUMERATED_decode_ber ber_decode_primitive
#define ENUMERATED_encode_der INTEGER_encode_der
#define ENUMERATED_decode_xer INTEGER_decode_xer
#define ENUMERATED_encode_xer INTEGER_encode_xer
#ifdef __cplusplus
}
#endif
......
......@@ -15,6 +15,16 @@ typedef OCTET_STRING_t GeneralString_t; /* Implemented via OCTET STRING */
extern asn_TYPE_descriptor_t asn_DEF_GeneralString;
#define GeneralString_free OCTET_STRING_free
#define GeneralString_print OCTET_STRING_print
#define GeneralString_constraint asn_generic_unknown_constraint
#define GeneralString_decode_ber OCTET_STRING_decode_ber
#define GeneralString_encode_der OCTET_STRING_encode_der
#define GeneralString_decode_xer OCTET_STRING_decode_xer_hex
#define GeneralString_encode_xer OCTET_STRING_encode_xer
#define GeneralString_decode_uper OCTET_STRING_decode_uper
#define GeneralString_encode_uper OCTET_STRING_encode_uper
#ifdef __cplusplus
}
#endif
......
......@@ -20,6 +20,12 @@ asn_constr_check_f GeneralizedTime_constraint;
der_type_encoder_f GeneralizedTime_encode_der;
xer_type_encoder_f GeneralizedTime_encode_xer;
#define GeneralizedTime_free OCTET_STRING_free
#define GeneralizedTime_decode_ber OCTET_STRING_decode_ber
#define GeneralizedTime_decode_xer OCTET_STRING_decode_xer_utf8
#define GeneralizedTime_decode_uper OCTET_STRING_decode_uper
#define GeneralizedTime_encode_uper OCTET_STRING_encode_uper
/***********************
* Some handy helpers. *
***********************/
......
......@@ -15,6 +15,16 @@ typedef OCTET_STRING_t GraphicString_t; /* Implemented via OCTET STRING */
extern asn_TYPE_descriptor_t asn_DEF_GraphicString;
#define GraphicString_free OCTET_STRING_free
#define GraphicString_print OCTET_STRING_print
#define GraphicString_constraint asn_generic_unknown_constraint
#define GraphicString_decode_ber OCTET_STRING_decode_ber
#define GraphicString_encode_der OCTET_STRING_encode_der
#define GraphicString_decode_xer OCTET_STRING_decode_xer_hex
#define GraphicString_encode_xer OCTET_STRING_encode_xer
#define GraphicString_decode_uper OCTET_STRING_decode_uper
#define GraphicString_encode_uper OCTET_STRING_encode_uper
#ifdef __cplusplus
}
#endif
......
......@@ -20,6 +20,15 @@ extern asn_TYPE_descriptor_t asn_DEF_IA5String;
asn_constr_check_f IA5String_constraint;
#define IA5String_free OCTET_STRING_free
#define IA5String_print OCTET_STRING_print_utf8
#define IA5String_decode_ber OCTET_STRING_decode_ber
#define IA5String_encode_der OCTET_STRING_encode_der
#define IA5String_decode_xer OCTET_STRING_decode_xer_utf8
#define IA5String_encode_xer OCTET_STRING_encode_xer_utf8
#define IA5String_decode_uper OCTET_STRING_decode_uper
#define IA5String_encode_uper OCTET_STRING_encode_uper
#ifdef __cplusplus
}
#endif
......
......@@ -16,6 +16,16 @@ typedef VisibleString_t ISO646String_t; /* Implemented using VisibleString */
extern asn_TYPE_descriptor_t asn_DEF_ISO646String;
#define ISO646String_free OCTET_STRING_free
#define ISO646String_print OCTET_STRING_print_utf8
#define ISO646String_constraint VisibleString_constraint
#define ISO646String_decode_ber OCTET_STRING_decode_ber
#define ISO646String_encode_der OCTET_STRING_encode_der
#define ISO646String_decode_xer OCTET_STRING_decode_xer_utf8
#define ISO646String_encode_xer OCTET_STRING_encode_xer_utf8
#define ISO646String_decode_uper OCTET_STRING_decode_uper
#define ISO646String_encode_uper OCTET_STRING_encode_uper
#ifdef __cplusplus
}
#endif
......
......@@ -6,6 +6,7 @@
#define ASN_TYPE_NULL_H
#include <asn_application.h>
#include <BOOLEAN.h>
#ifdef __cplusplus
extern "C" {
......@@ -26,6 +27,10 @@ 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_decode_ber BOOLEAN_decode_ber
#define NULL_constraint asn_generic_no_constraint
#ifdef __cplusplus
}
#endif
......
......@@ -25,6 +25,13 @@ xer_type_encoder_f NativeEnumerated_encode_xer;
per_type_decoder_f NativeEnumerated_decode_uper;
per_type_encoder_f NativeEnumerated_encode_uper;
#define NativeEnumerated_free NativeInteger_free
#define NativeEnumerated_print NativeInteger_print
#define NativeEnumerated_constraint asn_generic_no_constraint
#define NativeEnumerated_decode_ber NativeInteger_decode_ber
#define NativeEnumerated_encode_der NativeInteger_encode_der
#define NativeEnumerated_decode_xer NativeInteger_decode_xer
#ifdef __cplusplus
}
#endif
......
......@@ -32,6 +32,8 @@ oer_type_encoder_f NativeInteger_encode_oer;
per_type_decoder_f NativeInteger_decode_uper;
per_type_encoder_f NativeInteger_encode_uper;
#define NativeInteger_constraint asn_generic_no_constraint
#ifdef __cplusplus
}
#endif
......
......@@ -28,6 +28,8 @@ xer_type_encoder_f NativeReal_encode_xer;
per_type_decoder_f NativeReal_decode_uper;
per_type_encoder_f NativeReal_encode_uper;
#define NativeReal_constraint asn_generic_no_constraint
#ifdef __cplusplus
}
#endif
......
......@@ -17,6 +17,15 @@ extern asn_TYPE_descriptor_t asn_DEF_NumericString;
asn_constr_check_f NumericString_constraint;
#define NumericString_free OCTET_STRING_free
#define NumericString_print OCTET_STRING_print_utf8
#define NumericString_decode_ber OCTET_STRING_decode_ber
#define NumericString_encode_der OCTET_STRING_encode_der
#define NumericString_decode_xer OCTET_STRING_decode_xer_utf8
#define NumericString_encode_xer OCTET_STRING_encode_xer_utf8
#define NumericString_decode_uper OCTET_STRING_decode_uper
#define NumericString_encode_uper OCTET_STRING_encode_uper
#ifdef __cplusplus
}
#endif
......
......@@ -23,6 +23,12 @@ der_type_encoder_f OBJECT_IDENTIFIER_encode_der;
xer_type_decoder_f OBJECT_IDENTIFIER_decode_xer;
xer_type_encoder_f OBJECT_IDENTIFIER_encode_xer;
#define OBJECT_IDENTIFIER_free ASN__PRIMITIVE_TYPE_free
#define OBJECT_IDENTIFIER_decode_ber ber_decode_primitive
#define OBJECT_IDENTIFIER_encode_der der_encode_primitive
#define OBJECT_IDENTIFIER_decode_uper OCTET_STRING_decode_uper
#define OBJECT_IDENTIFIER_encode_uper OCTET_STRING_encode_uper
/**********************************
* Some handy conversion routines *
**********************************/
......
......@@ -14,7 +14,7 @@
static const ber_tlv_tag_t asn_DEF_OCTET_STRING_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2))
};
static asn_OCTET_STRING_specifics_t asn_SPC_OCTET_STRING_specs = {
asn_OCTET_STRING_specifics_t asn_SPC_OCTET_STRING_specs = {
sizeof(OCTET_STRING_t),
offsetof(OCTET_STRING_t, _asn_ctx),
ASN_OSUBV_STR
......
......@@ -35,6 +35,9 @@ oer_type_encoder_f OCTET_STRING_encode_oer;
per_type_decoder_f OCTET_STRING_decode_uper;
per_type_encoder_f OCTET_STRING_encode_uper;
#define OCTET_STRING_constraint asn_generic_no_constraint
#define OCTET_STRING_decode_xer OCTET_STRING_decode_xer_hex
/******************************
* Handy conversion routines. *
******************************/
......@@ -81,6 +84,8 @@ typedef const struct asn_OCTET_STRING_specifics_s {
} subvariant;
} asn_OCTET_STRING_specifics_t;
extern asn_OCTET_STRING_specifics_t asn_SPC_OCTET_STRING_specs;
#ifdef __cplusplus
}
#endif
......
......@@ -15,6 +15,16 @@ typedef GraphicString_t ObjectDescriptor_t; /* Implemented via GraphicString */
extern asn_TYPE_descriptor_t asn_DEF_ObjectDescriptor;
#define ObjectDescriptor_free OCTET_STRING_free
#define ObjectDescriptor_print OCTET_STRING_print_utf8
#define ObjectDescriptor_constraint asn_generic_unknown_constraint
#define ObjectDescriptor_decode_ber OCTET_STRING_decode_ber
#define ObjectDescriptor_encode_der OCTET_STRING_encode_der
#define ObjectDescriptor_decode_xer OCTET_STRING_decode_xer_utf8
#define ObjectDescriptor_encode_xer OCTET_STRING_encode_xer_utf8
#define ObjectDescriptor_decode_uper OCTET_STRING_decode_uper
#define ObjectDescriptor_encode_uper OCTET_STRING_encode_uper
#ifdef __cplusplus
}
#endif
......
......@@ -17,6 +17,15 @@ extern asn_TYPE_descriptor_t asn_DEF_PrintableString;
asn_constr_check_f PrintableString_constraint;
#define PrintableString_free OCTET_STRING_free
#define PrintableString_print OCTET_STRING_print_utf8
#define PrintableString_decode_ber OCTET_STRING_decode_ber
#define PrintableString_encode_der OCTET_STRING_encode_der
#define PrintableString_decode_xer OCTET_STRING_decode_xer_utf8
#define PrintableString_encode_xer OCTET_STRING_encode_xer_utf8
#define PrintableString_decode_uper OCTET_STRING_decode_uper
#define PrintableString_encode_uper OCTET_STRING_encode_uper
#ifdef __cplusplus
}
#endif
......
......@@ -22,6 +22,11 @@ xer_type_encoder_f REAL_encode_xer;
per_type_decoder_f REAL_decode_uper;
per_type_encoder_f REAL_encode_uper;
#define REAL_free ASN__PRIMITIVE_TYPE_free,
#define REAL_constraint asn_generic_no_constraint
#define REAL_decode_ber ber_decode_primitive
#define REAL_encode_der der_encode_primitive
/***********************************
* Some handy conversion routines. *
***********************************/
......
......@@ -20,6 +20,13 @@ asn_struct_print_f RELATIVE_OID_print;
xer_type_decoder_f RELATIVE_OID_decode_xer;
xer_type_encoder_f RELATIVE_OID_encode_xer;
#define RELATIVE_OID_free ASN__PRIMITIVE_TYPE_free
#define RELATIVE_OID_constraint asn_generic_no_constraint
#define RELATIVE_OID_decode_ber ber_decode_primitive
#define RELATIVE_OID_encode_der der_encode_primitive
#define RELATIVE_OID_decode_uper OCTET_STRING_decode_uper
#define RELATIVE_OID_encode_uper OCTET_STRING_encode_uper
/**********************************
* Some handy conversion routines *
**********************************/
......
......@@ -15,6 +15,16 @@ typedef OCTET_STRING_t T61String_t; /* Implemented via OCTET STRING */
extern asn_TYPE_descriptor_t asn_DEF_T61String;
#define T61String_free OCTET_STRING_free
#define T61String_print OCTET_STRING_print
#define T61String_constraint asn_generic_unknown_constraint
#define T61String_decode_ber OCTET_STRING_decode_ber
#define T61String_encode_der OCTET_STRING_encode_der
#define T61String_decode_xer OCTET_STRING_decode_xer_hex
#define T61String_encode_xer OCTET_STRING_encode_xer
#define T61String_decode_uper OCTET_STRING_decode_uper
#define T61String_encode_uper OCTET_STRING_encode_uper
#ifdef __cplusplus
}
#endif
......
......@@ -15,6 +15,16 @@ typedef OCTET_STRING_t TeletexString_t; /* Implemented via OCTET STRING */
extern asn_TYPE_descriptor_t asn_DEF_TeletexString;
#define TeletexString_free OCTET_STRING_free
#define TeletexString_print OCTET_STRING_print
#define TeletexString_constraint asn_generic_unknown_constraint
#define TeletexString_decode_ber OCTET_STRING_decode_ber
#define TeletexString_encode_der OCTET_STRING_encode_der
#define TeletexString_decode_xer OCTET_STRING_decode_xer_hex
#define TeletexString_encode_xer OCTET_STRING_encode_xer
#define TeletexString_decode_uper OCTET_STRING_decode_uper
#define TeletexString_encode_uper OCTET_STRING_encode_uper
#ifdef __cplusplus
}
#endif
......
......@@ -19,6 +19,13 @@ asn_struct_print_f UTCTime_print;
asn_constr_check_f UTCTime_constraint;
xer_type_encoder_f UTCTime_encode_xer;
#define UTCTime_free OCTET_STRING_free
#define UTCTime_decode_ber OCTET_STRING_decode_ber
#define UTCTime_encode_der OCTET_STRING_encode_der
#define UTCTime_decode_xer OCTET_STRING_decode_xer_utf8
#define UTCTime_decode_uper OCTET_STRING_decode_uper
#define UTCTime_encode_uper OCTET_STRING_encode_uper
/***********************
* Some handy helpers. *
***********************/
......
......@@ -18,6 +18,15 @@ extern asn_TYPE_descriptor_t asn_DEF_UTF8String;
asn_struct_print_f UTF8String_print;
asn_constr_check_f UTF8String_constraint;
#define UTF8String_free OCTET_STRING_free
#define UTF8String_constraint UTF8String_constraint
#define UTF8String_decode_ber OCTET_STRING_decode_ber
#define UTF8String_encode_der OCTET_STRING_encode_der
#define UTF8String_decode_xer OCTET_STRING_decode_xer_utf8
#define UTF8String_encode_xer OCTET_STRING_encode_xer_utf8
#define UTF8String_decode_uper OCTET_STRING_decode_uper
#define UTF8String_encode_uper OCTET_STRING_encode_uper
/*
* Returns length of the given UTF-8 string in characters,
* or a negative error code:
......
......@@ -13,7 +13,7 @@ static const ber_tlv_tag_t asn_DEF_UniversalString_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (28 << 2)), /* [UNIVERSAL 28] IMPLICIT ...*/
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */
};
static asn_OCTET_STRING_specifics_t asn_SPC_UniversalString_specs = {
asn_OCTET_STRING_specifics_t asn_SPC_UniversalString_specs = {
sizeof(UniversalString_t),
offsetof(UniversalString_t, _asn_ctx),
ASN_OSUBV_U32 /* 32-bits character */
......
......@@ -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_OCTET_STRING_specifics_t asn_SPC_UniversalString_specs;
asn_struct_print_f UniversalString_print; /* Human-readable output */
xer_type_decoder_f UniversalString_decode_xer;
......
......@@ -15,6 +15,16 @@ typedef OCTET_STRING_t VideotexString_t; /* Implemented via OCTET STRING */
extern asn_TYPE_descriptor_t asn_DEF_VideotexString;
#define VideotexString_free OCTET_STRING_free
#define VideotexString_print OCTET_STRING_print
#define VideotexString_constraint asn_generic_unknown_constraint
#define VideotexString_decode_ber OCTET_STRING_decode_ber
#define VideotexString_encode_der OCTET_STRING_encode_der
#define VideotexString_decode_xer OCTET_STRING_decode_xer_hex
#define VideotexString_encode_xer OCTET_STRING_encode_xer
#define VideotexString_decode_uper OCTET_STRING_decode_uper
#define VideotexString_encode_uper OCTET_STRING_encode_uper
#ifdef __cplusplus
}
#endif
......
......@@ -17,6 +17,16 @@ extern asn_TYPE_descriptor_t asn_DEF_VisibleString;
asn_constr_check_f VisibleString_constraint;
#define VisibleString_free OCTET_STRING_free
#define VisibleString_print OCTET_STRING_print
#define VisibleString_constraint VisibleString_constraint
#define VisibleString_decode_ber OCTET_STRING_decode_ber
#define VisibleString_encode_der OCTET_STRING_encode_der
#define VisibleString_decode_xer OCTET_STRING_decode_xer_hex
#define VisibleString_encode_xer OCTET_STRING_encode_xer
#define VisibleString_decode_uper OCTET_STRING_decode_uper
#define VisibleString_encode_uper OCTET_STRING_encode_uper
#ifdef __cplusplus
}
#endif
......
This diff is collapsed.
......@@ -24,11 +24,15 @@ typedef struct Collection_16P1 {
/*** <<< FUNC-DECLS [Collection] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_Collection_16P0;
extern asn_SET_OF_specifics_t asn_SPC_Collection_16P0_specs_1;
extern asn_TYPE_member_t asn_MBR_Collection_16P0_1[1];
extern asn_TYPE_descriptor_t asn_DEF_Collection_16P1;
extern asn_SET_OF_specifics_t asn_SPC_Collection_16P1_specs_3;
extern asn_TYPE_member_t asn_MBR_Collection_16P1_3[1];
/*** <<< STAT-DEFS [Collection] >>> ***/
static asn_TYPE_member_t asn_MBR_Collection_16P0_1[] = {
asn_TYPE_member_t asn_MBR_Collection_16P0_1[] = {
{ ATF_POINTER, 0, 0,
.tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)),
.tag_mode = 0,
......@@ -43,7 +47,7 @@ static asn_TYPE_member_t asn_MBR_Collection_16P0_1[] = {
static const ber_tlv_tag_t asn_DEF_Collection_16P0_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_Collection_16P0_specs_1 = {
asn_SET_OF_specifics_t asn_SPC_Collection_16P0_specs_1 = {
sizeof(struct Collection_16P0),
offsetof(struct Collection_16P0, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
......@@ -74,7 +78,7 @@ asn_TYPE_descriptor_t asn_DEF_Collection_16P0 = {
&asn_SPC_Collection_16P0_specs_1 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Collection_16P1_3[] = {
asn_TYPE_member_t asn_MBR_Collection_16P1_3[] = {
{ ATF_POINTER, 0, 0,
.tag = (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)),
.tag_mode = 0,
......@@ -89,7 +93,7 @@ static asn_TYPE_member_t asn_MBR_Collection_16P1_3[] = {
static const ber_tlv_tag_t asn_DEF_Collection_16P1_tags_3[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_Collection_16P1_specs_3 = {
asn_SET_OF_specifics_t asn_SPC_Collection_16P1_specs_3 = {
sizeof(struct Collection_16P1),
offsetof(struct Collection_16P1, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
......
This diff is collapsed.
......@@ -18,6 +18,8 @@ typedef struct Narrow_15P0 {
/*** <<< FUNC-DECLS [Narrow] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_Narrow_15P0;
extern asn_SEQUENCE_specifics_t asn_SPC_Narrow_15P0_specs_1;
extern asn_TYPE_member_t asn_MBR_Narrow_15P0_1[3];
/*** <<< CODE [Narrow] >>> ***/
......@@ -117,7 +119,7 @@ static int asn_DFL_2_set_3(int set_value, void **sptr) {
return (*st == 3);
}
}
static asn_TYPE_member_t asn_MBR_Narrow_15P0_1[] = {
asn_TYPE_member_t asn_MBR_Narrow_15P0_1[] = {
{ ATF_POINTER, 1, offsetof(struct Narrow_15P0, narrow1),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
.tag_mode = 0,
......@@ -157,7 +159,7 @@ static const asn_TYPE_tag2member_t asn_MAP_Narrow_15P0_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* narrow2 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 } /* narrow3 */
};
static asn_SEQUENCE_specifics_t asn_SPC_Narrow_15P0_specs_1 = {
asn_SEQUENCE_specifics_t asn_SPC_Narrow_15P0_specs_1 = {
sizeof(struct Narrow_15P0),
offsetof(struct Narrow_15P0, _asn_ctx),
asn_MAP_Narrow_15P0_tag2el_1,
......@@ -214,84 +216,10 @@ xer_type_encoder_f NarrowInteger_encode_xer;
/*** <<< CODE [NarrowInteger] >>> ***/
int
NarrowInteger_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
/* Replace with underlying type checker */
td->check_constraints = asn_DEF_Narrow_15P0.check_constraints;
return td->check_constraints(td, sptr, ctfailcb, app_key);
}
/*
* This type is implemented using Narrow_15P0,
* so here we adjust the DEF accordingly.
*/
static void
NarrowInteger_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->free_struct = asn_DEF_Narrow_15P0.free_struct;
td->print_struct = asn_DEF_Narrow_15P0.print_struct;
td->check_constraints = asn_DEF_Narrow_15P0.check_constraints;
td->ber_decoder = asn_DEF_Narrow_15P0.ber_decoder;
td->der_encoder = asn_DEF_Narrow_15P0.der_encoder;
td->xer_decoder = asn_DEF_Narrow_15P0.xer_decoder;
td->xer_encoder = asn_DEF_Narrow_15P0.xer_encoder;
td->uper_decoder = asn_DEF_Narrow_15P0.uper_decoder;
td->uper_encoder = asn_DEF_Narrow_15P0.uper_encoder;
td->oer_decoder = asn_DEF_Narrow_15P0.oer_decoder;
td->oer_encoder = asn_DEF_Narrow_15P0.oer_encoder;
if(!td->oer_constraints)
td->oer_constraints = asn_DEF_Narrow_15P0.oer_constraints;
if(!td->per_constraints)
td->per_constraints = asn_DEF_Narrow_15P0.per_constraints;
td->elements = asn_DEF_Narrow_15P0.elements;
td->elements_count = asn_DEF_Narrow_15P0.elements_count;
td->specifics = asn_DEF_Narrow_15P0.specifics;
}
void
NarrowInteger_free(asn_TYPE_descriptor_t *td,
void *struct_ptr, int contents_only) {
NarrowInteger_1_inherit_TYPE_descriptor(td);
td->free_struct(td, struct_ptr, contents_only);
}
int
NarrowInteger_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
NarrowInteger_1_inherit_TYPE_descriptor(td);
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
}
asn_dec_rval_t
NarrowInteger_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, const void *bufptr, size_t size, int tag_mode) {
NarrowInteger_1_inherit_TYPE_descriptor(td);
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
}
asn_enc_rval_t
NarrowInteger_encode_der(asn_TYPE_descriptor_t *td,
void *structure, int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) {
NarrowInteger_1_inherit_TYPE_descriptor(td);
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
}
asn_dec_rval_t
NarrowInteger_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, const char *opt_mname, const void *bufptr, size_t size) {
NarrowInteger_1_inherit_TYPE_descriptor(td);
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
}
asn_enc_rval_t
NarrowInteger_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
NarrowInteger_1_inherit_TYPE_descriptor(td);
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
}
/*** <<< STAT-DEFS [NarrowInteger] >>> ***/
......@@ -301,13 +229,13 @@ static const ber_tlv_tag_t asn_DEF_NarrowInteger_tags_1[] = {
asn_TYPE_descriptor_t asn_DEF_NarrowInteger = {
"NarrowInteger",
"NarrowInteger",
NarrowInteger_free,
NarrowInteger_print,
NarrowInteger_constraint,
NarrowInteger_decode_ber,
NarrowInteger_encode_der,
NarrowInteger_decode_xer,
NarrowInteger_encode_xer,
SEQUENCE_free,
SEQUENCE_print,
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 */
......@@ -319,7 +247,8 @@ asn_TYPE_descriptor_t asn_DEF_NarrowInteger = {
/sizeof(asn_DEF_NarrowInteger_tags_1[0]), /* 1 */
0, /* No OER visible constraints */
0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
0 /* No specifics */
asn_MBR_Narrow_15P0_1,
3, /* Elements count */
&asn_SPC_Narrow_15P0_specs_1 /* Additional specs */
};
......@@ -55,72 +55,6 @@ MinMax_16P0_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
* This type is implemented using INTEGER,
* so here we adjust the DEF accordingly.
*/
static void
MinMax_16P0_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->free_struct = asn_DEF_INTEGER.free_struct;
td->print_struct = asn_DEF_INTEGER.print_struct;
td->check_constraints = asn_DEF_INTEGER.check_constraints;
td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
td->oer_decoder = asn_DEF_INTEGER.oer_decoder;
td->oer_encoder = asn_DEF_INTEGER.oer_encoder;
if(!td->oer_constraints)
td->oer_constraints = asn_DEF_INTEGER.oer_constraints;
if(!td->per_constraints)
td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
}
void
MinMax_16P0_free(asn_TYPE_descriptor_t *td,
void *struct_ptr, int contents_only) {
MinMax_16P0_1_inherit_TYPE_descriptor(td);
td->free_struct(td, struct_ptr, contents_only);
}
int
MinMax_16P0_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
MinMax_16P0_1_inherit_TYPE_descriptor(td);
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
}
asn_dec_rval_t
MinMax_16P0_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, const void *bufptr, size_t size, int tag_mode) {
MinMax_16P0_1_inherit_TYPE_descriptor(td);
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
}
asn_enc_rval_t
MinMax_16P0_encode_der(asn_TYPE_descriptor_t *td,
void *structure, int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) {
MinMax_16P0_1_inherit_TYPE_descriptor(td);
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
}
asn_dec_rval_t
MinMax_16P0_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, const char *opt_mname, const void *bufptr, size_t size) {
MinMax_16P0_1_inherit_TYPE_descriptor(td);
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
}
asn_enc_rval_t
MinMax_16P0_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
MinMax_16P0_1_inherit_TYPE_descriptor(td);
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
}
/*** <<< STAT-DEFS [MinMax] >>> ***/
......@@ -130,13 +64,13 @@ static const ber_tlv_tag_t asn_DEF_MinMax_16P0_tags_1[] = {
asn_TYPE_descriptor_t asn_DEF_MinMax_16P0 = {
"MinMax",
"MinMax",
MinMax_16P0_free,
MinMax_16P0_print,
INTEGER_free,
INTEGER_print,
MinMax_16P0_constraint,
MinMax_16P0_decode_ber,
MinMax_16P0_encode_der,
MinMax_16P0_decode_xer,
MinMax_16P0_encode_xer,
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 */
......@@ -209,72 +143,6 @@ ThreePlus_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
* This type is implemented using MinMax_16P0,
* so here we adjust the DEF accordingly.
*/
static void
ThreePlus_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->free_struct = asn_DEF_MinMax_16P0.free_struct;
td->print_struct = asn_DEF_MinMax_16P0.print_struct;
td->check_constraints = asn_DEF_MinMax_16P0.check_constraints;
td->ber_decoder = asn_DEF_MinMax_16P0.ber_decoder;
td->der_encoder = asn_DEF_MinMax_16P0.der_encoder;
td->xer_decoder = asn_DEF_MinMax_16P0.xer_decoder;
td->xer_encoder = asn_DEF_MinMax_16P0.xer_encoder;
td->uper_decoder = asn_DEF_MinMax_16P0.uper_decoder;
td->uper_encoder = asn_DEF_MinMax_16P0.uper_encoder;
td->oer_decoder = asn_DEF_MinMax_16P0.oer_decoder;
td->oer_encoder = asn_DEF_MinMax_16P0.oer_encoder;
if(!td->oer_constraints)
td->oer_constraints = asn_DEF_MinMax_16P0.oer_constraints;
if(!td->per_constraints)
td->per_constraints = asn_DEF_MinMax_16P0.per_constraints;
td->elements = asn_DEF_MinMax_16P0.elements;
td->elements_count = asn_DEF_MinMax_16P0.elements_count;
td->specifics = asn_DEF_MinMax_16P0.specifics;
}
void
ThreePlus_free(asn_TYPE_descriptor_t *td,
void *struct_ptr, int contents_only) {
ThreePlus_1_inherit_TYPE_descriptor(td);
td->free_struct(td, struct_ptr, contents_only);
}
int
ThreePlus_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
ThreePlus_1_inherit_TYPE_descriptor(td);
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
}
asn_dec_rval_t
ThreePlus_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, const void *bufptr, size_t size, int tag_mode) {
ThreePlus_1_inherit_TYPE_descriptor(td);
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
}
asn_enc_rval_t
ThreePlus_encode_der(asn_TYPE_descriptor_t *td,
void *structure, int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) {
ThreePlus_1_inherit_TYPE_descriptor(td);
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
}
asn_dec_rval_t
ThreePlus_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, const char *opt_mname, const void *bufptr, size_t size) {
ThreePlus_1_inherit_TYPE_descriptor(td);
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
}
asn_enc_rval_t
ThreePlus_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
ThreePlus_1_inherit_TYPE_descriptor(td);
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
}
/*** <<< STAT-DEFS [ThreePlus] >>> ***/
......@@ -284,13 +152,13 @@ static const ber_tlv_tag_t asn_DEF_ThreePlus_tags_1[] = {
asn_TYPE_descriptor_t asn_DEF_ThreePlus = {
"ThreePlus",
"ThreePlus",
ThreePlus_free,
ThreePlus_print,
INTEGER_free,
INTEGER_print,
ThreePlus_constraint,
ThreePlus_decode_ber,
ThreePlus_encode_der,
ThreePlus_decode_xer,
ThreePlus_encode_xer,
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 */
......
This diff is collapsed.
......@@ -65,6 +65,8 @@ typedef struct PDU {
/*** <<< FUNC-DECLS [PDU] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_PDU;
extern asn_SEQUENCE_specifics_t asn_SPC_PDU_specs_1;
extern asn_TYPE_member_t asn_MBR_PDU_1[31];
/*** <<< POST-INCLUDE [PDU] >>> ***/
......@@ -1230,7 +1232,7 @@ asn_TYPE_descriptor_t asn_DEF_many_2 = {
&asn_SPC_many_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_PDU_1[] = {
asn_TYPE_member_t asn_MBR_PDU_1[] = {
{ ATF_POINTER, 31, offsetof(struct PDU, many),
.tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
.tag_mode = 0,
......@@ -1579,7 +1581,7 @@ static const asn_TYPE_tag2member_t asn_MAP_PDU_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (29 << 2)), 29, 0, 0 }, /* real */
{ (ASN_TAG_CLASS_CONTEXT | (30 << 2)), 30, 0, 0 } /* oid */
};
static asn_SEQUENCE_specifics_t asn_SPC_PDU_specs_1 = {
asn_SEQUENCE_specifics_t asn_SPC_PDU_specs_1 = {
sizeof(struct PDU),
offsetof(struct PDU, _asn_ctx),
asn_MAP_PDU_tag2el_1,
......
......@@ -55,72 +55,6 @@ T_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
* This type is implemented using BIT_STRING,
* so here we adjust the DEF accordingly.
*/
static void
T_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->free_struct = asn_DEF_BIT_STRING.free_struct;
td->print_struct = asn_DEF_BIT_STRING.print_struct;
td->check_constraints = asn_DEF_BIT_STRING.check_constraints;
td->ber_decoder = asn_DEF_BIT_STRING.ber_decoder;
td->der_encoder = asn_DEF_BIT_STRING.der_encoder;
td->xer_decoder = asn_DEF_BIT_STRING.xer_decoder;
td->xer_encoder = asn_DEF_BIT_STRING.xer_encoder;
td->uper_decoder = asn_DEF_BIT_STRING.uper_decoder;
td->uper_encoder = asn_DEF_BIT_STRING.uper_encoder;
td->oer_decoder = asn_DEF_BIT_STRING.oer_decoder;
td->oer_encoder = asn_DEF_BIT_STRING.oer_encoder;
if(!td->oer_constraints)
td->oer_constraints = asn_DEF_BIT_STRING.oer_constraints;
if(!td->per_constraints)
td->per_constraints = asn_DEF_BIT_STRING.per_constraints;
td->elements = asn_DEF_BIT_STRING.elements;
td->elements_count = asn_DEF_BIT_STRING.elements_count;
td->specifics = asn_DEF_BIT_STRING.specifics;
}
void
T_free(asn_TYPE_descriptor_t *td,
void *struct_ptr, int contents_only) {
T_1_inherit_TYPE_descriptor(td);
td->free_struct(td, struct_ptr, contents_only);
}
int
T_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
T_1_inherit_TYPE_descriptor(td);
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
}
asn_dec_rval_t
T_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, const void *bufptr, size_t size, int tag_mode) {
T_1_inherit_TYPE_descriptor(td);
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
}
asn_enc_rval_t
T_encode_der(asn_TYPE_descriptor_t *td,
void *structure, int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) {
T_1_inherit_TYPE_descriptor(td);
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
}
asn_dec_rval_t
T_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, const char *opt_mname, const void *bufptr, size_t size) {
T_1_inherit_TYPE_descriptor(td);
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
}
asn_enc_rval_t
T_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
T_1_inherit_TYPE_descriptor(td);
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
}
/*** <<< STAT-DEFS [T] >>> ***/
......@@ -130,13 +64,13 @@ static const ber_tlv_tag_t asn_DEF_T_tags_1[] = {
asn_TYPE_descriptor_t asn_DEF_T = {
"T",
"T",
T_free,
T_print,
BIT_STRING_free,
BIT_STRING_print,
T_constraint,
T_decode_ber,
T_encode_der,
T_decode_xer,
T_encode_xer,
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 */
......@@ -149,6 +83,6 @@ asn_TYPE_descriptor_t asn_DEF_T = {
0, /* No OER visible constraints */
0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
0 /* No specifics */
&asn_SPC_BIT_STRING_specs /* Additional specs */
};
......@@ -143,6 +143,8 @@ typedef struct Singleton {
/*** <<< FUNC-DECLS [Singleton] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_Singleton;
extern asn_SEQUENCE_specifics_t asn_SPC_Singleton_specs_1;
extern asn_TYPE_member_t asn_MBR_Singleton_1[1];
/*** <<< STAT-DEFS [Singleton] >>> ***/
......@@ -172,7 +174,7 @@ static int asn_DFL_2_set(int set_value, void **sptr) {
}
}
static asn_TYPE_member_t asn_MBR_Singleton_1[] = {
asn_TYPE_member_t asn_MBR_Singleton_1[] = {
{ ATF_POINTER, 1, offsetof(struct Singleton, opt_z),
.tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */
......@@ -191,7 +193,7 @@ static const ber_tlv_tag_t asn_DEF_Singleton_tags_1[] = {
static const asn_TYPE_tag2member_t asn_MAP_Singleton_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* opt-z */
};
static asn_SEQUENCE_specifics_t asn_SPC_Singleton_specs_1 = {
asn_SEQUENCE_specifics_t asn_SPC_Singleton_specs_1 = {
sizeof(struct Singleton),
offsetof(struct Singleton, _asn_ctx),
asn_MAP_Singleton_tag2el_1,
......@@ -265,10 +267,13 @@ typedef struct PDU_2 {
/*** <<< FUNC-DECLS [PDU-2] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_PDU_2;
extern asn_CHOICE_specifics_t asn_SPC_PDU_2_specs_1;
extern asn_TYPE_member_t asn_MBR_PDU_2_1[3];
extern asn_per_constraints_t asn_PER_type_PDU_2_constr_1;
/*** <<< CTDEFS [PDU-2] >>> ***/
static asn_per_constraints_t asn_PER_type_PDU_2_constr_1 GCC_NOTUSED = {
asn_per_constraints_t asn_PER_type_PDU_2_constr_1 GCC_NOTUSED = {
{ APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
......@@ -276,7 +281,7 @@ static asn_per_constraints_t asn_PER_type_PDU_2_constr_1 GCC_NOTUSED = {
/*** <<< STAT-DEFS [PDU-2] >>> ***/
static asn_TYPE_member_t asn_MBR_PDU_2_1[] = {
asn_TYPE_member_t asn_MBR_PDU_2_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct PDU_2, choice.main),
.tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */
......@@ -314,7 +319,7 @@ static const asn_TYPE_tag2member_t asn_MAP_PDU_2_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ext1 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 0, 0, 0 } /* main */
};
static asn_CHOICE_specifics_t asn_SPC_PDU_2_specs_1 = {
asn_CHOICE_specifics_t asn_SPC_PDU_2_specs_1 = {
sizeof(struct PDU_2),
offsetof(struct PDU_2, _asn_ctx),
offsetof(struct PDU_2, present),
......
......@@ -44,87 +44,6 @@ unsigned32_4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
* This type is implemented using NativeInteger,
* so here we adjust the DEF accordingly.
*/
static void
unsigned32_4_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->free_struct = asn_DEF_NativeInteger.free_struct;
td->print_struct = asn_DEF_NativeInteger.print_struct;
td->check_constraints = asn_DEF_NativeInteger.check_constraints;
td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
td->der_encoder = asn_DEF_NativeInteger.der_encoder;
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
if(!td->oer_constraints)
td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
if(!td->per_constraints)
td->per_constraints = asn_DEF_NativeInteger.per_constraints;
td->elements = asn_DEF_NativeInteger.elements;
td->elements_count = asn_DEF_NativeInteger.elements_count;
/* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
}
static void
unsigned32_4_free(asn_TYPE_descriptor_t *td,
void *struct_ptr, int contents_only) {
unsigned32_4_inherit_TYPE_descriptor(td);
td->free_struct(td, struct_ptr, contents_only);
}
static int
unsigned32_4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
unsigned32_4_inherit_TYPE_descriptor(td);
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
}
static asn_dec_rval_t
unsigned32_4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, const void *bufptr, size_t size, int tag_mode) {
unsigned32_4_inherit_TYPE_descriptor(td);
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
}
static asn_enc_rval_t
unsigned32_4_encode_der(asn_TYPE_descriptor_t *td,
void *structure, int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) {
unsigned32_4_inherit_TYPE_descriptor(td);
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
}
static asn_dec_rval_t
unsigned32_4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, const char *opt_mname, const void *bufptr, size_t size) {
unsigned32_4_inherit_TYPE_descriptor(td);
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
}
static asn_enc_rval_t
unsigned32_4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
unsigned32_4_inherit_TYPE_descriptor(td);
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
}
static asn_dec_rval_t
unsigned32_4_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
unsigned32_4_inherit_TYPE_descriptor(td);
return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
}
static asn_enc_rval_t
unsigned32_4_encode_uper(asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints,
void *structure, asn_per_outp_t *per_out) {
unsigned32_4_inherit_TYPE_descriptor(td);
return td->uper_encoder(td, constraints, structure, per_out);
}
static int
unsplit32_5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
......@@ -154,87 +73,6 @@ unsplit32_5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
* This type is implemented using NativeInteger,
* so here we adjust the DEF accordingly.
*/
static void
unsplit32_5_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->free_struct = asn_DEF_NativeInteger.free_struct;
td->print_struct = asn_DEF_NativeInteger.print_struct;
td->check_constraints = asn_DEF_NativeInteger.check_constraints;
td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
td->der_encoder = asn_DEF_NativeInteger.der_encoder;
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
if(!td->oer_constraints)
td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
if(!td->per_constraints)
td->per_constraints = asn_DEF_NativeInteger.per_constraints;
td->elements = asn_DEF_NativeInteger.elements;
td->elements_count = asn_DEF_NativeInteger.elements_count;
/* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
}
static void
unsplit32_5_free(asn_TYPE_descriptor_t *td,
void *struct_ptr, int contents_only) {
unsplit32_5_inherit_TYPE_descriptor(td);
td->free_struct(td, struct_ptr, contents_only);
}
static int
unsplit32_5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
unsplit32_5_inherit_TYPE_descriptor(td);
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
}
static asn_dec_rval_t
unsplit32_5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, const void *bufptr, size_t size, int tag_mode) {
unsplit32_5_inherit_TYPE_descriptor(td);
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
}
static asn_enc_rval_t
unsplit32_5_encode_der(asn_TYPE_descriptor_t *td,
void *structure, int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) {
unsplit32_5_inherit_TYPE_descriptor(td);
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
}
static asn_dec_rval_t
unsplit32_5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, const char *opt_mname, const void *bufptr, size_t size) {
unsplit32_5_inherit_TYPE_descriptor(td);
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
}
static asn_enc_rval_t
unsplit32_5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
unsplit32_5_inherit_TYPE_descriptor(td);
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
}
static asn_dec_rval_t
unsplit32_5_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
unsplit32_5_inherit_TYPE_descriptor(td);
return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
}
static asn_enc_rval_t
unsplit32_5_encode_uper(asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints,
void *structure, asn_per_outp_t *per_out) {
unsplit32_5_inherit_TYPE_descriptor(td);
return td->uper_encoder(td, constraints, structure, per_out);
}
static int
memb_small32range_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
......@@ -362,7 +200,7 @@ static asn_per_constraints_t asn_PER_memb_unsplit32_constr_5 GCC_NOTUSED = {
/*** <<< STAT-DEFS [T] >>> ***/
static asn_INTEGER_specifics_t asn_SPC_unsigned32_specs_4 = {
static const asn_INTEGER_specifics_t asn_SPC_unsigned32_specs_4 = {
0, 0, 0, 0, 0,
0, /* Native long size */
1 /* Unsigned representation */
......@@ -375,16 +213,16 @@ static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_unsigned32_4 = {
"unsigned32",
"unsigned32",
unsigned32_4_free,
unsigned32_4_print,
NativeInteger_free,
NativeInteger_print,
unsigned32_4_constraint,
unsigned32_4_decode_ber,
unsigned32_4_encode_der,
unsigned32_4_decode_xer,
unsigned32_4_encode_xer,
NativeInteger_decode_ber,
NativeInteger_encode_der,
NativeInteger_decode_xer,
NativeInteger_encode_xer,
0, 0, /* No OER support, use "-gen-OER" to enable */
unsigned32_4_decode_uper,
unsigned32_4_encode_uper,
NativeInteger_decode_uper,
NativeInteger_encode_uper,
0, /* Use generic outmost tag fetcher */
asn_DEF_unsigned32_tags_4,
sizeof(asn_DEF_unsigned32_tags_4)
......@@ -398,7 +236,7 @@ asn_TYPE_descriptor_t asn_DEF_unsigned32_4 = {
&asn_SPC_unsigned32_specs_4 /* Additional specs */
};
static asn_INTEGER_specifics_t asn_SPC_unsplit32_specs_5 = {
static const asn_INTEGER_specifics_t asn_SPC_unsplit32_specs_5 = {
0, 0, 0, 0, 0,
0, /* Native long size */
1 /* Unsigned representation */
......@@ -411,16 +249,16 @@ static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_unsplit32_5 = {
"unsplit32",
"unsplit32",
unsplit32_5_free,
unsplit32_5_print,
NativeInteger_free,
NativeInteger_print,
unsplit32_5_constraint,
unsplit32_5_decode_ber,
unsplit32_5_encode_der,
unsplit32_5_decode_xer,
unsplit32_5_encode_xer,
NativeInteger_decode_ber,
NativeInteger_encode_der,
NativeInteger_decode_xer,
NativeInteger_encode_xer,
0, 0, /* No OER support, use "-gen-OER" to enable */
unsplit32_5_decode_uper,
unsplit32_5_encode_uper,
NativeInteger_decode_uper,
NativeInteger_encode_uper,
0, /* Use generic outmost tag fetcher */
asn_DEF_unsplit32_tags_5,
sizeof(asn_DEF_unsplit32_tags_5)
......
This diff is collapsed.
......@@ -28,6 +28,8 @@ typedef struct SIGNED_15P0 {
/*** <<< FUNC-DECLS [SIGNED] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_SIGNED_15P0;
extern asn_SEQUENCE_specifics_t asn_SPC_SIGNED_15P0_specs_1;
extern asn_TYPE_member_t asn_MBR_SIGNED_15P0_1[3];
/*** <<< CODE [SIGNED] >>> ***/
......@@ -141,7 +143,7 @@ asn_TYPE_descriptor_t asn_DEF_toBeSigned_2 = {
&asn_SPC_toBeSigned_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_SIGNED_15P0_1[] = {
asn_TYPE_member_t asn_MBR_SIGNED_15P0_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct SIGNED_15P0, toBeSigned),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0,
......@@ -181,7 +183,7 @@ static const asn_TYPE_tag2member_t asn_MAP_SIGNED_15P0_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 1, 0, 0 }, /* algorithm */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* toBeSigned */
};
static asn_SEQUENCE_specifics_t asn_SPC_SIGNED_15P0_specs_1 = {
asn_SEQUENCE_specifics_t asn_SPC_SIGNED_15P0_specs_1 = {
sizeof(struct SIGNED_15P0),
offsetof(struct SIGNED_15P0, _asn_ctx),
asn_MAP_SIGNED_15P0_tag2el_1,
......@@ -238,84 +240,10 @@ xer_type_encoder_f Certificate_encode_xer;
/*** <<< CODE [Certificate] >>> ***/
int
Certificate_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
/* Replace with underlying type checker */
td->check_constraints = asn_DEF_SIGNED_15P0.check_constraints;
return td->check_constraints(td, sptr, ctfailcb, app_key);
}
/*
* This type is implemented using SIGNED_15P0,
* so here we adjust the DEF accordingly.
*/
static void
Certificate_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->free_struct = asn_DEF_SIGNED_15P0.free_struct;
td->print_struct = asn_DEF_SIGNED_15P0.print_struct;
td->check_constraints = asn_DEF_SIGNED_15P0.check_constraints;
td->ber_decoder = asn_DEF_SIGNED_15P0.ber_decoder;
td->der_encoder = asn_DEF_SIGNED_15P0.der_encoder;
td->xer_decoder = asn_DEF_SIGNED_15P0.xer_decoder;
td->xer_encoder = asn_DEF_SIGNED_15P0.xer_encoder;
td->uper_decoder = asn_DEF_SIGNED_15P0.uper_decoder;
td->uper_encoder = asn_DEF_SIGNED_15P0.uper_encoder;
td->oer_decoder = asn_DEF_SIGNED_15P0.oer_decoder;
td->oer_encoder = asn_DEF_SIGNED_15P0.oer_encoder;
if(!td->oer_constraints)
td->oer_constraints = asn_DEF_SIGNED_15P0.oer_constraints;
if(!td->per_constraints)
td->per_constraints = asn_DEF_SIGNED_15P0.per_constraints;
td->elements = asn_DEF_SIGNED_15P0.elements;
td->elements_count = asn_DEF_SIGNED_15P0.elements_count;
td->specifics = asn_DEF_SIGNED_15P0.specifics;
}
void
Certificate_free(asn_TYPE_descriptor_t *td,
void *struct_ptr, int contents_only) {
Certificate_1_inherit_TYPE_descriptor(td);
td->free_struct(td, struct_ptr, contents_only);
}
int
Certificate_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
Certificate_1_inherit_TYPE_descriptor(td);
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
}
asn_dec_rval_t
Certificate_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, const void *bufptr, size_t size, int tag_mode) {
Certificate_1_inherit_TYPE_descriptor(td);
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
}
asn_enc_rval_t
Certificate_encode_der(asn_TYPE_descriptor_t *td,
void *structure, int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) {
Certificate_1_inherit_TYPE_descriptor(td);
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
}
asn_dec_rval_t
Certificate_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, const char *opt_mname, const void *bufptr, size_t size) {
Certificate_1_inherit_TYPE_descriptor(td);
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
}
asn_enc_rval_t
Certificate_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
Certificate_1_inherit_TYPE_descriptor(td);
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
}
/*** <<< STAT-DEFS [Certificate] >>> ***/
......@@ -325,13 +253,13 @@ static const ber_tlv_tag_t asn_DEF_Certificate_tags_1[] = {
asn_TYPE_descriptor_t asn_DEF_Certificate = {
"Certificate",
"Certificate",
Certificate_free,
Certificate_print,
Certificate_constraint,
Certificate_decode_ber,
Certificate_encode_der,
Certificate_decode_xer,
Certificate_encode_xer,
SEQUENCE_free,
SEQUENCE_print,
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 */
......@@ -343,8 +271,9 @@ asn_TYPE_descriptor_t asn_DEF_Certificate = {
/sizeof(asn_DEF_Certificate_tags_1[0]), /* 1 */
0, /* No OER visible constraints */
0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
0 /* No specifics */
asn_MBR_SIGNED_15P0_1,
3, /* Elements count */
&asn_SPC_SIGNED_15P0_specs_1 /* Additional specs */
};
......@@ -369,6 +298,8 @@ typedef struct Name {
/*** <<< FUNC-DECLS [Name] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_Name;
extern asn_SET_OF_specifics_t asn_SPC_Name_specs_1;
extern asn_TYPE_member_t asn_MBR_Name_1[1];
/*** <<< POST-INCLUDE [Name] >>> ***/
......@@ -376,7 +307,7 @@ extern asn_TYPE_descriptor_t asn_DEF_Name;
/*** <<< STAT-DEFS [Name] >>> ***/
static asn_TYPE_member_t asn_MBR_Name_1[] = {
asn_TYPE_member_t asn_MBR_Name_1[] = {
{ ATF_POINTER, 0, 0,
.tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
.tag_mode = 0,
......@@ -391,7 +322,7 @@ static asn_TYPE_member_t asn_MBR_Name_1[] = {
static const ber_tlv_tag_t asn_DEF_Name_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_Name_specs_1 = {
asn_SET_OF_specifics_t asn_SPC_Name_specs_1 = {
sizeof(struct Name),
offsetof(struct Name, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
......@@ -441,6 +372,8 @@ typedef struct RelativeDistinguishedName {
/*** <<< FUNC-DECLS [RelativeDistinguishedName] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_RelativeDistinguishedName;
extern asn_SET_OF_specifics_t asn_SPC_RelativeDistinguishedName_specs_1;
extern asn_TYPE_member_t asn_MBR_RelativeDistinguishedName_1[1];
/*** <<< CTABLES [RelativeDistinguishedName] >>> ***/
......@@ -499,7 +432,7 @@ memb_IA5String_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
/*** <<< STAT-DEFS [RelativeDistinguishedName] >>> ***/
static asn_TYPE_member_t asn_MBR_RelativeDistinguishedName_1[] = {
asn_TYPE_member_t asn_MBR_RelativeDistinguishedName_1[] = {
{ ATF_POINTER, 0, 0,
.tag = (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)),
.tag_mode = 0,
......@@ -514,7 +447,7 @@ static asn_TYPE_member_t asn_MBR_RelativeDistinguishedName_1[] = {
static const ber_tlv_tag_t asn_DEF_RelativeDistinguishedName_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_RelativeDistinguishedName_specs_1 = {
asn_SET_OF_specifics_t asn_SPC_RelativeDistinguishedName_specs_1 = {
sizeof(struct RelativeDistinguishedName),
offsetof(struct RelativeDistinguishedName, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
......
......@@ -86,7 +86,8 @@ static const asn_TYPE_tag2member_t asn_MAP_T_tag2el_1[] = {
static const uint8_t asn_MAP_T_mmap_1[(3 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(1 << 7) | (1 << 6) | (0 << 5)
};
static asn_SET_specifics_t asn_SPC_T_specs_1 = {
static
asn_SET_specifics_t asn_SPC_T_specs_1 = {
sizeof(struct T),
offsetof(struct T, _asn_ctx),
offsetof(struct T, _presence_map),
......
......@@ -20,6 +20,8 @@ typedef struct Forest {
/*** <<< FUNC-DECLS [Forest] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_Forest;
extern asn_SET_OF_specifics_t asn_SPC_Forest_specs_1;
extern asn_TYPE_member_t asn_MBR_Forest_1[1];
/*** <<< POST-INCLUDE [Forest] >>> ***/
......@@ -27,7 +29,7 @@ extern asn_TYPE_descriptor_t asn_DEF_Forest;
/*** <<< STAT-DEFS [Forest] >>> ***/
static asn_TYPE_member_t asn_MBR_Forest_1[] = {
asn_TYPE_member_t asn_MBR_Forest_1[] = {
{ ATF_POINTER, 0, 0,
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0,
......@@ -42,7 +44,7 @@ static asn_TYPE_member_t asn_MBR_Forest_1[] = {
static const ber_tlv_tag_t asn_DEF_Forest_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_Forest_specs_1 = {
asn_SET_OF_specifics_t asn_SPC_Forest_specs_1 = {
sizeof(struct Forest),
offsetof(struct Forest, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
......@@ -92,10 +94,12 @@ typedef struct Tree {
/*** <<< FUNC-DECLS [Tree] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_Tree;
extern asn_SEQUENCE_specifics_t asn_SPC_Tree_specs_1;
extern asn_TYPE_member_t asn_MBR_Tree_1[2];
/*** <<< STAT-DEFS [Tree] >>> ***/
static asn_TYPE_member_t asn_MBR_Tree_1[] = {
asn_TYPE_member_t asn_MBR_Tree_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct Tree, height),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
.tag_mode = 0,
......@@ -124,7 +128,7 @@ static const asn_TYPE_tag2member_t asn_MAP_Tree_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* height */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* width */
};
static asn_SEQUENCE_specifics_t asn_SPC_Tree_specs_1 = {
asn_SEQUENCE_specifics_t asn_SPC_Tree_specs_1 = {
sizeof(struct Tree),
offsetof(struct Tree, _asn_ctx),
asn_MAP_Tree_tag2el_1,
......@@ -512,7 +516,8 @@ static const asn_TYPE_tag2member_t asn_MAP_Stuff_tag2el_cxer_1[] = {
static const uint8_t asn_MAP_Stuff_mmap_1[(3 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(0 << 7) | (0 << 6) | (0 << 5)
};
static asn_SET_specifics_t asn_SPC_Stuff_specs_1 = {
static
asn_SET_specifics_t asn_SPC_Stuff_specs_1 = {
sizeof(struct Stuff),
offsetof(struct Stuff, _asn_ctx),
offsetof(struct Stuff, _presence_map),
......
......@@ -95,6 +95,8 @@ typedef struct Fault {
/*** <<< FUNC-DECLS [Fault] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_Fault;
extern asn_SET_OF_specifics_t asn_SPC_Fault_specs_1;
extern asn_TYPE_member_t asn_MBR_Fault_1[1];
/*** <<< POST-INCLUDE [Fault] >>> ***/
......@@ -102,7 +104,7 @@ extern asn_TYPE_descriptor_t asn_DEF_Fault;
/*** <<< STAT-DEFS [Fault] >>> ***/
static asn_TYPE_member_t asn_MBR_Fault_1[] = {
asn_TYPE_member_t asn_MBR_Fault_1[] = {
{ ATF_POINTER, 0, 0,
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0,
......@@ -117,7 +119,7 @@ static asn_TYPE_member_t asn_MBR_Fault_1[] = {
static const ber_tlv_tag_t asn_DEF_Fault_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_Fault_specs_1 = {
asn_SET_OF_specifics_t asn_SPC_Fault_specs_1 = {
sizeof(struct Fault),
offsetof(struct Fault, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
......@@ -168,13 +170,14 @@ typedef struct Error {
/*** <<< FUNC-DECLS [Error] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_Error;
extern asn_SEQUENCE_specifics_t asn_SPC_Error_specs_1;
/*** <<< STAT-DEFS [Error] >>> ***/
static const ber_tlv_tag_t asn_DEF_Error_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_SEQUENCE_specifics_t asn_SPC_Error_specs_1 = {
asn_SEQUENCE_specifics_t asn_SPC_Error_specs_1 = {
sizeof(struct Error),
offsetof(struct Error, _asn_ctx),
0, /* No top level tags */
......
......@@ -166,10 +166,12 @@ typedef struct T2 {
/*** <<< FUNC-DECLS [T2] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_T2;
extern asn_SEQUENCE_specifics_t asn_SPC_T2_specs_1;
extern asn_TYPE_member_t asn_MBR_T2_1[2];
/*** <<< STAT-DEFS [T2] >>> ***/
static asn_TYPE_member_t asn_MBR_T2_1[] = {
asn_TYPE_member_t asn_MBR_T2_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct T2, flag),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
.tag_mode = 0,
......@@ -198,7 +200,7 @@ static const asn_TYPE_tag2member_t asn_MAP_T2_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* flag */
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 1, 0, 0 } /* str */
};
static asn_SEQUENCE_specifics_t asn_SPC_T2_specs_1 = {
asn_SEQUENCE_specifics_t asn_SPC_T2_specs_1 = {
sizeof(struct T2),
offsetof(struct T2, _asn_ctx),
asn_MAP_T2_tag2el_1,
......
This diff is collapsed.
......@@ -37,6 +37,8 @@ typedef struct Test_structure_1 {
/*** <<< FUNC-DECLS [Test-structure-1] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_Test_structure_1;
extern asn_SEQUENCE_specifics_t asn_SPC_Test_structure_1_specs_1;
extern asn_TYPE_member_t asn_MBR_Test_structure_1_1[4];
/*** <<< POST-INCLUDE [Test-structure-1] >>> ***/
......@@ -138,7 +140,7 @@ asn_TYPE_descriptor_t asn_DEF_t_member2_4 = {
&asn_SPC_t_member2_specs_4 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Test_structure_1_1[] = {
asn_TYPE_member_t asn_MBR_Test_structure_1_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct Test_structure_1, t_member1),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
.tag_mode = 0,
......@@ -189,7 +191,7 @@ static const asn_TYPE_tag2member_t asn_MAP_Test_structure_1_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 0 }, /* t-member3 */
{ (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* t-member1 */
};
static asn_SEQUENCE_specifics_t asn_SPC_Test_structure_1_specs_1 = {
asn_SEQUENCE_specifics_t asn_SPC_Test_structure_1_specs_1 = {
sizeof(struct Test_structure_1),
offsetof(struct Test_structure_1, _asn_ctx),
asn_MAP_Test_structure_1_tag2el_1,
......@@ -269,6 +271,8 @@ typedef struct Choice_1 {
/*** <<< FUNC-DECLS [Choice-1] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_Choice_1;
extern asn_CHOICE_specifics_t asn_SPC_Choice_1_specs_1;
extern asn_TYPE_member_t asn_MBR_Choice_1_1[4];
/*** <<< POST-INCLUDE [Choice-1] >>> ***/
......@@ -324,7 +328,7 @@ asn_TYPE_descriptor_t asn_DEF_or_3 = {
&asn_SPC_or_specs_3 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Choice_1_1[] = {
asn_TYPE_member_t asn_MBR_Choice_1_1[] = {
{ ATF_POINTER, 0, offsetof(struct Choice_1, choice.And),
.tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
.tag_mode = +1, /* EXPLICIT tag at current level */
......@@ -372,7 +376,7 @@ static const asn_TYPE_tag2member_t asn_MAP_Choice_1_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* not */
{ (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 3, 0, 0 } /* other */
};
static asn_CHOICE_specifics_t asn_SPC_Choice_1_specs_1 = {
asn_CHOICE_specifics_t asn_SPC_Choice_1_specs_1 = {
sizeof(struct Choice_1),
offsetof(struct Choice_1, _asn_ctx),
offsetof(struct Choice_1, present),
......@@ -441,6 +445,8 @@ typedef struct Test_structure_2 {
/*** <<< FUNC-DECLS [Test-structure-2] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_Test_structure_2;
extern asn_SET_specifics_t asn_SPC_Test_structure_2_specs_1;
extern asn_TYPE_member_t asn_MBR_Test_structure_2_1[1];
/*** <<< POST-INCLUDE [Test-structure-2] >>> ***/
......@@ -448,7 +454,7 @@ extern asn_TYPE_descriptor_t asn_DEF_Test_structure_2;
/*** <<< STAT-DEFS [Test-structure-2] >>> ***/
static asn_TYPE_member_t asn_MBR_Test_structure_2_1[] = {
asn_TYPE_member_t asn_MBR_Test_structure_2_1[] = {
{ ATF_POINTER, 1, offsetof(struct Test_structure_2, m1),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
.tag_mode = 0,
......@@ -469,7 +475,7 @@ static const asn_TYPE_tag2member_t asn_MAP_Test_structure_2_tag2el_1[] = {
static const uint8_t asn_MAP_Test_structure_2_mmap_1[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(0 << 7)
};
static asn_SET_specifics_t asn_SPC_Test_structure_2_specs_1 = {
asn_SET_specifics_t asn_SPC_Test_structure_2_specs_1 = {
sizeof(struct Test_structure_2),
offsetof(struct Test_structure_2, _asn_ctx),
offsetof(struct Test_structure_2, _presence_map),
......@@ -541,6 +547,8 @@ typedef struct Test_structure_3 {
/*** <<< FUNC-DECLS [Test-structure-3] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_Test_structure_3;
extern asn_SET_specifics_t asn_SPC_Test_structure_3_specs_1;
extern asn_TYPE_member_t asn_MBR_Test_structure_3_1[1];
/*** <<< POST-INCLUDE [Test-structure-3] >>> ***/
......@@ -548,7 +556,7 @@ extern asn_TYPE_descriptor_t asn_DEF_Test_structure_3;
/*** <<< STAT-DEFS [Test-structure-3] >>> ***/
static asn_TYPE_member_t asn_MBR_Test_structure_3_1[] = {
asn_TYPE_member_t asn_MBR_Test_structure_3_1[] = {
{ ATF_POINTER, 1, offsetof(struct Test_structure_3, m1),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
.tag_mode = 0,
......@@ -569,7 +577,7 @@ static const asn_TYPE_tag2member_t asn_MAP_Test_structure_3_tag2el_1[] = {
static const uint8_t asn_MAP_Test_structure_3_mmap_1[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(0 << 7)
};
static asn_SET_specifics_t asn_SPC_Test_structure_3_specs_1 = {
asn_SET_specifics_t asn_SPC_Test_structure_3_specs_1 = {
sizeof(struct Test_structure_3),
offsetof(struct Test_structure_3, _asn_ctx),
offsetof(struct Test_structure_3, _presence_map),
......
This diff is collapsed.
......@@ -58,7 +58,8 @@ static const asn_TYPE_tag2member_t asn_MAP_T1_tag2el_1[] = {
static const uint8_t asn_MAP_T1_mmap_1[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(1 << 7)
};
static asn_SET_specifics_t asn_SPC_T1_specs_1 = {
static
asn_SET_specifics_t asn_SPC_T1_specs_1 = {
sizeof(struct T1),
offsetof(struct T1, _asn_ctx),
offsetof(struct T1, _presence_map),
......@@ -155,7 +156,8 @@ static const asn_TYPE_tag2member_t asn_MAP_T2_tag2el_1[] = {
static const uint8_t asn_MAP_T2_mmap_1[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(1 << 7)
};
static asn_SET_specifics_t asn_SPC_T2_specs_1 = {
static
asn_SET_specifics_t asn_SPC_T2_specs_1 = {
sizeof(struct T2),
offsetof(struct T2, _asn_ctx),
offsetof(struct T2, _presence_map),
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -81,7 +81,8 @@ static const ber_tlv_tag_t asn_DEF_class_tags_4[] = {
static const uint8_t asn_MAP_class_mmap_4[(0 + (8 * sizeof(unsigned int)) - 1) / 8] = {
0
};
static asn_SET_specifics_t asn_SPC_class_specs_4 = {
static
asn_SET_specifics_t asn_SPC_class_specs_4 = {
sizeof(struct Class),
offsetof(struct Class, _asn_ctx),
offsetof(struct Class, _presence_map),
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -176,7 +176,8 @@ static const uint8_t asn_MAP_TestSet_mmap_1[(10 + (8 * sizeof(unsigned int)) - 1
(1 << 7) | (0 << 6) | (1 << 5) | (1 << 4) | (0 << 3) | (1 << 2) | (1 << 1) | (1 << 0),
(0 << 7) | (1 << 6)
};
static asn_SET_specifics_t asn_SPC_TestSet_specs_1 = {
static
asn_SET_specifics_t asn_SPC_TestSet_specs_1 = {
sizeof(struct TestSet),
offsetof(struct TestSet, _asn_ctx),
offsetof(struct TestSet, _presence_map),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment