Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
fb953d17
Commit
fb953d17
authored
Jun 23, 2007
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extensibility fix, at least
parent
33af5c3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
109 additions
and
0 deletions
+109
-0
tests/126-per-extensions-OK.asn1
tests/126-per-extensions-OK.asn1
+20
-0
tests/126-per-extensions-OK.asn1.-Pgen-PER
tests/126-per-extensions-OK.asn1.-Pgen-PER
+89
-0
No files found.
tests/126-per-extensions-OK.asn1
0 → 100644
View file @
fb953d17
-- 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
tests/126-per-extensions-OK.asn1.-Pgen-PER
0 → 100644
View file @
fb953d17
/*** <<< 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 */
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment