Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asn1c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
qwebaby3
asn1c
Commits
fb953d17
Commit
fb953d17
authored
17 years ago
by
Lev Walkin
Browse files
Options
Downloads
Patches
Plain Diff
extensibility fix, at least
parent
33af5c3e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/126-per-extensions-OK.asn1
+20
-0
20 additions, 0 deletions
tests/126-per-extensions-OK.asn1
tests/126-per-extensions-OK.asn1.-Pgen-PER
+89
-0
89 additions, 0 deletions
tests/126-per-extensions-OK.asn1.-Pgen-PER
with
109 additions
and
0 deletions
tests/126-per-extensions-OK.asn1
0 → 100644
+
20
−
0
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
This diff is collapsed.
Click to expand it.
tests/126-per-extensions-OK.asn1.-Pgen-PER
0 → 100644
+
89
−
0
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 */
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment