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
e20bd952
Commit
e20bd952
authored
Dec 16, 2023
by
v0-e
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jer: SET encode as SEQUENCE
parent
bbde80f6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
64 deletions
+2
-64
skeletons/constr_SET.c
skeletons/constr_SET.c
+1
-1
skeletons/constr_SET.h
skeletons/constr_SET.h
+1
-1
skeletons/constr_SET_jer.c
skeletons/constr_SET_jer.c
+0
-62
No files found.
skeletons/constr_SET.c
View file @
e20bd952
...
...
@@ -30,7 +30,7 @@ asn_TYPE_operation_t asn_OP_SET = {
#endif
/* !defined(ASN_DISABLE_XER_SUPPORT) */
#if !defined(ASN_DISABLE_JER_SUPPORT)
SET_decode_jer
,
SE
T
_encode_jer
,
SE
QUENCE
_encode_jer
,
#else
0
,
0
,
...
...
skeletons/constr_SET.h
View file @
e20bd952
...
...
@@ -67,7 +67,7 @@ xer_type_encoder_f SET_encode_xer;
#if !defined(ASN_DISABLE_JER_SUPPORT)
jer_type_decoder_f
SET_decode_jer
;
jer_type_encoder_f
SE
T_encode_jer
;
jer_type_encoder_f
SE
QUENCE_encode_jer
;
/* X.697 29. (2021) */
#endif
/* !defined(ASN_DISABLE_JER_SUPPORT) */
#if !defined(ASN_DISABLE_UPER_SUPPORT)
...
...
skeletons/constr_SET_jer.c
View file @
e20bd952
...
...
@@ -296,65 +296,3 @@ SET_decode_jer(const asn_codec_ctx_t *opt_codec_ctx,
ctx
->
phase
=
4
;
/* "Phase out" on hard failure */
RETURN
(
RC_FAIL
);
}
asn_enc_rval_t
SET_encode_jer
(
const
asn_TYPE_descriptor_t
*
td
,
const
void
*
sptr
,
int
ilevel
,
enum
jer_encoder_flags_e
flags
,
asn_app_consume_bytes_f
*
cb
,
void
*
app_key
)
{
const
asn_SET_specifics_t
*
specs
=
(
const
asn_SET_specifics_t
*
)
td
->
specifics
;
asn_enc_rval_t
er
;
int
xcan
=
0
;
const
asn_TYPE_tag2member_t
*
t2m
=
specs
->
tag2el_cxer
;
size_t
t2m_count
=
specs
->
tag2el_cxer_count
;
size_t
edx
;
if
(
!
sptr
)
ASN__ENCODE_FAILED
;
assert
(
t2m_count
==
td
->
elements_count
);
er
.
encoded
=
0
;
for
(
edx
=
0
;
edx
<
t2m_count
;
edx
++
)
{
asn_enc_rval_t
tmper
;
asn_TYPE_member_t
*
elm
;
const
void
*
memb_ptr
;
const
char
*
mname
;
size_t
mlen
;
elm
=
&
td
->
elements
[
t2m
[
edx
].
el_no
];
mname
=
elm
->
name
;
mlen
=
strlen
(
elm
->
name
);
if
(
elm
->
flags
&
ATF_POINTER
)
{
memb_ptr
=
*
(
const
void
*
const
*
)((
const
char
*
)
sptr
+
elm
->
memb_offset
);
if
(
!
memb_ptr
)
{
if
(
elm
->
optional
)
continue
;
/* Mandatory element missing */
ASN__ENCODE_FAILED
;
}
}
else
{
memb_ptr
=
(
const
void
*
)((
const
char
*
)
sptr
+
elm
->
memb_offset
);
}
if
(
!
xcan
)
ASN__TEXT_INDENT
(
1
,
ilevel
);
ASN__CALLBACK3
(
"
\"
"
,
1
,
mname
,
mlen
,
"
\"
"
,
1
);
/* Print the member itself */
tmper
=
elm
->
type
->
op
->
jer_encoder
(
elm
->
type
,
memb_ptr
,
ilevel
+
1
,
flags
,
cb
,
app_key
);
if
(
tmper
.
encoded
==
-
1
)
return
tmper
;
er
.
encoded
+=
tmper
.
encoded
;
}
if
(
!
xcan
)
ASN__TEXT_INDENT
(
1
,
ilevel
-
1
);
ASN__ENCODED_OK
(
er
);
cb_failed:
ASN__ENCODE_FAILED
;
}
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