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
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
oai
asn1c
Commits
b8ec15dc
Commit
b8ec15dc
authored
20 years ago
by
Lev Walkin
Browse files
Options
Downloads
Patches
Plain Diff
NULL XER encoding
parent
dde25b3e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
skeletons/NULL.c
+22
-2
22 additions, 2 deletions
skeletons/NULL.c
skeletons/NULL.h
+1
-0
1 addition, 0 deletions
skeletons/NULL.h
with
23 additions
and
2 deletions
skeletons/NULL.c
+
22
−
2
View file @
b8ec15dc
...
...
@@ -3,6 +3,7 @@
* Redistribution and modifications are permitted subject to BSD license.
*/
#include
<asn_internal.h>
#include
<asn_codecs_prim.h>
#include
<NULL.h>
#include
<BOOLEAN.h>
/* Implemented in terms of BOOLEAN type */
...
...
@@ -20,8 +21,8 @@ asn_TYPE_descriptor_t asn_DEF_NULL = {
asn_generic_no_constraint
,
BOOLEAN_decode_ber
,
/* Implemented in terms of BOOLEAN */
NULL_encode_der
,
/* Special handling of DER encoding */
0
,
/* Not implemented yet */
NULL_encode_xer
,
/* Special handling of DER encoding */
NULL_decode_xer
,
NULL_encode_xer
,
0
,
/* Use generic outmost tag fetcher */
asn_DEF_NULL_tags
,
sizeof
(
asn_DEF_NULL_tags
)
/
sizeof
(
asn_DEF_NULL_tags
[
0
]),
...
...
@@ -65,6 +66,25 @@ NULL_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
return
er
;
}
static
ssize_t
NULL__xer_body_decode
(
void
*
sptr
,
void
*
chunk_buf
,
size_t
chunk_size
)
{
(
void
)
sptr
;
if
(
xer_is_whitespace
(
chunk_buf
,
chunk_size
))
return
chunk_size
;
return
-
1
;
}
asn_dec_rval_t
NULL_decode_xer
(
asn_codec_ctx_t
*
opt_codec_ctx
,
asn_TYPE_descriptor_t
*
td
,
void
**
sptr
,
const
char
*
opt_mname
,
void
*
buf_ptr
,
size_t
size
)
{
return
xer_decode_primitive
(
opt_codec_ctx
,
td
,
sptr
,
sizeof
(
NULL_t
),
opt_mname
,
buf_ptr
,
size
,
NULL__xer_body_decode
);
}
int
NULL_print
(
asn_TYPE_descriptor_t
*
td
,
const
void
*
sptr
,
int
ilevel
,
asn_app_consume_bytes_f
*
cb
,
void
*
app_key
)
{
...
...
This diff is collapsed.
Click to expand it.
skeletons/NULL.h
+
1
−
0
View file @
b8ec15dc
...
...
@@ -17,6 +17,7 @@ extern asn_TYPE_descriptor_t asn_DEF_NULL;
asn_struct_print_f
NULL_print
;
der_type_encoder_f
NULL_encode_der
;
xer_type_decoder_f
NULL_decode_xer
;
xer_type_encoder_f
NULL_encode_xer
;
#endif
/* NULL_H */
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