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
ed3a4ae4
Commit
ed3a4ae4
authored
Jul 07, 2017
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
INTEGER decoding stub
parent
a7a240e8
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
76 additions
and
4 deletions
+76
-4
skeletons/INTEGER.c
skeletons/INTEGER.c
+2
-3
skeletons/INTEGER_oer.c
skeletons/INTEGER_oer.c
+37
-0
skeletons/INTEGER_oer.h
skeletons/INTEGER_oer.h
+20
-0
skeletons/oer_decoder.h
skeletons/oer_decoder.h
+1
-1
skeletons/tests/Makefile.am
skeletons/tests/Makefile.am
+1
-0
skeletons/tests/check-OER-INTEGER.c
skeletons/tests/check-OER-INTEGER.c
+15
-0
No files found.
skeletons/INTEGER.c
View file @
ed3a4ae4
...
...
@@ -35,9 +35,8 @@ asn_TYPE_descriptor_t asn_DEF_INTEGER = {
0
,
0
,
#else
//INTEGER_decode_oer, /* OER decoder */
//INTEGER_encode_oer, /* Canonical OER encoder */
0
,
0
,
INTEGER_decode_oer
,
/* OER decoder */
0
,
/*INTEGER_encode_oer,*/
/* Canonical OER encoder */
#endif
/* ASN_DISABLE_OER_SUPPORT */
0
,
/* Use generic outmost tag fetcher */
asn_DEF_INTEGER_tags
,
...
...
skeletons/INTEGER_oer.c
0 → 100644
View file @
ed3a4ae4
/*
* Copyright (c) 2017 Lev Walkin <vlm@lionet.info>.
* All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#ifndef ASN_DISABLE_OER_SUPPORT
#include <asn_internal.h>
#include <INTEGER.h>
#include <errno.h>
asn_dec_rval_t
INTEGER_decode_oer
(
asn_codec_ctx_t
*
opt_codec_ctx
,
asn_TYPE_descriptor_t
*
td
,
asn_oer_constraints_t
*
constraints
,
void
**
sptr
,
const
void
*
ptr
,
size_t
size
)
{
asn_INTEGER_specifics_t
*
specs
=
(
asn_INTEGER_specifics_t
*
)
td
->
specifics
;
asn_dec_rval_t
rval
=
{
RC_OK
,
0
};
INTEGER_t
*
st
=
(
INTEGER_t
*
)
*
sptr
;
asn_oer_constraint_t
*
ct
;
int
repeat
;
(
void
)
opt_codec_ctx
;
if
(
!
st
)
{
st
=
(
INTEGER_t
*
)(
*
sptr
=
CALLOC
(
1
,
sizeof
(
*
st
)));
if
(
!
st
)
ASN__DECODE_FAILED
;
}
if
(
!
constraints
)
constraints
=
td
->
oer_constraints
;
ct
=
constraints
?
&
constraints
->
value
:
0
;
FREEMEM
(
st
->
buf
);
st
->
buf
=
0
;
st
->
size
=
0
;
}
#endif
/* ASN_DISABLE_OER_SUPPORT */
skeletons/INTEGER_oer.h
0 → 100644
View file @
ed3a4ae4
/*-
* Copyright (c) 2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#ifndef _INTEGER_OER_H_
#define _INTEGER_OER_H_
#ifdef __cplusplus
extern
"C"
{
#endif
#include <asn_application.h>
#include <asn_codecs.h>
oer_type_decoder_f
INTEGER_decode_oer
;
oer_type_encoder_f
INTEGER_encode_oer
;
#ifdef __cplusplus
}
#endif
#endif
/* _INTEGER_OER_H_ */
skeletons/oer_decoder.h
View file @
ed3a4ae4
...
...
@@ -32,7 +32,7 @@ asn_dec_rval_t oer_decode(struct asn_codec_ctx_s *opt_codec_ctx,
typedef
asn_dec_rval_t
(
oer_type_decoder_f
)(
struct
asn_codec_ctx_s
*
opt_codec_ctx
,
struct
asn_TYPE_descriptor_s
*
type_descriptor
,
asn_oer_constraint_t
*
constraints
,
asn_oer_constraint
s
_t
*
constraints
,
void
**
struct_ptr
,
const
void
*
buf_ptr
,
size_t
size
);
...
...
skeletons/tests/Makefile.am
View file @
ed3a4ae4
...
...
@@ -11,6 +11,7 @@ check_PROGRAMS = \
check-INTEGER
\
check-REAL
\
check-XER
\
check-OER-INTEGER
\
check-PER
\
check-PER-INTEGER
...
...
skeletons/tests/check-OER-INTEGER.c
0 → 100644
View file @
ed3a4ae4
#include <stdio.h>
#include <assert.h>
#include <INTEGER.h>
#include <INTEGER.c>
#include <INTEGER_oer.c>
void
check_decode_ok
(
intmax_t
control
,
uint8_t
*
buf
,
size_t
size
)
{
}
int
main
()
{
check_decode_ok
(
0
,
""
,
1
);
}
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