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
d88bea9b
Commit
d88bea9b
authored
Jul 20, 2017
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add OER SEQUENCE decoder
parent
98eabc1c
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
428 additions
and
10 deletions
+428
-10
skeletons/Makefile.am
skeletons/Makefile.am
+1
-0
skeletons/constr_SEQUENCE.h
skeletons/constr_SEQUENCE.h
+1
-0
skeletons/constr_SEQUENCE_oer.c
skeletons/constr_SEQUENCE_oer.c
+374
-0
skeletons/constr_SEQUENCE_oer.h
skeletons/constr_SEQUENCE_oer.h
+20
-0
skeletons/oer_decoder.h
skeletons/oer_decoder.h
+25
-3
skeletons/oer_encoder.h
skeletons/oer_encoder.h
+3
-3
skeletons/oer_support.h
skeletons/oer_support.h
+4
-4
No files found.
skeletons/Makefile.am
View file @
d88bea9b
...
...
@@ -63,6 +63,7 @@ libasn1cskeletons_la_SOURCES = \
ber_tlv_tag.c ber_tlv_tag.h
\
constr_CHOICE.c constr_CHOICE.h
\
constr_SEQUENCE.c constr_SEQUENCE.h
\
constr_SEQUENCE_oer.c constr_SEQUENCE_oer.h
\
constr_SEQUENCE_OF.c constr_SEQUENCE_OF.h
\
constr_SET.c constr_SET.h
\
constr_SET_OF.c constr_SET_OF.h
\
...
...
skeletons/constr_SEQUENCE.h
View file @
d88bea9b
...
...
@@ -6,6 +6,7 @@
#define _CONSTR_SEQUENCE_H_
#include <asn_application.h>
#include <constr_SEQUENCE_oer.h>
#ifdef __cplusplus
extern
"C"
{
...
...
skeletons/constr_SEQUENCE_oer.c
0 → 100644
View file @
d88bea9b
This diff is collapsed.
Click to expand it.
skeletons/constr_SEQUENCE_oer.h
0 → 100644
View file @
d88bea9b
/*-
* Copyright (c) 2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#ifndef CONSTR_SEQUENCE_OER_H
#define CONSTR_SEQUENCE_OER_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include <asn_application.h>
#include <asn_codecs.h>
oer_type_decoder_f
SEQUENCE_decode_oer
;
oer_type_encoder_f
SEQUENCE_encode_oer
;
#ifdef __cplusplus
}
#endif
#endif
/* CONSTR_SEQUENCE_OER_H */
skeletons/oer_decoder.h
View file @
d88bea9b
...
...
@@ -2,8 +2,8 @@
* Copyright (c) 2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#ifndef
_OER_DECODER_H_
#define
_OER_DECODER_H_
#ifndef
OER_DECODER_H
#define
OER_DECODER_H
#include <asn_application.h>
#include <oer_support.h>
...
...
@@ -37,8 +37,30 @@ typedef asn_dec_rval_t(oer_type_decoder_f)(
const
void
*
buf_ptr
,
size_t
size
);
/*
* Swallow the Open Type (X.696 (08/2015), #30) into /dev/null.
* RETURN VALUES:
* 0: More data expected than bufptr contains.
* -1: Fatal error deciphering length.
* >0: Number of bytes used from bufptr.
*/
ssize_t
oer_open_type_slurp
(
const
void
*
bufptr
,
size_t
size
);
/*
* Read the Open Type (X.696 (08/2015), #30).
* RETURN VALUES:
* 0: More data expected than bufptr contains.
* -1: Fatal error deciphering length.
* >0: Number of bytes used from bufptr.
*/
ssize_t
oer_open_type_get
(
asn_codec_ctx_t
*
opt_codec_ctx
,
struct
asn_TYPE_descriptor_s
*
td
,
asn_oer_constraints_t
*
constraints
,
void
**
struct_ptr
,
const
void
*
bufptr
,
size_t
size
);
#ifdef __cplusplus
}
#endif
#endif
/*
_OER_DECODER_H_
*/
#endif
/*
OER_DECODER_H
*/
skeletons/oer_encoder.h
View file @
d88bea9b
...
...
@@ -2,8 +2,8 @@
* Copyright (c) 2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#ifndef
_OER_ENCODER_H_
#define
_OER_ENCODER_H_
#ifndef
OER_ENCODER_H
#define
OER_ENCODER_H
#include <asn_application.h>
...
...
@@ -48,4 +48,4 @@ typedef asn_enc_rval_t(oer_type_encoder_f)(
}
#endif
#endif
/*
_OER_ENCODER_H_
*/
#endif
/*
OER_ENCODER_H
*/
skeletons/oer_support.h
View file @
d88bea9b
...
...
@@ -3,8 +3,8 @@
* All rights reserved.
* Redistribution and modifications are oermitted subject to BSD license.
*/
#ifndef
_OER_SUPPORT_H_
#define
_OER_SUPPORT_H_
#ifndef
OER_SUPPORT_H
#define
OER_SUPPORT_H
#include <asn_system.h>
/* Platform-specific types */
...
...
@@ -30,7 +30,7 @@ typedef const struct asn_oer_constraints_s {
/*
* Fetch the length determinant (X.696
08/2015
, #8.6) into *len_r.
* Fetch the length determinant (X.696
(08/2015)
, #8.6) into *len_r.
* RETURN VALUES:
* 0: More data expected than bufptr contains.
* -1: Fatal error deciphering length.
...
...
@@ -49,4 +49,4 @@ ssize_t oer_serialize_length(size_t length, asn_app_consume_bytes_f *cb, void *a
}
#endif
#endif
/*
_OER_SUPPORT_H_
*/
#endif
/*
OER_SUPPORT_H
*/
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