asn1c/tests/65-multi-tag-OK.asn1.-Pfnat...

543 lines
13 KiB
Plaintext

/*** <<< INCLUDES [T1] >>> ***/
#include "T2.h"
/*** <<< TYPE-DECLS [T1] >>> ***/
typedef T2_t T1_t;
/*** <<< FUNC-DECLS [T1] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_T1;
asn_struct_free_f T1_free;
asn_struct_print_f T1_print;
asn_constr_check_f T1_constraint;
ber_type_decoder_f T1_decode_ber;
der_type_encoder_f T1_encode_der;
xer_type_decoder_f T1_decode_xer;
xer_type_encoder_f T1_encode_xer;
/*** <<< CODE [T1] >>> ***/
/*
* This type is implemented using T2,
* so here we adjust the DEF accordingly.
*/
/*** <<< STAT-DEFS [T1] >>> ***/
static const ber_tlv_tag_t asn_DEF_T1_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2))
};
static const ber_tlv_tag_t asn_DEF_T1_all_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
};
asn_TYPE_descriptor_t asn_DEF_T1 = {
"T1",
"T1",
NativeReal_free,
NativeReal_print,
NativeReal_compare,
NativeReal_constraint,
NativeReal_decode_ber,
NativeReal_encode_der,
NativeReal_decode_xer,
NativeReal_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_T1_tags_1,
sizeof(asn_DEF_T1_tags_1)
/sizeof(asn_DEF_T1_tags_1[0]), /* 4 */
asn_DEF_T1_all_tags_1,
sizeof(asn_DEF_T1_all_tags_1)
/sizeof(asn_DEF_T1_all_tags_1[0]), /* 6 */
0, /* No OER visible constraints */
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
/*** <<< INCLUDES [T2] >>> ***/
#include "T3.h"
/*** <<< TYPE-DECLS [T2] >>> ***/
typedef T3_t T2_t;
/*** <<< FUNC-DECLS [T2] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_T2;
asn_struct_free_f T2_free;
asn_struct_print_f T2_print;
asn_constr_check_f T2_constraint;
ber_type_decoder_f T2_decode_ber;
der_type_encoder_f T2_encode_der;
xer_type_decoder_f T2_decode_xer;
xer_type_encoder_f T2_encode_xer;
/*** <<< CODE [T2] >>> ***/
/*
* This type is implemented using T3,
* so here we adjust the DEF accordingly.
*/
/*** <<< STAT-DEFS [T2] >>> ***/
static const ber_tlv_tag_t asn_DEF_T2_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2))
};
static const ber_tlv_tag_t asn_DEF_T2_all_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
};
asn_TYPE_descriptor_t asn_DEF_T2 = {
"T2",
"T2",
NativeReal_free,
NativeReal_print,
NativeReal_compare,
NativeReal_constraint,
NativeReal_decode_ber,
NativeReal_encode_der,
NativeReal_decode_xer,
NativeReal_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_T2_tags_1,
sizeof(asn_DEF_T2_tags_1)
/sizeof(asn_DEF_T2_tags_1[0]), /* 3 */
asn_DEF_T2_all_tags_1,
sizeof(asn_DEF_T2_all_tags_1)
/sizeof(asn_DEF_T2_all_tags_1[0]), /* 5 */
0, /* No OER visible constraints */
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
/*** <<< INCLUDES [T3] >>> ***/
#include "T4.h"
/*** <<< TYPE-DECLS [T3] >>> ***/
typedef T4_t T3_t;
/*** <<< FUNC-DECLS [T3] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_T3;
asn_struct_free_f T3_free;
asn_struct_print_f T3_print;
asn_constr_check_f T3_constraint;
ber_type_decoder_f T3_decode_ber;
der_type_encoder_f T3_encode_der;
xer_type_decoder_f T3_decode_xer;
xer_type_encoder_f T3_encode_xer;
/*** <<< CODE [T3] >>> ***/
/*
* This type is implemented using T4,
* so here we adjust the DEF accordingly.
*/
/*** <<< STAT-DEFS [T3] >>> ***/
static const ber_tlv_tag_t asn_DEF_T3_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2))
};
static const ber_tlv_tag_t asn_DEF_T3_all_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
};
asn_TYPE_descriptor_t asn_DEF_T3 = {
"T3",
"T3",
NativeReal_free,
NativeReal_print,
NativeReal_compare,
NativeReal_constraint,
NativeReal_decode_ber,
NativeReal_encode_der,
NativeReal_decode_xer,
NativeReal_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_T3_tags_1,
sizeof(asn_DEF_T3_tags_1)
/sizeof(asn_DEF_T3_tags_1[0]), /* 2 */
asn_DEF_T3_all_tags_1,
sizeof(asn_DEF_T3_all_tags_1)
/sizeof(asn_DEF_T3_all_tags_1[0]), /* 4 */
0, /* No OER visible constraints */
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
/*** <<< INCLUDES [T4] >>> ***/
#include "T5.h"
/*** <<< TYPE-DECLS [T4] >>> ***/
typedef T5_t T4_t;
/*** <<< FUNC-DECLS [T4] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_T4;
asn_struct_free_f T4_free;
asn_struct_print_f T4_print;
asn_constr_check_f T4_constraint;
ber_type_decoder_f T4_decode_ber;
der_type_encoder_f T4_encode_der;
xer_type_decoder_f T4_decode_xer;
xer_type_encoder_f T4_encode_xer;
/*** <<< CODE [T4] >>> ***/
/*
* This type is implemented using T5,
* so here we adjust the DEF accordingly.
*/
/*** <<< STAT-DEFS [T4] >>> ***/
static const ber_tlv_tag_t asn_DEF_T4_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
};
asn_TYPE_descriptor_t asn_DEF_T4 = {
"T4",
"T4",
NativeReal_free,
NativeReal_print,
NativeReal_compare,
NativeReal_constraint,
NativeReal_decode_ber,
NativeReal_encode_der,
NativeReal_decode_xer,
NativeReal_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_T4_tags_1,
sizeof(asn_DEF_T4_tags_1)
/sizeof(asn_DEF_T4_tags_1[0]) - 1, /* 2 */
asn_DEF_T4_tags_1, /* Same as above */
sizeof(asn_DEF_T4_tags_1)
/sizeof(asn_DEF_T4_tags_1[0]), /* 3 */
0, /* No OER visible constraints */
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
/*** <<< INCLUDES [T5] >>> ***/
#include "T6.h"
/*** <<< TYPE-DECLS [T5] >>> ***/
typedef T6_t T5_t;
/*** <<< FUNC-DECLS [T5] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_T5;
asn_struct_free_f T5_free;
asn_struct_print_f T5_print;
asn_constr_check_f T5_constraint;
ber_type_decoder_f T5_decode_ber;
der_type_encoder_f T5_encode_der;
xer_type_decoder_f T5_decode_xer;
xer_type_encoder_f T5_encode_xer;
/*** <<< CODE [T5] >>> ***/
/*
* This type is implemented using T6,
* so here we adjust the DEF accordingly.
*/
/*** <<< STAT-DEFS [T5] >>> ***/
static const ber_tlv_tag_t asn_DEF_T5_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
};
asn_TYPE_descriptor_t asn_DEF_T5 = {
"T5",
"T5",
NativeReal_free,
NativeReal_print,
NativeReal_compare,
NativeReal_constraint,
NativeReal_decode_ber,
NativeReal_encode_der,
NativeReal_decode_xer,
NativeReal_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_T5_tags_1,
sizeof(asn_DEF_T5_tags_1)
/sizeof(asn_DEF_T5_tags_1[0]) - 1, /* 1 */
asn_DEF_T5_tags_1, /* Same as above */
sizeof(asn_DEF_T5_tags_1)
/sizeof(asn_DEF_T5_tags_1[0]), /* 2 */
0, /* No OER visible constraints */
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
/*** <<< INCLUDES [T6] >>> ***/
#include <NativeReal.h>
/*** <<< TYPE-DECLS [T6] >>> ***/
typedef double T6_t;
/*** <<< FUNC-DECLS [T6] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_T6;
asn_struct_free_f T6_free;
asn_struct_print_f T6_print;
asn_constr_check_f T6_constraint;
ber_type_decoder_f T6_decode_ber;
der_type_encoder_f T6_encode_der;
xer_type_decoder_f T6_decode_xer;
xer_type_encoder_f T6_encode_xer;
/*** <<< CODE [T6] >>> ***/
/*
* This type is implemented using NativeReal,
* so here we adjust the DEF accordingly.
*/
/*** <<< STAT-DEFS [T6] >>> ***/
static const ber_tlv_tag_t asn_DEF_T6_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
};
asn_TYPE_descriptor_t asn_DEF_T6 = {
"T6",
"T6",
NativeReal_free,
NativeReal_print,
NativeReal_compare,
NativeReal_constraint,
NativeReal_decode_ber,
NativeReal_encode_der,
NativeReal_decode_xer,
NativeReal_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_T6_tags_1,
sizeof(asn_DEF_T6_tags_1)
/sizeof(asn_DEF_T6_tags_1[0]), /* 1 */
asn_DEF_T6_tags_1, /* Same as above */
sizeof(asn_DEF_T6_tags_1)
/sizeof(asn_DEF_T6_tags_1[0]), /* 1 */
0, /* No OER visible constraints */
0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
/*** <<< INCLUDES [T] >>> ***/
#include "Ts.h"
/*** <<< TYPE-DECLS [T] >>> ***/
typedef Ts_t T_t;
/*** <<< FUNC-DECLS [T] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_T;
asn_struct_free_f T_free;
asn_struct_print_f T_print;
asn_constr_check_f T_constraint;
ber_type_decoder_f T_decode_ber;
der_type_encoder_f T_encode_der;
xer_type_decoder_f T_decode_xer;
xer_type_encoder_f T_encode_xer;
/*** <<< CODE [T] >>> ***/
/*
* This type is implemented using Ts,
* so here we adjust the DEF accordingly.
*/
/*** <<< STAT-DEFS [T] >>> ***/
static const ber_tlv_tag_t asn_DEF_T_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
(ASN_TAG_CLASS_CONTEXT | (123 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_TYPE_descriptor_t asn_DEF_T = {
"T",
"T",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_compare,
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_T_tags_1,
sizeof(asn_DEF_T_tags_1)
/sizeof(asn_DEF_T_tags_1[0]) - 2, /* 1 */
asn_DEF_T_tags_1, /* Same as above */
sizeof(asn_DEF_T_tags_1)
/sizeof(asn_DEF_T_tags_1[0]), /* 3 */
0, /* No OER visible constraints */
0, /* No PER visible constraints */
asn_MBR_Ts_1,
3, /* Elements count */
&asn_SPC_Ts_specs_1 /* Additional specs */
};
/*** <<< INCLUDES [Ts] >>> ***/
#include "T2.h"
#include "T3.h"
#include <constr_SEQUENCE.h>
/*** <<< TYPE-DECLS [Ts] >>> ***/
typedef struct Ts {
T2_t m1;
T3_t *m2 /* OPTIONAL */;
T3_t m3;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} Ts_t;
/*** <<< FUNC-DECLS [Ts] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_Ts;
extern asn_SEQUENCE_specifics_t asn_SPC_Ts_specs_1;
extern asn_TYPE_member_t asn_MBR_Ts_1[3];
/*** <<< STAT-DEFS [Ts] >>> ***/
asn_TYPE_member_t asn_MBR_Ts_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct Ts, m1),
.tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_T2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.oer_constraints = 0, /* OER is not compiled, use -gen-OER */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "m1"
},
{ ATF_POINTER, 1, offsetof(struct Ts, m2),
.tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
.tag_mode = +1, /* EXPLICIT tag at current level */
.type = &asn_DEF_T3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.oer_constraints = 0, /* OER is not compiled, use -gen-OER */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "m2"
},
{ ATF_NOFLAGS, 0, offsetof(struct Ts, m3),
.tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_T3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.oer_constraints = 0, /* OER is not compiled, use -gen-OER */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "m3"
},
};
static const ber_tlv_tag_t asn_DEF_Ts_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (123 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_Ts_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* m1 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* m2 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 } /* m3 */
};
asn_SEQUENCE_specifics_t asn_SPC_Ts_specs_1 = {
sizeof(struct Ts),
offsetof(struct Ts, _asn_ctx),
asn_MAP_Ts_tag2el_1,
3, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
asn_TYPE_descriptor_t asn_DEF_Ts = {
"Ts",
"Ts",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_compare,
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_Ts_tags_1,
sizeof(asn_DEF_Ts_tags_1)
/sizeof(asn_DEF_Ts_tags_1[0]) - 1, /* 1 */
asn_DEF_Ts_tags_1, /* Same as above */
sizeof(asn_DEF_Ts_tags_1)
/sizeof(asn_DEF_Ts_tags_1[0]), /* 2 */
0, /* No OER visible constraints */
0, /* No PER visible constraints */
asn_MBR_Ts_1,
3, /* Elements count */
&asn_SPC_Ts_specs_1 /* Additional specs */
};