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

extensibility fix, at least

parent 33af5c3e
No related branches found
No related tags found
No related merge requests found
-- OK: Everything is fine
-- iso.org.dod.internet.private.enterprise (1.3.6.1.4.1)
-- .spelio.software.asn1c.test (9363.1.5.1)
-- .126
ModulePERExtensions
{ iso org(3) dod(6) internet (1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 126 }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
PDU ::= SEQUENCE {
...,
str-o IA5String OPTIONAL,
str-m IA5String
}
END
/*** <<< INCLUDES [PDU] >>> ***/
#include <IA5String.h>
#include <constr_SEQUENCE.h>
/*** <<< TYPE-DECLS [PDU] >>> ***/
typedef struct PDU {
/*
* This type is extensible,
* possible extensions are below.
*/
IA5String_t *str_o /* OPTIONAL */;
IA5String_t *str_m;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} PDU_t;
/*** <<< FUNC-DECLS [PDU] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_PDU;
/*** <<< STAT-DEFS [PDU] >>> ***/
static asn_TYPE_member_t asn_MBR_PDU_1[] = {
{ ATF_POINTER, 2, offsetof(struct PDU, str_o),
.tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_IA5String,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* No PER visible constraints */
.default_value = 0,
.name = "str-o"
},
{ ATF_POINTER, 1, offsetof(struct PDU, str_m),
.tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_IA5String,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = 0, /* No PER visible constraints */
.default_value = 0,
.name = "str-m"
},
};
static int asn_MAP_PDU_oms_1[] = { 0, 1 };
static ber_tlv_tag_t asn_DEF_PDU_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_PDU_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* str-o at 16 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* str-m at 17 */
};
static asn_SEQUENCE_specifics_t asn_SPC_PDU_specs_1 = {
sizeof(struct PDU),
offsetof(struct PDU, _asn_ctx),
asn_MAP_PDU_tag2el_1,
2, /* Count of tags in the map */
asn_MAP_PDU_oms_1, /* Optional members */
0, 2, /* Root/Additions */
-1, /* Start extensions */
3 /* Stop extensions */
};
asn_TYPE_descriptor_t asn_DEF_PDU = {
"PDU",
"PDU",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
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 */
asn_DEF_PDU_tags_1, /* Same as above */
sizeof(asn_DEF_PDU_tags_1)
/sizeof(asn_DEF_PDU_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_PDU_1,
2, /* Elements count */
&asn_SPC_PDU_specs_1 /* Additional specs */
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment